* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
*/
import{aasK}from"./chunk-FNJKWSPR.js";import{aasL}from"./chunk-FMRIJYNG.js";import{basv,casJ,dasZ}from"./chunk-BKSIEBAA.js";import{basB,hask}from"./chunk-YWRPWWKI.js";import{aast,basS,casI,dasG,easd}from"./chunk-JMSSU44E.js";import{aasg}from"./chunk-4UYSGV57.js";import{aasW}from"./chunk-VLPNAR64.js";import{aasb,basz}from"./chunk-GE5NEIZC.js";import{easp}from"./chunk-35CVRQTC.js";functionm(n,e){this.center=t.clone(W(n,t.ZERO)),this.halfAxes=d.clone(W(e,d.ZERO))}m.packedLength=t.packedLength+d.packedLength;m.pack=function(n,e,c){returnz.typeOf.object("value",n),z.defined("array",e),c=W(c,0),t.pack(n.center,e,c),d.pack(n.halfAxes,e,c+t.packedLength),e};m.unpack=function(n,e,c){returnz.defined("array",n),e=W(e,0),p(c)||(c=newm),t.unpack(n,e,c.center),d.unpack(n,e+t.packedLength,c.halfAxes),c};varCt=newt,ut=newt,Pt=newt,xt=newt,yt=newt,At=newt,Nt=newd,Mt={unitary:newd,diagonal:newd};m.fromPoints=function(n,e){if(p(e)||(e=newm),!p(n)||n.length===0)returne.halfAxes=d.ZERO,e.center=t.ZERO,e;letc,h=n.length,r=t.clone(n[0],Ct);for(c=1;c<h;c++)t.add(r,n[c],r);leto=1/h;t.multiplyByScalar(r,o,r);leti=0,C=0,w=0,l=0,u=0,a=0,s;for(c=0;c<h;c++)s=t.subtract(n[c],r,ut),i+=s.x*s.x,C+=s.x*s.y,w+=s.x*s.z,l+=s.y*s.y,u+=s.y*s.z,a+=s.z*s.z;i*=o,C*=o,w*=o,l*=o,u*=o,a*=o;letf=Nt;f[0]=i,f[1]=C,f[2]=w,f[3]=C,f[4]=l,f[5]=u,f[6]=w,f[7]=u,f[8]=a;letA=d.computeEigenDecomposition(f,Mt),M=d.clone(A.unitary,e.halfAxes),x=d.getColumn(M,0,xt),y=d.getColumn(M,1,yt),N=d.getColumn(M,2,At),P=-Number.MAX_VALUE,O=-Number.MAX_VALUE,U=-Number.MAX_VALUE,q=Number.MAX_VALUE,R=Number.MAX_VALUE,j=Number.MAX_VALUE;for(c=0;c<h;c++)s=n[c],P=Math.max(t.dot(x,s),P),O=Math.max(t.dot(y,s),O),U=Math.max(t.dot(N,s),U),q=Math.min(t.dot(x,s),q),R=Math.min(t.dot(y,s),R),j=Math.min(t.dot(N,s),j);x=t.multiplyByScalar(x,.5*(q+P),x),y=t.multiplyByScalar(y,.5*(R+O),y),N=t.multiplyByScalar(N,.5*(j+U),N);letT=t.add(x,y,e.center);t.add(T,N,T);letE=Pt;returnE.x=P-q,E.y=O-R,E.z=U-j,t.multiplyByScalar(E,.5,E),d.multiplyByScale(e.halfAxes,E,e.halfAxes),e};varnt=newt,Ot=newt;functionQ(n,e,c,h,r,o,i,C,w,l,u){if(!p(r)||!p(o)||!p(i)||!p(C)||!p(w)||!p(l))thrownewb("all extents (minimum/maximum X/Y/Z) are required.");p(u)||(u=newm);leta=u.halfAxes;d.setColumn(a,0,e,a),d.setColumn(a,1,c,a),d.setColumn(a,2,h,a);lets=nt;s.x=(r+o)/2,s.y=(i+C)/2,s.z=(w+l)/2;letf=Ot;f.x=(o-r)/2,f.y=(C-i)/2,f.z=(l-w)/2;letA=u.center;returns=d.multiplyByVector(a,s,s),t.add(n,s,A),d.multiplyByScale(a,f,a),u}var$=newS,bt=newt,Tt=newS,St=newS,gt=newS,Et=newS,Rt=newS,Wt=newt,H=newt,zt=newt,tt=newt,It=newt,Lt=newI,Ut=newI,qt=newI,jt=newI,Bt=newI,vt=newt,Vt=newt,_t=newt,Dt=newt,Xt=newI,kt=newt,Zt=newt,Yt=newt,Ft=newL(t.UNIT_X,0);m.fromRectangle=function(n,e,c,h,r){if(!p(n))thrownewb("rectangle is required");if(n.width<0||n.width>g.TWO_PI)thrownewb("Rectangle width must be between 0 and 2 * pi");if(n.height<0||n.height>g.PI)thrownewb("Rectangle height must be between 0 and pi");if(p(h)&&!g.equalsEpsilon(h.radii.x,h.radii.y,g.EPSILON15))thrownewb("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");e=W(e,0),c=W(c,0),h=W(h,G.default);leto,i,C,w,l,u,a;if(n.width<=g.PI){letR=k.center(n,$),j=h.cartographicToCartesian(R,bt),T=newK(j,h);a=T.plane;letE=R.longitude,ot=n.south<0&&n.north>0?0:R.latitude,st=S.fromRadians(E,n.north,c,Tt),V=S.fromRadians(n.west,n.north,c,St),it=S.fromRadians(n.west,ot,c,gt),_=S.fromRadians(n.west,n.south,c,Et),ht=S.fromRadians(E,n.south,c,Rt),ft=h.cartographicToCartesian(st,Wt),D=h.cartographicToCartesian(V,H),dt=h.cartographicToCartesian(it,zt),X=h.cartographicToCartesian(_,tt),mt=h.cartographicToCartesian(ht,It),wt=T.projectPointToNearestOnPlane(ft,Lt),Y=T.projectPointToNearestOnPlane(D,Ut),lt=T.projectPointToNearestOnPlane(dt,qt),F=T.projectPointToNearestOnPlane(X,jt),pt=T.projectPointToNearestOnPlane(mt,Bt);returno=Math.min(Y.x,lt.x,F.x),i=-o,w=Math.max(Y.y,wt.y),C=Math.min(F.y,pt.y),V.height=_.height=e,D=h.cartographicToCartesian(V,H),X=h.cartographicToCartesian(_,tt),l=Math.min(L.getPointDistance(a,D),L.getPointDistance(a,X)),u=c,Q(T.origin,T.xAxis,T.yAxis,T.zAxis,o,i,C,w,l,u,r)}lets=n.south>0,f=n.north<0,A=s?n.south:f?n.north:0,M=k.center(n,$).longitude,x=t.fromRadians(M,A,c,h,vt);x.z=0;letN=Math.abs(x.x)<g.EPSILON10&&Math.abs(x.y)<g.EPSILON10?t.UNIT_X:t.normalize(x,Vt),P=t.UNIT_Z,O=t.cross(N,P,_t);a=L.fromPointNormal(x,N,Ft);letU=t.fromRadians(M+g.PI_OVER_TWO,A,c,h,Dt);i=t.dot(L.projectPointOntoPlane(a,U,Xt),O),o=-i,w=t.fromRadians(0,n.north,f?e:c,h,kt).z,C=t.fromRadians(0,n.south,s?e:c,h,Zt).z;letq=t.fromRadians(n.east,A,c,h,Yt);returnl=L.getPointDistance(a,q),u=0,Q(x,O,P,N,o,i,C,w,l,u,r)};m.fromTransformation=function(n,e){returnz.typeOf.object("transformation",n),p(e)||(e=newm),e.center=B.getTranslation(n,e.center),e.halfAxes=B.getMatrix3(n,e.halfAxes),e.halfAxes=d.multiplyByScalar(e.halfAxes,.5,e.halfAxes),e};m.clone=function(n,e){if(p(n))returnp(e)?(t.clone(n.center,e.center),d.clone(n.halfAxes,e.halfAxes),e):newm(n.center,n.halfAxes)};m.intersectPlane=function(n,e){if(!p(n))thrownewb("box is required.");if(!p(e))thrownewb("plane is required.");letc=n.center,h=e.normal,r=n.halfAxes,o=h.x,i=h.y,C=h.z,w=Math.abs(o*r[d.COLUMN0ROW0]+i*r[d.COLUMN0ROW1]+C*r[d.COLUMN0ROW2])+Math.abs(o*r[d.COLUMN1ROW0]+i*r[d.COLUMN1ROW1]+C*r[d.COLUMN1ROW2])+Math.abs(o*r[d.COLUMN2ROW0]+i*r[d.COLUMN2ROW1]+C*r[d.COLUMN2ROW2]),l=t.dot(h,c)+e.distance;returnl<=-w?v.OUTSIDE:l>=w?v.INSIDE:v.INTERSECTING};varat=newt,ct=newt,rt=newt,Gt=newt,et=newt,Jt=newt;m.distanceSquaredTo=function(n,e){if(!p(n))thrownewb("box is required.");if(!p(e))thrownewb("cartesian is required.");letc=t.subtract(e,n.center,nt),h=n.halfAxes,r=d.getColumn(h,0,at),o=d.getColumn(h,1,ct),i=d.getColumn(h,2,rt),C=t.magnitude(r),w=t.magnitude(o),l=t.magnitude(i),u=!0,a=!0,s=!0;C>0?t.divideByScalar(r,C,r):u=!1,w>0?t.divideByScalar(o,w,o):a=!1,l>0?t.divideByScalar(i,l,i):s=!1;letf=!u+!a+!s,A,M,x;if(f===1){letO=r;A=o,M=i,a?s||(O=i,M=r):(O=o,A=r),x=t.cross(A,M,et),O===r?r=x:O===o?o=x:O===i&&(i=x)}elseif(f===2){A=r,a?A=o:s&&(A=i);letO=t.UNIT_Y;O.equalsEpsilon(A,g.EPSILON3)&&(O=t.UNIT_X),M=t.cross(A,O,Gt),t.normalize(M,M),x=t.cross(A,M,et),t.normalize(x,x),A===r?(o=M,i=x):A===o?(i=M,r=x):A===i&&(r=M,o=x)}elsef===3&&(r=t.UNIT_X,o=t.UNIT_Y,i=t.UNIT_Z);lety=Jt;y.x=t.dot(c,r),y.y=t.dot(c,o),y.z=t.dot(c,i);letN=0,P;returny.x<-C?(P=y.x+C,N+=P*P):y.x>C&&(P=y.x-C,N+=P*P),y.y<-w?(P=y.y+w,N+=P*P):y.y>w&&(P=y.y-w,N+=P*P),y.z<-l?(P=y.z+l,N+=P*P):y.z>l&&(P=y.z-l,N+=P*P),N};varKt=newt,Qt=newt;m.computePlaneDistances=function(n,e,c,h){if(!p(n))thrownewb("box is required.");if(!p(e))thrownewb("position is required.");if(!p(c))thrownewb("direction is required.");p(h)||(h=newJ);letr=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=n.center,C=n.halfAxes,w=d.getColumn(C,0,at),l=d.getColumn(C,1,ct),u=d.getColumn(C,2,rt),a=t.add(w,l,Kt);t.add(a,u,a),t.add(a,i,a);lets=t.subtract(a,e,Qt),f=t.dot(c,s);returnr=Math.min(f,r),o=Math.max(f,o),t.add(i,w,a),t.add(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.add(i,w,a),t.subtract(a,l,a),t.add(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.add(i,w,a),t.subtract(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,w,a),t.add(a,l,a),t.add(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,w,a),t.add(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,w,a),t.subtract(a,l,a),t.add(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,w,a),t.subtract(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),h.start=r,h.stop=o,h};var$t=newt,Ht=newt,te=newt;m.computeCorners=function(n,e){z.typeOf.object("box",n),p(e)||(e=[newt,newt,newt,newt,newt,newt,newt,newt]);letc=n.center,h=n.halfAxes,r=d.getColumn(h,0,$t),o=d.getColumn(h,1,Ht),i=d.getColumn(h,2,te);returnt.clone(c,e[0]),t.subtract(e[0],r,e[0]),t.subtract(e[0],o,e[0]),t.subtract(e[0],i,e[0]),t.clone(c,e[1]),t.subtract(e[1],r,e[1]),t.subtract(e[1],o,e[1]),t.add(e[1],i,e[1]),t.clone(c,e[2]),t.subtract(e[2],r,e[2]),t.add(e[2],o,e[2]),t.subtract(e[2],i,e[2]),t.clone(c,e[3]),t.subtract(e[3],r,e[3]),t.add(e[3],o,e[3]),t.add(e[3],i,e[3]),t.clone(c,e[4]),t.add(e[4],r,e[4]),t.subtract(e[4],o,e[4]),t.subtract(e[4],i,e[4]),t.clone(c,e[5]),t.add(e[5],r,e[5]),t.subtract(e[5],o,e[5]),t.add(e[5],i,e[5]),t.clone(c,e[6]),t.add(e[6],r,e[6]),t.add(e[6],o,e[6]),t.subtract(e[6],i,e[6]),t.clone(c,e[7]),t.add(e[7],r,e[7]),t.add(e[7],o,e[7]),t.add(e[7],i,e[7]),e};varee=newd;m.computeTransformation=function(n,e){z.typeOf.object("box",n),p(e)||(e=newB);letc=n.center,h=d.multiplyByUniformScale(n.halfAxes,2,ee);returnB.fromRotationTranslation(h,c,e)};varne=newZ;m.isOccluded=function(n,e){if(!p(n))thrownewb("box is required.");if(!p(e))thrownewb("occluder is required.");letc=Z.fromOrientedBoundingBox(n,ne);return!e.isBoundingSphereVisible(c)};m.prototype.intersectPlane=function(n){returnm.intersectPlane(this,n)};m.prototype.distanceSquaredTo=function(n){returnm.distanceSquaredTo(this,n)};m.prototype.computePlaneDistances=function(n,e,c){returnm.computePlaneDistances(this,n,e,c)};m.prototype.computeCorners=function(n){returnm.computeCorners(this,n)};m.prototype.computeTransformation=function(n){returnm.computeTransformation(this,n)};m.prototype.isOccluded=function(n){returnm.isOccluded(this,n)};m.equals=function(n,e){returnn===e||p(n)&&p(e)&&t.equals(n.center,e.center)&&d.equals(n.halfAxes,e.halfAxes)};m.prototype.clone=function(n){returnm.clone(this,n)};m.prototype.equals=function(n){returnm.equals(this,n)};varye=m;export{yeasa};
${o}`),n}vari=c;functionl(t){asyncfunctionn({data:e}){leto=[],s={id:e.id,result:void0,error:void0};self.CESIUM_BASE_URL=e.baseUrl;try{letr=awaitt(e.parameters,o);s.result=r}catch(r){rinstanceofError?s.error={name:r.name,message:r.message,stack:r.stack}:s.error=r}e.canTransferArrayBuffer||(o.length=0);try{postMessage(s,o)}catch(r){s.result=void0,s.error=`postMessage failed with error: ${i(r)}
with responseMessage: ${JSON.stringify(s)}`,postMessage(s)}}functiona(e){postMessage({id:e.data?.id,error:`postMessage failed with error: ${JSON.stringify(e)}`})}returnself.onmessage=n,self.onmessageerror=a,self}vard=l;export{dasa};
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
*/
import{aasc,basp,dasf}from"./chunk-JMSSU44E.js";import{aasd}from"./chunk-4UYSGV57.js";import{aasu}from"./chunk-VLPNAR64.js";import{aass}from"./chunk-GE5NEIZC.js";import{easa}from"./chunk-35CVRQTC.js";functione(t){this._ellipsoid=u(t,f.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(e.prototype,{ellipsoid:{get:function(){returnthis._ellipsoid}}});e.mercatorAngleToGeodeticLatitude=function(t){returnd.PI_OVER_TWO-2*Math.atan(Math.exp(-t))};e.geodeticLatitudeToMercatorAngle=function(t){t>e.MaximumLatitude?t=e.MaximumLatitude:t<-e.MaximumLatitude&&(t=-e.MaximumLatitude);leti=Math.sin(t);return.5*Math.log((1+i)/(1-i))};e.MaximumLatitude=e.mercatorAngleToGeodeticLatitude(Math.PI);e.prototype.project=function(t,i){leto=this._semimajorAxis,r=t.longitude*o,n=e.geodeticLatitudeToMercatorAngle(t.latitude)*o,m=t.height;returna(i)?(i.x=r,i.y=n,i.z=m,i):newc(r,n,m)};e.prototype.unproject=function(t,i){if(!a(t))thrownews("cartesian is required");leto=this._oneOverSemimajorAxis,r=t.x*o,n=e.mercatorAngleToGeodeticLatitude(t.y*o),m=t.z;returna(i)?(i.longitude=r,i.latitude=n,i.height=m,i):newp(r,n,m)};varL=e;export{Lasa};
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
*/
import{casZ}from"./chunk-BKSIEBAA.js";import{aaso,basft,easb}from"./chunk-JMSSU44E.js";import{aasR}from"./chunk-4UYSGV57.js";import{aasH}from"./chunk-VLPNAR64.js";import{aasw,baset}from"./chunk-GE5NEIZC.js";import{easg}from"./chunk-35CVRQTC.js";varnt={};nt.computeDiscriminant=function(t,e,r){if(typeoft!="number")throwneww("a is a required number.");if(typeofe!="number")throwneww("b is a required number.");if(typeofr!="number")throwneww("c is a required number.");returne*e-4*t*r};functionmt(t,e,r){letn=t+e;returnR.sign(t)!==R.sign(e)&&Math.abs(n/Math.max(Math.abs(t),Math.abs(e)))<r?0:n}nt.computeRealRoots=function(t,e,r){if(typeoft!="number")throwneww("a is a required number.");if(typeofe!="number")throwneww("b is a required number.");if(typeofr!="number")throwneww("c is a required number.");letn;if(t===0)returne===0?[]:[-r/e];if(e===0){if(r===0)return[0,0];leta=Math.abs(r),f=Math.abs(t);if(a<f&&a/f<R.EPSILON14)return[0,0];if(a>f&&f/a<R.EPSILON14)return[];if(n=-r/t,n<0)return[];letl=Math.sqrt(n);return[-l,l]}elseif(r===0)returnn=-e/t,n<0?[n,0]:[0,n];leti=e*e,c=4*t*r,s=mt(i,-c,R.EPSILON14);if(s<0)return[];letu=-.5*mt(e,R.sign(e)*Math.sqrt(s),R.EPSILON14);returne>0?[u/t,r/u]:[r/u,u/t]};varT=nt;varot={};ot.computeDiscriminant=function(t,e,r,n){if(typeoft!="number")throwneww("a is a required number.");if(typeofe!="number")throwneww("b is a required number.");if(typeofr!="number")throwneww("c is a required number.");if(typeofn!="number")throwneww("d is a required number.");leti=t*t,c=e*e,s=r*r,u=n*n;return18*t*e*r*n+c*s-27*i*u-4*(t*s*r+c*e*n)};functionrt(t,e,r,n){leti=t,c=e/3,s=r/3,u=n,a=i*s,f=c*u,l=c*c,d=s*s,p=i*s-l,q=i*u-c*s,m=c*u-d,h=4*p*m-q*q,E,D;if(h<0){letX,k,G;l*f>=a*d?(X=i,k=p,G=-2*c*p+i*q):(X=u,k=m,G=-u*q+2*s*m);letat=-(G<0?-1:1)*Math.abs(X)*Math.sqrt(-h);D=-G+at;let$=D/2,j=$<0?-Math.pow(-$,1/3):Math.pow($,1/3),tt=D===at?-j:-k/j;returnE=k<=0?j+tt:-G/(j*j+tt*tt+k),l*f>=a*d?[(E-c)/i]:[-u/(E+s)]}letW=p,V=-2*c*p+i*q,L=m,B=-u*q+2*s*m,I=Math.sqrt(h),C=Math.sqrt(3)/2,P=Math.abs(Math.atan2(i*I,-V)/3);E=2*Math.sqrt(-W);lety=Math.cos(P);D=E*y;letS=E*(-y/2-C*Math.sin(P)),M=D+S>2*c?D-c:S-c,N=i,x=M/N;P=Math.abs(Math.atan2(u*I,-B)/3),E=2*Math.sqrt(-L),y=Math.cos(P),D=E*y,S=E*(-y/2-C*Math.sin(P));let_=-u,A=D+S<2*s?D+s:S+s,v=_/A,yt=N*A,ut=-M*A-N*_,bt=M*_,U=(s*ut-c*bt)/(-c*ut+s*yt);returnx<=U?x<=v?U<=v?[x,U,v]:[x,v,U]:[v,x,U]:x<=v?[U,x,v]:U<=v?[U,v,x]:[v,U,x]}ot.computeRealRoots=function(t,e,r,n){if(typeoft!="number")throwneww("a is a required number.");if(typeofe!="number")throwneww("b is a required number.");if(typeofr!="number")throwneww("c is a required number.");if(typeofn!="number")throwneww("d is a required number.");leti,c;if(t===0)returnT.computeRealRoots(e,r,n);if(e===0){if(r===0){if(n===0)return[0,0,0];c=-n/t;lets=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3);return[s,s,s]}elseif(n===0)returni=T.computeRealRoots(t,0,r),i.Length===0?[0]:[i[0],0,i[1]];returnrt(t,0,r,n)}else{if(r===0)returnn===0?(c=-e/t,c<0?[c,0,0]:[0,0,c]):rt(t,e,0,n);if(n===0)returni=T.computeRealRoots(t,e,r),i.length===0?[0]:i[1]<=0?[i[0],i[1],0]:i[0]>=0?[0,i[0],i[1]]:[i[0],0,i[1]]}returnrt(t,e,r,n)};varF=ot;varit={};it.computeDiscriminant=function(t,e,r,n,i){if(typeoft!="number")throwneww("a is a required number.");if(typeofe!="number")throwneww("b is a required number.");if(typeofr!="number")throwneww("c is a required number.");if(typeofn!="number")throwneww("d is a required number.");if(typeofi!="number")throwneww("e is a required number.");letc=t*t,s=c*t,u=e*e,a=u*e,f=r*r,l=f*r,d=n*n,p=d*n,q=i*i,m=q*i;returnu*f*d-4*a*p-4*t*l*d+18*t*e*r*p-27*c*d*d+256*s*m+i*(18*a*r*n-4*u*l+16*t*f*f-80*t*e*f*n-6*t*u*d+144*c*r*d)+q*(144*t*u*r-27*u*u-128*c*f-192*c*e*n)};functionz(t,e,r,n){leti=t*t,c=e-3*i/8,s=r-e*t/2+i*t/8,u=n-r*t/4+e*i/16-3*i*i/256,a=F.computeRealRoots(1,2*c,c*c-4*u,-s*s);if(a.length>0){letf=-t/4,l=a[a.length-1];if(Math.abs(l)<R.EPSILON14){letd=T.computeRealRoots(1,c,u);if(d.length===2){letp=d[0],q=d[1],m;if(p>=0&&q>=0){leth=Math.sqrt(p),E=Math.sqrt(q);return[f-E,f-h,f+h,f+E]}else{if(p>=0&&q<0)returnm=Math.sqrt(p),[f-m,f+m];if(p<0&&q>=0)returnm=Math.sqrt(q),[f-m,f+m]}}return[]}elseif(l>0){letd=Math.sqrt(l),p=(c+l-s/d)/2,q=(c+l+s/d)/2,m=T.computeRealRoots(1,d,p),h=T.computeRealRoots(1,-d,q);returnm.length!==0?(m[0]+=f,m[1]+=f,h.length!==0?(h[0]+=f,h[1]+=f,m[1]<=h[0]?[m[0],m[1],h[0],h[1]]:h[1]<=m[0]?[h[0],h[1],m[0],m[1]]:m[0]>=h[0]&&m[1]<=h[1]?[h[0],m[0],m[1],h[1]]:h[0]>=m[0]&&h[1]<=m[1]?[m[0],h[0],h[1],m[1]]:m[0]>h[0]&&m[0]<h[1]?[h[0],m[0],h[1],m[1]]:[m[0],h[0],m[1],h[1]]):m):h.length!==0?(h[0]+=f,h[1]+=f,h):[]}}return[]}functionY(t,e,r,n){leti=r*r,c=e*e,s=t*t,u=-2*e,a=r*t+c-4*n,f=s*n-r*e*t+i,l=F.computeRealRoots(1,u,a,f);if(l.length>0){letd=l[0],p=e-d,q=p*p,m=t/2,h=p/2,E=q-4*n,D=q+4*Math.abs(n),W=s-4*d,V=s+4*Math.abs(d),L,B;if(d<0||E*V<W*D){letN=Math.sqrt(W);L=N/2,B=N===0?0:(t*h-r)/N}else{letN=Math.sqrt(E);L=N===0?0:(t*h-r)/N,B=N/2}letI,C;m===0&&L===0?(I=0,C=0):R.sign(m)===R.sign(L)?(I=m+L,C=d/I):(C=m-L,I=d/C);letP,y;h===0&&B===0?(P=0,y=0):R.sign(h)===R.sign(B)?(P=h+B,y=n/P):(y=h-B,P=n/y);letS=T.computeRealRoots(1,I,P),M=T.computeRealRoots(1,C,y);if(S.length!==0)returnM.length!==0?S[1]<=M[0]?[S[0],S[1],M[0],M[1]]:M[1]<=S[0]?[M[0],M[1],S[0],S[1]]:S[0]>=M[0]&&S[1]<=M[1]?[M[0],S[0],S[1],M[1]]:M[0]>=S[0]&&M[1]<=S[1]?[S[0],M[0],M[1],S[1]]:S[0]>M[0]&&S[0]<M[1]?[M[0],S[0],M[1],S[1]]:[S[0],M[0],S[1],M[1]]:S;if(M.length!==0)returnM}return[]}it.computeRealRoots=function(t,e,r,n,i){if(typeoft!="number")throwneww("a is a required number.");if(typeofe!="number")throwneww("b is a required number.");if(typeofr!="number")throwneww("c is a required number.");if(typeofn!="number")throwneww("d is a required number.");if(typeofi!="number")throwneww("e is a required number.");if(Math.abs(t)<R.EPSILON15)returnF.computeRealRoots(e,r,n,i);letc=e/t,s=r/t,u=n/t,a=i/t,f=c<0?1:0;switch(f+=s<0?f+1:f,f+=u<0?f+1:f,f+=a<0?f+1:f,f){case0:returnz(c,s,u,a);case1:returnY(c,s,u,a);case2:returnY(c,s,u,a);case3:returnz(c,s,u,a);case4:returnz(c,s,u,a);case5:returnY(c,s,u,a);case6:returnz(c,s,u,a);case7:returnz(c,s,u,a);case8:returnY(c,s,u,a);case9:returnz(c,s,u,a);case10:returnz(c,s,u,a);case11:returnY(c,s,u,a);case12:returnz(c,s,u,a);case13:returnz(c,s,u,a);case14:returnz(c,s,u,a);case15:returnz(c,s,u,a);default:return}};vardt=it;functionJ(t,e){e=o.clone(H(e,o.ZERO)),o.equals(e,o.ZERO)||o.normalize(e,e),this.origin=o.clone(H(t,o.ZERO)),this.direction=e}J.clone=function(t,e){if(g(t))returng(e)?(e.origin=o.clone(t.origin),e.direction=o.clone(t.direction),e):newJ(t.origin,t.direction)};J.getPoint=function(t,e,r){returnet.typeOf.object("ray",t),et.typeOf.number("t",e),g(r)||(r=newo),r=o.multiplyByScalar(t.direction,e,r),o.add(t.origin,r,r)};varst=J;varO={};O.rayPlane=function(t,e,r){if(!g(t))throwneww("ray is required.");if(!g(e))throwneww("plane is required.");g(r)||(r=newo);letn=t.origin,i=t.direction,c=e.normal,s=o.dot(c,i);if(Math.abs(s)<R.EPSILON15)return;letu=(-e.distance-o.dot(c,n))/s;if(!(u<0))returnr=o.multiplyByScalar(i,u,r),o.add(n,r,r)};varOt=newo,Pt=newo,Mt=newo,lt=newo,ht=newo;O.rayTriangleParametric=function(t,e,r,n,i){if(!g(t))throwneww("ray is required.");if(!g(e))throwneww("p0 is required.");if(!g(r))throwneww("p1 is required.");if(!g(n))throwneww("p2 is required.");i=H(i,!1);letc=t.origin,s=t.direction,u=o.subtract(r,e,Ot),a=o.subtract(n,e,Pt),f=o.cross(s,a,Mt),l=o.dot(u,f),d,p,q,m,h;if(i){if(l<R.EPSILON6||(d=o.subtract(c,e,lt),q=o.dot(d,f),q<0||q>l)||(p=o.cross(d,u,ht),m=o.dot(s,p),m<0||q+m>l))return;h=o.dot(a,p)/l}else{if(Math.abs(l)<R.EPSILON6)return;letE=1/l;if(d=o.subtract(c,e,lt),q=o.dot(d,f)*E,q<0||q>1||(p=o.cross(d,u,ht),m=o.dot(s,p)*E,m<0||q+m>1))return;h=o.dot(a,p)*E}returnh};O.rayTriangle=function(t,e,r,n,i,c){lets=O.rayTriangleParametric(t,e,r,n,i);if(!(!g(s)||s<0))returng(c)||(c=newo),o.multiplyByScalar(t.direction,s,c),o.add(t.origin,c,c)};varEt=newst;O.lineSegmentTriangle=function(t,e,r,n,i,c,s){if(!g(t))throwneww("v0 is required.");if(!g(e))throwneww("v1 is required.");if(!g(r))throwneww("p0 is required.");if(!g(n))throwneww("p1 is required.");if(!g(i))throwneww("p2 is required.");letu=Et;o.clone(t,u.origin),o.subtract(e,t,u.direction),o.normalize(u.direction,u.direction);leta=O.rayTriangleParametric(u,r,n,i,c);if(!(!g(a)||a<0||a>o.distance(t,e)))returng(s)||(s=newo),o.multiplyByScalar(u.direction,a,s),o.add(u.origin,s,s)};functionCt(t,e,r,n){leti=e*e-4*t*r;if(i<0)return;if(i>0){lets=1/(2*t),u=Math.sqrt(i),a=(-e+u)*s,f=(-e-u)*s;returna<f?(n.root0=a,n.root1=f):(n.root0=f,n.root1=a),n}letc=-e/(2*t);if(c!==0)returnn.root0=n.root1=c,n}varNt={root0:0,root1:0};functionRt(t,e,r){g(r)||(r=newZ);letn=t.origin,i=t.direction,c=e.center,s=e.radius*e.radius,u=o.subtract(n,c,Mt),a=o.dot(i,i),f=2*o.dot(i,u),l=o.magnitudeSquared(u)-s,d=Ct(a,f,l,Nt);if(g(d))returnr.start=d.root0,r.stop=d.root1,r}O.raySphere=function(t,e,r){if(!g(t))throwneww("ray is required.");if(!g(e))throwneww("sphere is required.");if(r=Rt(t,e,r),!(!g(r)||r.stop<0))returnr.start=Math.max(r.start,0),r};varLt=newst;O.lineSegmentSphere=function(t,e,r,n){if(!g(t))throwneww("p0 is required.");if(!g(e))throwneww("p1 is required.");if(!g(r))throwneww("sphere is required.");leti=Lt;o.clone(t,i.origin);letc=o.subtract(e,t,i.direction),s=o.magnitude(c);if(o.normalize(c,c),n=Rt(i,r,n),!(!g(n)||n.stop<0||n.start>s))returnn.start=Math.max(n.start,0),n.stop=Math.min(n.stop,s),n};varIt=newo,Dt=newo;O.rayEllipsoid=function(t,e){if(!g(t))throwneww("ray is required.");if(!g(e))throwneww("ellipsoid is required.");letr=e.oneOverRadii,n=o.multiplyComponents(r,t.origin,It),i=o.multiplyComponents(r,t.direction,Dt),c=o.magnitudeSquared(n),s=o.dot(n,i),u,a,f,l,d;if(c>1){if(s>=0)return;letp=s*s;if(u=c-1,a=o.magnitudeSquared(i),f=a*u,p<f)return;if(p>f){l=s*s-f,d=-s+Math.sqrt(l);letm=d/a,h=u/d;returnm<h?newZ(m,h):{start:h,stop:m}}letq=Math.sqrt(u/a);returnnewZ(q,q)}elseif(c<1)returnu=c-1,a=o.magnitudeSquared(i),f=a*u,l=s*s-f,d=-s+Math.sqrt(l),newZ(0,d/a);if(s<0)returna=o.magnitudeSquared(i),newZ(0,-s/a)};functionQ(t,e,r){letn=t+e;returnR.sign(t)!==R.sign(e)&&Math.abs(n/Math.max(Math.abs(t),Math.abs(e)))<r?0:n}O.quadraticVectorExpression=function(t,e,r,n,i){letc=n*n,s=i*i,u=(t[b.COLUMN1ROW1]-t[b.COLUMN2ROW2])*s,a=i*(n*Q(t[b.COLUMN1ROW0],t[b.COLUMN0ROW1],R.EPSILON15)+e.y),f=t[b.COLUMN0ROW0]*c+t[b.COLUMN2ROW2]*s+n*e.x+r,l=s*Q(t[b.COLUMN2ROW1],t[b.COLUMN1ROW2],R.EPSILON15),d=i*(n*Q(t[b.COLUMN2ROW0],t[b.COLUMN0ROW2])+e.z),p,q=[];if(d===0&&l===0){if(p=T.computeRealRoots(u,a,f),p.length===0)returnq;letP=p[0],y=Math.sqrt(Math.max(1-P*P,0));if(q.push(newo(n,i*P,i*-y)),q.push(newo(n,i*P,i*y)),p.length===2){letS=p[1],M=Math.sqrt(Math.max(1-S*S,0));q.push(newo(n,i*S,i*-M)),q.push(newo(n,i*S,i*M))}returnq}letm=d*d,h=l*l,E=u*u,D=d*l,W=E+h,V=2*(a*u+D),L=2*f*u+a*a-h+m,B=2*(f*a-D),I=f*f-m;if(W===0&&V===0&&L===0&&B===0)returnq;p=dt.computeRealRoots(W,V,L,B,I);letC=p.length;if(C===0)returnq;for(letP=0;P<C;++P){lety=p[P],S=y*y,M=Math.max(1-S,0),N=Math.sqrt(M),x;R.sign(u)===R.sign(f)?x=Q(u*S+f,a*y,R.EPSILON12):R.sign(f)===R.sign(a*y)?x=Q(u*S,a*y+f,R.EPSILON12):x=Q(u*S+a*y,f,R.EPSILON12);let_=Q(l*y,d,R.EPSILON15),A=x*_;A<0?q.push(newo(n,i*y,i*N)):A>0?q.push(newo(n,i*y,i*-N)):N!==0?(q.push(newo(n,i*y,i*-N)),q.push(newo(n,i*y,i*N)),++P):q.push(newo(n,i*y,i*N))}returnq};varct=newo,wt=newo,qt=newo,K=newo,Bt=newo,xt=newb,Tt=newb,zt=newb,Wt=newb,Vt=newb,gt=newb,pt=newb,St=newo,vt=newo,Ut=newft;O.grazingAltitudeLocation=function(t,e){if(!g(t))throwneww("ray is required.");if(!g(e))throwneww("ellipsoid is required.");letr=t.origin,n=t.direction;if(!o.equals(r,o.ZERO)){letI=e.geodeticSurfaceNormal(r,ct);if(o.dot(n,I)>=0)returnr}leti=g(this.rayEllipsoid(t,e)),c=e.transformPositionToScaledSpace(n,ct),s=o.normalize(c,c),u=o.mostOrthogonalAxis(c,K),a=o.normalize(o.cross(u,s,wt),wt),f=o.normalize(o.cross(s,a,qt),qt),l=xt;l[0]=s.x,l[1]=s.y,l[2]=s.z,l[3]=a.x,l[4]=a.y,l[5]=a.z,l[6]=f.x,l[7]=f.y,l[8]=f.z;letd=b.transpose(l,Tt),p=b.fromScale(e.radii,zt),q=b.fromScale(e.oneOverRadii,Wt),m=Vt;m[0]=0,m[1]=-n.z,m[2]=n.y,m[3]=n.z,m[4]=0,m[5]=-n.x,m[6]=-n.y,m[7]=n.x,m[8]=0;leth=b.multiply(b.multiply(d,q,gt),m,gt),E=b.multiply(b.multiply(h,p,pt),l,pt),D=b.multiplyByVector(h,r,Bt),W=O.quadraticVectorExpression(E,o.negate(D,ct),0,0,1),V,L,B=W.length;if(B>0){letI=o.clone(o.ZERO,vt),C=Number.NEGATIVE_INFINITY;for(lety=0;y<B;++y){V=b.multiplyByVector(p,b.multiplyByVector(l,W[y],St),St);letS=o.normalize(o.subtract(V,r,K),K),M=o.dot(S,n);M>C&&(C=M,I=o.clone(V,I))}letP=e.cartesianToCartographic(I,Ut);returnC=R.clamp(C,0,1),L=o.magnitude(o.subtract(I,r,K))*Math.sqrt(1-C*C),L=i?-L:L,P.height=L,e.cartographicToCartesian(P,newo)}};varQt=newo;O.lineSegmentPlane=function(t,e,r,n){if(!g(t))throwneww("endPoint0 is required.");if(!g(e))throwneww("endPoint1 is required.");if(!g(r))throwneww("plane is required.");g(n)||(n=newo);leti=o.subtract(e,t,Qt),c=r.normal,s=o.dot(c,i);if(Math.abs(s)<R.EPSILON6)return;letu=o.dot(c,t),a=-(r.distance+u)/s;if(!(a<0||a>1))returno.multiplyByScalar(i,a,n),o.add(t,n,n),n};O.trianglePlaneIntersection=function(t,e,r,n){if(!g(t)||!g(e)||!g(r)||!g(n))throwneww("p0, p1, p2, and plane are required.");leti=n.normal,c=n.distance,s=o.dot(i,t)+c<0,u=o.dot(i,e)+c<0,a=o.dot(i,r)+c<0,f=0;f+=s?1:0,f+=u?1:0,f+=a?1:0;letl,d;if((f===1||f===2)&&(l=newo,d=newo),f===1){if(s)returnO.lineSegmentPlane(t,e,n,l),O.lineSegmentPlane(t,r,n,d),{positions:[t,e,r,l,d],indices:[0,3,4,1,2,4,1,4,3]};if(u)returnO.lineSegmentPlane(e,r,n,l),O.lineSegmentPlane(e,t,n,d),{positions:[t,e,r,l,d],indices:[1,3,4,2,0,4,2,4,3]};if(a)returnO.lineSegmentPlane(r,t,n,l),O.lineSegmentPlane(r,e,n,d),{positions:[t,e,r,l,d],indices:[2,3,4,0,1,4,0,4,3]}}elseif(f===2)if(s)if(u){if(!a)returnO.lineSegmentPlane(t,r,n,l),O.lineSegmentPlane(e,r,n,d),{positions:[t,e,r,l,d],indices:[0,1,4,0,4,3,2,3,4]}}elsereturnO.lineSegmentPlane(r,e,n,l),O.lineSegmentPlane(t,e,n,d),{positions:[t,e,r,l,d],indices:[2,0,4,2,4,3,1,3,4]};elsereturnO.lineSegmentPlane(e,t,n,l),O.lineSegmentPlane(r,t,n,d),{positions:[t,e,r,l,d],indices:[1,2,4,1,4,3,0,3,4]}};varwe=O;export{stasa,weasb};
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
*/
import{aasN}from"./chunk-ANLJ4KBN.js";import{aasi}from"./chunk-VLPNAR64.js";import{a}from"./chunk-GE5NEIZC.js";import{easT}from"./chunk-35CVRQTC.js";varr={BYTE:N.BYTE,UNSIGNED_BYTE:N.UNSIGNED_BYTE,SHORT:N.SHORT,UNSIGNED_SHORT:N.UNSIGNED_SHORT,INT:N.INT,UNSIGNED_INT:N.UNSIGNED_INT,FLOAT:N.FLOAT,DOUBLE:N.DOUBLE};r.getSizeInBytes=function(n){if(!T(n))thrownewa("value is required.");switch(n){caser.BYTE:returnInt8Array.BYTES_PER_ELEMENT;caser.UNSIGNED_BYTE:returnUint8Array.BYTES_PER_ELEMENT;caser.SHORT:returnInt16Array.BYTES_PER_ELEMENT;caser.UNSIGNED_SHORT:returnUint16Array.BYTES_PER_ELEMENT;caser.INT:returnInt32Array.BYTES_PER_ELEMENT;caser.UNSIGNED_INT:returnUint32Array.BYTES_PER_ELEMENT;caser.FLOAT:returnFloat32Array.BYTES_PER_ELEMENT;caser.DOUBLE:returnFloat64Array.BYTES_PER_ELEMENT;default:thrownewa("componentDatatype is not a valid value.")}};r.fromTypedArray=function(n){if(ninstanceofInt8Array)returnr.BYTE;if(ninstanceofUint8Array)returnr.UNSIGNED_BYTE;if(ninstanceofInt16Array)returnr.SHORT;if(ninstanceofUint16Array)returnr.UNSIGNED_SHORT;if(ninstanceofInt32Array)returnr.INT;if(ninstanceofUint32Array)returnr.UNSIGNED_INT;if(ninstanceofFloat32Array)returnr.FLOAT;if(ninstanceofFloat64Array)returnr.DOUBLE;thrownewa("array must be an Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, or Float64Array.")};r.validate=function(n){returnT(n)&&(n===r.BYTE||n===r.UNSIGNED_BYTE||n===r.SHORT||n===r.UNSIGNED_SHORT||n===r.INT||n===r.UNSIGNED_INT||n===r.FLOAT||n===r.DOUBLE)};r.createTypedArray=function(n,e){if(!T(n))thrownewa("componentDatatype is required.");if(!T(e))thrownewa("valuesOrLength is required.");switch(n){caser.BYTE:returnnewInt8Array(e);caser.UNSIGNED_BYTE:returnnewUint8Array(e);caser.SHORT:returnnewInt16Array(e);caser.UNSIGNED_SHORT:returnnewUint16Array(e);caser.INT:returnnewInt32Array(e);caser.UNSIGNED_INT:returnnewUint32Array(e);caser.FLOAT:returnnewFloat32Array(e);caser.DOUBLE:returnnewFloat64Array(e);default:thrownewa("componentDatatype is not a valid value.")}};r.createArrayBufferView=function(n,e,E,t){if(!T(n))thrownewa("componentDatatype is required.");if(!T(e))thrownewa("buffer is required.");switch(E=i(E,0),t=i(t,(e.byteLength-E)/r.getSizeInBytes(n)),n){caser.BYTE:returnnewInt8Array(e,E,t);caser.UNSIGNED_BYTE:returnnewUint8Array(e,E,t);caser.SHORT:returnnewInt16Array(e,E,t);caser.UNSIGNED_SHORT:returnnewUint16Array(e,E,t);caser.INT:returnnewInt32Array(e,E,t);caser.UNSIGNED_INT:returnnewUint32Array(e,E,t);caser.FLOAT:returnnewFloat32Array(e,E,t);caser.DOUBLE:returnnewFloat64Array(e,E,t);default:thrownewa("componentDatatype is not a valid value.")}};r.fromName=function(n){switch(n){case"BYTE":returnr.BYTE;case"UNSIGNED_BYTE":returnr.UNSIGNED_BYTE;case"SHORT":returnr.SHORT;case"UNSIGNED_SHORT":returnr.UNSIGNED_SHORT;case"INT":returnr.INT;case"UNSIGNED_INT":returnr.UNSIGNED_INT;case"FLOAT":returnr.FLOAT;case"DOUBLE":returnr.DOUBLE;default:thrownewa("name is not a valid value.")}};varU=Object.freeze(r);export{Uasa};
* MIT License http://www.opensource.org/licenses/mit-license
*
*/(function(e,n){"use strict";typeofPn=="object"&&Pn.exports?Pn.exports=n():typeofdefine=="function"&&define.amd?define(n):e.SecondLevelDomains=n(e)})(It,function(e){"use strict";varn=e&&e.SecondLevelDomains,t={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(o){vari=o.lastIndexOf(".");if(i<=0||i>=o.length-1)return!1;varr=o.lastIndexOf(".",i-1);if(r<=0||r>=i-1)return!1;vara=t.list[o.slice(i+1)];returna?a.indexOf(""+o.slice(r+1,i)+"")>=0:!1},is:function(o){vari=o.lastIndexOf(".");if(i<=0||i>=o.length-1)return!1;varr=o.lastIndexOf(".",i-1);if(r>=0)return!1;vara=t.list[o.slice(i+1)];returna?a.indexOf(""+o.slice(0,i)+"")>=0:!1},get:function(o){vari=o.lastIndexOf(".");if(i<=0||i>=o.length-1)returnnull;varr=o.lastIndexOf(".",i-1);if(r<=0||r>=i-1)returnnull;vara=t.list[o.slice(i+1)];return!a||a.indexOf(""+o.slice(r+1,i)+"")<0?null:o.slice(r+1)},noConflict:function(){returne.SecondLevelDomains===this&&(e.SecondLevelDomains=n),this}};returnt})});varQe=Rn((Dt,Un)=>{/*!
* URI.js - Mutating URLs
*
* Version: 1.19.11
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/(function(e,n){"use strict";typeofUn=="object"&&Un.exports?Un.exports=n(Pt(),zt(),qt()):typeofdefine=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],n):e.URI=n(e.punycode,e.IPv6,e.SecondLevelDomains,e)})(Dt,function(e,n,t,o){"use strict";vari=o&&o.URI;functionr(c,f){varh=arguments.length>=1,y=arguments.length>=2;if(!(thisinstanceofr))returnh?y?newr(c,f):newr(c):newr;if(c===void0){if(h)thrownewTypeError("undefined is not a valid argument for URI");typeoflocation<"u"?c=location.href+"":c=""}if(c===null&&h)thrownewTypeError("null is not a valid argument for URI");returnthis.href(c),f!==void0?this.absoluteTo(f):this}functiona(c){return/^[0-9]+$/.test(c)}r.version="1.19.11";varu=r.prototype,d=Object.prototype.hasOwnProperty;functionm(c){returnc.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}functionl(c){returnc===void0?"Undefined":String(Object.prototype.toString.call(c)).slice(8,-1)}functionw(c){returnl(c)==="Array"}functionT(c,f){varh={},y,g;if(l(f)==="RegExp")h=null;elseif(w(f))for(y=0,g=f.length;y<g;y++)h[f[y]]=!0;elseh[f]=!0;for(y=0,g=c.length;y<g;y++){varv=h&&h[c[y]]!==void0||!h&&f.test(c[y]);v&&(c.splice(y,1),g--,y--)}returnc}functionC(c,f){varh,y;if(w(f)){for(h=0,y=f.length;h<y;h++)if(!C(c,f[h]))return!1;return!0}varg=l(f);for(h=0,y=c.length;h<y;h++)if(g==="RegExp"){if(typeofc[h]=="string"&&c[h].match(f))return!0}elseif(c[h]===f)return!0;return!1}functionP(c,f){if(!w(c)||!w(f)||c.length!==f.length)return!1;c.sort(),f.sort();for(varh=0,y=c.length;h<y;h++)if(c[h]!==f[h])return!1;return!0}functionA(c){varf=/^\/+|\/+$/g;returnc.replace(f,"")}r._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:r.preventInvalidHostname,duplicateQueryParameters:r.duplicateQueryParameters,escapeQuerySpace:r.escapeQuerySpace}},r.preventInvalidHostname=!1,r.duplicateQueryParameters=!1,r.escapeQuerySpace=!0,r.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,r.idn_expression=/[^a-z0-9\._-]/i,r.punycode_expression=/(xn--)/i,r.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,r.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*$/,r.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`!()\[\]{};:'".,<>?«»“”‘’]))/ig,r.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},r.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,r.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,r.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},r.hostProtocols=["http","https"],r.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,r.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"},r.getDomAttribute=function(c){if(!(!c||!c.nodeName)){varf=c.nodeName.toLowerCase();if(!(f==="input"&&c.type!=="image"))returnr.domAttributes[f]}};functionq(c){returnescape(c)}functionk(c){returnencodeURIComponent(c).replace(/[!'()*]/g,q).replace(/\*/g,"%2A")}r.encode=k,r.decode=decodeURIComponent,r.iso8859=function(){r.encode=escape,r.decode=unescape},r.unicode=function(){r.encode=k,r.decode=decodeURIComponent},r.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,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)/ig,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)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},r.encodeQuery=function(c,f){varh=r.encode(c+"");returnf===void0&&(f=r.escapeQuerySpace),f?h.replace(/%20/g,"+"):h},r.decodeQuery=function(c,f){c+="",f===void0&&(f=r.escapeQuerySpace);try{returnr.decode(f?c.replace(/\+/g,"%20"):c)}catch{returnc}};varL={encode:"encode",decode:"decode"},F,B=function(c,f){returnfunction(h){try{returnr[f](h+"").replace(r.characters[c][f].expression,function(y){returnr.characters[c][f].map[y]})}catch{returnh}}};for(FinL)r[F+"PathSegment"]=B("pathname",L[F]),r[F+"UrnPathSegment"]=B("urnpath",L[F]);varW=function(c,f,h){returnfunction(y){varg;h?g=function(N){returnr[f](r[h](N))}:g=r[f];for(varv=(y+"").split(c),b=0,I=v.length;b<I;b++)v[b]=g(v[b]);returnv.join(c)}};r.decodePath=W("/","decodePathSegment"),r.decodeUrnPath=W(":","decodeUrnPathSegment"),r.recodePath=W("/","encodePathSegment","decode"),r.recodeUrnPath=W(":","encodeUrnPathSegment","decode"),r.encodeReserved=B("reserved","encode"),r.parse=function(c,f){varh;returnf||(f={preventInvalidHostname:r.preventInvalidHostname}),c=c.replace(r.leading_whitespace_expression,""),c=c.replace(r.ascii_tab_whitespace,""),h=c.indexOf("#"),h>-1&&(f.fragment=c.substring(h+1)||null,c=c.substring(0,h)),h=c.indexOf("?"),h>-1&&(f.query=c.substring(h+1)||null,c=c.substring(0,h)),c=c.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),c=c.replace(/^[/\\]{2,}/i,"//"),c.substring(0,2)==="//"?(f.protocol=null,c=c.substring(2),c=r.parseAuthority(c,f)):(h=c.indexOf(":"),h>-1&&(f.protocol=c.substring(0,h)||null,f.protocol&&!f.protocol.match(r.protocol_expression)?f.protocol=void0:c.substring(h+1,h+3).replace(/\\/g,"/")==="//"?(c=c.substring(h+3),c=r.parseAuthority(c,f)):(c=c.substring(h+1),f.urn=!0))),f.path=c,f},r.parseHost=function(c,f){c||(c=""),c=c.replace(/\\/g,"/");varh=c.indexOf("/"),y,g;if(h===-1&&(h=c.length),c.charAt(0)==="[")y=c.indexOf("]"),f.hostname=c.substring(1,y)||null,f.port=c.substring(y+2,h)||null,f.port==="/"&&(f.port=null);else{varv=c.indexOf(":"),b=c.indexOf("/"),I=c.indexOf(":",v+1);I!==-1&&(b===-1||I<b)?(f.hostname=c.substring(0,h)||null,f.port=null):(g=c.substring(0,h).split(":"),f.hostname=g[0]||null,f.port=g[1]||null)}returnf.hostname&&c.substring(h).charAt(0)!=="/"&&(h++,c="/"+c),f.preventInvalidHostname&&r.ensureValidHostname(f.hostname,f.protocol),f.port&&r.ensureValidPort(f.port),c.substring(h)||"/"},r.parseAuthority=function(c,f){returnc=r.parseUserinfo(c,f),r.parseHost(c,f)},r.parseUserinfo=function(c,f){varh=c,y=c.indexOf("\\");y!==-1&&(c=c.replace(/\\/g,"/"));varg=c.indexOf("/"),v=c.lastIndexOf("@",g>-1?g:c.length-1),b;returnv>-1&&(g===-1||v<g)?(b=c.substring(0,v).split(":"),f.username=b[0]?r.decode(b[0]):null,b.shift(),f.password=b[0]?r.decode(b.join(":")):null,c=h.substring(v+1)):(f.username=null,f.password=null),c},r.parseQuery=function(c,f){if(!c)return{};if(c=c.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!c)return{};for(varh={},y=c.split("&"),g=y.length,v,b,I,N=0;N<g;N++)v=y[N].split("="),b=r.decodeQuery(v.shift(),f),I=v.length?r.decodeQuery(v.join("="),f):null,b!=="__proto__"&&(d.call(h,b)?((typeofh[b]=="string"||h[b]===null)&&(h[b]=[h[b]]),h[b].push(I)):h[b]=I);returnh},r.build=function(c){varf="",h=!1;returnc.protocol&&(f+=c.protocol+":"),!c.urn&&(f||c.hostname)&&(f+="//",h=!0),f+=r.buildAuthority(c)||"",typeofc.path=="string"&&(c.path.charAt(0)!=="/"&&h&&(f+="/"),f+=c.path),typeofc.query=="string"&&c.query&&(f+="?"+c.query),typeofc.fragment=="string"&&c.fragment&&(f+="#"+c.fragment),f},r.buildHost=function(c){varf="";if(c.hostname)r.ip6_expression.test(c.hostname)?f+="["+c.hostname+"]":f+=c.hostname;elsereturn"";returnc.port&&(f+=":"+c.port),f},r.buildAuthority=function(c){returnr.buildUserinfo(c)+r.buildHost(c)},r.buildUserinfo=function(c){varf="";returnc.username&&(f+=r.encode(c.username)),c.password&&(f+=":"+r.encode(c.password)),f&&(f+="@"),f},r.buildQuery=function(c,f,h){vary="",g,v,b,I;for(vinc)if(v!=="__proto__"&&d.call(c,v))if(w(c[v]))for(g={},b=0,I=c[v].length;b<I;b++)c[v][b]!==void0&&g[c[v][b]+""]===void0&&(y+="&"+r.buildQueryParameter(v,c[v][b],h),f!==!0&&(g[c[v][b]+""]=!0));elsec[v]!==void0&&(y+="&"+r.buildQueryParameter(v,c[v],h));returny.substring(1)},r.buildQueryParameter=function(c,f,h){returnr.encodeQuery(c,h)+(f!==null?"="+r.encodeQuery(f,h):"")},r.addQuery=function(c,f,h){if(typeoff=="object")for(varyinf)d.call(f,y)&&r.addQuery(c,y,f[y]);elseif(typeoff=="string"){if(c[f]===void0){c[f]=h;return}elsetypeofc[f]=="string"&&(c[f]=[c[f]]);w(h)||(h=[h]),c[f]=(c[f]||[]).concat(h)}elsethrownewTypeError("URI.addQuery() accepts an object, string as the name parameter")},r.setQuery=function(c,f,h){if(typeoff=="object")for(varyinf)d.call(f,y)&&r.setQuery(c,y,f[y]);elseif(typeoff=="string")c[f]=h===void0?null:h;elsethrownewTypeError("URI.setQuery() accepts an object, string as the name parameter")},r.removeQuery=function(c,f,h){vary,g,v;if(w(f))for(y=0,g=f.length;y<g;y++)c[f[y]]=void0;elseif(l(f)==="RegExp")for(vinc)f.test(v)&&(c[v]=void0);elseif(typeoff=="object")for(vinf)d.call(f,v)&&r.removeQuery(c,v,f[v]);elseif(typeoff=="string")h!==void0?l(h)==="RegExp"?!w(c[f])&&h.test(c[f])?c[f]=void0:c[f]=T(c[f],h):c[f]===String(h)&&(!w(h)||h.length===1)?c[f]=void0:w(c[f])&&(c[f]=T(c[f],h)):c[f]=void0;elsethrownewTypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},r.hasQuery=function(c,f,h,y){switch(l(f)){case"String":break;case"RegExp":for(varginc)if(d.call(c,g)&&f.test(g)&&(h===void0||r.hasQuery(c,g,h)))return!0;return!1;case"Object":for(varvinf)if(d.call(f,v)&&!r.hasQuery(c,v,f[v]))return!1;return!0;default:thrownewTypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(l(h)){case"Undefined":returnfinc;case"Boolean":varb=!!(w(c[f])?c[f].length:c[f]);returnh===b;case"Function":return!!h(c[f],f,c);case"Array":if(!w(c[f]))return!1;varI=y?C:P;returnI(c[f],h);case"RegExp":returnw(c[f])?y?C(c[f],h):!1:!!(c[f]&&c[f].match(h));case"Number":h=String(h);case"String":returnw(c[f])?y?C(c[f],h):!1:c[f]===h;default:thrownewTypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},r.joinPaths=function(){for(varc=[],f=[],h=0,y=0;y<arguments.length;y++){varg=newr(arguments[y]);c.push(g);for(varv=g.segment(),b=0;b<v.length;b++)typeofv[b]=="string"&&f.push(v[b]),v[b]&&h++}if(!f.length||!h)returnnewr("");varI=newr("").segment(f);return(c[0].path()===""||c[0].path().slice(0,1)==="/")&&I.path("/"+I.path()),I.normalize()},r.commonPath=function(c,f){varh=Math.min(c.length,f.length),y;for(y=0;y<h;y++)if(c.charAt(y)!==f.charAt(y)){y--;break}returny<1?c.charAt(0)===f.charAt(0)&&c.charAt(0)==="/"?"/":"":((c.charAt(y)!=="/"||f.charAt(y)!=="/")&&(y=c.substring(0,y).lastIndexOf("/")),c.substring(0,y+1))},r.withinString=function(c,f,h){h||(h={});vary=h.start||r.findUri.start,g=h.end||r.findUri.end,v=h.trim||r.findUri.trim,b=h.parens||r.findUri.parens,I=/[a-z0-9-]=["']?$/i;for(y.lastIndex=0;;){varN=y.exec(c);if(!N)break;varY=N.index;if(h.ignoreHtml){varie=c.slice(Math.max(Y-3,0),Y);if(ie&&I.test(ie))continue}for(varae=Y+c.slice(Y).search(g),ne=c.slice(Y,ae),ue=-1;;){varde=b.exec(ne);if(!de)break;varye=de.index+de[0].length;ue=Math.max(ue,ye)}if(ue>-1?ne=ne.slice(0,ue)+ne.slice(ue).replace(v,""):ne=ne.replace(v,""),!(ne.length<=N[0].length)&&!(h.ignore&&h.ignore.test(ne))){ae=Y+ne.length;varme=f(ne,Y,ae,c);if(me===void0){y.lastIndex=ae;continue}me=String(me),c=c.slice(0,Y)+me+c.slice(ae),y.lastIndex=Y+me.length}}returny.lastIndex=0,c},r.ensureValidHostname=function(c,f){varh=!!c,y=!!f,g=!1;if(y&&(g=C(r.hostProtocols,f)),g&&!h)thrownewTypeError("Hostname cannot be empty, if protocol is "+f);if(c&&c.match(r.invalid_hostname_characters)){if(!e)thrownewTypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(c).match(r.invalid_hostname_characters))thrownewTypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-:_]')}},r.ensureValidPort=function(c){if(c){varf=Number(c);if(!(a(f)&&f>0&&f<65536))thrownewTypeError('Port "'+c+'" is not a valid port')}},r.noConflict=function(c){if(c){varf={URI:this.noConflict()};returno.URITemplate&&typeofo.URITemplate.noConflict=="function"&&(f.URITemplate=o.URITemplate.noConflict()),o.IPv6&&typeofo.IPv6.noConflict=="function"&&(f.IPv6=o.IPv6.noConflict()),o.SecondLevelDomains&&typeofo.SecondLevelDomains.noConflict=="function"&&(f.SecondLevelDomains=o.SecondLevelDomains.noConflict()),f}elseo.URI===this&&(o.URI=i);returnthis},u.build=function(c){returnc===!0?this._deferred_build=!0:(c===void0||this._deferred_build)&&(this._string=r.build(this._parts),this._deferred_build=!1),this},u.clone=function(){returnnewr(this)},u.valueOf=u.toString=function(){returnthis.build(!1)._string};functionH(c){returnfunction(f,h){returnf===void0?this._parts[c]||"":(this._parts[c]=f||null,this.build(!h),this)}}functionee(c,f){returnfunction(h,y){returnh===void0?this._parts[c]||"":(h!==null&&(h=h+"",h.charAt(0)===f&&(h=h.substring(1))),this._parts[c]=h,this.build(!y),this)}}u.protocol=H("protocol"),u.username=H("username"),u.password=H("password"),u.hostname=H("hostname"),u.port=H("port"),u.query=ee("query","?"),u.fragment=ee("fragment","#"),u.search=function(c,f){varh=this.query(c,f);returntypeofh=="string"&&h.length?"?"+h:h},u.hash=function(c,f){varh=this.fragment(c,f);returntypeofh=="string"&&h.length?"#"+h:h},u.pathname=function(c,f){if(c===void0||c===!0){varh=this._parts.path||(this._parts.hostname?"/":"");returnc?(this._parts.urn?r.decodeUrnPath:r.decodePath)(h):h}elsereturnthis._parts.urn?this._parts.path=c?r.recodeUrnPath(c):"":this._parts.path=c?r.recodePath(c):"/",this.build(!f),this},u.path=u.pathname,u.href=function(c,f){varh;if(c===void0)returnthis.toString();this._string="",this._parts=r._parts();vary=cinstanceofr,g=typeofc=="object"&&(c.hostname||c.path||c.pathname);if(c.nodeName){varv=r.getDomAttribute(c);c=c[v]||"",g=!1}if(!y&&g&&c.pathname!==void0&&(c=c.toString()),typeofc=="string"||cinstanceofString)this._parts=r.parse(String(c),this._parts);elseif(y||g){varb=y?c._parts:c;for(hinb)h!=="query"&&d.call(this._parts,h)&&(this._parts[h]=b[h]);b.query&&this.query(b.query,!1)}elsethrownewTypeError("invalid input");returnthis.build(!f),this},u.is=function(c){varf=!1,h=!1,y=!1,g=!1,v=!1,b=!1,I=!1,N=!this._parts.urn;switch(this._parts.hostname&&(N=!1,h=r.ip4_expression.test(this._parts.hostname),y=r.ip6_expression.test(this._parts.hostname),f=h||y,g=!f,v=g&&t&&t.has(this._parts.hostname),b=g&&r.idn_expression.test(this._parts.hostname),I=g&&r.punycode_expression.test(this._parts.hostname)),c.toLowerCase()){case"relative":returnN;case"absolute":return!N;case"domain":case"name":returng;case"sld":returnv;case"ip":returnf;case"ip4":case"ipv4":case"inet4":returnh;case"ip6":case"ipv6":case"inet6":returny;case"idn":returnb;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":returnI}returnnull};varre=u.protocol,Z=u.port,oe=u.hostname;u.protocol=function(c,f){if(c&&(c=c.replace(/:(\/\/)?$/,""),!c.match(r.protocol_expression)))thrownewTypeError('Protocol "'+c+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);returnre.call(this,c,f)},u.scheme=u.protocol,u.port=function(c,f){returnthis._parts.urn?c===void0?"":this:(c!==void0&&(c===0&&(c=null),c&&(c+="",c.charAt(0)===":"&&(c=c.substring(1)),r.ensureValidPort(c))),Z.call(this,c,f))},u.hostname=function(c,f){if(this._parts.urn)returnc===void0?"":this;if(c!==void0){varh={preventInvalidHostname:this._parts.preventInvalidHostname},y=r.parseHost(c,h);if(y!=="/")thrownewTypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-]');c=h.hostname,this._parts.preventInvalidHostname&&r.ensureValidHostname(c,this._parts.protocol)}returnoe.call(this,c,f)},u.origin=function(c,f){if(this._parts.urn)returnc===void0?"":this;if(c===void0){varh=this.protocol(),y=this.authority();returny?(h?h+"://":"")+this.authority():""}else{varg=r(c);returnthis.protocol(g.protocol()).authority(g.authority()).build(!f),this}},u.host=function(c,f){if(this._parts.urn)returnc===void0?"":this;if(c===void0)returnthis._parts.hostname?r.buildHost(this._parts):"";varh=r.parseHost(c,this._parts);if(h!=="/")thrownewTypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-]');returnthis.build(!f),this},u.authority=function(c,f){if(this._parts.urn)returnc===void0?"":this;if(c===void0)returnthis._parts.hostname?r.buildAuthority(this._parts):"";varh=r.parseAuthority(c,this._parts);if(h!=="/")thrownewTypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-]');returnthis.build(!f),this},u.userinfo=function(c,f){if(this._parts.urn)returnc===void0?"":this;if(c===void0){varh=r.buildUserinfo(this._parts);returnh&&h.substring(0,h.length-1)}elsereturnc[c.length-1]!=="@"&&(c+="@"),r.parseUserinfo(c,this._parts),this.build(!f),this},u.resource=function(c,f){varh;returnc===void0?this.path()+this.search()+this.hash():(h=r.parse(c),this._parts.path=h.path,this._parts.query=h.query,this._parts.fragment=h.fragment,this.build(!f),this)},u.subdomain=function(c,f){if(this._parts.urn)returnc===void0?"":this;if(c===void0){if(!this._parts.hostname||this.is("IP"))return"";varh=this._parts.hostname.length-this.domain().length-1;returnthis._parts.hostname.substring(0,h)||""}else{vary=this._parts.hostname.length-this.domain().length,g=this._parts.hostname.substring(0,y),v=newRegExp("^"+m(g));if(c&&c.charAt(c.length-1)!=="."&&(c+="."),c.indexOf(":")!==-1)thrownewTypeError("Domains cannot contain colons");returnc&&r.ensureValidHostname(c,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(v,c),this.build(!f),this}},u.domain=function(c,f){if(this._parts.urn)returnc===void0?"":this;if(typeofc=="boolean"&&(f=c,c=void0),c===void0){if(!this._parts.hostname||this.is("IP"))return"";varh=this._parts.hostname.match(/\./g);if(h&&h.length<2)returnthis._parts.hostname;vary=this._parts.hostname.length-this.tld(f).length-1;returny=this._parts.hostname.lastIndexOf(".",y-1)+1,this._parts.hostname.substring(y)||""}else{if(!c)thrownewTypeError("cannot set domain empty");if(c.indexOf(":")!==-1)thrownewTypeError("Domains cannot contain colons");if(r.ensureValidHostname(c,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=c;else{varg=newRegExp(m(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(g,c)}returnthis.build(!f),this}},u.tld=function(c,f){if(this._parts.urn)returnc===void0?"":this;if(typeofc=="boolean"&&(f=c,c=void0),c===void0){if(!this._parts.hostname||this.is("IP"))return"";varh=this._parts.hostname.lastIndexOf("."),y=this._parts.hostname.substring(h+1);returnf!==!0&&t&&t.list[y.toLowerCase()]&&t.get(this._parts.hostname)||y}else{varg;if(c)if(c.match(/[^a-zA-Z0-9-]/))if(t&&t.is(c))g=newRegExp(m(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(g,c);elsethrownewTypeError('TLD "'+c+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))thrownewReferenceError("cannot set TLD on non-domain host");g=newRegExp(m(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(g,c)}elsethrownewTypeError("cannot set TLD empty");returnthis.build(!f),this}},u.directory=function(c,f){if(this._parts.urn)returnc===void0?"":this;if(c===void0||c===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";varh=this._parts.path.length-this.filename().length-1,y=this._parts.path.substring(0,h)||(this._parts.hostname?"/":"");returnc?r.decodePath(y):y}else{varg=this._parts.path.length-this.filename().length,v=this._parts.path.substring(0,g),b=newRegExp("^"+m(v));returnthis.is("relative")||(c||(c="/"),c.charAt(0)!=="/"&&(c="/"+c)),c&&c.charAt(c.length-1)!=="/"&&(c+="/"),c=r.recodePath(c),this._parts.path=this._parts.path.replace(b,c),this.build(!f),this}},u.filename=function(c,f){if(this._parts.urn)returnc===void0?"":this;if(typeofc!="string"){if(!this._parts.path||this._parts.path==="/")return"";varh=this._parts.path.lastIndexOf("/"),y=this._parts.path.substring(h+1);returnc?r.decodePathSegment(y):y}else{varg=!1;c.charAt(0)==="/"&&(c=c.substring(1)),c.match(/\.?\//)&&(g=!0);varv=newRegExp(m(this.filename())+"$");returnc=r.recodePath(c),this._parts.path=this._parts.path.replace(v,c),g?this.normalizePath(f):this.build(!f),this}},u.suffix=function(c,f){if(this._parts.urn)returnc===void0?"":this;if(c===void0||c===!0){if(!this._parts.path||this._parts.path==="/")return"";varh=this.filename(),y=h.lastIndexOf("."),g,v;returny===-1?"":(g=h.substring(y+1),v=/^[a-z0-9%]+$/i.test(g)?g:"",c?r.decodePathSegment(v):v)}else{c.charAt(0)==="."&&(c=c.substring(1));varb=this.suffix(),I;if(b)c?I=newRegExp(m(b)+"$"):I=newRegExp(m("."+b)+"$");else{if(!c)returnthis;this._parts.path+="."+r.recodePath(c)}returnI&&(c=r.recodePath(c),this._parts.path=this._parts.path.replace(I,c)),this.build(!f),this}},u.segment=function(c,f,h){vary=this._parts.urn?":":"/",g=this.path(),v=g.substring(0,1)==="/",b=g.split(y);if(c!==void0&&typeofc!="number"&&(h=f,f=c,c=void0),c!==void0&&typeofc!="number")thrownewError('Bad segment "'+c+'", must be 0-based integer');if(v&&b.shift(),c<0&&(c=Math.max(b.length+c,0)),f===void0)returnc===void0?b:b[c];if(c===null||b[c]===void0)if(w(f)){b=[];for(varI=0,N=f.length;I<N;I++)!f[I].length&&(!b.length||!b[b.length-1].length)||(b.length&&!b[b.length-1].length&&b.pop(),b.push(A(f[I])))}else(f||typeoff=="string")&&(f=A(f),b[b.length-1]===""?b[b.length-1]=f:b.push(f));elsef?b[c]=A(f):b.splice(c,1);returnv&&b.unshift(""),this.path(b.join(y),h)},u.segmentCoded=function(c,f,h){vary,g,v;if(typeofc!="number"&&(h=f,f=c,c=void0),f===void0){if(y=this.segment(c,f,h),!w(y))y=y!==void0?r.decode(y):void0;elsefor(g=0,v=y.length;g<v;g++)y[g]=r.decode(y[g]);returny}if(!w(f))f=typeoff=="string"||finstanceofString?r.encode(f):f;elsefor(g=0,v=f.length;g<v;g++)f[g]=r.encode(f[g]);returnthis.segment(c,f,h)};varJ=u.query;returnu.query=function(c,f){if(c===!0)returnr.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeofc=="function"){varh=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace),y=c.call(this,h);returnthis._parts.query=r.buildQuery(y||h,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!f),this}elsereturnc!==void0&&typeofc!="string"?(this._parts.query=r.buildQuery(c,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!f),this):J.call(this,c,f)},u.setQuery=function(c,f,h){vary=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeofc=="string"||cinstanceofString)y[c]=f!==void0?f:null;elseif(typeofc=="object")for(varginc)d.call(c,g)&&(y[g]=c[g]);elsethrownewTypeError("URI.addQuery() accepts an object, string as the name parameter");returnthis._parts.query=r.buildQuery(y,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeofc!="string"&&(h=f),this.build(!h),this},u.addQuery=function(c,f,h){vary=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);returnr.addQuery(y,c,f===void0?null:f),this._parts.query=r.buildQuery(y,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeofc!="string"&&(h=f),this.build(!h),this},u.removeQuery=function(c,f,h){vary=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);returnr.removeQuery(y,c,f),this._parts.query=r.buildQuery(y,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeofc!="string"&&(h=f),this.build(!h),this},u.hasQuery=function(c,f,h){vary=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);returnr.hasQuery(y,c,f,h)},u.setSearch=u.setQuery,u.addSearch=u.addQuery,u.removeSearch=u.removeQuery,u.hasSearch=u.hasQuery,u.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()},u.normalizeProtocol=function(c){returntypeofthis._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!c)),this},u.normalizeHostname=function(c){returnthis._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&n&&(this._parts.hostname=n.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!c)),this},u.normalizePort=function(c){returntypeofthis._parts.protocol=="string"&&this._parts.port===r.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!c)),this},u.normalizePath=function(c){varf=this._parts.path;if(!f)returnthis;if(this._parts.urn)returnthis._parts.path=r.recodeUrnPath(this._parts.path),this.build(!c),this;if(this._parts.path==="/")returnthis;f=r.recodePath(f);varh,y="",g,v;for(f.charAt(0)!=="/"&&(h=!0,f="/"+f),(f.slice(-3)==="/.."||f.slice(-2)==="/.")&&(f+="/"),f=f.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),h&&(y=f.substring(1).match(/^(\.\.\/)+/)||"",y&&(y=y[0]));g=f.search(/\/\.\.(\/|$)/),g!==-1;){if(g===0){f=f.substring(3);continue}v=f.substring(0,g).lastIndexOf("/"),v===-1&&(v=g),f=f.substring(0,v)+f.substring(g+3)}returnh&&this.is("relative")&&(f=y+f.substring(1)),this._parts.path=f,this.build(!c),this},u.normalizePathname=u.normalizePath,u.normalizeQuery=function(c){returntypeofthis._parts.query=="string"&&(this._parts.query.length?this.query(r.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!c)),this},u.normalizeFragment=function(c){returnthis._parts.fragment||(this._parts.fragment=null,this.build(!c)),this},u.normalizeSearch=u.normalizeQuery,u.normalizeHash=u.normalizeFragment,u.iso8859=function(){varc=r.encode,f=r.decode;r.encode=escape,r.decode=decodeURIComponent;try{this.normalize()}finally{r.encode=c,r.decode=f}returnthis},u.unicode=function(){varc=r.encode,f=r.decode;r.encode=k,r.decode=unescape;try{this.normalize()}finally{r.encode=c,r.decode=f}returnthis},u.readable=function(){varc=this.clone();c.username("").password("").normalize();varf="";if(c._parts.protocol&&(f+=c._parts.protocol+"://"),c._parts.hostname&&(c.is("punycode")&&e?(f+=e.toUnicode(c._parts.hostname),c._parts.port&&(f+=":"+c._parts.port)):f+=c.host()),c._parts.hostname&&c._parts.path&&c._parts.path.charAt(0)!=="/"&&(f+="/"),f+=c.path(!0),c._parts.query){for(varh="",y=0,g=c._parts.query.split("&"),v=g.length;y<v;y++){varb=(g[y]||"").split("=");h+="&"+r.decodeQuery(b[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),b[1]!==void0&&(h+="="+r.decodeQuery(b[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}f+="?"+h.substring(1)}returnf+=r.decodeQuery(c.hash(),!0),f},u.absoluteTo=function(c){varf=this.clone(),h=["protocol","username","password","hostname","port"],y,g,v;if(this._parts.urn)thrownewError("URNs do not have any generally defined hierarchical components");if(cinstanceofr||(c=newr(c)),f._parts.protocol||(f._parts.protocol=c._parts.protocol,this._parts.hostname))returnf;for(g=0;v=h[g];g++)f._parts[v]=c._parts[v];returnf._parts.path?(f._parts.path.substring(-2)===".."&&(f._parts.path+="/"),f.path().charAt(0)!=="/"&&(y=c.directory(),y=y||(c.path().indexOf("/")===0?"/":""),f._parts.path=(y?y+"/":"")+f._parts.path,f.normalizePath())):(f._parts.path=c._parts.path,f._parts.query||(f._parts.query=c._parts.query)),f.build(),f},u.relativeTo=function(c){varf=this.clone().normalize(),h,y,g,v,b;if(f._parts.urn)thrownewError("URNs do not have any generally defined hierarchical components");if(c=newr(c).normalize(),h=f._parts,y=c._parts,v=f.path(),b=c.path(),v.charAt(0)!=="/")thrownewError("URI is already relative");if(b.charAt(0)!=="/")thrownewError("Cannot calculate a URI relative to another relative URI");if(h.protocol===y.protocol&&(h.protocol=null),h.username!==y.username||h.password!==y.password||h.protocol!==null||h.username!==null||h.password!==null)returnf.build();if(h.hostname===y.hostname&&h.port===y.port)h.hostname=null,h.port=null;elsereturnf.build();if(v===b)returnh.path="",f.build();if(g=r.commonPath(v,b),!g)returnf.build();varI=y.path.substring(g.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");returnh.path=I+h.path.substring(g.length)||"./",f.build()},u.equals=function(c){varf=this.clone(),h=newr(c),y={},g={},v={},b,I,N;if(f.normalize(),h.normalize(),f.toString()===h.toString())return!0;if(b=f.query(),I=h.query(),f.query(""),h.query(""),f.toString()!==h.toString()||b.length!==I.length)return!1;y=r.parseQuery(b,this._parts.escapeQuerySpace),g=r.parseQuery(I,this._parts.escapeQuerySpace);for(Niny)if(d.call(y,N)){if(w(y[N])){if(!P(y[N],g[N]))return!1}elseif(y[N]!==g[N])return!1;v[N]=!0}for(Ning)if(d.call(g,N)&&!v[N])return!1;return!0},u.preventInvalidHostname=function(c){returnthis._parts.preventInvalidHostname=!!c,this},u.duplicateQueryParameters=function(c){returnthis._parts.duplicateQueryParameters=!!c,this},u.escapeQuerySpace=function(c){returnthis._parts.escapeQuerySpace=!!c,this},r})});functionM(e,n,t,o){this.x=O(e,0),this.y=O(n,0),this.z=O(t,0),this.w=O(o,0)}M.fromElements=function(e,n,t,o,i){returnp(i)?(i.x=e,i.y=n,i.z=t,i.w=o,i):newM(e,n,t,o)};M.fromColor=function(e,n){returns.typeOf.object("color",e),p(n)?(n.x=e.red,n.y=e.green,n.z=e.blue,n.w=e.alpha,n):newM(e.red,e.green,e.blue,e.alpha)};M.clone=function(e,n){if(p(e))returnp(n)?(n.x=e.x,n.y=e.y,n.z=e.z,n.w=e.w,n):newM(e.x,e.y,e.z,e.w)};M.packedLength=4;M.pack=function(e,n,t){returns.typeOf.object("value",e),s.defined("array",n),t=O(t,0),n[t++]=e.x,n[t++]=e.y,n[t++]=e.z,n[t]=e.w,n};M.unpack=function(e,n,t){returns.defined("array",e),n=O(n,0),p(t)||(t=newM),t.x=e[n++],t.y=e[n++],t.z=e[n++],t.w=e[n],t};M.packArray=function(e,n){s.defined("array",e);lett=e.length,o=t*4;if(!p(n))n=newArray(o);else{if(!Array.isArray(n)&&n.length!==o)thrownewj("If result is a typed array, it must have exactly array.length * 4 elements");n.length!==o&&(n.length=o)}for(leti=0;i<t;++i)M.pack(e[i],n,i*4);returnn};M.unpackArray=function(e,n){if(s.defined("array",e),s.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!==0)thrownewj("array length must be a multiple of 4.");lett=e.length;p(n)?n.length=t/4:n=newArray(t/4);for(leto=0;o<t;o+=4){leti=o/4;n[i]=M.unpack(e,o,n[i])}returnn};M.fromArray=M.unpack;M.maximumComponent=function(e){returns.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z,e.w)};M.minimumComponent=function(e){returns.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z,e.w)};M.minimumByComponent=function(e,n,t){returns.typeOf.object("first",e),s.typeOf.object("second",n),s.typeOf.object("result",t),t.x=Math.min(e.x,n.x),t.y=Math.min(e.y,n.y),t.z=Math.min(e.z,n.z),t.w=Math.min(e.w,n.w),t};M.maximumByComponent=function(e,n,t){returns.typeOf.object("first",e),s.typeOf.object("second",n),s.typeOf.object("result",t),t.x=Math.max(e.x,n.x),t.y=Math.max(e.y,n.y),t.z=Math.max(e.z,n.z),t.w=Math.max(e.w,n.w),t};M.clamp=function(e,n,t,o){s.typeOf.object("value",e),s.typeOf.object("min",n),s.typeOf.object("max",t),s.typeOf.object("result",o);leti=E.clamp(e.x,n.x,t.x),r=E.clamp(e.y,n.y,t.y),a=E.clamp(e.z,n.z,t.z),u=E.clamp(e.w,n.w,t.w);returno.x=i,o.y=r,o.z=a,o.w=u,o};M.magnitudeSquared=function(e){returns.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};M.magnitude=function(e){returnMath.sqrt(M.magnitudeSquared(e))};varEn=newM;M.distance=function(e,n){returns.typeOf.object("left",e),s.typeOf.object("right",n),M.subtract(e,n,En),M.magnitude(En)};M.distanceSquared=function(e,n){returns.typeOf.object("left",e),s.typeOf.object("right",n),M.subtract(e,n,En),M.magnitudeSquared(En)};M.normalize=function(e,n){s.typeOf.object("cartesian",e),s.typeOf.object("result",n);lett=M.magnitude(e);if(n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,isNaN(n.x)||isNaN(n.y)||isNaN(n.z)||isNaN(n.w))thrownewj("normalized result is not a number");returnn};M.dot=function(e,n){returns.typeOf.object("left",e),s.typeOf.object("right",n),e.x*n.x+e.y*n.y+e.z*n.z+e.w*n.w};M.multiplyComponents=function(e,n,t){returns.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t.x=e.x*n.x,t.y=e.y*n.y,t.z=e.z*n.z,t.w=e.w*n.w,t};M.divideComponents=function(e,n,t){returns.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t.x=e.x/n.x,t.y=e.y/n.y,t.z=e.z/n.z,t.w=e.w/n.w,t};M.add=function(e,n,t){returns.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t.x=e.x+n.x,t.y=e.y+n.y,t.z=e.z+n.z,t.w=e.w+n.w,t};M.subtract=function(e,n,t){returns.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t.x=e.x-n.x,t.y=e.y-n.y,t.z=e.z-n.z,t.w=e.w-n.w,t};M.multiplyByScalar=function(e,n,t){returns.typeOf.object("cartesian",e),s.typeOf.number("scalar",n),s.typeOf.object("result",t),t.x=e.x*n,t.y=e.y*n,t.z=e.z*n,t.w=e.w*n,t};M.divideByScalar=function(e,n,t){returns.typeOf.object("cartesian",e),s.typeOf.number("scalar",n),s.typeOf.object("result",t),t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t.w=e.w/n,t};M.negate=function(e,n){returns.typeOf.object("cartesian",e),s.typeOf.object("result",n),n.x=-e.x,n.y=-e.y,n.z=-e.z,n.w=-e.w,n};M.abs=function(e,n){returns.typeOf.object("cartesian",e),s.typeOf.object("result",n),n.x=Math.abs(e.x),n.y=Math.abs(e.y),n.z=Math.abs(e.z),n.w=Math.abs(e.w),n};varEt=newM;M.lerp=function(e,n,t,o){returns.typeOf.object("start",e),s.typeOf.object("end",n),s.typeOf.number("t",t),s.typeOf.object("result",o),M.multiplyByScalar(n,t,Et),o=M.multiplyByScalar(e,1-t,o),M.add(Et,o,o)};varzo=newM;M.mostOrthogonalAxis=function(e,n){s.typeOf.object("cartesian",e),s.typeOf.object("result",n);lett=M.normalize(e,zo);returnM.abs(t,t),t.x<=t.y?t.x<=t.z?t.x<=t.w?n=M.clone(M.UNIT_X,n):n=M.clone(M.UNIT_W,n):t.z<=t.w?n=M.clone(M.UNIT_Z,n):n=M.clone(M.UNIT_W,n):t.y<=t.z?t.y<=t.w?n=M.clone(M.UNIT_Y,n):n=M.clone(M.UNIT_W,n):t.z<=t.w?n=M.clone(M.UNIT_Z,n):n=M.clone(M.UNIT_W,n),n};M.equals=function(e,n){returne===n||p(e)&&p(n)&&e.x===n.x&&e.y===n.y&&e.z===n.z&&e.w===n.w};M.equalsArray=function(e,n,t){returne.x===n[t]&&e.y===n[t+1]&&e.z===n[t+2]&&e.w===n[t+3]};M.equalsEpsilon=function(e,n,t,o){returne===n||p(e)&&p(n)&&E.equalsEpsilon(e.x,n.x,t,o)&&E.equalsEpsilon(e.y,n.y,t,o)&&E.equalsEpsilon(e.z,n.z,t,o)&&E.equalsEpsilon(e.w,n.w,t,o)};M.ZERO=Object.freeze(newM(0,0,0,0));M.ONE=Object.freeze(newM(1,1,1,1));M.UNIT_X=Object.freeze(newM(1,0,0,0));M.UNIT_Y=Object.freeze(newM(0,1,0,0));M.UNIT_Z=Object.freeze(newM(0,0,1,0));M.UNIT_W=Object.freeze(newM(0,0,0,1));M.prototype.clone=function(e){returnM.clone(this,e)};M.prototype.equals=function(e){returnM.equals(this,e)};M.prototype.equalsEpsilon=function(e,n,t){returnM.equalsEpsilon(this,e,n,t)};M.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};varJn=newFloat32Array(1),le=newUint8Array(Jn.buffer),Io=newUint32Array([287454020]),qo=newUint8Array(Io.buffer),Tt=qo[0]===68;M.packFloat=function(e,n){returns.typeOf.number("value",e),p(n)||(n=newM),Jn[0]=e,Tt?(n.x=le[0],n.y=le[1],n.z=le[2],n.w=le[3]):(n.x=le[3],n.y=le[2],n.z=le[1],n.w=le[0]),n};M.unpackFloat=function(e){returns.typeOf.object("packedFloat",e),Tt?(le[0]=e.x,le[1]=e.y,le[2]=e.z,le[3]=e.w):(le[0]=e.w,le[1]=e.z,le[2]=e.y,le[3]=e.x),Jn[0]};varqe=M;functionS(e,n,t,o,i,r,a,u,d,m,l,w,T,C,P,A){this[0]=O(e,0),this[1]=O(i,0),this[2]=O(d,0),this[3]=O(T,0),this[4]=O(n,0),this[5]=O(r,0),this[6]=O(m,0),this[7]=O(C,0),this[8]=O(t,0),this[9]=O(a,0),this[10]=O(l,0),this[11]=O(P,0),this[12]=O(o,0),this[13]=O(u,0),this[14]=O(w,0),this[15]=O(A,0)}S.packedLength=16;S.pack=function(e,n,t){returns.typeOf.object("value",e),s.defined("array",n),t=O(t,0),n[t++]=e[0],n[t++]=e[1],n[t++]=e[2],n[t++]=e[3],n[t++]=e[4],n[t++]=e[5],n[t++]=e[6],n[t++]=e[7],n[t++]=e[8],n[t++]=e[9],n[t++]=e[10],n[t++]=e[11],n[t++]=e[12],n[t++]=e[13],n[t++]=e[14],n[t]=e[15],n};S.unpack=function(e,n,t){returns.defined("array",e),n=O(n,0),p(t)||(t=newS),t[0]=e[n++],t[1]=e[n++],t[2]=e[n++],t[3]=e[n++],t[4]=e[n++],t[5]=e[n++],t[6]=e[n++],t[7]=e[n++],t[8]=e[n++],t[9]=e[n++],t[10]=e[n++],t[11]=e[n++],t[12]=e[n++],t[13]=e[n++],t[14]=e[n++],t[15]=e[n],t};S.packArray=function(e,n){s.defined("array",e);lett=e.length,o=t*16;if(!p(n))n=newArray(o);else{if(!Array.isArray(n)&&n.length!==o)thrownewj("If result is a typed array, it must have exactly array.length * 16 elements");n.length!==o&&(n.length=o)}for(leti=0;i<t;++i)S.pack(e[i],n,i*16);returnn};S.unpackArray=function(e,n){if(s.defined("array",e),s.typeOf.number.greaterThanOrEquals("array.length",e.length,16),e.length%16!==0)thrownewj("array length must be a multiple of 16.");lett=e.length;p(n)?n.length=t/16:n=newArray(t/16);for(leto=0;o<t;o+=16){leti=o/16;n[i]=S.unpack(e,o,n[i])}returnn};S.clone=function(e,n){if(p(e))returnp(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n):newS(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])};S.fromArray=S.unpack;S.fromColumnMajorArray=function(e,n){returns.defined("values",e),S.clone(e,n)};S.fromRowMajorArray=function(e,n){returns.defined("values",e),p(n)?(n[0]=e[0],n[1]=e[4],n[2]=e[8],n[3]=e[12],n[4]=e[1],n[5]=e[5],n[6]=e[9],n[7]=e[13],n[8]=e[2],n[9]=e[6],n[10]=e[10],n[11]=e[14],n[12]=e[3],n[13]=e[7],n[14]=e[11],n[15]=e[15],n):newS(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])};S.fromRotationTranslation=function(e,n,t){returns.typeOf.object("rotation",e),n=O(n,_.ZERO),p(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=n.x,t[13]=n.y,t[14]=n.z,t[15]=1,t):newS(e[0],e[3],e[6],n.x,e[1],e[4],e[7],n.y,e[2],e[5],e[8],n.z,0,0,0,1)};S.fromTranslationQuaternionRotationScale=function(e,n,t,o){s.typeOf.object("translation",e),s.typeOf.object("rotation",n),s.typeOf.object("scale",t),p(o)||(o=newS);leti=t.x,r=t.y,a=t.z,u=n.x*n.x,d=n.x*n.y,m=n.x*n.z,l=n.x*n.w,w=n.y*n.y,T=n.y*n.z,C=n.y*n.w,P=n.z*n.z,A=n.z*n.w,q=n.w*n.w,k=u-w-P+q,L=2*(d-A),F=2*(m+C),B=2*(d+A),W=-u+w-P+q,H=2*(T-l),ee=2*(m-C),re=2*(T+l),Z=-u-w+P+q;returno[0]=k*i,o[1]=B*i,o[2]=ee*i,o[3]=0,o[4]=L*r,o[5]=W*r,o[6]=re*r,o[7]=0,o[8]=F*a,o[9]=H*a,o[10]=Z*a,o[11]=0,o[12]=e.x,o[13]=e.y,o[14]=e.z,o[15]=1,o};S.fromTranslationRotationScale=function(e,n){returns.typeOf.object("translationRotationScale",e),S.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,n)};S.fromTranslation=function(e,n){returns.typeOf.object("translation",e),S.fromRotationTranslation(Q.IDENTITY,e,n)};S.fromScale=function(e,n){returns.typeOf.object("scale",e),p(n)?(n[0]=e.x,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=e.y,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=e.z,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):newS(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)};S.fromUniformScale=function(e,n){returns.typeOf.number("scale",e),p(n)?(n[0]=e,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=e,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=e,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):newS(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};S.fromRotation=function(e,n){returns.typeOf.object("rotation",e),p(n)||(n=newS),n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=0,n[4]=e[3],n[5]=e[4],n[6]=e[5],n[7]=0,n[8]=e[6],n[9]=e[7],n[10]=e[8],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n};varJe=new_,Ge=new_,pn=new_;S.fromCamera=function(e,n){s.typeOf.object("camera",e);lett=e.position,o=e.direction,i=e.up;s.typeOf.object("camera.position",t),s.typeOf.object("camera.direction",o),s.typeOf.object("camera.up",i),_.normalize(o,Je),_.normalize(_.cross(Je,i,Ge),Ge),_.normalize(_.cross(Ge,Je,pn),pn);letr=Ge.x,a=Ge.y,u=Ge.z,d=Je.x,m=Je.y,l=Je.z,w=pn.x,T=pn.y,C=pn.z,P=t.x,A=t.y,q=t.z,k=r*-P+a*-A+u*-q,L=w*-P+T*-A+C*-q,F=d*P+m*A+l*q;returnp(n)?(n[0]=r,n[1]=w,n[2]=-d,n[3]=0,n[4]=a,n[5]=T,n[6]=-m,n[7]=0,n[8]=u,n[9]=C,n[10]=-l,n[11]=0,n[12]=k,n[13]=L,n[14]=F,n[15]=1,n):newS(r,a,u,k,w,T,C,L,-d,-m,-l,F,0,0,0,1)};S.computePerspectiveFieldOfView=function(e,n,t,o,i){s.typeOf.number.greaterThan("fovY",e,0),s.typeOf.number.lessThan("fovY",e,Math.PI),s.typeOf.number.greaterThan("near",t,0),s.typeOf.number.greaterThan("far",o,0),s.typeOf.object("result",i);leta=1/Math.tan(e*.5),u=a/n,d=(o+t)/(t-o),m=2*o*t/(t-o);returni[0]=u,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=a,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=d,i[11]=-1,i[12]=0,i[13]=0,i[14]=m,i[15]=0,i};S.computeOrthographicOffCenter=function(e,n,t,o,i,r,a){s.typeOf.number("left",e),s.typeOf.number("right",n),s.typeOf.number("bottom",t),s.typeOf.number("top",o),s.typeOf.number("near",i),s.typeOf.number("far",r),s.typeOf.object("result",a);letu=1/(n-e),d=1/(o-t),m=1/(r-i),l=-(n+e)*u,w=-(o+t)*d,T=-(r+i)*m;returnu*=2,d*=2,m*=-2,a[0]=u,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=d,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=m,a[11]=0,a[12]=l,a[13]=w,a[14]=T,a[15]=1,a};S.computePerspectiveOffCenter=function(e,n,t,o,i,r,a){s.typeOf.number("left",e),s.typeOf.number("right",n),s.typeOf.number("bottom",t),s.typeOf.number("top",o),s.typeOf.number("near",i),s.typeOf.number("far",r),s.typeOf.object("result",a);letu=2*i/(n-e),d=2*i/(o-t),m=(n+e)/(n-e),l=(o+t)/(o-t),w=-(r+i)/(r-i),T=-1,C=-2*r*i/(r-i);returna[0]=u,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=d,a[6]=0,a[7]=0,a[8]=m,a[9]=l,a[10]=w,a[11]=T,a[12]=0,a[13]=0,a[14]=C,a[15]=0,a};S.computeInfinitePerspectiveOffCenter=function(e,n,t,o,i,r){s.typeOf.number("left",e),s.typeOf.number("right",n),s.typeOf.number("bottom",t),s.typeOf.number("top",o),s.typeOf.number("near",i),s.typeOf.object("result",r);leta=2*i/(n-e),u=2*i/(o-t),d=(n+e)/(n-e),m=(o+t)/(o-t),l=-1,w=-1,T=-2*i;returnr[0]=a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=u,r[6]=0,r[7]=0,r[8]=d,r[9]=m,r[10]=l,r[11]=w,r[12]=0,r[13]=0,r[14]=T,r[15]=0,r};S.computeViewportTransformation=function(e,n,t,o){p(o)||(o=newS),e=O(e,O.EMPTY_OBJECT);leti=O(e.x,0),r=O(e.y,0),a=O(e.width,0),u=O(e.height,0);n=O(n,0),t=O(t,1);letd=a*.5,m=u*.5,l=(t-n)*.5,w=d,T=m,C=l,P=i+d,A=r+m,q=n+l,k=1;returno[0]=w,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=T,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=C,o[11]=0,o[12]=P,o[13]=A,o[14]=q,o[15]=k,o};S.computeView=function(e,n,t,o,i){returns.typeOf.object("position",e),s.typeOf.object("direction",n),s.typeOf.object("up",t),s.typeOf.object("right",o),s.typeOf.object("result",i),i[0]=o.x,i[1]=t.x,i[2]=-n.x,i[3]=0,i[4]=o.y,i[5]=t.y,i[6]=-n.y,i[7]=0,i[8]=o.z,i[9]=t.z,i[10]=-n.z,i[11]=0,i[12]=-_.dot(o,e),i[13]=-_.dot(t,e),i[14]=_.dot(n,e),i[15]=1,i};S.toArray=function(e,n){returns.typeOf.object("matrix",e),p(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]};S.getElementIndex=function(e,n){returns.typeOf.number.greaterThanOrEquals("row",n,0),s.typeOf.number.lessThanOrEquals("row",n,3),s.typeOf.number.greaterThanOrEquals("column",e,0),s.typeOf.number.lessThanOrEquals("column",e,3),e*4+n};S.getColumn=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,3),s.typeOf.object("result",t);leto=n*4,i=e[o],r=e[o+1],a=e[o+2],u=e[o+3];returnt.x=i,t.y=r,t.z=a,t.w=u,t};S.setColumn=function(e,n,t,o){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,3),s.typeOf.object("cartesian",t),s.typeOf.object("result",o),o=S.clone(e,o);leti=n*4;returno[i]=t.x,o[i+1]=t.y,o[i+2]=t.z,o[i+3]=t.w,o};S.getRow=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,3),s.typeOf.object("result",t);leto=e[n],i=e[n+4],r=e[n+8],a=e[n+12];returnt.x=o,t.y=i,t.z=r,t.w=a,t};S.setRow=function(e,n,t,o){returns.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,3),s.typeOf.object("cartesian",t),s.typeOf.object("result",o),o=S.clone(e,o),o[n]=t.x,o[n+4]=t.y,o[n+8]=t.z,o[n+12]=t.w,o};S.setTranslation=function(e,n,t){returns.typeOf.object("matrix",e),s.typeOf.object("translation",n),s.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=n.x,t[13]=n.y,t[14]=n.z,t[15]=e[15],t};varDo=new_;S.setScale=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("scale",n),s.typeOf.object("result",t);leto=S.getScale(e,Do),i=n.x/o.x,r=n.y/o.y,a=n.z/o.z;returnt[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3],t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7],t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t};varNo=new_;S.setUniformScale=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.number("scale",n),s.typeOf.object("result",t);leto=S.getScale(e,No),i=n/o.x,r=n/o.y,a=n/o.z;returnt[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3],t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7],t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t};varGn=new_;S.getScale=function(e,n){returns.typeOf.object("matrix",e),s.typeOf.object("result",n),n.x=_.magnitude(_.fromElements(e[0],e[1],e[2],Gn)),n.y=_.magnitude(_.fromElements(e[4],e[5],e[6],Gn)),n.z=_.magnitude(_.fromElements(e[8],e[9],e[10],Gn)),n};varCt=new_;S.getMaximumScale=function(e){returnS.getScale(e,Ct),_.maximumComponent(Ct)};varko=new_;S.setRotation=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("result",t);leto=S.getScale(e,ko);returnt[0]=n[0]*o.x,t[1]=n[1]*o.x,t[2]=n[2]*o.x,t[3]=e[3],t[4]=n[3]*o.y,t[5]=n[4]*o.y,t[6]=n[5]*o.y,t[7]=e[7],t[8]=n[6]*o.z,t[9]=n[7]*o.z,t[10]=n[8]*o.z,t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t};varFo=new_;S.getRotation=function(e,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);lett=S.getScale(e,Fo);returnn[0]=e[0]/t.x,n[1]=e[1]/t.x,n[2]=e[2]/t.x,n[3]=e[4]/t.y,n[4]=e[5]/t.y,n[5]=e[6]/t.y,n[6]=e[8]/t.z,n[7]=e[9]/t.z,n[8]=e[10]/t.z,n};S.multiply=function(e,n,t){s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t);leto=e[0],i=e[1],r=e[2],a=e[3],u=e[4],d=e[5],m=e[6],l=e[7],w=e[8],T=e[9],C=e[10],P=e[11],A=e[12],q=e[13],k=e[14],L=e[15],F=n[0],B=n[1],W=n[2],H=n[3],ee=n[4],re=n[5],Z=n[6],oe=n[7],J=n[8],c=n[9],f=n[10],h=n[11],y=n[12],g=n[13],v=n[14],b=n[15],I=o*F+u*B+w*W+A*H,N=i*F+d*B+T*W+q*H,Y=r*F+m*B+C*W+k*H,ie=a*F+l*B+P*W+L*H,ae=o*ee+u*re+w*Z+A*oe,ne=i*ee+d*re+T*Z+q*oe,ue=r*ee+m*re+C*Z+k*oe,de=a*ee+l*re+P*Z+L*oe,ye=o*J+u*c+w*f+A*h,me=i*J+d*c+T*f+q*h,he=r*J+m*c+C*f+k*h,X=a*J+l*c+P*f+L*h,_e=o*y+u*g+w*v+A*b,Te=i*y+d*g+T*v+q*b,je=r*y+m*g+C*v+k*b,fn=a*y+l*g+P*v+L*b;returnt[0]=I,t[1]=N,t[2]=Y,t[3]=ie,t[4]=ae,t[5]=ne,t[6]=ue,t[7]=de,t[8]=ye,t[9]=me,t[10]=he,t[11]=X,t[12]=_e,t[13]=Te,t[14]=je,t[15]=fn,t};S.add=function(e,n,t){returns.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t};S.subtract=function(e,n,t){returns.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t};S.multiplyTransformation=function(e,n,t){s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t);leto=e[0],i=e[1],r=e[2],a=e[4],u=e[5],d=e[6],m=e[8],l=e[9],w=e[10],T=e[12],C=e[13],P=e[14],A=n[0],q=n[1],k=n[2],L=n[4],F=n[5],B=n[6],W=n[8],H=n[9],ee=n[10],re=n[12],Z=n[13],oe=n[14],J=o*A+a*q+m*k,c=i*A+u*q+l*k,f=r*A+d*q+w*k,h=o*L+a*F+m*B,y=i*L+u*F+l*B,g=r*L+d*F+w*B,v=o*W+a*H+m*ee,b=i*W+u*H+l*ee,I=r*W+d*H+w*ee,N=o*re+a*Z+m*oe+T,Y=i*re+u*Z+l*oe+C,ie=r*re+d*Z+w*oe+P;returnt[0]=J,t[1]=c,t[2]=f,t[3]=0,t[4]=h,t[5]=y,t[6]=g,t[7]=0,t[8]=v,t[9]=b,t[10]=I,t[11]=0,t[12]=N,t[13]=Y,t[14]=ie,t[15]=1,t};S.multiplyByMatrix3=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("rotation",n),s.typeOf.object("result",t);leto=e[0],i=e[1],r=e[2],a=e[4],u=e[5],d=e[6],m=e[8],l=e[9],w=e[10],T=n[0],C=n[1],P=n[2],A=n[3],q=n[4],k=n[5],L=n[6],F=n[7],B=n[8],W=o*T+a*C+m*P,H=i*T+u*C+l*P,ee=r*T+d*C+w*P,re=o*A+a*q+m*k,Z=i*A+u*q+l*k,oe=r*A+d*q+w*k,J=o*L+a*F+m*B,c=i*L+u*F+l*B,f=r*L+d*F+w*B;returnt[0]=W,t[1]=H,t[2]=ee,t[3]=0,t[4]=re,t[5]=Z,t[6]=oe,t[7]=0,t[8]=J,t[9]=c,t[10]=f,t[11]=0,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t};S.multiplyByTranslation=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("translation",n),s.typeOf.object("result",t);leto=n.x,i=n.y,r=n.z,a=o*e[0]+i*e[4]+r*e[8]+e[12],u=o*e[1]+i*e[5]+r*e[9]+e[13],d=o*e[2]+i*e[6]+r*e[10]+e[14];returnt[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=a,t[13]=u,t[14]=d,t[15]=e[15],t};S.multiplyByScale=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("scale",n),s.typeOf.object("result",t);leto=n.x,i=n.y,r=n.z;returno===1&&i===1&&r===1?S.clone(e,t):(t[0]=o*e[0],t[1]=o*e[1],t[2]=o*e[2],t[3]=e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=i*e[6],t[7]=e[7],t[8]=r*e[8],t[9]=r*e[9],t[10]=r*e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t)};S.multiplyByUniformScale=function(e,n,t){returns.typeOf.object("matrix",e),s.typeOf.number("scale",n),s.typeOf.object("result",t),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3],t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7],t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t};S.multiplyByVector=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("cartesian",n),s.typeOf.object("result",t);leto=n.x,i=n.y,r=n.z,a=n.w,u=e[0]*o+e[4]*i+e[8]*r+e[12]*a,d=e[1]*o+e[5]*i+e[9]*r+e[13]*a,m=e[2]*o+e[6]*i+e[10]*r+e[14]*a,l=e[3]*o+e[7]*i+e[11]*r+e[15]*a;returnt.x=u,t.y=d,t.z=m,t.w=l,t};S.multiplyByPointAsVector=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("cartesian",n),s.typeOf.object("result",t);leto=n.x,i=n.y,r=n.z,a=e[0]*o+e[4]*i+e[8]*r,u=e[1]*o+e[5]*i+e[9]*r,d=e[2]*o+e[6]*i+e[10]*r;returnt.x=a,t.y=u,t.z=d,t};S.multiplyByPoint=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("cartesian",n),s.typeOf.object("result",t);leto=n.x,i=n.y,r=n.z,a=e[0]*o+e[4]*i+e[8]*r+e[12],u=e[1]*o+e[5]*i+e[9]*r+e[13],d=e[2]*o+e[6]*i+e[10]*r+e[14];returnt.x=a,t.y=u,t.z=d,t};S.multiplyByScalar=function(e,n,t){returns.typeOf.object("matrix",e),s.typeOf.number("scalar",n),s.typeOf.object("result",t),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t};S.negate=function(e,n){returns.typeOf.object("matrix",e),s.typeOf.object("result",n),n[0]=-e[0],n[1]=-e[1],n[2]=-e[2],n[3]=-e[3],n[4]=-e[4],n[5]=-e[5],n[6]=-e[6],n[7]=-e[7],n[8]=-e[8],n[9]=-e[9],n[10]=-e[10],n[11]=-e[11],n[12]=-e[12],n[13]=-e[13],n[14]=-e[14],n[15]=-e[15],n};S.transpose=function(e,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);lett=e[1],o=e[2],i=e[3],r=e[6],a=e[7],u=e[11];returnn[0]=e[0],n[1]=e[4],n[2]=e[8],n[3]=e[12],n[4]=t,n[5]=e[5],n[6]=e[9],n[7]=e[13],n[8]=o,n[9]=r,n[10]=e[10],n[11]=e[14],n[12]=i,n[13]=a,n[14]=u,n[15]=e[15],n};S.abs=function(e,n){returns.typeOf.object("matrix",e),s.typeOf.object("result",n),n[0]=Math.abs(e[0]),n[1]=Math.abs(e[1]),n[2]=Math.abs(e[2]),n[3]=Math.abs(e[3]),n[4]=Math.abs(e[4]),n[5]=Math.abs(e[5]),n[6]=Math.abs(e[6]),n[7]=Math.abs(e[7]),n[8]=Math.abs(e[8]),n[9]=Math.abs(e[9]),n[10]=Math.abs(e[10]),n[11]=Math.abs(e[11]),n[12]=Math.abs(e[12]),n[13]=Math.abs(e[13]),n[14]=Math.abs(e[14]),n[15]=Math.abs(e[15]),n};S.equals=function(e,n){returne===n||p(e)&&p(n)&&e[12]===n[12]&&e[13]===n[13]&&e[14]===n[14]&&e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]&&e[4]===n[4]&&e[5]===n[5]&&e[6]===n[6]&&e[8]===n[8]&&e[9]===n[9]&&e[10]===n[10]&&e[3]===n[3]&&e[7]===n[7]&&e[11]===n[11]&&e[15]===n[15]};S.equalsEpsilon=function(e,n,t){returnt=O(t,0),e===n||p(e)&&p(n)&&Math.abs(e[0]-n[0])<=t&&Math.abs(e[1]-n[1])<=t&&Math.abs(e[2]-n[2])<=t&&Math.abs(e[3]-n[3])<=t&&Math.abs(e[4]-n[4])<=t&&Math.abs(e[5]-n[5])<=t&&Math.abs(e[6]-n[6])<=t&&Math.abs(e[7]-n[7])<=t&&Math.abs(e[8]-n[8])<=t&&Math.abs(e[9]-n[9])<=t&&Math.abs(e[10]-n[10])<=t&&Math.abs(e[11]-n[11])<=t&&Math.abs(e[12]-n[12])<=t&&Math.abs(e[13]-n[13])<=t&&Math.abs(e[14]-n[14])<=t&&Math.abs(e[15]-n[15])<=t};S.getTranslation=function(e,n){returns.typeOf.object("matrix",e),s.typeOf.object("result",n),n.x=e[12],n.y=e[13],n.z=e[14],n};S.getMatrix3=function(e,n){returns.typeOf.object("matrix",e),s.typeOf.object("result",n),n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[4],n[4]=e[5],n[5]=e[6],n[6]=e[8],n[7]=e[9],n[8]=e[10],n};varLo=newQ,xo=newQ,Bo=newqe,Qo=newqe(0,0,0,1);S.inverse=function(e,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);lett=e[0],o=e[4],i=e[8],r=e[12],a=e[1],u=e[5],d=e[9],m=e[13],l=e[2],w=e[6],T=e[10],C=e[14],P=e[3],A=e[7],q=e[11],k=e[15],L=T*k,F=C*q,B=w*k,W=C*A,H=w*q,ee=T*A,re=l*k,Z=C*P,oe=l*q,J=T*P,c=l*A,f=w*P,h=L*u+W*d+H*m-(F*u+B*d+ee*m),y=F*a+re*d+J*m-(L*a+Z*d+oe*m),g=B*a+Z*u+c*m-(W*a+re*u+f*m),v=ee*a+oe*u+f*d-(H*a+J*u+c*d),b=F*o+B*i+ee*r-(L*o+W*i+H*r),I=L*t+Z*i+oe*r-(F*t+re*i+J*r),N=W*t+re*o+f*r-(B*t+Z*o+c*r),Y=H*t+J*o+c*i-(ee*t+oe*o+f*i);L=i*m,F=r*d,B=o*m,W=r*u,H=o*d,ee=i*u,re=t*m,Z=r*a,oe=t*d,J=i*a,c=t*u,f=o*a;letie=L*A+W*q+H*k-(F*A+B*q+ee*k),ae=F*P+re*q+J*k-(L*P+Z*q+oe*k),ne=B*P+Z*A+c*k-(W*P+re*A+f*k),ue=ee*P+oe*A+f*q-(H*P+J*A+c*q),de=B*T+ee*C+F*w-(H*C+L*w+W*T),ye=oe*C+L*l+Z*T-(re*T+J*C+F*l),me=re*w+f*C+W*l-(c*C+B*l+Z*w),he=c*T+H*l+J*w-(oe*w+f*T+ee*l),X=t*h+o*y+i*g+r*v;if(Math.abs(X)<E.EPSILON21){if(Q.equalsEpsilon(S.getMatrix3(e,Lo),xo,E.EPSILON7)&&qe.equals(S.getRow(e,3,Bo),Qo))returnn[0]=0,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=0,n[11]=0,n[12]=-e[12],n[13]=-e[13],n[14]=-e[14],n[15]=1,n;thrownewSe("matrix is not invertible because its determinate is zero.")}returnX=1/X,n[0]=h*X,n[1]=y*X,n[2]=g*X,n[3]=v*X,n[4]=b*X,n[5]=I*X,n[6]=N*X,n[7]=Y*X,n[8]=ie*X,n[9]=ae*X,n[10]=ne*X,n[11]=ue*X,n[12]=de*X,n[13]=ye*X,n[14]=me*X,n[15]=he*X,n};S.inverseTransformation=function(e,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);lett=e[0],o=e[1],i=e[2],r=e[4],a=e[5],u=e[6],d=e[8],m=e[9],l=e[10],w=e[12],T=e[13],C=e[14],P=-t*w-o*T-i*C,A=-r*w-a*T-u*C,q=-d*w-m*T-l*C;returnn[0]=t,n[1]=r,n[2]=d,n[3]=0,n[4]=o,n[5]=a,n[6]=m,n[7]=0,n[8]=i,n[9]=u,n[10]=l,n[11]=0,n[12]=P,n[13]=A,n[14]=q,n[15]=1,n};varWo=newS;S.inverseTranspose=function(e,n){returns.typeOf.object("matrix",e),s.typeOf.object("result",n),S.inverse(S.transpose(e,Wo),n)};S.IDENTITY=Object.freeze(newS(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1));S.ZERO=Object.freeze(newS(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0));S.COLUMN0ROW0=0;S.COLUMN0ROW1=1;S.COLUMN0ROW2=2;S.COLUMN0ROW3=3;S.COLUMN1ROW0=4;S.COLUMN1ROW1=5;S.COLUMN1ROW2=6;S.COLUMN1ROW3=7;S.COLUMN2ROW0=8;S.COLUMN2ROW1=9;S.COLUMN2ROW2=10;S.COLUMN2ROW3=11;S.COLUMN3ROW0=12;S.COLUMN3ROW1=13;S.COLUMN3ROW2=14;S.COLUMN3ROW3=15;Object.defineProperties(S.prototype,{length:{get:function(){returnS.packedLength}}});S.prototype.clone=function(e){returnS.clone(this,e)};S.prototype.equals=function(e){returnS.equals(this,e)};S.equalsArray=function(e,n,t){returne[0]===n[t]&&e[1]===n[t+1]&&e[2]===n[t+2]&&e[3]===n[t+3]&&e[4]===n[t+4]&&e[5]===n[t+5]&&e[6]===n[t+6]&&e[7]===n[t+7]&&e[8]===n[t+8]&&e[9]===n[t+9]&&e[10]===n[t+10]&&e[11]===n[t+11]&&e[12]===n[t+12]&&e[13]===n[t+13]&&e[14]===n[t+14]&&e[15]===n[t+15]};S.prototype.equalsEpsilon=function(e,n){returnS.equalsEpsilon(this,e,n)};S.prototype.toString=function(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})
(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`};varG=S;functionvt(e,n,t){t=O(t,!1);leto={},i=p(e),r=p(n),a,u,d;if(i)for(aine)e.hasOwnProperty(a)&&(u=e[a],r&&t&&typeofu=="object"&&n.hasOwnProperty(a)?(d=n[a],typeofd=="object"?o[a]=vt(u,d,t):o[a]=u):o[a]=u);if(r)for(ainn)n.hasOwnProperty(a)&&!o.hasOwnProperty(a)&&(d=n[a],o[a]=d);returno}varDe=vt;functionHo(e,n,t){s.defined("array",e),s.defined("itemToFind",n),s.defined("comparator",t);leto=0,i=e.length-1,r,a;for(;o<=i;){if(r=~~((o+i)/2),a=t(e[r],n),a<0){o=r+1;continue}if(a>0){i=r-1;continue}returnr}return~(i+1)}varBe=Ho;function$o(e,n,t,o,i){this.xPoleWander=e,this.yPoleWander=n,this.xPoleOffset=t,this.yPoleOffset=o,this.ut1MinusUtc=i}varhn=$o;functionVo(e){if(e===null||isNaN(e))thrownewj("year is required and must be a number.");returne%4===0&&e%100!==0||e%400===0}vardn=Vo;varAt=[31,28,31,30,31,30,31,31,30,31,30,31];functionYo(e,n,t,o,i,r,a,u){e=O(e,1),n=O(n,1),t=O(t,1),o=O(o,0),i=O(i,0),r=O(r,0),a=O(a,0),u=O(u,!1),A(),q(),this.year=e,this.month=n,this.day=t,this.hour=o,this.minute=i,this.second=r,this.millisecond=a,this.isLeapSecond=u;functionA(){s.typeOf.number.greaterThanOrEquals("Year",e,1),s.typeOf.number.lessThanOrEquals("Year",e,9999),s.typeOf.number.greaterThanOrEquals("Month",n,1),s.typeOf.number.lessThanOrEquals("Month",n,12),s.typeOf.number.greaterThanOrEquals("Day",t,1),s.typeOf.number.lessThanOrEquals("Day",t,31),s.typeOf.number.greaterThanOrEquals("Hour",o,0),s.typeOf.number.lessThanOrEquals("Hour",o,23),s.typeOf.number.greaterThanOrEquals("Minute",i,0),s.typeOf.number.lessThanOrEquals("Minute",i,59),s.typeOf.bool("IsLeapSecond",u),s.typeOf.number.greaterThanOrEquals("Second",r,0),s.typeOf.number.lessThanOrEquals("Second",r,u?60:59),s.typeOf.number.greaterThanOrEquals("Millisecond",a,0),s.typeOf.number.lessThan("Millisecond",a,1e3)}functionq(){letk=n===2&&dn(e)?At[n-1]+1:At[n-1];if(t>k)thrownewj("Month and Day represents invalid date")}}varTn=Yo;functionXo(e,n){this.julianDate=e,this.offset=n}varte=Xo;varZo={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:24000005e-1},ce=Object.freeze(Zo);varJo={UTC:0,TAI:1},$=Object.freeze(Jo);varMt=newTn,Cn=[31,28,31,30,31,30,31,31,30,31,30,31],vn=29;functionKn(e,n){returnz.compare(e.julianDate,n.julianDate)}varKe=newte;functionjn(e){Ke.julianDate=e;letn=z.leapSeconds,t=Be(n,Ke,Kn);t<0&&(t=~t),t>=n.length&&(t=n.length-1);leto=n[t].offset;t>0&&z.secondsDifference(n[t].julianDate,e)>o&&(t--,o=n[t].offset),z.addSeconds(e,o,e)}functionjt(e,n){Ke.julianDate=e;lett=z.leapSeconds,o=Be(t,Ke,Kn);if(o<0&&(o=~o),o===0)returnz.addSeconds(e,-t[0].offset,n);if(o>=t.length)returnz.addSeconds(e,-t[o-1].offset,n);leti=z.secondsDifference(t[o].julianDate,e);if(i===0)returnz.addSeconds(e,-t[o].offset,n);if(!(i<=1))returnz.addSeconds(e,-t[--o].offset,n)}functionNe(e,n,t){leto=n/ce.SECONDS_PER_DAY|0;returne+=o,n-=ce.SECONDS_PER_DAY*o,n<0&&(e--,n+=ce.SECONDS_PER_DAY),t.dayNumber=e,t.secondsOfDay=n,t}functionet(e,n,t,o,i,r,a){letu=(n-14)/12|0,d=e+4800+u,m=(1461*d/4|0)+(367*(n-2-12*u)/12|0)-(3*((d+100)/100|0)/4|0)+t-32075;o=o-12,o<0&&(o+=24);letl=r+(o*ce.SECONDS_PER_HOUR+i*ce.SECONDS_PER_MINUTE+a*ce.SECONDS_PER_MILLISECOND);returnl>=43200&&(m-=1),[m,l]}varGo=/^(\d{4})$/,Ko=/^(\d{4})-(\d{2})$/,er=/^(\d{4})-?(\d{3})$/,nr=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,tr=/^(\d{4})-?(\d{2})-?(\d{2})$/,nt=/([Z+\-])?(\d{2})?:?(\d{2})?$/,or=/^(\d{2})(\.\d+)?/.source+nt.source,rr=/^(\d{2}):?(\d{2})(\.\d+)?/.source+nt.source,ir=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+nt.source,Re="Invalid ISO 8601 date.";functionz(e,n,t){this.dayNumber=void0,this.secondsOfDay=void0,e=O(e,0),n=O(n,0),t=O(t,$.UTC);leto=e|0;n=n+(e-o)*ce.SECONDS_PER_DAY,Ne(o,n,this),t===$.UTC&&jn(this)}z.fromGregorianDate=function(e,n){if(!(einstanceofTn))thrownewj("date must be a valid GregorianDate.");lett=et(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);returnp(n)?(Ne(t[0],t[1],n),jn(n),n):newz(t[0],t[1],$.UTC)};z.fromDate=function(e,n){if(!(einstanceofDate)||isNaN(e.getTime()))thrownewj("date must be a valid JavaScript Date.");lett=et(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());returnp(n)?(Ne(t[0],t[1],n),jn(n),n):newz(t[0],t[1],$.UTC)};z.fromIso8601=function(e,n){if(typeofe!="string")thrownewj(Re);e=e.replace(",",".");lett=e.split("T"),o,i=1,r=1,a=0,u=0,d=0,m=0,l=t[0],w=t[1],T,C;if(!p(l))thrownewj(Re);letP;if(t=l.match(tr),t!==null){if(P=l.split("-").length-1,P>0&&P!==2)thrownewj(Re);o=+t[1],i=+t[2],r=+t[3]}elseif(t=l.match(Ko),t!==null)o=+t[1],i=+t[2];elseif(t=l.match(Go),t!==null)o=+t[1];else{letL;if(t=l.match(er),t!==null){if(o=+t[1],L=+t[2],C=dn(o),L<1||C&&L>366||!C&&L>365)thrownewj(Re)}elseif(t=l.match(nr),t!==null){o=+t[1];letF=+t[2],B=+t[3]||0;if(P=l.split("-").length-1,P>0&&(!p(t[3])&&P!==1||p(t[3])&&P!==2))thrownewj(Re);letW=newDate(Date.UTC(o,0,4));L=F*7+B-W.getUTCDay()-3}elsethrownewj(Re);T=newDate(Date.UTC(o,0,1)),T.setUTCDate(L),i=T.getUTCMonth()+1,r=T.getUTCDate()}if(C=dn(o),i<1||i>12||r<1||(i!==2||!C)&&r>Cn[i-1]||C&&i===2&&r>vn)thrownewj(Re);letA;if(p(w)){if(t=w.match(ir),t!==null){if(P=w.split(":").length-1,P>0&&P!==2&&P!==3)thrownewj(Re);a=+t[1],u=+t[2],d=+t[3],m=+(t[4]||0)*1e3,A=5}elseif(t=w.match(rr),t!==null){if(P=w.split(":").length-1,P>2)thrownewj(Re);a=+t[1],u=+t[2],d=+(t[3]||0)*60,A=4}elseif(t=w.match(or),t!==null)a=+t[1],u=+(t[2]||0)*60,A=3;elsethrownewj(Re);if(u>=60||d>=61||a>24||a===24&&(u>0||d>0||m>0))thrownewj(Re);letL=t[A],F=+t[A+1],B=+(t[A+2]||0);switch(L){case"+":a=a-F,u=u-B;break;case"-":a=a+F,u=u+B;break;case"Z":break;default:u=u+newDate(Date.UTC(o,i-1,r,a,u)).getTimezoneOffset();break}}letq=d===60;for(q&&d--;u>=60;)u-=60,a++;for(;a>=24;)a-=24,r++;for(T=C&&i===2?vn:Cn[i-1];r>T;)r-=T,i++,i>12&&(i-=12,o++),T=C&&i===2?vn:Cn[i-1];for(;u<0;)u+=60,a--;for(;a<0;)a+=24,r--;for(;r<1;)i--,i<1&&(i+=12,o--),T=C&&i===2?vn:Cn[i-1],r+=T;letk=et(o,i,r,a,u,d,m);returnp(n)?(Ne(k[0],k[1],n),jn(n)):n=newz(k[0],k[1],$.UTC),q&&z.addSeconds(n,1,n),n};z.now=function(e){returnz.fromDate(newDate,e)};varAn=newz(0,0,$.TAI);z.toGregorianDate=function(e,n){if(!p(e))thrownewj("julianDate is required.");lett=!1,o=jt(e,An);p(o)||(z.addSeconds(e,-1,An),o=jt(An,An),t=!0);leti=o.dayNumber,r=o.secondsOfDay;r>=43200&&(i+=1);leta=i+68569|0,u=4*a/146097|0;a=a-((146097*u+3)/4|0)|0;letd=4e3*(a+1)/1461001|0;a=a-(1461*d/4|0)+31|0;letm=80*a/2447|0,l=a-(2447*m/80|0)|0;a=m/11|0;letw=m+2-12*a|0,T=100*(u-49)+d+a|0,C=r/ce.SECONDS_PER_HOUR|0,P=r-C*ce.SECONDS_PER_HOUR,A=P/ce.SECONDS_PER_MINUTE|0;P=P-A*ce.SECONDS_PER_MINUTE;letq=P|0,k=(P-q)/ce.SECONDS_PER_MILLISECOND;returnC+=12,C>23&&(C-=24),t&&(q+=1),p(n)?(n.year=T,n.month=w,n.day=l,n.hour=C,n.minute=A,n.second=q,n.millisecond=k,n.isLeapSecond=t,n):newTn(T,w,l,C,A,q,k,t)};z.toDate=function(e){if(!p(e))thrownewj("julianDate is required.");letn=z.toGregorianDate(e,Mt),t=n.second;returnn.isLeapSecond&&(t-=1),newDate(Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,t,n.millisecond))};z.toIso8601=function(e,n){if(!p(e))thrownewj("julianDate is required.");lett=z.toGregorianDate(e,Mt),o=t.year,i=t.month,r=t.day,a=t.hour,u=t.minute,d=t.second,m=t.millisecond;o===1e4&&i===1&&r===1&&a===0&&u===0&&d===0&&m===0&&(o=9999,i=12,r=31,a=24);letl;if(!p(n)&&m!==0){letw=m*.01;returnl=w<1e-6?w.toFixed(20).replace(".","").replace(/0+$/,""):w.toString().replace(".",""),`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}.${l}Z`}return!p(n)||n===0?`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}Z`:(l=(m*.01).toFixed(n).replace(".","").slice(0,n),`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}.${l}Z`)};z.clone=function(e,n){if(p(e))returnp(n)?(n.dayNumber=e.dayNumber,n.secondsOfDay=e.secondsOfDay,n):newz(e.dayNumber,e.secondsOfDay,$.TAI)};z.compare=function(e,n){if(!p(e))thrownewj("left is required.");if(!p(n))thrownewj("right is required.");lett=e.dayNumber-n.dayNumber;returnt!==0?t:e.secondsOfDay-n.secondsOfDay};z.equals=function(e,n){returne===n||p(e)&&p(n)&&e.dayNumber===n.dayNumber&&e.secondsOfDay===n.secondsOfDay};z.equalsEpsilon=function(e,n,t){returnt=O(t,0),e===n||p(e)&&p(n)&&Math.abs(z.secondsDifference(e,n))<=t};z.totalDays=function(e){if(!p(e))thrownewj("julianDate is required.");returne.dayNumber+e.secondsOfDay/ce.SECONDS_PER_DAY};z.secondsDifference=function(e,n){if(!p(e))thrownewj("left is required.");if(!p(n))thrownewj("right is required.");return(e.dayNumber-n.dayNumber)*ce.SECONDS_PER_DAY+(e.secondsOfDay-n.secondsOfDay)};z.daysDifference=function(e,n){if(!p(e))thrownewj("left is required.");if(!p(n))thrownewj("right is required.");lett=e.dayNumber-n.dayNumber,o=(e.secondsOfDay-n.secondsOfDay)/ce.SECONDS_PER_DAY;returnt+o};z.computeTaiMinusUtc=function(e){Ke.julianDate=e;letn=z.leapSeconds,t=Be(n,Ke,Kn);returnt<0&&(t=~t,--t,t<0&&(t=0)),n[t].offset};z.addSeconds=function(e,n,t){if(!p(e))thrownewj("julianDate is required.");if(!p(n))thrownewj("seconds is required.");if(!p(t))thrownewj("result is required.");returnNe(e.dayNumber,e.secondsOfDay+n,t)};z.addMinutes=function(e,n,t){if(!p(e))thrownewj("julianDate is required.");if(!p(n))thrownewj("minutes is required.");if(!p(t))thrownewj("result is required.");leto=e.secondsOfDay+n*ce.SECONDS_PER_MINUTE;returnNe(e.dayNumber,o,t)};z.addHours=function(e,n,t){if(!p(e))thrownewj("julianDate is required.");if(!p(n))thrownewj("hours is required.");if(!p(t))thrownewj("result is required.");leto=e.secondsOfDay+n*ce.SECONDS_PER_HOUR;returnNe(e.dayNumber,o,t)};z.addDays=function(e,n,t){if(!p(e))thrownewj("julianDate is required.");if(!p(n))thrownewj("days is required.");if(!p(t))thrownewj("result is required.");leto=e.dayNumber+n;returnNe(o,e.secondsOfDay,t)};z.lessThan=function(e,n){returnz.compare(e,n)<0};z.lessThanOrEquals=function(e,n){returnz.compare(e,n)<=0};z.greaterThan=function(e,n){returnz.compare(e,n)>0};z.greaterThanOrEquals=function(e,n){returnz.compare(e,n)>=0};z.prototype.clone=function(e){returnz.clone(this,e)};z.prototype.equals=function(e){returnz.equals(this,e)};z.prototype.equalsEpsilon=function(e,n){returnz.equalsEpsilon(this,e,n)};z.prototype.toString=function(){returnz.toIso8601(this)};z.leapSeconds=[newte(newz(2441317,43210,$.TAI),10),newte(newz(2441499,43211,$.TAI),11),newte(newz(2441683,43212,$.TAI),12),newte(newz(2442048,43213,$.TAI),13),newte(newz(2442413,43214,$.TAI),14),newte(newz(2442778,43215,$.TAI),15),newte(newz(2443144,43216,$.TAI),16),newte(newz(2443509,43217,$.TAI),17),newte(newz(2443874,43218,$.TAI),18),newte(newz(2444239,43219,$.TAI),19),newte(newz(2444786,43220,$.TAI),20),newte(newz(2445151,43221,$.TAI),21),newte(newz(2445516,43222,$.TAI),22),newte(newz(2446247,43223,$.TAI),23),newte(newz(2447161,43224,$.TAI),24),newte(newz(2447892,43225,$.TAI),25),newte(newz(2448257,43226,$.TAI),26),newte(newz(2448804,43227,$.TAI),27),newte(newz(2449169,43228,$.TAI),28),newte(newz(2449534,43229,$.TAI),29),newte(newz(2450083,43230,$.TAI),30),newte(newz(2450630,43231,$.TAI),31),newte(newz(2451179,43232,$.TAI),32),newte(newz(2453736,43233,$.TAI),33),newte(newz(2454832,43234,$.TAI),34),newte(newz(2456109,43235,$.TAI),35),newte(newz(2457204,43236,$.TAI),36),newte(newz(2457754,43237,$.TAI),37)];varpe=z;varco=Ze(Qe(),1);functioncr(e){return(e.length===0||e[e.length-1]!=="/")&&(e=`${e}/`),e}varNt=cr;functionkt(e,n){if(e===null||typeofe!="object")returne;n=O(n,!1);lett=newe.constructor;for(letoine)if(e.hasOwnProperty(o)){leti=e[o];n&&(i=kt(i,n)),t[o]=i}returnt}vartn=kt;functionsr(){lete,n,t=newPromise(function(o,i){e=o,n=i});return{resolve:e,reject:n,promise:t}}varWe=sr;varFt=Ze(Qe(),1);functiontt(e,n){lett;returntypeofdocument<"u"&&(t=document),tt._implementation(e,n,t)}tt._implementation=function(e,n,t){if(!p(e))thrownewj("relative uri is required.");if(!p(n)){if(typeoft>"u")returne;n=O(t.baseURI,t.location.href)}leto=newFt.default(e);returno.scheme()!==""?o.toString():o.absoluteTo(n).toString()};varmn=tt;varLt=Ze(Qe(),1);functionar(e,n){if(!p(e))thrownewj("uri is required.");lett="",o=e.lastIndexOf("/");returno!==-1&&(t=e.substring(0,o+1)),n&&(e=newLt.default(e),e.query().length!==0&&(t+=`?${e.query()}`),e.fragment().length!==0&&(t+=`#${e.fragment()}`)),t}varxt=ar;varBt=Ze(Qe(),1);functionfr(e){if(!p(e))thrownewj("uri is required.");letn=newBt.default(e);n.normalize();lett=n.path(),o=t.lastIndexOf("/");returno!==-1&&(t=t.substr(o+1)),o=t.lastIndexOf("."),o===-1?t="":t=t.substr(o+1),t}varQt=fr;varWt={};functionur(e,n,t){p(n)||(n=e.width),p(t)||(t=e.height);leto=Wt[n];p(o)||(o={},Wt[n]=o);leti=o[t];if(!p(i)){letr=document.createElement("canvas");r.width=n,r.height=t,i=r.getContext("2d",{willReadFrequently:!0}),i.globalCompositeOperation="copy",o[t]=i}returni.drawImage(e,0,0,n,t),i.getImageData(0,0,n,t).data}varot=ur;varpr=/^blob:/i;functionhr(e){returns.typeOf.string("uri",e),pr.test(e)}varzn=hr;varCe;functiondr(e){p(Ce)||(Ce=document.createElement("a")),Ce.href=window.location.href;letn=Ce.host,t=Ce.protocol;returnCe.href=e,Ce.href=Ce.href,t!==Ce.protocol||n!==Ce.host}varHt=dr;varmr=/^data:/i;functionyr(e){returns.typeOf.string("uri",e),mr.test(e)}varIn=yr;functionlr(e){letn=document.createElement("script");returnn.async=!0,n.src=e,newPromise((t,o)=>{window.crossOriginIsolated&&n.setAttribute("crossorigin","anonymous");leti=document.getElementsByTagName("head")[0];n.onload=function(){n.onload=void0,i.removeChild(n),t()},n.onerror=function(r){o(r)},i.appendChild(n)})}var$t=lr;functionwr(e){if(!p(e))thrownewj("obj is required.");letn="";for(lettine)if(e.hasOwnProperty(t)){leto=e[t],i=`${encodeURIComponent(t)}=`;if(Array.isArray(o))for(letr=0,a=o.length;r<a;++r)n+=`${i+encodeURIComponent(o[r])}&`;elsen+=`${i+encodeURIComponent(o)}&`}returnn=n.slice(0,-1),n}varVt=wr;functionbr(e){if(!p(e))thrownewj("queryString is required.");letn={};if(e==="")returnn;lett=e.replace(/\+/g,"%20").split(/[&;]/);for(leto=0,i=t.length;o<i;++o){letr=t[o].split("="),a=decodeURIComponent(r[0]),u=r[1];p(u)?u=decodeURIComponent(u):u="";letd=n[a];typeofd=="string"?n[a]=[d,u]:Array.isArray(d)?d.push(u):n[a]=u}returnn}varYt=br;varOr={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5},fe=Object.freeze(Or);vargr={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3},Xt=Object.freeze(gr);functionqn(e){e=O(e,O.EMPTY_OBJECT);letn=O(e.throttleByServer,!1),t=O(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=O(e.priority,0),this.throttle=t,this.throttleByServer=n,this.type=O(e.type,Xt.OTHER),this.serverKey=e.serverKey,this.state=fe.UNISSUED,this.deferred=void0,this.cancelled=!1}qn.prototype.cancel=function(){this.cancelled=!0};qn.prototype.clone=function(e){returnp(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=fe.UNISSUED,e.deferred=void0,e.cancelled=!1,e):newqn(this)};varZt=qn;function_r(e){letn={};if(!e)returnn;lett=e.split(`\r
`);for(leto=0;o<t.length;++o){leti=t[o],r=i.indexOf(": ");if(r>0){leta=i.substring(0,r),u=i.substring(r+2);n[a]=u}}returnn}varJt=_r;functionGt(e,n,t){this.statusCode=e,this.response=n,this.responseHeaders=t,typeofthis.responseHeaders=="string"&&(this.responseHeaders=Jt(this.responseHeaders))}Gt.prototype.toString=function(){lete="Request has failed.";returnp(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};varyn=Gt;varDn=Ze(Qe(),1);functionln(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}Object.defineProperties(ln.prototype,{numberOfListeners:{get:function(){returnthis._listeners.length-this._toRemove.length}}});ln.prototype.addEventListener=function(e,n){s.typeOf.func("listener",e),this._listeners.push(e),this._scopes.push(n);lett=this;returnfunction(){t.removeEventListener(e,n)}};ln.prototype.removeEventListener=function(e,n){s.typeOf.func("listener",e);lett=this._listeners,o=this._scopes,i=-1;for(letr=0;r<t.length;r++)if(t[r]===e&&o[r]===n){i=r;break}returni!==-1?(this._insideRaiseEvent?(this._toRemove.push(i),t[i]=void0,o[i]=void0):(t.splice(i,1),o.splice(i,1)),!0):!1};functionSr(e,n){returnn-e}ln.prototype.raiseEvent=function(){this._insideRaiseEvent=!0;lete,n=this._listeners,t=this._scopes,o=n.length;for(e=0;e<o;e++){letr=n[e];p(r)&&n[e].apply(t[e],arguments)}leti=this._toRemove;if(o=i.length,o>0){for(i.sort(Sr),e=0;e<o;e++){letr=i[e];n.splice(r,1),t.splice(r,1)}i.length=0}this._insideRaiseEvent=!1};varKt=ln;functionHe(e){s.typeOf.object("options",e),s.defined("options.comparator",e.comparator),this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void0}Object.defineProperties(He.prototype,{length:{get:function(){returnthis._length}},internalArray:{get:function(){returnthis._array}},maximumLength:{get:function(){returnthis._maximumLength},set:function(e){s.typeOf.number.greaterThanOrEquals("maximumLength",e,0);letn=this._length;if(e<n){lett=this._array;for(leto=e;o<n;++o)t[o]=void0;this._length=e,t.length=e}this._maximumLength=e}},comparator:{get:function(){returnthis._comparator}}});functionrt(e,n,t){leto=e[n];e[n]=e[t],e[t]=o}He.prototype.reserve=function(e){e=O(e,this._length),this._array.length=e};He.prototype.heapify=function(e){e=O(e,0);letn=this._length,t=this._comparator,o=this._array,i=-1,r=!0;for(;r;){leta=2*(e+1),u=a-1;u<n&&t(o[u],o[e])<0?i=u:i=e,a<n&&t(o[a],o[i])<0&&(i=a),i!==e?(rt(o,i,e),e=i):r=!1}};He.prototype.resort=function(){lete=this._length;for(letn=Math.ceil(e/2);n>=0;--n)this.heapify(n)};He.prototype.insert=function(e){s.defined("element",e);letn=this._array,t=this._comparator,o=this._maximumLength,i=this._length++;for(i<n.length?n[i]=e:n.push(e);i!==0;){leta=Math.floor((i-1)/2);if(t(n[i],n[a])<0)rt(n,i,a),i=a;elsebreak}letr;returnp(o)&&this._length>o&&(r=n[o],this._length=o),r};He.prototype.pop=function(e){if(e=O(e,0),this._length===0)return;s.typeOf.number.lessThan("index",e,this._length);letn=this._array,t=n[e];returnrt(n,e,--this._length),this.heapify(e),n[this._length]=void0,t};vareo=He;functionRr(e,n){returne.priority-n.priority}varK={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},on=20,we=neweo({comparator:Rr});we.maximumLength=on;we.reserve(on);varve=[],Pe={},Er=typeofdocument<"u"?newDn.default(document.location.href):newDn.default,Nn=newKt;functionse(){}se.maximumRequests=50;se.maximumRequestsPerServer=18;se.requestsByServer={};se.throttleRequests=!0;se.debugShowStatistics=!1;se.requestCompletedEvent=Nn;Object.defineProperties(se,{statistics:{get:function(){returnK}},priorityHeapLength:{get:function(){returnon},set:function(e){if(e<on)for(;we.length>e;){letn=we.pop();$e(n)}on=e,we.maximumLength=e,we.reserve(e)}}});functionno(e){p(e.priorityFunction)&&(e.priority=e.priorityFunction())}se.serverHasOpenSlots=function(e,n){n=O(n,1);lett=O(se.requestsByServer[e],se.maximumRequestsPerServer);returnPe[e]+n<=t};se.heapHasOpenSlots=function(e){returnwe.length+e<=on};functionto(e){returne.state===fe.UNISSUED&&(e.state=fe.ISSUED,e.deferred=We()),e.deferred.promise}functionTr(e){returnfunction(n){if(e.state===fe.CANCELLED)return;lett=e.deferred;--K.numberOfActiveRequests,--Pe[e.serverKey],Nn.raiseEvent(),e.state=fe.RECEIVED,e.deferred=void0,t.resolve(n)}}functionCr(e){returnfunction(n){e.state!==fe.CANCELLED&&(++K.numberOfFailedRequests,--K.numberOfActiveRequests,--Pe[e.serverKey],Nn.raiseEvent(n),e.state=fe.FAILED,e.deferred.reject(n))}}functionoo(e){letn=to(e);returne.state=fe.ACTIVE,ve.push(e),++K.numberOfActiveRequests,++K.numberOfActiveRequestsEver,++Pe[e.serverKey],e.requestFunction().then(Tr(e)).catch(Cr(e)),n}function$e(e){letn=e.state===fe.ACTIVE;if(e.state=fe.CANCELLED,++K.numberOfCancelledRequests,p(e.deferred)){lett=e.deferred;e.deferred=void0,t.reject()}n&&(--K.numberOfActiveRequests,--Pe[e.serverKey],++K.numberOfCancelledActiveRequests),p(e.cancelFunction)&&e.cancelFunction()}se.update=function(){lete,n,t=0,o=ve.length;for(e=0;e<o;++e){if(n=ve[e],n.cancelled&&$e(n),n.state!==fe.ACTIVE){++t;continue}t>0&&(ve[e-t]=n)}ve.length-=t;leti=we.internalArray,r=we.length;for(e=0;e<r;++e)no(i[e]);we.resort();leta=Math.max(se.maximumRequests-ve.length,0),u=0;for(;u<a&&we.length>0;){if(n=we.pop(),n.cancelled){$e(n);continue}if(n.throttleByServer&&!se.serverHasOpenSlots(n.serverKey)){$e(n);continue}oo(n),++u}vr()};se.getServerKey=function(e){s.typeOf.string("url",e);letn=newDn.default(e);n.scheme()===""&&(n=n.absoluteTo(Er),n.normalize());lett=n.authority();/:/.test(t)||(t=`${t}:${n.scheme()==="https"?"443":"80"}`);leto=Pe[t];returnp(o)||(Pe[t]=0),t};se.request=function(e){if(s.typeOf.object("request",e),s.typeOf.string("request.url",e.url),s.typeOf.func("request.requestFunction",e.requestFunction),In(e.url)||zn(e.url))returnNn.raiseEvent(),e.state=fe.RECEIVED,e.requestFunction();if(++K.numberOfAttemptedRequests,p(e.serverKey)||(e.serverKey=se.getServerKey(e.url)),se.throttleRequests&&e.throttleByServer&&!se.serverHasOpenSlots(e.serverKey))return;if(!se.throttleRequests||!e.throttle)returnoo(e);if(ve.length>=se.maximumRequests)return;no(e);letn=we.insert(e);if(p(n)){if(n===e)return;$e(n)}returnto(e)};functionvr(){se.debugShowStatistics&&(K.numberOfActiveRequests===0&&K.lastNumberOfActiveRequests>0&&(K.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${K.numberOfAttemptedRequests}`),K.numberOfAttemptedRequests=0),K.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${K.numberOfCancelledRequests}`),K.numberOfCancelledRequests=0),K.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${K.numberOfCancelledActiveRequests}`),K.numberOfCancelledActiveRequests=0),K.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${K.numberOfFailedRequests}`),K.numberOfFailedRequests=0)),K.lastNumberOfActiveRequests=K.numberOfActiveRequests)}se.clearForSpecs=function(){for(;we.length>0;){letn=we.pop();$e(n)}lete=ve.length;for(letn=0;n<e;++n)$e(ve[n]);ve.length=0,Pe={},K.numberOfAttemptedRequests=0,K.numberOfActiveRequests=0,K.numberOfCancelledRequests=0,K.numberOfCancelledActiveRequests=0,K.numberOfFailedRequests=0,K.numberOfActiveRequestsEver=0,K.lastNumberOfActiveRequests=0};se.numberOfActiveRequestsByServer=function(e){returnPe[e]};se.requestHeap=we;varkn=se;varro=Ze(Qe(),1);varwn={},rn={};wn.add=function(e,n){if(!p(e))thrownewj("host is required.");if(!p(n)||n<=0)thrownewj("port is required to be greater than 0.");lett=`${e.toLowerCase()}:${n}`;p(rn[t])||(rn[t]=!0)};wn.remove=function(e,n){if(!p(e))thrownewj("host is required.");if(!p(n)||n<=0)thrownewj("port is required to be greater than 0.");lett=`${e.toLowerCase()}:${n}`;p(rn[t])&&deletern[t]};functionAr(e){letn=newro.default(e);n.normalize();lett=n.authority();if(t.length!==0){if(n.authority(t),t.indexOf("@")!==-1&&(t=t.split("@")[1]),t.indexOf(":")===-1){leto=n.scheme();if(o.length===0&&(o=window.location.protocol,o=o.substring(0,o.length-1)),o==="http")t+=":80";elseif(o==="https")t+=":443";elsereturn}returnt}}wn.contains=function(e){if(!p(e))thrownewj("url is required.");letn=Ar(e);return!!(p(n)&&p(rn[n]))};wn.clear=function(){rn={}};varit=wn;varso=function(){try{lete=newXMLHttpRequest;returne.open("GET","#",!0),e.responseType="blob",e.responseType==="blob"}catch{return!1}}();functionU(e){e=O(e,O.EMPTY_OBJECT),typeofe=="string"&&(e={url:e}),s.typeOf.string("options.url",e.url),this._url=void0,this._templateValues=Ae(e.templateValues,{}),this._queryParameters=Ae(e.queryParameters,{}),this.headers=Ae(e.headers,{}),this.request=O(e.request,newZt),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=O(e.retryAttempts,0),this._retryCount=0,O(e.parseUrl,!0)?this.parseUrl(e.url,!0,!0):this._url=e.url,this._credits=e.credits}functionAe(e,n){returnp(e)?tn(e):n}U.createIfNeeded=function(e){returneinstanceofU?e.getDerivedResource({request:e.request}):typeofe!="string"?e:newU({url:e})};varcn;U.supportsImageBitmapOptions=function(){returnp(cn)?cn:typeofcreateImageBitmap!="function"?(cn=Promise.resolve(!1),cn):(cn=U.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC"}).then(function(n){lett={imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"};returnPromise.all([createImageBitmap(n,t),createImageBitmap(n)])}).then(function(n){lett=ot(n[0]),o=ot(n[1]);returnt[1]!==o[1]}).catch(function(){return!1}),cn)};Object.defineProperties(U,{isBlobSupported:{get:function(){returnso}}});Object.defineProperties(U.prototype,{queryParameters:{get:function(){returnthis._queryParameters}},templateValues:{get:function(){returnthis._templateValues}},url:{get:function(){returnthis.getUrlComponent(!0,!0)},set:function(e){this.parseUrl(e,!1,!1)}},extension:{get:function(){returnQt(this._url)}},isDataUri:{get:function(){returnIn(this._url)}},isBlobUri:{get:function(){returnzn(this._url)}},isCrossOriginUrl:{get:function(){returnHt(this._url)}},hasHeaders:{get:function(){returnObject.keys(this.headers).length>0}},credits:{get:function(){returnthis._credits}}});U.prototype.toString=function(){returnthis.getUrlComponent(!0,!0)};U.prototype.parseUrl=function(e,n,t,o){leti=newco.default(e),r=jr(i.query());this._queryParameters=n?Ln(r,this.queryParameters,t):r,i.search(""),i.fragment(""),p(o)&&i.scheme()===""&&(i=i.absoluteTo(mn(o))),this._url=i.toString()};functionjr(e){returne.length===0?{}:e.indexOf("=")===-1?{[e]:void0}:Yt(e)}functionLn(e,n,t){if(!t)returnDe(e,n);leto=tn(e,!0);for(letiinn)if(n.hasOwnProperty(i)){letr=o[i],a=n[i];p(r)?(Array.isArray(r)||(r=o[i]=[r]),o[i]=r.concat(a)):o[i]=Array.isArray(a)?a.slice():a}returno}U.prototype.getUrlComponent=function(e,n){if(this.isDataUri)returnthis._url;lett=this._url;e&&(t=`${t}${Mr(this.queryParameters)}`),t=t.replace(/%7B/g,"{").replace(/%7D/g,"}");leto=this._templateValues;returnObject.keys(o).length>0&&(t=t.replace(/{(.*?)}/g,function(i,r){leta=o[r];returnp(a)?encodeURIComponent(a):i})),n&&p(this.proxy)&&(t=this.proxy.getURL(t)),t};functionMr(e){letn=Object.keys(e);returnn.length===0?"":n.length===1&&!p(e[n[0]])?`?${n[0]}`:`?${Vt(e)}`}U.prototype.setQueryParameters=function(e,n){n?this._queryParameters=Ln(this._queryParameters,e,!1):this._queryParameters=Ln(e,this._queryParameters,!1)};U.prototype.appendQueryParameters=function(e){this._queryParameters=Ln(e,this._queryParameters,!0)};U.prototype.setTemplateValues=function(e,n){n?this._templateValues=De(this._templateValues,e):this._templateValues=De(e,this._templateValues)};U.prototype.getDerivedResource=function(e){letn=this.clone();if(n._retryCount=0,p(e.url)){lett=O(e.preserveQueryParameters,!1);n.parseUrl(e.url,!0,t,this._url)}returnp(e.queryParameters)&&(n._queryParameters=De(e.queryParameters,n.queryParameters)),p(e.templateValues)&&(n._templateValues=De(e.templateValues,n.templateValues)),p(e.headers)&&(n.headers=De(e.headers,n.headers)),p(e.proxy)&&(n.proxy=e.proxy),p(e.request)&&(n.request=e.request),p(e.retryCallback)&&(n.retryCallback=e.retryCallback),p(e.retryAttempts)&&(n.retryAttempts=e.retryAttempts),n};U.prototype.retryOnError=function(e){letn=this.retryCallback;if(typeofn!="function"||this._retryCount>=this.retryAttempts)returnPromise.resolve(!1);lett=this;returnPromise.resolve(n(this,e)).then(function(o){return++t._retryCount,o})};U.prototype.clone=function(e){returnp(e)?(e._url=this._url,e._queryParameters=tn(this._queryParameters),e._templateValues=tn(this._templateValues),e.headers=tn(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e):newU({url:this._url,queryParameters:this.queryParameters,templateValues:this.templateValues,headers:this.headers,proxy:this.proxy,retryCallback:this.retryCallback,retryAttempts:this.retryAttempts,request:this.request.clone(),parseUrl:!1,credits:p(this.credits)?this.credits.slice():void0})};U.prototype.getBaseUri=function(e){returnxt(this.getUrlComponent(e),e)};U.prototype.appendForwardSlash=function(){this._url=Nt(this._url)};U.prototype.fetchArrayBuffer=function(){returnthis.fetch({responseType:"arraybuffer"})};U.fetchArrayBuffer=function(e){returnnewU(e).fetchArrayBuffer()};U.prototype.fetchBlob=function(){returnthis.fetch({responseType:"blob"})};U.fetchBlob=function(e){returnnewU(e).fetchBlob()};U.prototype.fetchImage=function(e){e=O(e,O.EMPTY_OBJECT);letn=O(e.preferImageBitmap,!1),t=O(e.preferBlob,!1),o=O(e.flipY,!1),i=O(e.skipColorSpaceConversion,!1);if(st(this.request),!so||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!t)returnct({resource:this,flipY:o,skipColorSpaceConversion:i,preferImageBitmap:n});letr=this.fetchBlob();if(!p(r))return;leta,u,d,m;returnU.supportsImageBitmapOptions().then(function(l){returna=l,u=a&&n,r}).then(function(l){if(!p(l))return;if(m=l,u)returnU.createImageBitmapFromBlob(l,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:i});letw=window.URL.createObjectURL(l);returnd=newU({url:w}),ct({resource:d,flipY:o,skipColorSpaceConversion:i,preferImageBitmap:!1})}).then(function(l){if(p(l))returnl.blob=m,u||window.URL.revokeObjectURL(d.url),l}).catch(function(l){returnp(d)&&window.URL.revokeObjectURL(d.url),l.blob=m,Promise.reject(l)})};functionct(e){letn=e.resource,t=e.flipY,o=e.skipColorSpaceConversion,i=e.preferImageBitmap,r=n.request;r.url=n.url,r.requestFunction=function(){letu=!1;!n.isDataUri&&!n.isBlobUri&&(u=n.isCrossOriginUrl);letd=We();returnU._Implementations.createImage(r,u,d,t,o,i),d.promise};leta=kn.request(r);if(p(a))returna.catch(function(u){returnr.state!==fe.FAILED?Promise.reject(u):n.retryOnError(u).then(function(d){returnd?(r.state=fe.UNISSUED,r.deferred=void0,ct({resource:n,flipY:t,skipColorSpaceConversion:o,preferImageBitmap:i})):Promise.reject(u)})})}U.fetchImage=function(e){returnnewU(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})};U.prototype.fetchText=function(){returnthis.fetch({responseType:"text"})};U.fetchText=function(e){returnnewU(e).fetchText()};U.prototype.fetchJson=function(){lete=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(p(e))returne.then(function(n){if(p(n))returnJSON.parse(n)})};U.fetchJson=function(e){returnnewU(e).fetchJson()};U.prototype.fetchXML=function(){returnthis.fetch({responseType:"document",overrideMimeType:"text/xml"})};U.fetchXML=function(e){returnnewU(e).fetchXML()};U.prototype.fetchJsonp=function(e){e=O(e,"callback"),st(this.request);letn;don=`loadJsonp${E.nextRandomNumber().toString().substring(2,8)}`;while(p(window[n]));returnao(this,e,n)};functionao(e,n,t){leto={};o[n]=t,e.setQueryParameters(o);leti=e.request,r=e.url;i.url=r,i.requestFunction=function(){letu=We();returnwindow[t]=function(d){u.resolve(d);try{deletewindow[t]}catch{window[t]=void0}},U._Implementations.loadAndExecuteScript(r,t,u),u.promise};leta=kn.request(i);if(p(a))returna.catch(function(u){returni.state!==fe.FAILED?Promise.reject(u):e.retryOnError(u).then(function(d){returnd?(i.state=fe.UNISSUED,i.deferred=void0,ao(e,n,t)):Promise.reject(u)})})}U.fetchJsonp=function(e){returnnewU(e).fetchJsonp(e.callbackParameterName)};U.prototype._makeRequest=function(e){letn=this;st(n.request);lett=n.request,o=n.url;t.url=o,t.requestFunction=function(){letr=e.responseType,a=De(e.headers,n.headers),u=e.overrideMimeType,d=e.method,m=e.data,l=We(),w=U._Implementations.loadWithXhr(o,r,d,m,a,l,u);returnp(w)&&p(w.abort)&&(t.cancelFunction=function(){w.abort()}),l.promise};leti=kn.request(t);if(p(i))returni.then(function(r){returnt.cancelFunction=void0,r}).catch(function(r){returnt.cancelFunction=void0,t.state!==fe.FAILED?Promise.reject(r):n.retryOnError(r).then(function(a){returna?(t.state=fe.UNISSUED,t.deferred=void0,n.fetch(e)):Promise.reject(r)})})};functionst(e){if(e.state===fe.ISSUED||e.state===fe.ACTIVE)thrownewSe("The Resource is already being fetched.");e.state=fe.UNISSUED,e.deferred=void0}varPr=/^data:(.*?)(;base64)?,(.*)$/;functionFn(e,n){lett=decodeURIComponent(n);returne?atob(t):t}functionio(e,n){lett=Fn(e,n),o=newArrayBuffer(t.length),i=newUint8Array(o);for(letr=0;r<t.length;r++)i[r]=t.charCodeAt(r);returno}functionUr(e,n){n=O(n,"");lett=e[1],o=!!e[2],i=e[3],r,a;switch(n){case"":case"text":returnFn(o,i);case"arraybuffer":returnio(o,i);case"blob":returnr=io(o,i),newBlob([r],{type:t});case"document":returna=newDOMParser,a.parseFromString(Fn(o,i),t);case"json":returnJSON.parse(Fn(o,i));default:thrownewj(`Unhandled responseType: ${n}`)}}U.prototype.fetch=function(e){returne=Ae(e,{}),e.method="GET",this._makeRequest(e)};U.fetch=function(e){returnnewU(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};U.prototype.delete=function(e){returne=Ae(e,{}),e.method="DELETE",this._makeRequest(e)};U.delete=function(e){returnnewU(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})};U.prototype.head=function(e){returne=Ae(e,{}),e.method="HEAD",this._makeRequest(e)};U.head=function(e){returnnewU(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};U.prototype.options=function(e){returne=Ae(e,{}),e.method="OPTIONS",this._makeRequest(e)};U.options=function(e){returnnewU(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};U.prototype.post=function(e,n){returns.defined("data",e),n=Ae(n,{}),n.method="POST",n.data=e,this._makeRequest(n)};U.post=function(e){returnnewU(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};U.prototype.put=function(e,n){returns.defined("data",e),n=Ae(n,{}),n.method="PUT",n.data=e,this._makeRequest(n)};U.put=function(e){returnnewU(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};U.prototype.patch=function(e,n){returns.defined("data",e),n=Ae(n,{}),n.method="PATCH",n.data=e,this._makeRequest(n)};U.patch=function(e){returnnewU(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};U._Implementations={};U._Implementations.loadImageElement=function(e,n,t){leto=newImage;o.onload=function(){o.naturalWidth===0&&o.naturalHeight===0&&o.width===0&&o.height===0&&(o.width=300,o.height=150),t.resolve(o)},o.onerror=function(i){t.reject(i)},n&&(it.contains(e)?o.crossOrigin="use-credentials":o.crossOrigin=""),o.src=e};U._Implementations.createImage=function(e,n,t,o,i,r){leta=e.url;U.supportsImageBitmapOptions().then(function(u){if(!(u&&r)){U._Implementations.loadImageElement(a,n,t);return}letd="blob",m="GET",l=We(),w=U._Implementations.loadWithXhr(a,d,m,void0,void0,l,void0,void0,void0);returnp(w)&&p(w.abort)&&(e.cancelFunction=function(){w.abort()}),l.promise.then(function(T){if(!p(T)){t.reject(newSe(`Successfully retrieved ${a} but it contained no content.`));return}returnU.createImageBitmapFromBlob(T,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:i})}).then(function(T){t.resolve(T)})}).catch(function(u){t.reject(u)})};U.createImageBitmapFromBlob=function(e,n){returns.defined("options",n),s.typeOf.bool("options.flipY",n.flipY),s.typeOf.bool("options.premultiplyAlpha",n.premultiplyAlpha),s.typeOf.bool("options.skipColorSpaceConversion",n.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:n.flipY?"flipY":"none",premultiplyAlpha:n.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:n.skipColorSpaceConversion?"none":"default"})};functionzr(e,n,t,o,i,r,a){fetch(e,{method:t,headers:i}).then(asyncu=>{if(!u.ok){letd={};u.headers.forEach((m,l)=>{d[l]=m}),r.reject(newyn(u.status,u,d));return}switch(n){case"text":r.resolve(u.text());break;case"json":r.resolve(u.json());break;default:r.resolve(newUint8Array(awaitu.arrayBuffer()).buffer);break}}).catch(()=>{r.reject(newyn)})}varIr=typeofXMLHttpRequest>"u";U._Implementations.loadWithXhr=function(e,n,t,o,i,r,a){letu=Pr.exec(e);if(u!==null){r.resolve(Ur(u,n));return}if(Ir){zr(e,n,t,o,i,r,a);return}letd=newXMLHttpRequest;if(it.contains(e)&&(d.withCredentials=!0),d.open(t,e,!0),p(a)&&p(d.overrideMimeType)&&d.overrideMimeType(a),p(i))for(letlini)i.hasOwnProperty(l)&&d.setRequestHeader(l,i[l]);p(n)&&(d.responseType=n);letm=!1;returntypeofe=="string"&&(m=e.indexOf("file://")===0||typeofwindow<"u"&&window.location.origin==="file://"),d.onload=function(){if((d.status<200||d.status>=300)&&!(m&&d.status===0)){r.reject(newyn(d.status,d.response,d.getAllResponseHeaders()));return}letl=d.response,w=d.responseType;if(t==="HEAD"||t==="OPTIONS"){letC=d.getAllResponseHeaders().trim().split(/[\r\n]+/),P={};C.forEach(function(A){letq=A.split(": "),k=q.shift();P[k]=q.join(": ")}),r.resolve(P);return}if(d.status===204)r.resolve(void0);elseif(p(l)&&(!p(n)||w===n))r.resolve(l);elseif(n==="json"&&typeofl=="string")try{r.resolve(JSON.parse(l))}catch(T){r.reject(T)}else(w===""||w==="document")&&p(d.responseXML)&&d.responseXML.hasChildNodes()?r.resolve(d.responseXML):(w===""||w==="text")&&p(d.responseText)?r.resolve(d.responseText):r.reject(newSe("Invalid XMLHttpRequest response type."))},d.onerror=function(l){r.reject(newyn)},d.send(o),d};U._Implementations.loadAndExecuteScript=function(e,n,t){return$t(e,n).catch(function(o){t.reject(o)})};U._DefaultImplementations={};U._DefaultImplementations.createImage=U._Implementations.createImage;U._DefaultImplementations.loadWithXhr=U._Implementations.loadWithXhr;U._DefaultImplementations.loadAndExecuteScript=U._Implementations.loadAndExecuteScript;U.DEFAULT=Object.freeze(newU({url:typeofdocument>"u"?"":document.location.href.split("?")[0]}));varke=U;functionOn(e){e=O(e,O.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._addNewLeapSeconds=O(e.addNewLeapSeconds,!0),p(e.data)?fo(this,e.data):fo(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}On.fromUrl=asyncfunction(e,n){s.defined("url",e),n=O(n,O.EMPTY_OBJECT);lett=ke.createIfNeeded(e),o;try{o=awaitt.fetchJson()}catch{thrownewSe(`An error occurred while retrieving the EOP data from the URL ${t.url}.`)}returnnewOn({addNewLeapSeconds:n.addNewLeapSeconds,data:o})};On.NONE=Object.freeze({compute:function(e,n){returnp(n)?(n.xPoleWander=0,n.yPoleWander=0,n.xPoleOffset=0,n.yPoleOffset=0,n.ut1MinusUtc=0):n=newhn(0,0,0,0,0),n}});On.prototype.compute=function(e,n){if(!p(this._samples))return;if(p(n)||(n=newhn(0,0,0,0,0)),this._samples.length===0)returnn.xPoleWander=0,n.yPoleWander=0,n.xPoleOffset=0,n.yPoleOffset=0,n.ut1MinusUtc=0,n;lett=this._dates,o=this._lastIndex,i=0,r=0;if(p(o)){letu=t[o],d=t[o+1],m=pe.lessThanOrEquals(u,e),l=!p(d),w=l||pe.greaterThanOrEquals(d,e);if(m&&w)returni=o,!l&&d.equals(e)&&++i,r=i+1,po(this,t,this._samples,e,i,r,n),n}leta=Be(t,e,pe.compare,this._dateColumn);returna>=0?(a<t.length-1&&t[a+1].equals(e)&&++a,i=a,r=a):(r=~a,i=r-1,i<0&&(i=0)),this._lastIndex=i,po(this,t,this._samples,e,i,r,n),n};functionqr(e,n){returnpe.compare(e.julianDate,n)}functionfo(e,n){if(!p(n.columnNames))thrownewSe("Error in loaded EOP data: The columnNames property is required.");if(!p(n.samples))thrownewSe("Error in loaded EOP data: The samples property is required.");lett=n.columnNames.indexOf("modifiedJulianDateUtc"),o=n.columnNames.indexOf("xPoleWanderRadians"),i=n.columnNames.indexOf("yPoleWanderRadians"),r=n.columnNames.indexOf("ut1MinusUtcSeconds"),a=n.columnNames.indexOf("xCelestialPoleOffsetRadians"),u=n.columnNames.indexOf("yCelestialPoleOffsetRadians"),d=n.columnNames.indexOf("taiMinusUtcSeconds");if(t<0||o<0||i<0||r<0||a<0||u<0||d<0)thrownewSe("Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");letm=e._samples=n.samples,l=e._dates=[];e._dateColumn=t,e._xPoleWanderRadiansColumn=o,e._yPoleWanderRadiansColumn=i,e._ut1MinusUtcSecondsColumn=r,e._xCelestialPoleOffsetRadiansColumn=a,e._yCelestialPoleOffsetRadiansColumn=u,e._taiMinusUtcSecondsColumn=d,e._columnCount=n.columnNames.length,e._lastIndex=void0;letw,T=e._addNewLeapSeconds;for(letC=0,P=m.length;C<P;C+=e._columnCount){letA=m[C+t],q=m[C+d],k=A+ce.MODIFIED_JULIAN_DATE_DIFFERENCE,L=newpe(k,q,$.TAI);if(l.push(L),T){if(q!==w&&p(w)){letF=pe.leapSeconds,B=Be(F,L,qr);if(B<0){letW=newte(L,q);F.splice(~B,0,W)}}w=q}}}functionuo(e,n,t,o,i){letr=t*o;i.xPoleWander=n[r+e._xPoleWanderRadiansColumn],i.yPoleWander=n[r+e._yPoleWanderRadiansColumn],i.xPoleOffset=n[r+e._xCelestialPoleOffsetRadiansColumn],i.yPoleOffset=n[r+e._yCelestialPoleOffsetRadiansColumn],i.ut1MinusUtc=n[r+e._ut1MinusUtcSecondsColumn]}functionbn(e,n,t){returnn+e*(t-n)}functionpo(e,n,t,o,i,r,a){letu=e._columnCount;if(r>n.length-1)returna.xPoleWander=0,a.yPoleWander=0,a.xPoleOffset=0,a.yPoleOffset=0,a.ut1MinusUtc=0,a;letd=n[i],m=n[r];if(d.equals(m)||o.equals(d))returnuo(e,t,i,u,a),a;if(o.equals(m))returnuo(e,t,r,u,a),a;letl=pe.secondsDifference(o,d)/pe.secondsDifference(m,d),w=i*u,T=r*u,C=t[w+e._ut1MinusUtcSecondsColumn],P=t[T+e._ut1MinusUtcSecondsColumn],A=P-C;if(A>.5||A<-.5){letq=t[w+e._taiMinusUtcSecondsColumn],k=t[T+e._taiMinusUtcSecondsColumn];q!==k&&(m.equals(o)?C=P:P-=k-q)}returna.xPoleWander=bn(l,t[w+e._xPoleWanderRadiansColumn],t[T+e._xPoleWanderRadiansColumn]),a.yPoleWander=bn(l,t[w+e._yPoleWanderRadiansColumn],t[T+e._yPoleWanderRadiansColumn]),a.xPoleOffset=bn(l,t[w+e._xCelestialPoleOffsetRadiansColumn],t[T+e._xCelestialPoleOffsetRadiansColumn]),a.yPoleOffset=bn(l,t[w+e._yCelestialPoleOffsetRadiansColumn],t[T+e._yCelestialPoleOffsetRadiansColumn]),a.ut1MinusUtc=bn(l,C,P),a}varho=On;functionbe(e,n,t){this.heading=O(e,0),this.pitch=O(n,0),this.roll=O(t,0)}be.fromQuaternion=function(e,n){if(!p(e))thrownewj("quaternion is required");p(n)||(n=newbe);lett=2*(e.w*e.y-e.z*e.x),o=1-2*(e.x*e.x+e.y*e.y),i=2*(e.w*e.x+e.y*e.z),r=1-2*(e.y*e.y+e.z*e.z),a=2*(e.w*e.z+e.x*e.y);returnn.heading=-Math.atan2(a,r),n.roll=Math.atan2(i,o),n.pitch=-E.asinClamped(t),n};be.fromDegrees=function(e,n,t,o){if(!p(e))thrownewj("heading is required");if(!p(n))thrownewj("pitch is required");if(!p(t))thrownewj("roll is required");returnp(o)||(o=newbe),o.heading=e*E.RADIANS_PER_DEGREE,o.pitch=n*E.RADIANS_PER_DEGREE,o.roll=t*E.RADIANS_PER_DEGREE,o};be.clone=function(e,n){if(p(e))returnp(n)?(n.heading=e.heading,n.pitch=e.pitch,n.roll=e.roll,n):newbe(e.heading,e.pitch,e.roll)};be.equals=function(e,n){returne===n||p(e)&&p(n)&&e.heading===n.heading&&e.pitch===n.pitch&&e.roll===n.roll};be.equalsEpsilon=function(e,n,t,o){returne===n||p(e)&&p(n)&&E.equalsEpsilon(e.heading,n.heading,t,o)&&E.equalsEpsilon(e.pitch,n.pitch,t,o)&&E.equalsEpsilon(e.roll,n.roll,t,o)};be.prototype.clone=function(e){returnbe.clone(this,e)};be.prototype.equals=function(e){returnbe.equals(this,e)};be.prototype.equalsEpsilon=function(e,n,t){returnbe.equalsEpsilon(this,e,n,t)};be.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};varxn=be;varmo=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;functionDr(){lete=document.getElementsByTagName("script");for(letn=0,t=e.length;n<t;++n){leto=e[n].getAttribute("src"),i=mo.exec(o);if(i!==null)returni[1]}}varBn;functionyo(e){returntypeofdocument>"u"?e:(p(Bn)||(Bn=document.createElement("a")),Bn.href=e,Bn.href)}varVe;functionlo(){if(p(Ve))returnVe;lete;if(typeofCESIUM_BASE_URL<"u"?e=CESIUM_BASE_URL:p(import.meta?.url)?e=mn(".",import.meta.url):typeofdefine=="object"&&p(define.amd)&&!define.amd.toUrlUndefined&&p(Sn.toUrl)?e=mn("..",Ye("Core/buildModuleUrl.js")):e=Dr(),!p(e))thrownewj("Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.");returnVe=newke({url:yo(e)}),Ve.appendForwardSlash(),Ve}functionNr(e){returnyo(Sn.toUrl(`../${e}`))}functionwo(e){returnlo().getDerivedResource({url:e}).url}varQn;functionYe(e){returnp(Qn)||(typeofdefine=="object"&&p(define.amd)&&!define.amd.toUrlUndefined&&p(Sn.toUrl)?Qn=Nr:Qn=wo),Qn(e)}Ye._cesiumScriptRegex=mo;Ye._buildModuleUrlFromBaseUrl=wo;Ye._clearBaseResource=function(){Ve=void0};Ye.setBaseUrl=function(e){Ve=ke.DEFAULT.getDerivedResource({url:e})};Ye.getCesiumBaseUrl=lo;varbo=Ye;functionkr(e,n,t){this.x=e,this.y=n,this.s=t}varWn=kr;functionut(e){e=O(e,O.EMPTY_OBJECT),this._xysFileUrlTemplate=ke.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=O(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=O(e.sampleZeroJulianEphemerisDate,24423965e-1),this._sampleZeroDateTT=newpe(this._sampleZeroJulianEphemerisDate,0,$.TAI),this._stepSizeDays=O(e.stepSizeDays,1),this._samplesPerXysFile=O(e.samplesPerXysFile,1e3),this._totalSamples=O(e.totalSamples,27426),this._samples=newArray(this._totalSamples*3),this._chunkDownloadsInProgress=[];letn=this._interpolationOrder,t=this._denominators=newArray(n+1),o=this._xTable=newArray(n+1),i=Math.pow(this._stepSizeDays,n);for(letr=0;r<=n;++r){t[r]=i,o[r]=r*this._stepSizeDays;for(leta=0;a<=n;++a)a!==r&&(t[r]*=r-a);t[r]=1/t[r]}this._work=newArray(n+1),this._coef=newArray(n+1)}varFr=newpe(0,0,$.TAI);functionat(e,n,t){leto=Fr;returno.dayNumber=n,o.secondsOfDay=t,pe.daysDifference(o,e._sampleZeroDateTT)}ut.prototype.preload=function(e,n,t,o){leti=at(this,e,n),r=at(this,t,o),a=i/this._stepSizeDays-this._interpolationOrder/2|0;a<0&&(a=0);letu=r/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;u>=this._totalSamples&&(u=this._totalSamples-1);letd=a/this._samplesPerXysFile|0,m=u/this._samplesPerXysFile|0,l=[];for(letw=d;w<=m;++w)l.push(ft(this,w));returnPromise.all(l)};ut.prototype.computeXysRadians=function(e,n,t){leto=at(this,e,n);if(o<0)return;leti=o/this._stepSizeDays|0;if(i>=this._totalSamples)return;letr=this._interpolationOrder,a=i-(r/2|0);a<0&&(a=0);letu=a+r;u>=this._totalSamples&&(u=this._totalSamples-1,a=u-r,a<0&&(a=0));letd=!1,m=this._samples;if(p(m[a*3])||(ft(this,a/this._samplesPerXysFile|0),d=!0),p(m[u*3])||(ft(this,u/this._samplesPerXysFile|0),d=!0),d)return;p(t)?(t.x=0,t.y=0,t.s=0):t=newWn(0,0,0);letl=o-a*this._stepSizeDays,w=this._work,T=this._denominators,C=this._coef,P=this._xTable,A,q;for(A=0;A<=r;++A)w[A]=l-P[A];for(A=0;A<=r;++A){for(C[A]=1,q=0;q<=r;++q)q!==A&&(C[A]*=w[q]);C[A]*=T[A];letk=(a+A)*3;t.x+=C[A]*m[k++],t.y+=C[A]*m[k++],t.s+=C[A]*m[k]}returnt};functionft(e,n){if(e._chunkDownloadsInProgress[n])returne._chunkDownloadsInProgress[n];lett,o=e._xysFileUrlTemplate;p(o)?t=o.getDerivedResource({templateValues:{0:n}}):t=newke({url:bo(`Assets/IAU2006_XYS/IAU2006_XYS_${n}.json`)});leti=t.fetchJson().then(function(r){e._chunkDownloadsInProgress[n]=!1;leta=e._samples,u=r.samples,d=n*e._samplesPerXysFile*3;for(letm=0,l=u.length;m<l;++m)a[d+m]=u[m]});returne._chunkDownloadsInProgress[n]=i,i}varOo=ut;functionR(e,n,t,o){this.x=O(e,0),this.y=O(n,0),this.z=O(t,0),this.w=O(o,0)}vargn=new_;R.fromAxisAngle=function(e,n,t){s.typeOf.object("axis",e),s.typeOf.number("angle",n);leto=n/2,i=Math.sin(o);gn=_.normalize(e,gn);letr=gn.x*i,a=gn.y*i,u=gn.z*i,d=Math.cos(o);returnp(t)?(t.x=r,t.y=a,t.z=u,t.w=d,t):newR(r,a,u,d)};varLr=[1,2,0],xr=newArray(3);R.fromRotationMatrix=function(e,n){s.typeOf.object("matrix",e);lett,o,i,r,a,u=e[Q.COLUMN0ROW0],d=e[Q.COLUMN1ROW1],m=e[Q.COLUMN2ROW2],l=u+d+m;if(l>0)t=Math.sqrt(l+1),a=.5*t,t=.5/t,o=(e[Q.COLUMN1ROW2]-e[Q.COLUMN2ROW1])*t,i=(e[Q.COLUMN2ROW0]-e[Q.COLUMN0ROW2])*t,r=(e[Q.COLUMN0ROW1]-e[Q.COLUMN1ROW0])*t;else{letw=Lr,T=0;d>u&&(T=1),m>u&&m>d&&(T=2);letC=w[T],P=w[C];t=Math.sqrt(e[Q.getElementIndex(T,T)]-e[Q.getElementIndex(C,C)]-e[Q.getElementIndex(P,P)]+1);letA=xr;A[T]=.5*t,t=.5/t,a=(e[Q.getElementIndex(P,C)]-e[Q.getElementIndex(C,P)])*t,A[C]=(e[Q.getElementIndex(C,T)]+e[Q.getElementIndex(T,C)])*t,A[P]=(e[Q.getElementIndex(P,T)]+e[Q.getElementIndex(T,P)])*t,o=-A[0],i=-A[1],r=-A[2]}returnp(n)?(n.x=o,n.y=i,n.z=r,n.w=a,n):newR(o,i,r,a)};vargo=newR,_o=newR,pt=newR,So=newR;R.fromHeadingPitchRoll=function(e,n){returns.typeOf.object("headingPitchRoll",e),So=R.fromAxisAngle(_.UNIT_X,e.roll,go),pt=R.fromAxisAngle(_.UNIT_Y,-e.pitch,n),n=R.multiply(pt,So,pt),_o=R.fromAxisAngle(_.UNIT_Z,-e.heading,go),R.multiply(_o,n,n)};varHn=new_,ht=new_,Ee=newR,Ro=newR,$n=newR;R.packedLength=4;R.pack=function(e,n,t){returns.typeOf.object("value",e),s.defined("array",n),t=O(t,0),n[t++]=e.x,n[t++]=e.y,n[t++]=e.z,n[t]=e.w,n};R.unpack=function(e,n,t){returns.defined("array",e),n=O(n,0),p(t)||(t=newR),t.x=e[n],t.y=e[n+1],t.z=e[n+2],t.w=e[n+3],t};R.packedInterpolationLength=3;R.convertPackedArrayForInterpolation=function(e,n,t,o){R.unpack(e,t*4,$n),R.conjugate($n,$n);for(leti=0,r=t-n+1;i<r;i++){leta=i*3;R.unpack(e,(n+i)*4,Ee),R.multiply(Ee,$n,Ee),Ee.w<0&&R.negate(Ee,Ee),R.computeAxis(Ee,Hn);letu=R.computeAngle(Ee);p(o)||(o=[]),o[a]=Hn.x*u,o[a+1]=Hn.y*u,o[a+2]=Hn.z*u}};R.unpackInterpolationResult=function(e,n,t,o,i){p(i)||(i=newR),_.fromArray(e,0,ht);letr=_.magnitude(ht);returnR.unpack(n,o*4,Ro),r===0?R.clone(R.IDENTITY,Ee):R.fromAxisAngle(ht,r,Ee),R.multiply(Ee,Ro,i)};R.clone=function(e,n){if(p(e))returnp(n)?(n.x=e.x,n.y=e.y,n.z=e.z,n.w=e.w,n):newR(e.x,e.y,e.z,e.w)};R.conjugate=function(e,n){returns.typeOf.object("quaternion",e),s.typeOf.object("result",n),n.x=-e.x,n.y=-e.y,n.z=-e.z,n.w=e.w,n};R.magnitudeSquared=function(e){returns.typeOf.object("quaternion",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};R.magnitude=function(e){returnMath.sqrt(R.magnitudeSquared(e))};R.normalize=function(e,n){s.typeOf.object("result",n);lett=1/R.magnitude(e),o=e.x*t,i=e.y*t,r=e.z*t,a=e.w*t;returnn.x=o,n.y=i,n.z=r,n.w=a,n};R.inverse=function(e,n){s.typeOf.object("result",n);lett=R.magnitudeSquared(e);returnn=R.conjugate(e,n),R.multiplyByScalar(n,1/t,n)};R.add=function(e,n,t){returns.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t.x=e.x+n.x,t.y=e.y+n.y,t.z=e.z+n.z,t.w=e.w+n.w,t};R.subtract=function(e,n,t){returns.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t.x=e.x-n.x,t.y=e.y-n.y,t.z=e.z-n.z,t.w=e.w-n.w,t};R.negate=function(e,n){returns.typeOf.object("quaternion",e),s.typeOf.object("result",n),n.x=-e.x,n.y=-e.y,n.z=-e.z,n.w=-e.w,n};R.dot=function(e,n){returns.typeOf.object("left",e),s.typeOf.object("right",n),e.x*n.x+e.y*n.y+e.z*n.z+e.w*n.w};R.multiply=function(e,n,t){s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t);leto=e.x,i=e.y,r=e.z,a=e.w,u=n.x,d=n.y,m=n.z,l=n.w,w=a*u+o*l+i*m-r*d,T=a*d-o*m+i*l+r*u,C=a*m+o*d-i*u+r*l,P=a*l-o*u-i*d-r*m;returnt.x=w,t.y=T,t.z=C,t.w=P,t};R.multiplyByScalar=function(e,n,t){returns.typeOf.object("quaternion",e),s.typeOf.number("scalar",n),s.typeOf.object("result",t),t.x=e.x*n,t.y=e.y*n,t.z=e.z*n,t.w=e.w*n,t};R.divideByScalar=function(e,n,t){returns.typeOf.object("quaternion",e),s.typeOf.number("scalar",n),s.typeOf.object("result",t),t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t.w=e.w/n,t};R.computeAxis=function(e,n){s.typeOf.object("quaternion",e),s.typeOf.object("result",n);lett=e.w;if(Math.abs(t-1)<E.EPSILON6||Math.abs(t+1)<E.EPSILON6)returnn.x=1,n.y=n.z=0,n;leto=1/Math.sqrt(1-t*t);returnn.x=e.x*o,n.y=e.y*o,n.z=e.z*o,n};R.computeAngle=function(e){returns.typeOf.object("quaternion",e),Math.abs(e.w-1)<E.EPSILON6?0:2*Math.acos(e.w)};vardt=newR;R.lerp=function(e,n,t,o){returns.typeOf.object("start",e),s.typeOf.object("end",n),s.typeOf.number("t",t),s.typeOf.object("result",o),dt=R.multiplyByScalar(n,t,dt),o=R.multiplyByScalar(e,1-t,o),R.add(dt,o,o)};varEo=newR,mt=newR,yt=newR;R.slerp=function(e,n,t,o){s.typeOf.object("start",e),s.typeOf.object("end",n),s.typeOf.number("t",t),s.typeOf.object("result",o);leti=R.dot(e,n),r=n;if(i<0&&(i=-i,r=Eo=R.negate(n,Eo)),1-i<E.EPSILON6)returnR.lerp(e,r,t,o);leta=Math.acos(i);returnmt=R.multiplyByScalar(e,Math.sin((1-t)*a),mt),yt=R.multiplyByScalar(r,Math.sin(t*a),yt),o=R.add(mt,yt,o),R.multiplyByScalar(o,1/Math.sin(a),o)};R.log=function(e,n){s.typeOf.object("quaternion",e),s.typeOf.object("result",n);lett=E.acosClamped(e.w),o=0;returnt!==0&&(o=t/Math.sin(t)),_.multiplyByScalar(e,o,n)};R.exp=function(e,n){s.typeOf.object("cartesian",e),s.typeOf.object("result",n);lett=_.magnitude(e),o=0;returnt!==0&&(o=Math.sin(t)/t),n.x=e.x*o,n.y=e.y*o,n.z=e.z*o,n.w=Math.cos(t),n};varBr=new_,Qr=new_,_n=newR,sn=newR;R.computeInnerQuadrangle=function(e,n,t,o){s.typeOf.object("q0",e),s.typeOf.object("q1",n),s.typeOf.object("q2",t),s.typeOf.object("result",o);leti=R.conjugate(n,_n);R.multiply(i,t,sn);letr=R.log(sn,Br);R.multiply(i,e,sn);leta=R.log(sn,Qr);return_.add(r,a,r),_.multiplyByScalar(r,.25,r),_.negate(r,r),R.exp(r,_n),R.multiply(n,_n,o)};R.squad=function(e,n,t,o,i,r){s.typeOf.object("q0",e),s.typeOf.object("q1",n),s.typeOf.object("s0",t),s.typeOf.object("s1",o),s.typeOf.number("t",i),s.typeOf.object("result",r);leta=R.slerp(e,n,i,_n),u=R.slerp(t,o,i,sn);returnR.slerp(a,u,2*i*(1-i),r)};varWr=newR,To=1.9011074535173003,Vn=un.supportsTypedArrays()?newFloat32Array(8):[],Yn=un.supportsTypedArrays()?newFloat32Array(8):[],Ue=un.supportsTypedArrays()?newFloat32Array(8):[],ze=un.supportsTypedArrays()?newFloat32Array(8):[];for(lete=0;e<7;++e){letn=e+1,t=2*n+1;Vn[e]=1/(n*t),Yn[e]=n/t}Vn[7]=To/(8*17);Yn[7]=To*8/17;R.fastSlerp=function(e,n,t,o){s.typeOf.object("start",e),s.typeOf.object("end",n),s.typeOf.number("t",t),s.typeOf.object("result",o);leti=R.dot(e,n),r;i>=0?r=1:(r=-1,i=-i);leta=i-1,u=1-t,d=t*t,m=u*u;for(letC=7;C>=0;--C)Ue[C]=(Vn[C]*d-Yn[C])*a,ze[C]=(Vn[C]*m-Yn[C])*a;letl=r*t*(1+Ue[0]*(1+Ue[1]*(1+Ue[2]*(1+Ue[3]*(1+Ue[4]*(1+Ue[5]*(1+Ue[6]*(1+Ue[7])))))))),w=u*(1+ze[0]*(1+ze[1]*(1+ze[2]*(1+ze[3]*(1+ze[4]*(1+ze[5]*(1+ze[6]*(1+ze[7])))))))),T=R.multiplyByScalar(e,w,Wr);returnR.multiplyByScalar(n,l,o),R.add(T,o,o)};R.fastSquad=function(e,n,t,o,i,r){s.typeOf.object("q0",e),s.typeOf.object("q1",n),s.typeOf.object("s0",t),s.typeOf.object("s1",o),s.typeOf.number("t",i),s.typeOf.object("result",r);leta=R.fastSlerp(e,n,i,_n),u=R.fastSlerp(t,o,i,sn);returnR.fastSlerp(a,u,2*i*(1-i),r)};R.equals=function(e,n){returne===n||p(e)&&p(n)&&e.x===n.x&&e.y===n.y&&e.z===n.z&&e.w===n.w};R.equalsEpsilon=function(e,n,t){returnt=O(t,0),e===n||p(e)&&p(n)&&Math.abs(e.x-n.x)<=t&&Math.abs(e.y-n.y)<=t&&Math.abs(e.z-n.z)<=t&&Math.abs(e.w-n.w)<=t};R.ZERO=Object.freeze(newR(0,0,0,0));R.IDENTITY=Object.freeze(newR(0,0,0,1));R.prototype.clone=function(e){returnR.clone(this,e)};R.prototype.equals=function(e){returnR.equals(this,e)};R.prototype.equalsEpsilon=function(e,n){returnR.equalsEpsilon(this,e,n)};R.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};varXe=R;varV={},lt={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"}},an={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},wt={},ge={east:new_,north:new_,up:new_,west:new_,south:new_,down:new_},Fe=new_,Le=new_,xe=new_;V.localFrameToFixedFrameGenerator=function(e,n){if(!lt.hasOwnProperty(e)||!lt[e].hasOwnProperty(n))thrownewj("firstAxis and secondAxis must be east, north, up, west, south or down.");lett=lt[e][n],o,i=e+n;returnp(wt[i])?o=wt[i]:(o=function(r,a,u){if(!p(r))thrownewj("origin is required.");if(isNaN(r.x)||isNaN(r.y)||isNaN(r.z))thrownewj("origin has a NaN component");if(p(u)||(u=newG),_.equalsEpsilon(r,_.ZERO,E.EPSILON14))_.unpack(an[e],0,Fe),_.unpack(an[n],0,Le),_.unpack(an[t],0,xe);elseif(E.equalsEpsilon(r.x,0,E.EPSILON14)&&E.equalsEpsilon(r.y,0,E.EPSILON14)){letd=E.sign(r.z);_.unpack(an[e],0,Fe),e!=="east"&&e!=="west"&&_.multiplyByScalar(Fe,d,Fe),_.unpack(an[n],0,Le),n!=="east"&&n!=="west"&&_.multiplyByScalar(Le,d,Le),_.unpack(an[t],0,xe),t!=="east"&&t!=="west"&&_.multiplyByScalar(xe,d,xe)}else{a=O(a,Ie.default),a.geodeticSurfaceNormal(r,ge.up);letd=ge.up,m=ge.east;m.x=-r.y,m.y=r.x,m.z=0,_.normalize(m,ge.east),_.cross(d,m,ge.north),_.multiplyByScalar(ge.up,-1,ge.down),_.multiplyByScalar(ge.east,-1,ge.west),_.multiplyByScalar(ge.north,-1,ge.south),Fe=ge[e],Le=ge[n],xe=ge[t]}returnu[0]=Fe.x,u[1]=Fe.y,u[2]=Fe.z,u[3]=0,u[4]=Le.x,u[5]=Le.y,u[6]=Le.z,u[7]=0,u[8]=xe.x,u[9]=xe.y,u[10]=xe.z,u[11]=0,u[12]=r.x,u[13]=r.y,u[14]=r.z,u[15]=1,u},wt[i]=o),o};V.eastNorthUpToFixedFrame=V.localFrameToFixedFrameGenerator("east","north");V.northEastDownToFixedFrame=V.localFrameToFixedFrameGenerator("north","east");V.northUpEastToFixedFrame=V.localFrameToFixedFrameGenerator("north","up");V.northWestUpToFixedFrame=V.localFrameToFixedFrameGenerator("north","west");varHr=newXe,$r=new_(1,1,1),Vr=newG;V.headingPitchRollToFixedFrame=function(e,n,t,o,i){s.typeOf.object("HeadingPitchRoll",n),o=O(o,V.eastNorthUpToFixedFrame);letr=Xe.fromHeadingPitchRoll(n,Hr),a=G.fromTranslationQuaternionRotationScale(_.ZERO,r,$r,Vr);returni=o(e,t,i),G.multiply(i,a,i)};varYr=newG,Xr=newQ;V.headingPitchRollQuaternion=function(e,n,t,o,i){s.typeOf.object("HeadingPitchRoll",n);letr=V.headingPitchRollToFixedFrame(e,n,t,o,Yr),a=G.getMatrix3(r,Xr);returnXe.fromRotationMatrix(a,i)};varZr=new_(1,1,1),Jr=new_,Co=newG,Gr=newG,Kr=newQ,ei=newXe;V.fixedFrameToHeadingPitchRoll=function(e,n,t,o){s.defined("transform",e),n=O(n,Ie.default),t=O(t,V.eastNorthUpToFixedFrame),p(o)||(o=newxn);leti=G.getTranslation(e,Jr);if(_.equals(i,_.ZERO))returno.heading=0,o.pitch=0,o.roll=0,o;letr=G.inverseTransformation(t(i,n,Co),Co),a=G.setScale(e,Zr,Gr);a=G.setTranslation(a,_.ZERO,a),r=G.multiply(r,a,r);letu=Xe.fromRotationMatrix(G.getMatrix3(r,Kr),ei);returnu=Xe.normalize(u,u),xn.fromQuaternion(u,o)};varni=6*3600+41*60+50.54841,ti=8640184812866e-6,oi=.093104,ri=-62e-7,ii=11772758384668e-32,ci=72921158553e-15,si=E.TWO_PI/86400,Xn=newpe;V.computeIcrfToCentralBodyFixedMatrix=function(e,n){lett=V.computeIcrfToFixedMatrix(e,n);returnp(t)||(t=V.computeTemeToPseudoFixedMatrix(e,n)),t};V.computeTemeToPseudoFixedMatrix=function(e,n){if(!p(e))thrownewj("date is required.");Xn=pe.addSeconds(e,-pe.computeTaiMinusUtc(e),Xn);lett=Xn.dayNumber,o=Xn.secondsOfDay,i,r=t-2451545;o>=43200?i=(r+.5)/ce.DAYS_PER_JULIAN_CENTURY:i=(r-.5)/ce.DAYS_PER_JULIAN_CENTURY;letu=(ni+i*(ti+i*(oi+i*ri)))*si%E.TWO_PI,d=ci+ii*(t-24515455e-1),m=(o+ce.SECONDS_PER_DAY*.5)%ce.SECONDS_PER_DAY,l=u+d*m,w=Math.cos(l),T=Math.sin(l);returnp(n)?(n[0]=w,n[1]=-T,n[2]=0,n[3]=T,n[4]=w,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n):newQ(w,T,0,-T,w,0,0,0,1)};V.iau2006XysData=newOo;V.earthOrientationParameters=ho.NONE;vargt=32.184,ai=2451545;V.preloadIcrfFixed=function(e){letn=e.start.dayNumber,t=e.start.secondsOfDay+gt,o=e.stop.dayNumber,i=e.stop.secondsOfDay+gt;returnV.iau2006XysData.preload(n,t,o,i)};V.computeIcrfToFixedMatrix=function(e,n){if(!p(e))thrownewj("date is required.");p(n)||(n=newQ);lett=V.computeFixedToIcrfMatrix(e,n);if(p(t))returnQ.transpose(t,n)};varfi=32.184,ui=2451545,Zn=newxn,pi=newQ,hi=newpe;V.computeMoonFixedToIcrfMatrix=function(e,n){if(!p(e))thrownewj("date is required.");p(n)||(n=newQ);lett=pe.addSeconds(e,fi,hi),o=pe.totalDays(t)-ui,i=E.toRadians(12.112)-E.toRadians(.052992)*o,r=E.toRadians(24.224)-E.toRadians(.105984)*o,a=E.toRadians(227.645)+E.toRadians(13.012)*o,u=E.toRadians(261.105)+E.toRadians(13.340716)*o,d=E.toRadians(358)+E.toRadians(.9856)*o;returnZn.pitch=E.toRadians(180)-E.toRadians(3.878)*Math.sin(i)-E.toRadians(.12)*Math.sin(r)+E.toRadians(.07)*Math.sin(a)-E.toRadians(.017)*Math.sin(u),Zn.roll=E.toRadians(66.53-90)+E.toRadians(1.543)*Math.cos(i)+E.toRadians(.24)*Math.cos(r)-E.toRadians(.028)*Math.cos(a)+E.toRadians(.007)*Math.cos(u),Zn.heading=E.toRadians(244.375-90)+E.toRadians(13.17635831)*o+E.toRadians(3.558)*Math.sin(i)+E.toRadians(.121)*Math.sin(r)-E.toRadians(.064)*Math.sin(a)+E.toRadians(.016)*Math.sin(u)+E.toRadians(.025)*Math.sin(d),Q.fromHeadingPitchRoll(Zn,pi)};V.computeIcrfToMoonFixedMatrix=function(e,n){if(!p(e))thrownewj("date is required.");p(n)||(n=newQ);lett=V.computeMoonFixedToIcrfMatrix(e,n);if(p(t))returnQ.transpose(t,n)};vardi=newWn(0,0,0),mi=newhn(0,0,0,0,0,0),bt=newQ,Ot=newQ;V.computeFixedToIcrfMatrix=function(e,n){if(!p(e))thrownewj("date is required.");p(n)||(n=newQ);lett=V.earthOrientationParameters.compute(e,mi);if(!p(t))return;leto=e.dayNumber,i=e.secondsOfDay+gt,r=V.iau2006XysData.computeXysRadians(o,i,di);if(!p(r))return;leta=r.x+t.xPoleOffset,u=r.y+t.yPoleOffset,d=1/(1+Math.sqrt(1-a*a-u*u)),m=bt;m[0]=1-d*a*a,m[3]=-d*a*u,m[6]=a,m[1]=-d*a*u,m[4]=1-d*u*u,m[7]=u,m[2]=-a,m[5]=-u,m[8]=1-d*(a*a+u*u);letl=Q.fromRotationZ(-r.s,Ot),w=Q.multiply(m,l,bt),T=e.dayNumber,C=e.secondsOfDay-pe.computeTaiMinusUtc(e)+t.ut1MinusUtc,P=T-2451545,A=C/ce.SECONDS_PER_DAY,q=.779057273264+A+.00273781191135448*(P+A);q=q%1*E.TWO_PI;letk=Q.fromRotationZ(q,Ot),L=Q.multiply(w,k,bt),F=Math.cos(t.xPoleWander),B=Math.cos(t.yPoleWander),W=Math.sin(t.xPoleWander),H=Math.sin(t.yPoleWander),ee=o-ai+i/ce.SECONDS_PER_DAY;ee/=36525;letre=-47e-6*ee*E.RADIANS_PER_DEGREE/3600,Z=Math.cos(re),oe=Math.sin(re),J=Ot;returnJ[0]=F*Z,J[1]=F*oe,J[2]=W,J[3]=-B*oe+H*W*Z,J[4]=B*Z+H*W*oe,J[5]=-H*F,J[6]=-H*oe-B*W*Z,J[7]=H*Z-B*W*oe,J[8]=B*F,Q.multiply(L,J,n)};varyi=newqe;V.pointToWindowCoordinates=function(e,n,t,o){returno=V.pointToGLWindowCoordinates(e,n,t,o),o.y=2*n[5]-o.y,o};V.pointToGLWindowCoordinates=function(e,n,t,o){if(!p(e))thrownewj("modelViewProjectionMatrix is required.");if(!p(n))thrownewj("viewportTransformation is required.");if(!p(t))thrownewj("point is required.");p(o)||(o=newOe);leti=yi;returnG.multiplyByVector(e,qe.fromElements(t.x,t.y,t.z,1,i),i),qe.multiplyByScalar(i,1/i.w,i),G.multiplyByVector(n,i,i),Oe.fromCartesian4(i,o)};varli=new_,wi=new_,bi=new_;V.rotationMatrixFromPositionVelocity=function(e,n,t,o){if(!p(e))thrownewj("position is required.");if(!p(n))thrownewj("velocity is required.");leti=O(t,Ie.default).geodeticSurfaceNormal(e,li),r=_.cross(n,i,wi);_.equalsEpsilon(r,_.ZERO,E.EPSILON6)&&(r=_.clone(_.UNIT_X,r));leta=_.cross(r,n,bi);return_.normalize(a,a),_.cross(n,a,r),_.negate(r,r),_.normalize(r,r),p(o)||(o=newQ),o[0]=n.x,o[1]=n.y,o[2]=n.z,o[3]=r.x,o[4]=r.y,o[5]=r.z,o[6]=a.x,o[7]=a.y,o[8]=a.z,o};varvo=newG(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),Ao=newMe,_t=new_,Oi=new_,gi=newQ,St=newG,jo=newG;V.basisTo2D=function(e,n,t){if(!p(e))thrownewj("projection is required.");if(!p(n))thrownewj("matrix is required.");if(!p(t))thrownewj("result is required.");leto=G.getTranslation(n,Oi),i=e.ellipsoid,r;if(_.equals(o,_.ZERO))r=_.clone(_.ZERO,_t);else{letl=i.cartesianToCartographic(o,Ao);r=e.project(l,_t),_.fromElements(r.z,r.x,r.y,r)}leta=V.eastNorthUpToFixedFrame(o,i,St),u=G.inverseTransformation(a,jo),d=G.getMatrix3(n,gi),m=G.multiplyByMatrix3(u,d,t);returnG.multiply(vo,m,t),G.setTranslation(t,r,t),t};V.ellipsoidTo2DModelMatrix=function(e,n,t){if(!p(e))thrownewj("projection is required.");if(!p(n))thrownewj("center is required.");if(!p(t))thrownewj("result is required.");leto=e.ellipsoid,i=V.eastNorthUpToFixedFrame(n,o,St),r=G.inverseTransformation(i,jo),a=o.cartesianToCartographic(n,Ao),u=e.project(a,_t);_.fromElements(u.z,u.x,u.y,u);letd=G.fromTranslation(u,St);returnG.multiply(vo,r,t),G.multiply(d,t,t),t};varMo=V;functionx(e,n,t,o){this.west=O(e,0),this.south=O(n,0),this.east=O(t,0),this.north=O(o,0)}Object.defineProperties(x.prototype,{width:{get:function(){returnx.computeWidth(this)}},height:{get:function(){returnx.computeHeight(this)}}});x.packedLength=4;x.pack=function(e,n,t){returns.typeOf.object("value",e),s.defined("array",n),t=O(t,0),n[t++]=e.west,n[t++]=e.south,n[t++]=e.east,n[t]=e.north,n};x.unpack=function(e,n,t){returns.defined("array",e),n=O(n,0),p(t)||(t=newx),t.west=e[n++],t.south=e[n++],t.east=e[n++],t.north=e[n],t};x.computeWidth=function(e){s.typeOf.object("rectangle",e);letn=e.east,t=e.west;returnn<t&&(n+=E.TWO_PI),n-t};x.computeHeight=function(e){returns.typeOf.object("rectangle",e),e.north-e.south};x.fromDegrees=function(e,n,t,o,i){returne=E.toRadians(O(e,0)),n=E.toRadians(O(n,0)),t=E.toRadians(O(t,0)),o=E.toRadians(O(o,0)),p(i)?(i.west=e,i.south=n,i.east=t,i.north=o,i):newx(e,n,t,o)};x.fromRadians=function(e,n,t,o,i){returnp(i)?(i.west=O(e,0),i.south=O(n,0),i.east=O(t,0),i.north=O(o,0),i):newx(e,n,t,o)};x.fromCartographicArray=function(e,n){s.defined("cartographics",e);lett=Number.MAX_VALUE,o=-Number.MAX_VALUE,i=Number.MAX_VALUE,r=-Number.MAX_VALUE,a=Number.MAX_VALUE,u=-Number.MAX_VALUE;for(letd=0,m=e.length;d<m;d++){letl=e[d];t=Math.min(t,l.longitude),o=Math.max(o,l.longitude),a=Math.min(a,l.latitude),u=Math.max(u,l.latitude);letw=l.longitude>=0?l.longitude:l.longitude+E.TWO_PI;i=Math.min(i,w),r=Math.max(r,w)}returno-t>r-i&&(t=i,o=r,o>E.PI&&(o=o-E.TWO_PI),t>E.PI&&(t=t-E.TWO_PI)),p(n)?(n.west=t,n.south=a,n.east=o,n.north=u,n):newx(t,a,o,u)};x.fromCartesianArray=function(e,n,t){s.defined("cartesians",e),n=O(n,Ie.default);leto=Number.MAX_VALUE,i=-Number.MAX_VALUE,r=Number.MAX_VALUE,a=-Number.MAX_VALUE,u=Number.MAX_VALUE,d=-Number.MAX_VALUE;for(letm=0,l=e.length;m<l;m++){letw=n.cartesianToCartographic(e[m]);o=Math.min(o,w.longitude),i=Math.max(i,w.longitude),u=Math.min(u,w.latitude),d=Math.max(d,w.latitude);letT=w.longitude>=0?w.longitude:w.longitude+E.TWO_PI;r=Math.min(r,T),a=Math.max(a,T)}returni-o>a-r&&(o=r,i=a,i>E.PI&&(i=i-E.TWO_PI),o>E.PI&&(o=o-E.TWO_PI)),p(t)?(t.west=o,t.south=u,t.east=i,t.north=d,t):newx(o,u,i,d)};var_i=new_,Si=new_,Ri=new_,Ei=new_,Ti=new_,Rt=newArray(5);for(lete=0;e<Rt.length;++e)Rt[e]=new_;x.fromBoundingSphere=function(e,n,t){s.typeOf.object("boundingSphere",e);leto=e.center,i=e.radius;if(p(n)||(n=Ie.default),p(t)||(t=newx),_.equals(o,_.ZERO))returnx.clone(x.MAX_VALUE,t),t;letr=Mo.eastNorthUpToFixedFrame(o,n,_i),a=G.multiplyByPointAsVector(r,_.UNIT_X,Si);_.normalize(a,a);letu=G.multiplyByPointAsVector(r,_.UNIT_Y,Ri);_.normalize(u,u),_.multiplyByScalar(u,i,u),_.multiplyByScalar(a,i,a);letd=_.negate(u,Ti),m=_.negate(a,Ei),l=Rt,w=l[0];return_.add(o,u,w),w=l[1],_.add(o,m,w),w=l[2],_.add(o,d,w),w=l[3],_.add(o,a,w),l[4]=o,x.fromCartesianArray(l,n,t)};x.clone=function(e,n){if(p(e))returnp(n)?(n.west=e.west,n.south=e.south,n.east=e.east,n.north=e.north,n):newx(e.west,e.south,e.east,e.north)};x.equalsEpsilon=function(e,n,t){returnt=O(t,0),e===n||p(e)&&p(n)&&Math.abs(e.west-n.west)<=t&&Math.abs(e.south-n.south)<=t&&Math.abs(e.east-n.east)<=t&&Math.abs(e.north-n.north)<=t};x.prototype.clone=function(e){returnx.clone(this,e)};x.prototype.equals=function(e){returnx.equals(this,e)};x.equals=function(e,n){returne===n||p(e)&&p(n)&&e.west===n.west&&e.south===n.south&&e.east===n.east&&e.north===n.north};x.prototype.equalsEpsilon=function(e,n){returnx.equalsEpsilon(this,e,n)};x._validate=function(e){s.typeOf.object("rectangle",e);letn=e.north;s.typeOf.number.greaterThanOrEquals("north",n,-E.PI_OVER_TWO),s.typeOf.number.lessThanOrEquals("north",n,E.PI_OVER_TWO);lett=e.south;s.typeOf.number.greaterThanOrEquals("south",t,-E.PI_OVER_TWO),s.typeOf.number.lessThanOrEquals("south",t,E.PI_OVER_TWO);leto=e.west;s.typeOf.number.greaterThanOrEquals("west",o,-Math.PI),s.typeOf.number.lessThanOrEquals("west",o,Math.PI);leti=e.east;s.typeOf.number.greaterThanOrEquals("east",i,-Math.PI),s.typeOf.number.lessThanOrEquals("east",i,Math.PI)};x.southwest=function(e,n){returns.typeOf.object("rectangle",e),p(n)?(n.longitude=e.west,n.latitude=e.south,n.height=0,n):newMe(e.west,e.south)};x.northwest=function(e,n){returns.typeOf.object("rectangle",e),p(n)?(n.longitude=e.west,n.latitude=e.north,n.height=0,n):newMe(e.west,e.north)};x.northeast=function(e,n){returns.typeOf.object("rectangle",e),p(n)?(n.longitude=e.east,n.latitude=e.north,n.height=0,n):newMe(e.east,e.north)};x.southeast=function(e,n){returns.typeOf.object("rectangle",e),p(n)?(n.longitude=e.east,n.latitude=e.south,n.height=0,n):newMe(e.east,e.south)};x.center=function(e,n){s.typeOf.object("rectangle",e);lett=e.east,o=e.west;t<o&&(t+=E.TWO_PI);leti=E.negativePiToPi((o+t)*.5),r=(e.south+e.north)*.5;returnp(n)?(n.longitude=i,n.latitude=r,n.height=0,n):newMe(i,r)};x.intersection=function(e,n,t){s.typeOf.object("rectangle",e),s.typeOf.object("otherRectangle",n);leto=e.east,i=e.west,r=n.east,a=n.west;o<i&&r>0?o+=E.TWO_PI:r<a&&o>0&&(r+=E.TWO_PI),o<i&&a<0?a+=E.TWO_PI:r<a&&i<0&&(i+=E.TWO_PI);letu=E.negativePiToPi(Math.max(i,a)),d=E.negativePiToPi(Math.min(o,r));if((e.west<e.east||n.west<n.east)&&d<=u)return;letm=Math.max(e.south,n.south),l=Math.min(e.north,n.north);if(!(m>=l))returnp(t)?(t.west=u,t.south=m,t.east=d,t.north=l,t):newx(u,m,d,l)};x.simpleIntersection=function(e,n,t){s.typeOf.object("rectangle",e),s.typeOf.object("otherRectangle",n);leto=Math.max(e.west,n.west),i=Math.max(e.south,n.south),r=Math.min(e.east,n.east),a=Math.min(e.north,n.north);if(!(i>=a||o>=r))returnp(t)?(t.west=o,t.south=i,t.east=r,t.north=a,t):newx(o,i,r,a)};x.union=function(e,n,t){s.typeOf.object("rectangle",e),s.typeOf.object("otherRectangle",n),p(t)||(t=newx);leto=e.east,i=e.west,r=n.east,a=n.west;o<i&&r>0?o+=E.TWO_PI:r<a&&o>0&&(r+=E.TWO_PI),o<i&&a<0?a+=E.TWO_PI:r<a&&i<0&&(i+=E.TWO_PI);letu=E.negativePiToPi(Math.min(i,a)),d=E.negativePiToPi(Math.max(o,r));returnt.west=u,t.south=Math.min(e.south,n.south),t.east=d,t.north=Math.max(e.north,n.north),t};x.expand=function(e,n,t){returns.typeOf.object("rectangle",e),s.typeOf.object("cartographic",n),p(t)||(t=newx),t.west=Math.min(e.west,n.longitude),t.south=Math.min(e.south,n.latitude),t.east=Math.max(e.east,n.longitude),t.north=Math.max(e.north,n.latitude),t};x.contains=function(e,n){s.typeOf.object("rectangle",e),s.typeOf.object("cartographic",n);lett=n.longitude,o=n.latitude,i=e.west,r=e.east;returnr<i&&(r+=E.TWO_PI,t<0&&(t+=E.TWO_PI)),(t>i||E.equalsEpsilon(t,i,E.EPSILON14))&&(t<r||E.equalsEpsilon(t,r,E.EPSILON14))&&o>=e.south&&o<=e.north};varCi=newMe;x.subsample=function(e,n,t,o){s.typeOf.object("rectangle",e),n=O(n,Ie.default),t=O(t,0),p(o)||(o=[]);leti=0,r=e.north,a=e.south,u=e.east,d=e.west,m=Ci;m.height=t,m.longitude=d,m.latitude=r,o[i]=n.cartographicToCartesian(m,o[i]),i++,m.longitude=u,o[i]=n.cartographicToCartesian(m,o[i]),i++,m.latitude=a,o[i]=n.cartographicToCartesian(m,o[i]),i++,m.longitude=d,o[i]=n.cartographicToCartesian(m,o[i]),i++,r<0?m.latitude=r:a>0?m.latitude=a:m.latitude=0;for(letl=1;l<8;++l)m.longitude=-Math.PI+l*E.PI_OVER_TWO,x.contains(e,m)&&(o[i]=n.cartographicToCartesian(m,o[i]),i++);returnm.latitude===0&&(m.longitude=d,o[i]=n.cartographicToCartesian(m,o[i]),i++,m.longitude=u,o[i]=n.cartographicToCartesian(m,o[i]),i++),o.length=i,o};x.subsection=function(e,n,t,o,i,r){if(s.typeOf.object("rectangle",e),s.typeOf.number.greaterThanOrEquals("westLerp",n,0),s.typeOf.number.lessThanOrEquals("westLerp",n,1),s.typeOf.number.greaterThanOrEquals("southLerp",t,0),s.typeOf.number.lessThanOrEquals("southLerp",t,1),s.typeOf.number.greaterThanOrEquals("eastLerp",o,0),s.typeOf.number.lessThanOrEquals("eastLerp",o,1),s.typeOf.number.greaterThanOrEquals("northLerp",i,0),s.typeOf.number.lessThanOrEquals("northLerp",i,1),s.typeOf.number.lessThanOrEquals("westLerp",n,o),s.typeOf.number.lessThanOrEquals("southLerp",t,i),p(r)||(r=newx),e.west<=e.east){letu=e.east-e.west;r.west=e.west+n*u,r.east=e.west+o*u}else{letu=E.TWO_PI+e.east-e.west;r.west=E.negativePiToPi(e.west+n*u),r.east=E.negativePiToPi(e.west+o*u)}leta=e.north-e.south;returnr.south=e.south+t*a,r.north=e.south+i*a,n===1&&(r.west=e.east),o===1&&(r.east=e.east),t===1&&(r.south=e.north),i===1&&(r.north=e.north),r};x.MAX_VALUE=Object.freeze(newx(-Math.PI,-E.PI_OVER_TWO,Math.PI,E.PI_OVER_TWO));varmf=x;functionD(e,n,t,o){this[0]=O(e,0),this[1]=O(t,0),this[2]=O(n,0),this[3]=O(o,0)}D.packedLength=4;D.pack=function(e,n,t){returns.typeOf.object("value",e),s.defined("array",n),t=O(t,0),n[t++]=e[0],n[t++]=e[1],n[t++]=e[2],n[t++]=e[3],n};D.unpack=function(e,n,t){returns.defined("array",e),n=O(n,0),p(t)||(t=newD),t[0]=e[n++],t[1]=e[n++],t[2]=e[n++],t[3]=e[n++],t};D.packArray=function(e,n){s.defined("array",e);lett=e.length,o=t*4;if(!p(n))n=newArray(o);else{if(!Array.isArray(n)&&n.length!==o)thrownewj("If result is a typed array, it must have exactly array.length * 4 elements");n.length!==o&&(n.length=o)}for(leti=0;i<t;++i)D.pack(e[i],n,i*4);returnn};D.unpackArray=function(e,n){if(s.defined("array",e),s.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!==0)thrownewj("array length must be a multiple of 4.");lett=e.length;p(n)?n.length=t/4:n=newArray(t/4);for(leto=0;o<t;o+=4){leti=o/4;n[i]=D.unpack(e,o,n[i])}returnn};D.clone=function(e,n){if(p(e))returnp(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n):newD(e[0],e[2],e[1],e[3])};D.fromArray=D.unpack;D.fromColumnMajorArray=function(e,n){returns.defined("values",e),D.clone(e,n)};D.fromRowMajorArray=function(e,n){returns.defined("values",e),p(n)?(n[0]=e[0],n[1]=e[2],n[2]=e[1],n[3]=e[3],n):newD(e[0],e[1],e[2],e[3])};D.fromScale=function(e,n){returns.typeOf.object("scale",e),p(n)?(n[0]=e.x,n[1]=0,n[2]=0,n[3]=e.y,n):newD(e.x,0,0,e.y)};D.fromUniformScale=function(e,n){returns.typeOf.number("scale",e),p(n)?(n[0]=e,n[1]=0,n[2]=0,n[3]=e,n):newD(e,0,0,e)};D.fromRotation=function(e,n){s.typeOf.number("angle",e);lett=Math.cos(e),o=Math.sin(e);returnp(n)?(n[0]=t,n[1]=o,n[2]=-o,n[3]=t,n):newD(t,-o,o,t)};D.toArray=function(e,n){returns.typeOf.object("matrix",e),p(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n):[e[0],e[1],e[2],e[3]]};D.getElementIndex=function(e,n){returns.typeOf.number.greaterThanOrEquals("row",n,0),s.typeOf.number.lessThanOrEquals("row",n,1),s.typeOf.number.greaterThanOrEquals("column",e,0),s.typeOf.number.lessThanOrEquals("column",e,1),e*2+n};D.getColumn=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,1),s.typeOf.object("result",t);leto=n*2,i=e[o],r=e[o+1];returnt.x=i,t.y=r,t};D.setColumn=function(e,n,t,o){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,1),s.typeOf.object("cartesian",t),s.typeOf.object("result",o),o=D.clone(e,o);leti=n*2;returno[i]=t.x,o[i+1]=t.y,o};D.getRow=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,1),s.typeOf.object("result",t);leto=e[n],i=e[n+2];returnt.x=o,t.y=i,t};D.setRow=function(e,n,t,o){returns.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",n,0),s.typeOf.number.lessThanOrEquals("index",n,1),s.typeOf.object("cartesian",t),s.typeOf.object("result",o),o=D.clone(e,o),o[n]=t.x,o[n+2]=t.y,o};varvi=newOe;D.setScale=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("scale",n),s.typeOf.object("result",t);leto=D.getScale(e,vi),i=n.x/o.x,r=n.y/o.y;returnt[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*r,t[3]=e[3]*r,t};varAi=newOe;D.setUniformScale=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.number("scale",n),s.typeOf.object("result",t);leto=D.getScale(e,Ai),i=n/o.x,r=n/o.y;returnt[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*r,t[3]=e[3]*r,t};varPo=newOe;D.getScale=function(e,n){returns.typeOf.object("matrix",e),s.typeOf.object("result",n),n.x=Oe.magnitude(Oe.fromElements(e[0],e[1],Po)),n.y=Oe.magnitude(Oe.fromElements(e[2],e[3],Po)),n};varUo=newOe;D.getMaximumScale=function(e){returnD.getScale(e,Uo),Oe.maximumComponent(Uo)};varji=newOe;D.setRotation=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("result",t);leto=D.getScale(e,ji);returnt[0]=n[0]*o.x,t[1]=n[1]*o.x,t[2]=n[2]*o.y,t[3]=n[3]*o.y,t};varMi=newOe;D.getRotation=function(e,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);lett=D.getScale(e,Mi);returnn[0]=e[0]/t.x,n[1]=e[1]/t.x,n[2]=e[2]/t.y,n[3]=e[3]/t.y,n};D.multiply=function(e,n,t){s.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t);leto=e[0]*n[0]+e[2]*n[1],i=e[0]*n[2]+e[2]*n[3],r=e[1]*n[0]+e[3]*n[1],a=e[1]*n[2]+e[3]*n[3];returnt[0]=o,t[1]=r,t[2]=i,t[3]=a,t};D.add=function(e,n,t){returns.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t};D.subtract=function(e,n,t){returns.typeOf.object("left",e),s.typeOf.object("right",n),s.typeOf.object("result",t),t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t};D.multiplyByVector=function(e,n,t){s.typeOf.object("matrix",e),s.typeOf.object("cartesian",n),s.typeOf.object("result",t);leto=e[0]*n.x+e[2]*n.y,i=e[1]*n.x+e[3]*n.y;returnt.x=o,t.y=i,t};D.multiplyByScalar=function(e,n,t){returns.typeOf.object("matrix",e),s.typeOf.number("scalar",n),s.typeOf.object("result",t),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t};D.multiplyByScale=function(e,n,t){returns.typeOf.object("matrix",e),s.typeOf.object("scale",n),s.typeOf.object("result",t),t[0]=e[0]*n.x,t[1]=e[1]*n.x,t[2]=e[2]*n.y,t[3]=e[3]*n.y,t};D.multiplyByUniformScale=function(e,n,t){returns.typeOf.object("matrix",e),s.typeOf.number("scale",n),s.typeOf.object("result",t),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t};D.negate=function(e,n){returns.typeOf.object("matrix",e),s.typeOf.object("result",n),n[0]=-e[0],n[1]=-e[1],n[2]=-e[2],n[3]=-e[3],n};D.transpose=function(e,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);lett=e[0],o=e[2],i=e[1],r=e[3];returnn[0]=t,n[1]=o,n[2]=i,n[3]=r,n};D.abs=function(e,n){returns.typeOf.object("matrix",e),s.typeOf.object("result",n),n[0]=Math.abs(e[0]),n[1]=Math.abs(e[1]),n[2]=Math.abs(e[2]),n[3]=Math.abs(e[3]),n};D.equals=function(e,n){returne===n||p(e)&&p(n)&&e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]&&e[3]===n[3]};D.equalsArray=function(e,n,t){returne[0]===n[t]&&e[1]===n[t+1]&&e[2]===n[t+2]&&e[3]===n[t+3]};D.equalsEpsilon=function(e,n,t){returnt=O(t,0),e===n||p(e)&&p(n)&&Math.abs(e[0]-n[0])<=t&&Math.abs(e[1]-n[1])<=t&&Math.abs(e[2]-n[2])<=t&&Math.abs(e[3]-n[3])<=t};D.IDENTITY=Object.freeze(newD(1,0,0,1));D.ZERO=Object.freeze(newD(0,0,0,0));D.COLUMN0ROW0=0;D.COLUMN0ROW1=1;D.COLUMN1ROW0=2;D.COLUMN1ROW1=3;Object.defineProperties(D.prototype,{length:{get:function(){returnD.packedLength}}});D.prototype.clone=function(e){returnD.clone(this,e)};D.prototype.equals=function(e){returnD.equals(this,e)};D.prototype.equalsEpsilon=function(e,n){returnD.equalsEpsilon(this,e,n)};D.prototype.toString=function(){return`(${this[0]}, ${this[2]})
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
*/
import{aasd}from"./chunk-ZFTFDHK4.js";import{aasl}from"./chunk-T7ERZ2CJ.js";import{basO,cash,dasp}from"./chunk-GSNDLQ4C.js";import{dasA}from"./chunk-BKSIEBAA.js";import"./chunk-YWRPWWKI.js";import{a}from"./chunk-VTVHUB7E.js";import{aasm}from"./chunk-JMSSU44E.js";import"./chunk-4UYSGV57.js";import"./chunk-ANLJ4KBN.js";import"./chunk-ID6SFQTL.js";import{aasu}from"./chunk-VLPNAR64.js";import{aasb,basr}from"./chunk-GE5NEIZC.js";import{easc}from"./chunk-35CVRQTC.js";varg=newm;functionf(e){e=u(e,u.EMPTY_OBJECT);lett=e.minimum,n=e.maximum;if(r.typeOf.object("min",t),r.typeOf.object("max",n),c(e.offsetAttribute)&&e.offsetAttribute===d.TOP)thrownewb("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=m.clone(t),this._max=m.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}f.fromDimensions=function(e){e=u(e,u.EMPTY_OBJECT);lett=e.dimensions;r.typeOf.object("dimensions",t),r.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),r.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),r.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);letn=m.multiplyByScalar(t,.5,newm);returnnewf({minimum:m.negate(n,newm),maximum:n,offsetAttribute:e.offsetAttribute})};f.fromAxisAlignedBoundingBox=function(e){returnr.typeOf.object("boundindBox",e),newf({minimum:e.minimum,maximum:e.maximum})};f.packedLength=2*m.packedLength+1;f.pack=function(e,t,n){returnr.typeOf.object("value",e),r.defined("array",t),n=u(n,0),m.pack(e._min,t,n),m.pack(e._max,t,n+m.packedLength),t[n+m.packedLength*2]=u(e._offsetAttribute,-1),t};varw=newm,x=newm,_={minimum:w,maximum:x,offsetAttribute:void0};f.unpack=function(e,t,n){r.defined("array",e),t=u(t,0);lets=m.unpack(e,t,w),o=m.unpack(e,t+m.packedLength,x),i=e[t+m.packedLength*2];returnc(n)?(n._min=m.clone(s,n._min),n._max=m.clone(o,n._max),n._offsetAttribute=i===-1?void0:i,n):(_.offsetAttribute=i===-1?void0:i,newf(_))};f.createGeometry=function(e){lett=e._min,n=e._max;if(m.equals(t,n))return;lets=newl,o=newUint16Array(12*2),i=newFloat64Array(8*3);i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=n.x,i[4]=t.y,i[5]=t.z,i[6]=n.x,i[7]=n.y,i[8]=t.z,i[9]=t.x,i[10]=n.y,i[11]=t.z,i[12]=t.x,i[13]=t.y,i[14]=n.z,i[15]=n.x,i[16]=t.y,i[17]=n.z,i[18]=n.x,i[19]=n.y,i[20]=n.z,i[21]=t.x,i[22]=n.y,i[23]=n.z,s.position=newp({componentDatatype:a.DOUBLE,componentsPerAttribute:3,values:i}),o[0]=4,o[1]=5,o[2]=5,o[3]=6,o[4]=6,o[5]=7,o[6]=7,o[7]=4,o[8]=0,o[9]=1,o[10]=1,o[11]=2,o[12]=2,o[13]=3,o[14]=3,o[15]=0,o[16]=0,o[17]=4,o[18]=1,o[19]=5,o[20]=2,o[21]=6,o[22]=3,o[23]=7;letk=m.subtract(n,t,g),E=m.magnitude(k)*.5;if(c(e._offsetAttribute)){letT=i.length,B=e._offsetAttribute===d.NONE?0:1,z=newUint8Array(T/3).fill(B);s.applyOffset=newp({componentDatatype:a.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}returnnewh({attributes:s,indices:o,primitiveType:O.LINES,boundingSphere:newA(m.ZERO,E),offsetAttribute:e._offsetAttribute})};vary=f;functionL(e,t){returnc(t)&&(e=y.unpack(e,t)),y.createGeometry(e)}varR=L;export{Rasdefault};