(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-41ab6040"],{"164a":function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var s=i("a4ee"),r=(i("e92d"),i("cea0"),i("b50f"),i("c120"),i("2dd4"),i("d386")),a=i("e80c");const n=e=>{let t=class extends e{attach(){this.view.timeline.record(this.layer.title+" (BitmapTileLayer) Attach"),this._bitmapView=new a["a"](this._tileInfoView),this.container.addChild(this._bitmapView)}detach(){var e;this.container.removeChild(this._bitmapView),null==(e=this._bitmapView)||e.removeAllChildren()}};return t=Object(s["a"])([Object(r["a"])("esri.views.2d.layers.BitmapTileLayerView2D")],t),t}},4072:function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return O}));var s=i("a4ee"),r=i("e92d"),a=i("f4cc"),n=i("59b2"),c=(i("b50f"),i("c120"),i("cea0"),i("d386")),h=i("7f83"),o=i("164a"),l=i("566d"),u=i("d81b"),d=i("018d"),p=i("ae54"),f=i("07cd"),b=i("d302"),y=i("365a"),g=i("6c7a");const m=[102113,102100,3857,3785,900913],_=[0,0],w=r["a"].getLogger("esri.views.2d.layers.WMTSLayerView2D");let v=class extends(Object(g["a"])(Object(o["a"])(Object(l["a"])(y["a"])))){constructor(){super(...arguments),this._tileStrategy=null,this._fetchQueue=null,this._tileRequests=new Map,this.layer=null}get tileMatrixSet(){const e=this._getTileMatrixSetBySpatialReference(this.layer.activeLayer);return e?(e.id!==this.layer.activeLayer.tileMatrixSetId&&(this.layer.activeLayer.tileMatrixSetId=e.id),e):null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume()}attach(){if(!this.tileMatrixSet)return;const{tileInfo:e}=this.tileMatrixSet;this._tileInfoView=new d["a"](e),this._fetchQueue=new f["a"]({tileInfoView:this._tileInfoView,concurrency:16,process:(e,t)=>this.fetchTile(e,t)}),this._tileStrategy=new b["a"]({cachePolicy:"keep",resampling:!0,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),this.handles.add(this.watch(["layer.activeLayer.styleId","tileMatrixSet"],()=>this._refresh()),this.declaredClass),super.attach()}detach(){var e,t;super.detach(),this.handles.remove(this.declaredClass),null==(e=this._tileStrategy)||e.destroy(),null==(t=this._fetchQueue)||t.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=null}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",()=>e.destroy()),this.requestUpdate()}acquireTile(e){const t=this._bitmapView.createTile(e),i=t.bitmap;return[i.x,i.y]=this._tileInfoView.getTileCoords(_,t.key),i.resolution=this._tileInfoView.getTileResolution(t.key),[i.width,i.height]=this._tileInfoView.tileInfo.size,this._enqueueTileFetch(t),this._bitmapView.addChild(t),this.requestUpdate(),t}async doRefresh(){this.updateRequested||this.suspended||this._refresh()}isUpdating(){var e,t;return null!=(e=null==(t=this._fetchQueue)?void 0:t.updating)&&e}async fetchTile(e,t={}){const i="tilemapCache"in this.layer?this.layer.tilemapCache:null,{signal:s,resamplingLevel:r=0}=t;if(!i)return this._fetchImage(e,s);const n=new p["a"](0,0,0,0);let c;try{await i.fetchAvailabilityUpsample(e.level,e.row,e.col,n,{signal:s}),c=await this._fetchImage(n,s)}catch(h){if(Object(a["m"])(h))throw h;if(r<3){const i=this._tileInfoView.getTileParentId(e.id);if(i){const s=new p["a"](i),a=await this.fetchTile(s,{...t,resamplingLevel:r+1});return Object(u["b"])(this._tileInfoView,a,s,e)}}throw h}return Object(u["b"])(this._tileInfoView,c,n,e)}canResume(){const e=super.canResume();return e?null!==this.tileMatrixSet:e}supportsSpatialReference(e){return this.layer.activeLayer.tileMatrixSets.some(t=>Object(h["d"])(t.tileInfo.spatialReference,e))}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const t=await this._fetchQueue.push(e.key);e.bitmap.source=t,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",()=>this.requestUpdate())}catch(t){Object(a["m"])(t)||w.error(t)}this.requestUpdate()}}async _fetchImage(e,t){return this.layer.fetchTile(e.level,e.row,e.col,{signal:t})}_refresh(){this._fetchQueue.reset(),this._tileStrategy.tiles.forEach(e=>{if(!e.bitmap.source)return;const t={id:e.key.id,fulfilled:!1,promise:this._fetchQueue.push(e.key).then(t=>{e.bitmap.source=t}).catch(t=>{Object(a["m"])(t)||(e.bitmap.source=null)}).finally(()=>{e.requestRender(),t.fulfilled=!0})};this._tileRequests.set(e,t)})}_getTileMatrixSetBySpatialReference(e){const t=this.view.spatialReference;if(!e.tileMatrixSets)return null;let i=e.tileMatrixSets.find(e=>Object(h["d"])(e.tileInfo.spatialReference,t));return!i&&t.isWebMercator&&(i=e.tileMatrixSets.find(e=>m.includes(e.tileInfo.spatialReference.wkid))),i}};Object(s["a"])([Object(n["b"])()],v.prototype,"_fetchQueue",void 0),Object(s["a"])([Object(n["b"])({readOnly:!0})],v.prototype,"tileMatrixSet",null),v=Object(s["a"])([Object(c["a"])("esri.views.2d.layers.WMTSLayerView2D")],v);const O=v},"566d":function(e,t,i){"use strict";i.d(t,"a",(function(){return T}));var s=i("a4ee"),r=i("2c4f"),a=i("7d7d"),n=i("ce50"),c=i("477c"),h=i("59b2"),o=(i("b50f"),i("c120"),i("cea0"),i("d386")),l=i("00c0"),u=i("6a0ed");i("e92d"),i("2dd4");let d=class extends u["a"]{};d=Object(s["a"])([Object(o["a"])("esri.views.layers.support.ClipArea")],d);const p=d;var f;let b=f=class extends p{constructor(){super(...arguments),this.type="rect",this.left=null,this.right=null,this.top=null,this.bottom=null}clone(){return new f({left:this.left,right:this.right,top:this.top,bottom:this.bottom})}get version(){return(this._get("version")||0)+1}};Object(s["a"])([Object(h["b"])({type:[Number,String],json:{write:!0}})],b.prototype,"left",void 0),Object(s["a"])([Object(h["b"])({type:[Number,String],json:{write:!0}})],b.prototype,"right",void 0),Object(s["a"])([Object(h["b"])({type:[Number,String],json:{write:!0}})],b.prototype,"top",void 0),Object(s["a"])([Object(h["b"])({type:[Number,String],json:{write:!0}})],b.prototype,"bottom",void 0),Object(s["a"])([Object(h["b"])({readOnly:!0})],b.prototype,"version",null),b=f=Object(s["a"])([Object(o["a"])("esri.views.layers.support.ClipRect")],b);const y=b;i("e06a");var g,m=i("3760"),_=i("a9ab"),w=i("3af1"),v=i("1219");const O={base:m["a"],key:"type",typeMap:{extent:w["a"],polygon:v["a"]}};let j=g=class extends p{constructor(){super(...arguments),this.type="geometry",this.geometry=null}get version(){return(this._get("version")||0)+1}clone(){return new g({geometry:this.geometry.clone()})}};Object(s["a"])([Object(h["b"])({types:O,json:{read:_["a"],write:!0}})],j.prototype,"geometry",void 0),Object(s["a"])([Object(h["b"])({readOnly:!0})],j.prototype,"version",null),j=g=Object(s["a"])([Object(o["a"])("esri.views.layers.support.Geometry")],j);const x=j;let R=class extends p{constructor(){super(...arguments),this.type="path",this.path=[]}get version(){return(this._get("version")||0)+1}};Object(s["a"])([Object(h["b"])({type:[[[Number]]],json:{write:!0}})],R.prototype,"path",void 0),Object(s["a"])([Object(h["b"])({readOnly:!0})],R.prototype,"version",null),R=Object(s["a"])([Object(o["a"])("esri.views.layers.support.Path")],R);const I=R,S=r["a"].ofType({key:"type",base:p,typeMap:{rect:y,path:I,geometry:x}}),T=e=>{let t=class extends e{constructor(){super(...arguments),this.attached=!1,this.clips=new S,this.lastUpdateId=-1,this.moving=!1,this.updateRequested=!1}initialize(){var e,t,i,s;const r=null==(e=null==(t=this.view)?void 0:t.spatialReferenceLocked)||e;(null==(i=this.view)?void 0:i.spatialReference)&&r&&!this.spatialReferenceSupported?this.addResolvingPromise(Promise.reject(new n["a"]("layerview:spatial-reference-incompatible","The spatial reference of this layer does not meet the requirements of the view",{layer:this.layer}))):(this.container||(this.container=new l["a"]),this.container.fadeTransitionEnabled=!0,this.container.opacity=0,this.container.clips=this.clips,this.handles.add([Object(c["e"])(()=>this.suspended,e=>{this.container&&(this.container.visible=!e),this.view&&!e&&this.updateRequested&&this.view.requestUpdate()},c["d"]),Object(c["e"])(()=>{var e,t;return null!=(e=null==(t=this.layer)?void 0:t.opacity)?e:1},e=>{this.container&&(this.container.opacity=e)},c["d"]),Object(c["e"])(()=>this.layer&&"blendMode"in this.layer?this.layer.blendMode:"normal",e=>{this.container&&(this.container.blendMode=e)},c["d"]),Object(c["e"])(()=>this.layer&&"effect"in this.layer?this.layer.effect:null,e=>{this.container&&(this.container.effect=e)},c["d"]),Object(c["b"])(()=>this.clips,"change",()=>{this.container&&(this.container.clips=this.clips)})]),null!=(s=this.view)&&s.whenLayerView?this.view.whenLayerView(this.layer).then(e=>{e===this&&this.processAttach()},()=>{}):this.when().then(()=>{this.processAttach()},()=>{}))}destroy(){this.processDetach(),this.updateRequested=!1}get spatialReferenceSupported(){var e;const t=null==(e=this.view)?void 0:e.spatialReference;return null==t||this.supportsSpatialReference(t)}get updating(){var e;return this.spatialReferenceSupported&&(!this.attached||!this.suspended&&(this.updateRequested||this.isUpdating())||!(null==(e=this.updatingHandles)||!e.updating))}get visibleAtCurrentScale(){return this.isVisibleAtScale(this.view.scale)}processAttach(){this.isResolved()&&!this.attached&&!this.destroyed&&this.spatialReferenceSupported&&(this.attach(),this.attached=!0,this.requestUpdate())}processDetach(){this.attached&&(this.attached=!1,this.detach(),this.updateRequested=!1)}isVisibleAtScale(e){const t=this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null;if(!t)return!0;const{minScale:i,maxScale:s}=t;return(0===i||e<=i)&&(0===s||e>=s)}requestUpdate(){this.destroyed||this.updateRequested||(this.updateRequested=!0,this.suspended||this.view.requestUpdate())}processUpdate(e){!this.isFulfilled()||this.isResolved()?(this._set("updateParameters",e),this.updateRequested&&!this.suspended&&(this.updateRequested=!1,this.update(e))):this.updateRequested=!1}hitTest(e,t){return Promise.resolve(null)}supportsSpatialReference(e){return!0}canResume(){return!!this.spatialReferenceSupported&&!!super.canResume()&&this.visibleAtCurrentScale}getSuspendInfo(){const e=super.getSuspendInfo(),t=!this.spatialReferenceSupported,i=this.visibleAtCurrentScale;return t&&(e.spatialReferenceNotSupported=t),i&&(e.outsideScaleRange=i),e}};return Object(s["a"])([Object(h["b"])()],t.prototype,"attached",void 0),Object(s["a"])([Object(h["b"])({type:S,set(e){const t=Object(a["b"])(e,this._get("clips"),S);this._set("clips",t)}})],t.prototype,"clips",void 0),Object(s["a"])([Object(h["b"])()],t.prototype,"container",void 0),Object(s["a"])([Object(h["b"])()],t.prototype,"moving",void 0),Object(s["a"])([Object(h["b"])({readOnly:!0})],t.prototype,"spatialReferenceSupported",null),Object(s["a"])([Object(h["b"])({readOnly:!0})],t.prototype,"updateParameters",void 0),Object(s["a"])([Object(h["b"])()],t.prototype,"updateRequested",void 0),Object(s["a"])([Object(h["b"])()],t.prototype,"updating",null),Object(s["a"])([Object(h["b"])()],t.prototype,"view",void 0),Object(s["a"])([Object(h["b"])({readOnly:!0})],t.prototype,"visibleAtCurrentScale",null),t=Object(s["a"])([Object(o["a"])("esri.views.2d.layers.LayerView2D")],t),t}},6722:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var s=i("c120"),r=i("c84e"),a=i("9a02"),n=i("6f75"),c=i("ec5e");const h=(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 o extends a["a"]{constructor(e){super(),this._tileInfoView=e}get requiresDedicatedFBO(){return!1}renderChildren(e){this.sortChildren(h),this.setStencilReference(e),super.renderChildren(e)}createRenderParams(e){const{state:t}=e,i=super.createRenderParams(e);return i.requiredLevel=this._tileInfoView.getClosestInfoForScale(t.scale).level,i.displayLevel=this._tileInfoView.tileInfo.scaleToZoom(t.scale),i}prepareRenderPasses(e){const t=super.prepareRenderPasses(e);return t.push(e.registerRenderPass({name:"stencil",brushes:[c["a"]],drawPhase:r["c"].DEBUG|r["c"].MAP|r["c"].HIGHLIGHT,target:()=>this.getStencilTarget()})),Object(s["a"])("esri-tiles-debug")&&t.push(e.registerRenderPass({name:"tileInfo",brushes:[n["a"]],drawPhase:r["c"].DEBUG,target:()=>this.children})),t}getStencilTarget(){return this.children}updateTransforms(e){for(const t of this.children){const i=this._tileInfoView.getTileResolution(t.key);t.setTransform(e,i)}}setStencilReference(e){let t=1;for(const i of this.children)i.stencilRef=t++}}},"6c7a":function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var s=i("a4ee"),r=i("e92d"),a=i("f4cc"),n=i("477c"),c=i("59b2"),h=(i("b50f"),i("c120"),i("cea0"),i("d386"));const o=e=>{let t=class extends e{initialize(){this.handles.add(Object(n["b"])(()=>this.layer,"refresh",e=>{this.doRefresh(e.dataChanged).catch(e=>{Object(a["m"])(e)||r["a"].getLogger(this.declaredClass).error(e)})}),"RefreshableLayerView")}};return Object(s["a"])([Object(c["b"])()],t.prototype,"layer",void 0),t=Object(s["a"])([Object(h["a"])("esri.layers.mixins.RefreshableLayerView")],t),t}},"894c":function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var s=i("b2b2");class r{constructor(e,t,i){this.pixelBlock=e,this.extent=t,this.originalPixelBlock=i}get width(){return Object(s["k"])(this.pixelBlock)?this.pixelBlock.width:0}get height(){return Object(s["k"])(this.pixelBlock)?this.pixelBlock.height:0}render(e){const t=this.pixelBlock;if(Object(s["j"])(t))return;const i=this.filter({pixelBlock:t});if(Object(s["j"])(i.pixelBlock))return;const r=i.pixelBlock.getAsRGBA(),a=e.createImageData(i.pixelBlock.width,i.pixelBlock.height);a.data.set(r),e.putImageData(a,0,0)}getRenderedRasterPixels(){const e=this.filter({pixelBlock:this.pixelBlock});return Object(s["j"])(e.pixelBlock)?null:{width:e.pixelBlock.width,height:e.pixelBlock.height,renderedRasterPixels:new Uint8Array(e.pixelBlock.getAsRGBA().buffer)}}}},"9a02":function(e,t,i){"use strict";i.d(t,"a",(function(){return T}));i("c120");var s=i("b2b2"),r=i("8c71"),a=i("3b1a"),n=i("00c0"),c=i("ce50"),h=i("e92d"),o=i("7c4b"),l=i("9812"),u=i("3349"),d=i("02f1"),p=i("6655"),f=i("8152"),b=i("d114"),y=i("7ce4"),g=i("d17d");const m=h["a"].getLogger("esri.views.2d.engine.webgl.Mesh2D"),_=e=>{switch(e.BYTES_PER_ELEMENT){case 1:return g["k"].UNSIGNED_BYTE;case 2:return g["k"].UNSIGNED_SHORT;case 4:return g["k"].UNSIGNED_INT;default:throw new c["a"]("Cannot get DataType of array")}},w=(e,t,i,s)=>{let r=0;for(let a=1;a0:r<0},v=({coords:e,lengths:t},i)=>{const s=[];for(let r=0,a=0;r({...i,[s]:y["a"].createVertex(e,t,this.vertices[s])}),{})),this._cache.vertexBuffers}}var j=i("0fa6");const x=h["a"].getLogger("esri.views.2d.engine.webgl.ClippingInfo"),R=e=>parseFloat(e)/100;class I extends o["a"]{constructor(e,t){super(),this._clip=t,this._cache={},this.stage=e,this._handle=t.watch("version",()=>this._invalidate()),this.ready()}static fromClipArea(e,t){return new I(e,t)}_destroyGL(){Object(s["k"])(this._cache.mesh)&&(this._cache.mesh.destroy(),this._cache.mesh=null),Object(s["k"])(this._cache.vao)&&(this._cache.vao.dispose(),this._cache.vao=null)}destroy(){this._destroyGL(),this._handle.remove()}getVAO(e,t,i,r){const[a,n]=t.size;if("geometry"!==this._clip.type&&this._lastWidth===a&&this._lastHeight===n||(this._lastWidth=a,this._lastHeight=n,this._destroyGL()),Object(s["j"])(this._cache.vao)){const s=this._createMesh(t,this._clip),a=s.getIndexBuffer(e),n=s.getVertexBuffers(e);this._cache.mesh=s,this._cache.vao=new j["a"](e,i,r,n,a)}return this._cache.vao}_createTransforms(){return{dvs:Object(r["b"])()}}_invalidate(){this._destroyGL(),this.requestRender()}_createScreenRect(e,t){const[i,s]=e.size,r="string"==typeof t.left?R(t.left)*i:t.left,a="string"==typeof t.right?R(t.right)*i:t.right,n="string"==typeof t.top?R(t.top)*s:t.top,c="string"==typeof t.bottom?R(t.bottom)*s:t.bottom,h=r,o=n;return{x:h,y:o,width:Math.max(i-a-h,0),height:Math.max(s-c-o,0)}}_createMesh(e,t){switch(t.type){case"rect":return O.fromRect(this._createScreenRect(e,t));case"path":return O.fromPath(t);case"geometry":return O.fromGeometry(e,t);default:return x.error(new c["a"]("mapview-bad-type","Unable to create ClippingInfo mesh from clip of type: ${clip.type}")),O.fromRect({x:0,y:0,width:1,height:1})}}}var S=i("c84e");class T extends n["a"]{constructor(){super(...arguments),this.name=this.constructor.name}set clips(e){this._clips=e,this.children.forEach(t=>t.clips=e),this._updateClippingInfo()}_createTransforms(){return{dvs:Object(r["b"])()}}doRender(e){const t=this.createRenderParams(e),{painter:i,globalOpacity:s,profiler:r,drawPhase:a}=t,n=a===S["c"].LABEL||a===S["c"].HIGHLIGHT?1:s*this.computedOpacity;r.recordContainerStart(this.name),i.beforeRenderLayer(t,this._clippingInfos?255:0,n),this.updateTransforms(e.state),this.renderChildren(t),i.compositeLayer(t,n),r.recordContainerEnd()}renderChildren(e){Object(s["j"])(this._renderPasses)&&(this._renderPasses=this.prepareRenderPasses(e.painter));for(const i of this.children)i.beforeRender(e);for(const i of this._renderPasses)try{i.render(e)}catch(t){}for(const i of this.children)i.afterRender(e)}createRenderParams(e){return e.requireFBO=this.requiresDedicatedFBO,e}prepareRenderPasses(e){return[e.registerRenderPass({name:"clip",brushes:[a["a"].clip],target:()=>this._clippingInfos,drawPhase:S["c"].MAP|S["c"].LABEL|S["c"].LABEL_ALPHA|S["c"].DEBUG|S["c"].HIGHLIGHT})]}updateTransforms(e){for(const t of this.children)t.setTransform(e)}onAttach(){super.onAttach(),this._updateClippingInfo()}onDetach(){super.onDetach(),this._updateClippingInfo()}_updateClippingInfo(){if(Object(s["k"])(this._clippingInfos)&&(this._clippingInfos.forEach(e=>e.destroy()),this._clippingInfos=null),!this.stage)return;const e=this._clips;Object(s["k"])(e)&&e.length&&(this._clippingInfos=e.items.map(e=>I.fromClipArea(this.stage,e))),this.requestRender()}}},c73a:function(e,t,i){"use strict";i.d(t,"a",(function(){return b}));var s=i("b2b2"),r=i("1c92"),a=i("8c71"),n=i("738e"),c=i("7c4b"),h=i("894c"),o=i("d17d"),l=i("a1ff");function u(e){return e&&"render"in e}function d(e){return e&&!("render"in e)}function p(e){const t=document.createElement("canvas");return t.width=e.width,t.height=e.height,e.render(t.getContext("2d")),t}function f(e,t,i){const s={target:o["A"].TEXTURE_2D,pixelFormat:o["p"].RGBA,internalFormat:o["p"].RGBA,dataType:o["q"].UNSIGNED_BYTE,wrapMode:o["B"].CLAMP_TO_EDGE};return t&&i&&(s.width=t,s.height=i),new l["a"](e,s)}class b extends c["a"]{constructor(e=null,t,i=!0){super(),this.requestRenderOnSourceChangedEnabled=i,this._textureInvalidated=!0,this.stencilRef=0,this.coordScale=[1,1],this._height=void 0,this.pixelRatio=1,this.resolution=0,this.rotation=0,this._source=null,this._width=void 0,this.x=0,this.y=0,this.blendFunction=t,this.source=e,this.requestRender=this.requestRender.bind(this)}destroy(){this._texture&&(this._texture.dispose(),this._texture=null)}get isSourceScaled(){return this.width!==this.sourceWidth||this.height!==this.sourceHeight}get height(){return void 0!==this._height?this._height:this.sourceHeight}set height(e){this._height=e}get source(){return this._source}set source(e){this._source=e,this.invalidateTexture()}get sourceHeight(){return this._source instanceof HTMLImageElement?this._source.naturalHeight:this._source.height}get sourceWidth(){return this._source instanceof HTMLImageElement?this._source.naturalWidth:this._source.width}get width(){return void 0!==this._width?this._width:this.sourceWidth}set width(e){this._width=e}beforeRender(e){super.beforeRender(e),this.updateTexture(e.context)}invalidateTexture(){this._textureInvalidated||(this._textureInvalidated=!0,this.requestRenderOnSourceChangedEnabled&&this.requestRender())}_createTransforms(){return{dvs:Object(a["b"])()}}setTransform(e){const t=Object(r["b"])(this.transforms.dvs),[i,s]=e.toScreenNoRotation([0,0],[this.x,this.y]),a=this.resolution/this.pixelRatio/e.resolution,c=a*this.width,h=a*this.height,o=Math.PI*this.rotation/180;Object(r["c"])(t,t,Object(n["b"])(i,s)),Object(r["c"])(t,t,Object(n["b"])(c/2,h/2)),Object(r["n"])(t,t,-o),Object(r["c"])(t,t,Object(n["b"])(-c/2,-h/2)),Object(r["j"])(t,t,Object(n["b"])(c,h)),Object(r["l"])(this.transforms.dvs,e.displayViewMat3,t)}setSamplingProfile(e){this._texture&&(e.mips&&!this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._texture.setSamplingMode(e.samplingMode))}bind(e,t){this._texture&&e.bindTexture(this._texture,t)}updateTexture(e){var t;if(!this.stage)return null==(t=this._texture)||t.dispose(),void(this._texture=null);if(!this._textureInvalidated)return;this._textureInvalidated=!1,this._texture||(this.source?this._texture=f(e,this.sourceWidth,this.sourceHeight):this._texture=f(e));const i=this.source;if(i){if(this._texture.resize(this.sourceWidth,this.sourceHeight),u(i))if(i instanceof h["a"]){const e=i.getRenderedRasterPixels();this._texture.setData(Object(s["k"])(e)?e.renderedRasterPixels:null)}else this._texture.setData(p(i));else d(i)&&this._texture.setData(i);this.ready()}else this._texture.setData(null)}onAttach(){this.invalidateTexture()}onDetach(){this.invalidateTexture()}}},d81b:function(e,t,i){"use strict";function s(e){return e instanceof HTMLImageElement?e.naturalWidth:e.width}function r(e){return e instanceof HTMLImageElement?e.naturalHeight:e.height}function a(e,t,i,a){if(i.level===a.level)return t;const c=e.tileInfo.size,h=e.getTileResolution(i.level),o=e.getTileResolution(a.level);let l=e.getLODInfoAt(a.level);const u=l.getXForColumn(a.col),d=l.getYForRow(a.row);l=e.getLODInfoAt(i.level);const p=l.getXForColumn(i.col),f=l.getYForRow(i.row),b=s(t)/c[0],y=r(t)/c[1],g=Math.round(b*((u-p)/h)),m=Math.round(y*(-(d-f)/h)),_=Math.round(b*c[0]*(o/h)),w=Math.round(y*c[1]*(o/h)),v=n(c);return v.getContext("2d").drawImage(t,g,m,_,w,0,0,c[0],c[1]),v}function n(e){const t=document.createElement("canvas");return[t.width,t.height]=e,t}i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return a}))},e80c:function(e,t,i){"use strict";i.d(t,"a",(function(){return u}));var s=i("9180"),r=i("8c71"),a=i("c73a"),n=i("e4b1");class c extends n["a"]{constructor(e,t,i,s,r,n=null){super(e,t,i,s,r),this.bitmap=new a["a"](n,"standard",!1),this.bitmap.coordScale=[s,r],this.bitmap.once("isReady",()=>this.ready())}destroy(){super.destroy(),this.bitmap.destroy()}beforeRender(e){super.beforeRender(e),this.bitmap.beforeRender(e)}afterRender(e){super.afterRender(e),this.bitmap.afterRender(e)}set stencilRef(e){this.bitmap.stencilRef=e}get stencilRef(){return this.bitmap.stencilRef}_createTransforms(){return{dvs:Object(r["b"])(),tileMat3:Object(r["b"])()}}setTransform(e,t){super.setTransform(e,t),this.bitmap.transforms.dvs=this.transforms.dvs}onAttach(){this.bitmap.stage=this.stage}onDetach(){this.bitmap&&(this.bitmap.stage=null)}}var h=i("3b1a"),o=i("c84e"),l=i("6722");class u extends l["a"]{get requiresDedicatedFBO(){return this.children.some(e=>"additive"===e.bitmap.blendFunction)}createTile(e){const t=this._tileInfoView.getTileBounds(Object(s["l"])(),e),[i,r]=this._tileInfoView.tileInfo.size;return new c(e,t[0],t[3],i,r)}prepareRenderPasses(e){const t=e.registerRenderPass({name:"bitmap (tile)",brushes:[h["a"].bitmap],target:()=>this.children.map(e=>e.bitmap),drawPhase:o["c"].MAP});return[...super.prepareRenderPasses(e),t]}doRender(e){this.visible&&e.drawPhase===o["c"].MAP&&super.doRender(e)}}}}]); //# sourceMappingURL=chunk-41ab6040.402cec49.js.map