PageSourceSearch

https://www.bouyguestelecom.fr/statics/landingpages/_next/static/chunks/1353.85db6bab938453d5.js

js bouyguestelecom.fr collected 2026-10-01 09:10:05 UTC 59,762 bytes, 116 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1353],{21406:(e,t,s)=>{s.d(t,{j:()=>b});var i=s(55114),r=s(74552),a=s(64988),n=s(32307),l=s(92994),o=s(98776),h=s(36609),u=s(1279),f=s(87960),_=s(56429);let d=()=>a.A.getLogger("esri.views.2d.engine.webgl.AttributeStoreView");class c{constructor(e,t,s){this._texture=null,this._lastTexture=null,this._fbos={},this.texelSize=4;let{buffer:i,pixelType:r,textureOnly:a}=e,n=(0,o.Qz)(r);this.blockIndex=s,this.pixelType=r,this.size=t,this.textureOnly=a,a||(this.data=new n(i)),this._resetRange()}destroy(){for(let e in this._texture?.dispose(),this._fbos){let t=this._fbos[e];t&&("0"===e&&t.detachColorTexture(),t.dispose()),this._fbos[e]=null}this._texture=null}get _textureDesc(){let e=new _.R;return e.wrapMode=h.pF.CLAMP_TO_EDGE,e.samplingMode=h.Cj.NEAREST,e.dataType=this.pixelType,e.width=this.size,e.height=this.size,e}setData(e,t,s){let i=(0,l.Q4)(e),r=this.data,a=i*this.texelSize+t;!r||a>=r.length||(r[a]=s,this.dirtyStart=Math.min(this.dirtyStart,i),this.dirtyEnd=Math.max(this.dirtyEnd,i))}getData(e,t){if(null==this.data)return null;let s=(0,l.Q4)(e)*this.texelSize+t;return!this.data||s>=this.data.length?null:this.data[s]}getTexture(e){return this._texture??this._initTexture(e)}getFBO(e,t=0){if(!this._fbos[t]){let s=0===t?this.getTexture(e):this._textureDesc;this._fbos[t]=new u.H(e,s)}return this._fbos[t]}get hasDirty(){let e=this.dirtyStart;return this.dirtyEnd>=e}updateTexture(e,t){try{let s=this.dirtyStart,a=this.dirtyEnd;if(!this.hasDirty)return;(0,r.A)("esri-2d-update-debug")&&console.debug(`Version[${t}] AttributeStoreView.updateTexture`,{start:s,end:a,firstBytes:new Uint8Array(this.data.buffer.slice(0,16)),block:this}),this._resetRange();let n=this.data.buffer,l=this.getTexture(e),h=(s-s%this.size)/this.size,u=(a-a%this.size)/this.size,f=this.size,_=h*this.size*4,c=(f+u*this.size)*4-_,g=(0,o.Qz)(this.pixelType),p=new g(n,_*g.BYTES_PER_ELEMENT,c),b=this.size,E=u-h+1;if(E>this.size)return void d().error(new i.A("mapview-webgl","Out-of-bounds index when updating AttributeData"));l.updateData(0,0,h,b,E,p)}catch(e){}}update(e){let{data:t,start:s,end:i}=e;if(null!=t&&null!=this.data){let i=this.data,r=s*this.texelSize;for(let s=0;s<t.length;s++){let a=1<<s%this.texelSize;e.layout&a&&(i[r+s]=t[s])}}this.dirtyStart=Math.min(this.dirtyStart,s),this.dirtyEnd=Math.max(this.dirtyEnd,i)}resize(e,t){let s=this.size;if(this.size=t,this.textureOnly)return void(s!==this.size&&(this._lastTexture=this._texture,this._texture=null));let i=(0,o.Qz)(this.pixelType);this.destroy(),this.data=new i(e.buffer)}_resetRange(){this.dirtyStart=0x7fffffff,this.dirtyEnd=0}_initTexture(e){let t=new f.g(e,this._textureDesc,this.data??void 0);if(null!=this._lastTexture&&this._fbos[0]){let s=this._lastTexture.descriptor.width,i=this._lastTexture.descriptor.height,r=this._lastTexture.descriptor.dataType,a=this._lastTexture.descriptor.pixelFormat,n=this.getFBO(e),l=(0,o.AV)(r),h=new((0,o.Qz)(r))(new ArrayBuffer(s*i*l*this.texelSize)),u=e.getBoundFramebufferObject(),{x:f,y:_,width:d,height:c}=e.getViewport();e.bindFramebuffer(n),n.readPixels(0,0,s,i,a,r,h),t.updateData(0,0,0,2*s,i/2,h),e.setViewport(f,_,d,c),e.bindFramebuffer(u)}return this.destroy(),this._texture=t,this._texture}}class g{constructor(){this.size=0,this._pendingAttributeUpdates=[],this._version=0,this._epoch=0,this._locked=!1}_initialize(e){if(!e)throw Error("InternalError: initArgs must be defined");let t=e.blockDescriptors;if(this.size=e.blockSize,(0,r.A)("esri-2d-update-debug")&&console.debug("AttributeStoreView.initialize",{message:e}),null==this._data)this._data=t.map((e,t)=>null!=e?new c(e,this.size,t):null);else for(let e=0;e<this._data.length;e++){let s=this._data[e],i=t[e];null!=i&&(null==s?this._data[e]=new c(i,this.size,e):s.resize(i,this.size))}}destroy(){for(let e of this._data??[])e?.destroy();this._defaultTexture?.dispose(),this._defaultTexture=null,this._pendingAttributeUpdates=[]}isEmpty(){return null==this._data}getBlock(e){return null==this._data?null:this._data[e]}setLabelMinZoom(e,t){this.setData(e,n.dV.FilterFlags,1,t)}setLocalTimeOrigin(e,t){this.setData(e,n.dV.LocalTimeOrigin,0,t)}getLabelMinZoom(e){return this.getData(e,n.dV.FilterFlags,1,255)}getFilterFlags(e){return this.getData(e,n.dV.FilterFlags,0,0)}getVisualVariableData(e,t){return this.getData(e,n.dV.VV,t,0)}getData(e,t,s,i){if(!this._data)return 0;let r=this._data[t];if(null==r)return 0;let a=r.getData(e,s);return null!=a?a:i}setData(e,t,s,i){this._data[t].setData(e,s,i)}lockTextureUploads(){this._locked=!0}unlockTextureUploads(){this._locked=!1,this.update()}requestUpdate(e){this._version=e.version,this._pendingAttributeUpdates.push(e),(0,r.A)("esri-2d-update-debug")&&console.debug(`Version[${this._version}] AttributeStoreView.requestUpdate`,{message:e})}get currentEpoch(){return this._epoch}update(){if(this._locked)return;
1let e=this._pendingAttributeUpdates;for(let t of(this._pendingAttributeUpdates=[],e)){let{blockData:e,initArgs:s,sendUpdateEpoch:i,version:a}=t;(0,r.A)("esri-2d-update-debug")&&console.debug(`Version[${this._version}] Epoch[${i}] AttributeStoreView.applyUpdate`),this._version=a,this._epoch=i,null!=s&&this._initialize(s);let n=this._data;for(let t=0;t<e.length;t++){let s=e[t],i=n[t];null!=i&&null!=s&&((0,r.A)("esri-2d-update-debug")&&console.debug(`Version[${this._version}] CpuBlock[${t}] AttributeStoreView.update`,{block:s}),i.update(s))}}}getUniforms(e){return{filterFlags:{texture:this._getTexture(e,n.dV.FilterFlags),unit:n.uM},animation:{texture:this._getTexture(e,n.dV.Animation),unit:n.z2},gpgpu:{texture:this._getTexture(e,n.dV.GPGPU),unit:n.Sr},localTimeOrigin:{texture:this._getTexture(e,n.dV.LocalTimeOrigin),unit:n.zt},visualVariableData:{texture:this._getTexture(e,n.dV.VV),unit:n.nM},dataDriven0:{texture:this._getTexture(e,n.dV.DD0),unit:n.lL},dataDriven1:{texture:this._getTexture(e,n.dV.DD1),unit:n.sn},dataDriven2:{texture:this._getTexture(e,n.dV.DD2),unit:n.n9},size:this.size}}_getTexture(e,t){let s=this._data?.[t];return s?(s.updateTexture(e,this._version),s.getTexture(e)):this._getDefaultTexture(e)}_getDefaultTexture(e){if(null==this._defaultTexture){let t=new _.R;t.wrapMode=h.pF.CLAMP_TO_EDGE,t.samplingMode=h.Cj.NEAREST,t.width=1,t.height=1,this._defaultTexture=new f.g(e,t,new Uint8Array(4))}return this._defaultTexture}}var p=s(74150);class b extends p.A{constructor(e){super(e),this._statisticsByLevel=new Map,this._entityIndex=new Map,this.attributeView=new g}destroy(){this.children.forEach(e=>e.destroy()),this.removeAllChildren(),this.attributeView.destroy()}doRender(e){e.context.capabilities.enable("textureFloatLinear"),super.doRender(e)}get hasAnimations(){for(let e of this.children)if(e.hasAnimations)return!0;return!1}_reindexAndUpdateFeaturesIfNeeded(){if(this.hasAnimations&&(this._reindexFeatures(),0!==this.attributeView.size))for(let e of this._entityIndex.values())e.dirty&&(this.attributeView.setData(e.displayId,n.dV.LocalTimeOrigin,0,e.firstIndexed),e.dirty=!1)}restartAnimation(e){let t=this._entityIndex.get(e);t&&(t.firstIndexed=performance.now()/1e3,t.dirty=!0)}restartAllAnimations(){let e=performance.now()/1e3;for(let[t,s]of this._entityIndex)s.firstIndexed=e,s.dirty=!0}_reindexFeatures(){let e=performance.now()/1e3;for(let t of this.children)for(let s of t.entityIds){let{objectId:t}=s,i=this._entityIndex.get(t);i||(i={objectId:t,displayId:0,firstIndexed:e,lastIndexed:0,dirty:!0},this._entityIndex.set(t,i)),i.lastIndexed=e,i.displayId=s.displayId}for(let[t,s]of this._entityIndex)e-s.lastIndexed>60&&this._entityIndex.delete(t)}_updateAttributeView(){this.attributeView.update(),this._reindexAndUpdateFeaturesIfNeeded()}createRenderParams(e){let t=super.createRenderParams(e);return t.attributeView=this.attributeView,t.instanceStore=this._instanceStore,t.statisticsByLevel=this._statisticsByLevel,t}}},36271:(e,t,s)=>{function i(e){return e}function r(e){return e}s.d(t,{P:()=>i,U:()=>r})},37182:(e,t,s)=>{s.d(t,{A:()=>n});var i=s(73307),r=s(84749),a=s(16128);class n extends r.f{renderChildren(e){for(let t of this.children)t.setTransform(e.state);if(super.renderChildren(e),this._updateAttributeView(),this.children.some(e=>e.hasData)){switch(e.drawPhase){case i.S5.MAP:this._renderChildren(e,i.RI.All);break;case i.S5.HIGHLIGHT:this.hasHighlight&&this._renderHighlight(e)}this._boundsRenderer&&this._boundsRenderer.doRender(e)}}_renderHighlight(e){(0,a.lB)(e,!1,e=>{this._renderChildren(e,i.RI.Highlight)})}}},48932:(e,t,s)=>{s.d(t,{I:()=>i});function i(e){let t="";for(let s in e){let i=e[s];if("boolean"==typeof i)i&&(t+=`#define ${s}
2`);else if("number"==typeof i)t+=`#define ${s} ${i.toFixed()}
3`;else if("object"==typeof i)if(function(e){let{options:t,value:s}=e;return"number"==typeof t[s]}(i)){let{value:e,options:r,namespace:a}=i,n=a?`${a}_`:"";for(let e in r)t+=`#define ${n}${e} ${r[e].toFixed()}
4`;t+=`#define ${s} ${n}${e}
5`}else{let e=i.options,r=0;for(let s in e)t+=`#define ${e[s]} ${(r++).toFixed()}
6`;t+=`#define ${s} ${e[i.value]}
7`}}return t}},51230:(e,t,s)=>{s.d(t,{c:()=>r});var i=s(36271);
7class r{constructor(e,t,s){this._instanceId=e,this.techniqueRef=t,this._input=s}get instanceId(){return(0,i.P)(this._instanceId)}createMeshInfo(e){return{id:(0,i.P)(this._instanceId),techniqueType:this.techniqueRef.type,inputParams:e,optionalAttributes:this._input.optionalAttributes}}getInput(){return this._input}setInput(e){this._input=e}}},54992:(e,t,s)=>{s.d(t,{p:()=>l});var i=s(12395),r=s(48932);let a=e=>{let t="";t+=e[0].toUpperCase();for(let s=1;s<e.length;s++){let i=e[s];i===i.toUpperCase()?(t+="_",t+=i):t+=i.toUpperCase()}return t},n=e=>{let t={};for(let s in e)t[a(s)]=e[s];return(0,r.I)(t)},l=(e,t,s,r)=>{let a=e+e.slice(Math.max(0,e.lastIndexOf("/"))),l=t+t.slice(Math.max(0,t.lastIndexOf("/"))),o=n(r);return{attributes:s,shaders:{vertexShader:o+(0,i.Q)(`${a}.vert`),fragmentShader:o+(0,i.Q)(`${l}.frag`)}}}},55035:(e,t,s)=>{s.d(t,{J:()=>a}),s(74552);var i=s(96631),r=s(43030);class a{constructor(e){this._rctx=e,this._store=new i.O}dispose(){this._store.forAll(e=>e.dispose()),this._store.clear()}acquire(e,t,s,i){let a=this._store.get(e,t);if(null!=a)return a.ref(),a;let n=new r.B(this._rctx,e,t,s,i);return n.ref(),this._store.set(e,t,n),n}get test(){}}},74150:(e,t,s)=>{s.d(t,{A:()=>h});var i=s(74552),r=s(73307),a=s(31462),n=s(42120),l=s(4147);let o=(e,t)=>e.key.level-t.key.level!=0?e.key.level-t.key.level:e.key.row-t.key.row!=0?e.key.row-t.key.row:e.key.col-t.key.col;class h extends a.A{constructor(e){super(),this.tileInfoView=e,this.sortFunction=o}renderChildren(e){this.setStencilReference(e),super.renderChildren(e)}createRenderParams(e){let{state:t}=e,s=super.createRenderParams(e);return s.requiredLevel=this.tileInfoView.getClosestInfoForScale(t.scale).level,s.displayLevel=this.tileInfoView.tileInfo.scaleToZoom(t.scale),s}prepareRenderPasses(e){let t=super.prepareRenderPasses(e);return t.push(e.registerRenderPass({name:"stencil",brushes:[n.A],drawPhase:r.S5.DEBUG|r.S5.MAP|r.S5.HIGHLIGHT|r.S5.LABEL,target:()=>this.getStencilTarget()})),(0,i.A)("esri-tiles-debug")&&t.push(e.registerRenderPass({name:"tileInfo",brushes:[l.A],drawPhase:r.S5.DEBUG,target:()=>this.children})),t}getStencilTarget(){return this.children}setStencilReference(e){let t=1;for(let e of this.children)e.stencilRef=t++}}},80773:(e,t,s)=>{function i(e,t,s){for(let i=0;i<s;++i)t[2*i]=e[i],t[2*i+1]=e[i]-t[2*i]}function r(e,t){let s=e.length;for(let i=0;i<s;++i)n[0]=e[i],t[i]=n[0];return t}function a(e,t){let s=e.length;for(let i=0;i<s;++i)n[0]=e[i],n[1]=e[i]-n[0],t[i]=n[1];return t}s.d(t,{Zo:()=>r,jA:()=>a,jS:()=>i});let n=new Float32Array(2)},83231:(e,t,s)=>{s.d(t,{e:()=>k});var i=s(74552),r=s(88284),a=s(85314),n=s(97489),l=s(37338),o=s(36609);class h{constructor(){this.blend=!1,this.blendColor={r:0,g:0,b:0,a:0},this.blendFunction={srcRGB:o.dn.ONE,dstRGB:o.dn.ZERO,srcAlpha:o.dn.ONE,dstAlpha:o.dn.ZERO},this.blendEquation={mode:o.Tb.ADD,modeAlpha:o.Tb.ADD},this.colorMask={r:!0,g:!0,b:!0,a:!0},this.faceCulling=!1,this.cullFace=o.Y7.BACK,this.frontFace=o.Ac.CCW,this.scissorTest=!1,this.scissorRect={x:0,y:0,width:0,height:0},this.depthTest=!1,this.depthFunction=o.MT.LESS,this.clearDepth=1,this.depthWrite=!0,this.depthRange={zNear:0,zFar:1},this.viewport=null,this.stencilTest=!1,this.polygonOffsetFill=!1,this.polygonOffset=[0,0],this.stencilFunction={face:o.Y7.FRONT_AND_BACK,func:o.MT.ALWAYS,ref:0,mask:1},this.clearStencil=0,this.stencilWriteMask=1,this.stencilOperation={face:o.Y7.FRONT_AND_BACK,fail:o.eA.KEEP,zFail:o.eA.KEEP,zPass:o.eA.KEEP},this.clearColor={r:0,g:0,b:0,a:0},this.program=null,this.vertexBuffer=null,this.indexBuffer=null,this.uniformBuffer=null,this.pixelPackBuffer=null,this.pixelUnpackBuffer=null,this.copyReadBuffer=null,this.copyWriteBuffer=null,this.transformFeedbackBuffer=null,this.uniformBufferBindingPoints=[],this.transformBufferBindingPoints=[],this.readFramebuffer=null,this.drawFramebuffer=null,this.drawBuffers={defaultFramebuffer:[o.Hr.BACK],fbos:new WeakMap},this.renderbuffer=null,this.activeTexture=0,this.textureUnitMap=[],this.vertexArrayObject=null}}class u{constructor(e){this._objectType=e,this._active=new Map}get _stack(){let e=Error().stack.split("\n");return e.shift(),e.shift(),e.shift(),e.join("\n")}add(e){this._active.set(e,new f(this._stack))}remove(e){this._active.delete(e)}addReference(e){let t=this._active.get(e);t&&t.retains.push(this._stack)}removeReference(e){let t=this._active.get(e);t&&t.releases.push(this._stack)}resetLog(){let e=new Map,t="";this._active.forEach((s,{usedMemory:i})=>{e.has(s.from)||(e.set(s.from,new Map),s.retains.length>0&&(t+=`  First reference count mismatch:
8  Retain:
9    ${s.retains.join("\n\n    ")}
10
11  Release:    ${s.releases.join("\n\n    ")}
12`));let r=e.get(s.from);r.set(i??0,r.get(i??0)??1)}),this._active.clear();let s=0,i=[];return e.forEach((e,t)=>{let r=0;e.forEach((e,t)=>r+=e*t),e.set(-1,r),s+=r,i.push([t,e])}),e.clear(),i.sort((e,t)=>
12t[1].get(-1)-e[1].get(-1)),i.reduce((e,[t,s])=>{let i=Math.round(s.get(-1)/1024);return s.delete(-1),e+`  ${i}KB from ${Array.from(s.values()).reduce((e,t)=>e+t,0)} allocations at ${t}
13`},`Total ${this._objectType} memory: ${Math.round(s/1024)}KB
14${t}`)}}class f{constructor(e){this.from=e,this.retains=[],this.releases=[]}}let _={RECORD_ALLOCATIONS:!1};class d{constructor(){for(this._current=[],this._allocations=_.RECORD_ALLOCATIONS?new u("WebGLObject"):null;this._current.length<o.vt.COUNT;)this._current.push(0)}increment(e,t,s=1){this._current[e]+=s,this._allocations?.add(t)}decrement(e,t,s=1){this._current[e]-=s,this._allocations?.remove(t)}get current(){return this._current}get total(){return this.current.reduce((e,t,s)=>e+(s<o.vt.UNCOUNTED?t:0),0)}get resourceInformation(){let e="";if(this.total>0){e+="Live objects:\n";for(let t=0;t<o.vt.COUNT;++t){let s=this._current[t];s>0&&(e+=`${o.vt[t]}: ${s}
15`)}}return e+this._allocations?.resetLog()}}class c{constructor(e,t,s){let i=t.textureFilterAnisotropic,r=s.maxAnisotropy??1/0;this.versionString=e.getParameter(e.VERSION),this.maxVertexTextureImageUnits=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),this.maxVertexAttributes=e.getParameter(e.MAX_VERTEX_ATTRIBS),this.maxMaxAnisotropy=i?Math.min(e.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY),r):1,this.maxTextureImageUnits=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),this.maxRenderbufferSize=e.getParameter(e.MAX_RENDERBUFFER_SIZE),this.maxViewportDims=e.getParameter(e.MAX_VIEWPORT_DIMS),this.maxUniformBufferBindings=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS),this.maxVertexUniformBlocks=e.getParameter(e.MAX_VERTEX_UNIFORM_BLOCKS),this.maxFragmentUniformBlocks=e.getParameter(e.MAX_FRAGMENT_UNIFORM_BLOCKS),this.maxUniformBlockSize=e.getParameter(e.MAX_UNIFORM_BLOCK_SIZE),this.uniformBufferOffsetAlignment=e.getParameter(e.UNIFORM_BUFFER_OFFSET_ALIGNMENT),this.maxArrayTextureLayers=e.getParameter(e.MAX_ARRAY_TEXTURE_LAYERS),this.maxSamples=e.getParameter(e.MAX_SAMPLES),this.maxDrawBuffers=e.getParameter(e.MAX_DRAW_BUFFERS)}}var g=s(55035),p=s(8950),b=s(87960),E=s(51997),R=s(15815),m=s(41676);class F{constructor(e){this._rctx=e,this._indexBuffer=this._createIndexbuffer(),this._program=this._createHelperProgram()}static getShaderSources(){return{vertex:"#version 300 es\n    precision highp float;\n\n    void main(void) {\n      gl_Position = vec4(0.0, 0.0, float(gl_VertexID)-2.0, 1.0);\n    }",fragment:"#version 300 es\n    precision highp float;\n\n    out vec4 fragColor;\n\n    void main(void) {\n      fragColor = vec4(0.0, 0.0, 0.0, 1.0);\n    }"}}_createHelperProgram(){let e=F.getShaderSources();return this._rctx.programCache.acquire(e.vertex,e.fragment,new Map([]))}_createIndexbuffer(){return m.g.createIndex(this._rctx,o._U.STATIC_DRAW,new Uint32Array([0]))}run(){this._program.compiled&&this._indexBuffer&&(this._rctx.bindVAO(null),this._rctx.useProgram(this._program),this._rctx.bindBuffer(this._indexBuffer,o.NZ.ELEMENT_ARRAY_BUFFER),this._rctx.drawElements(o.WR.POINTS,1,o.pe.UNSIGNED_INT,0))}dispose(){this._program.dispose(),this._indexBuffer.dispose()}get test(){}}var T=s(1279),A=s(56429),B=s(81808);class x extends B._{constructor(e){super(),this._rctx=e,this._helperProgram=null,(0,i.A)("mac")&&(0,i.A)("chrome")&&(this._program=this._prepareProgram(),this._helperProgram=this._prepareHelperProgram())}dispose(){super.dispose(),this._helperProgram?.dispose(),this._helperProgram=null}_test(e){let t=this._rctx,s=t.getBoundFramebufferObject(),{x:i,y:r,width:a,height:n}=t.getViewport();t.resetState();let l=new A.R(1);l.wrapMode=o.pF.CLAMP_TO_EDGE,l.samplingMode=o.Cj.NEAREST;let h=new T.H(t,l),u=m.g.createIndex(this._rctx,o._U.STATIC_DRAW,new Uint8Array([0]));t.bindFramebuffer(h),t.setViewport(0,0,1,1),t.useProgram(this._helperProgram),t.bindBuffer(u,o.NZ.ELEMENT_ARRAY_BUFFER),t.drawElements(o.WR.POINTS,1,o.pe.UNSIGNED_BYTE,0),t.useProgram(e),t.bindVAO(null),t.drawArrays(o.WR.TRIANGLES,0,258);let f=new Uint8Array(4);return h.readPixels(0,0,1,1,o.Ab.RGBA,o.ld.UNSIGNED_BYTE,f),t.setViewport(i,r,a,n),t.bindFramebuffer(s),h.dispose(),u.dispose(),255===f[0]}_prepareProgram(){let e=`#version 300 es
16    precision highp float;
17
18    out float triangleId;
19
20    const vec3 triangleVertices[3] = vec3[3](vec3(-0.5, -0.5, 0.0), vec3(0.5, -0.5, 0.0), vec3(0.0, 0.5, 0.0
20));
21
22    void main(void) {
23      triangleId = floor(float(gl_VertexID)/3.0);
24
25      vec3 position = triangleVertices[gl_VertexID % 3];
26      float offset = triangleId / ${R.H.float(85)};
27      position.z = 0.5 - offset;
28
29      gl_Position = vec4(position, 1.0);
30    }
31    `,t=`#version 300 es
32    precision highp float;
33
34    in float triangleId;
35
36    out vec4 fragColor;
37
38    void main(void) {
39      fragColor = triangleId == ${R.H.float(85)} ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
40    }
41    `;return this._rctx.programCache.acquire(e,t,new Map([]))}_prepareHelperProgram(){let e=F.getShaderSources();return this._rctx.programCache.acquire(e.vertex,e.fragment,new Map([]))}}var S=s(20644),C=s(74832),O=s(80773),v=s(27707),w=s(6060);class N extends B._{constructor(e){super(),this._rctx=e,this._program=M(this._rctx,!1),this._obfuscated=M(this._rctx,!0)}dispose(){super.dispose(),this._obfuscated=(0,r.WD)(this._obfuscated)}_test(e){if((0,i.A)("force-double-precision-obfuscation"))return!0;if(null==this._obfuscated)return!1;let t=this._rctx,s=t.getBoundFramebufferObject(),{x:r,y:a,width:n,height:l}=t.getViewport(),o=this._runProgram(e),h=this._runProgram(this._obfuscated);return t.setViewport(r,a,n,l),t.bindFramebuffer(s),0!==o&&(0===h||o/h>5)}_runProgram(e){let t=this._rctx;t.resetState();let s=new A.R(1);s.wrapMode=o.pF.CLAMP_TO_EDGE,s.samplingMode=o.Cj.NEAREST;let i=new T.H(t,s),r=m.g.createVertex(t,o._U.STATIC_DRAW,new Uint16Array([0,0,1,0,0,1,1,1])),a=new v.Z(t,new Map([["position",0]]),new Map([["geometry",[new w._("position",2,o.pe.UNSIGNED_SHORT,0,4)]]]),new Map([["geometry",r]])),n=(0,C.fA)(5633261.287538229,2626832.878767164,1434988.0495278358),l=(0,C.fA)(5633271.46742708,2626873.6381334523,1434963.231608387),h=new Float32Array(6);(0,O.jS)(n,h,3);let u=new Float32Array(6);(0,O.jS)(l,u,3),t.useProgram(e),e.setUniform3f("u_highA",h[0],h[2],h[4]),e.setUniform3f("u_lowA",h[1],h[3],h[5]),e.setUniform3f("u_highB",u[0],u[2],u[4]),e.setUniform3f("u_lowB",u[1],u[3],u[5]),t.bindFramebuffer(i),t.setViewport(0,0,1,1),t.bindVAO(a),t.drawArrays(o.WR.TRIANGLE_STRIP,0,4);let f=new Uint8Array(4);return i.readPixels(0,0,1,1,o.Ab.RGBA,o.ld.UNSIGNED_BYTE,f),a.dispose(),i.dispose(),Math.abs((n[2]-l[2])/25-(0,S.T)(f))}}function M(e,t){let s=`
42
43  precision highp float;
44
45  attribute vec2 position;
46
47  uniform vec3 u_highA;
48  uniform vec3 u_lowA;
49  uniform vec3 u_highB;
50  uniform vec3 u_lowB;
51
52  varying vec4 v_color;
53
54  ${t?"#define DOUBLE_PRECISION_REQUIRES_OBFUSCATION":""}
55
56  #ifdef DOUBLE_PRECISION_REQUIRES_OBFUSCATION
57
58  vec3 dpPlusFrc(vec3 a, vec3 b) {
59    return mix(a, a + b, vec3(notEqual(b, vec3(0))));
60  }
61
62  vec3 dpMinusFrc(vec3 a, vec3 b) {
63    return mix(vec3(0), a - b, vec3(notEqual(a, b)));
64  }
65
66  vec3 dpAdd(vec3 hiA, vec3 loA, vec3 hiB, vec3 loB) {
67    vec3 t1 = dpPlusFrc(hiA, hiB);
68    vec3 e = dpMinusFrc(t1, hiA);
69    vec3 t2 = dpMinusFrc(hiB, e) + dpMinusFrc(hiA, dpMinusFrc(t1, e)) + loA + loB;
70    return t1 + t2;
71  }
72
73  #else
74
75  vec3 dpAdd(vec3 hiA, vec3 loA, vec3 hiB, vec3 loB) {
76    vec3 t1 = hiA + hiB;
77    vec3 e = t1 - hiA;
78    vec3 t2 = ((hiB - e) + (hiA - (t1 - e))) + loA + loB;
79    return t1 + t2;
80  }
81
82  #endif
83
84  const float MAX_RGBA_FLOAT =
85    255.0 / 256.0 +
86    255.0 / 256.0 / 256.0 +
87    255.0 / 256.0 / 256.0 / 256.0 +
88    255.0 / 256.0 / 256.0 / 256.0 / 256.0;
89
90  const vec4 FIXED_POINT_FACTORS = vec4(1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0);
91
92  vec4 float2rgba(const float value) {
93    // Make sure value is in the domain we can represent
94    float valueInValidDomain = clamp(value, 0.0, MAX_RGBA_FLOAT);
95
96    // Decompose value in 32bit fixed point parts represented as
97    // uint8 rgba components. Decomposition uses the fractional part after multiplying
98    // by a power of 256 (this removes the bits that are represented in the previous
99    // component) and then converts the fractional part to 8bits.
100    vec4 fixedPointU8 = floor(fract(valueInValidDomain * FIXED_POINT_FACTORS) * 256.0);
101
102    // Convert uint8 values (from 0 to 255) to floating point representation for
103    // the shader
104    const float toU8AsFloat = 1.0 / 255.0;
105
106    return fixedPointU8 * toU8AsFloat;
107  }
108
109  void main() {
110    vec3 val = dpAdd(u_highA, u_lowA, -u_highB, -u_lowB);
111
112    v_color = float2rgba(val.z / 25.0);
113
114    gl_Position = vec4(position * 2.0 - 1.0, 0.0, 1.0);
115  }
116  `;return e.programCache.acquire(s,"\n  precision highp float;\n\n  varying vec4 v_color;\n\n  void main() {\n    gl_FragColor = v_color;\n  }\n  ",new Map([["position",0]]))}class y extends B._{constructor(e){if(super(),this._rctx=e,!e.gl||!(e.capabilities.colorBufferFloat?.textureFloat&&e.capabilities.colorBufferFloat?.floatBlend))return;this._program=e.programCache.acquire("\n    precision highp float;\n    attribute vec2 a_pos;\n\n    void main() {\n      gl_Position = vec4(a_pos * 2.0 - 1.0, 0.0, 1.0);\n    }\n    ","\n     precision highp float;\n\n     void main() {\n      gl_FragColor = vec4(0.5, 0.5, 0.5, 0.5);\n     }\n    ",new Map([["a_pos",0]]))}_test(e){let t=this._rctx,s=new A.R(1);s.wrapMode=o.pF.CLAMP_TO_EDGE,s.dataType=o.ld.FLOAT,s.internalFormat=o.H0.RGBA32F,s.samplingMode=o.Cj.NEAREST;let i=new T.H(t,s),r=m.g.createVertex(t,o._U.STATIC_DRAW,new Uint16Array([0,0,1,0,0,1,1,1])),a=new v.Z(t,new Map([["a_pos",0]]),new Map([["geometry",[new w._("a_pos",2,o.pe.UNSIGNED_SHORT,0,4)]]]),new Map([["geometry",r]]));t.gl.getError(),t.useProgram(e);let n=t.getBoundFramebufferObject(),{x:l,y:h,width:u,height:f}=t.getViewport();t.bindFramebuffer(i),t.setViewport(0,0,1,1),t.bindVAO(a),t.drawArrays(o.WR.TRIANGLE_STRIP,0,4);let _=(0,p.Ey)({blending:p.gh});t.setPipelineState(_),t.drawArrays(o.WR.TRIANGLE_STRIP,0,4);let d=t.gl.getError();return t.setViewport(l,h,u,f),t.bindFramebuffer(n),a.dispose(),i.dispose(),d!==t.gl.INVALID_OPERATION||(console.warn("Device claims support for WebGL extension EXT_float_blend but does not support it. Using fall back."),!1)}}var P=s(59513);class D{constructor(e){this.rctx=e,this.floatBufferBlend=new y(e),this.svgPremultipliesAlpha=new P.H(e),this.doublePrecisionRequiresObfuscation=new N(e),this.drawArraysRequiresIndicesTypeReset=new x(e)}dispose(){this.doublePrecisionRequiresObfuscation.dispose(),this.svgPremultipliesAlpha.dispose(),this.floatBufferBlend.dispose(),this.drawArraysRequiresIndicesTypeReset.dispose()}}var U=s(95839);class I{constructor(e,t){this._gl=e,this._compressedTextureETC=null,this._compressedTextureS3TC=null,this._textureFilterAnisotropic=null,this._colorBufferFloat=null,this._loseContext=null,this._textureNorm16=null,this._textureFloatLinear=null,this._disabledExtensions=t.disabledExtensions||{},this._debugWebGLExtensions=t.debugWebGLExtensions||{}}get compressedTextureETC(){return this._compressedTextureETC??=function(e,t){if(t.compressedTextureETC)return null;let s=e.getExtension("WEBGL_compressed_texture_etc");
116return s?{COMPRESSED_R11_EAC:s.COMPRESSED_R11_EAC,COMPRESSED_SIGNED_R11_EAC:s.COMPRESSED_SIGNED_R11_EAC,COMPRESSED_RG11_EAC:s.COMPRESSED_RG11_EAC,COMPRESSED_SIGNED_RG11_EAC:s.COMPRESSED_SIGNED_RG11_EAC,COMPRESSED_RGB8_ETC2:s.COMPRESSED_RGB8_ETC2,COMPRESSED_SRGB8_ETC2:s.COMPRESSED_SRGB8_ETC2,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:s.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:s.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,COMPRESSED_RGBA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}:null}(this._gl,this._disabledExtensions),this._compressedTextureETC}get compressedTextureS3TC(){return this._compressedTextureS3TC??=function(e,t){if(t.compressedTextureS3TC)return null;let s=e.getExtension("WEBGL_compressed_texture_s3tc");return s?{COMPRESSED_RGB_S3TC_DXT1:s.COMPRESSED_RGB_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT1:s.COMPRESSED_RGBA_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT3:s.COMPRESSED_RGBA_S3TC_DXT3_EXT,COMPRESSED_RGBA_S3TC_DXT5:s.COMPRESSED_RGBA_S3TC_DXT5_EXT}:null}(this._gl,this._disabledExtensions),this._compressedTextureS3TC}get textureFilterAnisotropic(){return this._textureFilterAnisotropic??=function(e,t){if(t.textureFilterAnisotropic)return null;let s=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");return s?{MAX_TEXTURE_MAX_ANISOTROPY:s.MAX_TEXTURE_MAX_ANISOTROPY_EXT,TEXTURE_MAX_ANISOTROPY:s.TEXTURE_MAX_ANISOTROPY_EXT}:null}(this._gl,this._disabledExtensions),this._textureFilterAnisotropic}get disjointTimerQuery(){return this._disjointTimerQuery??=(0,U._R)(this._gl,this._disabledExtensions),this._disjointTimerQuery}get colorBufferFloat(){return this._colorBufferFloat??=function(e,t){let s=!t.colorBufferHalfFloat&&e.getExtension("EXT_color_buffer_half_float")||!t.colorBufferFloat&&e.getExtension("EXT_color_buffer_float"),i=!t.colorBufferFloat&&e.getExtension("EXT_color_buffer_float"),r=!t.floatBlend&&!t.colorBufferFloat&&e.getExtension("EXT_float_blend");return s||i||r?{textureFloat:!!i,textureHalfFloat:!!s,floatBlend:!!r,R16F:e.R16F,RG16F:e.RG16F,RGBA16F:e.RGBA16F,R32F:e.R32F,RG32F:e.RG32F,RGBA32F:e.RGBA32F,R11F_G11F_B10F:e.R11F_G11F_B10F,RGB16F:e.RGB16F}:null}(this._gl,this._disabledExtensions),this._colorBufferFloat}get loseContext(){return this._loseContext??=function(e,t){let s=t.loseContext&&e.getExtension("WEBGL_lose_context");return s?{loseRenderingContext:()=>s.loseContext()}:null}(this._gl,this._debugWebGLExtensions),this._loseContext}get textureNorm16(){return this._textureNorm16??=function(e,t){if(t.textureNorm16)return null;let s=e.getExtension("EXT_texture_norm16");return s?{R16:s.R16_EXT,RG16:s.RG16_EXT,RGB16:s.RGB16_EXT,RGBA16:s.RGBA16_EXT,R16_SNORM:s.R16_SNORM_EXT,RG16_SNORM:s.RG16_SNORM_EXT,RGB16_SNORM:s.RGB16_SNORM_EXT,RGBA16_SNORM:s.RGBA16_SNORM_EXT}:null}(this._gl,this._disabledExtensions),this._textureNorm16}get textureFloatLinear(){return this._textureFloatLinear??=function(e,t,s,i,r){if(i)return!0;if(t[s])return!1;for(let t of r)if(e.getExtension(t))return!0;return!1}(this._gl,this._disabledExtensions,"textureFloatLinear",!1,["OES_texture_float_linear"]),this._textureFloatLinear}enable(e){return this[e]}}let k=class{constructor(e,t){this.gl=e,this.instanceCounter=new d,this.programCache=new g.J(this),this._transformFeedbackRequestInfo=null,this._state=new h,this._numOfDrawCalls=0,this._numOfTriangles=0,this._loadExtensions(),this.configure(t)}configure(e){this._capabilities=new I(this.gl,e),this._parameters=new c(this.gl,this._capabilities,e),b.g.TEXTURE_UNIT_FOR_UPDATES=this._parameters.maxTextureImageUnits-1;let t=this.gl.getParameter(this.gl.VIEWPORT);this._state=new h,this._state.viewport={x:t[0],y:t[1],width:t[2],height:t[3]},this._stateTracker=new p.Ms({setBlending:e=>{if(e){this.setBlendingEnabled(!0),this.setBlendEquationSeparate(e.opRgb,e.opAlpha),this.setBlendFunctionSeparate(e.srcRgb,e.dstRgb,e.srcAlpha,e.dstAlpha);let t=e.color;this.setBlendColor(t.r,t.g,t.b,t.a)}else this.setBlendingEnabled(!1)},setCulling:e=>{e?(this.setFaceCullingEnabled(!0),this.setCullFace(e.face),this.setFrontFace(e.mode)):this.setFaceCullingEnabled(!1)},setPolygonOffset:e=>{e?(this.setPolygonOffsetFillEnabled(!0),this.setPolygonOffset(e.factor,e.units)):this.setPolygonOffsetFillEnabled(!1)},setDepthTest:e=>{e?(this.setDepthTestEnabled(!0),this.setDepthFunction(e.func)):this.setDepthTestEnabled(!1)},setStencilTest:e=>{if(e){this.setStencilTestEnabled(!0);let t=e.function;this.setStencilFunction(t.func,t.ref,t.mask);let s=e.operation;this.setStencilOp(s.fail,s.zFail,s.zPass)}else this.setStencilTestEnabled(!1)},setDepthWrite:e=>{e?(this.setDepthWriteEnabled(!0),this.setDepthRange(e.zNear,e.zFar)):this.setDepthWriteEnabled(!1)},setColorWrite:e=>{e?this.setColorMask(e.r,e.g,e.b,e.a):this.setColorMask(!1,!1,!1,!1)},setStencilWrite:e=>{e?this.setStencilWriteMask(e.mask):this.setStencilWriteMask(0)},setDrawBuffers:e=>{if(e)this.setDrawBuffers(e.buffers);else{let{drawFramebuffer:e}=this._state;null===e?this.setDrawBuffers([o.Hr.BACK]):0===e.colorAttachments.length?this.setDrawBuffers([o.Hr.NONE]):this.setDrawBuffers([o.Nm.COLOR_ATTACHMENT0])}}}),this.enforceState(),(0,r.WD)(this._driverTest),this._driverTest=new D(this)}dispose(){(0,r.WD)(this._driverTest),this.programCache.dispose(),this.bindVAO(null),this.unbindBuffer(o.NZ.ARRAY_BUFFER),this.unbindBuffer(o.NZ.ELEMENT_ARRAY_BUFFER),this.unbindBuffer(o.NZ.UNIFORM_BUFFER),this._state.uniformBufferBindingPoints.length=0,this.unbindBuffer(o.NZ.PIXEL_PACK_BUFFER),this.unbindBuffer(o.NZ.PIXEL_UNPACK_BUFFER),this.unbindBuffer(o.NZ.COPY_READ_BUFFER),this.unbindBuffer(o.NZ.COPY_WRITE_BUFFER),this._state.textureUnitMap.length=0,(0,l.en)()&&console.log(this.instanceCounter.resourceInformation)}get driverTest(){return this._driverTest}
vendor: 7,159 bytes, line 116
116get contextAttributes(){return this.gl.getContextAttributes()}get parameters(){return this._parameters}setPipelineState(e){this._stateTracker.setPipeline(e)}setBlendingEnabled(e){this._state.blend!==e&&(!0===e?this.gl.enable(this.gl.BLEND):this.gl.disable(this.gl.BLEND),this._state.blend=e,this._stateTracker.invalidateBlending())}externalProgramUpdate(){this._state.program?.stop(),this._state.program=null}externalTextureUnitUpdate(e,t){for(let t=0;t<e.length;++t)this._state.textureUnitMap[e[t]]=null;t>=0&&(this._state.activeTexture=t)}externalVertexArrayObjectUpdate(){this.gl.bindVertexArray(null),this._state.vertexArrayObject=null,this._state.vertexBuffer=null,this._state.indexBuffer=null}externalVertexBufferUpdate(){this._state.vertexBuffer=null}externalIndexBufferUpdate(){this._state.indexBuffer=null}setBlendColor(e,t,s,i){e===this._state.blendColor.r&&t===this._state.blendColor.g&&s===this._state.blendColor.b&&i===this._state.blendColor.a||(this.gl.blendColor(e,t,s,i),this._state.blendColor.r=e,this._state.blendColor.g=t,this._state.blendColor.b=s,this._state.blendColor.a=i,this._stateTracker.invalidateBlending())}setBlendFunction(e,t){e===this._state.blendFunction.srcRGB&&t===this._state.blendFunction.dstRGB||(this.gl.blendFunc(e,t),this._state.blendFunction.srcRGB=e,this._state.blendFunction.srcAlpha=e,this._state.blendFunction.dstRGB=t,this._state.blendFunction.dstAlpha=t,this._stateTracker.invalidateBlending())}setBlendFunctionSeparate(e,t,s,i){this._state.blendFunction.srcRGB===e&&this._state.blendFunction.srcAlpha===s&&this._state.blendFunction.dstRGB===t&&this._state.blendFunction.dstAlpha===i||(this.gl.blendFuncSeparate(e,t,s,i),this._state.blendFunction.srcRGB=e,this._state.blendFunction.srcAlpha=s,this._state.blendFunction.dstRGB=t,this._state.blendFunction.dstAlpha=i,this._stateTracker.invalidateBlending())}setBlendEquation(e){this._state.blendEquation.mode!==e&&(this.gl.blendEquation(e),this._state.blendEquation.mode=e,this._state.blendEquation.modeAlpha=e,this._stateTracker.invalidateBlending())}setBlendEquationSeparate(e,t){this._state.blendEquation.mode===e&&this._state.blendEquation.modeAlpha===t||(this.gl.blendEquationSeparate(e,t),this._state.blendEquation.mode=e,this._state.blendEquation.modeAlpha=t,this._stateTracker.invalidateBlending())}setColorMask(e,t,s,i){this._state.colorMask.r===e&&this._state.colorMask.g===t&&this._state.colorMask.b===s&&this._state.colorMask.a===i||(this.gl.colorMask(e,t,s,i),this._state.colorMask.r=e,this._state.colorMask.g=t,this._state.colorMask.b=s,this._state.colorMask.a=i,this._stateTracker.invalidateColorWrite())}setClearColor(e,t,s,i){this._state.clearColor.r===e&&this._state.clearColor.g===t&&this._state.clearColor.b===s&&this._state.clearColor.a===i||(this.gl.clearColor(e,t,s,i),this._state.clearColor.r=e,this._state.clearColor.g=t,this._state.clearColor.b=s,this._state.clearColor.a=i)}setFaceCullingEnabled(e){this._state.faceCulling!==e&&(!0===e?this.gl.enable(this.gl.CULL_FACE):this.gl.disable(this.gl.CULL_FACE),this._state.faceCulling=e,this._stateTracker.invalidateCulling())}setPolygonOffsetFillEnabled(e){this._state.polygonOffsetFill!==e&&(!0===e?this.gl.enable(this.gl.POLYGON_OFFSET_FILL):this.gl.disable(this.gl.POLYGON_OFFSET_FILL),this._state.polygonOffsetFill=e,this._stateTracker.invalidatePolygonOffset())}setPolygonOffset(e,t){this._state.polygonOffset[0]===e&&this._state.polygonOffset[1]===t||(this._state.polygonOffset[0]=e,this._state.polygonOffset[1]=t,this.gl.polygonOffset(e,t),this._stateTracker.invalidatePolygonOffset())}setCullFace(e){this._state.cullFace!==e&&(this.gl.cullFace(e),this._state.cullFace=e,this._stateTracker.invalidateCulling())}setFrontFace(e){this._state.frontFace!==e&&(this.gl.frontFace(e),this._state.frontFace=e,this._stateTracker.invalidateCulling())}setScissorTestEnabled(e){this._state.scissorTest!==e&&(!0===e?this.gl.enable(this.gl.SCISSOR_TEST):this.gl.disable(this.gl.SCISSOR_TEST),this._state.scissorTest=e)}setScissorRect(e,t,s,i){this._state.scissorRect.x===e&&this._state.scissorRect.y===t&&this._state.scissorRect.width===s&&this._state.scissorRect.height===i||(this.gl.scissor(e,t,s,i),this._state.scissorRect.x=e,this._state.scissorRect.y=t,this._state.scissorRect.width=s,this._state.scissorRect.height=i)}setDepthTestEnabled(e){this._state.depthTest!==e&&(!0===e?this.gl.enable(this.gl.DEPTH_TEST):this.gl.disable(this.gl.DEPTH_TEST),this._state.depthTest=e,this._stateTracker.invalidateDepthTest())}setClearDepth(e){this._state.clearDepth!==e&&(this.gl.clearDepth(e),this._state.clearDepth=e)}setDepthFunction(e){this._state.depthFunction!==e&&(this.gl.depthFunc(e),this._state.depthFunction=e,this._stateTracker.invalidateDepthTest())}setDepthWriteEnabled(e){this._state.depthWrite!==e&&(this.gl.depthMask(e),this._state.depthWrite=e,this._stateTracker.invalidateDepthWrite())}setDepthRange(e,t){this._state.depthRange.zNear===e&&this._state.depthRange.zFar===t||(this.gl.depthRange(e,t),this._state.depthRange.zNear=e,this._state.depthRange.zFar=t,this._stateTracker.invalidateDepthWrite())}setStencilTestEnabled(e){this._state.stencilTest!==e&&(!0===e?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this._state.stencilTest=e,this._stateTracker.invalidateStencilTest())}setClearStencil(e){e!==this._state.clearStencil&&(this.gl.clearStencil(e),this._state.clearStencil=e)}setStencilFunction(e,t,s){this._state.stencilFunction.func===e&&this._state.stencilFunction.ref===t&&this._state.stencilFunction.mask===s||(this.gl.stencilFunc(e,t,s),this._state.stencilFunction.face=o.Y7.FRONT_AND_BACK,this._state.stencilFunction.func=e,this._state.stencilFunction.ref=t,this._state.stencilFunction.mask=s,this._stateTracker.invalidateStencilTest())}setStencilFunctionSeparate(e,t,s,i){this._state.stencilFunction.face===e&&this._state.stencilFunction.func===t&&this._state.stencilFunction.ref===s&&this._state.stencilFunction.mask===i||(this.gl.stencilFuncSeparate(e,t,s,i),this._state.stencilFunction.face=e,this._state.stencilFunction.func=t,this._state.stencilFunction.ref=s,this._state.stencilFunction.mask=i,this._stateTracker.invalidateStencilTest())}setStencilWriteMask(e){this._state.stencilWriteMask!==e&&(this.gl.stencilMask(e),this._state.stencilWriteMask=e,this._stateTracker.invalidateStencilWrite())}setStencilOp(e,t,s){this._state.stencilOperation.face===o.Y7.FRONT_AND_BACK&&this._state.stencilOperation.fail===e&&this._state.stencilOperation.zFail===t&&this._state.stencilOperation.zPass===s||(this.gl.stencilOp(e,t,s),this._state.stencilOperation.face=o.Y7.FRONT_AND_BACK,this._state.stencilOperation.fail=e,this._state.stencilOperation.zFail=t,this._state.stencilOperation.zPass=s,this._stateTracker.invalidateStencilTest())}setStencilOpSeparate(e,t,s,i){this._state.stencilOperation.face===e&&this._state.stencilOperation.fail===t&&this._state.stencilOperation.zFail===s&&this._state.stencilOperation.zPass===i||(this.gl.stencilOpSeparate(e,t,s,i),this._state.stencilOperation.face=e,this._state.stencilOperation.fail=t,this._state.stencilOperation.zFail=s,this._state.stencilOperation.zPass=i,this._stateTracker.invalidateStencilTest())}
116setActiveTexture(e,t=!1){let s=this._state.activeTexture;return e>=0&&(t||e!==this._state.activeTexture)&&(this.gl.activeTexture(o.xM+e),this._state.activeTexture=e),s}setDrawBuffers(e){let{drawFramebuffer:t}=this._state,s=null===t,i=s?this._state.drawBuffers.defaultFramebuffer:this._state.drawBuffers.fbos.get(t);if(i?.length!==e.length||!i.every((t,s)=>t===e[s]))if(e.length>this.parameters.maxDrawBuffers)console.error("Setting more active draw buffers than GL.MAX_DRAW_BUFFERS allows.");else{if(s){if(e.length>1)return void console.error("The default framebuffer can only have one active draw buffer.");if(e[0]!==o.Hr.BACK&&e[0]!==o.Hr.NONE)return void console.error("The default framebuffer can only use the constants GL.BACK or GL.NONE as draw buffers.")}s||!e.includes(o.Hr.BACK)?(this.gl.drawBuffers(e),s?this._state.drawBuffers.defaultFramebuffer=e:this._state.drawBuffers.fbos.set(t,e),this._stateTracker.invalidateDrawBuffers()):console.error("A framebuffer object can only use the constants GL.COLOR_ATTACHMENTi or GL.NONE as draw buffers.")}}clear(e,t=255){if(e){if(e&o.NV.COLOR){let e=this._state.drawFramebuffer?.colorAttachments;e&&this.setDrawBuffers(e),this.setColorMask(!0,!0,!0,!0)}e&o.NV.DEPTH&&this.setDepthWriteEnabled(!0),e&o.NV.STENCIL&&this.setStencilWriteMask(t),this.gl.clear(e)}}clearFramebuffer(e,t=!1,s=!1){let i=0;if(e){let t=Math.max(1e-13,e[3]);this.setClearColor(e[0],e[1],e[2],t),i|=o.NV.COLOR}t&&(i|=o.NV.DEPTH),!1===s?s=0:(!0===s&&(s=255),i|=o.NV.STENCIL),i&&this.clear(i,s)}drawArrays(e,t,s){if(this._transformFeedbackRequestInfo){if(e!==this._transformFeedbackRequestInfo.primitiveType)throw Error("DrawArrays called during transform feedback, but primitiveType does not match that of the current transform feedback request");if(null==this._state.program?.hasTransformFeedbackVaryings)throw Error("DrawArrays called during transform feedback, but the shader program was not linked with a transform feedback varying")}if((0,l.en)()){this._numOfDrawCalls++,this._numOfTriangles+=G(e,s);let t=this._state.textureUnitMap;for(let e=0;e<t.length;e++){let s=t[e];if(null!=s&&s===this._state.drawFramebuffer?.colorTexture)throw Error(`Detected readWrite. Texture already bound at index ${e}`)}}this.gl.drawArrays(e,t,s),(0,l.Y2)(this.gl)}drawArraysInstanced(e,t,s,i){this.gl.drawArraysInstanced(e,t,s,i),(0,l.Y2)(this.gl)}drawElements(e,t,s,i){if(this._transformFeedbackRequestInfo)throw Error("Cannot called drawElements during a transform feedback request");if((0,l.en)()&&(this._numOfDrawCalls++,this._numOfTriangles+=G(e,t)),this.gl.drawElements(e,t,s,i),(0,l.en)()){let r=(0,E.WH)(this);if(r){let a=this.getBoundVAO(),n=a?.indexBuffer,l=a?.vertexBuffers,o=n?.size??0,h=i+t,u=o<h?`. Buffer is too small. Attempted to draw index ${h} of ${o}`:"";console.error(`drawElements: ${r}${u}`,{args:{mode:e,count:t,type:s,offset:i},vao:{indexBuffer:n,vertexBuffers:l}})}}}drawElementsInstanced(e,t,s,i,r){this.gl.drawElementsInstanced(e,t,s,i,r),(0,l.Y2)(this.gl)}logInfo(){(0,l.en)()&&console.log(`DrawCalls: ${this._numOfDrawCalls}, Triangles: ${this._numOfTriangles}`)}resetInfo(){(0,l.en)()&&(this._numOfDrawCalls=0,this._numOfTriangles=0)}get capabilities(){return this._capabilities}setViewport(e,t,s,i){s=Math.max(Math.round(s),1),i=Math.max(Math.round(i),1);let r=this._state.viewport;r.x===e&&r.y===t&&r.width===s&&r.height===i||(r.x=e,r.y=t,r.width=s,r.height=i,this.gl.viewport(e,t,s,i))}setViewport4fv(e){this.setViewport(e[0],e[1],e[2],e[3])}restoreViewport({x:e,y:t,width:s,height:i}){this.setViewport(e,t,s,i)}getViewport(){let e=this._state.viewport;return{x:e.x,y:e.y,width:e.width,height:e.height}}useProgram(e){this._state.program!==e&&(this._state.program?.stop(),this._state.program=e,this.gl.useProgram(e?.glName??null))}bindTexture(e,t,s=!1){(t>=this.parameters.maxTextureImageUnits||t<0)&&console.error("Input texture unit is out of range of available units!");let i=this._state.textureUnitMap[t];return null==e?.glName?(null!=i&&(this.setActiveTexture(t,s),this.gl.bindTexture(i.descriptor.target,null)),this._state.textureUnitMap[t]=null):s||i!==e?(this.setActiveTexture(t,s),this.gl.bindTexture(e.descriptor.target,e.glName),e.a
116pplyChanges(),this._state.textureUnitMap[t]=e):e.isDirty&&(this.setActiveTexture(t,s),e.applyChanges()),i}unbindTexture(e){if(null!=e)for(let t=0;t<this.parameters.maxTextureImageUnits;t++)this._state.textureUnitMap[t]===e&&(this.bindTexture(null,t),this._state.textureUnitMap[t]=null)}bindFramebuffer(e,t=!1){if(t||this._state.readFramebuffer!==e||this._state.drawFramebuffer!==e){if(this._stateTracker.invalidateDrawBuffers(),null==e)return this.gl.bindFramebuffer(o.R.FRAMEBUFFER,null),void(this._state.readFramebuffer=this._state.drawFramebuffer=null);e.initializeAndBind(o.R.FRAMEBUFFER),this._state.readFramebuffer=e,this._state.drawFramebuffer=e}}bindFramebufferSeparate(e,t,s=!1){let i=t===o.R.READ_FRAMEBUFFER,r=i?this._state.readFramebuffer:this._state.drawFramebuffer;(s||r!==e)&&(null==e?this.gl.bindFramebuffer(t,null):e.initializeAndBind(t),i?this._state.readFramebuffer=e??null:(this._stateTracker.invalidateDrawBuffers(),this._state.drawFramebuffer=e??null))}blitFramebuffer(e,t,s=0,i=0,r=e.width,a=e.height,n=0,l=0,h=t.width,u=t.height,f=o.NV.COLOR,_=o.Cj.NEAREST){this.bindFramebufferSeparate(e,o.R.READ_FRAMEBUFFER),this.bindFramebufferSeparate(t,o.R.DRAW_FRAMEBUFFER),this.gl.blitFramebuffer(s,i,r,a,n,l,h,u,f,_)}bindBuffer(e,t){if(e)switch(t??=e.bufferType){case o.NZ.ARRAY_BUFFER:this._state.vertexBuffer=L(this.gl,e,t,this._state.vertexBuffer);break;case o.NZ.ELEMENT_ARRAY_BUFFER:this._state.indexBuffer=L(this.gl,e,t,this._state.indexBuffer);break;case o.NZ.UNIFORM_BUFFER:this._state.uniformBuffer=L(this.gl,e,t,this._state.uniformBuffer);break;case o.NZ.PIXEL_PACK_BUFFER:this._state.pixelPackBuffer=L(this.gl,e,t,this._state.pixelPackBuffer);break;case o.NZ.PIXEL_UNPACK_BUFFER:this._state.pixelUnpackBuffer=L(this.gl,e,t,this._state.pixelUnpackBuffer);break;case o.NZ.COPY_READ_BUFFER:this._state.copyReadBuffer=L(this.gl,e,t,this._state.copyReadBuffer);break;case o.NZ.COPY_WRITE_BUFFER:this._state.copyWriteBuffer=L(this.gl,e,t,this._state.copyWriteBuffer);break;case o.NZ.TRANSFORM_FEEDBACK_BUFFER:this._state.transformFeedbackBuffer=L(this.gl,e,t,this._state.transformFeedbackBuffer)}}bindRenderbuffer(e){let t=this.gl;e||(t.bindRenderbuffer(t.RENDERBUFFER,null),this._state.renderbuffer=null),this._state.renderbuffer!==e&&(t.bindRenderbuffer(t.RENDERBUFFER,e.glName),this._state.renderbuffer=e)}_getBufferBinding(e,t){if(t>=this.parameters.maxUniformBufferBindings||t<0)return console.error("Uniform buffer binding point is out of range!"),null;let s=e===o.NZ.UNIFORM_BUFFER?this._state.uniformBufferBindingPoints:this._state.transformBufferBindingPoints,i=s[t];return null==i&&(i={buffer:null,offset:0,size:0},s[t]=i),i}bindBufferBase(e,t,s){let i=this._getBufferBinding(e,t);null!=i&&(i.buffer===s&&0===i.offset&&0===i.size||(this.gl.bindBufferBase(e,t,s?s.glName:null),i.buffer=s,i.offset=0,i.size=0))}bindBufferRange(e,t,s,i,r){let a=this._getBufferBinding(e,t);null!=a&&(a.buffer===s&&a.offset===i&&a.size===r||(i%this._parameters.uniformBufferOffsetAlignment==0?(this.gl.bindBufferRange(e,t,s.glName,i,r),a.buffer=s,a.offset=i,a.size=r):console.error("Uniform buffer binding offset is not a multiple of the context offset alignment")))}bindUBO(e,t,s,i){null!=t?((0,l.en)()&&(i??t.byteLength)>this._parameters.maxUniformBlockSize&&console.error("Attempting to bind more data than the maximum uniform block size"),t.initialize(),void 0!==s&&void 0!==i?this.bindBufferRange(o.NZ.UNIFORM_BUFFER,e,t.buffer,s,i):this.bindBufferBase(o.NZ.UNIFORM_BUFFER,e,t.buffer)):this.bindBufferBase(o.NZ.UNIFORM_BUFFER,e,null)}unbindUBO(e){for(let t=0,s=this._state.uniformBufferBindingPoints.length;t<s;t++){let s=this._state.uniformBufferBindingPoints[t];null!=s&&s.buffer===e.buffer&&this.bindBufferBase(o.NZ.UNIFORM_BUFFER,t,null)}}unbindBuffer(e){switch(e){case o.NZ.ARRAY_BUFFER:this._state.vertexBuffer=L(this.gl,null,e,this._state.vertexBuffer);break;case o.NZ.ELEMENT_ARRAY_BUFFER:this._state.indexBuffer=L(this.gl,null,e,this._state.indexBuffer);break;case o.NZ.UNIFORM_BUFFER:this._state.uniformBuffer=L(this.gl,null,e,this._state.uniformBuffer);break;case o.NZ.PIXEL_PACK_BUFFER:this._state.pixelPackBuffer=L(this.gl,null,e,this._state.pixelPackBuffer);break;case o.NZ.PIXEL_UNPACK_BUFFER:this._state.pixelUnpackBuffer=L(this.gl,null,e,this._state.pixelUnpackBuffer);break;case o.NZ.COPY_READ_BUFFER:this._state.copyReadBuffer=L(this.gl,null,e,this._state.copyReadBuffer);break;case o.NZ.COPY_WRITE_BUFFER:this._state.copyWriteBuffer=L(this.gl,null,e,this._state.copyWriteBuffer)}}bindVAO(e=null){null!=e?this._state.vertexArrayObject!==e&&(e.bind(),this._state.vertexArrayObject=e):this._state.vertexArrayObject&&(this._state.vertexArrayObject.unbind(),this._state.vertexArrayObject=null)}bindTransformFeedback(e){let{gl:t}=this;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,e.glName)}beginTransformFeedback(e,t){if(this._transformFeedbackRequestInfo)throw Error("Already in a transform feedback request");let{gl:s}=this;s.bindTransformFeedback(s.TRANSFORM_FEEDBACK,e.glName),s.beginTransformFeedback(t),this._transformFeedbackRequestInfo={primitiveType:t}}endTransformFeedback(){if(!this._transformFeedbackRequestInfo)throw Error("Not in a transform feedback request");let{gl:e}=this;e.endTransformFeedback(),e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null),this._transformFeedbackRequestInfo=null}async clientWaitAsync(e=(0,n.l5)(10)){let t,{gl:s}=this,i=s.fenceSync(o.tx.SYNC_GPU_COMMANDS_COMPLETE,0);if(!i)throw Error("Client wait failed, could not create sync object");this.instanceCounter.increment(o.vt.Sync,i),s.flush();do await (0,a.Pl)(e),t=s.clientWaitSync(i,0,0);while(t===o.sS.TIMEOUT_EXPIRED);
116if(this.instanceCounter.decrement(o.vt.Sync,i),s.deleteSync(i),t===o.sS.WAIT_FAILED)throw Error("Client wait failed")}getBoundFramebufferObject(e=o.R.FRAMEBUFFER){return e===o.R.READ_FRAMEBUFFER?this._state.readFramebuffer:this._state.drawFramebuffer}getBoundVAO(){return this._state.vertexArrayObject}resetState(){this.useProgram(null),this.bindVAO(null),this.bindFramebuffer(null,!0),this.unbindBuffer(o.NZ.ARRAY_BUFFER),this.unbindBuffer(o.NZ.ELEMENT_ARRAY_BUFFER),this.unbindBuffer(o.NZ.UNIFORM_BUFFER),this._state.uniformBufferBindingPoints.length=0,this.unbindBuffer(o.NZ.PIXEL_PACK_BUFFER),this.unbindBuffer(o.NZ.PIXEL_UNPACK_BUFFER),this.unbindBuffer(o.NZ.COPY_READ_BUFFER),this.unbindBuffer(o.NZ.COPY_WRITE_BUFFER);for(let e=0;e<this.parameters.maxTextureImageUnits;++e)this.bindTexture(null,e);this.setBlendingEnabled(!1),this.setBlendFunction(o.dn.ONE,o.dn.ZERO),this.setBlendEquation(o.Tb.ADD),this.setBlendColor(0,0,0,0),this.setFaceCullingEnabled(!1),this.setCullFace(o.Y7.BACK),this.setFrontFace(o.Ac.CCW),this.setPolygonOffsetFillEnabled(!1),this.setPolygonOffset(0,0),this.setScissorTestEnabled(!1),this.setScissorRect(0,0,this.gl.canvas.width,this.gl.canvas.height),this.setDepthTestEnabled(!1),this.setDepthFunction(o.MT.LESS),this.setDepthRange(0,1),this.setStencilTestEnabled(!1),this.setStencilFunction(o.MT.ALWAYS,0,0),this.setStencilOp(o.eA.KEEP,o.eA.KEEP,o.eA.KEEP),this.setClearColor(0,0,0,0),this.setClearDepth(1),this.setClearStencil(0),this.setColorMask(!0,!0,!0,!0),this.setStencilWriteMask(0xffffffff),this.setDepthWriteEnabled(!0),this.setDrawBuffers([o.Hr.BACK]),this.setViewport(0,0,this.gl.canvas.width,this.gl.canvas.height)}enforceState(){let{gl:e}=this;e.bindVertexArray(null);for(let t=0;t<this.parameters.maxVertexAttributes;t++)e.disableVertexAttribArray(t);this._state.vertexBuffer?e.bindBuffer(this._state.vertexBuffer.bufferType,this._state.vertexBuffer.glName):e.bindBuffer(o.NZ.ARRAY_BUFFER,null),this._state.indexBuffer?e.bindBuffer(this._state.indexBuffer.bufferType,this._state.indexBuffer.glName):e.bindBuffer(o.NZ.ELEMENT_ARRAY_BUFFER,null),this._state.uniformBuffer?e.bindBuffer(this._state.uniformBuffer.bufferType,this._state.uniformBuffer.glName):e.bindBuffer(o.NZ.UNIFORM_BUFFER,null);for(let t=0;t<this._parameters.maxUniformBufferBindings;t++){let s=this._state.uniformBufferBindingPoints[t];if(null!=s){let{buffer:i,offset:r,size:a}=s;null!==i?0===r&&0===a?e.bindBufferBase(o.NZ.UNIFORM_BUFFER,t,i.glName):e.bindBufferRange(o.NZ.UNIFORM_BUFFER,t,i.glName,r,a):e.bindBufferBase(o.NZ.UNIFORM_BUFFER,t,null)}}if(this._state.pixelPackBuffer?e.bindBuffer(this._state.pixelPackBuffer.bufferType,this._state.pixelPackBuffer.glName):e.bindBuffer(o.NZ.PIXEL_PACK_BUFFER,null),this._state.pixelUnpackBuffer?e.bindBuffer(this._state.pixelUnpackBuffer.bufferType,this._state.pixelUnpackBuffer.glName):e.bindBuffer(o.NZ.PIXEL_UNPACK_BUFFER,null),this._state.copyReadBuffer?e.bindBuffer(this._state.copyReadBuffer.bufferType,this._state.copyReadBuffer.glName):e.bindBuffer(o.NZ.COPY_READ_BUFFER,null),this._state.copyWriteBuffer?e.bindBuffer(this._state.copyWriteBuffer.bufferType,this._state.copyWriteBuffer.glName):e.bindBuffer(o.NZ.COPY_WRITE_BUFFER,null),e.bindFramebuffer(o.R.READ_FRAMEBUFFER,null),e.readBuffer(e.BACK),this._state.readFramebuffer&&(e.bindFramebuffer(o.R.READ_FRAMEBUFFER,this._state.readFramebuffer.glName),e.readBuffer(o.Nm.COLOR_ATTACHMENT0)),e.bindFramebuffer(o.R.DRAW_FRAMEBUFFER,this._state.drawFramebuffer?.glName??null),null===this._state.drawFramebuffer){let t=this._state.drawBuffers.defaultFramebuffer;e.drawBuffers(t??[o.Hr.BACK])}else{let t=this._state.drawBuffers.fbos.get(this._state.drawFramebuffer);e.drawBuffers(t??[o.Nm.COLOR_ATTACHMENT0])}if(this._state.vertexArrayObject){let e=this._state.vertexArrayObject;this._state.vertexArrayObject&&(this._state.vertexArrayObject.unbind(),this._state.vertexArrayObject=null),this.bindVAO(e)}e.useProgram(this._state.program?.glName??null),e.blendColor(this._state.blendColor.r,this._state.blendColor.g,this._state.blendColor.b,this._state.blendColor.a),e.bindRenderbuffer(e.RENDERBUFFER,this._state.renderbuffer?.glName??null),!0===this._state.blend?e.enable(this.gl.BLEND):e.disable(this.gl.BLEND),e.blendEquationSeparate(this._state.blendEquation.mode,this._state.blendEquation.modeAlpha),e.blendFuncSeparate(this._state.blendFunction.srcRGB,this._state.blendFunction.dstRGB,this._state.blendFunction.srcAlpha,this._state.blendFunction.dstAlpha),e.clearColor(this._state.clearColor.r,this._state.clearColor.g,this._state.clearColor.b,this._state.clearColor.a),e.clearDepth(this._state.clearDepth),e.clearStencil(this._state.clearStencil),e.colorMask(this._state.colorMask.r,this._state.colorMask.g,this._state.colorMask.b,this._state.colorMask.a),e.cullFace(this._state.cullFace),e.depthFunc(this._state.depthFunction),e.depthRange(this._state.depthRange.zNear,this._state.depthRange.zFar),!0===this._state.depthTest?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),e.depthMask(this._state.depthWrite),e.frontFace(this._state.frontFace),e.lineWidth(1),!0===this._state.faceCulling?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),e.polygonOffset(this._state.polygonOffset[0],this._state.polygonOffset[1]),!0===this._state.polygonOffsetFill?e.enable(e.POLYGON_OFFSET_FILL):e.disable(e.POLYGON_OFFSET_FILL),e.scissor(this._state.scissorRect.x,this._state.scissorRect.y,this._state.scissorRect.width,this._state.scissorRect.height),!0===this._state.scissorTest?e.enable(e.SCISSOR_TEST):e.disable(e.SCISSOR_TEST),e.stencilFunc(this._state.stencilFunction.func,this._state.stencilFunction.ref,this._state.stencilFunction.mask),e.stencilOpSeparate(this._state.stencilOperation.face,this._state.stencilOperation.fail,this._state.stencilOperation.zFail,this._state.stencilOperation.zPass),!0===this._state.stencilTest?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),e.stencilMask(this._state.stencilWriteMask);for(let t=0;t<this.parameters.maxTextureImageUnits;t++){e.activeTexture(o.xM+t),e.bindTexture(o.Ap.TEXTURE_2D,null),e.bindTexture(o.Ap.TEXTURE_CUBE_MAP,null),e.bindTexture(o.Ap.TEXTURE_3D,null),e.bindTexture(o.Ap.TEXTURE_2D_ARRAY,null);let s=this._state.textureUnitMap[t];null!=s&&e.bindTexture(s.descriptor.target,s.glName)}e.activeTexture(o.xM+this._state.activeTexture);let t=this._state.viewport;e.viewport(t.x,t.y,t.width,t.height),this.resetInfo()}_loadExtensions(){this.gl.getExtension("KHR_parallel_shader_compile")}};function L(e,t,s,i){return t?i!==t&&e.bindBuffer(s,t.glName):e.bindBuffer(s,null),t}function G(e,t){switch(e){case o.WR.POINTS:return 2*t;case o.WR.TRIANGLES:return t/3;case o.WR.TRIANGLE_STRIP:case o.WR.TRIANGLE_FAN:return t-2;default:return 0}}},84749:(e,t,s)=>{s.d(t,{f:()=>S});var i=s(88284),r=s(21406),a=s(73307),n=s(51230),l=s(73257),o=s(36271);let h=0;function u(e,t){return new n.c((0,o.U)(h++),e,t)}let f={visualVariableColor:null,visualVariableOpacity:null,visualVariableSizeMinMaxValue:null,visualVariableSizeScaleStops:null,visualVariableSizeStops:null,visualVariableSizeUnitValue:null,visualVariableRotation:null,visualVariableSizeOutlineScaleStops:null};class _{constructor(){this.instances={fill:u(l.YS.fill,{uniforms:f,optionalAttributes:{zoomRange:!0}}),marker:u(l.YS.marker,{uniforms:f,optionalAttributes:{zoomRange:!0}}),line:u(l.YS.line,{uniforms:f,optionalAttributes:{zoomRange:!0}}),text:u(l.YS.text,{uniforms:f,optionalAttributes:{zoomRange:!0,referenceSymbol
116:!1,clipAngle:!1}}),complexFill:u(l.YS.complexFill,{uniforms:f,optionalAttributes:{zoomRange:!0}}),texturedLine:u(l.YS.texturedLine,{uniforms:f,optionalAttributes:{zoomRange:!0}}),animatedMarker:u(l.YS.animatedMarker,{uniforms:f,optionalAttributes:{zoomRange:!0}})},this._instancesById=Object.values(this.instances).reduce((e,t)=>(e.set(t.instanceId,t),e),new Map)}getInstance(e){return this._instancesById.get(e)}}var d=s(81868),c=s(99895),g=s(3790),p=s(57055),b=s(34698),E=s(22018),R=s(98776),m=s(41676),F=s(36609),T=s(27707);let A=Math.PI/180;class B extends E.q{constructor(e){super(),this._program=null,this._vao=null,this._vertexBuffer=null,this._indexBuffer=null,this._dvsMat3=(0,c.vt)(),this._localOrigin={x:0,y:0},this._getBounds=e}destroy(){this._vao&&(this._vao.dispose(),this._vao=null,this._vertexBuffer=null,this._indexBuffer=null),this._program=(0,i.WD)(this._program)}doRender(e){let{context:t}=e,s=this._getBounds();if(s.length<1)return;this._createShaderProgram(t),this._updateMatricesAndLocalOrigin(e),this._updateBufferData(t,s),t.setBlendingEnabled(!0),t.setDepthTestEnabled(!1),t.setStencilWriteMask(0),t.setStencilTestEnabled(!1),t.setBlendFunction(F.dn.ONE,F.dn.ONE_MINUS_SRC_ALPHA),t.setColorMask(!0,!0,!0,!0);let i=this._program;t.bindVAO(this._vao),t.useProgram(i),i.setUniformMatrix3fv("u_dvsMat3",this._dvsMat3),t.gl.lineWidth(1),t.drawElements(F.WR.LINES,8*s.length,F.pe.UNSIGNED_INT,0),t.bindVAO()}_createTransforms(){return{displayViewScreenMat3:(0,c.vt)()}}_createShaderProgram(e){this._program||(this._program=e.programCache.acquire("precision highp float;\n        uniform mat3 u_dvsMat3;\n\n        attribute vec2 a_position;\n\n        void main() {\n          mediump vec3 pos = u_dvsMat3 * vec3(a_position, 1.0);\n          gl_Position = vec4(pos.xy, 0.0, 1.0);\n        }","precision mediump float;\n      void main() {\n        gl_FragColor = vec4(0.75, 0.0, 0.0, 0.75);\n      }",x().attributes))}_updateMatricesAndLocalOrigin(e){let{state:t}=e,{displayMat3:s,size:i,resolution:r,pixelRatio:a,rotation:n,viewpoint:l}=t,{x:o,y:h}=l.targetGeometry,u=(0,b.mT)(o,t.spatialReference);this._localOrigin.x=u,this._localOrigin.y=h;let f=a*i[0],_=a*i[1],c=(0,d.D_)(this._dvsMat3);(0,d.lw)(c,c,s),(0,d.Tl)(c,c,(0,g.fA)(f/2,_/2)),(0,d.hs)(c,c,(0,p.fA)(i[0]/(r*f),-_/(r*_),1)),(0,d.e$)(c,c,-(A*n))}_updateBufferData(e,t){let{x:s,y:i}=this._localOrigin,r=new Float32Array(8*t.length),a=new Uint32Array(8*t.length),n=0,l=0;for(let e of t)e&&(r[2*n]=e[0]-s,r[2*n+1]=e[1]-i,r[2*n+2]=e[0]-s,r[2*n+3]=e[3]-i,r[2*n+4]=e[2]-s,r[2*n+5]=e[3]-i,r[2*n+6]=e[2]-s,r[2*n+7]=e[1]-i,a[l]=n+0,a[l+1]=n+3,a[l+2]=n+3,a[l+3]=n+2,a[l+4]=n+2,a[l+5]=n+1,a[l+6]=n+1,a[l+7]=n+0,n+=4,l+=8);if(this._vertexBuffer?this._vertexBuffer.setData(r.buffer):this._vertexBuffer=m.g.createVertex(e,F._U.DYNAMIC_DRAW,r.buffer),this._indexBuffer?this._indexBuffer.setData(a):this._indexBuffer=m.g.createIndex(e,F._U.DYNAMIC_DRAW,a),!this._vao){let t=x();this._vao=new T.Z(e,t.attributes,t.bufferLayouts,new Map([["geometry",this._vertexBuffer]]),this._indexBuffer)}}}let x=()=>(0,R.ES)("bounds",{geometry:[{location:0,name:"a_position",count:2,type:F.pe.FLOAT}]});class S extends r.j{constructor(e){super(e),this._instanceStore=new _,this.checkHighlight=()=>!0}destroy(){super.destroy(),this._boundsRenderer=(0,i.pR)(this._boundsRenderer)}get instanceStore(){return this._instanceStore}enableRenderingBounds(e){this._boundsRenderer=new B(e),this.requestRender()}get hasHighlight(){return this.checkHighlight()}onTileData(e,t){e.onMessage(t),this.contains(e)||this.addChild(e),this.requestRender()}_renderChildren(e,t){for(let s of(e.selection=t,this.children)){if(!s.visible)continue;let t=s.getDisplayList(this._instanceStore,a.ch.STRICT_ORDER);t?.render(e)}}}},96631:(e,t,s)=>{s.d(t,{O:()=>i});class i{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,s){let i=this._outer.get(e);i?i.set(t,s):this._outer.set(e,new Map([[t,s]]))}delete(e,t){let s=this._outer.get(e);s&&(s.delete(t),0===s.size&&this._outer.delete(e))}forEach(e){this._outer.forEach((t,s)=>e(t,s))}forAll(e){for(let t of this._outer.values())for(let s of t.values())e(s)}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.