(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-903c6fe0"],{2535:function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return m}));var r=i("a4ee"),s=i("e92d"),a=i("f4cc"),n=i("477c"),o=i("59b2"),c=(i("b50f"),i("c120"),i("cea0"),i("d386")),h=i("3af1"),l=i("2d39"),d=i("566d"),p=i("bdb8"),u=i("365a"),b=i("6c7a"),f=i("a6b6");const g=s["a"].getLogger("esri.views.2d.layers.WMSLayerView2D");let y=class extends(Object(f["a"])(Object(b["a"])(Object(d["a"])(u["a"])))){constructor(){super(...arguments),this.container=new l["a"]}supportsSpatialReference(e){return this.layer.serviceSupportsSpatialReference(e)}update(e){this.strategy.update(e).catch(e=>{Object(a["m"])(e)||g.error(e)})}attach(){const{layer:e,container:t}=this,{imageMaxHeight:i,imageMaxWidth:r}=e;this.strategy=new p["a"]({container:t,fetchSource:this.fetchImage.bind(this),requestUpdate:this.requestUpdate.bind(this),imageMaxHeight:i,imageMaxWidth:r,imageRotationSupported:!1,imageNormalizationSupported:!1,hidpi:!1}),this.handles.add(Object(n["e"])(()=>this.exportImageVersion,()=>this.requestUpdate()),"exportImageVersion")}detach(){this.handles.remove("exportImageVersion"),this.strategy.destroy(),this.strategy=null,this.container.removeAllChildren()}moveStart(){}viewChange(){}moveEnd(){this.requestUpdate()}createFetchPopupFeaturesQuery(e){const{view:t,container:i}=this,{x:r,y:s}=e,{spatialReference:a}=t;let n=null,o=0,c=0;if(i.children.some(e=>{const{width:t,height:i,resolution:l,x:d,y:p}=e,u=d+l*t,b=p-l*i;return r>=d&&r<=u&&s<=p&&s>=b&&(n=new h["a"]({xmin:d,ymin:b,xmax:u,ymax:p,spatialReference:a}),o=t,c=i,!0)}),!n)return null;const l=n.width/o,d=Math.round((r-n.xmin)/l),p=Math.round((n.ymax-s)/l);return{extent:n,width:o,height:c,x:d,y:p}}async doRefresh(){this.requestUpdate()}isUpdating(){return this.strategy.updating||this.updateRequested}fetchImage(e,t,i,r){return this.layer.fetchImage(e,t,i,{timeExtent:this.timeExtent,...r})}};Object(r["a"])([Object(o["b"])()],y.prototype,"strategy",void 0),Object(r["a"])([Object(o["b"])()],y.prototype,"updating",void 0),y=Object(r["a"])([Object(c["a"])("esri.views.2d.layers.WMSLayerView2D")],y);const m=y},"2d39":function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var r=i("3b1a"),s=i("c84e"),a=i("9a02");class n extends a["a"]{get requiresDedicatedFBO(){return this.children.some(e=>"additive"===e.blendFunction)}prepareRenderPasses(e){const t=e.registerRenderPass({name:"bitmap",brushes:[r["a"].bitmap],target:()=>this.children,drawPhase:s["c"].MAP});return[...super.prepareRenderPasses(e),t]}}},"566d":function(e,t,i){"use strict";i.d(t,"a",(function(){return P}));var r=i("a4ee"),s=i("2c4f"),a=i("7d7d"),n=i("ce50"),o=i("477c"),c=i("59b2"),h=(i("b50f"),i("c120"),i("cea0"),i("d386")),l=i("00c0"),d=i("6a0ed");i("e92d"),i("2dd4");let p=class extends d["a"]{};p=Object(r["a"])([Object(h["a"])("esri.views.layers.support.ClipArea")],p);const u=p;var b;let f=b=class extends u{constructor(){super(...arguments),this.type="rect",this.left=null,this.right=null,this.top=null,this.bottom=null}clone(){return new b({left:this.left,right:this.right,top:this.top,bottom:this.bottom})}get version(){return(this._get("version")||0)+1}};Object(r["a"])([Object(c["b"])({type:[Number,String],json:{write:!0}})],f.prototype,"left",void 0),Object(r["a"])([Object(c["b"])({type:[Number,String],json:{write:!0}})],f.prototype,"right",void 0),Object(r["a"])([Object(c["b"])({type:[Number,String],json:{write:!0}})],f.prototype,"top",void 0),Object(r["a"])([Object(c["b"])({type:[Number,String],json:{write:!0}})],f.prototype,"bottom",void 0),Object(r["a"])([Object(c["b"])({readOnly:!0})],f.prototype,"version",null),f=b=Object(r["a"])([Object(h["a"])("esri.views.layers.support.ClipRect")],f);const g=f;i("e06a");var y,m=i("3760"),O=i("a9ab"),j=i("3af1"),x=i("1219");const v={base:m["a"],key:"type",typeMap:{extent:j["a"],polygon:x["a"]}};let w=y=class extends u{constructor(){super(...arguments),this.type="geometry",this.geometry=null}get version(){return(this._get("version")||0)+1}clone(){return new y({geometry:this.geometry.clone()})}};Object(r["a"])([Object(c["b"])({types:v,json:{read:O["a"],write:!0}})],w.prototype,"geometry",void 0),Object(r["a"])([Object(c["b"])({readOnly:!0})],w.prototype,"version",null),w=y=Object(r["a"])([Object(h["a"])("esri.views.layers.support.Geometry")],w);const _=w;let R=class extends u{constructor(){super(...arguments),this.type="path",this.path=[]}get version(){return(this._get("version")||0)+1}};Object(r["a"])([Object(c["b"])({type:[[[Number]]],json:{write:!0}})],R.prototype,"path",void 0),Object(r["a"])([Object(c["b"])({readOnly:!0})],R.prototype,"version",null),R=Object(r["a"])([Object(h["a"])("esri.views.layers.support.Path")],R);const S=R,M=s["a"].ofType({key:"type",base:u,typeMap:{rect:g,path:S,geometry:_}}),P=e=>{let t=class extends e{constructor(){super(...arguments),this.attached=!1,this.clips=new M,this.lastUpdateId=-1,this.moving=!1,this.updateRequested=!1}initialize(){var e,t,i,r;const s=null==(e=null==(t=this.view)?void 0:t.spatialReferenceLocked)||e;(null==(i=this.view)?void 0:i.spatialReference)&&s&&!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(o["e"])(()=>this.suspended,e=>{this.container&&(this.container.visible=!e),this.view&&!e&&this.updateRequested&&this.view.requestUpdate()},o["d"]),Object(o["e"])(()=>{var e,t;return null!=(e=null==(t=this.layer)?void 0:t.opacity)?e:1},e=>{this.container&&(this.container.opacity=e)},o["d"]),Object(o["e"])(()=>this.layer&&"blendMode"in this.layer?this.layer.blendMode:"normal",e=>{this.container&&(this.container.blendMode=e)},o["d"]),Object(o["e"])(()=>this.layer&&"effect"in this.layer?this.layer.effect:null,e=>{this.container&&(this.container.effect=e)},o["d"]),Object(o["b"])(()=>this.clips,"change",()=>{this.container&&(this.container.clips=this.clips)})]),null!=(r=this.view)&&r.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:r}=t;return(0===i||e<=i)&&(0===r||e>=r)}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(r["a"])([Object(c["b"])()],t.prototype,"attached",void 0),Object(r["a"])([Object(c["b"])({type:M,set(e){const t=Object(a["b"])(e,this._get("clips"),M);this._set("clips",t)}})],t.prototype,"clips",void 0),Object(r["a"])([Object(c["b"])()],t.prototype,"container",void 0),Object(r["a"])([Object(c["b"])()],t.prototype,"moving",void 0),Object(r["a"])([Object(c["b"])({readOnly:!0})],t.prototype,"spatialReferenceSupported",null),Object(r["a"])([Object(c["b"])({readOnly:!0})],t.prototype,"updateParameters",void 0),Object(r["a"])([Object(c["b"])()],t.prototype,"updateRequested",void 0),Object(r["a"])([Object(c["b"])()],t.prototype,"updating",null),Object(r["a"])([Object(c["b"])()],t.prototype,"view",void 0),Object(r["a"])([Object(c["b"])({readOnly:!0})],t.prototype,"visibleAtCurrentScale",null),t=Object(r["a"])([Object(h["a"])("esri.views.2d.layers.LayerView2D")],t),t}},"6c7a":function(e,t,i){"use strict";i.d(t,"a",(function(){return h}));var r=i("a4ee"),s=i("e92d"),a=i("f4cc"),n=i("477c"),o=i("59b2"),c=(i("b50f"),i("c120"),i("cea0"),i("d386"));const h=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)||s["a"].getLogger(this.declaredClass).error(e)})}),"RefreshableLayerView")}};return Object(r["a"])([Object(o["b"])()],t.prototype,"layer",void 0),t=Object(r["a"])([Object(c["a"])("esri.layers.mixins.RefreshableLayerView")],t),t}},"894c":function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var r=i("b2b2");class s{constructor(e,t,i){this.pixelBlock=e,this.extent=t,this.originalPixelBlock=i}get width(){return Object(r["k"])(this.pixelBlock)?this.pixelBlock.width:0}get height(){return Object(r["k"])(this.pixelBlock)?this.pixelBlock.height:0}render(e){const t=this.pixelBlock;if(Object(r["j"])(t))return;const i=this.filter({pixelBlock:t});if(Object(r["j"])(i.pixelBlock))return;const s=i.pixelBlock.getAsRGBA(),a=e.createImageData(i.pixelBlock.width,i.pixelBlock.height);a.data.set(s),e.putImageData(a,0,0)}getRenderedRasterPixels(){const e=this.filter({pixelBlock:this.pixelBlock});return Object(r["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 P}));i("c120");var r=i("b2b2"),s=i("8c71"),a=i("3b1a"),n=i("00c0"),o=i("ce50"),c=i("e92d"),h=i("7c4b"),l=i("9812"),d=i("3349"),p=i("02f1"),u=i("6655"),b=i("8152"),f=i("d114"),g=i("7ce4"),y=i("d17d");const m=c["a"].getLogger("esri.views.2d.engine.webgl.Mesh2D"),O=e=>{switch(e.BYTES_PER_ELEMENT){case 1:return y["k"].UNSIGNED_BYTE;case 2:return y["k"].UNSIGNED_SHORT;case 4:return y["k"].UNSIGNED_INT;default:throw new o["a"]("Cannot get DataType of array")}},j=(e,t,i,r)=>{let s=0;for(let a=1;a0:s<0},x=({coords:e,lengths:t},i)=>{const r=[];for(let s=0,a=0;s({...i,[r]:g["a"].createVertex(e,t,this.vertices[r])}),{})),this._cache.vertexBuffers}}var w=i("0fa6");const _=c["a"].getLogger("esri.views.2d.engine.webgl.ClippingInfo"),R=e=>parseFloat(e)/100;class S extends h["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 S(e,t)}_destroyGL(){Object(r["k"])(this._cache.mesh)&&(this._cache.mesh.destroy(),this._cache.mesh=null),Object(r["k"])(this._cache.vao)&&(this._cache.vao.dispose(),this._cache.vao=null)}destroy(){this._destroyGL(),this._handle.remove()}getVAO(e,t,i,s){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(r["j"])(this._cache.vao)){const r=this._createMesh(t,this._clip),a=r.getIndexBuffer(e),n=r.getVertexBuffers(e);this._cache.mesh=r,this._cache.vao=new w["a"](e,i,s,n,a)}return this._cache.vao}_createTransforms(){return{dvs:Object(s["b"])()}}_invalidate(){this._destroyGL(),this.requestRender()}_createScreenRect(e,t){const[i,r]=e.size,s="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)*r:t.top,o="string"==typeof t.bottom?R(t.bottom)*r:t.bottom,c=s,h=n;return{x:c,y:h,width:Math.max(i-a-c,0),height:Math.max(r-o-h,0)}}_createMesh(e,t){switch(t.type){case"rect":return v.fromRect(this._createScreenRect(e,t));case"path":return v.fromPath(t);case"geometry":return v.fromGeometry(e,t);default:return _.error(new o["a"]("mapview-bad-type","Unable to create ClippingInfo mesh from clip of type: ${clip.type}")),v.fromRect({x:0,y:0,width:1,height:1})}}}var M=i("c84e");class P 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(s["b"])()}}doRender(e){const t=this.createRenderParams(e),{painter:i,globalOpacity:r,profiler:s,drawPhase:a}=t,n=a===M["c"].LABEL||a===M["c"].HIGHLIGHT?1:r*this.computedOpacity;s.recordContainerStart(this.name),i.beforeRenderLayer(t,this._clippingInfos?255:0,n),this.updateTransforms(e.state),this.renderChildren(t),i.compositeLayer(t,n),s.recordContainerEnd()}renderChildren(e){Object(r["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:M["c"].MAP|M["c"].LABEL|M["c"].LABEL_ALPHA|M["c"].DEBUG|M["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(r["k"])(this._clippingInfos)&&(this._clippingInfos.forEach(e=>e.destroy()),this._clippingInfos=null),!this.stage)return;const e=this._clips;Object(r["k"])(e)&&e.length&&(this._clippingInfos=e.items.map(e=>S.fromClipArea(this.stage,e))),this.requestRender()}}},a6b6:function(e,t,i){"use strict";i.d(t,"a",(function(){return h}));var r=i("a4ee"),s=i("ce50"),a=i("59b2"),n=(i("b50f"),i("c120"),i("cea0"),i("d386")),o=i("22f4"),c=i("b807");const h=e=>{let t=class extends e{initialize(){this.exportImageParameters=new c["a"]({layer:this.layer})}destroy(){this.exportImageParameters.destroy(),this.exportImageParameters=null}get exportImageVersion(){var e;return null==(e=this.exportImageParameters)||e.commitProperty("version"),this.commitProperty("timeExtent"),(this._get("exportImageVersion")||0)+1}fetchPopupFeatures(e){const{layer:t}=this;if(!e)return Promise.reject(new s["a"]("wmslayerview:fetchPopupFeatures","Nothing to fetch without area",{layer:t}));const{popupEnabled:i}=t;if(!i)return Promise.reject(new s["a"]("wmslayerview:fetchPopupFeatures","popupEnabled should be true",{popupEnabled:i}));const r=this.createFetchPopupFeaturesQuery(e);if(!r)return Promise.resolve([]);const{extent:a,width:n,height:o,x:c,y:h}=r;if(!(a&&n&&o))throw new s["a"]("wmslayerview:fetchPopupFeatures","WMSLayer does not support fetching features.",{extent:a,width:n,height:o});const l=t.fetchFeatureInfo(a,n,o,c,h);return Promise.resolve(l?[l]:[])}};return Object(r["a"])([Object(a["b"])()],t.prototype,"exportImageParameters",void 0),Object(r["a"])([Object(a["b"])({readOnly:!0})],t.prototype,"exportImageVersion",null),Object(r["a"])([Object(a["b"])()],t.prototype,"layer",void 0),Object(r["a"])([Object(a["b"])(o["a"])],t.prototype,"timeExtent",void 0),t=Object(r["a"])([Object(n["a"])("esri.layers.mixins.WMSLayerView")],t),t}},b807:function(e,t,i){"use strict";i.d(t,"a",(function(){return h}));var r=i("a4ee"),s=i("fc29"),a=i("9096"),n=i("59b2"),o=(i("b50f"),i("c120"),i("cea0"),i("d386"));const c={visible:"visibleSublayers"};let h=class extends(Object(a["b"])(s["a"])){constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.handles.remove("layer"),e&&this.handles.add([e.sublayers.on("change",()=>this.notifyChange("visibleSublayers")),e.on("wms-sublayer-update",e=>this.notifyChange(c[e.propertyName]))],"layer"))}get layers(){const{visibleSublayers:e}=this;return e.filter(e=>e.name).map(e=>e.name).join(",")}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,i=null==e?void 0:e.sublayers,r=[],s=e=>{const{minScale:i,maxScale:a,sublayers:n,visible:o}=e;o&&(0===t||(0===i||t<=i)&&(0===a||t>=a))&&(n?n.forEach(s):r.unshift(e))};return null==i||i.forEach(s),r}toJSON(){const{layer:e,layers:t}=this,{imageFormat:i,imageTransparency:r,version:s}=e;return{format:i,request:"GetMap",service:"WMS",styles:"",transparent:r?"TRUE":"FALSE",version:s,layers:t}}};Object(r["a"])([Object(n["b"])()],h.prototype,"layer",null),Object(r["a"])([Object(n["b"])({readOnly:!0})],h.prototype,"layers",null),Object(r["a"])([Object(n["b"])({type:Number})],h.prototype,"scale",void 0),Object(r["a"])([Object(n["b"])({readOnly:!0})],h.prototype,"version",null),Object(r["a"])([Object(n["b"])({readOnly:!0})],h.prototype,"visibleSublayers",null),h=Object(r["a"])([Object(o["a"])("esri.layers.support.ExportWMSImageParameters")],h)},bdb8:function(e,t,i){"use strict";i.d(t,"a",(function(){return _}));var r=i("a4ee"),s=i("fc29"),a=i("f4cc"),n=i("59b2"),o=(i("b50f"),i("c120"),i("cea0"),i("d386")),c=i("3af1"),h=i("9180"),l=i("7f83"),d=i("dff3");const p=Math.PI/180;function u(e){return e*p}function b(e,t){const i=u(t.rotation),r=Math.abs(Math.cos(i)),s=Math.abs(Math.sin(i)),[a,n]=t.size;return e[0]=Math.round(n*s+a*r),e[1]=Math.round(n*r+a*s),e}function f(e,t,i,r){const[s,a]=t,[n,o]=r,c=.5*i;return e[0]=s-c*n,e[1]=a-c*o,e[2]=s+c*n,e[3]=a+c*o,e}var g=i("c73a"),y=i("018d"),m=i("ae54");const O=Object(h["l"])(),j=[0,0],x=new m["a"](0,0,0,0),v={container:null,fetchSource:null,requestUpdate:null,imageMaxWidth:2048,imageMaxHeight:2048,imageRotationSupported:!1,imageNormalizationSupported:!1,hidpi:!1};let w=class extends s["a"]{constructor(e){super(e),this._imagePromise=null,this.bitmaps=[],this.hidpi=v.hidpi,this.imageMaxWidth=v.imageMaxWidth,this.imageMaxHeight=v.imageMaxHeight,this.imageRotationSupported=v.imageRotationSupported,this.imageNormalizationSupported=v.imageNormalizationSupported,this.update=Object(a["i"])(async(e,t)=>{if(!e.stationary||this.destroyed)return null;const i=e.state,r=Object(l["e"])(i.spatialReference),s=this.hidpi?e.pixelRatio:1,a=this.imageNormalizationSupported&&i.worldScreenWidth&&i.worldScreenWidththis.imageMaxWidth||Math.floor(j[1]*s)>this.imageMaxHeight,o=r&&(i.extent.xminr.valid[1]),c=!this.imageNormalizationSupported&&o,h=!n&&!c,d=this.imageRotationSupported?i.rotation:0;if(h){const e=a?i.paddedViewState.center:i.center;this._imagePromise=this._singleExport(i,j,e,i.resolution,d,s,t)}else{let e=Math.min(this.imageMaxWidth,this.imageMaxHeight);c&&(e=Math.min(i.worldScreenWidth,e)),this._imagePromise=this._tiledExport(i,e,d,s,t)}return this._imagePromise.then(async e=>{if(this._imagePromise=null,!this.destroyed){this.bitmaps=null!=e?e:[];for(const t of this.container.children)e.includes(t)||t.fadeOut().then(()=>{t.remove()});for(const t of e)this.container.addChild(t),t.fadeIn()}}).catch(e=>{throw this._imagePromise=null,e})},5e3)}destroy(){this.bitmaps=[]}get updating(){return!this.destroyed&&null!==this._imagePromise}updateExports(e){for(const t of this.container.children){if(!t.visible||!t.stage)return;e(t),t.invalidateTexture(),t.requestRender()}}async _export(e,t,i,r,s,a){const n=await this.fetchSource(e,Math.floor(t*s),Math.floor(i*s),{rotation:r,pixelRatio:s,signal:a}),o=new g["a"](n,"additive");return o.x=e.xmin,o.y=e.ymax,o.resolution=e.width/t,o.rotation=r,o.pixelRatio=s,o}async _singleExport(e,t,i,r,s,a,n){f(O,i,r,t);const o=new c["a"](O[0],O[1],O[2],O[3],e.spatialReference);return[await this._export(o,t[0],t[1],s,a,n)]}_tiledExport(e,t,i,r,s){const a=d["a"].create({size:t,spatialReference:e.spatialReference,scales:[e.scale]}),n=new y["a"](a),o=n.getTileCoverage(e);if(!o)return null;const h=[];return o.forEach((a,o,l,d)=>{x.set(a,o,l,d),n.getTileBounds(O,x);const p=new c["a"](O[0],O[1],O[2],O[3],e.spatialReference);h.push(this._export(p,t,t,i,r,s))}),Promise.all(h)}};Object(r["a"])([Object(n["b"])()],w.prototype,"_imagePromise",void 0),Object(r["a"])([Object(n["b"])()],w.prototype,"bitmaps",void 0),Object(r["a"])([Object(n["b"])()],w.prototype,"container",void 0),Object(r["a"])([Object(n["b"])()],w.prototype,"fetchSource",void 0),Object(r["a"])([Object(n["b"])()],w.prototype,"hidpi",void 0),Object(r["a"])([Object(n["b"])()],w.prototype,"imageMaxWidth",void 0),Object(r["a"])([Object(n["b"])()],w.prototype,"imageMaxHeight",void 0),Object(r["a"])([Object(n["b"])()],w.prototype,"imageRotationSupported",void 0),Object(r["a"])([Object(n["b"])()],w.prototype,"imageNormalizationSupported",void 0),Object(r["a"])([Object(n["b"])()],w.prototype,"requestUpdate",void 0),Object(r["a"])([Object(n["b"])()],w.prototype,"updating",null),w=Object(r["a"])([Object(o["a"])("esri.views.2d.layers.support.ExportStrategy")],w);const _=w},c73a:function(e,t,i){"use strict";i.d(t,"a",(function(){return f}));var r=i("b2b2"),s=i("1c92"),a=i("8c71"),n=i("738e"),o=i("7c4b"),c=i("894c"),h=i("d17d"),l=i("a1ff");function d(e){return e&&"render"in e}function p(e){return e&&!("render"in e)}function u(e){const t=document.createElement("canvas");return t.width=e.width,t.height=e.height,e.render(t.getContext("2d")),t}function b(e,t,i){const r={target:h["A"].TEXTURE_2D,pixelFormat:h["p"].RGBA,internalFormat:h["p"].RGBA,dataType:h["q"].UNSIGNED_BYTE,wrapMode:h["B"].CLAMP_TO_EDGE};return t&&i&&(r.width=t,r.height=i),new l["a"](e,r)}class f extends o["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(s["b"])(this.transforms.dvs),[i,r]=e.toScreenNoRotation([0,0],[this.x,this.y]),a=this.resolution/this.pixelRatio/e.resolution,o=a*this.width,c=a*this.height,h=Math.PI*this.rotation/180;Object(s["c"])(t,t,Object(n["b"])(i,r)),Object(s["c"])(t,t,Object(n["b"])(o/2,c/2)),Object(s["n"])(t,t,-h),Object(s["c"])(t,t,Object(n["b"])(-o/2,-c/2)),Object(s["j"])(t,t,Object(n["b"])(o,c)),Object(s["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=b(e,this.sourceWidth,this.sourceHeight):this._texture=b(e));const i=this.source;if(i){if(this._texture.resize(this.sourceWidth,this.sourceHeight),d(i))if(i instanceof c["a"]){const e=i.getRenderedRasterPixels();this._texture.setData(Object(r["k"])(e)?e.renderedRasterPixels:null)}else this._texture.setData(u(i));else p(i)&&this._texture.setData(i);this.ready()}else this._texture.setData(null)}onAttach(){this.invalidateTexture()}onDetach(){this.invalidateTexture()}}}}]); //# sourceMappingURL=chunk-903c6fe0.e83af899.js.map