// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define("exports ../../core/byteSizeEstimations ../../core/has ../../core/typedArrayUtil ../../core/uid ../../geometry/SpatialReference ../../geometry/support/aaBoundingBox ../../geometry/support/aaBoundingRect ../../geometry/support/quantizationUtils ../../geometry/support/typeUtils ../support/Field ./dehydratedFeatureComparison".split(" "),function(e,w,J,x,y,z,k,l,m,A,B,C){function D(a,b,c,h){return{uid:y.generateUID(),objectId:h&&a.attributes?a.attributes[h]:null,attributes:a.attributes,geometry:q(a.geometry, b,c),visible:!0}}function q(a,b,c){if(null==a)return null;switch(b){case "point":return{x:a.x,y:a.y,z:a.z,m:a.m,hasZ:null!=a.z,hasM:null!=a.m,type:"point",spatialReference:c};case "polyline":return{paths:a.paths,hasZ:!!a.hasZ,hasM:!!a.hasM,type:"polyline",spatialReference:c};case "polygon":return{rings:a.rings,hasZ:!!a.hasZ,hasM:!!a.hasM,type:"polygon",spatialReference:c};case "multipoint":return{points:a.points,hasZ:!!a.hasZ,hasM:!!a.hasM,type:"multipoint",spatialReference:c}}}function r(a){if(null== a)return 0;let b=32;switch(a.type){case "point":b+=42;break;case "polyline":case "polygon":var c=0;const h=2+(a.hasZ?1:0)+(a.hasM?1:0);a="polyline"===a.type?a.paths:a.rings;for(const f of a)c+=f.length;b+=8*c*h+64;b+=128*c;b=b+34+32*(a.length+1);break;case "multipoint":c=a.points.length;b+=8*c*(2+(a.hasZ?1:0)+(a.hasM?1:0))+64;b+=128*c;b=b+34+32;break;case "extent":b+=98;a.hasM&&(b+=32);a.hasZ&&(b+=32);break;case "mesh":b+=x.estimateSize(a.vertexAttributes.position,a.vertexAttributes.normal,a.vertexAttributes.uv, a.vertexAttributes.tangent)}return b}function t(a,b){return null!=a.objectId?a.objectId:a.attributes&&b?a.attributes[b]:null}function u(a,b,c,h){if(b?.size&&null!=c&&a)for(const f in a){if(!b.has(f))continue;const n=a[f];"string"===typeof n&&n.length>c&&(h(f),a[f]="")}}class E{constructor(a,b,c){this.uid=a;this.geometry=b;this.attributes=c;this.visible=!0;this.centroid=this.objectId=null}}class F{constructor(){this.exceededTransferLimit=!1;this.features=[];this.fields=[];this.hasZ=this.hasM=!1;this.transform= this.spatialReference=this.geohashFieldName=this.geometryProperties=this.globalIdFieldName=this.objectIdFieldName=this.geometryType=null}}e.equals=C.equals;e.DehydratedFeatureClass=E;e.DehydratedFeatureSetClass=F;e.computeAABB=function(a,b){k.empty(b);"mesh"===a.type&&(a=a.extent);switch(a.type){case "point":b[0]=b[3]=a.x;b[1]=b[4]=a.y;a.hasZ&&(b[2]=b[5]=a.z);break;case "polyline":for(var c=0;c{const g=D(d,c,h,a.objectIdFieldName);d=g.geometry;u(g.attributes,H,G,I=>{p??=[];const v=t(g,n);null!=v&&p.push({objectId:v,attribute:I})});if(null!=d&&f)switch(d.type){case "point":g.geometry=m.unquantizePoint(f,d,d);break;case "multipoint":g.geometry=m.unquantizeMultipoint(f,d,d);break;case "polygon":g.geometry=m.unquantizePolygon(f,d,d);break;case "polyline":g.geometry=m.unquantizePolyline(f,d,d);break;case "extent":g.geometry=d;break;case "mesh":g.geometry=d}return g}); return{geometryType:c,features:b,spatialReference:h,fields:a.fields?.map(d=>B.fromJSON(d))??[],objectIdFieldName:a.objectIdFieldName,globalIdFieldName:a.globalIdFieldName,geohashFieldName:a.geohashFieldName,geometryProperties:a.geometryProperties,hasZ:a.hasZ,hasM:a.hasM,exceededTransferLimit:a.exceededTransferLimit,transform:null,missingAttributes:p}};e.fromJSONGeometry=q;e.getObjectId=t;e.hasGeometry=function(a){return null!=a.geometry};e.hasVertices=function(a){if(null==a)return!1;switch(a.type){case "extent":case "point":return!0; case "polyline":for(const b of a.paths)if(0