@arcgis/core 4.31.2 → 4.31.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arcade/featureSetUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{dc3202d6f39d35a602e5.js → 055ee3414f73e12419b4.js} +1 -1
- package/assets/esri/core/workers/chunks/3373e90831494ce3752c.js +1 -0
- package/assets/esri/core/workers/chunks/{a1752adee1f58ee21581.js → e1d29c1d98993b0fa162.js} +1 -1
- package/assets/esri/core/workers/chunks/f11190c94f3231a4d47f.js +1 -0
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/widgets/Editor.js +1 -1
- package/assets/esri/core/workers/chunks/ac9681ebbae83b6d8c8a.js +0 -1
- package/assets/esri/core/workers/chunks/c3e94367aeec85a56f4c.js +0 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{id as e}from"../../kernel.js";import{symbolTypesRenderer as t}from"../../symbols.js";import{resultOrAbort as r}from"../../core/asyncUtils.js";import n from"../../core/Error.js";import{JSONMap as o}from"../../core/jsonMap.js";import{parseWhereClause as s}from"../../core/sql.js";import{normalizeGlobalID as i}from"../../core/uuid.js";import{createTypeReader as a}from"../../core/accessorSupport/extensions/serializableProperty/reader.js";import{CodedValue as u}from"./CodedValue.js";import c from"./CodedValueDomain.js";import{queryAllJSON as l}from"./featureQueryAll.js";import{getOwningPortalUrl as p}from"./layerUtils.js";import d from"../../renderers/SimpleRenderer.js";import f from"../../renderers/UniqueValueRenderer.js";import y from"../../rest/support/AttachmentQuery.js";import m from"../../rest/support/Query.js";import h from"../../rest/support/RelationshipQuery.js";const w=new o({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function b(e,t,r,o){const s=await T(e);if(await g(e,t,o),!s.addAttachment)throw new n(o,"Layer source does not support addAttachment capability");return s.addAttachment(t,r)}function g(e,t,r){const{attributes:o}=t,{objectIdField:s}=e;return e.capabilities?.data?.supportsAttachment?t?o?s&&o[s]?Promise.resolve():Promise.reject(new n(r,`feature is missing the identifying attribute ${s}`)):Promise.reject(new n(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new n(r,"A feature is required to add/delete/update attachments")):Promise.reject(new n(r,"this layer doesn't support attachments"))}async function I(e,t,r,o,s){const i=await T(e);if(await g(e,t,s),!i.updateAttachment)throw new n(s,"Layer source does not support updateAttachment capability");return i.updateAttachment(t,r,o)}async function j(e,t,r){const{applyEdits:n}=await import("../graphics/editingSupport.js"),o=await e.load();let s=r;return"feature"===o.type&&o.infoFor3D&&null!=t.deleteFeatures&&null!=o.globalIdField&&(s={...s,globalIdToObjectId:await H(o,t.deleteFeatures,o.globalIdField)}),n(o,o.source,t,r)}async function F(e,t,r){const{uploadAssets:n}=await import("../graphics/editingSupport.js"),o=await e.load();return n(o,o.source,t,r)}async function q(e,t,r,o){const s=await T(e);if(await g(e,t,o),!s.deleteAttachments)throw new n(o,"Layer source does not support deleteAttachments capability");return s.deleteAttachments(t,r)}async function x(e,t,r){const o=(await e.load({signal:t?.signal})).source;if(!o.fetchRecomputedExtents)throw new n(r,"Layer source does not support fetchUpdates capability");return o.fetchRecomputedExtents(t)}async function A(e,t,r,o){t=y.from(t),await e.load();const s=e.source,i=e.capabilities;if(!i?.data?.supportsAttachment)throw new n(o,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:u,globalIds:c,num:l,size:p,start:d,where:f}=t;if(!i?.operations?.supportsQueryAttachments){if(a?.length>0||c?.length>0||p?.length>0||l||d||f)throw new n(o,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t)}if(!(u?.length||c?.length||f))throw new n(o,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!s.queryAttachments)throw new n(o,"Layer source does not support queryAttachments capability",t);return s.queryAttachments(t)}async function v(e,t,r,o){const s=await T(e);if(!s.queryObjectIds)throw new n(o,"Layer source does not support queryObjectIds capability");return s.queryObjectIds(m.from(t)??e.createQuery(),r)}async function S(e,t,r,o){const s=await T(e);if(!s.queryFeatureCount)throw new n(o,"Layer source does not support queryFeatureCount capability");return s.queryFeatureCount(m.from(t)??e.createQuery(),r)}async function O(e,t,r,o){const s=await T(e);if(!s.queryExtent)throw new n(o,"Layer source does not support queryExtent capability");return s.queryExtent(m.from(t)??e.createQuery(),r)}async function P(e,t,r,o){const s=await T(e);if(!s.queryRelatedFeatures)throw new n(o,"Layer source does not support queryRelatedFeatures capability");return s.queryRelatedFeatures(h.from(t),r)}async function E(e,t,r,o){const s=await T(e);if(!s.queryRelatedFeaturesCount)throw new n(o,"Layer source does not support queryRelatedFeaturesCount capability");return s.queryRelatedFeaturesCount(h.from(t),r)}async function L(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:n}=await t.refresh();if(null!=n&&(e.sourceJSON={...e.sourceJSON,...n},e.read(n,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await s(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function C(e){const t=new m,r=e.capabilities?.data,n=e.capabilities?.query;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,n&&(t.compactGeometryEnabled=n.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=n.supportsDefaultSpatialReference),r&&(r.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),r.supportsM&&null!=e.returnM&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:o,timeExtent:s}=e;return t.timeExtent=null!=o&&null!=s?s.offset(-o.value,o.unit):s||null,t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null,t}function R(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeGlobalID"===n.type)return n.name}function M(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeOID"===n.type)return n.name}function V(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}function D(e,t){const{subtypes:r,subtypeField:n}=e;if(!t?.attributes||!r?.length||!n)return null;const o=t.attributes[n];return null==o?null:r.find((e=>e.code===o))}function G(e,t){const{fieldsIndex:r,subtypeField:n}=e,{name:o}=r.get(t)??{};if(!o)return null;if((n&&r.get(n)?.name)===o&&e.subtypes?.length){const t=e.subtypes.map((e=>new u({code:e.code,name:e.name})));if(t?.length)return new c({codedValues:t})}return null}function Q(e,t){const{fieldsIndex:r}=e,{name:n}=r.get(t)??{};if(!n)return null;if(("typeIdField"in e?r.get(e.typeIdField)?.name:null)===n&&"types"in e&&e.types?.length){const t=e.types.map((e=>new u({code:e.id,name:e.name})));return new c({codedValues:t})}return null}async function T(e){return(await e.load()).source}async function U(t,r){if(!e)return;if(e.findCredential(t))return;let n;try{const o=await p(t,r);o&&(n=await e.checkSignInStatus(`${o}/sharing`))}catch(o){}if(n)try{const n=null!=r?r.signal:null;await e.getCredential(t,{signal:n})}catch(o){}}async function k(e,t,r){const n=e.parsedUrl?.path;n&&e.authenticationTriggerEvent===t&&await U(n,r)}function J(e){return!B(e)&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const N=a({types:t});function $(e,t){if(e.defaultSymbol)return e.types?.length?new f({defaultSymbol:N(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:N(e.symbol,e,t)})))}):new d({symbol:N(e.defaultSymbol,e,t)})}function Z(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function H(e,t,n){if(null==t)return null;const o=[],{objectIdField:s}=e;if(t.forEach((e=>{let t=null;if("attributes"in e){const{attributes:r}=e;t={globalId:r[n],objectId:null!=r[s]&&-1!==r[s]?r[s]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||o.push(t.globalId))})),0===o.length)return null;const a=e.createQuery();a.where=o.map((e=>`${n}='${e}'`)).join(" OR "),a.returnGeometry=!1,a.outFields=[s,n],a.cacheHint=!1;const u=await r(l(e,a));if(!u.ok)return null;const c=new Map,p=u.value.features;for(const r of p){const e=r.attributes[n],t=r.attributes[s];null!=e&&null!=t&&-1!==t&&c.set(i(e),t)}return c}function z(e,t,r){if(!t||!r||!e)return null;const n=r.getAttribute(t);return null==n?null:e.find((e=>{const{id:t}=e;return null!=t&&t.toString()===n.toString()}))??null}function B(e){return e.sourceJSON?.isMultiServicesView||K(e)}function K(e){return!!e.sourceJSON?.capabilities?.toLowerCase().split(",").map((e=>e.trim())).includes("map")}function W(e,t,r){const o=t?.queryBins;if(!o)throw new n(r,"Layer source does not support binning");switch(e.binParameters.type){case"auto-interval":if(!o.supportsAutoInterval)throw new n(r,"Layer source does not support auto-interval binning");break;case"date":if(!o.supportsDate)throw new n(r,"Layer source does not support date binning");break;case"fixed-boundaries":if(!o.supportsFixedBoundaries)throw new n(r,"Layer source does not support fixed-boundaries binning");break;case"fixed-interval":if(!o.supportsFixedInterval)throw new n(r,"Layer source does not support fixed-interval binning")}const s=o?.supportedStatistics;if(e.outStatistics&&s){const t=new Map([["count","count"],["sum","sum"],["min","min"],["max","max"],["avg","avg"],["stddev","stddev"],["var","var"],["percentile-continuous","percentileContinuous"],["percentile-discrete","percentileDiscrete"],["centroid-aggregate","centroid"],["convex-hull-aggregate","convexHull"],["envelope-aggregate","envelope"]]);for(const{statisticType:o}of e.outStatistics){const e=t.get(o);if(e&&!s[e])throw new n(r,`Layer source does not support ${o} statistic type`)}}}export{b as addAttachment,j as applyEdits,G as computeDomainFromSubtypes,Q as computeDomainFromTypes,J as computeEffectiveEditingEnabled,$ as createDefaultRenderer,C as createQuery,q as deleteAttachments,U as ensureCredentialIfSignedIn,k as ensureLayerCredential,x as fetchRecomputedExtents,w as geometryTypeKebabDict,D as getFeatureSubtype,z as getFeatureType,H as getGlobalIdToObjectIdMap,L as hasDataChanged,Z as isLayerCacheStale,A as queryAttachments,O as queryExtent,S as queryFeatureCount,v as queryObjectIds,P as queryRelatedFeatures,E as queryRelatedFeaturesCount,R as readGlobalIdField,M as readObjectIdField,V as readVersion,B as supportsQueryOnly,I as updateAttachment,F as uploadAssets,W as validateBinsQuery};
|
|
5
|
+
import{id as e}from"../../kernel.js";import{symbolTypesRenderer as t}from"../../symbols.js";import{resultOrAbort as r}from"../../core/asyncUtils.js";import n from"../../core/Error.js";import{JSONMap as o}from"../../core/jsonMap.js";import{parseWhereClause as s}from"../../core/sql.js";import{normalizeGlobalID as i}from"../../core/uuid.js";import{createTypeReader as a}from"../../core/accessorSupport/extensions/serializableProperty/reader.js";import{CodedValue as u}from"./CodedValue.js";import c from"./CodedValueDomain.js";import{queryAllJSON as l}from"./featureQueryAll.js";import{isStringField as p,isIntegerField as d}from"./fieldUtils.js";import{getOwningPortalUrl as f}from"./layerUtils.js";import y from"../../renderers/SimpleRenderer.js";import m from"../../renderers/UniqueValueRenderer.js";import h from"../../rest/support/AttachmentQuery.js";import w from"../../rest/support/Query.js";import b from"../../rest/support/RelationshipQuery.js";const g=new o({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function I(e,t,r,o){const s=await N(e);if(await j(e,t,o),!s.addAttachment)throw new n(o,"Layer source does not support addAttachment capability");return s.addAttachment(t,r)}function j(e,t,r){const{attributes:o}=t,{objectIdField:s}=e;return e.capabilities?.data?.supportsAttachment?t?o?s&&o[s]?Promise.resolve():Promise.reject(new n(r,`feature is missing the identifying attribute ${s}`)):Promise.reject(new n(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new n(r,"A feature is required to add/delete/update attachments")):Promise.reject(new n(r,"this layer doesn't support attachments"))}async function F(e,t,r,o,s){const i=await N(e);if(await j(e,t,s),!i.updateAttachment)throw new n(s,"Layer source does not support updateAttachment capability");return i.updateAttachment(t,r,o)}async function q(e,t,r){const{applyEdits:n}=await import("../graphics/editingSupport.js"),o=await e.load();let s=r;return"feature"===o.type&&o.infoFor3D&&null!=t.deleteFeatures&&null!=o.globalIdField&&(s={...s,globalIdToObjectId:await K(o,t.deleteFeatures,o.globalIdField)}),n(o,o.source,t,r)}async function x(e,t,r){const{uploadAssets:n}=await import("../graphics/editingSupport.js"),o=await e.load();return n(o,o.source,t,r)}async function A(e,t,r,o){const s=await N(e);if(await j(e,t,o),!s.deleteAttachments)throw new n(o,"Layer source does not support deleteAttachments capability");return s.deleteAttachments(t,r)}async function v(e,t,r){const o=(await e.load({signal:t?.signal})).source;if(!o.fetchRecomputedExtents)throw new n(r,"Layer source does not support fetchUpdates capability");return o.fetchRecomputedExtents(t)}async function S(e,t,r,o){t=h.from(t),await e.load();const s=e.source,i=e.capabilities;if(!i?.data?.supportsAttachment)throw new n(o,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:u,globalIds:c,num:l,size:p,start:d,where:f}=t;if(!i?.operations?.supportsQueryAttachments){if(a?.length>0||c?.length>0||p?.length>0||l||d||f)throw new n(o,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t)}if(!(u?.length||c?.length||f))throw new n(o,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!s.queryAttachments)throw new n(o,"Layer source does not support queryAttachments capability",t);return s.queryAttachments(t)}async function O(e,t,r,o){const s=await N(e);if(!s.queryObjectIds)throw new n(o,"Layer source does not support queryObjectIds capability");return s.queryObjectIds(w.from(t)??e.createQuery(),r)}async function P(e,t,r,o){const s=await N(e);if(!s.queryFeatureCount)throw new n(o,"Layer source does not support queryFeatureCount capability");return s.queryFeatureCount(w.from(t)??e.createQuery(),r)}async function E(e,t,r,o){const s=await N(e);if(!s.queryExtent)throw new n(o,"Layer source does not support queryExtent capability");return s.queryExtent(w.from(t)??e.createQuery(),r)}async function L(e,t,r,o){const s=await N(e);if(!s.queryRelatedFeatures)throw new n(o,"Layer source does not support queryRelatedFeatures capability");return s.queryRelatedFeatures(b.from(t),r)}async function C(e,t,r,o){const s=await N(e);if(!s.queryRelatedFeaturesCount)throw new n(o,"Layer source does not support queryRelatedFeaturesCount capability");return s.queryRelatedFeaturesCount(b.from(t),r)}async function R(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:n}=await t.refresh();if(null!=n&&(e.sourceJSON={...e.sourceJSON,...n},e.read(n,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await s(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function M(e){const t=new w,r=e.capabilities?.data,n=e.capabilities?.query;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,n&&(t.compactGeometryEnabled=n.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=n.supportsDefaultSpatialReference),r&&(r.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),r.supportsM&&null!=e.returnM&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:o,timeExtent:s}=e;return t.timeExtent=null!=o&&null!=s?s.offset(-o.value,o.unit):s||null,t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null,t}function V(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeGlobalID"===n.type)return n.name}function D(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeOID"===n.type)return n.name}function G(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}function Q(e,t){const{subtypes:r,subtypeField:n}=e;if(!t?.attributes||!r?.length||!n)return null;const o=t.attributes[n];return null==o?null:r.find((e=>e.code===o))}function T(e,t){const{fieldsIndex:r,subtypeField:n}=e,{name:o,type:s}=r.get(t)??{};if(!o)return null;if((n&&r.get(n)?.name)===o&&e.subtypes?.length){const t=e.subtypes.map((e=>new u({code:k(e.code,s),name:e.name})));if(t?.length)return new c({codedValues:t})}return null}function U(e,t){const{fieldsIndex:r}=e,{name:n,type:o}=r.get(t)??{};if(!n)return null;if(("typeIdField"in e?r.get(e.typeIdField)?.name:null)===n&&"types"in e&&e.types?.length){const t=e.types.map((e=>new u({code:k(e.id,o),name:e.name})));return new c({codedValues:t})}return null}function k(e,t){return t?p({type:t})&&"number"==typeof e?`${e}`:d({type:t})&&"string"==typeof e?Number.parseInt(e,10):e:e}async function N(e){return(await e.load()).source}async function $(t,r){if(!e)return;if(e.findCredential(t))return;let n;try{const o=await f(t,r);o&&(n=await e.checkSignInStatus(`${o}/sharing`))}catch(o){}if(n)try{const n=null!=r?r.signal:null;await e.getCredential(t,{signal:n})}catch(o){}}async function J(e,t,r){const n=e.parsedUrl?.path;n&&e.authenticationTriggerEvent===t&&await $(n,r)}function Z(e){return!X(e)&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const H=a({types:t});function z(e,t){if(e.defaultSymbol)return e.types?.length?new m({defaultSymbol:H(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:H(e.symbol,e,t)})))}):new y({symbol:H(e.defaultSymbol,e,t)})}function B(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function K(e,t,n){if(null==t)return null;const o=[],{objectIdField:s}=e;if(t.forEach((e=>{let t=null;if("attributes"in e){const{attributes:r}=e;t={globalId:r[n],objectId:null!=r[s]&&-1!==r[s]?r[s]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||o.push(t.globalId))})),0===o.length)return null;const a=e.createQuery();a.where=o.map((e=>`${n}='${e}'`)).join(" OR "),a.returnGeometry=!1,a.outFields=[s,n],a.cacheHint=!1;const u=await r(l(e,a));if(!u.ok)return null;const c=new Map,p=u.value.features;for(const r of p){const e=r.attributes[n],t=r.attributes[s];null!=e&&null!=t&&-1!==t&&c.set(i(e),t)}return c}function W(e,t,r){if(!t||!r||!e)return null;const n=r.getAttribute(t);return null==n?null:e.find((e=>{const{id:t}=e;return null!=t&&t.toString()===n.toString()}))??null}function X(e){return e.sourceJSON?.isMultiServicesView||Y(e)}function Y(e){return!!e.sourceJSON?.capabilities?.toLowerCase().split(",").map((e=>e.trim())).includes("map")}function _(e,t,r){const o=t?.queryBins;if(!o)throw new n(r,"Layer source does not support binning");switch(e.binParameters.type){case"auto-interval":if(!o.supportsAutoInterval)throw new n(r,"Layer source does not support auto-interval binning");break;case"date":if(!o.supportsDate)throw new n(r,"Layer source does not support date binning");break;case"fixed-boundaries":if(!o.supportsFixedBoundaries)throw new n(r,"Layer source does not support fixed-boundaries binning");break;case"fixed-interval":if(!o.supportsFixedInterval)throw new n(r,"Layer source does not support fixed-interval binning")}const s=o?.supportedStatistics;if(e.outStatistics&&s){const t=new Map([["count","count"],["sum","sum"],["min","min"],["max","max"],["avg","avg"],["stddev","stddev"],["var","var"],["percentile-continuous","percentileContinuous"],["percentile-discrete","percentileDiscrete"],["centroid-aggregate","centroid"],["convex-hull-aggregate","convexHull"],["envelope-aggregate","envelope"]]);for(const{statisticType:o}of e.outStatistics){const e=t.get(o);if(e&&!s[e])throw new n(r,`Layer source does not support ${o} statistic type`)}}}export{I as addAttachment,q as applyEdits,T as computeDomainFromSubtypes,U as computeDomainFromTypes,Z as computeEffectiveEditingEnabled,z as createDefaultRenderer,M as createQuery,A as deleteAttachments,$ as ensureCredentialIfSignedIn,J as ensureLayerCredential,v as fetchRecomputedExtents,g as geometryTypeKebabDict,Q as getFeatureSubtype,W as getFeatureType,K as getGlobalIdToObjectIdMap,R as hasDataChanged,B as isLayerCacheStale,S as queryAttachments,E as queryExtent,P as queryFeatureCount,O as queryObjectIds,L as queryRelatedFeatures,C as queryRelatedFeaturesCount,V as readGlobalIdField,D as readObjectIdField,G as readVersion,X as supportsQueryOnly,F as updateAttachment,x as uploadAssets,_ as validateBinsQuery};
|
package/package.json
CHANGED
package/support/revision.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const d="20241115",b="b1bca575db9d3600fd4ed8ddb9bd9d31b704125c";export{d as buildDate,b as commitHash};
|
package/widgets/Editor.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{deprecatedProperty as t}from"../core/deprecate.js";import s from"../core/Logger.js";import{mappedFind as o}from"../core/maybe.js";import{createResolver as i}from"../core/promiseUtils.js";import{watch as r,initial as a,on as n,when as l}from"../core/reactiveUtils.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import p from"../views/interactive/sketch/SketchValueOptions.js";import c from"./Attachments.js";import h from"./FeatureForm.js";import u from"./FeatureTemplates.js";import g from"./Spinner.js";import w from"./Widget.js";import{css as f}from"./Editor/css.js";import v from"./Editor/EditorViewModel.js";import{isModelUpload as _}from"./Editor/modelUploadUtils.js";import y from"./Editor/VisibleElements.js";import{loadCreateFeaturesPanelContentComponents as k,CreateFeaturesPanelContent as F}from"./Editor/components/CreateFeaturesPanelContent.js";import{loadFeatureListComponents as M,FeatureList as b}from"./Editor/components/FeatureList.js";import{loadFooterActionsComponents as A,FooterActions as W}from"./Editor/components/FooterActions.js";import{loadNoticesComponents as C,Notice as E}from"./Editor/components/Notices.js";import{loadPanelContentComponents as P,PanelContent as T,PanelContentSection as j,PanelContentMessage as L}from"./Editor/components/PanelContent.js";import{PanelToolbar as I,loadPanelToolbarComponents as U}from"./Editor/components/PanelToolbar.js";import{loadPromptComponents as S,Prompt as O}from"./Editor/components/Prompt.js";import{loadUpdateFeaturePanelContentComponents as D,UpdateFeaturePanelContent as x}from"./Editor/components/UpdateFeaturePanelContent.js";import{loadUploadDetailsComponents as V,UploadDetails as B}from"./Editor/components/UploadDetails.js";import{renderItem as G}from"./FeatureTemplates/ItemList.js";import{loadCalciteComponents as R}from"./support/componentsUtils.js";import{globalCss as q}from"./support/globalCss.js";import{incrementHeadingLevel as H,Heading as N}from"./support/Heading.js";import"./support/widgetUtils.js";import{messageBundle as z}from"./support/decorators/messageBundle.js";import{vmEvent as $}from"./support/decorators/vmEvent.js";import{tsx as J}from"./support/jsxFactory.js";import{substitute as K}from"../intl/substitute.js";let Q=class extends w{constructor(e,t){super(e,t),this._featureForm=new h,this._attachments=new c({visibleElements:{addSubmitButton:!1,cancelAddButton:!1,cancelUpdateButton:!1,deleteButton:!1,errorMessage:!1,progressBar:!1,updateButton:!1}}),this._featureTemplates=new u({enableListScroll:!1,renderItemContentEnd:e=>e.supportsUpload?J("calcite-icon",{class:f.templateItemContentEnd,icon:"upload-to",key:"upload-icon"}):null,renderItemLabel:e=>e.label,renderCustomGroupContent:e=>this._renderCustomTemplateGroupContent(e)}),this._filterText="",this._prompt=null,this._spinner=new g,this.headingLevel=4,this.messages=null,this.messagesCommon=null,this.messagesTemplates=null,this.supportingWidgetDefaults=null,this.viewModel=new v,this.visibleElements=new y,this._renderAttachments=()=>this._attachments.render(),this._renderFeatureForm=()=>this._featureForm.render(),this._renderFeatureTemplates=()=>this._featureTemplates.render(),this._renderSelectIcon=()=>J("calcite-icon",{icon:"cursor",slot:"content-start"}),this.EditorPanel=({heading:e,key:t},...s)=>{const{visibleElements:o}=this;return J("calcite-flow-item",{closable:!1,heading:e,headingLevel:this.headingLevel,key:t,loading:this._loading,onCalciteFlowItemBack:this._onBack},o.settingsMenu?J(I,{editorViewModel:this.viewModel,messagesCommon:this.messagesCommon,visibleElements:o}):null,...s)},this._showDiscardEditsPrompt=()=>{const{messages:e,activeWorkflow:t}=this;return"create-features"===t?.type&&_(t.data.creationInfo)?this._showPromptAndWait("success"===t.data.upload?.state?e.modelUploads.cancelPlacementPrompt:e.modelUploads.cancelUploadPrompt):this._showPromptAndWait({title:e.cancelEditTitle,message:e.cancelEditWarningMessage,yesLabel:e.discardEdits,noLabel:e.continueEditing})},this._showGenericCancelPrompt=()=>{const{messages:e,messagesCommon:t}=this;return this._showPromptAndWait({title:e.cancelRequestTitle,message:e.cancelRequestWarningMessage,yesLabel:t.form.yes,noLabel:t.form.no})},this._showPrompt=e=>{this._prompt?.cancel?.(),this._prompt=e},this._clearPrompt=()=>{this._prompt=null},this._onSave=()=>{this.viewModel.saveWorkflow()},this._onDelete=()=>{const{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteWarningTitle,message:e.deleteWarningMessage,context:"danger",actions:{primary:{label:t.delete,action:()=>{this.deleteFeatureFromWorkflow(),this._clearPrompt()}},secondary:{label:e.keepFeature,action:this._clearPrompt}}})},this._onToggleUpdateWorkflow=()=>this.viewModel.toggleUpdateWorkflow(),this._onBack=e=>(e?.stopPropagation(),this.viewModel.back()),this._onAttachmentAdd=()=>{const{activeWorkflow:e}=this.viewModel;e&&("create-features"===e.type||"update"===e.type&&"create-features"===e.activeWorkflow?.type?(this._attachments.addFile(),e.back()):this._attachments.addAttachment().then((()=>e.back())))},this._onAttachmentUpdate=()=>{const{activeWorkflow:e}=this.viewModel;e&&("create-features"===e.type?(this._attachments.updateFile(),e.back()):this._attachments.updateAttachment().then((()=>e.back())))},this._onAttachmentDelete=()=>{const{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteAttachmentWarningTitle,message:e.deleteAttachmentWarningMessage,context:"danger",actions:{primary:{label:t.delete,action:this._onAttachmentDeleteConfirm},secondary:{label:e.keepAttachment,action:this._clearPrompt}}})},this._onAttachmentDeleteConfirm=async()=>{const e=this._attachments,{activeWorkflow:t}=this.viewModel;t&&("create-features"===t.type?e.deleteFile():(await e.deleteAttachment(e.viewModel.activeAttachmentInfo),this._clearPrompt()),await t.back(),this._clearPrompt())},this._onAttachmentsError=e=>{this._showPrompt({title:this.messages.errorWarningTitle,message:e.message,context:"warning",actions:{primary:{label:this.messagesCommon.form.ok,action:this._clearPrompt}}})}}initialize(){this._featureForm.showPrompt=this._showPrompt,this._featureForm.clearPrompt=this._clearPrompt,this.addHandles([r((()=>H(this.headingLevel)),(e=>{this._featureForm.headingLevel=e,this._featureTemplates.headingLevel=e}),a),n((()=>this.viewModel.activeWorkflow),"cancel-request",(({controller:e})=>{(this.viewModel.hasPendingEdits?this._showDiscardEditsPrompt():this._showGenericCancelPrompt()).then((t=>t?e.allow():e.deny()))})),l((()=>this.viewModel.featureFormViewModel),(e=>{this._featureForm.viewModel=e}),a),r((()=>this.viewModel),(e=>{this._attachments.viewModel=e?.attachmentsViewModel??null,this._featureTemplates.viewModel=e?.featureTemplatesViewModel??null,this._spinner.viewModel=e?.spinnerViewModel??null,e.showDiscardEditsPrompt=this._showDiscardEditsPrompt}),a),r((()=>this.view),((e,t)=>{const s=`editor-${this.id}-spinner`;t?.ui.remove(this._spinner,s),e?.ui.add(this._spinner,{key:s,position:"manual"})}),a),r((()=>[this.supportingWidgetDefaults,this.viewModel.sketchViewModel]),(([e])=>{e&&(this._featureForm.set(e.featureForm),this._attachments.set(e.attachments),this._featureTemplates.set(e.featureTemplates),this.viewModel.sketchViewModel?.set(e.sketch))}),a),l((()=>this._attachments?.error),(e=>this._onAttachmentsError(e))),l((()=>this.viewModel?.failures),(e=>{const{messages:t}=this,[{error:s,retry:o,cancel:i}]=e;this._showPrompt({title:t.errorWarningTitle,message:K(t.errorWarningMessageTemplate,{errorMessage:s.message}),context:"warning",actions:{primary:{label:t.retry,action:()=>{o(),this._clearPrompt()}},secondary:{label:t.ignore,action:()=>{i(),this._clearPrompt()}}}})})),r((()=>this.viewModel?.state),(e=>{switch(e){case"awaiting-feature-to-update":case"ready":case"disabled":this._filterText="",this._featureTemplates.filterText=""}})),r((()=>this.viewModel.featureFormDisabled),(e=>this._featureForm.disabled=e))])}destroy(){this._attachments.destroy(),this._featureForm.destroy(),this._featureTemplates.destroy()}loadDependencies(){return Promise.all([R({"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item.js"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js"),list:()=>import("@esri/calcite-components/dist/components/calcite-list.js")}),k(),M(),A(),C(),P(),U(),S(),D(),V()])}get _deleteButtonCommonInfo(){return{appearance:"outline",kind:"danger"}}get _loading(){const{viewModel:e}=this;return e.syncing||e.updating||this._attachments.submitting}get activeWorkflow(){return this.viewModel.activeWorkflow}get allowedWorkflows(){return this.viewModel.allowedWorkflows}set allowedWorkflows(e){t(s.getLogger(this),"allowedWorkflows",{replacement:"visibleElements",version:"4.29",warnOnce:!0}),this.viewModel.allowedWorkflows=e}get hideTemplatesForInactiveLayers(){return this.viewModel.hideTemplatesForInactiveLayers}set hideTemplatesForInactiveLayers(e){this.viewModel.hideTemplatesForInactiveLayers=e}get icon(){return"pencil"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get labelOptions(){return this.viewModel.labelOptions}set labelOptions(e){this.viewModel.labelOptions=e}get layerInfos(){return this.viewModel.layerInfos}set layerInfos(e){this.viewModel.layerInfos=e}get snappingOptions(){return this.viewModel.snappingOptions}set snappingOptions(e){this.viewModel.snappingOptions=e}get tooltipOptions(){return this.viewModel.tooltipOptions}set tooltipOptions(e){this.viewModel.tooltipOptions=e}get valueOptions(){return this.viewModel.valueOptions}set valueOptions(e){this.viewModel.valueOptions=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}startCreateFeaturesWorkflowAtFeatureTypeSelection(){return this.viewModel.startCreateFeaturesWorkflowAtFeatureTypeSelection()}startCreateFeaturesWorkflowAtFeatureCreation(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureCreation(e)}startCreateFeaturesWorkflowAtFeatureEdit(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureEdit(e)}startUpdateWorkflowAtFeatureSelection(){return this.viewModel.startUpdateWorkflowAtFeatureSelection()}startUpdateWorkflowAtMultipleFeatureSelection(e){return this.viewModel.startUpdateWorkflowAtMultipleFeatureSelection(e)}startUpdateWorkflowAtFeatureEdit(e){return this.viewModel.startUpdateWorkflowAtFeatureEdit(e)}deleteFeatureFromWorkflow(){return this.viewModel.deleteFeatureFromWorkflow()}cancelWorkflow(e){return this.viewModel.cancelWorkflow(e)}render(){const{viewModel:e}=this,t=this.classes(f.base,q.widget,q.panel);return e?J("div",{class:t,key:"base"},J("calcite-flow",{key:"flow"},e.pageStack.map((e=>this._renderPage(e)))),this._prompt?J(O,{...this._prompt,headingLevel:this.headingLevel}):void 0):J("div",{class:t,key:"empty"})}_renderPage(e){switch(e){case"disabled":break;case"ready":return this._renderReady();case"awaiting-feature-creation-info":return this._renderAwaitingFeatureCreationInfo();case"creating-features-upload-details":return this._renderUploadDetails();case"creating-features":return this._renderCreatingFeatures();case"editing-existing-feature":case"editing-attributes":return this._renderUpdateFeature();case"awaiting-update-feature-candidate":return this._renderFeatureList();case"adding-attachment":return this._renderAttachmentAdding();case"editing-attachment":return this._renderAttachmentEditing()}return J("div",{key:"empty-page"})}_renderAwaitingFeatureCreationInfo(){const{EditorPanel:e,messages:t}=this;return J(e,{heading:t.selectTemplate,key:"templates-panel"},J(T,{key:"feature-templates"},J(j,null,this._renderFeatureTemplates())))}_renderUploadDetails(){const{EditorPanel:e,activeWorkflow:t,messages:s}=this;if("create-features"!==t?.type)return null;const o=t.data.upload;return o?J(e,{heading:s.createFeatures,key:"upload-details-panel"},J(B,{helpMessage:this._helpMessage,messages:s,upload:o})):null}_renderCreatingFeatures(){const{EditorPanel:e,activeWorkflow:t,messages:s,messagesCommon:o,headingLevel:i,viewModel:r}=this;if(!t)return null;const a="create-features"===t.type&&t.numPendingFeatures>0||"update"===t.type&&"create-features"===t?.activeWorkflow?.type&&t.activeWorkflow?.numPendingFeatures>0;return J(e,{heading:s.createFeatures,key:"create-features-panel"},a?J(x,{editorViewModel:r,headingLevel:i,messages:s,messagesCommon:o,renderAttachments:this._renderAttachments,renderFeatureForm:this._renderFeatureForm,onDelete:this._onDelete,onSave:this._onSave}):J(F,{helpMessage:this._helpMessage}))}_renderUpdateFeature(){const{EditorPanel:e,messages:t,messagesCommon:s,headingLevel:o,viewModel:i}=this;return J(e,{heading:t.editFeature,key:"update-feature-panel"},J(x,{editorViewModel:i,headingLevel:o,messages:t,messagesCommon:s,renderAttachments:this._renderAttachments,renderFeatureForm:this._renderFeatureForm,onDelete:this._onDelete,onSave:this._onSave}))}_renderCustomTemplateGroupContent(e){const{messages:t,viewModel:s}=this,i=o(e.group.items,(e=>s.itemHasInvalidFormTemplate(e)?t.formFieldCreateError:void 0));return i?J(E,{kind:"warning",message:i}):null}_renderAttachmentAdding(){const{EditorPanel:e,_attachments:t,messages:s,messagesCommon:o}=this;return J(e,{heading:s.addAttachment,key:"attachment-adding-panel"},J(T,{key:"attachments"},this._renderAttachments()),J(W,{buttons:[{label:t.submitting?o.cancel:o.add,disabled:t.submitting||!t.selectedFile,onClick:this._onAttachmentAdd}]}))}_renderAttachmentEditing(){const{EditorPanel:e,_attachments:t,activeWorkflow:s,messages:o,messagesCommon:i}=this;return s?J(e,{heading:o.editAttachment,key:"attachment-editing-panel"},J(T,{key:"attachments"},this._renderAttachments()),s.shouldAllowAttachmentEditing?J(W,{buttons:[{label:i.update,disabled:t.submitting||!t.selectedFile,onClick:this._onAttachmentUpdate},{...this._deleteButtonCommonInfo,onClick:this._onAttachmentDelete,disabled:t.submitting,label:i.delete}]}):void 0):null}_renderReady(){const{EditorPanel:e,messages:t,viewModel:s,visibleElements:o}=this,i=this._helpMessage;return J(e,{heading:t.widgetLabel,key:"landing-panel"},J(T,{key:"landing-content"},s.editorItems.length?[o.editFeaturesSection?J(j,{key:"edit-actions"},this._renderUpdateActions()):null,o.createFeaturesSection&&s.canCreateVisible?J(j,{key:"create-actions"},this._renderCreateActions()):null]:J(L,{key:"no-content"},t.noEditableLayers)),i?J("div",{class:f.helpMessage,key:"footer-actions",slot:"footer"},i):void 0)}get _helpMessage(){const{activeWorkflow:e,messages:t,view:s}=this,o=e?.helpMessage;return o?t["3d"===s?.type?"helpMessages3d":"helpMessages2d"]?.[o]:void 0}_renderUpdateActions(){const{messages:e,messagesCommon:t,viewModel:s}=this,o={id:"select",label:t.select};return J("div",{class:f.updateActions,key:"update-actions"},J(N,{level:H(this.headingLevel)},e.editFeatures),J("calcite-list",{class:f.updateActionsList,selectionAppearance:"border",selectionMode:"single"},G({disabled:!s.canUpdateVisible,grouped:!1,item:o,selectedItem:"awaiting-feature-to-update"===s.activeWorkflow?.stepId?o:void 0,renderIcon:this._renderSelectIcon,onItemSelect:this._onToggleUpdateWorkflow})))}_renderCreateActions(){return J("div",{key:"create-actions"},J(N,{level:H(this.headingLevel)},this.messages.createFeatures),J("div",{class:f.featureTemplatesContainer,key:"templates"},this._renderFeatureTemplates()))}_renderFeatureList(){const{EditorPanel:e,viewModel:t}=this,{activeWorkflow:s}=t;if("update"!==s?.type)return null;const o=s.data.candidates,i=K(this.messages.multipleFeaturesTemplate,{total:o.length});return J(e,{heading:i,key:"feature-list"},J(b,{editorItems:t.editorItems,filterText:this._filterText,id:this.id,messagesTemplates:this.messagesTemplates,workflow:s,onFilterTextChange:e=>this._filterText=e,onSelectFeature:(e,s)=>t.selectFeature(e,s)}))}_showPromptAndWait({title:e,message:t,yesLabel:s,noLabel:o}){const r=i(),{view:a}=this,n=a?.focused;return this._showPrompt({title:e,message:t,context:"danger",actions:{primary:{label:s,action:()=>r.resolve(!0)},secondary:{label:o,action:()=>r.resolve(!1)}}}),r.promise.finally((()=>{this._clearPrompt(),n&&a?.focus()}))}};e([d()],Q.prototype,"_featureForm",void 0),e([d()],Q.prototype,"_attachments",void 0),e([d()],Q.prototype,"_featureTemplates",void 0),e([d()],Q.prototype,"_filterText",void 0),e([d()],Q.prototype,"_prompt",void 0),e([d()],Q.prototype,"_spinner",void 0),e([d()],Q.prototype,"_deleteButtonCommonInfo",null),e([d()],Q.prototype,"_loading",null),e([d({readOnly:!0})],Q.prototype,"activeWorkflow",null),e([d()],Q.prototype,"allowedWorkflows",null),e([d()],Q.prototype,"headingLevel",void 0),e([d()],Q.prototype,"hideTemplatesForInactiveLayers",null),e([d()],Q.prototype,"icon",null),e([d()],Q.prototype,"label",null),e([d()],Q.prototype,"labelOptions",null),e([d()],Q.prototype,"layerInfos",null),e([d(),z("esri/widgets/Editor/t9n/Editor")],Q.prototype,"messages",void 0),e([d(),z("esri/t9n/common")],Q.prototype,"messagesCommon",void 0),e([d(),z("esri/widgets/FeatureTemplates/t9n/FeatureTemplates")],Q.prototype,"messagesTemplates",void 0),e([d()],Q.prototype,"snappingOptions",null),e([d()],Q.prototype,"tooltipOptions",null),e([d()],Q.prototype,"supportingWidgetDefaults",void 0),e([d({type:p,nonNullable:!0})],Q.prototype,"valueOptions",null),e([d()],Q.prototype,"view",null),e([d(),$(["sketch-create","sketch-delete","sketch-update","workflow-cancel","workflow-commit"])],Q.prototype,"viewModel",void 0),e([d({type:y,nonNullable:!0})],Q.prototype,"visibleElements",void 0),e([d()],Q.prototype,"_helpMessage",null),Q=e([m("esri.widgets.Editor")],Q);const X=Q;export{X as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{deprecatedProperty as t}from"../core/deprecate.js";import{handlesGroup as s,makeHandle as o}from"../core/handleUtils.js";import i from"../core/Logger.js";import{mappedFind as r}from"../core/maybe.js";import{createResolver as a}from"../core/promiseUtils.js";import{watch as n,initial as l,on as d,when as m,syncAndInitial as c}from"../core/reactiveUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as h}from"../core/accessorSupport/decorators/subclass.js";import u from"../views/interactive/sketch/SketchValueOptions.js";import g from"./Attachments.js";import w from"./FeatureForm.js";import f from"./FeatureTemplates.js";import v from"./Spinner.js";import _ from"./Widget.js";import{css as y}from"./Editor/css.js";import k from"./Editor/EditorViewModel.js";import{isModelUpload as F}from"./Editor/modelUploadUtils.js";import M from"./Editor/VisibleElements.js";import{loadCreateFeaturesPanelContentComponents as b,CreateFeaturesPanelContent as A}from"./Editor/components/CreateFeaturesPanelContent.js";import{loadFeatureListComponents as W,FeatureList as C}from"./Editor/components/FeatureList.js";import{loadFooterActionsComponents as E,FooterActions as T}from"./Editor/components/FooterActions.js";import{loadNoticesComponents as P,Notice as j}from"./Editor/components/Notices.js";import{loadPanelContentComponents as L,PanelContent as I,PanelContentSection as U,PanelContentMessage as S}from"./Editor/components/PanelContent.js";import{PanelToolbar as D,loadPanelToolbarComponents as O}from"./Editor/components/PanelToolbar.js";import{loadPromptComponents as x,Prompt as V}from"./Editor/components/Prompt.js";import{loadUpdateFeaturePanelContentComponents as B,UpdateFeaturePanelContent as G}from"./Editor/components/UpdateFeaturePanelContent.js";import{loadUploadDetailsComponents as R,UploadDetails as q}from"./Editor/components/UploadDetails.js";import{renderItem as H}from"./FeatureTemplates/ItemList.js";import{loadCalciteComponents as N}from"./support/componentsUtils.js";import{globalCss as z}from"./support/globalCss.js";import{incrementHeadingLevel as $,Heading as J}from"./support/Heading.js";import"./support/widgetUtils.js";import{messageBundle as K}from"./support/decorators/messageBundle.js";import{vmEvent as Q}from"./support/decorators/vmEvent.js";import{tsx as X}from"./support/jsxFactory.js";import{substitute as Y}from"../intl/substitute.js";let Z=class extends _{constructor(e,t){super(e,t),this._featureForm=new w,this._attachments=new g({visibleElements:{addSubmitButton:!1,cancelAddButton:!1,cancelUpdateButton:!1,deleteButton:!1,errorMessage:!1,progressBar:!1,updateButton:!1}}),this._featureTemplates=new f({enableListScroll:!1,renderItemContentEnd:e=>e.supportsUpload?X("calcite-icon",{class:y.templateItemContentEnd,icon:"upload-to",key:"upload-icon"}):null,renderItemLabel:e=>e.label,renderCustomGroupContent:e=>this._renderCustomTemplateGroupContent(e)}),this._filterText="",this._prompt=null,this._spinner=new v,this._loading=!1,this.headingLevel=4,this.messages=null,this.messagesCommon=null,this.messagesTemplates=null,this.supportingWidgetDefaults=null,this.viewModel=new k,this.visibleElements=new M,this._renderAttachments=()=>this._attachments.render(),this._renderFeatureForm=()=>this._featureForm.render(),this._renderFeatureTemplates=()=>this._featureTemplates.render(),this._renderSelectIcon=()=>X("calcite-icon",{icon:"cursor",slot:"content-start"}),this.EditorPanel=({heading:e,key:t},...s)=>{const{visibleElements:o}=this;return X("calcite-flow-item",{closable:!1,heading:e,headingLevel:this.headingLevel,key:t,loading:this._loading,onCalciteFlowItemBack:this._onBack},o.settingsMenu?X(D,{editorViewModel:this.viewModel,messagesCommon:this.messagesCommon,visibleElements:o}):null,...s)},this._showDiscardEditsPrompt=()=>{const{messages:e,activeWorkflow:t}=this;return"create-features"===t?.type&&F(t.data.creationInfo)?this._showPromptAndWait("success"===t.data.upload?.state?e.modelUploads.cancelPlacementPrompt:e.modelUploads.cancelUploadPrompt):this._showPromptAndWait({title:e.cancelEditTitle,message:e.cancelEditWarningMessage,yesLabel:e.discardEdits,noLabel:e.continueEditing})},this._showGenericCancelPrompt=()=>{const{messages:e,messagesCommon:t}=this;return this._showPromptAndWait({title:e.cancelRequestTitle,message:e.cancelRequestWarningMessage,yesLabel:t.form.yes,noLabel:t.form.no})},this._showPrompt=e=>{this._prompt?.cancel?.(),this._prompt=e},this._clearPrompt=()=>{this._prompt=null},this._onSave=()=>{this.viewModel.saveWorkflow()},this._onDelete=()=>{const{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteWarningTitle,message:e.deleteWarningMessage,context:"danger",actions:{primary:{label:t.delete,action:()=>{this.deleteFeatureFromWorkflow(),this._clearPrompt()}},secondary:{label:e.keepFeature,action:this._clearPrompt}}})},this._onToggleUpdateWorkflow=()=>this.viewModel.toggleUpdateWorkflow(),this._onBack=e=>(e?.stopPropagation(),this.viewModel.back()),this._onAttachmentAdd=()=>{const{activeWorkflow:e}=this.viewModel;e&&("create-features"===e.type||"update"===e.type&&"create-features"===e.activeWorkflow?.type?(this._attachments.addFile(),e.back()):this._attachments.addAttachment().then((()=>e.back())))},this._onAttachmentUpdate=()=>{const{activeWorkflow:e}=this.viewModel;e&&("create-features"===e.type?(this._attachments.updateFile(),e.back()):this._attachments.updateAttachment().then((()=>e.back())))},this._onAttachmentDelete=()=>{const{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteAttachmentWarningTitle,message:e.deleteAttachmentWarningMessage,context:"danger",actions:{primary:{label:t.delete,action:this._onAttachmentDeleteConfirm},secondary:{label:e.keepAttachment,action:this._clearPrompt}}})},this._onAttachmentDeleteConfirm=async()=>{const e=this._attachments,{activeWorkflow:t}=this.viewModel;t&&("create-features"===t.type?e.deleteFile():(await e.deleteAttachment(e.viewModel.activeAttachmentInfo),this._clearPrompt()),await t.back(),this._clearPrompt())},this._onAttachmentsError=e=>{this._showPrompt({title:this.messages.errorWarningTitle,message:e.message,context:"warning",actions:{primary:{label:this.messagesCommon.form.ok,action:this._clearPrompt}}})}}initialize(){this._featureForm.showPrompt=this._showPrompt,this._featureForm.clearPrompt=this._clearPrompt,this.addHandles([n((()=>$(this.headingLevel)),(e=>{this._featureForm.headingLevel=e,this._featureTemplates.headingLevel=e}),l),d((()=>this.viewModel.activeWorkflow),"cancel-request",(({controller:e})=>{(this.viewModel.hasPendingEdits?this._showDiscardEditsPrompt():this._showGenericCancelPrompt()).then((t=>t?e.allow():e.deny()))})),m((()=>this.viewModel.featureFormViewModel),(e=>{this._featureForm.viewModel=e}),l),n((()=>this.viewModel),(e=>{this._attachments.viewModel=e?.attachmentsViewModel??null,this._featureTemplates.viewModel=e?.featureTemplatesViewModel??null,this._spinner.viewModel=e?.spinnerViewModel??null,e.showDiscardEditsPrompt=this._showDiscardEditsPrompt}),l),n((()=>this.view),((e,t)=>{const s=`editor-${this.id}-spinner`;t?.ui.remove(this._spinner,s),e?.ui.add(this._spinner,{key:s,position:"manual"})}),l),n((()=>[this.supportingWidgetDefaults,this.viewModel.sketchViewModel]),(([e])=>{e&&(this._featureForm.set(e.featureForm),this._attachments.set(e.attachments),this._featureTemplates.set(e.featureTemplates),this.viewModel.sketchViewModel?.set(e.sketch))}),l),m((()=>this._attachments?.error),(e=>this._onAttachmentsError(e))),m((()=>this.viewModel?.failures),(e=>{const{messages:t}=this,[{error:s,retry:o,cancel:i}]=e;this._showPrompt({title:t.errorWarningTitle,message:Y(t.errorWarningMessageTemplate,{errorMessage:s.message}),context:"warning",actions:{primary:{label:t.retry,action:()=>{o(),this._clearPrompt()}},secondary:{label:t.ignore,action:()=>{i(),this._clearPrompt()}}}})})),n((()=>this.viewModel?.state),(e=>{switch(e){case"awaiting-feature-to-update":case"ready":case"disabled":this._filterText="",this._featureTemplates.filterText=""}})),n((()=>this.viewModel.featureFormDisabled),(e=>this._featureForm.disabled=e)),this._connectDelayedLoading()])}destroy(){this._attachments.destroy(),this._featureForm.destroy(),this._featureTemplates.destroy()}loadDependencies(){return Promise.all([N({"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item.js"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js"),list:()=>import("@esri/calcite-components/dist/components/calcite-list.js")}),b(),W(),E(),P(),L(),O(),x(),B(),R()])}get _deleteButtonCommonInfo(){return{appearance:"outline",kind:"danger"}}_connectDelayedLoading(){const e=250;let t;return s([n((()=>{const{viewModel:e}=this;return e.syncing||e.updating||this._attachments.submitting}),(s=>{clearTimeout(t),t=void 0,s?t=setTimeout((()=>{clearTimeout(t),t=void 0,this._loading=s}),e):this._loading=s}),c),o((()=>clearTimeout(t)))])}get activeWorkflow(){return this.viewModel.activeWorkflow}get allowedWorkflows(){return this.viewModel.allowedWorkflows}set allowedWorkflows(e){t(i.getLogger(this),"allowedWorkflows",{replacement:"visibleElements",version:"4.29",warnOnce:!0}),this.viewModel.allowedWorkflows=e}get hideTemplatesForInactiveLayers(){return this.viewModel.hideTemplatesForInactiveLayers}set hideTemplatesForInactiveLayers(e){this.viewModel.hideTemplatesForInactiveLayers=e}get icon(){return"pencil"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get labelOptions(){return this.viewModel.labelOptions}set labelOptions(e){this.viewModel.labelOptions=e}get layerInfos(){return this.viewModel.layerInfos}set layerInfos(e){this.viewModel.layerInfos=e}get snappingOptions(){return this.viewModel.snappingOptions}set snappingOptions(e){this.viewModel.snappingOptions=e}get tooltipOptions(){return this.viewModel.tooltipOptions}set tooltipOptions(e){this.viewModel.tooltipOptions=e}get valueOptions(){return this.viewModel.valueOptions}set valueOptions(e){this.viewModel.valueOptions=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}startCreateFeaturesWorkflowAtFeatureTypeSelection(){return this.viewModel.startCreateFeaturesWorkflowAtFeatureTypeSelection()}startCreateFeaturesWorkflowAtFeatureCreation(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureCreation(e)}startCreateFeaturesWorkflowAtFeatureEdit(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureEdit(e)}startUpdateWorkflowAtFeatureSelection(){return this.viewModel.startUpdateWorkflowAtFeatureSelection()}startUpdateWorkflowAtMultipleFeatureSelection(e){return this.viewModel.startUpdateWorkflowAtMultipleFeatureSelection(e)}startUpdateWorkflowAtFeatureEdit(e){return this.viewModel.startUpdateWorkflowAtFeatureEdit(e)}deleteFeatureFromWorkflow(){return this.viewModel.deleteFeatureFromWorkflow()}cancelWorkflow(e){return this.viewModel.cancelWorkflow(e)}render(){const{viewModel:e}=this,t=this.classes(y.base,z.widget,z.panel);return e?X("div",{class:t,key:"base"},X("calcite-flow",{key:"flow"},e.pageStack.map((e=>this._renderPage(e)))),this._prompt?X(V,{...this._prompt,headingLevel:this.headingLevel}):void 0):X("div",{class:t,key:"empty"})}_renderPage(e){switch(e){case"disabled":break;case"ready":return this._renderReady();case"awaiting-feature-creation-info":return this._renderAwaitingFeatureCreationInfo();case"creating-features-upload-details":return this._renderUploadDetails();case"creating-features":return this._renderCreatingFeatures();case"editing-existing-feature":case"editing-attributes":return this._renderUpdateFeature();case"awaiting-update-feature-candidate":return this._renderFeatureList();case"adding-attachment":return this._renderAttachmentAdding();case"editing-attachment":return this._renderAttachmentEditing()}return X("div",{key:"empty-page"})}_renderAwaitingFeatureCreationInfo(){const{EditorPanel:e,messages:t}=this;return X(e,{heading:t.selectTemplate,key:"templates-panel"},X(I,{key:"feature-templates"},X(U,null,this._renderFeatureTemplates())))}_renderUploadDetails(){const{EditorPanel:e,activeWorkflow:t,messages:s}=this;if("create-features"!==t?.type)return null;const o=t.data.upload;return o?X(e,{heading:s.createFeatures,key:"upload-details-panel"},X(q,{helpMessage:this._helpMessage,messages:s,upload:o})):null}_renderCreatingFeatures(){const{EditorPanel:e,activeWorkflow:t,messages:s,messagesCommon:o,headingLevel:i,viewModel:r}=this;if(!t)return null;const a="create-features"===t.type&&t.numPendingFeatures>0||"update"===t.type&&"create-features"===t?.activeWorkflow?.type&&t.activeWorkflow?.numPendingFeatures>0;return X(e,{heading:s.createFeatures,key:"create-features-panel"},a?X(G,{editorViewModel:r,headingLevel:i,messages:s,messagesCommon:o,renderAttachments:this._renderAttachments,renderFeatureForm:this._renderFeatureForm,onDelete:this._onDelete,onSave:this._onSave}):X(A,{helpMessage:this._helpMessage}))}_renderUpdateFeature(){const{EditorPanel:e,messages:t,messagesCommon:s,headingLevel:o,viewModel:i}=this;return X(e,{heading:t.editFeature,key:"update-feature-panel"},X(G,{editorViewModel:i,headingLevel:o,messages:t,messagesCommon:s,renderAttachments:this._renderAttachments,renderFeatureForm:this._renderFeatureForm,onDelete:this._onDelete,onSave:this._onSave}))}_renderCustomTemplateGroupContent(e){const{messages:t,viewModel:s}=this,o=r(e.group.items,(e=>s.itemHasInvalidFormTemplate(e)?t.formFieldCreateError:void 0));return o?X(j,{kind:"warning",message:o}):null}_renderAttachmentAdding(){const{EditorPanel:e,_attachments:t,messages:s,messagesCommon:o}=this;return X(e,{heading:s.addAttachment,key:"attachment-adding-panel"},X(I,{key:"attachments"},this._renderAttachments()),X(T,{buttons:[{label:t.submitting?o.cancel:o.add,disabled:t.submitting||!t.selectedFile,onClick:this._onAttachmentAdd}]}))}_renderAttachmentEditing(){const{EditorPanel:e,_attachments:t,activeWorkflow:s,messages:o,messagesCommon:i}=this;return s?X(e,{heading:o.editAttachment,key:"attachment-editing-panel"},X(I,{key:"attachments"},this._renderAttachments()),s.shouldAllowAttachmentEditing?X(T,{buttons:[{label:i.update,disabled:t.submitting||!t.selectedFile,onClick:this._onAttachmentUpdate},{...this._deleteButtonCommonInfo,onClick:this._onAttachmentDelete,disabled:t.submitting,label:i.delete}]}):void 0):null}_renderReady(){const{EditorPanel:e,messages:t,viewModel:s,visibleElements:o}=this,i=this._helpMessage;return X(e,{heading:t.widgetLabel,key:"landing-panel"},X(I,{key:"landing-content"},s.editorItems.length?[o.editFeaturesSection?X(U,{key:"edit-actions"},this._renderUpdateActions()):null,o.createFeaturesSection&&s.canCreateVisible?X(U,{key:"create-actions"},this._renderCreateActions()):null]:X(S,{key:"no-content"},t.noEditableLayers)),i?X("div",{class:y.helpMessage,key:"footer-actions",slot:"footer"},i):void 0)}get _helpMessage(){const{activeWorkflow:e,messages:t,view:s}=this,o=e?.helpMessage;return o?t["3d"===s?.type?"helpMessages3d":"helpMessages2d"]?.[o]:void 0}_renderUpdateActions(){const{messages:e,messagesCommon:t,viewModel:s}=this,o={id:"select",label:t.select};return X("div",{class:y.updateActions,key:"update-actions"},X(J,{level:$(this.headingLevel)},e.editFeatures),X("calcite-list",{class:y.updateActionsList,selectionAppearance:"border",selectionMode:"single"},H({disabled:!s.canUpdateVisible,grouped:!1,item:o,selectedItem:"awaiting-feature-to-update"===s.activeWorkflow?.stepId?o:void 0,renderIcon:this._renderSelectIcon,onItemSelect:this._onToggleUpdateWorkflow})))}_renderCreateActions(){return X("div",{key:"create-actions"},X(J,{level:$(this.headingLevel)},this.messages.createFeatures),X("div",{class:y.featureTemplatesContainer,key:"templates"},this._renderFeatureTemplates()))}_renderFeatureList(){const{EditorPanel:e,viewModel:t}=this,{activeWorkflow:s}=t;if("update"!==s?.type)return null;const o=s.data.candidates,i=Y(this.messages.multipleFeaturesTemplate,{total:o.length});return X(e,{heading:i,key:"feature-list"},X(C,{editorItems:t.editorItems,filterText:this._filterText,id:this.id,messagesTemplates:this.messagesTemplates,workflow:s,onFilterTextChange:e=>this._filterText=e,onSelectFeature:(e,s)=>t.selectFeature(e,s)}))}_showPromptAndWait({title:e,message:t,yesLabel:s,noLabel:o}){const i=a(),{view:r}=this,n=r?.focused;return this._showPrompt({title:e,message:t,context:"danger",actions:{primary:{label:s,action:()=>i.resolve(!0)},secondary:{label:o,action:()=>i.resolve(!1)}}}),i.promise.finally((()=>{this._clearPrompt(),n&&r?.focus()}))}};e([p()],Z.prototype,"_featureForm",void 0),e([p()],Z.prototype,"_attachments",void 0),e([p()],Z.prototype,"_featureTemplates",void 0),e([p()],Z.prototype,"_filterText",void 0),e([p()],Z.prototype,"_prompt",void 0),e([p()],Z.prototype,"_spinner",void 0),e([p()],Z.prototype,"_deleteButtonCommonInfo",null),e([p()],Z.prototype,"_loading",void 0),e([p({readOnly:!0})],Z.prototype,"activeWorkflow",null),e([p()],Z.prototype,"allowedWorkflows",null),e([p()],Z.prototype,"headingLevel",void 0),e([p()],Z.prototype,"hideTemplatesForInactiveLayers",null),e([p()],Z.prototype,"icon",null),e([p()],Z.prototype,"label",null),e([p()],Z.prototype,"labelOptions",null),e([p()],Z.prototype,"layerInfos",null),e([p(),K("esri/widgets/Editor/t9n/Editor")],Z.prototype,"messages",void 0),e([p(),K("esri/t9n/common")],Z.prototype,"messagesCommon",void 0),e([p(),K("esri/widgets/FeatureTemplates/t9n/FeatureTemplates")],Z.prototype,"messagesTemplates",void 0),e([p()],Z.prototype,"snappingOptions",null),e([p()],Z.prototype,"tooltipOptions",null),e([p()],Z.prototype,"supportingWidgetDefaults",void 0),e([p({type:u,nonNullable:!0})],Z.prototype,"valueOptions",null),e([p()],Z.prototype,"view",null),e([p(),Q(["sketch-create","sketch-delete","sketch-update","workflow-cancel","workflow-commit"])],Z.prototype,"viewModel",void 0),e([p({type:M,nonNullable:!0})],Z.prototype,"visibleElements",void 0),e([p()],Z.prototype,"_helpMessage",null),Z=e([h("esri.widgets.Editor")],Z);const ee=Z;export{ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4796],{81457:(e,t,r)=>{r.d(t,{A:()=>P});var n,o=r(90237),i=r(61147),s=(r(44208),r(66552)),a=r(25482),l=r(4718),u=r(90629),c=r(10107),p=(r(53966),r(36005)),d=r(40608),y=r(43937),h=(r(87811),r(32730));let f=n=class extends a.oY{constructor(){super(...arguments),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,h.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,h.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new n({expression:this.expression,title:this.title,value:this.value})}};(0,o._)([(0,c.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],f.prototype,"expression",void 0),(0,o._)([(0,p.w)("expression",["expression","value"])],f.prototype,"readExpression",null),(0,o._)([(0,y.K)("expression")],f.prototype,"writeExpression",null),(0,o._)([(0,c.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],f.prototype,"title",void 0),(0,o._)([(0,c.MZ)({json:{read:!1,write:!1}})],f.prototype,"value",void 0),f=n=(0,o._)([(0,d.$)("esri.layers.support.LabelExpressionInfo")],f);const m=f;var b,w=r(83531),g=r(59868),v=r(73838);const x=new s.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function S(e,t,r){return{enabled:!(0,w.TU)(r?.layer)}}function A(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function M(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let I=b=class extends a.oY{static evaluateWhere(e,t){const r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;const n=e.split(" ");if(3===n.length)return r(t[n[0]],n[1],n[2]);if(7===n.length){const e=r(t[n[0]],n[1],n[2]),o=n[3],i=r(t[n[4]],n[5],n[6]);switch(o){case"AND":return e&&i;case"OR":return e||i}}return!1}catch(e){}}constructor(e){super(e),this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.repeatLabelDistance=null,this.symbol=g.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){const r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,h.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=(0,h.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,n){if(null==e&&null!=this.labelExpression&&A(n))e=new m({expression:this.getLabelExpressionArcade()});else if(!e)return;const o=e.toJSON(n);o.expression&&(t[r]=o)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}getLabelExpression(){return(0,h.XJ)(this)}getLabelExpressionArcade(){return(0,h.BI)(this)}getLabelExpressionSingleField(){return(0,h.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new b({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,l.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,l.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,o._)([(0,c.MZ)({type:String,json:{write:!0}})],I.prototype,"name",void 0),(0,o._)([(0,c.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:S}}}}})],I.prototype,"allowOverrun",void 0),(0,o._)([(0,c.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:S}}}}})],I.prototype,"deconflictionStrategy",void 0),(0,o._)([(0,c.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&M(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],I.prototype,"labelExpression",void 0),(0,o._)([(0,p.w)("labelExpression")],I.prototype,"readLabelExpression",null),(0,o._)([(0,y.K)("labelExpression")],I.prototype,"writeLabelExpression",null),(0,o._)([(0,c.MZ)({type:m,json:{write:{overridePolicy:(e,t,r)=>function(e){return A(e)||M(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],I.prototype,"labelExpressionInfo",void 0),(0,o._)([(0,y.K)("labelExpressionInfo")],I.prototype,"writeLabelExpressionInfo",null),(0,o._)([(0,c.MZ)({type:x.apiValues,json:{type:x.jsonValues,read:x.read,write:x.write}})],I.prototype,"labelPlacement",void 0),(0,o._)([(0,c.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],I.prototype,"labelPosition",void 0),(0,o._)([(0,c.MZ)({type:Number})],I.prototype,"maxScale",void 0),(0,o._)([(0,y.K)("maxScale")],I.prototype,"writeMaxScale",null),(0,o._)([(0,c.MZ)({type:Number})],I.prototype,"minScale",void 0),(0,o._)([(0,y.K)("minScale")],I.prototype,"writeMinScale",null),(0,o._)([(0,c.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],I.prototype,"repeatLabel",void 0),(0,o._)([(0,c.MZ)({type:Number,cast:u.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],I.prototype,"repeatLabelDistance",void 0),(0,o._)([(0,c.MZ)({types:i.em,json:{origins:{"web-scene":{types:i.Rv,write:v.oO,default:null}},write:v.oO,default:null}})],I.prototype,"symbol",void 0),(0,o._)([(0,c.MZ)({type:Boolean,json:{write:!0}})],I.prototype,"useCodedValues",void 0),(0,o._)([(0,c.MZ)({type:String,json:{write:!0}})],I.prototype,"where",void 0),I=b=(0,o._)([(0,d.$)("esri.layers.support.LabelClass")],I);const P=I},15426:(e,t,r)=>{r.d(t,{Xl:()=>S,ct:()=>I,pc:()=>T,hx:()=>V,C$:()=>k,PD:()=>z,VZ:()=>D,mm:()=>L,VA:()=>H,WP:()=>j,iX:()=>x,Nv:()=>G,xd:()=>Q,GA:()=>U,jp:()=>R,tG:()=>K,lV:()=>E,B5:()=>Z,Ye:()=>F,sg:()=>_,hM:()=>C,S2:()=>O,jD:()=>N,Zm:()=>q,$4:()=>B,Pt:()=>X,bt:()=>M,rn:()=>P,ZJ:()=>W});var n=r(70333),o=r(61147),i=r(60999),s=r(49186),a=r(66552),l=r(39516),u=r(13069),c=r(90360),p=r(39357),d=r(53177),y=r(61956);async function h(e,t,r){t=t.clone(),e.capabilities.query.supportsMaxRecordCountFactor&&(t.maxRecordCountFactor=f(e));const n=function(e){return f(e)*function(e){return e.capabilities.query.maxRecordCount||2e3}(e)}(e),o=e.capabilities.query.supportsPagination;t.start=0,t.num=n;let i=null;for(;;){const s=await e.source.queryFeaturesJSON(t,r);if(null==i?i=s:i.features=i.features.concat(s.features),i.exceededTransferLimit=s.exceededTransferLimit,!o||!s.exceededTransferLimit)break;t.start+=n}return i}function f(e){return e.capabilities.query.supportsMaxRecordCountFactor?y.A.MAX_MAX_RECORD_COUNT_FACTOR:1}var m=r(83531),b=r(96576),w=r(93618),g=r(54546),v=r(26591);const x=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function S(e,t,r,n){const o=await $(e);if(await A(e,t,n),!o.addAttachment)throw new s.A(n,"Layer source does not support addAttachment capability");return o.addAttachment(t,r)}function A(e,t,r){const{attributes:n}=t,{objectIdField:o}=e;return e.capabilities?.data?.supportsAttachment?t?n?o&&n[o]?Promise.resolve():Promise.reject(new s.A(r,`feature is missing the identifying attribute ${o}`)):Promise.reject(new s.A(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new s.A(r,"A feature is required to add/delete/update attachments")):Promise.reject(new s.A(r,"this layer doesn't support attachments"))}async function M(e,t,r,n,o){const i=await $(e);if(await A(e,t,o),!i.updateAttachment)throw new s.A(o,"Layer source does not support updateAttachment capability");return i.updateAttachment(t,r,n)}async function I(e,t,n){const{applyEdits:o}=await r.e(8628).then(r.bind(r,78628)),i=await e.load();let s=n;return"feature"===i.type&&i.infoFor3D&&null!=t.deleteFeatures&&null!=i.globalIdField&&(s={...s,globalIdToObjectId:await U(i,t.deleteFeatures,i.globalIdField)}),o(i,i.source,t,n)}async function P(e,t,n){const{uploadAssets:o}=await r.e(8628).then(r.bind(r,78628)),i=await e.load();return o(i,i.source,t,n)}async function L(e,t,r,n){const o=await $(e);if(await A(e,t,n),!o.deleteAttachments)throw new s.A(n,"Layer source does not support deleteAttachments capability");return o.deleteAttachments(t,r)}async function j(e,t,r){const n=(await e.load({signal:t?.signal})).source;if(!n.fetchRecomputedExtents)throw new s.A(r,"Layer source does not support fetchUpdates capability");return n.fetchRecomputedExtents(t)}async function E(e,t,r,n){t=g.A.from(t),await e.load();const o=e.source,i=e.capabilities;if(!i?.data?.supportsAttachment)throw new s.A(n,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:l,globalIds:u,num:c,size:p,start:d,where:y}=t;if(!i?.operations?.supportsQueryAttachments&&(a?.length>0||u?.length>0||p?.length>0||c||d||y))throw new s.A(n,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t);if(!(l?.length||u?.length||y))throw new s.A(n,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!o.queryAttachments)throw new s.A(n,"Layer source does not support queryAttachments capability",t);return o.queryAttachments(t)}async function _(e,t,r,n){const o=await $(e);if(!o.queryObjectIds)throw new s.A(n,"Layer source does not support queryObjectIds capability");return o.queryObjectIds(y.A.from(t)??e.createQuery(),r)}async function F(e,t,r,n){const o=await $(e);if(!o.queryFeatureCount)throw new s.A(n,"Layer source does not support queryFeatureCount capability");return o.queryFeatureCount(y.A.from(t)??e.createQuery(),r)}async function Z(e,t,r,n){const o=await $(e);if(!o.queryExtent)throw new s.A(n,"Layer source does not support queryExtent capability");return o.queryExtent(y.A.from(t)??e.createQuery(),r)}async function C(e,t,r,n){const o=await $(e);if(!o.queryRelatedFeatures)throw new s.A(n,"Layer source does not support queryRelatedFeatures capability");return o.queryRelatedFeatures(v.default.from(t),r)}async function O(e,t,r,n){const o=await $(e);if(!o.queryRelatedFeaturesCount)throw new s.A(n,"Layer source does not support queryRelatedFeaturesCount capability");return o.queryRelatedFeaturesCount(v.default.from(t),r)}async function R(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:n}=await t.refresh();if(null!=n&&(e.sourceJSON={...e.sourceJSON,...n},e.read(n,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await(0,l.G)(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function D(e){const t=new y.A,r=e.capabilities?.data,n=e.capabilities?.query;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,n&&(t.compactGeometryEnabled=n.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=n.supportsDefaultSpatialReference),r&&(r.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),r.supportsM&&null!=e.returnM&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:o,timeExtent:i}=e;return t.timeExtent=null!=o&&null!=i?i.offset(-o.value,o.unit):i||null,t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null,t}function N(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeGlobalID"===e.type)return e.name}function q(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeOID"===e.type)return e.name}function B(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}function G(e,t){const{subtypes:r,subtypeField:n}=e;if(!t?.attributes||!r?.length||!n)return null;const o=t.attributes[n];return null==o?null:r.find((e=>e.code===o))}function T(e,t){const{fieldsIndex:r,subtypeField:n}=e,{name:o}=r.get(t)??{};if(!o)return null;if((n&&r.get(n)?.name)===o&&e.subtypes?.length){const t=e.subtypes.map((e=>new p.H({code:e.code,name:e.name})));if(t?.length)return new d.A({codedValues:t})}return null}function V(e,t){const{fieldsIndex:r}=e,{name:n}=r.get(t)??{};if(!n)return null;if(("typeIdField"in e?r.get(e.typeIdField)?.name:null)===n&&"types"in e&&e.types?.length){const t=e.types.map((e=>new p.H({code:e.id,name:e.name})));return new d.A({codedValues:t})}return null}async function $(e){return(await e.load()).source}async function H(e,t,r){const o=e.parsedUrl?.path;o&&e.authenticationTriggerEvent===t&&await async function(e,t){if(!n.id)return;if(n.id.findCredential(e))return;let r;try{const o=await(0,m.wI)(e,t);o&&(r=await n.id.checkSignInStatus(`${o}/sharing`))}catch(e){}if(r)try{const r=null!=t?t.signal:null;await n.id.getCredential(e,{signal:r})}catch(e){}}(o,r)}function k(e){return!X(e)&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const J=(0,c.C)({types:o.xK});function z(e,t){if(e.defaultSymbol)return e.types?.length?new w.A({defaultSymbol:J(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:J(e.symbol,e,t)})))}):new b.A({symbol:J(e.defaultSymbol,e,t)})}function K(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function U(e,t,r){if(null==t)return null;const n=[],{objectIdField:o}=e;if(t.forEach((e=>{let t=null;if("attributes"in e){const{attributes:n}=e;t={globalId:n[r],objectId:null!=n[o]&&-1!==n[o]?n[o]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||n.push(t.globalId))})),0===n.length)return null;const s=e.createQuery();s.where=n.map((e=>`${r}='${e}'`)).join(" OR "),s.returnGeometry=!1,s.outFields=[o,r],s.cacheHint=!1;const a=await(0,i.DZ)(h(e,s));if(!a.ok)return null;const l=new Map,c=a.value.features;for(const e of c){const t=e.attributes[r],n=e.attributes[o];null!=t&&null!=n&&-1!==n&&l.set((0,u.AG)(t),n)}return l}function Q(e,t,r){if(!t||!r||!e)return null;const n=r.getAttribute(t);return null==n?null:e.find((e=>{const{id:t}=e;return null!=t&&t.toString()===n.toString()}))??null}function X(e){return e.sourceJSON?.isMultiServicesView||function(e){return!!e.sourceJSON?.capabilities?.toLowerCase().split(",").map((e=>e.trim())).includes("map")}(e)}function W(e,t,r){const n=t?.queryBins;if(!n)throw new s.A(r,"Layer source does not support binning");switch(e.binParameters.type){case"auto-interval":if(!n.supportsAutoInterval)throw new s.A(r,"Layer source does not support auto-interval binning");break;case"date":if(!n.supportsDate)throw new s.A(r,"Layer source does not support date binning");break;case"fixed-boundaries":if(!n.supportsFixedBoundaries)throw new s.A(r,"Layer source does not support fixed-boundaries binning");break;case"fixed-interval":if(!n.supportsFixedInterval)throw new s.A(r,"Layer source does not support fixed-interval binning")}const o=n?.supportedStatistics;if(e.outStatistics&&o){const t=new Map([["count","count"],["sum","sum"],["min","min"],["max","max"],["avg","avg"],["stddev","stddev"],["var","var"],["percentile-continuous","percentileContinuous"],["percentile-discrete","percentileDiscrete"],["centroid-aggregate","centroid"],["convex-hull-aggregate","convexHull"],["envelope-aggregate","envelope"]]);for(const{statisticType:n}of e.outStatistics){const e=t.get(n);if(e&&!o[e])throw new s.A(r,`Layer source does not support ${n} statistic type`)}}}},39383:(e,t,r)=>{r.d(t,{w:()=>l,z:()=>c});var n=r(49186),o=r(53966),i=r(81457);const s=()=>o.A.getLogger("esri.layers.support.labelingInfo"),a=/\[([^[\]]+)\]/gi;function l(e,t,r){return e?e.map((e=>{const n=new i.A;if(n.read(e,r),n.labelExpression){const e=t.fields||t.layerDefinition?.fields||this.fields;n.labelExpression=n.labelExpression.replaceAll(a,((t,r)=>`[${function(e,t){if(!t)return e;const r=e.toLowerCase();for(let e=0;e<t.length;e++){const n=t[e].name;if(n.toLowerCase()===r)return n}return e}(r,e)}]`))}return n})):null}const u={esriGeometryPoint:["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:null,esriGeometryEnvelope:null};function c(e,t){const r=[];for(const o of e){const e=o.labelPlacement,i=u[t];if(!o.symbol)return s().warn("No ILabelClass symbol specified."),[];if(!i)return s().error(new n.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(i.includes(e))r.push(o);else{const n=i[0];e&&s().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${n}`);const a=o.clone();a.labelPlacement=n,r.push(a)}}return r}},54546:(e,t,r)=>{r.d(t,{A:()=>d});var n,o=r(90237),i=r(25482),s=r(4718),a=r(10107),l=r(56507),u=r(40608),c=r(43937);let p=n=class extends i.oY{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new n((0,s.o8)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,o._)([(0,a.MZ)({type:[String],json:{write:!0}})],p.prototype,"attachmentTypes",void 0),(0,o._)([(0,a.MZ)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],p.prototype,"attachmentsWhere",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],p.prototype,"cacheHint",void 0),(0,o._)([(0,a.MZ)({type:[String],json:{write:!0}})],p.prototype,"keywords",void 0),(0,o._)([(0,a.MZ)({type:[String],json:{write:!0}})],p.prototype,"globalIds",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],p.prototype,"num",void 0),(0,o._)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"objectIds",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{default:!1,write:!0}})],p.prototype,"returnMetadata",void 0),(0,o._)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"size",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],p.prototype,"start",void 0),(0,o._)([(0,c.K)("start"),(0,c.K)("num")],p.prototype,"writeStart",null),(0,o._)([(0,a.MZ)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],p.prototype,"where",void 0),p=n=(0,o._)([(0,u.$)("esri.rest.support.AttachmentQuery")],p),p.from=(0,l.dp)(p);const d=p},26591:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var n,o=r(90237),i=(r(59456),r(25482)),s=r(4718),a=r(10107),l=r(56507),u=r(40608),c=r(43937),p=r(27733),d=r(16930);let y=n=class extends i.oY{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new n((0,s.o8)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,o._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"cacheHint",void 0),(0,o._)([(0,a.MZ)({type:p.L,json:{write:!0}})],y.prototype,"dynamicDataSource",void 0),(0,o._)([(0,a.MZ)({type:String,json:{write:!0}})],y.prototype,"gdbVersion",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],y.prototype,"geometryPrecision",void 0),(0,o._)([(0,a.MZ)({type:Date})],y.prototype,"historicMoment",void 0),(0,o._)([(0,c.K)("historicMoment")],y.prototype,"_writeHistoricMoment",null),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],y.prototype,"maxAllowableOffset",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],y.prototype,"objectIds",void 0),(0,o._)([(0,a.MZ)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),(0,o._)([(0,a.MZ)({type:[String],json:{write:!0}})],y.prototype,"outFields",void 0),(0,o._)([(0,a.MZ)({type:d.A,json:{read:{source:"outSR"},write:{target:"outSR"}}})],y.prototype,"outSpatialReference",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],y.prototype,"relationshipId",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],y.prototype,"start",void 0),(0,o._)([(0,c.K)("start"),(0,c.K)("num")],y.prototype,"writeStart",null),(0,o._)([(0,a.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],y.prototype,"num",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],y.prototype,"returnGeometry",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnM",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnZ",void 0),(0,o._)([(0,a.MZ)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],y.prototype,"where",void 0),y=n=(0,o._)([(0,u.$)("esri.rest.support.RelationshipQuery")],y),y.from=(0,l.dp)(y);const h=y},30291:(e,t,r)=>{r.d(t,{tn:()=>u});var n=r(13874),o=r(30524),i=r(28122),s=(r(84424),r(80737),r(96808),r(66159)),a=(r(67336),r(92094),r(23721),r(70696),r(41227)),l=r(68780);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:u},y){if(!r)return null;const f=function(e,t){const r=t?.visibleFieldNames;return function({fields:e,ignoreFieldTypes:t,sortDisabled:r}){const n=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===n&&(e=e.slice()),!0!==r&&e.sort(p),e}({fields:e.fields??[],ignoreFieldTypes:t?.ignoreFieldTypes||h,sortDisabled:t?.sortDisabled}).map((t=>new a.A({fieldName:t.name,isEditable:(0,o.R$)(t,e),label:t.alias,format:d(t),visible:c(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:l},y);if(!f.length)return null;const m=function(e){const t=(0,o.mB)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),b=[new s.A,new i.A];return new n.A({title:m,content:b,fieldInfos:f})}const c=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,o.Bz)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:y(e)?-1:y(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function d(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.A({digitSeparator:!0,places:0});case"double":return new l.A({digitSeparator:!0,places:2});case"string":return(0,o.JL)(e.name)?new l.A({digitSeparator:!0,places:0}):void 0;default:return}}function y(e){if("name"===(e.name&&e.name.toLowerCase()))return!0;const t=e.alias?.toLowerCase();return"name"===t}const h=["geometry","blob","raster","guid","xml"]}}]);
|