PageSourceSearch

https://www.bundesimmobilien.de/assets/chunk-3710.4b803ec95f1cc2460df6.js

js bundesimmobilien.de collected 2026-10-02 06:00:09 UTC 56,014 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3710],{73021:function(e,t,r){r.d(t,{J:function(){return n},r:function(){return a}});let s=null,i=!0;function a(e,t,r){if(!e||!t)throw new Error("Cannot construct image data without dimensions");if(i)try{return new ImageData(e,t)}catch(e){i=!1}return h(e,t,r)}function n(e,t,r,s){if(!t||!r)throw new Error("Cannot construct image data without dimensions");if(i)try{return new ImageData(e,t,r)}catch(e){i=!1}const a=h(t,r,s);return a.data.set(e,0),a}function o(){return s||(s=document.createElement("canvas"),s.width=1,s.height=1),s}function h(e,t,r){return r||(r=o()),r.getContext("2d").createImageData(e,t)}},52535:function(e,t,r){r.d(t,{t:function(){return i}});var s=r(69034);async function i(e,t){const{data:r}=await(0,s.default)(e,{responseType:"image",...t});return r}},19411:function(e,t,r){r.d(t,{Z:function(){return p}});var s=r(69034),i=r(67385),a=r(15228),n=r(16639),o=r(37085);const h=[137,80,78,71,13,10,26,10];function l(e){const t=new Uint8Array(e);return!h.some(((e,r)=>e!==t[r]))}function d(e){if(!l(e))return!1;const t=new DataView(e),r=new Uint8Array(e);let s,i=8;do{const e=t.getUint32(i);if(s=String.fromCharCode.apply(String,Array.prototype.slice.call(r.subarray(i+4,i+8))),"acTL"===s)return!0;i+=12+e}while("IEND"!==s&&i<r.length);return!1}var u=r(99146),c=r(72406);const _=[71,73,70];class p{constructor(){this._resourceMap=new Map,this._inFlightResourceMap=new Map,this.geometryEngine=null,this.geometryEnginePromise=null}destroy(){this._inFlightResourceMap.clear(),this._resourceMap.clear()}getResource(e){return this._resourceMap.get(e)??null}async fetchResource(e,t){const r=this._resourceMap.get(e);if(r)return{width:r.width,height:r.height};let h=this._inFlightResourceMap.get(e);return h?h.then((e=>({width:e.width,height:e.height}))):(h=async function(e,t){const{arrayBuffer:r,mediaType:h}=await async function(e,t){let r;const n=";base64,";if(e.includes(n)){const t=e.indexOf(n),s=e.indexOf(n)+n.length,i=e.substring(s),a=atob(i),o=new Uint8Array(a.length);for(let e=0;e<a.length;e++)o[e]=a.charCodeAt(e);r={arrayBuffer:o.buffer,mediaType:e.substring(0,t).replace("data:","")}}else try{const i=await(0,s.default)(e,{responseType:"array-buffer",...t});r={arrayBuffer:i.data,mediaType:i.getHeader("Content-Type")}}catch(t){if(!(0,a.D_)(t))throw new i.Z("mapview-invalid-resource",`Could not fetch requested resource at ${e}`)}return r}(e,t),l="image/png"===h;return"image/gif"===h&&function(e){if(!function(e){const t=new Uint8Array(e);return!_.some(((e,r)=>e!==t[r]))}(e))return!1;const t=new DataView(e),r=t.getUint8(10);let s=13+(128&r?3*2**(1+(7&r)):0),i=0,a=!1;for(;!a;){switch(t.getUint8(s++)){case 33:if(!n())return!1;break;case 44:o();break;case 59:a=!0;break;default:return!1}if(i>1)return!0}function n(){switch(t.getUint8(s++)){case 249:s++,s+=4,h();break;case 1:i++,s++,s+=12,h();break;case 254:h();break;case 255:s++,s+=8,s+=3,h();break;default:return!1}return!0}function o(){i++,s+=8;const e=t.getUint8(s++);s+=128&e?3*2**(1+(7&e)):0,s++,h()}function h(){let e;for(;e=t.getUint8(s++);)s+=e}return!1}(r)?async function(e,t){const r=(0,c.p)(e),s=(0,c.d)(r,!0),{width:i,height:a}=r.lsd,n=document.createElement("canvas");n.width=i,n.height=a;const h=n.getContext("2d",{willReadFrequently:!0}),l=[],d=[];for(const e of s){d.push((0,o.HA)(e.delay||100));const t=new ImageData(e.patch,e.dims.width,e.dims.height),r=(0,u.E0)(t),s=3===e.disposalType?h.getImageData(e.dims.left,e.dims.top,e.dims.width,e.dims.height):void 0;h.drawImage(r,e.dims.left,e.dims.top);const n=h.getImageData(0,0,i,a);l.push(n),1===e.disposalType||(2===e.disposalType?h.clearRect(e.dims.left,e.dims.top,e.dims.width,e.dims.height):3===e.disposalType&&h.putImageData(s,e.dims.left,e.dims.top))}return{frameDurations:d,getFrame:e=>l[e],width:i,height:a}}(r):l&&d(r)?async function(e,t){const r=(0,n.p)(e);if(r instanceof Error)throw r;await r.createImages(),(0,a.k_)(t);const{frames:s,width:i,height:h}=r,l=document.createElement("canvas");l.width=i,l.height=h;const d=l.getContext("2d",{willReadFrequently:!0}),u=[],c=[];for(const e of s){c.push((0,o.HA)(e.delay||100));const t=e.imageElement;0===e.blendOp?d.globalCompositeOperation="copy":d.globalCompositeOperation="source-over";const r=2===e.disposeOp?d.getImageData(e.left,e.top,e.width,e.height):void 0;d.drawImage(t,e.left,e.top);const s=d.getImageData(0,0,i,h);u.push(s),0===e.disposeOp||(1===e.disposeOp?d.clearRect(e.left,e.top,e.width,e.height):2===e.disposeOp&&d.putImageData(r,e.left,e.top))}return{frameDurations:c,getFrame:e=>u[e],width:i,height:h}}(r,t):async function(e,t){const r=window.URL.createObjectURL(e);try{const{data:e}=await(0,s.default)(r,{...t,responseType:"image"});return e}catch(e){if(!(0,a.D_)(e))throw new i.Z("mapview-invalid-resource",`Could not fetch requested resource at ${r}`);throw e}finally{window.URL.revokeObjectURL(r)}}(new Blob([r],{type:h}),t)}(e,t),this._inFlightResourceMap.set(e,h),h.then((t=>(this._inFlightResourceMap.delete(e),this._resourceMap.set(e,t),{width:t.width,height:t.height})),(()=>({width:0,height:0}))))}deleteResource(e){this._inFlightResourceMap.delete(e),this._resourceMap.delete(e)}}},13710:function(e,t,r){r.r(t),r.d(t,{GraphicContainer:function(){return Xe.Z},GraphicsView2D:function(){return je.Z},LabelManager:function(){return We.Z},MagnifierView2D:function(){return it},MapViewNavigation:function(){return Ke.Z},Stage:function(){return qe}});var s=r(67385),i=r(99325),a=r(63713),n=r(72514),o=r(33181),h=r(97542),l=r(19411),d=r(31549),u=r(2556),c=r(70352),_=r(13113),p=r(9570
17),f=r(76821),g=r(25172);const m=e=>(0,g.K)({ID:e.id,PATTERN:e.pattern}),b={shaders:e=>({vertexShader:m(e)+(0,f.w)("background/background.vert"),fragmentShader:m(e)+(0,f.w)("background/background.frag")})},T=e=>(0,g.K)({ID:e.id}),w={shaders:e=>({vertexShader:T(e)+(0,f.w)("circle/circle.vert"),fragmentShader:T(e)+(0,f.w)("circle/circle.frag")})},E=e=>(0,g.K)({ID:e.id,PATTERN:e.pattern}),B={shaders:e=>({vertexShader:E(e)+(0,f.w)("fill/fill.vert"),fragmentShader:E(e)+(0,f.w)("fill/fill.frag")})},x=e=>(0,g.K)({ID:e.id}),O={shaders:e=>({vertexShader:x(e)+(0,f.w)("outline/outline.vert"),fragmentShader:x(e)+(0,f.w)("outline/outline.frag")})},R=e=>(0,g.K)({ID:e.id,SDF:e.sdf}),F={shaders:e=>({vertexShader:R(e)+(0,f.w)("icon/icon.vert"),fragmentShader:R(e)+(0,f.w)("icon/icon.frag")})},y=e=>(0,g.K)({ID:e.id,PATTERN:e.pattern,SDF:e.sdf}),M={shaders:e=>({vertexShader:y(e)+(0,f.w)("line/line.vert"),fragmentShader:y(e)+(0,f.w)("line/line.frag")})},U=e=>(0,g.K)({ID:e.id}),P={shaders:e=>({vertexShader:U(e)+(0,f.w)("text/text.vert"),fragmentShader:U(e)+(0,f.w)("text/text.frag")})};class v{constructor(){this._programByKey=new Map}dispose(){this._programByKey.forEach((e=>e.dispose())),this._programByKey.clear()}getMaterialProgram(e,t,r){const s=t.key<<3|this._getMaterialOptionsValue(t.type,r);if(this._programByKey.has(s))return this._programByKey.get(s);const i=this._getProgramTemplate(t.type),{shaders:a}=i,{vertexShader:n,fragmentShader:o}=a(r),h=t.getShaderHeader(),l=t.getShaderMain(),d=n.replace("#pragma header",h).replace("#pragma main",l),u=e.programCache.acquire(d,o,t.getAttributeLocations());return this._programByKey.set(s,u),u}_getMaterialOptionsValue(e,t){switch(e){case p._K.BACKGROUND:{const e=t;return(e.pattern?1:0)<<1|(e.id?1:0)}case p._K.FILL:{const e=t;return(e.pattern?1:0)<<1|(e.id?1:0)}case p._K.OUTLINE:return t.id?1:0;case p._K.LINE:{const e=t;return(e.sdf?1:0)<<2|(e.pattern?1:0)<<1|(e.id?1:0)}case p._K.ICON:{const e=t;return(e.sdf?1:0)<<1|(e.id?1:0)}case p._K.CIRCLE:case p._K.TEXT:return t.id?1:0;default:return 0}}_getProgramTemplate(e){switch(e){case p._K.BACKGROUND:return b;case p._K.CIRCLE:return w;case p._K.FILL:return B;case p._K.ICON:return F;case p._K.LINE:return M;case p._K.OUTLINE:return O;case p._K.TEXT:return P;default:return null}}}var S=r(66810),A=r(68104),C=r(29405),N=r(16882),I=r(53553),D=r(16770);class L{constructor(){this._initialized=!1}dispose(){this._program=(0,n.M2)(this._program),this._vertexArrayObject=(0,n.M2)(this._vertexArrayObject)}render(e,t,r,s){e&&(this._initialized||this._initialize(e),e.setBlendFunctionSeparate(N.zi.ONE,N.zi.ONE_MINUS_SRC_ALPHA,N.zi.ONE,N.zi.ONE_MINUS_SRC_ALPHA),e.bindVAO(this._vertexArrayObject),e.useProgram(this._program),t.setSamplingMode(r),e.bindTexture(t,0),this._program.setUniform1i("u_tex",0),this._program.setUniform1f("u_opacity",s),e.drawArrays(N.MX.TRIANGLE_STRIP,0,4),e.bindTexture(null,0),e.bindVAO())}_initialize(e){if(this._initialized)return!0;const t=(0,I.H)(e,A.Q);if(!t)return!1;const r=new Int8Array(16);r[0]=-1,r[1]=-1,r[2]=0,r[3]=0,r[4]=1,r[5]=-1,r[6]=1,r[7]=0,r[8]=-1,r[9]=1,r[10]=0,r[11]=1,r[12]=1,r[13]=1,r[14]=1,r[15]=1;const s=A.Q.attributes,i=new D.U(e,s,S.As,{geometry:C.f.createVertex(e,N.l1.STATIC_DRAW,r)});return this._program=t,this._vertexArrayObject=i,this._initialized=!0,!0}}var z=r(32842);const k=e=>e===c.jx.HITTEST||e===c.jx.LABEL_ALPHA;class G{constructor(e){this._rctx=e,this._programByKey=new Map}dispose(){this._programByKey.forEach((e=>e.dispose())),this._programByKey.clear()}getProgram(e,t=[]){const r=e.vsPath+"."+e.fsPath+JSON.stringify(t);if(this._programByKey.has(r))return this._programByKey.get(r);const s={...t.map((e=>"string"==typeof e?{name:e,value:!0}:e)).reduce(((e,t)=>({...e,[t.name]:t.value})),{})},{vsPath:i,fsPath:a,attributes:n}=e,o=(0,z.s)(i,a,n,s),h=this._rctx.programCache.acquire(o.shaders.vertexShader,o.shaders.fragmentShader,o.attributes);if(!h)throw new Error("Unable to get program for key: ${key}");return this._programByKey.set(r,h),h}getMaterialProgram(e,t,r,s,i){const a=(({rendererInfo:e,drawPhase:t},r,s)=>`${r.getVariationHash()}-${(e=>(k(e)?1:0)|(e===c.jx.HIGHLIGHT?2:0))(t)}-${e.getVariationHash()}-${(0,n.pC)(s)&&s.join(".")}`)(e,t,i);if(this._programByKey.has(a))return this._programByKey.get(a);const o=((e,t,r,s={})=>
1{if(s={...s,...t.getVariation(),...e.rendererInfo.getVariation(),highlight:e.drawPhase===c.jx.HIGHLIGHT,id:k(e.drawPhase)},(0,n.pC)(r))for(const e of r)s[e]=!0;return s})(e,t,i,{ignoresSamplerPrecision:e.context.driverTest.ignoresSamplerPrecision.result}),h=(0,z.s)(r,r,s,o),l=this._rctx.programCache.acquire(h.shaders.vertexShader,h.shaders.fragmentShader,h.attributes);if(!l)throw new Error("Unable to get program for key: ${key}");return this._programByKey.set(a,l),l}}var V=r(5149),H=r(15228),q=r(82928),W=r(99667);class j{constructor(e,t){this._queue=[],this._context=e,this._refreshable=t}destroy(){this._queue=[]}enqueueTextureUpdate(e,t){const r=(0,H.hh)(),s=e,i=q.u4,a=Math.ceil(s.height/i);if((0,H.k_)(t),this._context.type===W.zO.WEBGL1)this._queue.push({type:"no-chunk",request:e,resolver:r,options:t});else for(let n=0;n<a;n++){const o=n*i,h=n===a-1,l=h?s.height-i*n:i;this._queue.push({type:"chunk",request:e,resolver:r,chunk:n,chunkOffset:o,destHeight:l,chunkIsLast:h,options:t})}return(0,H.$F)(t,(e=>r.reject(e))),r.promise}upload(){let e=0;for(;this._queue.length;){const t=performance.now(),r=this._queue.shift();if(r){if((0,n.pC)(r.options.signal)&&r.options.signal.aborted)continue;switch(r.type){case"chunk":this._uploadChunk(r);break;case"no-chunk":this._uploadNoChunk(r)}const s=performance.now()-t;if(e+=s,e+s>=q.nb)break}}this._queue.length&&this._refreshable.requestRender()}_uploadChunk(e){const{request:t,resolver:r,chunkOffset:s,chunkIsLast:i,destHeight:a}=e,{data:o,texture:h,width:l}=t;(0,n.pC)(o)&&(h.updateData(0,0,s,l,a,o,s),i&&r.resolve())}_uploadNoChunk(e){const{request:t,resolver:r}=e,{data:s,texture:i}=t;i.setData(s),r.resolve()}}var X=r(90995),K=r(91516),Y=r(96500),Z=r(48148),Q=r(72649),$=r(85390),J=r(70536);const ee=(0,Y.f)(-.5,-.5);class te{constructor(){this._centerNdc=(0,Q.c)(),this._pxToNdc=(0,Q.c)(),this._worldDimensionsPx=(0,Q.c)(),this._mat3=(0,h.c)(),this._initialized=!1}dispose(){this._program=(0,n.M2)(this._program),this._quad=(0,n.M2)(this._quad)}render(e,t){const{context:r}=e;return!!this._updateGeometry(e,t)&&(this._initialized||this._initialize(r),r.setDepthWriteEnabled(!1),r.setDepthTestEnabled(!1),r.setColorMask(!1,!1,!1,!1),r.setBlendingEnabled(!1),r.setStencilOp(N.xS.KEEP,N.xS.KEEP,N.xS.REPLACE),r.setStencilFunction(N.wb.ALWAYS,1,255),r.setStencilTestEnabled(!0),r.useProgram(this._program),this._program.setUniformMatrix3fv("u_worldExtent",this._mat3),this._quad.draw(),this._quad.unbind(),!0)}_initialize(e){if(this._initialized)return;const t=(0,I.H)(e,J.H);t&&(this._program=t,this._quad=new $.Z(e,[0,0,1,0,0,1,1,1]),this._initialized=!0)}_updateGeometry(e,t){const{state:r,pixelRatio:s}=e,{size:i,rotation:a}=r,n=Math.round(i[0]*s),o=Math.round(i[1]*s);if(!r.spatialReference.isWrappable)return!1;const h=(0,X.t)(a),l=Math.abs(Math.cos(h)),d=Math.abs(Math.sin(h)),u=Math.round(n*l+o*d),c=Math.round(r.worldScreenWidth);if(u<=c)return!1;const _=n*d+o*l,p=c*s,f=(t.left-t.right)*s/n,g=(t.bottom-t.top)*s/o;(0,Z.s)(this._worldDimensionsPx,p,_,1),(0,Z.s)(this._pxToNdc,2/n,-2/o,1),(0,Z.s)(this._centerNdc,f,g,1);const m=this._mat3;return(0,K.j)(m,this._centerNdc),(0,K.d)(m,m,this._pxToNdc),0!==a&&(0,K.r)(m,m,h),(0,K.d)(m,m,this._worldDimensionsPx),(0,K.h)(m,m,ee),!0}}var re=r(80389);class se extends re.Q{constructor(){super(...arguments),this.defines=[],this._desc={vsPath:"fx/integrate",fsPath:"fx/integrate",attributes:new Map([["a_position",0]])}}dispose(){this._quad&&this._quad.dispose()}bind(){}unbind(){}draw(e,t){if(!t?.size)return;const{context:r,renderingOptions:s}=e;this._quad||(this._quad=new $.Z(r,[0,0,1,0,0,1,1,1]));const i=r.getBoundFramebufferObject(),{x:a,y:o,width:h,height:l}=r.getViewport();t.bindTextures(r);const d=t.getBlock(q.xl);if((0,n.Wi)(d))return;const u=d.getFBO(r),c=d.getFBO(r,1);r.setViewport(0,0,t.size,t.size),this._computeDelta(e,c,s.labelsAnimationTime),this._updateAnimationState(e,c,u),r.bindFramebuffer(i),r.setViewport(a,o,h,l)}_computeDelta(e,t,r){const{context:s,painter:i,displayLevel:a}=e,n=i.materialManager.getProgram(this._desc,["delta"]);s.bindFramebuffer(t),s.setClearColor(0,0,0,0),s.clear(s.gl.COLOR_BUFFER_BIT),s.useProgram(n),n.setUniform1i("u_maskTexture",q.iJ),n.setUniform1i("u_sourceTexture",q.nM),n.setUniform1f("u_timeDelta",e.deltaTime),n.setUniform1f("u_animationTime",r),n.setUniform1f("u_zoomLevel",Math.round(10*a)),this._quad.draw()}_updateAnimationState(e,t,r){const{context:s,painter:i}=e,a=i.materialManager.getProgram(this._desc,["update"]);s.bindTexture(t.colorTexture,1),s.useProgram(a),a.setUniform1i("u_sourceTexture",1),s.bindFramebuffer(r),s.setClearColor(0,0,0,0),s.clear(s.gl.COLOR_BUFFER_BIT),this._quad.draw()}}var ie=r(18722);class ae extends re.Q{constructor(e){super(),this.name=this.constructor.name,this.defines=[e]}dispose(){}bind({context:e,painter:t}){this._prev=e.getBoundFramebufferObject();const{width:r,height:s}=e.getViewport(),i=t.getFbos(r,s).effect0;
1e.bindFramebuffer(i),e.setColorMask(!0,!0,!0,!0),e.setClearColor(0,0,0,0),e.clear(e.gl.COLOR_BUFFER_BIT)}unbind(){}draw(e,t){const{context:r,painter:s}=e,i=s.getPostProcessingEffects(t),a=r.getBoundFramebufferObject();for(const{postProcessingEffect:t,effect:r}of i)t.draw(e,a,r);r.bindFramebuffer(this._prev),r.setStencilTestEnabled(!1),s.blitTexture(r,a.colorTexture,N.cw.NEAREST),r.setStencilTestEnabled(!0)}}var ne=r(19973),oe=r(94698),he=r(54175);class le{constructor(){this._width=void 0,this._height=void 0,this._resources=null}dispose(){this._resources&&(this._resources.quadGeometry.dispose(),this._resources.quadVAO.dispose(),this._resources.highlightProgram.dispose(),this._resources.blurProgram.dispose(),this._resources=null)}preBlur(e,t){e.bindTexture(t,q.QU),e.useProgram(this._resources.blurProgram),this._resources.blurProgram.setUniform4fv("u_direction",[1,0,1/this._width,0]),this._resources.blurProgram.setUniformMatrix4fv("u_channelSelector",ne.n5),e.bindVAO(this._resources.quadVAO),e.drawArrays(N.MX.TRIANGLE_STRIP,0,4),e.bindVAO()}finalBlur(e,t){e.bindTexture(t,q.QU),e.useProgram(this._resources.blurProgram),this._resources.blurProgram.setUniform4fv("u_direction",[0,1,0,1/this._height]),this._resources.blurProgram.setUniformMatrix4fv("u_channelSelector",ne.QU),e.bindVAO(this._resources.quadVAO),e.drawArrays(N.MX.TRIANGLE_STRIP,0,4),e.bindVAO()}renderHighlight(e,t,r){e.bindTexture(t,q.QU),e.useProgram(this._resources.highlightProgram),r.applyHighlightOptions(e,this._resources.highlightProgram),e.bindVAO(this._resources.quadVAO),e.setBlendingEnabled(!0),e.setBlendFunction(N.zi.ONE,N.zi.ONE_MINUS_SRC_ALPHA),e.drawArrays(N.MX.TRIANGLE_STRIP,0,4),e.bindVAO()}_initialize(e,t,r){this._width=t,this._height=r;const s=C.f.createVertex(e,N.l1.STATIC_DRAW,new Int8Array([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]).buffer),i=new D.U(e,new Map([["a_position",0],["a_texcoord",1]]),{geometry:[new he.G("a_position",2,N.g.BYTE,0,4),new he.G("a_texcoord",2,N.g.UNSIGNED_BYTE,2,4)]},{geometry:s}),a=(0,I.H)(e,oe.C),n=(0,I.H)(e,oe.y);e.useProgram(a),a.setUniform1i("u_texture",q.QU),a.setUniform1i("u_shade",q.Jw),a.setUniform1f("u_sigma",ne.tM),e.useProgram(n),n.setUniform1i("u_texture",q.QU),n.setUniform1f("u_sigma",ne.tM),this._resources={quadGeometry:s,quadVAO:i,highlightProgram:a,blurProgram:n}}setup(e,t,r){this._resources?(this._width=t,this._height=r):this._initialize(e,t,r)}}var de=r(62187),ue=r(5210);function ce(e,t,r){const s=new ue.x(e,{target:N.No.TEXTURE_2D,pixelFormat:N.VI.RGBA,dataType:N.Br.UNSIGNED_BYTE,wrapMode:N.e8.CLAMP_TO_EDGE,width:t,height:r,samplingMode:N.cw.LINEAR});return[s,new de.X(e,{colorTarget:N.Lm.TEXTURE,depthStencilTarget:N.OU.STENCIL_RENDER_BUFFER},s)]}class _e{constructor(){this._width=void 0,this._height=void 0,this._resources=null}dispose(){this._resources&&(this._resources.sharedBlur1Tex.dispose(),this._resources.sharedBlur1Fbo.dispose(),this._resources.sharedBlur2Tex.dispose(),this._resources.sharedBlur2Fbo.dispose(),this._resources=(0,n.wN)(this._resources))}_initialize(e,t,r){this._width=t,this._height=r;const[s,i]=ce(e,t,r),[a,n]=ce(e,t,r);this._resources={sharedBlur1Tex:s,sharedBlur1Fbo:i,sharedBlur2Tex:a,sharedBlur2Fbo:n}}setup(e,t,r){!this._resources||this._width===t&&this._height===r||this.dispose(),this._resources||this._initialize(e,t,r)}get sharedBlur1Tex(){return this._resources.sharedBlur1Tex}get sharedBlur1Fbo(){return this._resources.sharedBlur1Fbo}get sharedBlur2Tex(){return this._resources.sharedBlur2Tex}get sharedBlur2Fbo(){return this._resources.sharedBlur2Fbo}}class pe extends re.Q{constructor(){super(...arguments),this.defines=["highlight"],this._hlRenderer=new le,this._width=void 0,this._height=void 0,this._boundFBO=null,this._hlSurfaces=new _e,this._adjustedWidth=void 0,this._adjustedHeight=void 0,this._blitRenderer=new L}dispose(){this._hlSurfaces?.dispose(),this._hlRenderer?.dispose(),this._boundFBO=null}bind(e){const{context:t,painter:r}=e,{width:s,height:i}=t.getViewport(),a=r.getFbos(s,i).effect0;this.setup(e,s,i),t.bindFramebuffer(a),t.setColorMask(!0,!0,!0,!0),t.setClearColor(0,0,0,0),t.clear(t.gl.COLOR_BUFFER_BIT)}unbind(){}setup({context:e},t,r){this._width=t,this._height=r;const s=t%4,i=r%4;t+=s<2?-s:4-s,r+=i<2?-i:4-i,this._adjustedWidth=t,this._adjustedHeight=r,this._boundFBO=e.getBoundFramebufferObject();const a=Math.round(1*t),n=Math.round(1*r);this._hlRenderer.setup(e,a,n),this._hlSurfaces.setup(e,a,n)}draw(e){const{context:t,highlightGradient:r}=e;if(!r)return;const s=t.getBoundFramebufferObject();t.setViewport(0,0,1*this._adjustedWidth,1*this._adjustedHeight),t.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo),t.setStencilTestEnabled(!1),t.setClearColor(0,0,0,0),t.clear(t.gl.COLOR_BUFFER_BIT),this._blitRenderer.render(t,s.colorTexture,N.cw.NEAREST,1),t.setStencilTestEnabled(!1),t.setBlendingEnabled(!1),t.setColorMask(!1,!1,!1,!0),t.bindFramebuffer(this._hlSurfaces.sharedBlur2Fbo),t.setClearColor(0,0,0,0),t.clear(t.gl.COLOR_BUFFER_BIT),this._hlRenderer.preBlur(t,this._hlSurfaces.sharedBlur1Tex),t.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo),t.setClearColor(0,0,0,0),t.clear(t.gl.COLOR_BUFFER_BIT),this._hlRenderer.f
1inalBlur(t,this._hlSurfaces.sharedBlur2Tex),t.bindFramebuffer(this._boundFBO),t.setBlendingEnabled(!0),t.setColorMask(!0,!0,!0,!0),t.setViewport(0,0,this._width,this._height),this._hlRenderer.renderHighlight(t,this._hlSurfaces.sharedBlur1Tex,r),this._boundFBO=null}}class fe extends re.Q{constructor(){super(...arguments),this.name=this.constructor.name,this.defines=["hittest"]}dispose(){(0,n.pC)(this._fbo)&&this._fbo.dispose()}createOptions({pixelRatio:e},t,r=q.dn){if(!t.length)return null;const s=t.shift(),i=s.x,a=s.y;return this._outstanding=s,{type:"hittest",distance:r*e,position:[i,a]}}bind(e){const{context:t,attributeView:r}=e;if(!r.size)return;const s=r.getBlock(q.pU);if((0,n.Wi)(s))return;const i=s.getFBO(t);t.setViewport(0,0,r.size,r.size),t.bindFramebuffer(i),t.setColorMask(!0,!0,!0,!0),t.setClearColor(0,0,0,0),t.clear(t.gl.COLOR_BUFFER_BIT|t.gl.DEPTH_BUFFER_BIT)}unbind(e){}draw(e){if((0,n.Wi)(this._outstanding))return;const t=this._outstanding;this._outstanding=null,this._resolve(e,t.resolvers)}async _resolve(e,t){const{context:r,attributeView:s}=e,i=s.getBlock(q.pU);if((0,n.Wi)(i))return void t.forEach((e=>e.resolve([])));const a=i.getFBO(r),o=new Uint8Array(a.width*a.height*4);try{await a.readPixelsAsync(0,0,a.width,a.height,N.VI.RGBA,N.Br.UNSIGNED_BYTE,o)}catch(e){return void t.forEach((e=>e.resolve([])))}const h=[];for(let e=0;e<o.length;e+=4){const t=o[e],r=o[e+3];t&&h.push({id:e/4,directHits:r})}h.sort(((e,t)=>t.directHits===e.directHits?t.id-e.id:t.directHits-e.directHits));const l=h.map((e=>e.id));t.forEach((e=>e.resolve(l)))}}class ge extends re.Q{constructor(){super(...arguments),this.name=this.constructor.name,this.defines=["id"],this._lastSize=0,this._boundFBO=null}dispose(){(0,n.pC)(this._fbo)&&this._fbo.dispose()}bind({context:e,painter:t}){const{width:r,height:s}=e.getViewport();this._boundFBO=e.getBoundFramebufferObject();const i=t.getFbos(r,s).effect0;e.bindFramebuffer(i),e.setColorMask(!0,!0,!0,!0),e.setClearColor(0,0,0,0),e.clear(e.gl.COLOR_BUFFER_BIT)}unbind({context:e}){e.bindFramebuffer(this._boundFBO),this._boundFBO=null}draw(e,t,r=2*q.dn){this._resolve(e,t,r)}async _resolve({context:e,state:t,pixelRatio:r},s,i){const a=e.getBoundFramebufferObject(),n=t.size[1]*r,o=Math.round(i*r),h=o/2,l=o/2;this._ensureBuffer(o),s.forEach((async(e,t)=>{const i=new Map,d=Math.floor(t.x*r-o/2),u=Math.floor(n-t.y*r-o/2);await a.readPixelsAsync(d,u,o,o,N.VI.RGBA,N.Br.UNSIGNED_BYTE,this._buf);for(let e=0;e<this._buf32.length;e++){const t=this._buf32[e];if(4294967295!==t&&0!==t){const r=e%o,s=o-Math.floor(e/o),a=(h-r)*(h-r)+(l-s)*(l-s),n=i.has(t)?i.get(t):4294967295;i.set(t,Math.min(a,n))}}const c=Array.from(i).sort(((e,t)=>e[1]-t[1])).map((e=>e[0]));e.resolve(c),s.delete(t)}))}_ensureBuffer(e){this._lastSize!==e&&(this._lastSize=e,this._buf=new Uint8Array(4*e*e),this._buf32=new Uint32Array(this._buf.buffer))}}const me=[1,0],be=[0,1],Te=[1,.8,.6,.4,.2],we=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];class Ee{constructor(){this._intensityFBO=null,this._compositeFBO=null,this._mipsFBOs=new Array(5),this._nMips=5,this._kernelSizeArray=[3,5,7,9,11],this._size=[0,0],this._programDesc={luminosityHighPass:{vsPath:"post-processing/pp",fsPath:"post-processing/bloom/luminosityHighPass",attributes:new Map([["a_position",0]])},gaussianBlur:{vsPath:"post-processing/pp",fsPath:"post-processing/bloom/gaussianBlur",attributes:new Map([["a_position",0]])},composite:{vsPath:"post-processing/pp",fsPath:"post-processing/bloom/composite",attributes:new Map([["a_position",0]])},blit:{vsPath:"post-processing/pp",fsPath:"post-processing/blit",attributes:new Map([["a_position",0]])}}}dispose(){if(this._quad=(0,n.M2)(this._quad),this._intensityFBO=(0,n.M2)(this._intensityFBO),this._compositeFBO=(0,n.M2)(this._compositeFBO),this._mipsFBOs){for(let e=0;e<this._nMips;e++)this._mipsFBOs[e]&&(this._mipsFBOs[e].horizontal.dispose(),this._mipsFBOs[e].vertical.dispose());this._mipsFBOs=null}}draw(e,t,r){const{width:s,height:i}=t,{context:a,painter:n}=e,{materialManager:o}=n,h=a.gl,l=this._programDesc,{strength:d,radius:u,threshold:c}=r;this._quad||(this._quad=new $.Z(a,[-1,-1,1,-1,-1,1,1,1])),this._createOrResizeResources(e,s,i),a.setStencilTestEnabled(!1),a.setBlendingEnabled(!0),a.setBlendFunction(N.zi.ONE,N.zi.ONE_MINUS_SRC_ALPHA),a.setStencilWriteMask(0);const _=this._quad;_.bind(),a.bindFramebuffer(this._intensityFBO);const p=o.getProgram(l.luminosityHighPass);a.useProgram(p),a.bindTexture(t.colorTexture,0),p.setUniform1i("u_texture",0),p.setUniform3fv("u_defaultColor",[0,0,0]),p.setUniform1f("u_defaultOpacity",0),p.setUniform1f("u_luminosityThreshold",c),p.setUniform1f("u_smoothWidth",.01);const f=[Math.round(s/2),Math.round(i/2)];a.setViewport(0,0,f[0],f[1]),a.setClearColor(0,0,0,0),a.clear(h.COLOR_BUFFER_BIT),_.draw(),a.setBlendingEnabled(!1);let g=this._intensityFBO.colorTexture;for(let e=0;e<this._nMips;e++){const t=o.getProgram(l.gaussianBlur,[{name:"radius",value:this._kernelSizeArray[e]}]);a.useProgram(t),a.bindTexture(g,e+1),t.setUniform1i("u_colorTexture",e+1),t.setUniform2fv("u_texSize",f),t.setUniform2fv("u_direction",me),a.setViewport(0,0,f[0],f[1]);const r=this._mipsFBOs[e];a.bindFramebuffer(r.horizontal),_.draw(),g=r.horizontal.colorTexture,a.bindFramebuffer(r.vertical),a.bindTexture(g,e+1),t.setUniform2fv("u_direction",be),_.draw(),g=r.vertical.colorTexture,f[0]=Math.round(f[0]/2),f[1]=Math.round(f[1]/2)}
1a.setViewport(0,0,s,i);const m=o.getProgram(l.composite,[{name:"nummips",value:5}]);a.bindFramebuffer(this._compositeFBO),a.useProgram(m),m.setUniform1f("u_bloomStrength",d),m.setUniform1f("u_bloomRadius",u),m.setUniform1fv("u_bloomFactors",Te),m.setUniform3fv("u_bloomTintColors",we),a.bindTexture(this._mipsFBOs[0].vertical.colorTexture,1),m.setUniform1i("u_blurTexture1",1),a.bindTexture(this._mipsFBOs[1].vertical.colorTexture,2),m.setUniform1i("u_blurTexture2",2),a.bindTexture(this._mipsFBOs[2].vertical.colorTexture,3),m.setUniform1i("u_blurTexture3",3),a.bindTexture(this._mipsFBOs[3].vertical.colorTexture,4),m.setUniform1i("u_blurTexture4",4),a.bindTexture(this._mipsFBOs[4].vertical.colorTexture,5),m.setUniform1i("u_blurTexture5",5),_.draw(),a.bindFramebuffer(t),a.setBlendingEnabled(!0);const b=o.getProgram(l.blit);a.useProgram(b),a.bindTexture(this._compositeFBO.colorTexture,6),b.setUniform1i("u_texture",6),a.setBlendFunction(N.zi.ONE,N.zi.ONE),_.draw(),_.unbind(),a.setBlendFunction(N.zi.ONE,N.zi.ONE_MINUS_SRC_ALPHA),a.setStencilTestEnabled(!0)}_createOrResizeResources(e,t,r){const{context:s}=e;if(this._compositeFBO&&this._size[0]===t&&this._size[1]===r)return;this._size[0]=t,this._size[1]=r;const i=[Math.round(t/2),Math.round(r/2)];this._compositeFBO?this._compositeFBO.resize(t,r):this._compositeFBO=new de.X(s,{colorTarget:N.Lm.TEXTURE,depthStencilTarget:N.OU.NONE,width:t,height:r}),this._intensityFBO?this._intensityFBO.resize(i[0],i[1]):this._intensityFBO=new de.X(s,{colorTarget:N.Lm.TEXTURE,depthStencilTarget:N.OU.NONE,width:i[0],height:i[1]},{target:N.No.TEXTURE_2D,pixelFormat:N.VI.RGBA,internalFormat:N.VI.RGBA,dataType:N.Br.UNSIGNED_BYTE,wrapMode:N.e8.CLAMP_TO_EDGE,samplingMode:N.cw.LINEAR,flipped:!1,width:i[0],height:i[1]});for(let e=0;e<this._nMips;e++)this._mipsFBOs[e]?(this._mipsFBOs[e].horizontal.resize(i[0],i[1]),this._mipsFBOs[e].vertical.resize(i[0],i[1])):this._mipsFBOs[e]={horizontal:new de.X(s,{colorTarget:N.Lm.TEXTURE,depthStencilTarget:N.OU.NONE,width:i[0],height:i[1]},{target:N.No.TEXTURE_2D,pixelFormat:N.VI.RGBA,internalFormat:N.VI.RGBA,dataType:N.Br.UNSIGNED_BYTE,wrapMode:N.e8.CLAMP_TO_EDGE,samplingMode:N.cw.LINEAR,flipped:!1,width:i[0],height:i[1]}),vertical:new de.X(s,{colorTarget:N.Lm.TEXTURE,depthStencilTarget:N.OU.NONE,width:i[0],height:i[1]},{target:N.No.TEXTURE_2D,pixelFormat:N.VI.RGBA,internalFormat:N.VI.RGBA,dataType:N.Br.UNSIGNED_BYTE,wrapMode:N.e8.CLAMP_TO_EDGE,samplingMode:N.cw.LINEAR,flipped:!1,width:i[0],height:i[1]})},i[0]=Math.round(i[0]/2),i[1]=Math.round(i[1]/2)}}const Be=[1,0],xe=[0,1];class Oe{constructor(){this._blurFBO=null,this._size=[0,0],this._programDesc={gaussianBlur:{vsPath:"post-processing/pp",fsPath:"post-processing/blur/gaussianBlur",attributes:new Map([["a_position",0]])},radialBlur:{vsPath:"post-processing/pp",fsPath:"post-processing/blur/radial-blur",attributes:new Map([["a_position",0]])},blit:{vsPath:"post-processing/pp",fsPath:"post-processing/blit",attributes:new Map([["a_position",0]])}}}dispose(){this._blurFBO&&(this._blurFBO.dispose(),this._blurFBO=null)}draw(e,t,r){const{context:s}=e,{type:i,radius:a}=r;if(0===a)return;this._createOrResizeResources(e),this._quad||(this._quad=new $.Z(s,[-1,-1,1,-1,-1,1,1,1]));const n=this._quad;n.bind(),"blur"===i?this._gaussianBlur(e,t,a):this._radialBlur(e,t),n.unbind()}_gaussianBlur(e,t,r){const{context:s,state:i,painter:a,pixelRatio:n}=e,{size:o}=i,{materialManager:h}=a,l=this._programDesc,d=this._quad,u=[Math.round(n*o[0]),Math.round(n*o[1])],c=this._blurFBO,_=h.getProgram(l.gaussianBlur,[{name:"radius",value:Math.ceil(r)}]);s.useProgram(_),s.setBlendingEnabled(!1),s.bindFramebuffer(c),s.bindTexture(t.colorTexture,4),_.setUniform1i("u_colorTexture",4),_.setUniform2fv("u_texSize",u),_.setUniform2fv("u_direction",Be),_.setUniform1f("u_sigma",r),d.draw(),s.bindFramebuffer(t),s.setStencilWriteMask(0),s.setStencilTestEnabled(!1),s.setDepthWriteEnabled(!1),s.setDepthTestEnabled(!1),s.bindTexture(c?.colorTexture,5),_.setUniform1i("u_colorTexture",5),_.setUniform2fv("u_direction",xe),d.draw(),s.setBlendingEnabled(!0),s.setBlendFunction(N.zi.ONE,N.zi.ONE_MINUS_SRC_ALPHA),s.setStencilTestEnabled(!0)}_radialBlur(e,t){const{context:r,painter:s}=e,{materialManager:i}=s,a=this._programDesc,n=this._quad,o=this._blurFBO;
1r.bindFramebuffer(o);const h=i.getProgram(a.radialBlur);r.useProgram(h),r.setBlendingEnabled(!1),r.bindTexture(t.colorTexture,4),h.setUniform1i("u_colorTexture",4),n.draw(),r.bindFramebuffer(t),r.setStencilWriteMask(0),r.setStencilTestEnabled(!1),r.setDepthWriteEnabled(!1),r.setDepthTestEnabled(!1),r.setBlendingEnabled(!0);const l=i.getProgram(a.blit);r.useProgram(l),r.bindTexture(o?.colorTexture,5),l.setUniform1i("u_texture",5),r.setBlendFunction(N.zi.ONE,N.zi.ONE_MINUS_SRC_ALPHA),n.draw()}_createOrResizeResources(e){const{context:t,state:r,pixelRatio:s}=e,{size:i}=r,a=Math.round(s*i[0]),n=Math.round(s*i[1]);this._blurFBO&&this._size[0]===a&&this._size[1]===n||(this._size[0]=a,this._size[1]=n,this._blurFBO?this._blurFBO.resize(a,n):this._blurFBO=new de.X(t,{colorTarget:N.Lm.TEXTURE,depthStencilTarget:N.OU.NONE,width:a,height:n},{target:N.No.TEXTURE_2D,pixelFormat:N.VI.RGBA,internalFormat:N.VI.RGBA,dataType:N.Br.UNSIGNED_BYTE,wrapMode:N.e8.CLAMP_TO_EDGE,samplingMode:N.cw.LINEAR,flipped:!1,width:a,height:n}))}}class Re{constructor(){this._layerFBOTexture=null,this._size=[0,0],this._programDesc={vsPath:"post-processing/pp",fsPath:"post-processing/filterEffect",attributes:new Map([["a_position",0]])}}dispose(){this._layerFBOTexture=(0,n.M2)(this._layerFBOTexture)}draw(e,t,r){const{width:s,height:i}=t;this._createOrResizeResources(e,s,i);const{context:a,painter:n}=e,{materialManager:o}=n,h=this._programDesc,l=this._quad,d=r.colorMatrix;l.bind();const u=this._layerFBOTexture;a.bindFramebuffer(t),t.copyToTexture(0,0,s,i,0,0,u),a.setBlendingEnabled(!1),a.setStencilTestEnabled(!1);const c=o.getProgram(h);a.useProgram(c),a.bindTexture(u,2),c.setUniformMatrix4fv("u_coefficients",d),c.setUniform1i("u_colorTexture",2),l.draw(),a.setBlendingEnabled(!0),a.setBlendFunction(N.zi.ONE,N.zi.ONE_MINUS_SRC_ALPHA),a.setStencilTestEnabled(!0),l.unbind()}_createOrResizeResources(e,t,r){const{context:s}=e;this._layerFBOTexture&&this._size[0]===t&&this._size[1]===r||(this._size[0]=t,this._size[1]=r,this._layerFBOTexture?this._layerFBOTexture.resize(t,r):this._layerFBOTexture=new ue.x(s,{target:N.No.TEXTURE_2D,pixelFormat:N.VI.RGBA,internalFormat:N.VI.RGBA,dataType:N.Br.UNSIGNED_BYTE,wrapMode:N.e8.CLAMP_TO_EDGE,samplingMode:N.cw.LINEAR,flipped:!1,width:t,height:r}),this._quad||(this._quad=new $.Z(s,[-1,-1,1,-1,-1,1,1,1])))}}var Fe=r(97265);const ye=[1,0],Me=[0,1];class Ue{constructor(){this._layerFBOTexture=null,this._horizontalBlurFBO=null,this._verticalBlurFBO=null,this._size=[0,0],this._quad=null,this._programDesc={blur:{vsPath:"post-processing/pp",fsPath:"post-processing/blur/gaussianBlur",attributes:new Map([["a_position",0]])},composite:{vsPath:"post-processing/pp",fsPath:"post-processing/drop-shadow/composite",attributes:new Map([["a_position",0]])},blit:{vsPath:"post-processing/pp",fsPath:"post-processing/blit",attributes:new Map([["a_position",0]])}}}dispose(){this._layerFBOTexture=(0,n.M2)(this._layerFBOTexture),this._horizontalBlurFBO=(0,n.M2)(this._horizontalBlurFBO),this._verticalBlurFBO=(0,n.M2)(this._verticalBlurFBO)}draw(e,t,r){const{context:s,state:i,painter:a}=e,{materialManager:n}=a,o=this._programDesc,h=t.width,l=t.height,d=[Math.round(h),Math.round(l)],{blurRadius:u,offsetX:c,offsetY:_,color:p}=r,f=[(0,Fe.F2)(c),(0,Fe.F2)(_)];this._createOrResizeResources(e,h,l,d);const g=this._horizontalBlurFBO,m=this._verticalBlurFBO;s.setStencilWriteMask(0),s.setStencilTestEnabled(!1),s.setDepthWriteEnabled(!1),s.setDepthTestEnabled(!1);const b=this._layerFBOTexture;t.copyToTexture(0,0,h,l,0,0,b),this._quad||(this._quad=new $.Z(s,[-1,-1,1,-1,-1,1,1,1])),s.setViewport(0,0,d[0],d[1]);const T=this._quad;T.bind(),s.setBlendingEnabled(!1);const w=n.getProgram(o.blur,[{name:"radius",value:Math.ceil(u)}]);s.useProgram(w),s.bindFramebuffer(g),s.bindTexture(t.colorTexture,4),w.setUniform1i("u_colorTexture",4),w.setUniform2fv("u_texSize",d),w.setUniform2fv("u_direction",ye),w.setUniform1f("u_sigma",u),T.draw(),s.bindFramebuffer(m),s.bindTexture(g?.colorTexture,5),w.setUniform1i("u_colorTexture",5),w.setUniform2fv("u_direction",Me),T.draw(),s.bindFramebuffer(t),s.setVie
1wport(0,0,h,l);const E=n.getProgram(o.composite);s.useProgram(E),s.bindTexture(m?.colorTexture,2),E.setUniform1i("u_blurTexture",2),s.bindTexture(b,3),E.setUniform1i("u_layerFBOTexture",3),E.setUniform4fv("u_shadowColor",[p[3]*(p[0]/255),p[3]*(p[1]/255),p[3]*(p[2]/255),p[3]]),E.setUniformMatrix3fv("u_displayViewMat3",i.displayMat3),E.setUniform2fv("u_shadowOffset",f),T.draw(),s.setBlendingEnabled(!0),s.setStencilTestEnabled(!0),s.setBlendFunction(N.zi.ONE,N.zi.ONE_MINUS_SRC_ALPHA),T.unbind()}_createOrResizeResources(e,t,r,s){const{context:i}=e;this._horizontalBlurFBO&&this._size[0]===t&&this._size[1]===r||(this._size[0]=t,this._size[1]=r,this._horizontalBlurFBO?this._horizontalBlurFBO.resize(s[0],s[1]):this._horizontalBlurFBO=new de.X(i,{colorTarget:N.Lm.TEXTURE,depthStencilTarget:N.OU.NONE,width:s[0],height:s[1]},{target:N.No.TEXTURE_2D,pixelFormat:N.VI.RGBA,internalFormat:N.VI.RGBA,dataType:N.Br.UNSIGNED_BYTE,wrapMode:N.e8.CLAMP_TO_EDGE,samplingMode:N.cw.LINEAR,flipped:!1,width:s[0],height:s[1]}),this._verticalBlurFBO?this._verticalBlurFBO.resize(s[0],s[1]):this._verticalBlurFBO=new de.X(i,{colorTarget:N.Lm.TEXTURE,depthStencilTarget:N.OU.NONE,width:s[0],height:s[1]},{target:N.No.TEXTURE_2D,pixelFormat:N.VI.RGBA,internalFormat:N.VI.RGBA,dataType:N.Br.UNSIGNED_BYTE,wrapMode:N.e8.CLAMP_TO_EDGE,samplingMode:N.cw.LINEAR,flipped:!1,width:s[0],height:s[1]}),this._layerFBOTexture?this._layerFBOTexture.resize(t,r):this._layerFBOTexture=new ue.x(i,{target:N.No.TEXTURE_2D,pixelFormat:N.VI.RGBA,internalFormat:N.VI.RGBA,dataType:N.Br.UNSIGNED_BYTE,wrapMode:N.e8.CLAMP_TO_EDGE,samplingMode:N.cw.LINEAR,flipped:!1,width:t,height:r}))}}class Pe{constructor(){this._size=[0,0],this._layerFBOTexture=null}dispose(){this._layerFBOTexture=(0,n.M2)(this._layerFBOTexture)}draw(e,t,r){const{width:s,height:i}=t;this._createOrResizeResources(e,s,i);const{context:a,painter:n}=e,{amount:o}=r,h=a.gl,l=this._layerFBOTexture;a.bindFramebuffer(t),t.copyToTexture(0,0,s,i,0,0,l),a.setBlendingEnabled(!0),a.setStencilTestEnabled(!1),a.setDepthTestEnabled(!1),a.setClearColor(0,0,0,0),a.clear(h.COLOR_BUFFER_BIT),n.blitTexture(a,l,N.cw.NEAREST,o)}_createOrResizeResources(e,t,r){const{context:s}=e;this._layerFBOTexture&&this._size[0]===t&&this._size[1]===r||(this._size[0]=t,this._size[1]=r,this._layerFBOTexture?this._layerFBOTexture.resize(t,r):this._layerFBOTexture=new ue.x(s,{target:N.No.TEXTURE_2D,pixelFormat:N.VI.RGBA,internalFormat:N.VI.RGBA,dataType:N.Br.UNSIGNED_BYTE,wrapMode:N.e8.CLAMP_TO_EDGE,samplingMode:N.cw.NEAREST,flipped:!1,width:t,height:r}))}}function ve(e){switch(e){case"bloom":case"blur":case"opacity":case"drop-shadow":return e;default:return"colorize"}}const Se={colorize:()=>new Re,blur:()=>new Oe,bloom:()=>new Ee,opacity:()=>new Pe,"drop-shadow":()=>new Ue};class Ae{constructor(){this._effectMap=new Map}dispose(){this._effectMap.forEach((e=>e.dispose())),this._effectMap.clear()}getPostProcessingEffects(e){if(!e||0===e.length)return[];const t=[];for(const r of e){const e=ve(r.type);let s=this._effectMap.get(e);s||(s=Se[e](),this._effectMap.set(e,s)),t.push({postProcessingEffect:s,effect:r})}return t}}var Ce=r(53445);class Ne{constructor(e,t){this.brushes=e,this.name=t.name,this.drawPhase=t.drawPhase||c.jx.MAP,this._targetFn=t.target,this.effects=t.effects||[],this.enableDefaultDraw=t.enableDefaultDraw??(()=>!0)}render(e){const{context:t,profiler:r}=e,s=this._targetFn(),i=this.drawPhase&e.drawPhase;if(r.recordPassStart(this.name),i){this.enableDefaultDraw()&&this._doRender(e,s),r.recordPassEnd();for(const r of this.effects){if(!r.enable())continue;const i=r.apply,a=r.args&&r.args(),n=t.getViewport(),o=t.getBoundFramebufferObject(),h=e.passOptions;this._bindEffect(e,i,a),this._doRender(e,s,i.defines),this._drawAndUnbindEffect(e,i,n,o,h,a)}}}_doRender(e,t,r){if((0,n.Wi)(t))return;const{profiler:s,context:i}=e;for(const a of this.brushes){if(s.recordBrushStart(a.name),(0,n.pC)(a.brushEffect)){const s=i.getViewport(),n=i.getBoundFramebufferObject(),o=e.passOptions;this._bindEffect(e,a.brushEffect),this._drawWithBrush(a,e,t,r),this._drawAndUnbindEffect(e,a.brushEffect,s,n,o)}else this._drawWithBrush(a,e,t,r);s.recordBrushEnd()}}_drawWithBrush(e,t,r,s){(0,Ce.zG)(r)?(e.prepareState(t,s),e.drawMany(t,r,s)):r.visible&&(e.prepareState(t,s),e.draw(t,r,s))}_bindEffect(e,t,r){const{profiler:s}=e;s.recordPassStart(this.name+"."+t.name),t.bind(e,r);const i=t.createOptions(e,r);e.passOptions=i}_drawAndUnbindEffect(e,t,r,s,i,a){const{profiler:n,context:o}=e;e.passOptions=i,n.recordBrushStart(t.name),t.draw(e,a),t.unbind(e,a),o.bindFramebuffer(s);const{x:h,y:l,width:d,height:u}=r;o.setViewport(h,l,d,u),n.recordBrushEnd(),n.recordPassEnd()}}var Ie=r(47178);class De{constructor(e,t,r){this.context=e,this._blitRenderer=new L,this._worldExtentClipRenderer=new te,this._isCl
1ippedToWorldExtent=!1,this._brushCache=new Map,this._lastWidth=null,this._lastHeight=null,this._prevFBO=null,this._vtlMaterialManager=new v,this._blendEffect=new ie.k,this._stencilBuf=null,this._fbos=null,this._fboPool=[],this._renderTarget=null,this.effects={highlight:new pe,hittest:new fe,hittestVTL:new ge,integrate:new se,insideEffect:new ae("inside"),outsideEffect:new ae("outside")},this.materialManager=new G(e),this.textureManager=new V.Z(t,r,e.type===W.zO.WEBGL2),this.textureUploadManager=new j(e,t),this._effectsManager=new Ae}get vectorTilesMaterialManager(){return this._vtlMaterialManager}getRenderTarget(){return this._renderTarget}setRenderTarget(e){this._renderTarget=e}getFbos(e,t){if(e!==this._lastWidth||t!==this._lastHeight){if(this._lastWidth=e,this._lastHeight=t,this._fbos){for(const r in this._fbos)this._fbos[r].resize(e,t);return this._fbos}const r={target:N.No.TEXTURE_2D,pixelFormat:N.VI.RGBA,dataType:N.Br.UNSIGNED_BYTE,samplingMode:N.cw.NEAREST,wrapMode:N.e8.CLAMP_TO_EDGE,width:e,height:t},s={colorTarget:N.Lm.TEXTURE,depthStencilTarget:N.OU.DEPTH_STENCIL_RENDER_BUFFER},i=new Ie.r(this.context,{width:e,height:t,internalFormat:N.Tg.DEPTH_STENCIL});this._stencilBuf=i,this._fbos={output:new de.X(this.context,s,r,i),blend:new de.X(this.context,s,r,i),effect0:new de.X(this.context,s,r,i)}}return this._fbos}acquireFbo(e,t){let r;r=this._fboPool.length>0?this._fboPool.pop():new de.X(this.context,{colorTarget:N.Lm.TEXTURE,depthStencilTarget:N.OU.DEPTH_STENCIL_RENDER_BUFFER},{target:N.No.TEXTURE_2D,pixelFormat:N.VI.RGBA,dataType:N.Br.UNSIGNED_BYTE,samplingMode:N.cw.NEAREST,wrapMode:N.e8.CLAMP_TO_EDGE,width:e,height:t},this._stencilBuf);const s=r.descriptor;return s.width===e&&s.height===t||r.resize(e,t),r}releaseFbo(e){this._fboPool.push(e)}getSharedStencilBuffer(){return this._stencilBuf}beforeRenderLayers(e,t=null){const{width:r,height:s}=e.getViewport();this._prevFBO=e.getBoundFramebufferObject();const i=this.getFbos(r,s);if(e.bindFramebuffer(i?.output),e.setColorMask(!0,!0,!0,!0),(0,n.pC)(t)){const{r:r,g:s,b:i,a:a}=t.color;e.setClearColor(a*r/255,a*s/255,a*i/255,a)}else e.setClearColor(0,0,0,0);e.setDepthWriteEnabled(!0),e.setClearDepth(1),e.clear(e.gl.COLOR_BUFFER_BIT|e.gl.DEPTH_BUFFER_BIT),e.setDepthWriteEnabled(!1)}beforeRenderLayer(e,t,r){const{context:s,blendMode:i,effects:a,requireFBO:n,drawPhase:o}=e;if(n||Le(o,i,a,r))s.bindFramebuffer(this._fbos?.blend),s.setColorMask(!0,!0,!0,!0),s.setClearColor(0,0,0,0),s.setDepthWriteEnabled(!0),s.setClearDepth(1),s.clear(s.gl.COLOR_BUFFER_BIT|s.gl.DEPTH_BUFFER_BIT),s.setDepthWriteEnabled(!1);else{const e=this._getOutputFBO();s.bindFramebuffer(e)}s.setDepthWriteEnabled(!1),s.setDepthTestEnabled(!1),s.setStencilTestEnabled(!0),s.setClearStencil(t),s.setStencilWriteMask(255),s.clear(s.gl.STENCIL_BUFFER_BIT)}compositeLayer(e,t){const{context:r,blendMode:s,effects:i,requireFBO:a,drawPhase:o}=e;if(a||Le(o,s,i,t)){(0,n.pC)(i)&&i.length>0&&o===c.jx.MAP&&this._applyEffects(e,i);const a=this._getOutputFBO();r.bindFramebuffer(a),r.setStencilTestEnabled(!1),r.setStencilWriteMask(0),r.setBlendingEnabled(!0),r.setBlendFunctionSeparate(N.zi.ONE,N.zi.ONE_MINUS_SRC_ALPHA,N.zi.ONE,N.zi.ONE_MINUS_SRC_ALPHA),r.setColorMask(!0,!0,!0,!0);const h=(0,n.Wi)(s)||o===c.jx.HIGHLIGHT?"normal":s,l=this._fbos;l?.blend.colorTexture&&this._blendEffect.draw(e,l.blend.colorTexture,N.cw.NEAREST,h,t)}}renderLayers(e){e.bindFramebuffer(this._prevFBO);const t=this._getOutputFBO();t&&(e.setDepthTestEnabled(!1),e.setStencilWriteMask(0),this._isClippedToWorldExtent?(e.setStencilTestEnabled(!0),e.setStencilFunction(N.wb.EQUAL,1,255)):e.setStencilTestEnabled(!1),this.blitTexture(e,t.colorTexture,N.cw.NEAREST))}prepareDisplay(e,t,r){const{context:s}=e;if(s.bindFramebuffer(this._prevFBO),s.setColorMask(!0,!0,!0,!0),(0,n.pC)(t)){const{r:e,g:r,b:i,a:a}=t.color;s.setClearColor(a*e/255,a*r/255,a*i/255,a)}else s.setClearColor(0,0,0,0);s.setStencilWriteMask(255),s.setClearStencil(0),s.clear(s.gl.COLOR_BUFFER_BIT|s.gl.STENCIL_BUFFER_BIT),this._isCl
1ippedToWorldExtent=this._worldExtentClipRenderer.render(e,r)}dispose(){if(this.materialManager.dispose(),this.textureManager.dispose(),this.textureUploadManager.destroy(),this._blitRenderer=(0,n.M2)(this._blitRenderer),this._worldExtentClipRenderer=(0,n.M2)(this._worldExtentClipRenderer),this._brushCache&&(this._brushCache.forEach((e=>e.dispose())),this._brushCache.clear(),this._brushCache=null),this._fbos)for(const e in this._fbos)this._fbos[e]&&this._fbos[e].dispose();for(const e of this._fboPool)e.dispose();if(this._fboPool.length=0,this.effects)for(const e in this.effects)this.effects[e]&&this.effects[e].dispose();this._effectsManager.dispose(),this._vtlMaterialManager=(0,n.M2)(this._vtlMaterialManager),this._prevFBO=null}getBrush(e,t){const r=function(e,t){switch(e){case c.LW.LINE:return _.U.line;case c.LW.TEXT:return _.U.text;case c.LW.LABEL:return _.U.label;case c.LW.FILL:return t===c.mD.DOT_DENSITY?_.U.dotDensity:_.U.fill;case c.LW.MARKER:switch(t){case c.mD.HEATMAP:return _.U.heatmap;case c.mD.PIE_CHART:return _.U.pieChart;default:return _.U.marker}}}(e,t);let s=this._brushCache.get(r);return void 0===s&&(s=new r,this._brushCache.set(r,s)),s}renderObject(e,t,r,s){const i=_.U[r];if(!i)return;let a=this._brushCache.get(i);void 0===a&&(a=new i,this._brushCache.set(i,a)),a.prepareState(e,s),a.draw(e,t,s)}renderObjects(e,t,r,s){const i=_.U[r];if(!i)return;let a=this._brushCache.get(i);void 0===a&&(a=new i,this._brushCache.set(i,a)),a.drawMany(e,t,s)}registerRenderPass(e){const t=e.brushes.map((e=>(this._brushCache.has(e)||this._brushCache.set(e,new e),this._brushCache.get(e))));return new Ne(t,e)}blitTexture(e,t,r,s=1){e.setBlendingEnabled(!0),e.setBlendFunctionSeparate(N.zi.ONE,N.zi.ONE_MINUS_SRC_ALPHA,N.zi.ONE,N.zi.ONE_MINUS_SRC_ALPHA),e.setColorMask(!0,!0,!0,!0),this._blitRenderer.render(e,t,r,s)}getPostProcessingEffects(e){return this._effectsManager.getPostProcessingEffects(e)}_getOutputFBO(){return null!=this._renderTarget?this._renderTarget:this._fbos?.output??null}_applyEffects(e,t){const r=this._fbos?.blend;if(!r)return;const{context:s}=e,i=this._effectsManager.getPostProcessingEffects(t);for(const{postProcessingEffect:t,effect:a}of i)s.bindFramebuffer(r),t.draw(e,r,a)}}function Le(e,t,r,s){return e!==c.jx.HIGHLIGHT&&(1!==s||(0,n.pC)(t)&&"normal"!==t||(0,n.pC)(r)&&r.length>0)}var ze=r(96564),ke=r(77219),Ge=r(29865),Ve=r(64534),He=r(73021);class qe extends d.W{constructor(e,t){super(),this._trash=new Set,this._renderRemainingTime=0,this._lastFrameRenderTime=0,this.renderRequested=!1,this.stage=this,this._stationary=!0;const{canvas:r=document.createElement("canvas"),alpha:h=!0,stencil:d=!0,contextOptions:c={}}=t;this._canvas=r;const _=(0,W.sj)("2d",r,{alpha:h,antialias:!1,depth:!0,stencil:d});this.context=new Ve.x((0,n.Wg)(_)??null,c),this.resourceManager=new l.Z,this.painter=new De(this.context,this,this.resourceManager),(0,a.Z)("esri-2d-profiler")&&(this._debugOutput=document.createElement("div"),this._debugOutput.setAttribute("style","margin: 24px 64px; position: absolute; color: red;"),e.appendChild(this._debugOutput));const p=()=>this._highlightGradient;this._renderParameters={drawPhase:0,state:this.state,pixelRatio:window.devicePixelRatio,stationary:!1,globalOpacity:1,blendMode:null,deltaTime:-1,time:0,inFadeTransition:!1,effects:null,context:this.context,painter:this.painter,timeline:t.timeline||new ke.T,renderingOptions:t.renderingOptions,requestRender:()=>this.requestRender(),allowDelayedRender:!1,requireFBO:!1,profiler:new ze.Q(this.context,this._debugOutput),dataUploadCounter:0,get highlightGradient(){return p()}},this._taskHandle=(0,o.A)({render:e=>this.renderFrame(e)}),this._taskHandle.pause(),this._lostWebGLContextHandle=(0,i.on)(r,"webglcontextlost",(()=>{this.emit("webgl-error",{error:new s.Z("webgl-context-lost")})})),this._bufferPool=new u.Q,r.setAttribute("style","width: 100%; height:100%; display:block;"),e.appendChild(r)}destroy(){this.removeAllChildren(),this._emptyTrash(),this._taskHandle=(0,n.hw)(this._taskHandle),this._lostWebGLContextHandle=(0,n.hw)(this._lostWebGLContextHandle),this._canvas.parentNode?.removeChild(this._canvas),this._debugOutput?.parentNode?.removeChild(this._debugOutput),this._bufferPool.destroy(),this.resourceManager.destroy(),this.painter.dispose(),this.context.dispose(),this._canvas=null}get background(){return this._background}set background(e){this._background=e,this.requestRender()}get bufferPool(){return this._bufferPool}get renderingOptions(){return this._renderingOptions}set renderingOptions(e){this._renderingOptions=e,this.requestRender()}get state(){return this._state}set state(e){this._state=e,this.requestRender()}get stationary(){return this._stationary}set stationary(e){this._stationary!==e&&(this._stationary=e,this.requestRender())}trashDisplayObject(e){this._trash.add(e),this.requestRender()}untrashDisplayObject(e){return this._trash.delete(e)}requestRender(){this._renderRemainingTime=2e3,this.renderRequested||(this.renderRequested=!0,this.emit
1("will-render"),this._taskHandle.resume())}renderFrame(e){const t=this._lastFrameRenderTime?e.time-this._lastFrameRenderTime:0;this._renderRemainingTime-=t,this._renderRemainingTime<=0&&this._taskHandle.pause(),this._lastFrameRenderTime=e.time,this.renderRequested=!1,this._renderParameters.state=this._state,this._renderParameters.stationary=this.stationary,this._renderParameters.pixelRatio=window.devicePixelRatio,this._renderParameters.globalOpacity=1,this._renderParameters.time=e.time,this._renderParameters.deltaTime=e.deltaTime,this._renderParameters.effects=null,this.processRender(this._renderParameters),this._emptyTrash(),this.emit("post-render")}_createTransforms(){return{dvs:(0,h.c)()}}renderChildren(e){for(const t of this.children)t.beforeRender(e);this._renderChildren(this.children,e);for(const t of this.children)t.afterRender(e)}_renderChildren(e,t){const r=this.context;this.painter.textureUploadManager.upload(),r.resetInfo(),t.profiler.recordStart("drawLayers"),t.dataUploadCounter=0,t.drawPhase=c.jx.MAP,this.painter.beforeRenderLayers(r,this.background);for(const r of e)r.processRender(t);this.painter.prepareDisplay(t,this.background,this.state.padding),this.painter.renderLayers(r),t.drawPhase=c.jx.HIGHLIGHT,this.painter.beforeRenderLayers(r);for(const r of e)r.processRender(t);if(this.painter.renderLayers(r),this._isLabelDrawPhaseRequired(e)){t.drawPhase=c.jx.LABEL,this.painter.beforeRenderLayers(r);for(const r of e)r.processRender(t);this.painter.renderLayers(r)}if((0,a.Z)("esri-tiles-debug")){t.drawPhase=c.jx.DEBUG,this.painter.beforeRenderLayers(r);for(const r of e)r.processRender(t);this.painter.renderLayers(r)}t.profiler.recordEnd("drawLayers"),r.logInfo()}doRender(e){const t=this.context,{state:r,pixelRatio:s}=e;this._resizeCanvas(e),t.setViewport(0,0,s*r.size[0],s*r.size[1]),t.setDepthWriteEnabled(!0),t.setStencilWriteMask(255),super.doRender(e)}async takeScreenshot(e){const{framebufferWidth:t,framebufferHeight:r}={framebufferWidth:Math.round(this.state.size[0]*e.resolutionScale),framebufferHeight:Math.round(this.state.size[1]*e.resolutionScale)},s=e.resolutionScale,i=this.context,a=this._state.clone();if(null!=e.rotation){const t=a.viewpoint;a.viewpoint.rotation=e.rotation,a.viewpoint=t}const n={...this._renderParameters,drawPhase:null,globalOpacity:1,stationary:!0,state:a,pixelRatio:s,time:performance.now(),deltaTime:0,blendMode:null,effects:null,inFadeTransition:!1},o=new de.X(i,{colorTarget:N.Lm.TEXTURE,depthStencilTarget:N.OU.DEPTH_STENCIL_RENDER_BUFFER,width:t,height:r}),h=i.getBoundFramebufferObject(),l=i.getViewport();i.bindFramebuffer(o),i.setViewport(0,0,t,r),this._renderChildren(e.children,n);const d=this._readbackScreenshot(o,{...e.cropArea,y:r-(e.cropArea.y+e.cropArea.height)});i.bindFramebuffer(h),i.setViewport(l.x,l.y,l.width,l.height),this.requestRender();const u=await d;let c;return 1===e.outputScale?c=u:(c=new ImageData(Math.round(u.width*e.outputScale),Math.round(u.height*e.outputScale)),(0,Ge.TT)(u,c,!0)),c}async _readbackScreenshot(e,t){const r=(0,He.r)(t.width,t.height,document.createElement("canvas"));return await e.readPixelsAsync(t.x,t.y,t.width,t.height,N.VI.RGBA,N.Br.UNSIGNED_BYTE,new Uint8Array(r.data.buffer)),r}_resizeCanvas(e){const t=this._canvas,r=t.style,{state:{size:s},pixelRatio:i}=e,a=s[0],n=s[1],o=Math.round(a*i),h=Math.round(n*i);t.width===o&&t.height===h||(t.width=o,t.height=h),r.width=a+"px",r.height=n+"px"}_emptyTrash(){for(;this._trash.size>0;){const e=Array.from(this._trash);this._trash.clear();for(const t of e)t.processDetach()}}_isLabelDrawPhaseRequired(e){let t=!1;for(const r of e){if(!(r instanceof d.W)){t=t||!1;break}if(r.hasLabels)return!0;t=t||this._isLabelDrawPhaseRequired(r.children)}return t}}var We=r(43969),je=r(30202),Xe=r(37354),Ke=r(85631),Ye=r(69034),Ze=r(1284),Qe=r(21607),$e=r(37751),Je=r(35910),et=r(18765),tt=r(71820),rt=r(38875),st=r(52535);class it extends tt.s{constructor(){super(),this._handles=new Qe.Z,this._resourcePixelRatio=1,this.visible=!1}destroy(){this._handles=(0,n.SC)(this._handles),this._disposeRenderResources(),this._resourcesTask=(0,n.IM)(this._resourcesTask)}get background(){return this._background}set background(e){this._background=e,this.requestRender()}get magnifier(){return this._magnifier}set magnifier(e){this._magnifier=e,this._handles.removeAll(),this._handles.add([(0,Je.YP)((()=>e.version),(()=>{this.visible=e.visible&&(0,n.pC)(e.position)&&e.size>0,this.requestRender()}),Je.nn),(0,Je.YP)((()=>[e.maskUrl,e.overlayUrl]),(()=>this._reloadResources())),(0,Je.YP)((()=>e.size),(()=>
1{this._disposeRenderResources(),this.requestRender()}))])}_createTransforms(){return{dvs:(0,h.c)()}}doRender(e){const t=e.context;if(!this._resourcesTask)return void this._reloadResources();if(e.drawPhase!==c.jx.MAP||!this._canRender())return;this._updateResources(e);const r=this._magnifier;if((0,n.Wi)(r.position))return;const s=e.pixelRatio,i=r.size*s,a=1/r.factor,o=Math.ceil(a*i);this._readbackTexture.resize(o,o);const{size:h}=e.state,l=s*h[0],d=s*h[1],u=.5*o,_=.5*o,p=(0,$e.uZ)(s*r.position.x,u,l-u-1),f=(0,$e.uZ)(d-s*r.position.y,_,d-_-1);t.setBlendingEnabled(!0);const g=p-u,m=f-_,b=this._readbackTexture;t.bindTexture(b,0),t.gl.copyTexImage2D(b.descriptor.target,0,b.descriptor.pixelFormat,g,m,o,o,0);const T=this.background?.color,w=T?[T.a*T.r/255,T.a*T.g/255,T.a*T.b/255,T.a]:[1,1,1,1],E=(p+r.offset.x*s)/l*2-1,B=(f-r.offset.y*s)/d*2-1,x=i/l*2,O=i/d*2,R=this._program;t.bindVAO(this._vertexArrayObject),t.bindTexture(this._overlayTexture,6),t.bindTexture(this._maskTexture,7),t.useProgram(R),R.setUniform4fv("u_background",w),R.setUniform1i("u_readbackTexture",0),R.setUniform1i("u_overlayTexture",6),R.setUniform1i("u_maskTexture",7),R.setUniform4f("u_drawPos",E,B,x,O),R.setUniform1i("u_maskEnabled",r.maskEnabled?1:0),R.setUniform1i("u_overlayEnabled",r.overlayEnabled?1:0),t.setStencilTestEnabled(!1),t.setColorMask(!0,!0,!0,!0),t.drawArrays(N.MX.TRIANGLE_STRIP,0,4),t.bindVAO()}_canRender(){return this.mask&&this.overlay&&null!=this._magnifier}_reloadResources(){this._resourcesTask&&this._resourcesTask.abort();const e=(0,n.pC)(this._magnifier)?this._magnifier.maskUrl:null,t=(0,n.pC)(this._magnifier)?this._magnifier.overlayUrl:null;this._resourcesTask=(0,Ze.vr)((async s=>{const i=(0,n.Wi)(e)||(0,n.Wi)(t)?async function(e){const t=r.e(4877).then(r.bind(r,24877)),s=r.e(9723).then(r.bind(r,9723)),i=(0,st.t)((await t).default,{signal:e}),a=(0,st.t)((await s).default,{signal:e}),n={mask:await i,overlay:await a};return(0,H.k_)(e),n}(s):null,a=(0,n.pC)(e)?(0,Ye.default)(e,{responseType:"image",signal:s}).then((e=>e.data)):i.then((e=>e.mask)),o=(0,n.pC)(t)?(0,Ye.default)(t,{responseType:"image",signal:s}).then((e=>e.data)):i.then((e=>e.overlay)),[h,l]=await Promise.all([a,o]);this.mask=h,this.overlay=l,this._disposeRenderResources(),this.requestRender()}))}_disposeRenderResources(){this._readbackTexture=(0,n.M2)(this._readbackTexture),this._overlayTexture=(0,n.M2)(this._overlayTexture),this._maskTexture=(0,n.M2)(this._maskTexture),this._vertexArrayObject=(0,n.M2)(this._vertexArrayObject),this._program=(0,n.M2)(this._program)}_updateResources(e){if(e.pixelRatio!==this._resourcePixelRatio&&this._disposeRenderResources(),this._readbackTexture)return;const t=e.context;this._resourcePixelRatio=e.pixelRatio;const r=Math.ceil(this._magnifier.size*e.pixelRatio);this._program=(0,rt.F)(t);const s=new Uint16Array([0,1,0,0,1,1,1,0]),i=rt.c.attributes;this._vertexArrayObject=new D.U(t,i,S.cD,{geometry:C.f.createVertex(t,N.l1.STATIC_DRAW,s)}),this.overlay.width=r,this.overlay.height=r,this._overlayTexture=new ue.x(t,{target:N.No.TEXTURE_2D,pixelFormat:N.VI.RGBA,internalFormat:N.VI.RGBA,dataType:N.Br.UNSIGNED_BYTE,wrapMode:N.e8.CLAMP_TO_EDGE,samplingMode:N.cw.NEAREST,flipped:!0,preMultiplyAlpha:!(0,et.zd)(this.overlay.src)||!e.context.driverTest.svgPremultipliesAlpha.result},this.overlay),this.mask.width=r,this.mask.height=r,this._maskTexture=new ue.x(t,{target:N.No.TEXTURE_2D,pixelFormat:N.VI.ALPHA,internalFormat:N.VI.ALPHA,dataType:N.Br.UNSIGNED_BYTE,wrapMode:N.e8.CLAMP_TO_EDGE,samplingMode:N.cw.NEAREST,flipped:!0},this.mask);const a=1/this._magnifier.factor;this._readbackTexture=new ue.x(t,{target:N.No.TEXTURE_2D,pixelFormat:N.VI.RGBA,internalFormat:N.VI.RGBA,dataType:N.Br.UNSIGNED_BYTE,wrapMode:N.e8.CLAMP_TO_EDGE,samplingMode:N.cw.LINEAR,flipped:!1,width:Math.ceil(a*r),height:Math.ceil(a*r)})}}}}]);

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.