{"version":3,"sources":["webpack:///./node_modules/arcgis-js-api/views/3d/layers/DynamicLayerView3D.js","webpack:///./node_modules/arcgis-js-api/views/layers/support/popupUtils.js","webpack:///./node_modules/arcgis-js-api/views/support/drapedUtils.js","webpack:///./node_modules/arcgis-js-api/views/3d/layers/support/overlayImageUtils.js","webpack:///./node_modules/arcgis-js-api/views/3d/layers/MapImageLayerView3D.js","webpack:///./node_modules/arcgis-js-api/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js","webpack:///./node_modules/arcgis-js-api/views/3d/layers/support/projectExtentUtils.js","webpack:///./node_modules/arcgis-js-api/views/layers/MapImageLayerView.js","webpack:///./node_modules/arcgis-js-api/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js","webpack:///./node_modules/arcgis-js-api/views/3d/webgl-engine/materials/ImageMaterial.js","webpack:///./node_modules/arcgis-js-api/renderers/support/clickToleranceUtils.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAO,CAAC,kCAAS,CAAC,OAAS,CAAC,2BAAO,CAAC,2BAA0B,CAAC,2BAAsB,CAAC,2BAA4B,CAAC,2BAA4B,CAAC,2BAA0B,CAAC,2BAA0C,CAAC,2BAA0B,CAAC,2BAA0C,CAAC,2BAAe,CAAC,2BAA6B,CAAC,2BAA8B,CAAC,2BAAuB,CAAC,2BAAoC,CAAC,2BAA6B,CAAC,2BAAyC,CAAC,2BAAwB,CAAC,2BAAmC,CAAC,mCAAE,kDAAkD,aAAa,2EAA2E,aAAa,8CAA8C,qNAAqN,0DAA0D,WAAW,iEAAiE,yDAAyD,0DAA0D,mCAAmC,kGAAkG,qDAAqD,eAAe,8FAA8F,mCAAmC,2GAA2G,gDAAgD,+BAA+B,GAAG,GAAG,gCAAgC,aAAa,oDAAoD,yBAAyB,oFAAo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EAAoE,GAAG,OAAO,qIAAqI,SAAS;AAAA,oGAAE,C;;;;;;;ACxBnmF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAO,CAAC,kCAAS,CAAC,OAAS,CAAC,mCAAE,cAAc,aAAa,gBAAgB,kIAAkI,gBAAgB,kEAAkE,oBAAoB,WAAW,KAAK,gBAAgB,+BAA+B,WAAW,YAAY,sCAAsC,SAAS,+DAA+D,sEAAsE,eAAe,0CAA0C,eAAe,4BAA4B,sBAAsB,oBAAoB,4BAA4B,wBAAwB,kBAAkB,kBAAkB,YAAY,IAAI,YAAY,sBAAsB,qBAAqB,wBAAwB,0CAA0C,4BAA4B,QAAQ,+CAA+C,gBAAgB,KAAK,4BAA4B,QAAQ,8CAA8C,gBAAgB,KAAK,iBAAiB;AAAA,oGAAE,C","file":"js/chunk-505bc5a0.4567f419.js","sourcesContent":["// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"tslib\",\"../../../core/asyncUtils\",\"../../../core/Logger\",\"../../../core/promiseUtils\",\"../../../core/promiseUtils\",\"../../../core/watchUtils\",\"../../../core/accessorSupport/decorators\",\"../../../geometry/Extent\",\"../../../geometry/support/aaBoundingRect\",\"./LayerView3D\",\"./support/overlayImageUtils\",\"./support/projectExtentUtils\",\"../support/debugFlags\",\"../webgl-engine/lib/RenderGeometry\",\"../webgl-engine/lib/Texture\",\"../webgl-engine/materials/ImageMaterial\",\"../../layers/LayerView\",\"../../layers/RefreshableLayerView\"],(function(e,t,r,i,a,n,o,s,l,u,h,c,d,p,g,m,y,f,_,v){\"use strict\";var x=a.getLogger(\"esri.views.3d.layers.DynamicLayerView3D\"),w=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.drapeSourceType=0,t.hasDraped=!0,t.fullExtentInLocalViewSpatialReference=null,t.maximumDataResolution=null,t._images=new Array,t._extents=new Array,t._overlayExtents=new Array,t.updateWhenStationary=!0,t}return r.__extends(t,e),t.prototype.initialize=function(){var e=this;this.addResolvingPromise(p.toViewIfLocal(this).then((function(t){return e._set(\"fullExtentInLocalViewSpatialReference\",t)}))),this.updatingHandles.add(this,\"suspended\",(function(){return e._suspendedChangeHandler()})),this.handles.add(this.view.resourceController.scheduler.registerIdleStateCallbacks((function(){e._isScaleRangeActive()&&e.notifyChange(\"suspended\")}),(function(){}))),this._isScaleRangeLayer()&&this.updatingHandles.add(this.layer,\"scaleRangeId\",(function(){return e.notifyChange(\"suspended\")})),\"local\"===this.view.viewingMode&&this.updatingHandles.add(this.view.basemapTerrain,\"extent\",(function(){return e._overlayExtents.forEach((function(t,r){return e._updateImageExtent(r)}))}))},t.prototype.destroy=function(){this.clear()},t.prototype.setDrapingExtent=function(e,t,r,i,a,n){this._overlayExtents[e]={extent:h.create(t),spatialReference:r,resolution:i,renderLocalOrigin:a,pixelRatio:n},this._updateImageExtent(e)},t.prototype._updateImageExtent=function(e){var t=this._overlayExtents[e],r=this._clippedExtent(t.extent,b),i=d.computeImageExportSize(t.extent,r,t.resolution),a=t.pixelRatio*this.view.pixelRatio;if(\"imageMaxWidth\"in this.layer||\"imageMaxHeight\"in this.layer){var o=this.layer.imageMaxWidth,s=this.layer.imageMaxHeight;if(i.width>o){var l=o/i.width;i.height=Math.floor(i.height*l),i.width=o,a*=l}if(i.height>s){l=s/i.height;i.width=Math.floor(i.width*l),i.height=s,a*=l}}var u=this._extents[e];u&&h.equals(u.extent,r)&&!this._imageSizeDiffers(r,u.imageSize,i)||(this._extents[e]={extent:h.create(r),spatialReference:t.spatialReference,imageSize:i,pixelRatio:a},this.suspended||this._fetch(e).catch((function(e){n.isAbortError(e)||x.error(e)})))},t.prototype.clear=function(){for(var e=0;e0||i>0){var a=this.view.scale;if(a0&&a>r)return!1}}return!0},t.prototype.isUpdating=function(){return this._images.some((function(e){return!!e.loadingPromise}))},t.prototype.processResult=function(e,t,i){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return(t instanceof HTMLImageElement||t instanceof HTMLCanvasElement)&&(e.image=t),[2]}))}))},t.prototype.findExtentInfoAt=function(e){for(var t=0,r=this._extents;t1.5||c>1.5},t.prototype._fetch=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var i,a,s,l,c,d,p,g,m,y=this;return r.__generator(this,(function(f){switch(f.label){case 0:return this.suspended?[2]:(i=this._overlayExtents[e],a=this._extents[e],s=a.extent,l=new u(s[0],s[1],s[2],s[3],a.spatialReference),this._images[e]||(this._images[e]={texture:null,material:null,rendergeometry:null,loadingPromise:null,loadingAbortController:null,image:null,pixelData:null,renderExtent:h.create(s)}),(c=this._images[e]).loadingAbortController&&(c.loadingAbortController.abort(),c.loadingAbortController=null),0===l.width||0===l.height?(this._clearImage(e),[2]):(d=n.createAbortController(),c.loadingAbortController=d,n.onAbort(t,(function(){return d.abort()})),p=d.signal,g=this._waitFetchReady(p).then((function(){var e=r.__assign(r.__assign({requestAsImageElement:!0,pixelRatio:i.pixelRatio},y.getFetchOptions()),{signal:p}),t=a.imageSize,n=t.height,o=t.width;return y.layer.fetchImage(l,o,n,e)})).then((function(e){if(o.isAborted(p))throw x.warnOnce(\"A call to fetchImage resolved even though the request was aborted. fetchImage should not resolve if options.signal.aborted is true.\"),o.createAbortError();return y.processResult(c,e)})),c.loadingPromise=g,n.always(g,(function(){g===c.loadingPromise&&(c.loadingPromise=null,c.loadingAbortController=null)})),m=g.then((function(){h.set(c.renderExtent,s),y._createStageObjects(e,c.image),y.notifyChange(\"updating\"),y.emit(\"draped-data-change\")})).catch((function(e){throw e&&!n.isAbortError(e)&&x.error(e),y.notifyChange(\"updating\"),e})),this.notifyChange(\"updating\"),[4,m]));case 1:return f.sent(),[2]}}))}))},t.prototype.notifyGraphicUpdate=function(){},t.prototype._clearImage=function(e){var t=this._images[e],r=this.view._stage;t&&(t.rendergeometry&&(this.view.basemapTerrain.overlayManager.renderer.removeGeometries([t.rendergeometry],this,2),t.rendergeometry=null),t.texture&&(r.remove(4,t.texture.id),t.texture=null),t.material&&(r.remove(3,t.material.id),t.material=null),t.loadingAbortController&&(t.loadingAbortController.abort(),t.loadingAbortController=null),t.loadingPromise=null,t.image=null,t.pixelData=null)},t.prototype._createStageObjects=function(e,t){var r=this.view._stage,i=this._images[e];i.texture&&(r.remove(4,i.texture.id),i.texture=null),t?(i.texture=new y(t,\"dynamicLayer\",{width:t.width,height:t.height,preMultiplyAlpha:!0,wrap:{s:33071,t:33071}}),r.add(4,i.texture)):i.material&&(r.remove(3,i.material.id),i.material=null),!i.material&&i.texture?(i.material=new f({transparent:!0,textureId:i.texture.id},\"dynamicLayer\"),r.add(3,i.material)):i.material&&t&&i.material.setParameterValues({textureId:i.texture.id});var a=this.view.basemapTerrain.overlayManager.renderer;if(i.material){var n=void 0,o=this._overlayExtents[e].renderLocalOrigin;if(0===e)n=d.createGeometryForExtent(i.renderExtent,-1);else{if(1!==e)return void console.error(\"DynamicLayerView3D._createStageObjects: Invalid extent idx\");var s=this._images[0].renderExtent;if(!s)return;n=d.createOuterImageGeometry(s,i.renderExtent,-1)}var l=new m(n);l.material=i.material,l.origin=o,a.addGeometries([l],this,2),i.rendergeometry&&a.removeGeometries([i.rendergeometry],this,2),i.rendergeometry=l}else i.rendergeometry&&(a.removeGeometries([i.rendergeometry],this,2),i.rendergeometry=null)},t.prototype._isScaleRangeLayer=function(){return\"minScale\"in this.layer&&\"maxScale\"in this.layer},t.prototype._isScaleRangeActive=function(){return!!this._isScaleRangeLayer()&&(this.layer.minScale>0||this.layer.maxScale>0)},t.prototype._clippedExtent=function(e,t){if(\"local\"!==this.view.viewingMode)return h.set(t,e);var r=this.view.basemapTerrain,i=r.extent;return r.ready&&i?h.intersection(e,i,t):h.set(t,e)},t.prototype._suspendedChangeHandler=function(){this.suspended?(this.clear(),this.emit(\"draped-data-change\")):this.refresh()},t.prototype._waitFetchReady=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){switch(t.label){case 0:return this.updateWhenStationary?[4,s.whenOnce(this.view,\"stationary\",e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},r.__decorate([l.property()],t.prototype,\"layer\",void 0),r.__decorate([l.property({dependsOn:[\"view.scale\",\"layer.minScale\",\"layer.maxScale\"]})],t.prototype,\"suspended\",void 0),r.__decorate([l.property({type:Boolean})],t.prototype,\"hasDraped\",void 0),r.__decorate([l.property({readOnly:!0})],t.prototype,\"fullExtentInLocalViewSpatialReference\",void 0),r.__decorate([l.property()],t.prototype,\"updating\",void 0),t=r.__decorate([l.subclass(\"esri.views.3d.layers.DynamicLayerView3D\")],t)}(v.RefreshableLayerView(c.LayerView3D(_))),b=h.create();return w}));","// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"tslib\",\"@dojo/framework/shim/array\",\"../../../core/maybe\",\"../../../layers/support/fieldUtils\"],(function(e,i,t,l,s,d){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0}),i.getFetchPopupTemplate=i.getRequiredFields=void 0,i.getRequiredFields=function(e,i){return void 0===i&&(i=e.popupTemplate),t.__awaiter(this,void 0,void 0,(function(){var a,r,u,p,o,n,f,c,h;return t.__generator(this,(function(F){switch(F.label){case 0:return s.isSome(i)?[4,i.getRequiredFields(e.fields)]:[2,[]];case 1:return a=F.sent(),r=i.lastEditInfoEnabled,u=e.objectIdField,p=e.typeIdField,o=e.globalIdField,n=e.relationships,l.includes(a,\"*\")?[2,[\"*\"]]:r?[4,d.getFeatureEditFields(e)]:[3,3];case 2:return c=F.sent(),[3,4];case 3:c=[],F.label=4;case 4:return f=c,h=d.fixFields(e.fields,t.__spreadArrays(a,f)),p&&h.push(p),h&&u&&d.hasField(e.fields,u)&&-1===h.indexOf(u)&&h.push(u),h&&o&&d.hasField(e.fields,o)&&-1===h.indexOf(o)&&h.push(o),n&&n.forEach((function(i){var t=i.keyField;h&&t&&d.hasField(e.fields,t)&&-1===h.indexOf(t)&&h.push(t)})),[2,h]}}))}))},i.getFetchPopupTemplate=function(e,i){return e.popupTemplate?e.popupTemplate:s.isSome(i)&&i.defaultPopupTemplateEnabled&&s.isSome(e.defaultPopupTemplate)?e.defaultPopupTemplate:null}}));","// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"../../geometry\",\"../../core/maybe\",\"../../core/unitUtils\",\"../../renderers/support/clickToleranceUtils\"],(function(e,r,t,a,n,i){\"use strict\";function s(e,r,a,i){var s;if(void 0===i&&(i=new t.Extent),\"2d\"===a.type)s=r*a.resolution;else if(\"3d\"===a.type){var o=a.basemapTerrain,l=o.overlayManager,c=l?l.overlayPixelSizeInMapUnits(e):1;s=o&&!o.spatialReference.equals(a.spatialReference)?n.getMetersPerUnitForSR(o.spatialReference)/n.getMetersPerUnitForSR(a.spatialReference):r*c}var u=e.x-s,p=e.y-s,y=e.x+s,m=e.y+s,f=a.spatialReference;return i.xmin=Math.min(u,y),i.ymin=Math.min(p,m),i.xmax=Math.max(u,y),i.ymax=Math.max(p,m),i.spatialReference=f,i}Object.defineProperty(r,\"__esModule\",{value:!0}),r.intersectsDrapedGeometry=r.createQueryGeometry=void 0,r.createQueryGeometry=s,r.intersectsDrapedGeometry=function(e,r,t){var n=t.toMap(e);return a.isNone(n)?null:s(n,i.calculateTolerance(),t,o).intersects(r)?n:null};var o=new t.Extent}));","// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"../../../../geometry/support/aaBoundingRect\",\"../../webgl-engine/lib/GeometryData\",\"../../webgl-engine/lib/GeometryUtil\",\"../../webgl-engine/lib/Util\"],(function(t,e,r,a,n,i){\"use strict\";function o(t,e){var r=[[t[0],t[1],e],[t[2],t[1],e],[t[2],t[3],e],[t[0],t[3],e]];return n.createSquareGeometry(r)}Object.defineProperty(e,\"__esModule\",{value:!0}),e.createOuterImageGeometry=e.createGeometryForExtent=e.computeImageExportSize=void 0,e.computeImageExportSize=function(t,e,a){var n=r.width(t)/r.height(t),i={width:a,height:a};return n>1.0001?i.height=a/n:n<.9999&&(i.width=a*n),i.width=Math.round(i.width/(r.width(t)/r.width(e))),i.height=Math.round(i.height/(r.height(t)/r.height(e))),i},e.createGeometryForExtent=o,e.createOuterImageGeometry=function(t,e,n){if(!r.intersects(t,e))return o(e,n);for(var s=[t[1]-e[1],Math.min(t[3],e[3])-Math.max(t[1],e[1]),e[3]-t[3],123456],g=[t[0]-e[0],Math.min(t[2],e[2])-Math.max(t[0],e[0]),e[2]-t[2],123456],u=e[2]-e[0],m=e[3]-e[1],d=g[0]>0&&g[2]>0?3:2,w=s[0]>0&&s[2]>0?3:2,c=(w+1)*(d+1),l=new Float64Array(3*c),y=new Float32Array(2*c),x=new Uint32Array(6*(w*d-1)),A=0,f=0,v=0,M=0,O=0,p=0;p<4;p++){var G=s[p];if(!(G<=0)){for(var I=0,V=0;V<4;V++){var b=g[V];b<=0||(l[f++]=e[0]+I,l[f++]=e[1]+A,l[f++]=n,y[v++]=I/u,y[v++]=A/m,V<3&&p<3&&(1!==V||1!==p)&&(x[O++]=M,x[O++]=M+1,x[O++]=M+d+1,x[O++]=M+1,x[O++]=M+d+2,x[O++]=M+d+1),M++,I+=b)}A+=G}}var C={};C[i.VertexAttrConstants.POSITION]={size:3,data:l},C[i.VertexAttrConstants.NORMAL]={size:3,data:h},C[i.VertexAttrConstants.UV0]={size:2,data:y};for(var U={},z=new Uint32Array(x.length),F=0;F=e.maxScale,e.visible&&a&&o&&(e.sublayers?e.sublayers.forEach(l):e.popupEnabled&&(s=c.getFetchPopupTemplate(e,t.__assign(t.__assign({},r),{defaultPopupTemplateEnabled:!1})),n.isSome(s)&&p.push({sublayer:e,popupTemplate:s}))),[2]}))}))},d=s.sublayers.toArray().map(l),[4,o.all(d)]):[2,o.reject(new a(\"mapimagelayerview:fetchPopupFeatures\",\"Nothing to fetch without area\",{layer:s}))];case 1:return _.sent(),y=p.map((function(a){var o=a.sublayer,s=a.popupTemplate;return t.__awaiter(m,void 0,void 0,(function(){var a,u,p,l,d,y;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,o.load().catch((function(){}))];case 1:return t.sent(),a=o.createQuery(),u=n.isSome(r)?r.event:null,p=i.calculateTolerance({renderer:o.renderer,event:u}),l=this.createFetchPopupFeaturesQueryGeometry(e,p),a.geometry=l,d=a,[4,c.getRequiredFields(o,s)];case 2:return d.outFields=t.sent(),[4,this._loadArcadeModules(s)];case 3:return y=t.sent(),y&&y.arcadeUtils.hasGeometryOperations(s)||(a.maxAllowableOffset=l.width/p),[4,o.queryFeatures(a)];case 4:return[2,t.sent().features]}}))}))})),[4,o.eachAlways(y)];case 2:return[2,_.sent().reduce((function(e,r){return r.value?t.__spreadArrays(e,r.value):e}),[]).filter((function(e){return null!=e}))]}}))}))},r.prototype.canResume=function(){var r,t;return!!e.prototype.canResume.call(this)&&(null===(t=null===(r=this.imageParameters)||void 0===r?void 0:r.timeExtent)||void 0===t?!0:!t.isEmpty)},r.prototype._loadArcadeModules=function(e){if(e.get(\"expressionInfos.length\"))return u.loadArcade()},t.__decorate([s.property()],r.prototype,\"imageParameters\",void 0),t.__decorate([s.property()],r.prototype,\"layer\",void 0),t.__decorate([s.property({dependsOn:[\"imageParameters.timeExtent\"]})],r.prototype,\"suspended\",void 0),r=t.__decorate([s.subclass(\"esri.views.layers.MapImageLayerView\")],r)}(e)}}));","// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"tslib\",\"../core/shaderLibrary/Slice.glsl\",\"../core/shaderLibrary/util/View.glsl\",\"../core/shaderTechnique/ReloadableShaderModule\",\"../core/shaderTechnique/ShaderTechnique\",\"../core/shaderTechnique/ShaderTechniqueConfiguration\",\"../lib/DefaultVertexAttributeLocations\",\"../lib/StencilUtils\",\"./ImageMaterial.glsl\",\"../../../webgl/Program\",\"../../../webgl/renderState\",\"../../../webgl/renderState\",\"@dojo/framework/shim/Promise\"],(function(e,t,r,i,a,o,n,l,c,s,u,d,p,h){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.ImageMaterialTechniqueConfiguration=t.ImageMaterialTechnique=void 0;var g=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n.prototype.initializeProgram=function(e){var t=n.shader.get(),r=this.configuration,i=t.build({slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:r.sliceHighlightDisabled,sliceEnabledForVertexPrograms:!1});return new d(e.rctx,i.generateSource(\"vertex\"),i.generateSource(\"fragment\"),c.Default3D)},n.prototype.bindPass=function(e,t,r){a.View.bindProjectionMatrix(this.program,r.camera.projectionMatrix),this.program.setUniform1f(\"opacity\",t.opacity)},n.prototype.bindDraw=function(e){a.View.bindView(this.program,e),i.Slice.bindUniformsWithOrigin(this.program,this.configuration,e)},n.prototype.initializePipeline=function(){var e=this.configuration,t=0===e.output&&e.transparent?p.simpleBlendingParams(1,771):null,r=function(r){return h.makePipelineState({blending:t,polygonOffset:e.polygonOffset&&f,culling:(i=e.cullFace,0!==i&&{face:1===i?1028:1029,mode:2305}),depthTest:s.depthCompareLess,depthWrite:e.writeDepth&&h.defaultDepthWriteParams,colorWrite:h.defaultColorWriteParams,stencilWrite:e.sceneHasOcludees?s.stencilWriteMaskOn:null,stencilTest:e.sceneHasOcludees?r?s.stencilToolMaskBaseParams:s.stencilBaseAllZerosParams:null});var i};return this._occludeeState=r(!0),r(!1)},Object.defineProperty(n.prototype,\"opaqueOccludeeState\",{get:function(){return this._occludeeState},enumerable:!1,configurable:!0}),n.shader=new o.ReloadableShaderModule(u,(function(){return new Promise((function(t,r){e([\"./ImageMaterial.glsl\"],t,r)}))})),n}(n.ShaderTechnique);t.ImageMaterialTechnique=g;var f={factor:1,units:1},m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.output=0,t.cullFace=0,t.slicePlaneEnabled=!1,t.sliceHighlightDisabled=!1,t.transparent=!1,t.polygonOffset=!1,t.writeDepth=!0,t.sceneHasOcludees=!1,t}return r.__extends(t,e),r.__decorate([l.parameter({count:7})],t.prototype,\"output\",void 0),r.__decorate([l.parameter({count:3})],t.prototype,\"cullFace\",void 0),r.__decorate([l.parameter()],t.prototype,\"slicePlaneEnabled\",void 0),r.__decorate([l.parameter()],t.prototype,\"sliceHighlightDisabled\",void 0),r.__decorate([l.parameter()],t.prototype,\"transparent\",void 0),r.__decorate([l.parameter()],t.prototype,\"polygonOffset\",void 0),r.__decorate([l.parameter()],t.prototype,\"writeDepth\",void 0),r.__decorate([l.parameter()],t.prototype,\"sceneHasOcludees\",void 0),t}(l.ShaderTechniqueConfiguration);t.ImageMaterialTechniqueConfiguration=m}));","// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"tslib\",\"../lib/GLMaterialTexture\",\"../lib/Material\",\"./internal/DefaultBufferWriter\",\"./internal/MaterialUtil\",\"./internal/MaterialUtil\",\"../shaders/ImageMaterialTechnique\"],(function(e,t,i,a,r,n,s,u,c){\"use strict\";var o=function(e){function t(t,i){var a=e.call(this,i)||this;return a.supportsEdges=!0,a.techniqueConfig=new c.ImageMaterialTechniqueConfiguration,a.params=u.copyParameters(t,p),a}return i.__extends(t,e),t.prototype.setParameterValues=function(e){s.updateParameters(this.params,e)&&this.parametersChanged()},t.prototype.getParameters=function(){return this.params},t.prototype.getTechniqueConfig=function(e){return this.techniqueConfig.output=e,this.techniqueConfig.cullFace=this.params.cullFace,this.techniqueConfig.slicePlaneEnabled=this.params.slicePlaneEnabled,this.techniqueConfig.transparent=this.params.transparent,this.techniqueConfig.writeDepth=this.params.writeDepth,this.techniqueConfig.sceneHasOcludees=this.params.sceneHasOcludees,this.techniqueConfig},t.prototype.intersect=function(e,t,i,a,r,n,s){u.intersectTriangleGeometry(e,t,a,r,n,void 0,s)},t.prototype.getGLMaterial=function(e){return 0===e.output||4===e.output?new h(e):void 0},t.prototype.createBufferWriter=function(){return new n.DefaultBufferWriter(n.PositionUVLayout)},t}(r.Material),h=function(e){function t(t){var a=e.call(this,i.__assign(i.__assign({},t),t.material.getParameters()))||this;return a.updateParameters(),a}return i.__extends(t,e),t.prototype.updateParameters=function(){var e=this.material.getParameters();this.updateTexture(e.textureId),this.technique=this.techniqueRep.acquireAndReleaseExisting(c.ImageMaterialTechnique,this.material.getTechniqueConfig(this.output),this.technique)},t.prototype.beginSlot=function(e){return 4===this.output?3===e:e===(this.technique.configuration.transparent?this.technique.configuration.writeDepth?5:8:3)},t.prototype._updateOccludeeState=function(e){e.hasOccludees!==this.material.getParameters().sceneHasOcludees&&(this.material.setParameterValues({sceneHasOcludees:e.hasOccludees}),this.updateParameters())},t.prototype.ensureParameters=function(e){0===this.output&&this._updateOccludeeState(e)},t.prototype.bind=function(e,t){e.bindProgram(this.technique.program),this.bindTexture(e,this.technique.program),this.bindTextureScale(e,this.technique.program),this.technique.bindPass(e,this.material.getParameters(),t)},t.prototype.getPipelineState=function(e,t){return t?this.technique.opaqueOccludeeState:this.technique.pipeline},t}(a),p={transparent:!1,writeDepth:!0,slicePlaneEnabled:!1,cullFace:0,sceneHasOcludees:!1,opacity:1,textureId:null,initTextureTransparent:!0};return o}));","// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\"],(function(e,r){\"use strict\";function t(e,r){return r?\"xoffset\"in r&&r.xoffset?Math.max(e,Math.abs(r.xoffset)):\"yoffset\"in r&&r.yoffset?Math.max(e,Math.abs(r.yoffset||0)):e:e}function n(e,r){return\"number\"==typeof e?e:e&&e.stops&&e.stops.length?function(e){for(var r=0,t=0,n=0;n