// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.7/esri/copyright.txt for details. //>>built define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/_base/lang ../Graphic ../PopupTemplate ../request ../core/Collection ../core/CollectionFlattener ../core/Handles ../core/promiseUtils ../core/accessorSupport/decorators ../core/accessorSupport/write ../geometry/Extent ../geometry/SpatialReference ./Layer ./mixins/OperationalLayer ./mixins/PortalLayer ./mixins/RefreshableLayer ./mixins/ScaleRangeLayer ./support/ExportWMSImageParameters ./support/WMSSublayer ./support/wmsUtils".split(" "), function(m,J,w,e,g,x,y,l,z,A,n,h,b,B,p,q,C,D,E,F,G,H,r,t){function I(b,c){return b.some(function(a){for(var f in a)if(B.willPropertyWrite(a,f,null,c))return!0;return!1})}function v(b,c,a){var f=[],d=new Map;b.forEach(function(b){var e=new r;e.read(b,c);a&&-1===a.indexOf(e.name)&&(e.visible=!1);d[e.id]=e;null!=b.parentLayerId&&-1!==b.parentLayerId?(b=d[b.parentLayerId],b.sublayers||(b.sublayers=[]),b.sublayers.unshift(e)):f.unshift(e)});return f}return function(u){function c(a,f){var d=u.call(this)|| this;d._sublayersHandles=new n;d.allSublayers=new A({root:d,rootCollectionNames:["sublayers"],getChildrenFunction:function(a){return a.sublayers}});d.customParameters=null;d.customLayerParameters=null;d.copyright=null;d.description=null;d.fullExtent=null;d.fullExtents=null;d.featureInfoFormat=null;d.featureInfoUrl=null;d.imageFormat=null;d.imageMaxHeight=2048;d.imageMaxWidth=2048;d.imageTransparency=!0;d.legendEnabled=!0;d.mapUrl=null;d.operationalLayerType="WMS";d.spatialReference=null;d.spatialReferences= null;d.sublayers=null;d.type="wms";d.version=null;d.watch("sublayers",function(a,f){f&&(f.forEach(function(a){a.layer=null}),d._sublayersHandles.removeAll(),d._sublayersHandles=null);a&&(a.forEach(function(a){a.parent=d;a.layer=d}),d._sublayersHandles||(d._sublayersHandles=new n),d._sublayersHandles.add([a.on("after-add",function(a){a=a.item;a.parent=d;a.layer=d}),a.on("after-remove",function(a){a=a.item;a.parent=null;a.layer=null})]))},!0);return d}w(c,u);c.prototype.normalizeCtorArgs=function(a, f){return"string"===typeof a?g.mixin({url:a},f):a};c.prototype.load=function(){var a=this;this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]}).then(function(){return a._fetchService()}));return this.when()};c.prototype.readFullExtentFromItemOrMap=function(a,f,d){a=f.extent;return(f=f.spatialReferences)&&0