// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built require({cache:{"esri/layers/graphics/sources/WFSSource":function(){define("exports ../../../chunks/tslib.es6 ../../../geometry ../../../core/Error ../../../core/has ../../../core/Loadable ../../../core/Logger ../../../core/promiseUtils ../../../core/workers/workers ../../../core/accessorSupport/decorators/property ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../../geometry/support/typeUtils ./support/clientSideDefaults ../../ogc/wfsUtils ../../../rest/support/FeatureSet ../../../time/timeZoneUtils ../../../geometry/Extent".split(" "), function(f,A,G,v,C,x,q,J,M,K,L,W,H,k,X,Z,l,U){f.WFSSource=class extends x{constructor(){super(...arguments);this._workerHandler=this._connection=null;this.capabilities=k.createCapabilities(!1,!1);this.type="wfs";this.refresh=J.debounce(async()=>{await this.load();const {extent:n}=await this._workerHandler.refresh({customParameters:this.layer.customParameters,maxRecordCount:this.layer.maxRecordCount,maxTotalRecordCount:this.layer.maxTotalRecordCount,maxPageCount:this.layer.maxPageCount});n&&(this.sourceJSON.extent= n);return{dataChanged:!0,updates:{extent:this.sourceJSON.extent}}})}load(n){this.addResolvingPromise(this._startWorker({signal:null!=n?n.signal:null}));return Promise.resolve(this)}destroy(){this._connection?.close();this._workerHandler=this._connection=null}async openPorts(){await this.load();return this._connection.openPorts()}async queryFeatures(n,w={}){n=await this.queryFeaturesJSON(n,w);return Z.fromJSON(n)}async queryFeaturesJSON(n,w={}){await this.load(w);return this._workerHandler.queryFeatures(n? n.toJSON():void 0,w)}async queryFeatureCount(n,w={}){await this.load(w);return this._workerHandler.queryFeatureCount(n?n.toJSON():void 0,w)}async queryObjectIds(n,w={}){await this.load(w);return this._workerHandler.queryObjectIds(n?n.toJSON():void 0,w)}async queryExtent(n,w={}){await this.load(w);n=await this._workerHandler.queryExtent(n?n.toJSON():void 0,w);return{count:n.count,extent:U.fromJSON(n.extent)}}async querySnapping(n,w={}){await this.load(w);return this._workerHandler.querySnapping(n, w)}async _createLoadOptions(n){const {url:w,customParameters:b,name:d,namespaceUri:m,fields:u,geometryType:D,maxRecordCount:E,maxPageCount:F,maxTotalRecordCount:S,swapXY:Q}=this.layer;var B="defaults"===this.layer.originOf("spatialReference")?void 0:this.layer.spatialReference;if(!w)throw new v("wfs-layer:missing-url","WFSLayer must be created with a url");this.wfsCapabilities||(this.wfsCapabilities=await X.getCapabilities(w,{customParameters:b,...n}));n=["fields","geometryType","name","namespaceUri", "swapXY"].some(I=>null==this.layer[I])?await X.getWFSLayerInfo(this.wfsCapabilities,d,m,{spatialReference:B,customParameters:b,signal:n?.signal}):{...X.prepareWFSLayerFields(u??[]),geometryType:D,name:d,namespaceUri:m,spatialReference:B,swapXY:Q};B=X.findFeatureType(this.wfsCapabilities.readFeatureTypes(),n.name,n.namespaceUri);const V=H.featureGeometryTypeKebabDictionary.toJSON(n.geometryType);var {operations:R}=this.wfsCapabilities;const N=R.GetFeature.url;R=R.GetFeature.outputFormat;return{customParameters:b, featureType:B,fields:n.fields?.map(I=>I.toJSON())??[],geometryField:n.geometryField,geometryType:V,getFeatureUrl:N,getFeatureOutputFormat:R,maxRecordCount:E,maxPageCount:F,maxTotalRecordCount:S,objectIdField:n.objectIdField,spatialReference:n.spatialReference?.toJSON(),swapXY:!!n.swapXY}}async _startWorker(n){const [w,b]=await J.eachAlways([this._createLoadOptions(n),M.open("WFSSourceWorker",{...n,strategy:C("feature-layers-workers")?"dedicated":"local",registryTarget:this})]);var d=w.error||b.error|| null;const m=b.value||null;if(d)throw m&&m.close(),d;d=w.value;this._connection=b.value;this._workerHandler=this._connection.createInvokeProxy();n=await this._workerHandler.load(d,n);for(const u of n.warnings)q.getLogger(this.layer).warn("#load()",`${u.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:u});this.sourceJSON={dateFieldsTimeReference:{timeZoneIANA:l.utc},extent:n.extent,fields:d.fields,geometryType:d.geometryType,objectIdField:d.objectIdField, geometryField:d.geometryField,drawingInfo:k.createDrawingInfo(d.geometryType),name:d.featureType.title,wfsInfo:{name:d.featureType.name,featureUrl:d.getFeatureUrl,maxFeatures:d.maxRecordCount,swapXY:d.swapXY,supportedSpatialReferences:d.featureType.supportedSpatialReferences,version:"2.0.0",wfsNamespace:d.featureType.namespaceUri}}}};A.__decorate([K.property()],f.WFSSource.prototype,"capabilities",void 0);A.__decorate([K.property({constructOnly:!0})],f.WFSSource.prototype,"layer",void 0);A.__decorate([K.property()], f.WFSSource.prototype,"sourceJSON",void 0);A.__decorate([K.property()],f.WFSSource.prototype,"type",void 0);A.__decorate([K.property()],f.WFSSource.prototype,"wfsCapabilities",void 0);f.WFSSource=A.__decorate([W.subclass("esri.layers.graphics.sources.WFSSource")],f.WFSSource);Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})})},"esri/layers/ogc/wfsUtils":function(){define("exports ../../geometry ../../request ../../core/Error ../../core/iteratorUtils ../../core/urlUtils ../../geometry/projection ../../geometry/support/spatialReferenceUtils ../../geometry/support/typeUtils ../graphics/sources/geojson/geojson ./xmlUtils ../support/arcgisLayerUrl ../support/Field ../support/fieldUtils ../../geometry/Extent ../../geometry/SpatialReference".split(" "), function(f,A,G,v,C,x,q,J,M,K,L,W,H,k,X,Z){function l(a){a=N(a);O(a);ba(a);a=a.firstElementChild;const c=C.cache(b(a));return{operations:n(a),get featureTypes(){return Array.from(c())},readFeatureTypes:c}}function U(a){for(const c of ca){const e=a.findIndex(g=>g.toLowerCase()===c);if(0<=e)return a[e]}return null}function n(a){let c=!1;const e={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}},g=[],h=[];L.visitXML(a,{OperationsMetadata:{Parameter:r=> {if("outputFormat"===r.getAttribute("name"))return{AllowedValues:{Value:({textContent:t})=>{t&&g.push(t)}}}},Operation:r=>{switch(r.getAttribute("name")){case "GetCapabilities":return{DCP:{HTTP:{Get:t=>{e.GetCapabilities.url=t.getAttribute("xlink:href")}}}};case "DescribeFeatureType":return{DCP:{HTTP:{Get:t=>{e.DescribeFeatureType.url=t.getAttribute("xlink:href")}}}};case "GetFeature":return{DCP:{HTTP:{Get:t=>{e.GetFeature.url=t.getAttribute("xlink:href")}}},Parameter:t=>{if("outputFormat"===t.getAttribute("name"))return{AllowedValues:{Value:({textContent:P})=> {P&&h.push(P)}}}}}}},Constraint:r=>{switch(r.getAttribute("name")){case "KVPEncoding":return{DefaultValue:t=>{c="true"===t.textContent.toLowerCase()}};case "ImplementsResultPaging":return{DefaultValue:t=>{e.GetFeature.supportsPagination="true"===t.textContent.toLowerCase()}}}}}});e.GetFeature.outputFormat=U(h)??U(g);if(!c)throw new v("wfs-layer:kvp-encoding-not-supported","WFS service doesn't support key/value pair (KVP) encoding");if(null==e.GetFeature.outputFormat)throw new v("wfs-layer:geojson-not-supported", "WFS service doesn't support GeoJSON output format");return e}function w(a){a=parseInt(a.textContent?.match(/(?\d+$)/i)?.groups?.wkid??"",10);if(!Number.isNaN(a))return a}function b(a){return L.iterateXML(a,{FeatureTypeList:{FeatureType:c=>{const e={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",defaultSpatialReference:4326,supportedSpatialReferences:[]},g=new Set;L.visitXML(c,{Name:h=>{const {name:r,prefix:t}=I(h.textContent);e.typeName= `${t}:${r}`;e.name=r;e.namespacePrefix=t;e.namespaceUri=h.lookupNamespaceURI(t)},Abstract:h=>{e.description=h.textContent},Title:h=>{e.title=h.textContent},WGS84BoundingBox:h=>{e.extent=X.fromJSON(d(h))},DefaultCRS:h=>{if(h=w(h))e.defaultSpatialReference=h,g.add(h)},OtherCRS:h=>{(h=w(h))&&g.add(h)}});e.title||(e.title=e.name);g.add(4326);e.supportedSpatialReferences.push(...g);return e}}})}function d(a){let c,e,g,h;for(const r of a.children)switch(r.localName){case "LowerCorner":[c,e]=r.textContent.split(" ").map(t=> Number.parseFloat(t));break;case "UpperCorner":[g,h]=r.textContent.split(" ").map(t=>Number.parseFloat(t))}return{xmin:c,ymin:e,xmax:g,ymax:h,spatialReference:J.wgs84}}function m(a,c,e){return C.find(a,g=>e?g.name===c&&g.namespaceUri===e:g.typeName===c||g.name===c)}async function u(a,c,e,g={}){a=a.readFeatureTypes();e=c?m(a,c,e):a.next().value;({spatialReference:a=new Z({wkid:e?.defaultSpatialReference})}=g);if(null==e){if(c)throw new v("wfs-layer:feature-type-not-found",`The type '${c}' could not be found in the service`); throw new v("wfs-layer:empty-service","The service is empty");}if((c=e.extent)&&!J.equals(c.spatialReference,a))try{await q.initializeProjection(c.spatialReference,a,void 0,g),c=q.project(c,a)}catch{throw new v("wfs-layer:unsupported-spatial-reference","Projection not supported");}return{extent:c,spatialReference:a,featureType:e}}async function D(a,c,e,g={}){const {typeName:h}=c,[r,t]=await Promise.allSettled([S(a.operations.DescribeFeatureType.url,h,g),F(a,h,e,g)]);a=p=>new v("wfs-layer:getWFSLayerTypeInfo-error", `An error occurred while getting info about the feature type '${h}'`,{error:p});if("rejected"===r.status)throw a(r.reason);if("rejected"===t.status)throw a(t.reason);const {fields:P,errors:z}=r.value??{};a=r.value?.geometryType||t.value?.geometryType;c=t.value?.swapXY??!1;if(null==a)throw new v("wfs-layer:unknown-geometry-type",`The geometry type could not be determined for type '${h}`,{typeName:h,geometryType:a,fields:P,errors:z});return{...E(P??[]),geometryType:a,swapXY:c}}function E(a){const c= a.find(g=>"geometry"===g.type);let e=a.find(g=>"oid"===g.type);a=a.filter(g=>"geometry"!==g.type);e||(e=new H({name:"__esri_wfs_id__",type:"oid",alias:"__esri_wfs_id__"}),a.unshift(e));return{geometryField:c?.name??null,objectIdField:e.name,fields:a}}async function F(a,c,e,g={}){let h,r=!1;const [t,P]=await Promise.all([V(a.operations.GetFeature.url,c,e,a.operations.GetFeature.outputFormat,{...g,count:1}),G(a.operations.GetFeature.url,{responseType:"text",query:R(c,e,void 0,{...g,count:1}),signal:g?.signal})]); if(a="FeatureCollection"===t.type&&t.features[0]?.geometry){h=M.featureGeometryTypeKebabDictionary.fromJSON(K.getGeometryType(a.type));switch(a.type){case "Point":var z=a.coordinates;break;case "LineString":case "MultiPoint":z=a.coordinates[0];break;case "MultiLineString":case "Polygon":z=a.coordinates[0][0];break;case "MultiPolygon":z=a.coordinates[0][0][0]}if(c=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(P.data))a=z[0].toFixed(3),z=z[1].toFixed(3),e=parseFloat(c[1]).toFixed(3),c= parseFloat(c[2]).toFixed(3),a===c&&z===e&&(r=!0)}return{geometryType:h,swapXY:r}}async function S(a,c,e){a=await G(a,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:"2.0.0",TYPENAME:c,TYPENAMES:c,...e?.customParameters},signal:e?.signal});return Q(c,a.data)}function Q(a,c){const {name:e}=I(a);c=N(c);ba(c);var g=C.find(L.iterateXML(c.firstElementChild,{element:h=>h}),h=>h.getAttribute("name")===e);if(null!=g){const h=g.getAttribute("type");if(g=h?C.find(L.iterateXML(c.firstElementChild, {complexType:r=>r}),r=>r.getAttribute("name")===I(h).name):C.find(L.iterateXML(g,{complexType:r=>r}),()=>!0))return B(g)}throw new v("wfs-layer:feature-type-not-found",`Type '${a}' not found in document`,{document:(new XMLSerializer).serializeToString(c)});}function B(a){const c=[],e=[];let g=void 0;var h=L.iterateXML(a,{complexContent:{extension:{sequence:{element:r=>r}}}});for(const r of h){h=r.getAttribute("name");if(!h)continue;let t,P;r.hasAttribute("type")?t=I(r.getAttribute("type")).name:L.visitXML(r, {simpleType:{restriction:y=>{t=I(y.getAttribute("base")).name;return{maxLength:T=>{P=+T.getAttribute("value")}}}}});if(!t)continue;const z="true"===r.getAttribute("nillable");let p=!1;switch(t.toLowerCase()){case "integer":case "nonpositiveinteger":case "negativeinteger":case "long":case "int":case "short":case "byte":case "nonnegativeinteger":case "unsignedlong":case "unsignedint":case "unsignedshort":case "unsignedbyte":case "positiveinteger":e.push(new H({name:h,alias:h,type:"integer",nullable:z, length:k.getFieldDefaultLength("integer")}));break;case "float":case "double":case "decimal":e.push(new H({name:h,alias:h,type:"double",nullable:z,length:k.getFieldDefaultLength("double")}));break;case "boolean":case "string":case "gyearmonth":case "gyear":case "gmonthday":case "gday":case "gmonth":case "anyuri":case "qname":case "notation":case "normalizedstring":case "token":case "language":case "idrefs":case "entities":case "nmtoken":case "nmtokens":case "name":case "ncname":case "id":case "idref":case "entity":case "duration":case "time":e.push(new H({name:h, alias:h,type:"string",nullable:z,length:P??k.getFieldDefaultLength("string")}));break;case "datetime":case "date":e.push(new H({name:h,alias:h,type:"date",nullable:z,length:P??k.getFieldDefaultLength("date")}));break;case "pointpropertytype":g="point";p=!0;break;case "multipointpropertytype":g="multipoint";p=!0;break;case "curvepropertytype":case "multicurvepropertytype":case "multilinestringpropertytype":g="polyline";p=!0;break;case "surfacepropertytype":case "multisurfacepropertytype":case "multipolygonpropertytype":g= "polygon";p=!0;break;case "geometrypropertytype":case "multigeometrypropertytype":p=!0;c.push(new v("wfs-layer:unknown-geometry-type",`geometry type '${t}' is not supported`,{type:(new XMLSerializer).serializeToString(a)}));break;default:c.push(new v("wfs-layer:unknown-field-type",`Unknown field type '${t}'`,{type:(new XMLSerializer).serializeToString(a)}))}p&&e.push(new H({name:h,alias:h,type:"geometry",nullable:z}))}for(const r of e)if("integer"===r.type&&!r.nullable&&da.has(r.name.toLowerCase())){r.type= "oid";break}return{geometryType:g,fields:e,errors:c}}async function V(a,c,e,g,h){({data:a}=await G(a,{responseType:"text",query:R(c,e,g,h),signal:h?.signal}));a=a.replaceAll(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{return JSON.parse(a)}catch(r){throw new v("wfs-layer:malformed-json","Error while parsing the\u00a0response",{response:a,error:r});}}function R(a,c,e,g){return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:"2.0.0",TYPENAMES:a,OUTPUTFORMAT:e,SRSNAME:"EPSG:"+("number"===typeof c?c:c.wkid), STARTINDEX:g?.startIndex,COUNT:g?.count,...g?.customParameters}}function N(a){return(new DOMParser).parseFromString(a.trim(),"text/xml")}function I(a){const [c,e]=a.split(":");return{prefix:e?c:"",name:e??c}}function O(a){if((a=a.firstElementChild?.getAttribute("version"))&&"2.0.0"!==a)throw new v("wfs-layer:unsupported-wfs-version",`Unsupported WFS version ${a}. Supported version: ${"2.0.0"}`);}function ba(a){let c="",e="";L.visitXML(a.firstElementChild,{Exception:g=>{c=g.getAttribute("exceptionCode"); return{ExceptionText:h=>{e=h.textContent}}}});if(c)throw new v(`wfs-layer:${c}`,e);}function Y(a,c,e){const g={wkid:c.defaultSpatialReference};e=null!=e?.wkid?{wkid:e.wkid}:g;a=W.isArcGISUrl(a)||e.wkid&&c.supportedSpatialReferences.includes(e.wkid)?{wkid:e.wkid}:{wkid:c.defaultSpatialReference};return{spatialReference:e,getFeatureSpatialReference:a}}const ca=["json","application/json","geojson","application/json; subtype\x3dgeojson","application/geo+json"],da=new Set(["objectid","fid"]);f.describeFeatureType= S;f.findFeatureType=m;f.getCapabilities=async function(a,c){c=await G(a,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:"2.0.0",...c?.customParameters},signal:c?.signal});c=l(c.data);x.isHTTPSProtocol(a)&&(x.hasSameOrigin(a,c.operations.DescribeFeatureType.url,!0)&&(c.operations.DescribeFeatureType.url=x.toHTTPS(c.operations.DescribeFeatureType.url)),x.hasSameOrigin(a,c.operations.GetFeature.url,!0)&&(c.operations.GetFeature.url=x.toHTTPS(c.operations.GetFeature.url))); return c};f.getFeature=V;f.getFeatureCount=async function(a,c,e){a=await G(a,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:"2.0.0",TYPENAMES:c,RESULTTYPE:"hits",...e?.customParameters},signal:e?.signal});a=/numberMatched=["'](?\d+)["']/gi.exec(a.data);if(a?.groups)return+a.groups.numberMatched};f.getFeatureTypeInfo=u;f.getGetFeatureSpatialReference=Y;f.getWFSLayerInfo=async function(a,c,e,g={}){const {featureType:h,extent:r}=await u(a,c,e,g);({spatialReference:c}= Y(a.operations.GetFeature.url,h,g.spatialReference));const {fields:t,geometryType:P,swapXY:z,objectIdField:p,geometryField:y}=await D(a,h,c,g);return{url:a.operations.GetCapabilities.url,name:h.name,namespaceUri:h.namespaceUri,fields:t,geometryField:y,geometryType:P,objectIdField:p,spatialReference:g.spatialReference??new Z({wkid:h.defaultSpatialReference}),extent:r,swapXY:z,wfsCapabilities:a,customParameters:g.customParameters}};f.parseDescribeFeatureTypeResponse=Q;f.parseGetCapabilitiesResponse= l;f.prepareWFSLayerFields=E;f.wfsOidFieldName="__esri_wfs_id__";Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})})},"esri/layers/graphics/sources/geojson/geojson":function(){define("exports ../../../../core/date ../../../../core/Error ../../../../geometry/support/spatialReferenceUtils ../../OptimizedFeature ../../OptimizedGeometry ../../../support/fieldUtils".split(" "),function(f,A,G,v,C,x,q){function*J(b){switch(b.type){case "Feature":yield b;break;case "FeatureCollection":for(const d of b.features)d&& (yield d)}}function*M(b){if(b)switch(b.type){case "Point":yield b.coordinates;break;case "LineString":case "MultiPoint":yield*b.coordinates;break;case "MultiLineString":case "Polygon":for(const d of b.coordinates)yield*d;break;case "MultiPolygon":for(const d of b.coordinates)for(const m of d)yield*m}}function*K(b,d={}){const {geometryType:m,objectIdField:u}=d;for(const D of b){const {geometry:E,properties:F,id:S}=D;if(E&&w[E.type]!==m)continue;b=F||{};let Q=void 0;u&&(Q=b[u],null==S||Q||(b[u]=Q=S)); yield new C.OptimizedFeature(E?k(new x,E,d):null,b,null,Q??void 0)}}function L(b){for(const d of b)if(2=d}function H(b){const d=b[0],m=b[b.length-1];d[0]===m[0]&&d[1]===m[1]&&d[2]===m[2]||b.push(d);return b}function k(b,d,m){switch(d.type){case "LineString":return l(b,d.coordinates,m),b;case "MultiLineString":for(const D of d.coordinates)l(b,D,m);return b; case "MultiPoint":return l(b,d.coordinates,m),b;case "MultiPolygon":for(var u of d.coordinates)for(X(b,u[0],m),d=1;dN[O]===I)));N&&F&&S&&null!=I&&(1N[O]===I):1===F.length&&(F=N[F[0]]===I?F:[]));if(!B&&N){b=!0;for(const O in N){if(u.has(O))continue;B=N[O];if(null==B){b=!1;D.add(O);continue}a:switch(typeof B){case "string":B=A.isISO8601Date(B)? "esriFieldTypeDate":"esriFieldTypeString";break a;case "number":B="esriFieldTypeDouble";break a;default:B="unknown"}if("unknown"===B){D.add(O);continue}D.delete(O);u.add(O);const ba=q.normalizeFieldName(O);ba&&m.push({name:ba,alias:O,type:B})}B=b}}if(u=q.normalizeFieldName(1===F?.length&&F[0]||null)??void 0)for(const V of m)if(V.name===u&&q.isNumericField(V)){V.type="esriFieldTypeOID";break}return{fields:m,geometryType:d,hasZ:E,objectIdFieldName:u,objectIdFieldType:Q,unknownFields:Array.from(D)}}; f.validateGeoJSON=function(b,d=4326){if(!b)throw new G("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==b.type&&"FeatureCollection"!==b.type)throw new G("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:b});({crs:b}=b);if(b){var m="string"===typeof b?b:"name"===b.type?b.properties.name:"EPSG"===b.type?b.properties.code:null;d=v.isWGS84({wkid:d})?RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${d})$`,"i");if(!m||!d.test(m))throw new G("geojson:unsupported-crs", "unsupported GeoJSON 'crs' member",{crs:b});}};Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})})},"esri/core/date":function(){define(["exports"],function(f){function A(q){const J=new Date(q);if(Number.isNaN(J.getTime()))q=!1;else{var M=!0;if(x&&/\d+\W*$/.test(q)&&(q=q.match(/[a-zA-Z]{2,}/))){M=!1;let K=0;for(;!M&&K<=q.length;)M=!C.test(q[K]),K++;M=!M}q=M}return q?Number.isNaN(J.getTime())?null:J.getTime()-6E4*J.getTimezoneOffset():null}function G(q){q=v.exec(q);if(!q?.groups)return null; q=q.groups;const J=+q.year,M=+q.month-1,K=+q.day,L=+(q.hours??0),W=+(q.minutes??0),H=+(q.seconds??0);if(23-?\d{4,})-(?\d{2})-(?\d{2}))(?:T(?\d{2}):(?\d{2}):(?\d{2})(?:\.(?\d+))?)?(?:(?Z)|(?:(?\+|-)(?\d{2}):(?\d{2})))?$/, C=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,x=!Number.isNaN((new Date("technology 10")).getTime());f.isDateString=function(q){return null!=G(q)||null!=A(q)};f.isISO8601Date=function(q){return v.test(q)};f.parseDate=function(q){return G(q)??A(q)};Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})})},"esri/layers/ogc/xmlUtils":function(){define(["exports"],function(f){function A(v, C){if(v&&C)for(const x of v.children)x.localName in C&&(v=C[x.localName],"function"===typeof v?(v=v(x))&&A(x,v):A(x,v))}function*G(v,C){for(const x of v.children)x.localName in C&&(v=C[x.localName],"function"===typeof v?yield v(x):yield*G(x,v))}f.iterateXML=G;f.visitXML=A;Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})})},"*noref":1}}); define("../chunks/tslib.es6 ../geometry ../PopupTemplate ../renderers/ClassBreaksRenderer ../renderers/DictionaryRenderer ../renderers/DotDensityRenderer ../renderers/HeatmapRenderer ../renderers/PieChartRenderer ../renderers/Renderer ../renderers/SimpleRenderer ../renderers/UniqueValueRenderer ../renderers/support/jsonUtils ../renderers/support/types ../core/MultiOriginJSONSupport ../core/object ../core/urlUtils ../core/accessorSupport/decorators/property ../core/accessorSupport/ensureType ../core/RandomLCG ../core/has ../core/accessorSupport/decorators/subclass ../core/accessorSupport/decorators/writer ../geometry/support/typeUtils ./Layer ./graphics/sources/WFSSource ./mixins/BlendLayer ./mixins/CustomParametersMixin ./mixins/FeatureEffectLayer ./mixins/FeatureReductionLayer ./mixins/OperationalLayer ./mixins/OrderedLayer ./mixins/PortalLayer ./mixins/RefreshableLayer ./mixins/ScaleRangeLayer ./mixins/TemporalLayer ./ogc/wfsUtils ./support/commonProperties ./support/Field ./support/fieldProperties ./support/fieldUtils ./support/LabelClass ./support/labelingInfo ../rest/support/Query ../support/popupUtils ../time/timeZoneUtils ../geometry/SpatialReference ../geometry/Extent".split(" "),function(f, A,G,v,C,x,q,J,M,K,L,W,H,k,X,Z,l,U,n,w,b,d,m,u,D,E,F,S,Q,B,V,R,N,I,O,ba,Y,ca,da,a,c,e,g,h,r,t,P){var z;A=da.defineFieldProperties();k=z=class extends V.OrderedLayer(F.CustomParametersMixin(Q.FeatureReductionLayer(S.FeatureEffectLayer(E.BlendLayer(O.TemporalLayer(N.RefreshableLayer(I.ScaleRangeLayer(B.OperationalLayer(R.PortalLayer(k.MultiOriginJSONMixin(u))))))))))){static fromWFSLayerInfo(p){const {customParameters:y,fields:T,geometryField:aa,geometryType:ea,name:fa,namespaceUri:ha,objectIdField:ia, spatialReference:ja,swapXY:ka,url:la,wfsCapabilities:ma}=p;return new z({customParameters:y,fields:T,geometryField:aa,geometryType:ea,name:fa,namespaceUri:ha,objectIdField:ia,spatialReference:ja,swapXY:ka,url:la,wfsCapabilities:ma})}constructor(p){super(p);this.elevationInfo=this.displayField=this.definitionExpression=this.dateFieldsTimeZone=this.customParameters=this.copyright=null;this.featureUrl=void 0;this.geometryType=this.fullExtent=this.fieldsIndex=this.fields=null;this.labelsVisible=!0;this.labelingInfo= null;this.legendEnabled=!0;this.objectIdField=null;this.operationalLayerType="WFS";this.maxRecordCount=3E3;this.maxPageCount=10;this.maxTotalRecordCount=2E5;this.mode=0;this.outFields=this.namespaceUri=this.name=null;this.popupEnabled=!0;this.popupTemplate=null;this.screenSizePerspectiveEnabled=!0;this.source=new D.WFSSource({layer:this});this.spatialReference=t.WGS84;this.spatialReferences=[4326];this.swapXY=void 0;this.title="WFS";this.type="wfs";this.url=null;this.version=void 0}destroy(){this.source?.destroy()}load(p){this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WFS"]}, p).then(()=>this.source.load(p)).then(()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl});this.revert("objectIdField fields timeInfo spatialReference name namespaceUri".split(" "),"service");a.fixRendererFields(this.renderer,this.fieldsIndex);a.fixTimeInfoFields(this.timeInfo,this.fieldsIndex)}));return Promise.resolve(this)}get capabilities(){return this.source?.capabilities}get createQueryVersion(){this.commitProperty("definitionExpression");this.commitProperty("timeExtent"); this.commitProperty("timeOffset");this.commitProperty("geometryType");this.commitProperty("capabilities");return(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(p,y,T){p=p.filter(aa=>aa.name!==ba.wfsOidFieldName);this.geometryField&&p.unshift(new ca({name:this.geometryField,alias:this.geometryField,type:"geometry"}));X.setDeepValue(T,p.map(aa=>aa.toJSON()),y)}get parsedUrl(){return Z.urlToObject(this.url)}set renderer(p){a.fixRendererFields(p, this.fieldsIndex);this._set("renderer",p)}get wfsCapabilities(){return this.source?.wfsCapabilities}set wfsCapabilities(p){this.source&&(this.source.wfsCapabilities=p)}createPopupTemplate(p){return h.createPopupTemplate(this,p)}createQuery(){const p=new g({returnGeometry:!0,outFields:["*"],where:this.definitionExpression||"1\x3d1"}),{timeOffset:y,timeExtent:T}=this;p.timeExtent=null!=y&&null!=T?T.offset(-y.value,y.unit):T||null;return p}getFieldDomain(p,y){return this.getField(p)?.domain}getField(p){return this.fieldsIndex?.get(p)}queryFeatures(p, y){return this.load().then(()=>this.source.queryFeatures(g.from(p)||this.createQuery(),y)).then(T=>{if(T?.features)for(const aa of T.features)aa.layer=aa.sourceLayer=this;return T})}queryObjectIds(p,y){return this.load().then(()=>this.source.queryObjectIds(g.from(p)||this.createQuery(),y))}queryFeatureCount(p,y){return this.load().then(()=>this.source.queryFeatureCount(g.from(p)||this.createQuery(),y))}queryExtent(p,y){return this.load().then(()=>this.source.queryExtent(g.from(p)||this.createQuery(), y))}async hasDataChanged(){try{const {dataChanged:p,updates:y}=await this.source.refresh();null!=y&&this.read(y,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0});return p}catch{}return!1}};f.__decorate([l.property({readOnly:!0})],k.prototype,"capabilities",null);f.__decorate([l.property({type:String})],k.prototype,"copyright",void 0);f.__decorate([l.property({readOnly:!0})],k.prototype,"createQueryVersion",null);f.__decorate([l.property({json:{name:"wfsInfo.customParameters",write:{overridePolicy(p){return{enabled:!!(p&& 0