summit/frontend/node_modules/mapbox-gl/dist/mapbox-gl-csp.js

11 lines
1.5 MiB
JavaScript
Raw Normal View History

2025-12-08 16:31:30 +00:00
var e,t;e=this,t=function(){var e=1e-6,t="undefined"!=typeof Float32Array?Float32Array:Array;function i(e,t){var i=t[0],r=t[1],n=t[2],o=t[3],s=i*o-n*r;return s?(e[0]=o*(s=1/s),e[1]=-r*s,e[2]=-n*s,e[3]=i*s,e):null}function r(){var e=new t(9);return t!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function n(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function o(e,t){var i=t[0],r=t[1],n=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8];return e[0]=s*u-a*c,e[1]=n*c-r*u,e[2]=r*a-n*s,e[3]=a*l-o*u,e[4]=i*u-n*l,e[5]=n*o-i*a,e[6]=o*c-s*l,e[7]=r*l-i*c,e[8]=i*s-r*o,e}function s(e,t,i){var r=t[0],n=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=i[0],p=i[1],f=i[2],m=i[3],_=i[4],g=i[5],y=i[6],x=i[7],v=i[8];return e[0]=d*r+p*s+f*c,e[1]=d*n+p*a+f*u,e[2]=d*o+p*l+f*h,e[3]=m*r+_*s+g*c,e[4]=m*n+_*a+g*u,e[5]=m*o+_*l+g*h,e[6]=y*r+x*s+v*c,e[7]=y*n+x*a+v*u,e[8]=y*o+x*l+v*h,e}function a(e,t){var i=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=i,e[2]=0,e[3]=-i,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function l(){var e=new t(16);return t!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function c(e){var i=new t(16);return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],i}function u(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function h(e,t){if(e===t){var i=t[1],r=t[2],n=t[3],o=t[6],s=t[7],a=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=i,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=o,e[11]=t[14],e[12]=n,e[13]=s,e[14]=a}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function d(e,t){var i=t[0],r=t[1],n=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=t[9],d=t[10],p=t[11],f=t[12],m=t[13],_=t[14],g=t[15],y=i*a-r*s,x=i*l-n*s,v=i*c-o*s,b=r*l-n*a,w=r*c-o*a,T=n*c-o*l,E=u*m-h*f,S=u*_-d*f,A=u*g-p*f,I=h*_-d*m,C=h*g-p*m,M=d*g-p*_,D=y*M-x*C+v*I+b*A-w*S+T*E;return D?(e[0]=(a*M-l*C+c*I)*(D=1/D),e[1]=(n*C-r*M-o*I)*D,e[2]=(m*T-_*w+g*b)*D,e[3]=(d*w-h*T-p*b)*D,e[4]=(l*A-s*M-c*S)*D,e[5]=(i*M-n*A+o*S)*D,e[6]=(_*v-f*T-g*x)*D,e[7]=(u*T-d*v+p*x)*D,e[8]=(s*C-a*A+c*E)*D,e[9]=(r*A-i*C-o*E)*D,e[10]=(f*w-m*v+g*y)*D,e[11]=(h*v-u*w-p*y)*D,e[12]=(a*S-s*I-l*E)*D,e[13]=(i*I-r*S+n*E)*D,e[14]=(m*x-f*b-_*y)*D,e[15]=(u*b-h*x+d*y)*D,e):null}function p(e,t,i){var r=t[0],n=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],p=t[10],f=t[11],m=t[12],_=t[13],g=t[14],y=t[15],x=i[0],v=i[1],b=i[2],w=i[3];return e[0]=x*r+v*a+b*h+w*m,e[1]=x*n+v*l+b*d+w*_,e[2]=x*o+v*c+b*p+w*g,e[3]=x*s+v*u+b*f+w*y,e[4]=(x=i[4])*r+(v=i[5])*a+(b=i[6])*h+(w=i[7])*m,e[5]=x*n+v*l+b*d+w*_,e[6]=x*o+v*c+b*p+w*g,e[7]=x*s+v*u+b*f+w*y,e[8]=(x=i[8])*r+(v=i[9])*a+(b=i[10])*h+(w=i[11])*m,e[9]=x*n+v*l+b*d+w*_,e[10]=x*o+v*c+b*p+w*g,e[11]=x*s+v*u+b*f+w*y,e[12]=(x=i[12])*r+(v=i[13])*a+(b=i[14])*h+(w=i[15])*m,e[13]=x*n+v*l+b*d+w*_,e[14]=x*o+v*c+b*p+w*g,e[15]=x*s+v*u+b*f+w*y,e}function f(e,t,i){var r,n,o,s,a,l,c,u,h,d,p,f,m=i[0],_=i[1],g=i[2];return t===e?(e[12]=t[0]*m+t[4]*_+t[8]*g+t[12],e[13]=t[1]*m+t[5]*_+t[9]*g+t[13],e[14]=t[2]*m+t[6]*_+t[10]*g+t[14],e[15]=t[3]*m+t[7]*_+t[11]*g+t[15]):(n=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],p=t[10],f=t[11],e[0]=r=t[0],e[1]=n,e[2]=o,e[3]=s,e[4]=a,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=d,e[10]=p,e[11]=f,e[12]=r*m+a*_+h*g+t[12],e[13]=n*m+l*_+d*g+t[13],e[14]=o*m+c*_+p*g+t[14],e[15]=s*m+u*_+f*g+t[15]),e}function m(e,t,i){var r=i[0],n=i[1],o=i[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function _(e,t,i){var r=Math.sin(i),n=Math.cos(i),o=t[4],s=t[5],a=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11];return t!==
/**
* martinez v0.7.4
* Martinez polygon clipping algorithm, does boolean operation on polygons (multipolygons, polygons with holes etc): intersection, union, difference, xor
*
* @author Alex Milevski <info@w8r.name>
* @license MIT
* @preserve
*/function Bu(e,t,i,r){const n=[],o=0===r?(e,t,i,r,n,o)=>{e.push(new Le(o,i+(o-t)/(r-t)*(n-i)))}:(e,t,i,r,n,o)=>{e.push(new Le(t+(o-i)/(n-i)*(r-t),o))};for(const s of e){const e=[];for(const n of s){if(n.length<=2)continue;const s=[];for(let e=0;e<n.length-1;e++){const a=n[e].x,l=n[e].y,c=n[e+1].x,u=n[e+1].y,h=0===r?a:l,d=0===r?c:u;h<t?d>t&&o(s,a,l,c,u,t):h>i?d<i&&o(s,a,l,c,u,i):s.push(n[e]),d<t&&h>=t&&o(s,a,l,c,u,t),d>i&&h<=i&&o(s,a,l,c,u,i)}let a=n[n.length-1];const l=0===r?a.x:a.y;l>=t&&l<=i&&s.push(a),s.length&&(a=s[s.length-1],s[0].x===a.x&&s[0].y===a.y||s.push(s[0]),e.push(s))}e.length&&n.push(e)}return n}function ku(e,t){const i=Vu(e),r=Vu([t]),n=Ou.intersection(i,r);return null==n?[]:Nu(n)}function Uu(e,t){const i=65536;let r=Vu(e,i);const n=[];for(;t.valid();t.next()){const[e,r]=t.get(),o=e.x*i,s=e.y*i,a=r.x*i,l=r.y*i,c=a-o,u=l-s,h=Math.hypot(c,u);if(0===h)continue;const d=Math.trunc(u/h*3),p=-Math.trunc(c/h*3);n.push([[[o,s],[a,l],[a+d,l+p],[o+d,s+p],[o,s]]])}return n.length>0&&(r=Ou.diff(r,n)),Nu(r,1/i)}function Vu(e,t=1){return[e.map((e=>e.map((e=>[e.x*t,e.y*t]))))]}function Nu(e,t=1){return e.map((e=>e.map(((e,i)=>{const r=e.map((e=>new Le(e[0]*t,e[1]*t).round()));return i>0&&r.reverse(),r}))))}class FillBufferData{constructor(e,t){this.layoutVertexArray=new StructArrayLayout2i4,this.indexArray=new StructArrayLayout3ui6,this.lineIndexArray=new StructArrayLayout2ui4,this.triangleSegments=new SegmentVector,this.lineSegments=new SegmentVector,this.programConfigurations=new ProgramConfigurationSet(e.layers,{zoom:e.zoom,lut:e.lut}),this.uploaded=!1,t&&(this.elevatedLayoutVertexArray=new StructArrayLayout1f4)}update(e,t,i,r,n,o,s,a){this.programConfigurations.updatePaintArrays(e,t,n,i,r,o,s,a)}isEmpty(){return 0===this.layoutVertexArray.length}needsUpload(){return this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Qc.members),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.lineIndexBuffer=e.createIndexBuffer(this.lineIndexArray),this.elevatedLayoutVertexArray&&this.elevatedLayoutVertexArray.length>0&&(this.elevatedLayoutVertexBuffer=e.createVertexBuffer(this.elevatedLayoutVertexArray,eu.members))),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.elevatedLayoutVertexBuffer&&this.elevatedLayoutVertexBuffer.destroy(),this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.lineIndexBuffer.destroy(),this.programConfigurations.destroy(),this.triangleSegments.destroy(),this.lineSegments.destroy())}populatePaintArrays(e,t,i,r,n,o,s){this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,t,i,r,n,o,void 0,s)}}class FillBucket{constructor(e){this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((e=>e.fqid)),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.lut=e.lut,this.bufferData=new FillBufferData(e,!1),this.elevationBufferData=new FillBufferData(e,!0),this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id)),this.projection=e.projection,this.elevationMode=this.layers[0].layout.get("fill-elevation-reference"),this.sourceLayerIndex=e.sourceLayerIndex,this.worldview=e.worldview,this.hasAppearances=null}updateFootprints(e,t){}updateAppearances(e,t,i,r){}populate(e,t,i,r){this.hasPattern=Lu("fill",this.layers,this.pixelRatio,t);const n=this.layers[0].layout.get("fill-sort-key"),o=[];for(const{feature:s,id:a,index:l,sourceLayerIndex:c}of e){const e=this.layers[0]._featureFilter.needGeometry,u=yl(s,e);if(!this.layers[0]._featureFilter.filter(new EvaluationParameters(this.zoom,{worldview:this.worldview,activeFloors:t.activeFloors}),u,i))continue;const h=n?n.evaluate(u,{},i,t.availableImages):void 0,d={id:a,properties:s.properties,type:s.type,sourceLayerIndex:c,index:l,geometry:e?u.geometry:gl(s,i,r),patterns:{},sortKey:h};o.push(d)}n&&o.sort(((e,t)=>e.sortKey-t.sortKey));for(const r of o){const{geometry:n,index:o,sourceLayerIndex:s}=r;if
//# sourceMappingURL=mapbox-gl-csp.js.map