define(["exports","./Matrix2-9aa31791","./RuntimeError-346a3079","./when-4bbc8319","./ComponentDatatype-93750d1a","./combine-83860057"],(function(e,t,r,n,a,i){"use strict";functiono(e){this._ellipsoid=n.defaultValue(e,t.Ellipsoid.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(o.prototype,{ellipsoid:{get:function(){returnthis._ellipsoid}}}),o.prototype.project=function(e,r){vara=this._semimajorAxis,i=e.longitude*a,o=e.latitude*a,s=e.height;returnn.defined(r)?(r.x=i,r.y=o,r.z=s,r):newt.Cartesian3(i,o,s)},o.prototype.unproject=function(e,r){vara=this._oneOverSemimajorAxis,i=e.x*a,o=e.y*a,s=e.z;returnn.defined(r)?(r.longitude=i,r.latitude=o,r.height=s,r):newt.Cartographic(i,o,s)};vars=Object.freeze({OUTSIDE:-1,INTERSECTING:0,INSIDE:1});functionu(e,t){this.start=n.defaultValue(e,0),this.stop=n.defaultValue(t,0)}functionl(e,r){this.center=t.Cartesian3.clone(n.defaultValue(e,t.Cartesian3.ZERO)),this.radius=n.defaultValue(r,0)}varc=newt.Cartesian3,d=newt.Cartesian3,f=newt.Cartesian3,p=newt.Cartesian3,h=newt.Cartesian3,m=newt.Cartesian3,g=newt.Cartesian3,v=newt.Cartesian3,y=newt.Cartesian3,w=newt.Cartesian3,C=newt.Cartesian3,_=newt.Cartesian3,b=4/3*a.CesiumMath.PI;l.fromPoints=function(e,r){if(n.defined(r)||(r=newl),!n.defined(e)||0===e.length)returnr.center=t.Cartesian3.clone(t.Cartesian3.ZERO,r.center),r.radius=0,r;vara,i=t.Cartesian3.clone(e[0],g),o=t.Cartesian3.clone(i,c),s=t.Cartesian3.clone(i,d),u=t.Cartesian3.clone(i,f),b=t.Cartesian3.clone(i,p),x=t.Cartesian3.clone(i,h),S=t.Cartesian3.clone(i,m),E=e.length;for(a=1;a<E;a++){t.Cartesian3.clone(e[a],i);varA=i.x,O=i.y,I=i.z;A<o.x&&t.Cartesian3.clone(i,o),A>b.x&&t.Cartesian3.clone(i,b),O<s.y&&t.Cartesian3.clone(i,s),O>x.y&&t.Cartesian3.clone(i,x),I<u.z&&t.Cartesian3.clone(i,u),I>S.z&&t.Cartesian3.clone(i,S)}varR=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(b,o,v)),P=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(x,s,v)),T=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(S,u,v)),q=o,z=b,M=R;P>M&&(M=P,q=s,z=x),T>M&&(M=T,q=u,z=S);varD=y;D.x=.5*(q.x+z.x),D.y=.5*(q.y+z.y),D.z=.5*(q.z+z.z);varU=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(z,D,v)),k=Math.sqrt(U),F=w;F.x=o.x,F.y=s.y,F.z=u.z;varN=C;N.x=b.x,N.y=x.y,N.z=S.z;varj=t.Cartesian3.midpoint(F,N,_),B=0;for(a=0;a<E;a++){t.Cartesian3.clone(e[a],i);varV=t.Cartesian3.magnitude(t.Cartesian3.subtract(i,j,v));V>B&&(B=V);varL=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(i,D,v));if(L>U){varQ=Math.sqrt(L);U=(k=.5*(k+Q))*k;varW=Q-k;D.x=(k*D.x+W*i.x)/Q,D.y=(k*D.y+W*i.y)/Q,D.z=(k*D.z+W*i.z)/Q}}returnk<B?(t.Cartesian3.clone(D,r.center),r.radius=k):(t.Cartesian3.clone(j,r.center),r.radius=B),r};varx=newo,S=newt.Cartesian3,E=newt.Cartesian3,A=newt.Cartographic,O=newt.Cartographic;l.fromRectangle2D=function(e,t,r){returnl.fromRectangleWithHeights2D(e,t,0,0,r)},l.fromRectangleWithHeights2D=function(e,r,a,i,o){if(n.defined(o)||(o=newl),!n.defined(e))returno.center=t.Cartesian3.clone(t.Cartesian3.ZERO,o.center),o.radius=0,o;r=n.defaultValue(r,x),t.Rectangle.southwest(e,A),A.height=a,t.Rectangle.northeast(e,O),O.height=i;vars=r.project(A,S),u=r.project(O,E),c=u.x-s.x,d=u.y-s.y,f=u.z-s.z;o.radius=.5*Math.sqrt(c*c+d*d+f*f);varp=o.center;returnp.x=s.x+.5*c,p.y=s.y+.5*d,p.z=s.z+.5*f,o};varI=[];l.fromRectangle3D=function(e,r,a,i){if(r=n.defaultValue(r,t.Ellipsoid.WGS84),a=n.defaultValue(a,0),n.defined(i)||(i=newl),!n.defined(e))returni.center=t.Cartesian3.clone(t.Cartesian3.ZERO,i.center),i.radius=0,i;varo=t.Rectangle.subsample(e,r,a,I);returnl.fromPoints(o,i)},l.fromVertices=function(e,r,a,i){if(n.defined(i)||(i=newl),!n.defined(e)||0===e.length)returni.center=t.Cartesian3.clone(t.Cartesian3.ZERO,i.center),i.radius=0,i;r=n.defaultValue(r,t.Cartesian3.ZERO),a=n.defaultValue(a,3);varo=g;o.x=e[0]+r.x,o.y=e[1]+r.y,o.z=e[2]+r.z;vars,u=t.Cartesian3.clone(o,c),b=t.Cartesian3.clone(o,d),x=t.Cartesian3.clone(o,f),S=t.Cartesian3.clone(o,p),E=t.Cartesian3.clone(o,h),A=t.Cartesian3.clone(o,m),O=e.length;for(s=0;s<O;s+=a){varI=e[s]+r.x,R=e[s+1]+r.y,P=e[s+2]+r.z;o.x=I,o.y=R,o.z=P,I<u.x&&t.Cartesian3.clone(o,u),I>S.x&&t.Cartesian3.clone(o,S),R<b.y&&t.Cartesian3.clone(o,b),R>E.y&&t.Cartesian3.clone(o,E),P<x.z&&t.Cartesian3.clone(o,x),P>A.z&&t.Cartesian3.clone(o,A)}varT=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(S,u,v)),q=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(E,b,v)),z=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(A,x,v)),M=u,D=S,U=T;q>U&&(U=q,M=b,D=E),z>U&&(U=z,M=x,D=A);vark=y;k.x=.5*(M.x+D.x),k.y=.5*(M.y+D.y),k.z=.5*(M.z+D.z);varF=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(D,k,v)),N=Math.sqrt(F),j=w;j.x=u.x,j.y=b.y,j.z=x.z;varB=C;B.x=S.x,B.y=E.y,B.z=A.z;varV=t.Cartesian3.midpoint(j,B,_),L=0;for(s=0;s<O;s+=a){o.x=e[s]+r.x,o.y=e[s+1]+r.y,o.z=e[s+2]+r.z;varQ=t.Cartesian3.magnitude(t.Cartesian3.subtract(o,V,v));Q>L&&(L=Q);varW=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(o,k,v));if(W>F){varH=Math.sqrt(W);F=(N=.5*(N+H))*N;varY=H-N;k.x=(N*k.x+Y*o.x)/H,k.y=(N*k.y+Y*o.y)/H,k.z=(N*k.z+Y*o.z)/H}}returnN<L?(t.Cartesian3.clone(k,i.center),i.radius=N):(t.Cartesian3.clone(V,i.center),i.radius=L),i},l.fromEncodedCartesianVertices=function(e,r,a){if(n.defined(a)||(a=newl),!n.defined(e)||!n.defined(r)||e.length!==r.length||0===e.length)returna.center=t.Cartesian3.clone(t.Cartesian3.ZERO,a.center),a.radius=0,a;vari=g;i.x=e[0]+r[0],i.y=e[1]+r[1],i.z=e[2]+r[2];varo,s=t.Cartesian3.clone(i,c),u=t.Cartesian3.clone(i,d),b=t.Cartesian3.clone(i,f),x=t.Cartesian3.clone(i,p),S=t.Cartesian3.clone(i,h),E=t.Cartesian3.clone(i,m),A=e.length;for(o=0;o<A;o+=3){varO=e[o]+r[o],I=e[o+1]+r[o+1],R=e[o+2]+r[o+2];i.x=O,i.y=I,i.z=R,O<s.x&&t.Cartesian3.clone(i,s),O>x.x&&t.Cartesian3.clone(i,x),I<u.y&&t.Cartesian3.clone(i,u),I>S.y&&t.Cartesian3.clone(i,S),R<b.z&&t.Cartesian3.clone(i,b),R>E.z&&t.Cartesian3.clone(i,E)}varP=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(x,s,v)),T=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(S,u,v)),q=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(E,b,v)),z=s,M=x,D=P;T>D&&(D=T,z=u,M=S),q>D&&(D=q,z=b,M=E);varU=y;U.x=.5*(z.x+M.x),U.y=.5*(z.y+M.y),U.z=.5*(z.z+M.z);vark=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(M,U,v)),F=Math.sqrt(k),N=w;N.x=s.x,N.y=u.y,N.z=b.z;varj=C;j.x=x.x,j.y=S.y,j.z=E.z;varB=t.Cartesian3.midpoint(N,j,_),V=0;for(o=0;o<A;o+=3){i.x=e[o]+r[o],i.y=e[o+1]+r[o+1],i.z=e[o+2]+r[o+2];varL=t.Cartesian3.magnitude(t.Cartesian3.subtract(i,B,v));L>V&&(V=L);varQ=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(i,U,v));if(Q>k){varW=Math.sqrt(Q);k=(F=.5*(F+W))*F;varH=W-F;U.x=(F*U.x+H*i.x)/W,U.y=(F*U.y+H*i.y)/W,U.z=(F*U.z+H*i.z)/W}}returnF<V?(t.Cartesian3.clone(U,a.center),a.radius=F):(t.Cartesian3.clone(B,a.center),a.radius=V),a},l.fromCornerPoints=function(e,r,a){n.defined(a)||(a=newl);vari=t.Cartesian3.midpoint(e,r,a.center);returna.radius=t.Cartesian3.distance(i,r),a},l.fromEllipsoid=function(e,r){returnn.defined(r)||(r=newl),t.Cartesian3.clone(t.Cartesian3.ZERO,r.center),r.radius=e.maximumRadius,r};varR=newt.Cartesian3;l.fromBoundingSpheres=function(e,r){if(n.defined(r)||(r=newl),!n.defined(e)||0===e.length)returnr.center=t.Cartesian3.clone(t.Cartesian3.ZERO,r.center),r.radius=0,r;vara=e.length;if(1===a)returnl.clone(e[0],r);if(2===a)returnl.union(e[0],e[1],r);vari,o=[];for(i=0;i<a;i++)o.push(e[i].center);vars=(r=l.fromPoints(o,r)).center,u=r.radius;for(i=0;i<a;i++){varc=e[i];u=Math.max(u,t.Cartesian3.distance(s,c.center,R)+c.radius)}returnr.radius=u,r};varP=newt.Cartesian3,T=newt.Cartesian3,q=newt.Cartesian3;l.fromOrientedBoundingBox=function(e,r){n.defined(r)||(r=newl);vara=e.halfAxes,i=t.Matrix3.getColumn(a,0,P),o=t.Matrix3.getColumn(a,1,T),s=t.Matrix3.getColumn(a,2,q);returnt.Cartesian3.add(i,o,i),t.Cartesian3.add(i,s,i),r.center=t.Cartesian3.clone(e.center,r.center),r.radius=t.Cartesian3.magnitude(i),r},l.clone=function(e,r){if(n.defined(e))returnn.defined(r)?(r.center=t.Cartesian3.clone(e.center,r.center),r.radius=e.radius,r):newl(e.center,e.radius)},l.packedLength=4,l.pack=function(e,t,r){r=n.defaultValue(r,0);vara=e.center;returnt[r++]=a.x,t[r++]=a.y,t[r++]=a.z,t[r]=e.radius,t},l.unpack=function(e,t,r){t=n.defaultValue(t,0),n.defined(r)||(r=newl);vara=r.center;returna.x=e[t++],a.y=e[t++],a.z=e[t++],r.radius=e[t],r};varz=newt.Cartesian3,M=newt.Cartesian3;l.union=function(e,r,a){n.defined(a)||(a=newl);vari=e.center,o=e.radius,s=r.center,u=r.radius,c=t.Cartesian3.subtract(s,i,z),d=t.Cartesian3.magnitude(c);if(o>=d+u)returne.clone(a),a;if(u>=d+o)returnr.clone(a),a;varf=.5*(o+d+u),p=t.Cartesian3.multiplyByScalar(c,(-o+f)/d,M);returnt.Cartesian3.add(p,i,p),t.Cartesian3.clone(p,a.center),a.radius=f,a};varD=newt.Cartesian3;l.expand=function(e,r,n){n=l.clone(e,n);vara=t.Cartesian3.magnitude(t.Cartesian3.subtract(r,n.center,D));returna>n.radius&&(n.radius=a),n},l.intersectPlane=function(e,r){varn=e.center,a=e.radius,i=r.normal,o=t.Cartesian3.dot(i,n)+r.distance;returno<-a?s.OUTSIDE:o<a?s.INTERSECTING:s.INSIDE},l.transform=function(e,r,a){returnn.defined(a)||(a=newl),a.center=t.Matrix4.multiplyByPoint(r,e.center,a.center),a.radius=t.Matrix4.getMaximumScale(r)*e.radius,a};varU=newt.Cartesian3;l.distanceSquaredTo=function(e,r){varn=t.Cartesian3.subtract(e.center,r,U),a=t.Cartesian3.magnitude(n)-e.radius;returna<=0?0:a*a},l.transformWithoutScale=function(e,r,a){returnn.defined(a)||(a=newl),a.center=t.Matrix4.multiplyByPoint(r,e.center,a.center),a.radius=e.radius,a};vark=newt.Cartesian3;l.computePlaneDistances=function(e,r,a,i){n.defined(i)||(i=newu);varo=t.Cartesian3.subtract(e.center,r,k),s=t.Cartesian3.dot(a,o);returni.start=s-e.radius,i.stop=s+e.radius,i};for(varF=newt.Cartesian3,N=newt.Cartesian3,j=newt.Cartesian3,B=newt.Cartesian3,V=newt.Cartesian3,L=newt.Cartographic,Q=newArray(8),W=0;W<8;++W)Q[W]=newt.Cartesian3;varH,Y=newo;l.projectTo2D=function(e,r,a){vari,o=(r=n.defaultValue(r,Y)).ellipsoid,s=e.center,u=e.radius;i=t.Cartesian3.equals(s,t.Cartesian3.ZERO)?t.Cartesian3.clone(t.Cartesian3.UNIT_X,F):o.geodeticSurfaceNormal(s,F);varc=t.Cartesian3.cross(t.Cartesian3.UNIT_Z,i,N);t.Cartesian3.normalize(c,c);vard=t.Cartesian3.cross(i,c,j);t.Cartesian3.normalize(d,d),t.Cartesian3.multiplyByScalar(i,u,i),t.Cartesian3.multiplyByScalar(d,u,d),t.Cartesian3.multiplyByScalar(c,u,c);varf=t.Cartesian3.negate(d,V),p=t.Cartesian3.negate(c,B),h=Q,m=h[0];t.Cartesian3.add(i,d,m),t.Cartesian3.add(m,c,m),m=h[1],t.Cartesian3.add(i,d,m),t.Cartesian3.add(m,p,m),m=h[2],t.Cartesian3.add(i,f,m),t.Cartesian3.add(m,p,m),m=h[3],t.Cartesian3.add(i,f,m),t.Cartesian3.add(m,c,m),t.Cartesian3.negate(i,i),m=h[4],t.Cartesian3.add(i,d,m),t.Cartesian3.add(m,c,m),m=h[5],t.Cartesian3.add(i,d,m),t.Cartesian3.add(m,p,m),m=h[6],t.Cartesian3.add(i,f,m),t.Cartesian3.add(m,p,m),m=h[7],t.Cartesian3.add(i,f,m),t.Cartesian3.add(m,c,m);for(varg=h.length,v=0;v<g;++v){vary=h[v];t.Cartesian3.add(s,y,y);varw=o.cartesianToCartographic(y,L);r.project(w,y)}varC=(s=(a=l.fromPoints(h,a)).center).x,_=s.y,b=s.z;returns.x=b,s.y=C,s.z=_,a},l.isOccluded=function(e,t){return!t.isBoundingSphereVisible(e)},l.equals=function(e,r){returne===r||n.defined(e)&&n.defined(r)&&t.Cartesian3.equals(e.center,r.center)&&e.radius===r.radius},l.prototype.intersectPlane=function(e){returnl.intersectPlane(this,e)},l.prototype.distanceSquaredTo=function(e){returnl.distanceSquaredTo(this,e)},l.prototype.computePlaneDistances=function(e,t,r){returnl.computePlaneDistances(this,e,t,r)},l.prototype.isOccluded=function(e){returnl.isOccluded(this,e)},l.prototype.equals=function(e){returnl.equals(this,e)},l.prototype.clone=function(e){returnl.clone(this,e)},l.prototype.volume=function(){vare=this.radius;returnb*e*e*e};varZ,G,J,$,X,K,ee,te,re,ne,ae,ie,oe,se,ue,le,ce,de={requestFullscreen:void0,exitFullscreen:void0,fullscreenEnabled:void0,fullscreenElement:void0,fullscreenchange:void0,fullscreenerror:void0},fe={};functionpe(e){for(vart=e.split("."),r=0,n=t.length;r<n;++r)t[r]=parseInt(t[r],10);returnt}functionhe(){if(!n.defined(G)&&(G=!1,!ye())){vare=/ Chrome\/([\.0-9]+)/.exec(Z.userAgent);null!==e&&(G=!0,J=pe(e[1]))}returnG}functionme(){if(!n.defined($)&&($=!1,!he()&&!ye()&&/ Safari\/[\.0-9]+/.test(Z.userAgent))){vare=/ Version\/([\.0-9]+)/.exec(Z.userAgent);null!==e&&($=!0,X=pe(e[1]))}return$}functionge(){if(!n.defined(K)){K=!1;vare=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(Z.userAgent);null!==e&&(K=!0,(ee=pe(e[1])).isNightly=!!e[2])}returnK}functionve(){vare;n.defined(te)||(te=!1,"Microsoft Internet Explorer"===Z.appName?null!==(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(Z.userAgent))&&(te=!0,re=pe(e[1])):"Netscape"===Z.appName&&null!==(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(Z.userAgent))&&(te=!0,re=pe(e[1])));returnte}functionye(){if(!n.defined(ne)){ne=!1;vare=/ Edge\/([\.0-9]+)/.exec(Z.userAgent);null!==e&&(ne=!0,ae=pe(e[1]))}returnne}functionwe(){if(!n.defined(ie)){ie=!1;vare=/Firefox\/([\.0-9]+)/.exec(Z.userAgent);null!==e&&(ie=!0,oe=pe(e[1]))}returnie}functionCe(){if(!n.defined(ce)){vare=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");vart=e.style.imageRendering;(ce=n.defined(t)&&""!==t)&&(le=t)}returnce}function_e(){return_e._result}Object.defineProperties(fe,{element:{get:function(){if(fe.supportsFullscreen())returndocument[de.fullscreenElement]}},changeEventName:{get:function(){if(fe.supportsFullscreen())returnde.fullscreenchange}},errorEventName:{get:function(){if(fe.supportsFullscreen())returnde.fullscreenerror}},enabled:{get:function(){if(fe.supportsFullscreen())returndocument[de.fullscreenEnabled]}},fullscreen:{get:function(){if(fe.supportsFullscreen())returnnull!==fe.element}}}),fe.supportsFullscreen=function(){if(n.defined(H))returnH;H=!1;vare=document.body;if("function"==typeofe.requestFullscreen)returnde.requestFullscreen="requestFullscreen",de.exitFullscreen="exitFullscreen",de.fullscreenEnabled="fullscreenEnabled",de.fullscreenElement="fullscreenElement",de.fullscreenchange="fullscreenchange",de.fullscreenerror="fullscreenerror",H=!0;for(vart,r=["webkit","moz","o","ms","khtml"],a=0,i=r.length;a<i;++a){varo=r[a];("function"==typeofe[t=o+"RequestFullscreen"]||"function"==typeofe[t=o+"RequestFullScreen"])&&(de.requestFullscreen=t,H=!0),t=o+"ExitFullscreen","function"==typeofdocument[t]?de.exitFullscreen=t:(t=o+"CancelFullScreen","function"==typeofdocument[t]&&(de.exitFullscreen=t)),t=o+"FullscreenEnabled",void0!==document[t]?de.fullscreenEnabled=t:(t=o+"FullScreenEnabled",void0!==document[t]&&(de.fullscreenEnabled=t)),t=o+"FullscreenElement",void0!==document[t]?de.fullscreenElement=t:(t=o+"FullScreenElement",void0!==document[t]&&(de.fullscreenElement=t)),t=o+"fullscreenchange",void0!==document["on"+t]&&("ms"===o&&(t="MSFullscreenChange"),de.fullscreenchange=t),t=o+"fullscreenerror",void0!==document["on"+t]&&("ms"===o&&(t="MSFullscreenError"),de.fullscreenerror=t)}returnH},fe.requestFullscreen=function(e,t){fe.supportsFullscreen()&&e[de.requestFullscreen]({vrDisplay:t})},fe.exitFullscreen=function(){fe.supportsFullscreen()&&document[de.exitFullscreen]()},fe._names=de,Z="undefined"!=typeofnavigator?navigator:{},_e._promise=void0,_e._result=void0,_e.initialize=function(){if(n.defined(_e._promise))return_e._promise;vare=n.when.defer();if(_e._promise=e.promise,ye())return_e._result=!1,e.resolve(_e._result),e.promise;vart=newImage;returnt.onload=function(){_e._result=t.width>0&&t.height>0,e.resolve(_e._result)},t.onerror=function(){_e._result=!1,e.resolve(_e._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.promise},Object.defineProperties(_e,{initialized:{get:function(){returnn.defined(_e._result)}}});varbe=[];"undefined"!=typeofArrayBuffer&&(be.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),"undefined"!=typeofUint8ClampedArray&&be.push(Uint8ClampedArray),"undefined"!=typeofUint8ClampedArray&&be.push(Uint8ClampedArray),"undefined"!=typeofBigInt64Array&&be.push(BigInt64Array),"undefined"!=typeofBigUint64Array&&be.push(BigUint64Array));varxe={isChrome:he,chromeVersion:function(){returnhe()&&J},isSafari:me,safariVersion:function(){returnme()&&X},isWebkit:ge,webkitVersion:function(){returnge()&&ee},isInternetExplorer:ve,internetExplorerVersion:function(){returnve()&&re},isEdge:ye,edgeVersion:function(){returnye()&&ae},isFirefox:we,firefoxVersion:function(){returnwe()&&oe},isWindows:function(){returnn.defined(se)||(se=/Windows/i.test(Z.appVersion)),se},hardwareConcurrency:n.defaultValue(Z.hardwareConcurrency,3),supportsPointerEvents:function(){returnn.defined(ue)||(ue=!we()&&"undefined"!=typeofPointerEvent&&(!n.defined(Z.pointerEnabled)||Z.pointerEnabled)),ue},supportsImageRenderingPixelated:Ce,supportsWebP:_e,imageRenderingValue:function(){returnCe()?le:void0},typedArrayTypes:be};functionSe(e,t,r,a){this.x=n.defaultValue(e,0),this.y=n.defaultValue(t,0),this.z=n.defaultValue(r,0),this.w=n.defaultValue(a,0)}xe.supportsBasis=function(e){returnxe.supportsWebAssembly()&&e.context.supportsBasis},xe.supportsFullscreen=function(){returnfe.supportsFullscreen()},xe.supportsTypedArrays=function(){return"undefined"!=typeofArrayBuffer},xe.supportsBigInt64Array=function(){return"undefined"!=typeofBigInt64Array},xe.supportsBigUint64Array=function(){return"undefined"!=typeofBigUint64Array},xe.supportsBigInt=function(){return"undefined"!=typeofBigInt},xe.supportsWebWorkers=function(){return"undefined"!=typeofWorker},xe.supportsWebAssembly=function(){return"undefined"!=typeofWebAssembly&&!xe.isEdge()};varEe=newt.Cartesian3;Se.fromAxisAngle=function(e,r,a){vari=r/2,o=Math.sin(i),s=(Ee=t.Cartesian3.normalize(e,Ee)).x*o,u=Ee.y*o,l=Ee.z*o,c=Math.cos(i);returnn.defined(a)?(a.x=s,a.y=u,a.z=l,a.w=c,a):newSe(s,u,l,c)};varAe=[1,2,0],Oe=newArray(3);Se.fromRotationMatrix=function(e,r){vara,i,o,s,u,l=e[t.Matrix3.COLUMN0ROW0],c=e[t.Matrix3.COLUMN1ROW1],d=e[t.Matrix3.COLUMN2ROW2],f=l+c+d;if(f>0)u=.5*(a=Math.sqrt(f+1)),a=.5/a,i=(e[t.Matrix3.COLUMN1ROW2]-e[t.Matrix3.COLUMN2ROW1])*a,o=(e[t.Matrix3.COLUMN2ROW0]-e[t.Matrix3.COLUMN0ROW2])*a,s=(e[t.Matrix3.COLUMN0ROW1]-e[t.Matrix3.COLUMN1ROW0])*a;else{varp=0;c>l&&(p=1),d>l&&d>c&&(p=2);varh=Ae[p],m=Ae[h];a=Math.sqrt(e[t.Matrix3.getElementIndex(p,p)]-e[t.Matrix3.getElementIndex(h,h)]-e[t.Matrix3.getElementIndex(m,m)]+1);varg=Oe;g[p]=.5*a,a=.5/a,u=(e[t.Matrix3.getElementIndex(m,h)]-e[t.Matrix3.getElementIndex(h,m)])*a,g[h]=(e[t.Matrix3.getElementIndex(h,p)]+e[t.Matrix3.getElementIndex(p,h)])*a,g[m]=(e[t.Matrix3.getElementIndex(m,p)]+e[t.Matrix3.getElementIndex(p,m)])*a,i=-g[0],o=-g[1],s=-g[2]}returnn.defined(r)?(r.x=i,r.y=o,r.z=s,r.w=u,r):newSe(i,o,s,u)};varIe=newSe,Re=newSe,Pe=newSe,Te=newSe;Se.fromHeadingPitchRoll=function(e,r){returnTe=Se.fromAxisAngle(t.Cartesian3.UNIT_X,e.roll,Ie),Pe=Se.fromAxisAngle(t.Cartesian3.UNIT_Y,-e.pitch,r),r=Se.multiply(Pe,Te,Pe),Re=Se.fromAxisAngle(t.Cartesian3.UNIT_Z,-e.heading,Ie),Se.multiply(Re,r,r)};varqe=newt.Cartesian3,ze=newt.Cartesian3,Me=newSe,De=newSe,Ue=newSe;Se.packedLength=4,Se.pack=function(e,t,r){returnr=n.defaultValue(r,0),t[r++]=e.x,t[r++]=e.y,t[r++]=e.z,t[r]=e.w,t},Se.unpack=function(e,t,r){returnt=n.defaultValue(t,0),n.defined(r)||(r=newSe),r.x=e[t],r.y=e[t+1],r.z=e[t+2],r.w=e[t+3],r},Se.packedInterpolationLength=3,Se.convertPackedArrayForInterpolation=function(e,t,r,a){Se.unpack(e,4*r,Ue),Se.conjugate(Ue,Ue);for(vari=0,o=r-t+1;i<o;i++){vars=3*i;Se.unpack(e,4*(t+i),Me),Se.multiply(Me,Ue,Me),Me.w<0&&Se.negate(Me,Me),Se.computeAxis(Me,qe);varu=Se.computeAngle(Me);n.defined(a)||(a=[]),a[s]=qe.x*u,a[s+1]=qe.y*u,a[s+2]=qe.z*u}},Se.unpackInterpolationResult=function(e,r,a,i,o){n.defined(o)||(o=newSe),t.Cartesian3.fromArray(e,0,ze);vars=t.Cartesian3.magnitude(ze);returnSe.unpack(r,4*i,De),0===s?Se.clone(Se.IDENTITY,Me):Se.fromAxisAngle(ze,s,Me),Se.multiply(Me,De,o)},Se.clone=function(e,t){if(n.defined(e))returnn.defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):newSe(e.x,e.y,e.z,e.w)},Se.conjugate=function(e,t){returnt.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t},Se.magnitudeSquared=function(e){returne.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},Se.magnitude=function(e){returnMath.sqrt(Se.magnitudeSquared(e))},Se.normalize=function(e,t){varr=1/Se.magnitude(e),n=e.x*r,a=e.y*r,i=e.z*r,o=e.w*r;returnt.x=n,t.y=a,t.z=i,t.w=o,t},Se.inverse=function(e,t){varr=Se.magnitudeSquared(e);returnt=Se.conjugate(e,t),Se.multiplyByScalar(t,1/r,t)},Se.add=function(e,t,r){returnr.x=e.x+t.x,r.y=e.y+t.y,r.z=e.z+t.z,r.w=e.w+t.w,r},Se.subtract=function(e,t,r){returnr.x=e.x-t.x,r.y=e.y-t.y,r.z=e.z-t.z,r.w=e.w-t.w,r},Se.negate=function(e,t){returnt.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},Se.dot=function(e,t){returne.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},Se.multiply=function(e,t,r){varn=e.x,a=e.y,i=e.z,o=e.w,s=t.x,u=t.y,l=t.z,c=t.w,d=o*s+n*c+a*l-i*u,f=o*u-n*l+a*c+i*s,p=o*l+n*u-a*s+i*c,h=o*c-n*s-a*u-i*l;returnr.x=d,r.y=f,r.z=p,r.w=h,r},Se.multiplyByScalar=function(e,t,r){returnr.x=e.x*t,r.y=e.y*t,r.z=e.z*t,r.w=e.w*t,r},Se.divideByScalar=function(e,t,r){returnr.x=e.x/t,r.y=e.y/t,r.z=e.z/t,r.w=e.w/t,r},Se.computeAxis=function(e,t){varr=e.w;if(Math.abs(r-1)<a.CesiumMath.EPSILON6)returnt.x=t.y=t.z=0,t;varn=1/Math.sqrt(1-r*r);returnt.x=e.x*n,t.y=e.y*n,t.z=e.z*n,t},Se.computeAngle=function(e){returnMath.abs(e.w-1)<a.CesiumMath.EPSILON6?0:2*Math.acos(e.w)};varke=newSe;Se.lerp=function(e,t,r,n){returnke=Se.multiplyByScalar(t,r,ke),n=Se.multiplyByScalar(e,1-r,n),Se.add(ke,n,n)};varFe=newSe,Ne=newSe,je=newSe;Se.slerp=function(e,t,r,n){vari=Se.dot(e,t),o=t;if(i<0&&(i=-i,o=Fe=Se.negate(t,Fe)),1-i<a.CesiumMath.EPSILON6)returnSe.lerp(e,o,r,n);vars=Math.acos(i);returnNe=Se.multiplyByScalar(e,Math.sin((1-r)*s),Ne),je=Se.multiplyByScalar(o,Math.sin(r*s),je),n=Se.add(Ne,je,n),Se.multiplyByScalar(n,1/Math.sin(s),n)},Se.log=function(e,r){varn=a.CesiumMath.acosClamped(e.w),i=0;return0!==n&&(i=n/Math.sin(n)),t.Cartesian3.multiplyByScalar(e,i,r)},Se.exp=function(e,r){varn=t.Cartesian3.magnitude(e),a=0;return0!==n&&(a=Math.sin(n)/n),r.x=e.x*a,r.y=e.y*a,r.z=e.z*a,r.w=Math.cos(n),r};varBe=newt.Cartesian3,Ve=newt.Cartesian3,Le=newSe,Qe=newSe;Se.computeInnerQuadrangle=function(e,r,n,a){vari=Se.conjugate(r,Le);Se.multiply(i,n,Qe);varo=Se.log(Qe,Be);Se.multiply(i,e,Qe);vars=Se.log(Qe,Ve);returnt.Cartesian3.add(o,s,o),t.Cartesian3.multiplyByScalar(o,.25,o),t.Cartesian3.negate(o,o),Se.exp(o,Le),Se.multiply(r,Le,a)},Se.squad=function(e,t,r,n,a,i){varo=Se.slerp(e,t,a,Le),s=Se.slerp(r,n,a,Qe);returnSe.slerp(o,s,2*a*(1-a),i)};for(varWe=newSe,He=1.9011074535173003,Ye=xe.supportsTypedArrays()?newFloat32Array(8):[],Ze=xe.supportsTypedArrays()?newFloat32Array(8):[],Ge=xe.supportsTypedArrays()?newFloat32Array(8):[],Je=xe.supportsTypedArrays()?newFloat32Array(8):[],$e=0;$e<7;++$e){varXe=$e+1,Ke=2*Xe+1;Ye[$e]=1/(Xe*Ke),Ze[$e]=Xe/Ke}functionet(e,t,r){for(varn,a,i=0,o=e.length-1;i<=o;)if((a=r(e[n=~~((i+o)/2)],t))<0)i=n+1;else{if(!(a>0))returnn;o=n-1}return~(o+1)}functiontt(e,t,r,n,a){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=r,this.yPoleOffset=n,this.ut1MinusUtc=a}functionrt(e,t,r,n,a,i,o,s){this.year=e,this.month=t,this.day=r,this.hour=n,this.minute=a,this.second=i,this.millisecond=o,this.isLeapSecond=s}functionnt(e){returne%4==0&&e%100!=0||e%400==0}functionat(e,t){this.julianDate=e,this.offset=t}Ye[7]=He/136,Ze[7]=8*He/17,Se.fastSlerp=function(e,t,r,n){vara,i=Se.dot(e,t);i>=0?a=1:(a=-1,i=-i);for(varo=i-1,s=1-r,u=r*r,l=s*s,c=7;c>=0;--c)Ge[c]=(Ye[c]*u-Ze[c])*o,Je[c]=(Ye[c]*l-Ze[c])*o;vard=a*r*(1+Ge[0]*(1+Ge[1]*(1+Ge[2]*(1+Ge[3]*(1+Ge[4]*(1+Ge[5]*(1+Ge[6]*(1+Ge[7])))))))),f=s*(1+Je[0]*(1+Je[1]*(1+Je[2]*(1+Je[3]*(1+Je[4]*(1+Je[5]*(1+Je[6]*(1+Je[7])))))))),p=Se.multiplyByScalar(e,f,We);returnSe.multiplyByScalar(t,d,n),Se.add(p,n,n)},Se.fastSquad=function(e,t,r,n,a,i){varo=Se.fastSlerp(e,t,a,Le),s=Se.fastSlerp(r,n,a,Qe);returnSe.fastSlerp(o,s,2*a*(1-a),i)},Se.equals=function(e,t){returne===t||n.defined(e)&&n.defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},Se.equalsEpsilon=function(e,t,r){returnr=n.defaultValue(r,0),e===t||n.defined(e)&&n.defined(t)&&Math.abs(e.x-t.x)<=r&&Math.abs(e.y-t.y)<=r&&Math.abs(e.z-t.z)<=r&&Math.abs(e.w-t.w)<=r},Se.ZERO=Object.freeze(newSe(0,0,0,0)),Se.IDENTITY=Object.freeze(newSe(0,0,0,1)),Se.prototype.clone=function(e){returnSe.clone(this,e)},Se.prototype.equals=function(e){returnSe.equals(this,e)},Se.prototype.equalsEpsilon=function(e,t){returnSe.equalsEpsilon(this,e,t)},Se.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};varit=Object.freeze({SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:2400000.5}),ot=Object.freeze({UTC:0,TAI:1}),st=newrt,ut=[31,28,31,30,31,30,31,31,30,31,30,31];functionlt(e,t){returnSt.compare(e.julianDate,t.julianDate)}varct=newat;functiondt(e){ct.julianDate=e;vart=St.leapSeconds,r=et(t,ct,lt);r<0&&(r=~r),r>=t.length&&(r=t.length-1);varn=t[r].offset;r>0&&(St.secondsDifference(t[r].julianDate,e)>n&&(n=t[--r].offset));St.addSeconds(e,n,e)}functionft(e,t){ct.julianDate=e;varr=St.leapSeconds,n=et(r,ct,lt);if(n<0&&(n=~n),0===n)returnSt.addSeconds(e,-r[0].offset,t);if(n>=r.length)returnSt.addSeconds(e,-r[n-1].offset,t);vara=St.secondsDifference(r[n].julianDate,e);return0===a?St.addSeconds(e,-r[n].offset,t):a<=1?void0:St.addSeconds(e,-r[--n].offset,t)}functionpt(e,t,r){varn=t/it.SECONDS_PER_DAY|0;returne+=n,(t-=it.SECONDS_PER_DAY*n)<0&&(e--,t+=it.SECONDS_PER_DAY),r.dayNumber=e,r.secondsOfDay=t,r}functionht(e,t,r,n,a,i,o){vars=(t-14)/12|0,u=e+4800+s,l=(1461*u/4|0)+(367*(t-2-12*s)/12|0)-(3*((u+100)/100|0)/4|0)+r-32075;(n-=12)<0&&(n+=24);varc=i+(n*it.SECONDS_PER_HOUR+a*it.SECONDS_PER_MINUTE+o*it.SECONDS_PER_MILLISECOND);returnc>=43200&&(l-=1),[l,c]}varmt=/^(\d{4})$/,gt=/^(\d{4})-(\d{2})$/,vt=/^(\d{4})-?(\d{3})$/,yt=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,wt=/^(\d{4})-?(\d{2})-?(\d{2})$/,Ct=/([Z+\-])?(\d{2})?:?(\d{2})?$/,_t=/^(\d{2})(\.\d+)?/.source+Ct.source,bt=/^(\d{2}):?(\d{2})(\.\d+)?/.source+Ct.source,xt=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+Ct.source;functionSt(e,t,r){this.dayNumber=void0,this.secondsOfDay=void0,e=n.defaultValue(e,0),t=n.defaultValue(t,0),r=n.defaultValue(r,ot.UTC);vara=0|e;pt(a,t+=(e-a)*it.SECONDS_PER_DAY,this),r===ot.UTC&&dt(this)}St.fromGregorianDate=function(e,t){varr=ht(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);returnn.defined(t)?(pt(r[0],r[1],t),dt(t),t):newSt(r[0],r[1],ot.UTC)},St.fromDate=function(e,t){varr=ht(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());returnn.defined(t)?(pt(r[0],r[1],t),dt(t),t):newSt(r[0],r[1],ot.UTC)},St.fromIso8601=function(e,t){varr,a,i,o,s=(e=e.replace(",",".")).split("T"),u=1,l=1,c=0,d=0,f=0,p=0,h=s[0],m=s[1];if(null!==(s=h.match(wt)))r=+s[1],u=+s[2],l=+s[3];elseif(null!==(s=h.match(gt)))r=+s[1],u=+s[2];elseif(null!==(s=h.match(mt)))r=+s[1];else{varg;if(null!==(s=h.match(vt)))r=+s[1],g=+s[2],i=nt(r);elseif(null!==(s=h.match(yt)))r=+s[1],g=7*+s[2]+(+s[3]||0)-newDate(Date.UTC(r,0,4)).getUTCDay()-3;(a=newDate(Date.UTC(r,0,1))).setUTCDate(g),u=a.getUTCMonth()+1,l=a.getUTCDate()}if(i=nt(r),n.defined(m)){null!==(s=m.match(xt))?(c=+s[1],d=+s[2],f=+s[3],p=1e3*+(s[4]||0),o=5):null!==(s=m.match(bt))?(c=+s[1],d=+s[2],f=60*+(s[3]||0),o=4):null!==(s=m.match(_t))&&(c=+s[1],d=60*+(s[2]||0),o=3);varv=s[o],y=+s[o+1],w=+(s[o+2]||0);switch(v){case"+":c-=y,d-=w;break;case"-":c+=y,d+=w;break;case"Z":break;default:d+=newDate(Date.UTC(r,u-1,l,c,d)).getTimezoneOffset()}}varC=60===f;for(C&&f--;d>=60;)d-=60,c++;for(;c>=24;)c-=24,l++;for(a=i&&2===u?29:ut[u-1];l>a;)l-=a,++u>12&&(u-=12,r++),a=i&&2===u?29:ut[u-1];for(;d<0;)d+=60,c--;for(;c<0;)c+=24,l--;for(;l<1;)--u<1&&(u+=12,r--),l+=a=i&&2===u?29:ut[u-1];var_=ht(r,u,l,c,d,f,p);returnn.defined(t)?(pt(_[0],_[1],t),dt(t)):t=newSt(_[0],_[1],ot.UTC),C&&St.addSeconds(t,1,t),t},St.now=function(e){returnSt.fromDate(newDate,e)};varEt=newSt(0,0,ot.TAI);St.toGregorianDate=function(e,t){varr=!1,a=ft(e,Et);n.defined(a)||(St.addSeconds(e,-1,Et),a=ft(Et,Et),r=!0);vari=a.dayNumber,o=a.secondsOfDay;o>=43200&&(i+=1);vars=i+68569|0,u=4*s/146097|0,l=4e3*((s=s-((146097*u+3)/4|0)|0)+1)/1461001|0,c=80*(s=s-(1461*l/4|0)+31|0)/2447|0,d=s-(2447*c/80|0)|0,f=c+2-12*(s=c/11|0)|0,p=100*(u-49)+l+s|0,h=o/it.SECONDS_PER_HOUR|0,m=o-h*it.SECONDS_PER_HOUR,g=m/it.SECONDS_PER_MINUTE|0,v=0|(m-=g*it.SECONDS_PER_MINUTE),y=(m-v)/it.SECONDS_PER_MILLISECOND;return(h+=12)>23&&(h-=24),r&&(v+=1),n.defined(t)?(t.year=p,t.month=f,t.day=d,t.hour=h,t.minute=g,t.second=v,t.millisecond=y,t.isLeapSecond=r,t):newrt(p,f,d,h,g,v,y,r)},St.toDate=function(e){vart=St.toGregorianDate(e,st),r=t.second;returnt.isLeapSecond&&(r-=1),newDate(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,r,t.millisecond))},St.toIso8601=function(e,t){varr,a=St.toGregorianDate(e,st),i=a.year,o=a.month,s=a.day,u=a.hour,l=a.minute,c=a.second,d=a.millisecond;return1e4===i&&1===o&&1===s&&0===u&&0===l&&0===c&&0===d&&(i=9999,o=12,s=31,u=24),n.defined(t)||0===d?n.defined(t)&&0!==t?(r=(.01*d).toFixed(t).replace(".","").slice(0,t),i.toString().padStart(4,"0")+"-"+o.toString().padStart(2,"0")+"-"+s.toString().padStart(2,"0")+"T"+u.toString().padStart(2,"0")+":"+l.toString().padStart(2,"0")+":"+c.toString().padStart(2,"0")+"."+r+"Z"):i.toString().padStart(4,"0")+"-"+o.toString().padStart(2,"0")+"-"+s.toString().padStart(2,"0")+"T"+u.toString().padStart(2,"0")+":"+l.toString().padStart(2,"0")+":"+c.toString().padStart(2,"0")+"Z":(r=(.01*d).toString().replace(".",""),i.toString().padStart(4,"0")+"-"+o.toString().padStart(2,"0")+"-"+s.toString().padStart(2,"0")+"T"+u.toString().padStart(2,"0")+":"+l.toString().padStart(2,"0")+":"+c.toString().padStart(2,"0")+"."+r+"Z")},St.clone=function(e,t){if(n.defined(e))returnn.defined(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):newSt(e.dayNumber,e.secondsOfDay,ot.TAI)},St.compare=function(e,t){varr=e.dayNumber-t.dayNumber;return0!==r?r:e.secondsOfDay-t.secondsOfDay},St.equals=function(e,t){returne===t||n.defined(e)&&n.defined(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},St.equalsEpsilon=function(e,t,r){returnr=n.defaultValue(r,0),e===t||n.defined(e)&&n.defined(t)&&Math.abs(St.secondsDifference(e,t))<=r},St.totalDays=function(e){returne.dayNumber+e.secondsOfDay/it.SECONDS_PER_DAY},St.secondsDifference=function(e,t){return(e.dayNumber-t.dayNumber)*it.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},St.daysDifference=function(e,t){returne.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/it.SECONDS_PER_DAY},St.computeTaiMinusUtc=function(e){ct.julianDate=e;vart=St.leapSeconds,r=et(t,ct,lt);returnr<0&&(r=~r,--r<0&&(r=0)),t[r].offset},St.addSeconds=function(e,t,r){returnpt(e.dayNumber,e.secondsOfDay+t,r)},St.addMinutes=function(e,t,r){varn=e.secondsOfDay+t*it.SECONDS_PER_MINUTE;returnpt(e.dayNumber,n,r)},St.addHours=function(e,t,r){varn=e.secondsOfDay+t*it.SECONDS_PER_HOUR;returnpt(e.dayNumber,n,r)},St.addDays=function(e,t,r){returnpt(e.dayNumber+t,e.secondsOfDay,r)},St.lessThan=function(e,t){returnSt.compare(e,t)<0},St.lessThanOrEquals=function(e,t){returnSt.compare(e,t)<=0},St.greaterThan=function(e,t){returnSt.compare(e,t)>0},St.greaterThanOrEquals=function(e,t){returnSt.compare(e,t)>=0},St.prototype.clone=function(e){returnSt.clone(this,e)},St.prototype.equals=function(e){returnSt.equals(this,e)},St.prototype.equalsEpsilon=function(e,t){returnSt.equalsEpsilon(this,e,t)},St.prototype.toString=function(){returnSt.toIso8601(this)},St.leapSeconds=[newat(newSt(2441317,43210,ot.TAI),10),newat(newSt(2441499,43211,ot.TAI),11),newat(newSt(2441683,43212,ot.TAI),12),newat(newSt(2442048,43213,ot.TAI),13),newat(newSt(2442413,43214,ot.TAI),14),newat(newSt(2442778,43215,ot.TAI),15),newat(newSt(2443144,43216,ot.TAI),16),newat(newSt(2443509,43217,ot.TAI),17),newat(newSt(2443874,43218,ot.TAI),18),newat(newSt(2444239,43219,ot.TAI),19),newat(newSt(2444786,43220,ot.TAI),20),newat(newSt(2445151,43221,ot.TAI),21),newat(newSt(2445516,43222,ot.TAI),22),newat(newSt(2446247,43223,ot.TAI),23),newat(newSt(2447161,43224,ot.TAI),24),newat(newSt(2447892,43225,ot.TAI),25),newat(newSt(2448257,43226,ot.TAI),26),newat(newSt(2448804,43227,ot.TAI),27),newat(newSt(2449169,43228,ot.TAI),28),newat(newSt(2449534,43229,ot.TAI),29),newat(newSt(2450083,43230,ot.TAI),30),newat(newSt(2450630,43231,ot.TAI),31),newat(newSt(2451179,43232,ot.TAI),32),newat(newSt(2453736,43233,ot.TAI),33),newat(newSt(2454832,43234,ot.TAI),34),newat(newSt(2456109,43235,ot.TAI),35),newat(newSt(2457204,43236,ot.TAI),36),newat(newSt(2457754,43237,ot.TAI),37)];varAt=n.createCommonjsModule((function(e,t){!function(r){vara=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,o="object"==typeofn.commonjsGlobal&&n.commonjsGlobal;o.global!==o&&o.window!==o&&o.self!==o||(r=o);vars,u,l=2147483647,c=36,d=/^xn--/,f=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,g=String.fromCharCode;functionv(e){thrownewRangeError(h[e])}functiony(e,t){for(varr=e.length,n=[];r--;)n[r]=t(e[r]);returnn}functionw(e,t){varr=e.split("@"),n="";returnr.length>1&&(n=r[0]+"@",e=r[1]),n+y((e=e.replace(p,".")).split("."),t).join(".")}functionC(e){for(vart,r,n=[],a=0,i=e.length;a<i;)(t=e.charCodeAt(a++))>=55296&&t<=56319&&a<i?56320==(64512&(r=e.charCodeAt(a++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),a--):n.push(t);returnn}function_(e){returny(e,(function(e){vart="";returne>65535&&(t+=g((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=g(e)})).join("")}functionb(e,t){returne+22+75*(e<26)-((0!=t)<<5)}functionx(e,t,r){varn=0;for(e=r?m(e/700):e>>1,e+=m(e/t);e>455;n+=c)e=m(e/35);returnm(n+36*e/(e+38))}functionS(e){vart,r,n,a,i,o,s,u,d,f,p,h=[],g=e.length,y=0,w=128,C=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&v("not-basic"),h.push(e.charCodeAt(n));for(a=r>0?r+1:0;a<g;){for(i=y,o=1,s=c;a>=g&&v("invalid-input"),((u=(p=e.charCodeAt(a++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:c)>=c||u>m((l-y)/o))&&v("overflow"),y+=u*o,!(u<(d=s<=C?1:s>=C+26?26:s-C));s+=c)o>m(l/(f=c-d))&&v("overflow"),o*=f;C=x(y-i,t=h.length+1,0==i),m(y/t)>l-w&&v("overflow"),w+=m(y/t),y%=t,h.splice(y++,0,w)}return_(h)}functionE(e){vart,r,n,a,i,o,s,u,d,f,p,h,y,w,_,S=[];for(h=(e=C(e)).length,t=128,r=0,i=72,o=0;o<h;++o)(p=e[o])<128&&S.push(g(p));for(n=a=S.length,a&&S.push("-");n<h;){for(s=l,o=0;o<h;++o)(p=e[o])>=t&&p<s&&(s=p);for(s-t>m((l-r)/(y=n+1))&&v("overflow"),r+=(s-t)*y,t=s,o=0;o<h;++o)if((p=e[o])<t&&++r>l&&v("overflow"),p==t){for(u=r,d=c;!(u<(f=d<=i?1:d>=i+26?26:d-i));d+=c)_=u-f,w=c-f,S.push(g(b(f+_%w,0))),u=m(_/w);S.push(g(b(u,0))),i=x(r,y,n==a),r=0,++n}++r,++t}returnS.join("")}if(s={version:"1.3.2",ucs2:{decode:C,encode:_},decode:S,encode:E,toASCII:function(e){returnw(e,(function(e){returnf.test(e)?"xn--"+E(e):e}))},toUnicode:function(e){returnw(e,(function(e){returnd.test(e)?S(e.slice(4).toLowerCase()):e}))}},a&&i)if(e.exports==a)i.exports=s;elsefor(uins)s.hasOwnProperty(u)&&(a[u]=s[u]);elser.punycode=s}(n.commonjsGlobal)})),Ot=n.createCommonjsModule((function(e){/*! * URI.js - Mutating URLs * IPv6 Support * * Version: 1.19.7 * * Author: Rodney Rehm * Web: http://medialize.github.io/URI.js/ * * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * */vart,r;t=n.commonjsGlobal,r=function(e){vart=e&&e.IPv6;return{best:function(e){vart,r,n=e.toLowerCase().split(":"),a=n.length,i=8;for(""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[a-1]&&""===n[a-2]&&n.pop(),-1!==n[(a=n.length)-1].indexOf(".")&&(i=7),t=0;t<a&&""!==n[t];t++);if(t<i)for(n.splice(t,1,"0000");n.length<i;)n.splice(t,0,"0000");for(varo=0;o<i;o++){r=n[o].split("");for(vars=0;s<3&&"0"===r[0]&&r.length>1;s++)r.splice(0,1);n[o]=r.join("")}varu=-1,l=0,c=0,d=-1,f=!1;for(o=0;o<i;o++)f?"0"===n[o]?c+=1:(f=!1,c>l&&(u=d,l=c)):"0"===n[o]&&(f=!0,d=o,c=1);c>l&&(u=d,l=c),l>1&&n.splice(u,l,""),a=n.length;varp="";for(""===n[0]&&(p=":"),o=0;o<a&&(p+=n[o],o!==a-1);o++)p+=":";return""===n[a-1]&&(p+=":"),p},noConflict:function(){returne.IPv6===this&&(e.IPv6=t),this}}},e.exports?e.exports=r():t.IPv6=r(t)})),It=n.createCommonjsModule((function(e){/*! * URI.js - Mutating URLs * Second Level Domain (SLD) Support * * Version: 1.19.7 * * Author: Rodney Rehm * Web: http://medialize.github.io/URI.js/ * * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * */vart,r;t=n.commonjsGlobal,r=function(e){vart=e&&e.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){vart=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;varn=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return!1;vara=r.list[e.slice(t+1)];return!!a&&a.indexOf(""+e.slice(n+1,t)+"")>=0},is:function(e){vart=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;varn=r.list[e.slice(t+1)];return!!n&&n.indexOf(""+e.slice(0,t)+"")>=0},get:function(e){vart=e.lastIndexOf(".");if(t<=0||t>=e.length-1)returnnull;varn=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)returnnull;vara=r.list[e.slice(t+1)];returna?a.indexOf(""+e.slice(n+1,t)+"")<0?null:e.slice(n+1):null},noConflict:function(){returne.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};returnr},e.exports?e.exports=r():t.SecondLevelDomains=r(t)})),Rt=n.createCommonjsModule((function(e){/*! * URI.js - Mutating URLs * * Version: 1.19.7 * * Author: Rodney Rehm * Web: http://medialize.github.io/URI.js/ * * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * */vart,r;t=n.commonjsGlobal,r=function(e,t,r,n){vara=n&&n.URI;functioni(e,t){varr=arguments.length>=1,n=arguments.length>=2;if(!(thisinstanceofi))returnr?n?newi(e,t):newi(e):newi;if(void0===e){if(r)thrownewTypeError("undefined is not a valid argument for URI");e="undefined"!=typeoflocation?location.href+"":""}if(null===e&&r)thrownewTypeError("null is not a valid argument for URI");returnthis.href(e),void0!==t?this.absoluteTo(t):this}i.version="1.19.7";varo=i.prototype,s=Object.prototype.hasOwnProperty;functionu(e){returne.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}functionl(e){returnvoid0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}functionc(e){return"Array"===l(e)}functiond(e,t){varr,n,a={};if("RegExp"===l(t))a=null;elseif(c(t))for(r=0,n=t.length;r<n;r++)a[t[r]]=!0;elsea[t]=!0;for(r=0,n=e.length;r<n;r++)(a&&void0!==a[e[r]]||!a&&t.test(e[r]))&&(e.splice(r,1),n--,r--);returne}functionf(e,t){varr,n;if(c(t)){for(r=0,n=t.length;r<n;r++)if(!f(e,t[r]))return!1;return!0}vara=l(t);for(r=0,n=e.length;r<n;r++)if("RegExp"===a){if("string"==typeofe[r]&&e[r].match(t))return!0}elseif(e[r]===t)return!0;return!1}functionp(e,t){if(!c(e)||!c(t))return!1;if(e.length!==t.length)return!1;e.sort(),t.sort();for(varr=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}functionh(e){returne.replace(/^\/+|\/+$/g,"")}functionm(e){returnescape(e)}functiong(e){returnencodeURIComponent(e).replace(/[!'()*]/g,m).replace(/\*/g,"%2A")}i._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:i.preventInvalidHostname,duplicateQueryParameters:i.duplicateQueryParameters,escapeQuerySpace:i.escapeQuerySpace}},i.preventInvalidHostname=!1,i.duplicateQueryParameters=!1,i.escapeQuerySpace=!0,i.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,i.idn_expression=/[^a-z0-9\._-]/i,i.punycode_expression=/(xn--)/i,i.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,i.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(e){if(e&&e.nodeName){vart=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)returni.domAttributes[t]}},i.encode=g,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=g,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(e,t){varr=i.encode(e+"");returnvoid0===t&&(t=i.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},i.decodeQuery=function(e,t){e+="",void0===t&&(t=i.escapeQuerySpace);try{returni.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){returne}};varv,y={encode:"encode",decode:"decode"},w=function(e,t){returnfunction(r){try{returni[t](r+"").replace(i.characters[e][t].expression,(function(r){returni.characters[e][t].map[r]}))}catch(e){returnr}}};for(viny)i[v+"PathSegment"]=w("pathname",y[v]),i[v+"UrnPathSegment"]=w("urnpath",y[v]);varC=function(e,t,r){returnfunction(n){vara;a=r?function(e){returni[t](i[r](e))}:i[t];for(varo=(n+"").split(e),s=0,u=o.length;s<u;s++)o[s]=a(o[s]);returno.join(e)}};function_(e){returnfunction(t,r){returnvoid0===t?this._parts[e]||"":(this._parts[e]=t||null,this.build(!r),this)}}functionb(e,t){returnfunction(r,n){returnvoid0===r?this._parts[e]||"":(null!==r&&(r+="").charAt(0)===t&&(r=r.substring(1)),this._parts[e]=r,this.build(!n),this)}}i.decodePath=C("/","decodePathSegment"),i.decodeUrnPath=C(":","decodeUrnPathSegment"),i.recodePath=C("/","encodePathSegment","decode"),i.recodeUrnPath=C(":","encodeUrnPathSegment","decode"),i.encodeReserved=w("reserved","encode"),i.parse=function(e,t){varr;returnt||(t={preventInvalidHostname:i.preventInvalidHostname}),(r=e.indexOf("#"))>-1&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),(r=e.indexOf("?"))>-1&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===(e=e.replace(/^(https?|ftp|wss?)?:[/\\]*/,"$1://")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=i.parseAuthority(e,t)):(r=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(i.protocol_expression)?t.protocol=void0:"//"===e.substring(r+1,r+3).replace(/\\/g,"/")?(e=e.substring(r+3),e=i.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},i.parseHost=function(e,t){e||(e="");varr,n,a=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===a&&(a=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,a)||null,"/"===t.port&&(t.port=null);else{varo=e.indexOf(":"),s=e.indexOf("/"),u=e.indexOf(":",o+1);-1!==u&&(-1===s||u<s)?(t.hostname=e.substring(0,a)||null,t.port=null):(n=e.substring(0,a).split(":"),t.hostname=n[0]||null,t.port=n[1]||null)}returnt.hostname&&"/"!==e.substring(a).charAt(0)&&(a++,e="/"+e),t.preventInvalidHostname&&i.ensureValidHostname(t.hostname,t.protocol),t.port&&i.ensureValidPort(t.port),e.substring(a)||"/"},i.parseAuthority=function(e,t){returne=i.parseUserinfo(e,t),i.parseHost(e,t)},i.parseUserinfo=function(e,t){varr=e;-1!==e.indexOf("\\")&&(e=e.replace(/\\/g,"/"));varn,a=e.indexOf("/"),o=e.lastIndexOf("@",a>-1?a:e.length-1);returno>-1&&(-1===a||o<a)?(n=e.substring(0,o).split(":"),t.username=n[0]?i.decode(n[0]):null,n.shift(),t.password=n[0]?i.decode(n.join(":")):null,e=r.substring(o+1)):(t.username=null,t.password=null),e},i.parseQuery=function(e,t){if(!e)return{};if(!(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(varr,n,a,o={},u=e.split("&"),l=u.length,c=0;c<l;c++)r=u[c].split("="),n=i.decodeQuery(r.shift(),t),a=r.length?i.decodeQuery(r.join("="),t):null,"__proto__"!==n&&(s.call(o,n)?("string"!=typeofo[n]&&null!==o[n]||(o[n]=[o[n]]),o[n].push(a)):o[n]=a);returno},i.build=function(e){vart="",r=!1;returne.protocol&&(t+=e.protocol+":"),e.urn||!t&&!e.hostname||(t+="//",r=!0),t+=i.buildAuthority(e)||"","string"==typeofe.path&&("/"!==e.path.charAt(0)&&r&&(t+="/"),t+=e.path),"string"==typeofe.query&&e.query&&(t+="?"+e.query),"string"==typeofe.fragment&&e.fragment&&(t+="#"+e.fragment),t},i.buildHost=function(e){vart="";returne.hostname?(i.ip6_expression.test(e.hostname)?t+="["+e.hostname+"]":t+=e.hostname,e.port&&(t+=":"+e.port),t):""},i.buildAuthority=function(e){returni.buildUserinfo(e)+i.buildHost(e)},i.buildUserinfo=function(e){vart="";returne.username&&(t+=i.encode(e.username)),e.password&&(t+=":"+i.encode(e.password)),t&&(t+="@"),t},i.buildQuery=function(e,t,r){varn,a,o,u,l="";for(aine)if("__proto__"!==a&&s.call(e,a))if(c(e[a]))for(n={},o=0,u=e[a].length;o<u;o++)void0!==e[a][o]&&void0===n[e[a][o]+""]&&(l+="&"+i.buildQueryParameter(a,e[a][o],r),!0!==t&&(n[e[a][o]+""]=!0));elsevoid0!==e[a]&&(l+="&"+i.buildQueryParameter(a,e[a],r));returnl.substring(1)},i.buildQueryParameter=function(e,t,r){returni.encodeQuery(e,r)+(null!==t?"="+i.encodeQuery(t,r):"")},i.addQuery=function(e,t,r){if("object"==typeoft)for(varnint)s.call(t,n)&&i.addQuery(e,n,t[n]);else{if("string"!=typeoft)thrownewTypeError("URI.addQuery() accepts an object, string as the name parameter");if(void0===e[t])returnvoid(e[t]=r);"string"==typeofe[t]&&(e[t]=[e[t]]),c(r)||(r=[r]),e[t]=(e[t]||[]).concat(r)}},i.setQuery=function(e,t,r){if("object"==typeoft)for(varnint)s.call(t,n)&&i.setQuery(e,n,t[n]);else{if("string"!=typeoft)thrownewTypeError("URI.setQuery() accepts an object, string as the name parameter");e[t]=void0===r?null:r}},i.removeQuery=function(e,t,r){varn,a,o;if(c(t))for(n=0,a=t.length;n<a;n++)e[t[n]]=void0;elseif("RegExp"===l(t))for(oine)t.test(o)&&(e[o]=void0);elseif("object"==typeoft)for(oint)s.call(t,o)&&i.removeQuery(e,o,t[o]);else{if("string"!=typeoft)thrownewTypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void0!==r?"RegExp"===l(r)?!c(e[t])&&r.test(e[t])?e[t]=void0:e[t]=d(e[t],r):e[t]!==String(r)||c(r)&&1!==r.length?c(e[t])&&(e[t]=d(e[t],r)):e[t]=void0:e[t]=void0}},i.hasQuery=function(e,t,r,n){switch(l(t)){case"String":break;case"RegExp":for(varaine)if(s.call(e,a)&&t.test(a)&&(void0===r||i.hasQuery(e,a,r)))return!0;return!1;case"Object":for(varoint)if(s.call(t,o)&&!i.hasQuery(e,o,t[o]))return!1;return!0;default:thrownewTypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(l(r)){case"Undefined":returntine;case"Boolean":returnr===Boolean(c(e[t])?e[t].length:e[t]);case"Function":return!!r(e[t],t,e);case"Array":return!!c(e[t])&&(n?f:p)(e[t],r);case"RegExp":returnc(e[t])?!!n&&f(e[t],r):Boolean(e[t]&&e[t].match(r));case"Number":r=String(r);case"String":returnc(e[t])?!!n&&f(e[t],r):e[t]===r;default:thrownewTypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},i.joinPaths=function(){for(vare=[],t=[],r=0,n=0;n<arguments.length;n++){vara=newi(arguments[n]);e.push(a);for(varo=a.segment(),s=0;s<o.length;s++)"string"==typeofo[s]&&t.push(o[s]),o[s]&&r++}if(!t.length||!r)returnnewi("");varu=newi("").segment(t);return""!==e[0].path()&&"/"!==e[0].path().slice(0,1)||u.path("/"+u.path()),u.normalize()},i.commonPath=function(e,t){varr,n=Math.min(e.length,t.length);for(r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r)){r--;break}returnr<1?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":("/"===e.charAt(r)&&"/"===t.charAt(r)||(r=e.substring(0,r).lastIndexOf("/")),e.substring(0,r+1))},i.withinString=function(e,t,r){r||(r={});varn=r.start||i.findUri.start,a=r.end||i.findUri.end,o=r.trim||i.findUri.trim,s=r.parens||i.findUri.parens,u=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){varl=n.exec(e);if(!l)break;varc=l.index;if(r.ignoreHtml){vard=e.slice(Math.max(c-3,0),c);if(d&&u.test(d))continue}for(varf=c+e.slice(c).search(a),p=e.slice(c,f),h=-1;;){varm=s.exec(p);if(!m)break;varg=m.index+m[0].length;h=Math.max(h,g)}if(!((p=h>-1?p.slice(0,h)+p.slice(h).replace(o,""):p.replace(o,"")).length<=l[0].length||r.ignore&&r.ignore.test(p))){varv=t(p,c,f=c+p.length,e);void0!==v?(v=String(v),e=e.slice(0,c)+v+e.slice(f),n.lastIndex=c+v.length):n.lastIndex=f}}returnn.lastIndex=0,e},i.ensureValidHostname=function(t,r){varn=!!t,a=!1;if(!!r&&(a=f(i.hostProtocols,r)),a&&!n)thrownewTypeError("Hostname cannot be empty, if protocol is "+r);if(t&&t.match(i.invalid_hostname_characters)){if(!e)thrownewTypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(i.invalid_hostname_characters))thrownewTypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(e){if(e){vart=Number(e);if(!(/^[0-9]+$/.test(t)&&t>0&&t<65536))thrownewTypeError('Port "'+e+'" is not a valid port')}},i.noConflict=function(e){if(e){vart={URI:this.noConflict()};returnn.URITemplate&&"function"==typeofn.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeofn.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeofn.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}returnn.URI===this&&(n.URI=a),this},o.build=function(e){return!0===e?this._deferred_build=!0:(void0===e||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},o.clone=function(){returnnewi(this)},o.valueOf=o.toString=function(){returnthis.build(!1)._string},o.protocol=_("protocol"),o.username=_("username"),o.password=_("password"),o.hostname=_("hostname"),o.port=_("port"),o.query=b("query","?"),o.fragment=b("fragment","#"),o.search=function(e,t){varr=this.query(e,t);return"string"==typeofr&&r.length?"?"+r:r},o.hash=function(e,t){varr=this.fragment(e,t);return"string"==typeofr&&r.length?"#"+r:r},o.pathname=function(e,t){if(void0===e||!0===e){varr=this._parts.path||(this._parts.hostname?"/":"");returne?(this._parts.urn?i.decodeUrnPath:i.decodePath)(r):r}returnthis._parts.urn?this._parts.path=e?i.recodeUrnPath(e):"":this._parts.path=e?i.recodePath(e):"/",this.build(!t),this},o.path=o.pathname,o.href=function(e,t){varr;if(void0===e)returnthis.toString();this._string="",this._parts=i._parts();varn=einstanceofi,a="object"==typeofe&&(e.hostname||e.path||e.pathname);if(e.nodeName&&(e=e[i.getDomAttribute(e)]||"",a=!1),!n&&a&&void0!==e.pathname&&(e=e.toString()),"string"==typeofe||einstanceofString)this._parts=i.parse(String(e),this._parts);else{if(!n&&!a)thrownewTypeError("invalid input");varo=n?e._parts:e;for(rino)"query"!==r&&s.call(this._parts,r)&&(this._parts[r]=o[r]);o.query&&this.query(o.query,!1)}returnthis.build(!t),this},o.is=function(e){vart=!1,n=!1,a=!1,o=!1,s=!1,u=!1,l=!1,c=!this._parts.urn;switch(this._parts.hostname&&(c=!1,n=i.ip4_expression.test(this._parts.hostname),a=i.ip6_expression.test(this._parts.hostname),s=(o=!(t=n||a))&&r&&r.has(this._parts.hostname),u=o&&i.idn_expression.test(this._parts.hostname),l=o&&i.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":returnc;case"absolute":return!c;case"domain":case"name":returno;case"sld":returns;case"ip":returnt;case"ip4":case"ipv4":case"inet4":returnn;case"ip6":case"ipv6":case"inet6":returna;case"idn":returnu;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":returnl}returnnull};varx=o.protocol,S=o.port,E=o.hostname;o.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(i.protocol_expression))thrownewTypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");returnx.call(this,e,t)},o.scheme=o.protocol,o.port=function(e,t){returnthis._parts.urn?void0===e?"":this:(void0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),i.ensureValidPort(e))),S.call(this,e,t))},o.hostname=function(e,t){if(this._parts.urn)returnvoid0===e?"":this;if(void0!==e){varr={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==i.parseHost(e,r))thrownewTypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&i.ensureValidHostname(e,this._parts.protocol)}returnE.call(this,e,t)},o.origin=function(e,t){if(this._parts.urn)returnvoid0===e?"":this;if(void0===e){varr=this.protocol();returnthis.authority()?(r?r+"://":"")+this.authority():""}varn=i(e);returnthis.protocol(n.protocol()).authority(n.authority()).build(!t),this},o.host=function(e,t){if(this._parts.urn)returnvoid0===e?"":this;if(void0===e)returnthis._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(e,this._parts))thrownewTypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');returnthis.build(!t),this},o.authority=function(e,t){if(this._parts.urn)returnvoid0===e?"":this;if(void0===e)returnthis._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(e,this._parts))thrownewTypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');returnthis.build(!t),this},o.userinfo=function(e,t){if(this._parts.urn)returnvoid0===e?"":this;if(void0===e){varr=i.buildUserinfo(this._parts);returnr?r.substring(0,r.length-1):r}return"@"!==e[e.length-1]&&(e+="@"),i.parseUserinfo(e,this._parts),this.build(!t),this},o.resource=function(e,t){varr;returnvoid0===e?this.path()+this.search()+this.hash():(r=i.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},o.subdomain=function(e,t){if(this._parts.urn)returnvoid0===e?"":this;if(void0===e){if(!this._parts.hostname||this.is("IP"))return"";varr=this._parts.hostname.length-this.domain().length-1;returnthis._parts.hostname.substring(0,r)||""}varn=this._parts.hostname.length-this.domain().length,a=this._parts.hostname.substring(0,n),o=newRegExp("^"+u(a));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))thrownewTypeError("Domains cannot contain colons");returne&&i.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(o,e),this.build(!t),this},o.domain=function(e,t){if(this._parts.urn)returnvoid0===e?"":this;if("boolean"==typeofe&&(t=e,e=void0),void0===e){if(!this._parts.hostname||this.is("IP"))return"";varr=this._parts.hostname.match(/\./g);if(r&&r.length<2)returnthis._parts.hostname;varn=this._parts.hostname.length-this.tld(t).length-1;returnn=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)thrownewTypeError("cannot set domain empty");if(-1!==e.indexOf(":"))thrownewTypeError("Domains cannot contain colons");if(i.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{vara=newRegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(a,e)}returnthis.build(!t),this},o.tld=function(e,t){if(this._parts.urn)returnvoid0===e?"":this;if("boolean"==typeofe&&(t=e,e=void0),void0===e){if(!this._parts.hostname||this.is("IP"))return"";varn=this._parts.hostname.lastIndexOf("."),a=this._parts.hostname.substring(n+1);return!0!==t&&r&&r.list[a.toLowerCase()]&&r.get(this._parts.hostname)||a}vari;if(!e)thrownewTypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(e))thrownewTypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');i=newRegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}else{if(!this._parts.hostname||this.is("IP"))thrownewReferenceError("cannot set TLD on non-domain host");i=newRegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}returnthis.build(!t),this},o.directory=function(e,t){if(this._parts.urn)returnvoid0===e?"":this;if(void0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";varr=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");returne?i.decodePath(n):n}vara=this._parts.path.length-this.filename().length,o=this._parts.path.substring(0,a),s=newRegExp("^"+u(o));returnthis.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=i.recodePath(e),this._parts.path=this._parts.path.replace(s,e),this.build(!t),this},o.filename=function(e,t){if(this._parts.urn)returnvoid0===e?"":this;if("string"!=typeofe){if(!this._parts.path||"/"===this._parts.path)return"";varr=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);returne?i.decodePathSegment(n):n}vara=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(a=!0);varo=newRegExp(u(this.filename())+"$");returne=i.recodePath(e),this._parts.path=this._parts.path.replace(o,e),a?this.normalizePath(t):this.build(!t),this},o.suffix=function(e,t){if(this._parts.urn)returnvoid0===e?"":this;if(void0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";varr,n,a=this.filename(),o=a.lastIndexOf(".");return-1===o?"":(r=a.substring(o+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?i.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));vars,l=this.suffix();if(l)s=e?newRegExp(u(l)+"$"):newRegExp(u("."+l)+"$");else{if(!e)returnthis;this._parts.path+="."+i.recodePath(e)}returns&&(e=i.recodePath(e),this._parts.path=this._parts.path.replace(s,e)),this.build(!t),this},o.segment=function(e,t,r){varn=this._parts.urn?":":"/",a=this.path(),i="/"===a.substring(0,1),o=a.split(n);if(void0!==e&&"number"!=typeofe&&(r=t,t=e,e=void0),void0!==e&&"number"!=typeofe)thrownewError('Bad segment "'+e+'", must be 0-based integer');if(i&&o.shift(),e<0&&(e=Math.max(o.length+e,0)),void0===t)returnvoid0===e?o:o[e];if(null===e||void0===o[e])if(c(t)){o=[];for(vars=0,u=t.length;s<u;s++)(t[s].length||o.length&&o[o.length-1].length)&&(o.length&&!o[o.length-1].length&&o.pop(),o.push(h(t[s])))}else(t||"string"==typeoft)&&(t=h(t),""===o[o.length-1]?o[o.length-1]=t:o.push(t));elset?o[e]=h(t):o.splice(e,1);returni&&o.unshift(""),this.path(o.join(n),r)},o.segmentCoded=function(e,t,r){varn,a,o;if("number"!=typeofe&&(r=t,t=e,e=void0),void0===t){if(c(n=this.segment(e,t,r)))for(a=0,o=n.length;a<o;a++)n[a]=i.decode(n[a]);elsen=void0!==n?i.decode(n):void0;returnn}if(c(t))for(a=0,o=t.length;a<o;a++)t[a]=i.encode(t[a]);elset="string"==typeoft||tinstanceofString?i.encode(t):t;returnthis.segment(e,t,r)};varA=o.query;returno.query=function(e,t){if(!0===e)returni.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeofe){varr=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=e.call(this,r);returnthis._parts.query=i.buildQuery(n||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this}returnvoid0!==e&&"string"!=typeofe?(this._parts.query=i.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):A.call(this,e,t)},o.setQuery=function(e,t,r){varn=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeofe||einstanceofString)n[e]=void0!==t?t:null;else{if("object"!=typeofe)thrownewTypeError("URI.addQuery() accepts an object, string as the name parameter");for(varaine)s.call(e,a)&&(n[a]=e[a])}returnthis._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeofe&&(r=t),this.build(!r),this},o.addQuery=function(e,t,r){varn=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);returni.addQuery(n,e,void0===t?null:t),this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeofe&&(r=t),this.build(!r),this},o.removeQuery=function(e,t,r){varn=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);returni.removeQuery(n,e,t),this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeofe&&(r=t),this.build(!r),this},o.hasQuery=function(e,t,r){varn=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);returni.hasQuery(n,e,t,r)},o.setSearch=o.setQuery,o.addSearch=o.addQuery,o.removeSearch=o.removeQuery,o.hasSearch=o.hasQuery,o.normalize=function(){returnthis._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},o.normalizeProtocol=function(e){return"string"==typeofthis._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},o.normalizeHostname=function(r){returnthis._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!r)),this},o.normalizePort=function(e){return"string"==typeofthis._parts.protocol&&this._parts.port===i.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},o.normalizePath=function(e){vart,r=this._parts.path;if(!r)returnthis;if(this._parts.urn)returnthis._parts.path=i.recodeUrnPath(this._parts.path),this.build(!e),this;if("/"===this._parts.path)returnthis;varn,a,o="";for("/"!==(r=i.recodePath(r)).charAt(0)&&(t=!0,r="/"+r),"/.."!==r.slice(-3)&&"/."!==r.slice(-2)||(r+="/"),r=r.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),t&&(o=r.substring(1).match(/^(\.\.\/)+/)||"")&&(o=o[0]);-1!==(n=r.search(/\/\.\.(\/|$)/));)0!==n?(-1===(a=r.substring(0,n).lastIndexOf("/"))&&(a=n),r=r.substring(0,a)+r.substring(n+3)):r=r.substring(3);returnt&&this.is("relative")&&(r=o+r.substring(1)),this._parts.path=r,this.build(!e),this},o.normalizePathname=o.normalizePath,o.normalizeQuery=function(e){return"string"==typeofthis._parts.query&&(this._parts.query.length?this.query(i.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},o.normalizeFragment=function(e){returnthis._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},o.normalizeSearch=o.normalizeQuery,o.normalizeHash=o.normalizeFragment,o.iso8859=function(){vare=i.encode,t=i.decode;i.encode=escape,i.decode=decodeURIComponent;try{this.normalize()}finally{i.encode=e,i.decode=t}returnthis},o.unicode=function(){vare=i.encode,t=i.decode;i.encode=g,i.decode=unescape;try{this.normalize()}finally{i.encode=e,i.decode=t}returnthis},o.readable=function(){vart=this.clone();t.username("").password("").normalize();varr="";if(t._parts.protocol&&(r+=t._parts.protocol+"://"),t._parts.hostname&&(t.is("punycode")&&e?(r+=e.toUnicode(t._parts.hostname),t._parts.port&&(r+=":"+t._parts.port)):r+=t.host()),t._parts.hostname&&t._parts.path&&"/"!==t._parts.path.charAt(0)&&(r+="/"),r+=t.path(!0),t._parts.query){for(varn="",a=0,o=t._parts.query.split("&"),s=o.length;a<s;a++){varu=(o[a]||"").split("=");n+="&"+i.decodeQuery(u[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void0!==u[1]&&(n+="="+i.decodeQuery(u[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}r+="?"+n.substring(1)}returnr+=i.decodeQuery(t.hash(),!0)},o.absoluteTo=function(e){vart,r,n,a=this.clone(),o=["protocol","username","password","hostname","port"];if(this._parts.urn)thrownewError("URNs do not have any generally defined hierarchical components");if(einstanceofi||(e=newi(e)),a._parts.protocol)returna;if(a._parts.protocol=e._parts.protocol,this._parts.hostname)returna;for(r=0;n=o[r];r++)a._parts[n]=e._parts[n];returna._parts.path?(".."===a._parts.path.substring(-2)&&(a._parts.path+="/"),"/"!==a.path().charAt(0)&&(t=(t=e.directory())||(0===e.path().indexOf("/")?"/":""),a._parts.path=(t?t+"/":"")+a._parts.path,a.normalizePath())):(a._parts.path=e._parts.path,a._parts.query||(a._parts.query=e._parts.query)),a.build(),a},o.relativeTo=function(e){vart,r,n,a,o,s=this.clone().normalize();if(s._parts.urn)thrownewError("URNs do not have any generally defined hierarchical components");if(e=newi(e).normalize(),t=s._parts,r=e._parts,a=s.path(),o=e.path(),"/"!==a.charAt(0))thrownewError("URI is already relative");if("/"!==o.charAt(0))thrownewError("Cannot calculate a URI relative to another relative URI");if(t.protocol===r.protocol&&(t.protocol=null),t.username!==r.username||t.password!==r.password)returns.build();if(null!==t.protocol||null!==t.username||null!==t.password)returns.build();if(t.hostname!==r.hostname||t.port!==r.port)returns.build();if(t.hostname=null,t.port=null,a===o)returnt.path="",s.build();if(!(n=i.commonPath(a,o)))returns.build();varu=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");returnt.path=u+t.path.substring(n.length)||"./",s.build()},o.equals=function(e){vart,r,n,a,o,u=this.clone(),l=newi(e),d={};if(u.normalize(),l.normalize(),u.toString()===l.toString())return!0;if(n=u.query(),a=l.query(),u.query(""),l.query(""),u.toString()!==l.toString())return!1;if(n.length!==a.length)return!1;for(oint=i.parseQuery(n,this._parts.escapeQuerySpace),r=i.parseQuery(a,this._parts.escapeQuerySpace),t)if(s.call(t,o)){if(c(t[o])){if(!p(t[o],r[o]))return!1}elseif(t[o]!==r[o])return!1;d[o]=!0}for(oinr)if(s.call(r,o)&&!d[o])return!1;return!0},o.preventInvalidHostname=function(e){returnthis._parts.preventInvalidHostname=!!e,this},o.duplicateQueryParameters=function(e){returnthis._parts.duplicateQueryParameters=!!e,this},o.escapeQuerySpace=function(e){returnthis._parts.escapeQuerySpace=!!e,this},i},e.exports?e.exports=r(At,Ot,It):t.URI=r(t.punycode,t.IPv6,t.SecondLevelDomains,t)}));functionPt(e,t){if(null===e||"object"!=typeofe)returne;t=n.defaultValue(t,!1);varr=newe.constructor;for(varaine)if(e.hasOwnProperty(a)){vari=e[a];t&&(i=Pt(i,t)),r[a]=i}returnr}functionTt(e,t){varr;return"undefined"!=typeofdocument&&(r=document),Tt._implementation(e,t,r)}Tt._implementation=function(e,t,r){if(!n.defined(t)){if(void0===r)returne;t=n.defaultValue(r.baseURI,r.location.href)}vara=newRt(e);return""!==a.scheme()?a.toString():a.absoluteTo(t).toString()};varqt,zt=/^blob:/i;functionMt(e){returnzt.test(e)}varDt=/^data:/i;functionUt(e){returnDt.test(e)}varkt=Object.freeze({UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5}),Ft=Object.freeze({TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3});functionNt(e){e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT);vart=n.defaultValue(e.throttleByServer,!1),r=n.defaultValue(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=n.defaultValue(e.priority,0),this.throttle=r,this.throttleByServer=t,this.type=n.defaultValue(e.type,Ft.OTHER),this.serverKey=void0,this.state=kt.UNISSUED,this.deferred=void0,this.cancelled=!1}functionjt(e,t,r){this.statusCode=e,this.response=t,this.responseHeaders=r,"string"==typeofthis.responseHeaders&&(this.responseHeaders=function(e){vart={};if(!e)returnt;for(varr=e.split("\r\n"),n=0;n<r.length;++n){vara=r[n],i=a.indexOf(": ");if(i>0){varo=a.substring(0,i),s=a.substring(i+2);t[o]=s}}returnt}(this.responseHeaders))}functionBt(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}functionVt(e,t){returnt-e}functionLt(e){this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void0}functionQt(e,t,r){varn=e[t];e[t]=e[r],e[r]=n}Nt.prototype.cancel=function(){this.cancelled=!0},Nt.prototype.clone=function(e){returnn.defined(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=void0,e.cancelled=!1,e):newNt(this)},jt.prototype.toString=function(){vare="Request has failed.";returnn.defined(this.statusCode)&&(e+=" Status Code: "+this.statusCode),e},Object.defineProperties(Bt.prototype,{numberOfListeners:{get:function(){returnthis._listeners.length-this._toRemove.length}}}),Bt.prototype.addEventListener=function(e,t){this._listeners.push(e),this._scopes.push(t);varr=this;returnfunction(){r.removeEventListener(e,t)}},Bt.prototype.removeEventListener=function(e,t){for(varr=this._listeners,n=this._scopes,a=-1,i=0;i<r.length;i++)if(r[i]===e&&n[i]===t){a=i;break}return-1!==a&&(this._insideRaiseEvent?(this._toRemove.push(a),r[a]=void0,n[a]=void0):(r.splice(a,1),n.splice(a,1)),!0)},Bt.prototype.raiseEvent=function(){vare;this._insideRaiseEvent=!0;vart=this._listeners,r=this._scopes,a=t.length;for(e=0;e<a;e++){vari=t[e];n.defined(i)&&t[e].apply(r[e],arguments)}varo=this._toRemove;if((a=o.length)>0){for(o.sort(Vt),e=0;e<a;e++){vars=o[e];t.splice(s,1),r.splice(s,1)}o.length=0}this._insideRaiseEvent=!1},Object.defineProperties(Lt.prototype,{length:{get:function(){returnthis._length}},internalArray:{get:function(){returnthis._array}},maximumLength:{get:function(){returnthis._maximumLength},set:function(e){vart=this._length;if(e<t){for(varr=this._array,n=e;n<t;++n)r[n]=void0;this._length=e,r.length=e}this._maximumLength=e}},comparator:{get:function(){returnthis._comparator}}}),Lt.prototype.reserve=function(e){e=n.defaultValue(e,this._length),this._array.length=e},Lt.prototype.heapify=function(e){e=n.defaultValue(e,0);for(vart=this._length,r=this._comparator,a=this._array,i=-1,o=!0;o;){vars=2*(e+1),u=s-1;i=u<t&&r(a[u],a[e])<0?u:e,s<t&&r(a[s],a[i])<0&&(i=s),i!==e?(Qt(a,i,e),e=i):o=!1}},Lt.prototype.resort=function(){for(vare=this._length,t=Math.ceil(e/2);t>=0;--t)this.heapify(t)},Lt.prototype.insert=function(e){vart,r=this._array,a=this._comparator,i=this._maximumLength,o=this._length++;for(o<r.length?r[o]=e:r.push(e);0!==o;){vars=Math.floor((o-1)/2);if(!(a(r[o],r[s])<0))break;Qt(r,o,s),o=s}returnn.defined(i)&&this._length>i&&(t=r[i],this._length=i),t},Lt.prototype.pop=function(e){if(e=n.defaultValue(e,0),0!==this._length){vart=this._array,r=t[e];returnQt(t,e,--this._length),this.heapify(e),t[this._length]=void0,r}};varWt={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},Ht=20,Yt=newLt({comparator:function(e,t){returne.priority-t.priority}});Yt.maximumLength=Ht,Yt.reserve(Ht);varZt=[],Gt={},Jt="undefined"!=typeofdocument?newRt(document.location.href):newRt,$t=newBt;functionXt(){}functionKt(e){n.defined(e.priorityFunction)&&(e.priority=e.priorityFunction())}functioner(e){returne.state===kt.UNISSUED&&(e.state=kt.ISSUED,e.deferred=n.when.defer()),e.deferred.promise}functiontr(e){vart=er(e);returne.state=kt.ACTIVE,Zt.push(e),++Wt.numberOfActiveRequests,++Wt.numberOfActiveRequestsEver,++Gt[e.serverKey],e.requestFunction().then(function(e){returnfunction(t){if(e.state!==kt.CANCELLED){varr=e.deferred;--Wt.numberOfActiveRequests,--Gt[e.serverKey],$t.raiseEvent(),e.state=kt.RECEIVED,e.deferred=void0,r.resolve(t)}}}(e)).otherwise(function(e){returnfunction(t){e.state!==kt.CANCELLED&&(++Wt.numberOfFailedRequests,--Wt.numberOfActiveRequests,--Gt[e.serverKey],$t.raiseEvent(t),e.state=kt.FAILED,e.deferred.reject(t))}}(e)),t}functionrr(e){vart=e.state===kt.ACTIVE;if(e.state=kt.CANCELLED,++Wt.numberOfCancelledRequests,n.defined(e.deferred)){varr=e.deferred;e.deferred=void0,r.reject()}t&&(--Wt.numberOfActiveRequests,--Gt[e.serverKey],++Wt.numberOfCancelledActiveRequests),n.defined(e.cancelFunction)&&e.cancelFunction()}Xt.maximumRequests=50,Xt.maximumRequestsPerServer=6,Xt.requestsByServer={"api.cesium.com:443":18,"assets.cesium.com:443":18},Xt.throttleRequests=!0,Xt.debugShowStatistics=!1,Xt.requestCompletedEvent=$t,Object.defineProperties(Xt,{statistics:{get:function(){returnWt}},priorityHeapLength:{get:function(){returnHt},set:function(e){if(e<Ht)for(;Yt.length>e;){rr(Yt.pop())}Ht=e,Yt.maximumLength=e,Yt.reserve(e)}}}),Xt.serverHasOpenSlots=function(e,t){t=n.defaultValue(t,1);varr=n.defaultValue(Xt.requestsByServer[e],Xt.maximumRequestsPerServer);returnGt[e]+t<=r},Xt.heapHasOpenSlots=function(e){returnYt.length+e<=Ht},Xt.update=function(){vare,t,r=0,n=Zt.length;for(e=0;e<n;++e)(t=Zt[e]).cancelled&&rr(t),t.state===kt.ACTIVE?r>0&&(Zt[e-r]=t):++r;Zt.length-=r;vara=Yt.internalArray,i=Yt.length;for(e=0;e<i;++e)Kt(a[e]);Yt.resort();for(varo=Math.max(Xt.maximumRequests-Zt.length,0),s=0;s<o&&Yt.length>0;)(t=Yt.pop()).cancelled?rr(t):!t.throttleByServer||Xt.serverHasOpenSlots(t.serverKey)?(tr(t),++s):rr(t);!function(){if(!Xt.debugShowStatistics)return;0===Wt.numberOfActiveRequests&&Wt.lastNumberOfActiveRequests>0&&(Wt.numberOfAttemptedRequests>0&&(console.log("Number of attempted requests: "+Wt.numberOfAttemptedRequests),Wt.numberOfAttemptedRequests=0),Wt.numberOfCancelledRequests>0&&(console.log("Number of cancelled requests: "+Wt.numberOfCancelledRequests),Wt.numberOfCancelledRequests=0),Wt.numberOfCancelledActiveRequests>0&&(console.log("Number of cancelled active requests: "+Wt.numberOfCancelledActiveRequests),Wt.numberOfCancelledActiveRequests=0),Wt.numberOfFailedRequests>0&&(console.log("Number of failed requests: "+Wt.numberOfFailedRequests),Wt.numberOfFailedRequests=0));Wt.lastNumberOfActiveRequests=Wt.numberOfActiveRequests}()},Xt.getServerKey=function(e){vart=newRt(e);""===t.scheme()&&(t=newRt(e).absoluteTo(Jt)).normalize();varr=t.authority();/:/.test(r)||(r=r+":"+("https"===t.scheme()?"443":"80"));vara=Gt[r];returnn.defined(a)||(Gt[r]=0),r},Xt.request=function(e){if(Ut(e.url)||Mt(e.url))return$t.raiseEvent(),e.state=kt.RECEIVED,e.requestFunction();if(++Wt.numberOfAttemptedRequests,n.defined(e.serverKey)||(e.serverKey=Xt.getServerKey(e.url)),!Xt.throttleRequests||!e.throttleByServer||Xt.serverHasOpenSlots(e.serverKey)){if(!Xt.throttleRequests||!e.throttle)returntr(e);if(!(Zt.length>=Xt.maximumRequests)){Kt(e);vart=Yt.insert(e);if(n.defined(t)){if(t===e)return;rr(t)}returner(e)}}},Xt.clearForSpecs=function(){for(;Yt.length>0;){rr(Yt.pop())}for(vare=Zt.length,t=0;t<e;++t)rr(Zt[t]);Zt.length=0,Gt={},Wt.numberOfAttemptedRequests=0,Wt.numberOfActiveRequests=0,Wt.numberOfCancelledRequests=0,Wt.numberOfCancelledActiveRequests=0,Wt.numberOfFailedRequests=0,Wt.numberOfActiveRequestsEver=0,Wt.lastNumberOfActiveRequests=0},Xt.numberOfActiveRequestsByServer=function(e){returnGt[e]},Xt.requestHeap=Yt;varnr={},ar={};nr.add=function(e,t){varr=e.toLowerCase()+":"+t;n.defined(ar[r])||(ar[r]=!0)},nr.remove=function(e,t){varr=e.toLowerCase()+":"+t;n.defined(ar[r])&&deletear[r]},nr.contains=function(e){vart=function(e){vart=newRt(e);t.normalize();varr=t.authority();if(0!==r.length){if(t.authority(r),-1!==r.indexOf("@")){varn=r.split("@");r=n[1]}if(-1===r.indexOf(":")){vara=t.scheme();if(0===a.length&&(a=(a=window.location.protocol).substring(0,a.length-1)),"http"===a)r+=":80";else{if("https"!==a)return;r+=":443"}}returnr}}(e);return!(!n.defined(t)||!n.defined(ar[t]))},nr.clear=function(){ar={}};varir,or=function(){try{vare=newXMLHttpRequest;returne.open("GET","#",!0),e.responseType="blob","blob"===e.responseType}catch(e){return!1}}();functionsr(e,t,r,a){vari,o=e.query();if(0===o.length)return{};if(-1===o.indexOf("=")){vars={};s[o]=void0,i=s}elsei=function(e){vart={};if(""===e)returnt;for(varr=e.replace(/\+/g,"%20").split(/[&;]/),a=0,i=r.length;a<i;++a){varo=r[a].split("="),s=decodeURIComponent(o[0]),u=o[1];u=n.defined(u)?decodeURIComponent(u):"";varl=t[s];"string"==typeofl?t[s]=[l,u]:Array.isArray(l)?l.push(u):t[s]=u}returnt}(o);t._queryParameters=r?dr(i,t._queryParameters,a):i,e.search("")}functionur(e,t){varr=t._queryParameters,a=Object.keys(r);1!==a.length||n.defined(r[a[0]])?e.search(function(e){vart="";for(varrine)if(e.hasOwnProperty(r)){varn=e[r],a=encodeURIComponent(r)+"=";if(Array.isArray(n))for(vari=0,o=n.length;i<o;++i)t+=a+encodeURIComponent(n[i])+"&";elset+=a+encodeURIComponent(n)+"&"}returnt.slice(0,-1)}(r)):e.search(a[0])}functionlr(e,t){returnn.defined(e)?n.defined(e.clone)?e.clone():Pt(e):t}functioncr(e){if(e.state===kt.ISSUED||e.state===kt.ACTIVE)thrownewr.RuntimeError("The Resource is already being fetched.");e.state=kt.UNISSUED,e.deferred=void0}functiondr(e,t,r){if(!r)returni.combine(e,t);vara=Pt(e,!0);for(varoint)if(t.hasOwnProperty(o)){vars=a[o],u=t[o];n.defined(s)?(Array.isArray(s)||(s=a[o]=[s]),a[o]=s.concat(u)):a[o]=Array.isArray(u)?u.slice():u}returna}functionfr(e){"string"==typeof(e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT))&&(e={url:e}),this._url=void0,this._templateValues=lr(e.templateValues,{}),this._queryParameters=lr(e.queryParameters,{}),this.headers=lr(e.headers,{}),this.request=n.defaultValue(e.request,newNt),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=n.defaultValue(e.retryAttempts,0),this._retryCount=0;vart=newRt(e.url);sr(t,this,!0,!0),t.fragment(""),this._url=t.toString()}functionpr(e){vart=e.resource,r=e.flipY,a=e.skipColorSpaceConversion,i=e.preferImageBitmap,o=t.request;o.url=t.url,o.requestFunction=function(){vare=!1;t.isDataUri||t.isBlobUri||(e=t.isCrossOriginUrl);vars=n.when.defer();returnfr._Implementations.createImage(o,e,s,r,a,i),s.promise};vars=Xt.request(o);if(n.defined(s))returns.otherwise((function(e){returno.state!==kt.FAILED?n.when.reject(e):t.retryOnError(e).then((function(s){returns?(o.state=kt.UNISSUED,o.deferred=void0,pr({resource:t,flipY:r,skipColorSpaceConversion:a,preferImageBitmap:i})):n.when.reject(e)}))}))}functionhr(e,t,r){vara={};a[t]=r,e.setQueryParameters(a);vari=e.request;i.url=e.url,i.requestFunction=function(){vart=n.when.defer();returnwindow[r]=function(e){t.resolve(e);try{deletewindow[r]}catch(e){window[r]=void0}},fr._Implementations.loadAndExecuteScript(e.url,r,t),t.promise};varo=Xt.request(i);if(n.defined(o))returno.otherwise((function(a){returni.state!==kt.FAILED?n.when.reject(a):e.retryOnError(a).then((function(o){returno?(i.state=kt.UNISSUED,i.deferred=void0,hr(e,t,r)):n.when.reject(a)}))}))}fr.createIfNeeded=function(e){returneinstanceoffr?e.getDerivedResource({request:e.request}):"string"!=typeofe?e:newfr({url:e})},fr.supportsImageBitmapOptions=function(){if(n.defined(ir))returnir;if("function"!=typeofcreateImageBitmap)returnir=n.when.resolve(!1);returnir=fr.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWP4////fwAJ+wP9CNHoHgAAAABJRU5ErkJggg=="}).then((function(e){returncreateImageBitmap(e,{imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"})})).then((function(e){return!0})).otherwise((function(){return!1}))},Object.defineProperties(fr,{isBlobSupported:{get:function(){returnor}}}),Object.defineProperties(fr.prototype,{queryParameters:{get:function(){returnthis._queryParameters}},templateValues:{get:function(){returnthis._templateValues}},url:{get:function(){returnthis.getUrlComponent(!0,!0)},set:function(e){vart=newRt(e);sr(t,this,!1),t.fragment(""),this._url=t.toString()}},extension:{get:function(){returnfunction(e){vart=newRt(e);t.normalize();varr=t.path(),n=r.lastIndexOf("/");return-1!==n&&(r=r.substr(n+1)),n=r.lastIndexOf("."),-1===n?"":r.substr(n+1)}(this._url)}},isDataUri:{get:function(){returnUt(this._url)}},isBlobUri:{get:function(){returnMt(this._url)}},isCrossOriginUrl:{get:function(){returnfunction(e){n.defined(qt)||(qt=document.createElement("a")),qt.href=window.location.href;vart=qt.host,r=qt.protocol;returnqt.href=e,qt.href=qt.href,r!==qt.protocol||t!==qt.host}(this._url)}},hasHeaders:{get:function(){returnObject.keys(this.headers).length>0}}}),fr.prototype.toString=function(){returnthis.getUrlComponent(!0,!0)},fr.prototype.getUrlComponent=function(e,t){if(this.isDataUri)returnthis._url;varr=newRt(this._url);e&&ur(r,this);vara=r.toString().replace(/%7B/g,"{").replace(/%7D/g,"}"),i=this._templateValues;returna=a.replace(/{(.*?)}/g,(function(e,t){varr=i[t];returnn.defined(r)?encodeURIComponent(r):e})),t&&n.defined(this.proxy)&&(a=this.proxy.getURL(a)),a},fr.prototype.setQueryParameters=function(e,t){this._queryParameters=t?dr(this._queryParameters,e,!1):dr(e,this._queryParameters,!1)},fr.prototype.appendQueryParameters=function(e){this._queryParameters=dr(e,this._queryParameters,!0)},fr.prototype.setTemplateValues=function(e,t){this._templateValues=t?i.combine(this._templateValues,e):i.combine(e,this._templateValues)},fr.prototype.getDerivedResource=function(e){vart=this.clone();if(t._retryCount=0,n.defined(e.url)){varr=newRt(e.url);sr(r,t,!0,n.defaultValue(e.preserveQueryParameters,!1)),r.fragment(""),""!==r.scheme()?t._url=r.toString():t._url=r.absoluteTo(newRt(Tt(this._url))).toString()}returnn.defined(e.queryParameters)&&(t._queryParameters=i.combine(e.queryParameters,t._queryParameters)),n.defined(e.templateValues)&&(t._templateValues=i.combine(e.templateValues,t.templateValues)),n.defined(e.headers)&&(t.headers=i.combine(e.headers,t.headers)),n.defined(e.proxy)&&(t.proxy=e.proxy),n.defined(e.request)&&(t.request=e.request),n.defined(e.retryCallback)&&(t.retryCallback=e.retryCallback),n.defined(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t},fr.prototype.retryOnError=function(e){vart=this.retryCallback;if("function"!=typeoft||this._retryCount>=this.retryAttempts)returnn.when(!1);varr=this;returnn.when(t(this,e)).then((function(e){return++r._retryCount,e}))},fr.prototype.clone=function(e){returnn.defined(e)||(e=newfr({url:this._url})),e._url=this._url,e._queryParameters=Pt(this._queryParameters),e._templateValues=Pt(this._templateValues),e.headers=Pt(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e},fr.prototype.getBaseUri=function(e){returnfunction(e,t){varr="",n=e.lastIndexOf("/");return-1!==n&&(r=e.substring(0,n+1)),t?(0!==(e=newRt(e)).query().length&&(r+="?"+e.query()),0!==e.fragment().length&&(r+="#"+e.fragment()),r):r}(this.getUrlComponent(e),e)},fr.prototype.appendForwardSlash=function(){vare;this._url=(0!==(e=this._url).length&&"/"===e[e.length-1]||(e+="/"),e)},fr.prototype.fetchArrayBuffer=function(){returnthis.fetch({responseType:"arraybuffer"})},fr.fetchArrayBuffer=function(e){returnnewfr(e).fetchArrayBuffer()},fr.prototype.fetchBlob=function(){returnthis.fetch({responseType:"blob"})},fr.fetchBlob=function(e){returnnewfr(e).fetchBlob()},fr.prototype.fetchImage=function(e){e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT);vart=n.defaultValue(e.preferImageBitmap,!1),r=n.defaultValue(e.preferBlob,!1),a=n.defaultValue(e.flipY,!1),i=n.defaultValue(e.skipColorSpaceConversion,!1);if(cr(this.request),!or||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!r)returnpr({resource:this,flipY:a,skipColorSpaceConversion:i,preferImageBitmap:t});varo,s,u,l=this.fetchBlob();returnn.defined(l)?fr.supportsImageBitmapOptions().then((function(e){returno=e&&t,l})).then((function(e){if(n.defined(e)){if(u=e,o)returnfr.createImageBitmapFromBlob(e,{flipY:a,premultiplyAlpha:!1,skipColorSpaceConversion:i});vart=window.URL.createObjectURL(e);returnpr({resource:s=newfr({url:t}),flipY:a,skipColorSpaceConversion:i,preferImageBitmap:!1})}})).then((function(e){if(n.defined(e))returne.blob=u,o||window.URL.revokeObjectURL(s.url),e})).otherwise((function(e){returnn.defined(s)&&window.URL.revokeObjectURL(s.url),e.blob=u,n.when.reject(e)})):void0},fr.fetchImage=function(e){returnnewfr(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},fr.prototype.fetchText=function(){returnthis.fetch({responseType:"text"})},fr.fetchText=function(e){returnnewfr(e).fetchText()},fr.prototype.fetchJson=function(){vare=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(n.defined(e))returne.then((function(e){if(n.defined(e))returnJSON.parse(e)}))},fr.fetchJson=function(e){returnnewfr(e).fetchJson()},fr.prototype.fetchXML=function(){returnthis.fetch({responseType:"document",overrideMimeType:"text/xml"})},fr.fetchXML=function(e){returnnewfr(e).fetchXML()},fr.prototype.fetchJsonp=function(e){vart;e=n.defaultValue(e,"callback"),cr(this.request);do{t="loadJsonp"+a.CesiumMath.nextRandomNumber().toString().substring(2,8)}while(n.defined(window[t]));returnhr(this,e,t)},fr.fetchJsonp=function(e){returnnewfr(e).fetchJsonp(e.callbackParameterName)},fr.prototype._makeRequest=function(e){vart=this;cr(t.request);varr=t.request;r.url=t.url,r.requestFunction=function(){vara=e.responseType,o=i.combine(e.headers,t.headers),s=e.overrideMimeType,u=e.method,l=e.data,c=n.when.defer(),d=fr._Implementations.loadWithXhr(t.url,a,u,l,o,c,s);returnn.defined(d)&&n.defined(d.abort)&&(r.cancelFunction=function(){d.abort()}),c.promise};vara=Xt.request(r);if(n.defined(a))returna.then((function(e){returnr.cancelFunction=void0,e})).otherwise((function(a){returnr.cancelFunction=void0,r.state!==kt.FAILED?n.when.reject(a):t.retryOnError(a).then((function(i){returni?(r.state=kt.UNISSUED,r.deferred=void0,t.fetch(e)):n.when.reject(a)}))}))};varmr=/^data:(.*?)(;base64)?,(.*)$/;functiongr(e,t){varr=decodeURIComponent(t);returne?atob(r):r}functionvr(e,t){for(varr=gr(e,t),n=newArrayBuffer(r.length),a=newUint8Array(n),i=0;i<r.length;i++)a[i]=r.charCodeAt(i);returnn}functionyr(e,t){switch(t){case"text":returne.toString("utf8");case"json":returnJSON.parse(e.toString("utf8"));default:returnnewUint8Array(e).buffer}}fr.prototype.fetch=function(e){return(e=lr(e,{})).method="GET",this._makeRequest(e)},fr.fetch=function(e){returnnewfr(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},fr.prototype.delete=function(e){return(e=lr(e,{})).method="DELETE",this._makeRequest(e)},fr.delete=function(e){returnnewfr(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},fr.prototype.head=function(e){return(e=lr(e,{})).method="HEAD",this._makeRequest(e)},fr.head=function(e){returnnewfr(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},fr.prototype.options=function(e){return(e=lr(e,{})).method="OPTIONS",this._makeRequest(e)},fr.options=function(e){returnnewfr(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},fr.prototype.post=function(e,t){returnr.Check.defined("data",e),(t=lr(t,{})).method="POST",t.data=e,this._makeRequest(t)},fr.post=function(e){returnnewfr(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},fr.prototype.put=function(e,t){returnr.Check.defined("data",e),(t=lr(t,{})).method="PUT",t.data=e,this._makeRequest(t)},fr.put=function(e){returnnewfr(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},fr.prototype.patch=function(e,t){returnr.Check.defined("data",e),(t=lr(t,{})).method="PATCH",t.data=e,this._makeRequest(t)},fr.patch=function(e){returnnewfr(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},fr._Implementations={},fr._Implementations.createImage=function(e,t,a,i,o,s){varu=e.url;fr.supportsImageBitmapOptions().then((function(l){if(l&&s){varc=n.when.defer(),d=fr._Implementations.loadWithXhr(u,"blob","GET",void0,void0,c,void0,void0,void0);returnn.defined(d)&&n.defined(d.abort)&&(e.cancelFunction=function(){d.abort()}),c.promise.then((function(e){if(n.defined(e))returnfr.createImageBitmapFromBlob(e,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o});a.reject(newr.RuntimeError("Successfully retrieved "+u+" but it contained no content."))})).then(a.resolve)}!function(e,t,r){varn=newImage;n.onload=function(){r.resolve(n)},n.onerror=function(e){r.reject(e)},t&&(nr.contains(e)?n.crossOrigin="use-credentials":n.crossOrigin=""),n.src=e}(u,t,a)})).otherwise(a.reject)},fr.createImageBitmapFromBlob=function(e,t){returnr.Check.defined("options",t),r.Check.typeOf.bool("options.flipY",t.flipY),r.Check.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),r.Check.typeOf.bool("options.skipColorSpaceConversion",t.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:t.skipColorSpaceConversion?"none":"default"})};varwr="undefined"==typeofXMLHttpRequest;functionCr(e){if(e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT),this._dates=void0,this._samples=void0,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=void0,this._dataError=void0,this._addNewLeapSeconds=n.defaultValue(e.addNewLeapSeconds,!0),n.defined(e.data))br(this,e.data);elseif(n.defined(e.url)){vart=fr.createIfNeeded(e.url),r=this;this._downloadPromise=t.fetchJson().then((function(e){br(r,e)})).otherwise((function(){r._dataError="An error occurred while retrieving the EOP data from the URL "+t.url+"."}))}elsebr(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function_r(e,t){returnSt.compare(e.julianDate,t)}functionbr(e,t){if(n.defined(t.columnNames))if(n.defined(t.samples)){varr=t.columnNames.indexOf("modifiedJulianDateUtc"),a=t.columnNames.indexOf("xPoleWanderRadians"),i=t.columnNames.indexOf("yPoleWanderRadians"),o=t.columnNames.indexOf("ut1MinusUtcSeconds"),s=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),u=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),l=t.columnNames.indexOf("taiMinusUtcSeconds");if(r<0||a<0||i<0||o<0||s<0||u<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{varc,d=e._samples=t.samples,f=e._dates=[];e._dateColumn=r,e._xPoleWanderRadiansColumn=a,e._yPoleWanderRadiansColumn=i,e._ut1MinusUtcSecondsColumn=o,e._xCelestialPoleOffsetRadiansColumn=s,e._yCelestialPoleOffsetRadiansColumn=u,e._taiMinusUtcSecondsColumn=l,e._columnCount=t.columnNames.length,e._lastIndex=void0;for(varp=e._addNewLeapSeconds,h=0,m=d.length;h<m;h+=e._columnCount){varg=d[h+r],v=d[h+l],y=newSt(g+it.MODIFIED_JULIAN_DATE_DIFFERENCE,v,ot.TAI);if(f.push(y),p){if(v!==c&&n.defined(c)){varw=St.leapSeconds,C=et(w,y,_r);if(C<0){var_=newat(y,v);w.splice(~C,0,_)}}c=v}}}}elsee._dataError="Error in loaded EOP data: The samples property is required.";elsee._dataError="Error in loaded EOP data: The columnNames property is required."}functionxr(e,t,r,n,a){vari=r*n;a.xPoleWander=t[i+e._xPoleWanderRadiansColumn],a.yPoleWander=t[i+e._yPoleWanderRadiansColumn],a.xPoleOffset=t[i+e._xCelestialPoleOffsetRadiansColumn],a.yPoleOffset=t[i+e._yCelestialPoleOffsetRadiansColumn],a.ut1MinusUtc=t[i+e._ut1MinusUtcSecondsColumn]}functionSr(e,t,r){returnt+e*(r-t)}functionEr(e,t,r,n,a,i,o){vars=e._columnCount;if(i>t.length-1)returno.xPoleWander=0,o.yPoleWander=0,o.xPoleOffset=0,o.yPoleOffset=0,o.ut1MinusUtc=0,o;varu=t[a],l=t[i];if(u.equals(l)||n.equals(u))returnxr(e,r,a,s,o),o;if(n.equals(l))returnxr(e,r,i,s,o),o;varc=St.secondsDifference(n,u)/St.secondsDifference(l,u),d=a*s,f=i*s,p=r[d+e._ut1MinusUtcSecondsColumn],h=r[f+e._ut1MinusUtcSecondsColumn],m=h-p;if(m>.5||m<-.5){varg=r[d+e._taiMinusUtcSecondsColumn],v=r[f+e._taiMinusUtcSecondsColumn];g!==v&&(l.equals(n)?p=h:h-=v-g)}returno.xPoleWander=Sr(c,r[d+e._xPoleWanderRadiansColumn],r[f+e._xPoleWanderRadiansColumn]),o.yPoleWander=Sr(c,r[d+e._yPoleWanderRadiansColumn],r[f+e._yPoleWanderRadiansColumn]),o.xPoleOffset=Sr(c,r[d+e._xCelestialPoleOffsetRadiansColumn],r[f+e._xCelestialPoleOffsetRadiansColumn]),o.yPoleOffset=Sr(c,r[d+e._yCelestialPoleOffsetRadiansColumn],r[f+e._yCelestialPoleOffsetRadiansColumn]),o.ut1MinusUtc=Sr(c,p,h),o}functionAr(e,t,r){this.heading=n.defaultValue(e,0),this.pitch=n.defaultValue(t,0),this.roll=n.defaultValue(r,0)}fr._Implementations.loadWithXhr=function(e,t,a,i,o,s,u){varl=mr.exec(e);if(null===l){if(!wr){varc=newXMLHttpRequest;if(nr.contains(e)&&(c.withCredentials=!0),c.open(a,e,!0),n.defined(u)&&n.defined(c.overrideMimeType)&&c.overrideMimeType(u),n.defined(o))for(vardino)o.hasOwnProperty(d)&&c.setRequestHeader(d,o[d]);n.defined(t)&&(c.responseType=t);varf=!1;return"string"==typeofe&&(f=0===e.indexOf("file://")||"undefined"!=typeofwindow&&"file://"===window.location.origin),c.onload=function(){if(!(c.status<200||c.status>=300)||f&&0===c.status){vare=c.response,i=c.responseType;if("HEAD"===a||"OPTIONS"===a){varo=c.getAllResponseHeaders().trim().split(/[\r\n]+/),u={};returno.forEach((function(e){vart=e.split(": "),r=t.shift();u[r]=t.join(": ")})),voids.resolve(u)}if(204===c.status)s.resolve();elseif(!n.defined(e)||n.defined(t)&&i!==t)if("json"===t&&"string"==typeofe)try{s.resolve(JSON.parse(e))}catch(e){s.reject(e)}else(""===i||"document"===i)&&n.defined(c.responseXML)&&c.responseXML.hasChildNodes()?s.resolve(c.responseXML):""!==i&&"text"!==i||!n.defined(c.responseText)?s.reject(newr.RuntimeError("Invalid XMLHttpRequest response type.")):s.resolve(c.responseText);elses.resolve(e)}elses.reject(newjt(c.status,c.response,c.getAllResponseHeaders()))},c.onerror=function(e){s.reject(newjt)},c.send(i),c}!function(e,t,n,a,i,o,s){varu=require("url").parse(e),l="https:"===u.protocol?require("https"):require("http"),c=require("zlib"),d={protocol:u.protocol,hostname:u.hostname,port:u.port,path:u.path,query:u.query,method:n,headers:i};l.request(d).on("response",(function(e){if(e.statusCode<200||e.statusCode>=300)o.reject(newjt(e.statusCode,e,e.headers));else{varn=[];e.on("data",(function(e){n.push(e)})),e.on("end",(function(){vara=Buffer.concat(n);"gzip"===e.headers["content-encoding"]?c.gunzip(a,(function(e,n){e?o.reject(newr.RuntimeError("Error decompressing response.")):o.resolve(yr(n,t))})):o.resolve(yr(a,t))}))}})).on("error",(function(e){o.reject(newjt)})).end()}(e,t,a,0,o,s)}elses.resolve(function(e,t){t=n.defaultValue(t,"");varr=e[1],a=!!e[2],i=e[3];switch(t){case"":case"text":returngr(a,i);case"arraybuffer":returnvr(a,i);case"blob":varo=vr(a,i);returnnewBlob([o],{type:r});case"document":return(newDOMParser).parseFromString(gr(a,i),r);case"json":returnJSON.parse(gr(a,i))}}(l,t))},fr._Implementations.loadAndExecuteScript=function(e,t,r){returnfunction(e){vart=n.when.defer(),r=document.createElement("script");r.async=!0,r.src=e;vara=document.getElementsByTagName("head")[0];returnr.onload=function(){r.onload=void0,a.removeChild(r),t.resolve()},r.onerror=function(e){t.reject(e)},a.appendChild(r),t.promise}(e).otherwise(r.reject)},fr._DefaultImplementations={},fr._DefaultImplementations.createImage=fr._Implementations.createImage,fr._DefaultImplementations.loadWithXhr=fr._Implementations.loadWithXhr,fr._DefaultImplementations.loadAndExecuteScript=fr._Implementations.loadAndExecuteScript,fr.DEFAULT=Object.freeze(newfr({url:"undefined"==typeofdocument?"":document.location.href.split("?")[0]})),Cr.NONE=Object.freeze({getPromiseToLoad:function(){returnn.when.resolve()},compute:function(e,t){returnn.defined(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=newtt(0,0,0,0,0),t}}),Cr.prototype.getPromiseToLoad=function(){returnn.when(this._downloadPromise)},Cr.prototype.compute=function(e,t){if(n.defined(this._samples)){if(n.defined(t)||(t=newtt(0,0,0,0,0)),0===this._samples.length)returnt.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;vara=this._dates,i=this._lastIndex,o=0,s=0;if(n.defined(i)){varu=a[i],l=a[i+1],c=St.lessThanOrEquals(u,e),d=!n.defined(l),f=d||St.greaterThanOrEquals(l,e);if(c&&f)returno=i,!d&&l.equals(e)&&++o,s=o+1,Er(this,a,this._samples,e,o,s,t),t}varp=et(a,e,St.compare,this._dateColumn);returnp>=0?(p<a.length-1&&a[p+1].equals(e)&&++p,o=p,s=p):(o=(s=~p)-1)<0&&(o=0),this._lastIndex=o,Er(this,a,this._samples,e,o,s,t),t}if(n.defined(this._dataError))thrownewr.RuntimeError(this._dataError)},Ar.fromQuaternion=function(e,t){n.defined(t)||(t=newAr);varr=2*(e.w*e.y-e.z*e.x),i=1-2*(e.x*e.x+e.y*e.y),o=2*(e.w*e.x+e.y*e.z),s=1-2*(e.y*e.y+e.z*e.z),u=2*(e.w*e.z+e.x*e.y);returnt.heading=-Math.atan2(u,s),t.roll=Math.atan2(o,i),t.pitch=-a.CesiumMath.asinClamped(r),t},Ar.fromDegrees=function(e,t,r,i){returnn.defined(i)||(i=newAr),i.heading=e*a.CesiumMath.RADIANS_PER_DEGREE,i.pitch=t*a.CesiumMath.RADIANS_PER_DEGREE,i.roll=r*a.CesiumMath.RADIANS_PER_DEGREE,i},Ar.clone=function(e,t){if(n.defined(e))returnn.defined(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):newAr(e.heading,e.pitch,e.roll)},Ar.equals=function(e,t){returne===t||n.defined(e)&&n.defined(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll},Ar.equalsEpsilon=function(e,t,r,i){returne===t||n.defined(e)&&n.defined(t)&&a.CesiumMath.equalsEpsilon(e.heading,t.heading,r,i)&&a.CesiumMath.equalsEpsilon(e.pitch,t.pitch,r,i)&&a.CesiumMath.equalsEpsilon(e.roll,t.roll,r,i)},Ar.prototype.clone=function(e){returnAr.clone(this,e)},Ar.prototype.equals=function(e){returnAr.equals(this,e)},Ar.prototype.equalsEpsilon=function(e,t,r){returnAr.equalsEpsilon(this,e,t,r)},Ar.prototype.toString=function(){return"("+this.heading+", "+this.pitch+", "+this.roll+")"};varOr,Ir,Rr,Pr=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;functionTr(e){return"undefined"==typeofdocument?e:(n.defined(Or)||(Or=document.createElement("a")),Or.href=e,Or.href=Or.href,Or.href)}functionqr(){returnn.defined(Ir)||(e="undefined"!=typeofCESIUM_BASE_URL?CESIUM_BASE_URL:"object"==typeofdefine&&n.defined(define.amd)&&!define.amd.toUrlUndefined&&n.defined(require.toUrl)?Tt("..",Dr("Core/buildModuleUrl.js")):function(){for(vare=document.getElementsByTagName("script"),t=0,r=e.length;t<r;++t){varn=e[t].getAttribute("src"),a=Pr.exec(n);if(null!==a)returna[1]}}(),(Ir=newfr({url:Tr(e)})).appendForwardSlash()),Ir;vare}functionzr(e){returnTr(require.toUrl("../"+e))}functionMr(e){returnqr().getDerivedResource({url:e}).url}functionDr(e){returnn.defined(Rr)||(Rr="object"==typeofdefine&&n.defined(define.amd)&&!define.amd.toUrlUndefined&&n.defined(require.toUrl)?zr:Mr),Rr(e)}functionUr(e,t,r){this.x=e,this.y=t,this.s=r}functionkr(e){e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT),this._xysFileUrlTemplate=fr.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=n.defaultValue(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=n.defaultValue(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=newSt(this._sampleZeroJulianEphemerisDate,0,ot.TAI),this._stepSizeDays=n.defaultValue(e.stepSizeDays,1),this._samplesPerXysFile=n.defaultValue(e.samplesPerXysFile,1e3),this._totalSamples=n.defaultValue(e.totalSamples,27426),this._samples=newArray(3*this._totalSamples),this._chunkDownloadsInProgress=[];for(vart=this._interpolationOrder,r=this._denominators=newArray(t+1),a=this._xTable=newArray(t+1),i=Math.pow(this._stepSizeDays,t),o=0;o<=t;++o){r[o]=i,a[o]=o*this._stepSizeDays;for(vars=0;s<=t;++s)s!==o&&(r[o]*=o-s);r[o]=1/r[o]}this._work=newArray(t+1),this._coef=newArray(t+1)}Dr._cesiumScriptRegex=Pr,Dr._buildModuleUrlFromBaseUrl=Mr,Dr._clearBaseResource=function(){Ir=void0},Dr.setBaseUrl=function(e){Ir=fr.DEFAULT.getDerivedResource({url:e})},Dr.getCesiumBaseUrl=qr;varFr=newSt(0,0,ot.TAI);functionNr(e,t,r){varn=Fr;returnn.dayNumber=t,n.secondsOfDay=r,St.daysDifference(n,e._sampleZeroDateTT)}functionjr(e,t){if(e._chunkDownloadsInProgress[t])returne._chunkDownloadsInProgress[t];varr,a=n.when.defer();e._chunkDownloadsInProgress[t]=a;vari=e._xysFileUrlTemplate;returnr=n.defined(i)?i.getDerivedResource({templateValues:{0:t}}):newfr({url:Dr("Assets/IAU2006_XYS/IAU2006_XYS_"+t+".json")}),n.when(r.fetchJson(),(function(r){e._chunkDownloadsInProgress[t]=!1;for(varn=e._samples,i=r.samples,o=t*e._samplesPerXysFile*3,s=0,u=i.length;s<u;++s)n[o+s]=i[s];a.resolve()})),a.promise}kr.prototype.preload=function(e,t,r,a){vari=Nr(this,e,t),o=Nr(this,r,a),s=i/this._stepSizeDays-this._interpolationOrder/2|0;s<0&&(s=0);varu=o/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;u>=this._totalSamples&&(u=this._totalSamples-1);for(varl=s/this._samplesPerXysFile|0,c=u/this._samplesPerXysFile|0,d=[],f=l;f<=c;++f)d.push(jr(this,f));returnn.when.all(d)},kr.prototype.computeXysRadians=function(e,t,r){vara=Nr(this,e,t);if(!(a<0)){vari=a/this._stepSizeDays|0;if(!(i>=this._totalSamples)){varo=this._interpolationOrder,s=i-(o/2|0);s<0&&(s=0);varu=s+o;u>=this._totalSamples&&(s=(u=this._totalSamples-1)-o)<0&&(s=0);varl=!1,c=this._samples;if(n.defined(c[3*s])||(jr(this,s/this._samplesPerXysFile|0),l=!0),n.defined(c[3*u])||(jr(this,u/this._samplesPerXysFile|0),l=!0),!l){n.defined(r)?(r.x=0,r.y=0,r.s=0):r=newUr(0,0,0);vard,f,p=a-s*this._stepSizeDays,h=this._work,m=this._denominators,g=this._coef,v=this._xTable;for(d=0;d<=o;++d)h[d]=p-v[d];for(d=0;d<=o;++d){for(g[d]=1,f=0;f<=o;++f)f!==d&&(g[d]*=h[f]);g[d]*=m[d];vary=3*(s+d);r.x+=g[d]*c[y++],r.y+=g[d]*c[y++],r.s+=g[d]*c[y]}returnr}}}};varBr={},Vr={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"}},Lr={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},Qr={},Wr={east:newt.Cartesian3,north:newt.Cartesian3,up:newt.Cartesian3,west:newt.Cartesian3,south:newt.Cartesian3,down:newt.Cartesian3},Hr=newt.Cartesian3,Yr=newt.Cartesian3,Zr=newt.Cartesian3;Br.localFrameToFixedFrameGenerator=function(e,i){if(!Vr.hasOwnProperty(e)||!Vr[e].hasOwnProperty(i))thrownewr.DeveloperError("firstAxis and secondAxis must be east, north, up, west, south or down.");varo,s=Vr[e][i],u=e+i;returnn.defined(Qr[u])?o=Qr[u]:(o=function(r,o,u){if(n.defined(u)||(u=newt.Matrix4),t.Cartesian3.equalsEpsilon(r,t.Cartesian3.ZERO,a.CesiumMath.EPSILON14))t.Cartesian3.unpack(Lr[e],0,Hr),t.Cartesian3.unpack(Lr[i],0,Yr),t.Cartesian3.unpack(Lr[s],0,Zr);elseif(a.CesiumMath.equalsEpsilon(r.x,0,a.CesiumMath.EPSILON14)&&a.CesiumMath.equalsEpsilon(r.y,0,a.CesiumMath.EPSILON14)){varl=a.CesiumMath.sign(r.z);t.Cartesian3.unpack(Lr[e],0,Hr),"east"!==e&&"west"!==e&&t.Cartesian3.multiplyByScalar(Hr,l,Hr),t.Cartesian3.unpack(Lr[i],0,Yr),"east"!==i&&"west"!==i&&t.Cartesian3.multiplyByScalar(Yr,l,Yr),t.Cartesian3.unpack(Lr[s],0,Zr),"east"!==s&&"west"!==s&&t.Cartesian3.multiplyByScalar(Zr,l,Zr)}else{(o=n.defaultValue(o,t.Ellipsoid.WGS84)).geodeticSurfaceNormal(r,Wr.up);varc=Wr.up,d=Wr.east;d.x=-r.y,d.y=r.x,d.z=0,t.Cartesian3.normalize(d,Wr.east),t.Cartesian3.cross(c,d,Wr.north),t.Cartesian3.multiplyByScalar(Wr.up,-1,Wr.down),t.Cartesian3.multiplyByScalar(Wr.east,-1,Wr.west),t.Cartesian3.multiplyByScalar(Wr.north,-1,Wr.south),Hr=Wr[e],Yr=Wr[i],Zr=Wr[s]}returnu[0]=Hr.x,u[1]=Hr.y,u[2]=Hr.z,u[3]=0,u[4]=Yr.x,u[5]=Yr.y,u[6]=Yr.z,u[7]=0,u[8]=Zr.x,u[9]=Zr.y,u[10]=Zr.z,u[11]=0,u[12]=r.x,u[13]=r.y,u[14]=r.z,u[15]=1,u},Qr[u]=o),o},Br.eastNorthUpToFixedFrame=Br.localFrameToFixedFrameGenerator("east","north"),Br.northEastDownToFixedFrame=Br.localFrameToFixedFrameGenerator("north","east"),Br.northUpEastToFixedFrame=Br.localFrameToFixedFrameGenerator("north","up"),Br.northWestUpToFixedFrame=Br.localFrameToFixedFrameGenerator("north","west");varGr=newSe,Jr=newt.Cartesian3(1,1,1),$r=newt.Matrix4;Br.headingPitchRollToFixedFrame=function(e,r,a,i,o){i=n.defaultValue(i,Br.eastNorthUpToFixedFrame);vars=Se.fromHeadingPitchRoll(r,Gr),u=t.Matrix4.fromTranslationQuaternionRotationScale(t.Cartesian3.ZERO,s,Jr,$r);returno=i(e,a,o),t.Matrix4.multiply(o,u,o)};varXr=newt.Matrix4,Kr=newt.Matrix3;Br.headingPitchRollQuaternion=function(e,r,n,a,i){varo=Br.headingPitchRollToFixedFrame(e,r,n,a,Xr),s=t.Matrix4.getMatrix3(o,Kr);returnSe.fromRotationMatrix(s,i)};varen=newt.Cartesian3(1,1,1),tn=newt.Cartesian3,rn=newt.Matrix4,nn=newt.Matrix4,an=newt.Matrix3,on=newSe;Br.fixedFrameToHeadingPitchRoll=function(e,r,a,i){r=n.defaultValue(r,t.Ellipsoid.WGS84),a=n.defaultValue(a,Br.eastNorthUpToFixedFrame),n.defined(i)||(i=newAr);varo=t.Matrix4.getTranslation(e,tn);if(t.Cartesian3.equals(o,t.Cartesian3.ZERO))returni.heading=0,i.pitch=0,i.roll=0,i;vars=t.Matrix4.inverseTransformation(a(o,r,rn),rn),u=t.Matrix4.setScale(e,en,nn);u=t.Matrix4.setTranslation(u,t.Cartesian3.ZERO,u),s=t.Matrix4.multiply(s,u,s);varl=Se.fromRotationMatrix(t.Matrix4.getMatrix3(s,an),on);returnl=Se.normalize(l,l),Ar.fromQuaternion(l,i)};varsn=a.CesiumMath.TWO_PI/86400,un=newSt;Br.computeTemeToPseudoFixedMatrix=function(e,r){vari,o=(un=St.addSeconds(e,-St.computeTaiMinusUtc(e),un)).dayNumber,s=un.secondsOfDay,u=o-2451545,l=(24110.54841+(i=s>=43200?(u+.5)/it.DAYS_PER_JULIAN_CENTURY:(u-.5)/it.DAYS_PER_JULIAN_CENTURY)*(8640184.812866+i*(.093104+-62e-7*i)))*sn%a.CesiumMath.TWO_PI+(72921158553e-15+11772758384668e-32*(o-2451545.5))*((s+.5*it.SECONDS_PER_DAY)%it.SECONDS_PER_DAY),c=Math.cos(l),d=Math.sin(l);returnn.defined(r)?(r[0]=c,r[1]=-d,r[2]=0,r[3]=d,r[4]=c,r[5]=0,r[6]=0,r[7]=0,r[8]=1,r):newt.Matrix3(c,d,0,-d,c,0,0,0,1)},Br.iau2006XysData=newkr,Br.earthOrientationParameters=Cr.NONE;varln=32.184;Br.preloadIcrfFixed=function(e){vart=e.start.dayNumber,r=e.start.secondsOfDay+ln,a=e.stop.dayNumber,i=e.stop.secondsOfDay+ln,o=Br.iau2006XysData.preload(t,r,a,i),s=Br.earthOrientationParameters.getPromiseToLoad();returnn.when.all([o,s])},Br.computeIcrfToFixedMatrix=function(e,r){n.defined(r)||(r=newt.Matrix3);vara=Br.computeFixedToIcrfMatrix(e,r);if(n.defined(a))returnt.Matrix3.transpose(a,r)};varcn=newUr(0,0,0),dn=newtt(0,0,0,0,0,0),fn=newt.Matrix3,pn=newt.Matrix3;Br.computeFixedToIcrfMatrix=function(e,r){n.defined(r)||(r=newt.Matrix3);vari=Br.earthOrientationParameters.compute(e,dn);if(n.defined(i)){varo=e.dayNumber,s=e.secondsOfDay+ln,u=Br.iau2006XysData.computeXysRadians(o,s,cn);if(n.defined(u)){varl=u.x+i.xPoleOffset,c=u.y+i.yPoleOffset,d=1/(1+Math.sqrt(1-l*l-c*c)),f=fn;f[0]=1-d*l*l,f[3]=-d*l*c,f[6]=l,f[1]=-d*l*c,f[4]=1-d*c*c,f[7]=c,f[2]=-l,f[5]=-c,f[8]=1-d*(l*l+c*c);varp=t.Matrix3.fromRotationZ(-u.s,pn),h=t.Matrix3.multiply(f,p,fn),m=e.dayNumber-2451545,g=(e.secondsOfDay-St.computeTaiMinusUtc(e)+i.ut1MinusUtc)/it.SECONDS_PER_DAY,v=.779057273264+g+.00273781191135448*(m+g);v=v%1*a.CesiumMath.TWO_PI;vary=t.Matrix3.fromRotationZ(v,pn),w=t.Matrix3.multiply(h,y,fn),C=Math.cos(i.xPoleWander),_=Math.cos(i.yPoleWander),b=Math.sin(i.xPoleWander),x=Math.sin(i.yPoleWander),S=o-2451545+s/it.SECONDS_PER_DAY,E=-47e-6*(S/=36525)*a.CesiumMath.RADIANS_PER_DEGREE/3600,A=Math.cos(E),O=Math.sin(E),I=pn;returnI[0]=C*A,I[1]=C*O,I[2]=b,I[3]=-_*O+x*b*A,I[4]=_*A+x*b*O,I[5]=-x*C,I[6]=-x*O-_*b*A,I[7]=x*A-_*b*O,I[8]=_*C,t.Matrix3.multiply(w,I,r)}}};varhn=newt.Cartesian4;Br.pointToWindowCoordinates=function(e,t,r,n){return(n=Br.pointToGLWindowCoordinates(e,t,r,n)).y=2*t[5]-n.y,n},Br.pointToGLWindowCoordinates=function(e,r,a,i){n.defined(i)||(i=newt.Cartesian2);varo=hn;returnt.Matrix4.multiplyByVector(e,t.Cartesian4.fromElements(a.x,a.y,a.z,1,o),o),t.Cartesian4.multiplyByScalar(o,1/o.w,o),t.Matrix4.multiplyByVector(r,o,o),t.Cartesian2.fromCartesian4(o,i)};varmn=newt.Cartesian3,gn=newt.Cartesian3,vn=newt.Cartesian3;Br.rotationMatrixFromPositionVelocity=function(e,r,i,o){vars=n.defaultValue(i,t.Ellipsoid.WGS84).geodeticSurfaceNormal(e,mn),u=t.Cartesian3.cross(r,s,gn);t.Cartesian3.equalsEpsilon(u,t.Cartesian3.ZERO,a.CesiumMath.EPSILON6)&&(u=t.Cartesian3.clone(t.Cartesian3.UNIT_X,u));varl=t.Cartesian3.cross(u,r,vn);returnt.Cartesian3.normalize(l,l),t.Cartesian3.cross(r,l,u),t.Cartesian3.negate(u,u),t.Cartesian3.normalize(u,u),n.defined(o)||(o=newt.Matrix3),o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=u.x,o[4]=u.y,o[5]=u.z,o[6]=l.x,o[7]=l.y,o[8]=l.z,o};varyn=newt.Matrix4(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),wn=newt.Cartographic,Cn=newt.Cartesian3,_n=newt.Cartesian3,bn=newt.Matrix3,xn=newt.Matrix4,Sn=newt.Matrix4;Br.basisTo2D=function(e,r,n){vara=t.Matrix4.getTranslation(r,_n),i=e.ellipsoid,o=i.cartesianToCartographic(a,wn),s=e.project(o,Cn);t.Cartesian3.fromElements(s.z,s.x,s.y,s);varu=Br.eastNorthUpToFixedFrame(a,i,xn),l=t.Matrix4.inverseTransformation(u,Sn),c=t.Matrix4.getMatrix3(r,bn),d=t.Matrix4.multiplyByMatrix3(l,c,n);returnt.Matrix4.multiply(yn,d,n),t.Matrix4.setTranslation(n,s,n),n},Br.wgs84To2DModelMatrix=function(e,r,n){vara=e.ellipsoid,i=Br.eastNorthUpToFixedFrame(r,a,xn),o=t.Matrix4.inverseTransformation(i,Sn),s=a.cartesianToCartographic(r,wn),u=e.project(s,Cn);t.Cartesian3.fromElements(u.z,u.x,u.y,u);varl=t.Matrix4.fromTranslation(u,xn);returnt.Matrix4.multiply(yn,o,n),t.Matrix4.multiply(l,n,n),n},e.BoundingSphere=l,e.FeatureDetection=xe,e.GeographicProjection=o,e.Intersect=s,e.Interval=u,e.Quaternion=Se,e.Resource=fr,e.Transforms=Br,e.buildModuleUrl=Dr}));