@arcgis/core 4.25.0-next.20220921 → 4.25.0-next.20220923
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/README.md +17 -9
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/arcade.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/10892098faaf2f36fd0a.js +1 -0
- package/assets/esri/core/workers/chunks/28932ef68b6f3784c760.js +1 -0
- package/assets/esri/core/workers/chunks/2dca9023f01864f724cb.js +1 -0
- package/assets/esri/core/workers/chunks/477e02c178d392cde5d3.js +1 -0
- package/assets/esri/core/workers/chunks/{cc7569489b572b8b3b53.js → 4ef7e925f94ee85f79bb.js} +1 -1
- package/assets/esri/core/workers/chunks/b175a80296002ee9bca8.js +1 -0
- package/assets/esri/core/workers/chunks/{b8eba8c9d5424a7ae5f2.js → c06e7bd2468646631db2.js} +1 -1
- package/assets/esri/core/workers/chunks/e00327925ca82b63fded.js +1 -0
- package/assets/esri/core/workers/chunks/{64de93865088bbe0398f.js → e57a4d66f74510ce7a61.js} +1 -1
- package/assets/esri/core/workers/chunks/fb82788888990fbea11e.js +1 -0
- package/assets/esri/libs/linkchartlayout/lclayout.wasm +0 -0
- package/assets/esri/themes/base/widgets/_BasemapGallery.scss +2 -2
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/dark/main.scss +7 -5
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_ar.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_bg.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_bs.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_ca.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_cs.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_da.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_de.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_el.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_en.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_es.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_et.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_fi.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_fr.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_he.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_hr.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_hu.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_id.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_it.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_ja.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_ko.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_lt.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_lv.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_nb.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_nl.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_pl.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_pt-BR.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_pt-PT.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_ro.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_ru.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_sk.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_sl.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_sr.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_sv.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_th.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_tr.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_uk.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_vi.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_zh-CN.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_zh-HK.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_zh-TW.json +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/form/elements/inputs/ComboBoxInput.js +1 -1
- package/form/elements/inputs/RadioButtonsInput.js +1 -1
- package/interfaces.d.ts +957 -5
- package/libs/linkchartlayout/LinkChartLayout.js +1 -1
- package/networks/Network.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/networks/support/NetworkSystemLayers.js +5 -0
- package/package.json +1 -1
- package/rest/knowledgeGraph/DataModel.d.ts +4 -0
- package/rest/knowledgeGraph/Entity.d.ts +4 -0
- package/rest/knowledgeGraph/EntityType.d.ts +4 -0
- package/rest/knowledgeGraph/FieldIndex.d.ts +4 -0
- package/rest/knowledgeGraph/GraphNamedObject.d.ts +4 -0
- package/rest/knowledgeGraph/GraphObject.d.ts +4 -0
- package/rest/knowledgeGraph/GraphObjectType.d.ts +4 -0
- package/rest/knowledgeGraph/GraphProperty.d.ts +4 -0
- package/rest/knowledgeGraph/GraphQuery.d.ts +4 -0
- package/rest/knowledgeGraph/GraphQueryResult.d.ts +4 -0
- package/rest/knowledgeGraph/GraphSearch.d.ts +4 -0
- package/rest/knowledgeGraph/KnowledgeGraph.d.ts +4 -0
- package/rest/knowledgeGraph/Path.d.ts +4 -0
- package/rest/knowledgeGraph/Relationship.d.ts +4 -0
- package/rest/knowledgeGraph/RelationshipType.d.ts +4 -0
- package/rest/knowledgeGraph/wasmInterface/wasmToUpdateResponseFactories.js +1 -1
- package/rest/knowledgeGraphService.d.ts +4 -0
- package/rest/support/AggregateFeatureSet.js +1 -1
- package/support/featureFlags.js +1 -1
- package/support/revision.js +1 -1
- package/support/webSceneUtils.js +1 -1
- package/views/2d/MapViewConstraints.js +1 -1
- package/views/2d/constraints/GeometryConstraint.js +1 -1
- package/views/2d/constraints/RotationConstraint.js +1 -1
- package/views/2d/constraints/ZoomConstraint.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
- package/views/2d/layers/features/schemaUtils.js +1 -1
- package/views/2d/layers/features/sources/DataTileSource.js +1 -1
- package/views/2d/layers/features/support/ClusterStore.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
- package/views/3d/layers/MapImageLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerFeatureView3D.js +5 -0
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/interactive/tooltip/ReshapeTooltipInfos.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentReshapeEdgeOffset.js +1 -1
- package/views/layers/MapImageLayerView.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
- package/widgets/Feature/FeatureRelationship.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/FormExpressionArcadeExecutor.js +5 -0
- package/widgets/FeatureForm/FormExpressionsManager.js +5 -0
- package/widgets/FeatureForm/InputField.js +1 -1
- package/widgets/FeatureForm/InputFieldGroup.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/01ac91fc0bc6b4d4e3c6.js +0 -1
- package/assets/esri/core/workers/chunks/43e4560d65e5ddeeef6f.js +0 -1
- package/assets/esri/core/workers/chunks/58824250492b89ec24ea.js +0 -1
- package/assets/esri/core/workers/chunks/64a6b837f1d5d7ad7619.js +0 -1
- package/assets/esri/core/workers/chunks/d1be3ab7846e3a555b6c.js +0 -1
- package/assets/esri/core/workers/chunks/e20e99f8f76f5002437e.js +0 -1
- package/assets/esri/core/workers/chunks/ef95d6ab7b1c032ab4ad.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3121],{79235:(e,t,r)=>{r.d(t,{Z:()=>w});var i,s=r(43697),o=r(67676),n=r(35454),a=r(96674),l=r(67900),p=r(20941),u=r(5600),d=(r(80442),r(75215),r(71715)),c=r(52011),y=r(30556);const h=(0,n.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=h.jsonValues.slice();(0,o.e$)(m,"orthometric");const b=(0,n.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=i=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return h.write(e,t,r)}readHeightModel(e,t,r){return h.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new p.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return b.read(e)||(r&&r.messages&&r.messages.push(g(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.$C)(e)||b.read(e)||(r&&r.messages&&r.messages.push(g(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function g(e,t){return new p.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,u.Cb)({type:h.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0),(0,s._)([(0,y.c)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,s._)([(0,d.r)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,s._)([(0,u.Cb)({type:b.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:b.jsonValues,write:b.write}}}})],f.prototype,"heightUnit",void 0),(0,s._)([(0,d.r)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,s._)([(0,d.r)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,s._)([(0,u.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,s._)([(0,d.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=i=(0,s._)([(0,c.j)("esri.geometry.HeightModelInfo")],f);const w=f},3121:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ir});var i,s=r(43697),o=r(51773),n=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382)),a=r(81571),l=r(91423),p=r(32400),u=r(3172),d=r(9790),c=r(2368),y=r(46791),h=r(20102),m=r(61247),b=r(80442),f=r(35454),g=r(22974),w=r(92604),v=r(70586),_=r(16453),C=r(78286),S=r(95330),I=r(42033),F=r(17452),x=r(5600),j=r(90578),E=r(71715),T=r(52011),O=r(30556),R=r(63213),M=r(96674),q=(r(67676),r(75215));let D=i=class extends M.wq{constructor(e){super(e),this.expression=null,this.name=null,this.returnType="boolean",this.title=null}clone(){return new i({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],D.prototype,"expression",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],D.prototype,"name",void 0),(0,s._)([(0,x.Cb)({type:["boolean","date","number","string"],json:{write:!0}})],D.prototype,"returnType",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],D.prototype,"title",void 0),D=i=(0,s._)([(0,T.j)("esri.form.ExpressionInfo")],D);const A=D;let L=class extends M.wq{constructor(e){super(e),this.description=null,this.label=null,this.type=null,this.visibilityExpression=null}};(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],L.prototype,"description",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],L.prototype,"label",void 0),(0,s._)([(0,x.Cb)()],L.prototype,"type",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],L.prototype,"visibilityExpression",void 0),L=(0,s._)([(0,T.j)("esri.form.elements.Element")],L);const Z=L;var P;let G=P=class extends M.wq{constructor(e){super(e),this.type=null}clone(){return new P({type:this.type})}};(0,s._)([(0,x.Cb)({type:["attachment","audio","document","image","signature","video"],json:{write:!0}})],G.prototype,"type",void 0),G=P=(0,s._)([(0,T.j)("esri.form.elements.inputs.AttachmentInput")],G);const Q=G;var N;let V=N=class extends Z{constructor(e){super(e),this.attachmentKeyword=null,this.editable=!0,this.input=null,this.type="attachment"}clone(){return new N({attachmentKeyword:this.attachmentKeyword,description:this.description,editable:this.editable,input:this.input,label:this.label,visibilityExpression:this.visibilityExpression})}};(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],V.prototype,"attachmentKeyword",void 0),(0,s._)([(0,x.Cb)({type:Boolean,json:{write:!0}})],V.prototype,"editable",void 0),(0,s._)([(0,x.Cb)({type:Q,json:{read:{source:"inputType"},write:{target:"inputType"}}})],V.prototype,"input",void 0),(0,s._)([(0,x.Cb)({type:["attachment"],json:{read:!1,write:!0}})],V.prototype,"type",void 0),V=N=(0,s._)([(0,T.j)("esri.form.elements.AttachmentElement")],V);const k=V;let B=class extends M.wq{constructor(e){super(e),this.type=null}};(0,s._)([(0,x.Cb)()],B.prototype,"type",void 0),B=(0,s._)([(0,T.j)("esri.form.elements.inputs.Input")],B);const U=B;let J=class extends U{constructor(e){super(e),this.maxLength=null,this.minLength=0}};(0,s._)([(0,x.Cb)({type:Number,json:{write:!0}})],J.prototype,"maxLength",void 0),(0,s._)([(0,x.Cb)({type:Number,json:{write:!0}})],J.prototype,"minLength",void 0),J=(0,s._)([(0,T.j)("esri.form.elements.inputs.TextInput")],J);const z=J;var W;let H=W=class extends z{constructor(e){super(e),this.type="barcode-scanner"}clone(){return new W({maxLength:this.maxLength,minLength:this.minLength})}};(0,s._)([(0,x.Cb)({type:["barcode-scanner"],json:{read:!1,write:!0}})],H.prototype,"type",void 0),H=W=(0,s._)([(0,T.j)("esri.form.elements.inputs.BarcodeScannerInput")],H);const $=H;var K;let X=K=class extends U{constructor(e){super(e),this.noValueOptionLabel=null,this.showNoValueOption=!1,this.type="combo-box"}clone(){return new K({showNoValueOption:this.showNoValueOption,noValueOptionLabel:this.noValueOptionLabel})}};(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],X.prototype,"noValueOptionLabel",void 0),(0,s._)([(0,x.Cb)({type:Boolean,json:{write:!0}})],X.prototype,"showNoValueOption",void 0),(0,s._)([(0,x.Cb)({type:["combo-box"],json:{read:!1,write:!0}})],X.prototype,"type",void 0),X=K=(0,s._)([(0,T.j)("esri.form.elements.inputs.ComboBoxInput")],X);const Y=X;var ee;function te(e){return null!=e?new Date(e):null}function re(e){return e?e.getTime():null}let ie=ee=class extends U{constructor(e){super(e),this.includeTime=!1,this.max=null,this.min=null,this.type="datetime-picker"}readMax(e,t){return te(t.max)}writeMax(e,t){t.max=re(e)}readMin(e,t){return te(t.min)}writeMin(e,t){t.min=re(e)}clone(){return new ee({includeTime:this.includeTime,max:this.max,min:this.min,type:this.type})}};(0,s._)([(0,x.Cb)({type:Boolean,json:{write:!0}})],ie.prototype,"includeTime",void 0),(0,s._)([(0,x.Cb)({type:Date,json:{type:Number,write:!0}})],ie.prototype,"max",void 0),(0,s._)([(0,E.r)("max")],ie.prototype,"readMax",null),(0,s._)([(0,O.c)("max")],ie.prototype,"writeMax",null),(0,s._)([(0,x.Cb)({type:Date,json:{type:Number,write:!0}})],ie.prototype,"min",void 0),(0,s._)([(0,E.r)("min")],ie.prototype,"readMin",null),(0,s._)([(0,O.c)("min")],ie.prototype,"writeMin",null),(0,s._)([(0,x.Cb)({type:["datetime-picker"],json:{read:!1,write:!0}})],ie.prototype,"type",void 0),ie=ee=(0,s._)([(0,T.j)("esri.form.elements.inputs.DateTimePickerInput")],ie);const se=ie;var oe;let ne=oe=class extends U{constructor(e){super(e),this.noValueOptionLabel=null,this.showNoValueOption=!1,this.type="radio-buttons"}clone(){return new oe({noValueOptionLabel:this.noValueOptionLabel,showNoValueOption:this.showNoValueOption})}};(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],ne.prototype,"noValueOptionLabel",void 0),(0,s._)([(0,x.Cb)({type:Boolean,json:{write:!0}})],ne.prototype,"showNoValueOption",void 0),(0,s._)([(0,x.Cb)({type:["radio-buttons"],json:{read:!1,write:!0}})],ne.prototype,"type",void 0),ne=oe=(0,s._)([(0,T.j)("esri.form.elements.inputs.RadioButtonsInput")],ne);const ae=ne;var le;let pe=le=class extends U{constructor(e){super(e),this.offValue=null,this.onValue=null,this.type="switch"}clone(){return new le({offValue:this.offValue,onValue:this.onValue})}};(0,s._)([(0,x.Cb)({type:[String,Number],json:{write:!0}})],pe.prototype,"offValue",void 0),(0,s._)([(0,x.Cb)({type:[String,Number],json:{write:!0}})],pe.prototype,"onValue",void 0),(0,s._)([(0,x.Cb)({type:["switch"],json:{read:!1,write:!0}})],pe.prototype,"type",void 0),pe=le=(0,s._)([(0,T.j)("esri.form.elements.inputs.SwitchInput")],pe);const ue=pe;var de;let ce=de=class extends z{constructor(e){super(e),this.type="text-area"}clone(){return new de({maxLength:this.maxLength,minLength:this.minLength})}};(0,s._)([(0,x.Cb)({type:["text-area"],json:{read:!1,write:!0}})],ce.prototype,"type",void 0),ce=de=(0,s._)([(0,T.j)("esri.form.elements.inputs.TextAreaInput")],ce);const ye=ce;var he;let me=he=class extends z{constructor(e){super(e),this.type="text-box"}clone(){return new he({maxLength:this.maxLength,minLength:this.minLength})}};(0,s._)([(0,x.Cb)({type:["text-box"],json:{read:!1,write:!0}})],me.prototype,"type",void 0),me=he=(0,s._)([(0,T.j)("esri.form.elements.inputs.TextBoxInput")],me);const be={base:U,key:"type",typeMap:{"barcode-scanner":$,"combo-box":Y,"datetime-picker":se,"radio-buttons":ae,switch:ue,"text-area":ye,"text-box":me}};var fe,ge=r(72729);let we=fe=class extends Z{constructor(e){super(e),this.domain=null,this.editable=!0,this.editableExpression=null,this.fieldName=null,this.hint=null,this.input=null,this.requiredExpression=null,this.type="field",this.valueExpression=null}clone(){return new fe({description:this.description,domain:this.domain,editable:this.editable,editableExpression:this.editableExpression,fieldName:this.fieldName,hint:this.hint,input:this.input,label:this.label,requiredExpression:this.requiredExpression,valueExpression:this.valueExpression,visibilityExpression:this.visibilityExpression})}};(0,s._)([(0,x.Cb)({types:ge.V5,json:{read:{reader:ge.im},write:!0}})],we.prototype,"domain",void 0),(0,s._)([(0,x.Cb)({type:Boolean,json:{write:!0}})],we.prototype,"editable",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],we.prototype,"editableExpression",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],we.prototype,"fieldName",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],we.prototype,"hint",void 0),(0,s._)([(0,x.Cb)({types:be,json:{read:{source:"inputType"},write:{target:"inputType"}}})],we.prototype,"input",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],we.prototype,"requiredExpression",void 0),(0,s._)([(0,x.Cb)({type:String,json:{read:!1,write:!0}})],we.prototype,"type",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],we.prototype,"valueExpression",void 0),we=fe=(0,s._)([(0,T.j)("esri.form.elements.FieldElement")],we);const ve=we;var _e,Ce=r(44729);let Se=_e=class extends Z{constructor(e){super(e),this.displayCount=null,this.displayType="list",this.editable=!0,this.orderByFields=null,this.relationshipId=null,this.type="relationship"}clone(){return new _e({description:this.description,displayCount:this.displayCount,displayType:this.displayType,editable:this.editable,label:this.label,orderByFields:(0,g.d9)(this.orderByFields),relationshipId:this.relationshipId,visibilityExpression:this.visibilityExpression})}};(0,s._)([(0,x.Cb)({type:Number,json:{write:!0}})],Se.prototype,"displayCount",void 0),(0,s._)([(0,x.Cb)({type:["list"],json:{write:!0}})],Se.prototype,"displayType",void 0),(0,s._)([(0,x.Cb)({type:Boolean,json:{write:!0}})],Se.prototype,"editable",void 0),(0,s._)([(0,x.Cb)({type:[Ce.Z],json:{write:!0}})],Se.prototype,"orderByFields",void 0),(0,s._)([(0,x.Cb)({type:Number,json:{write:!0}})],Se.prototype,"relationshipId",void 0),(0,s._)([(0,x.Cb)({type:["relationship"],json:{read:!1,write:!0}})],Se.prototype,"type",void 0),Se=_e=(0,s._)([(0,T.j)("esri.form.elements.RelationshipElement")],Se);const Ie=Se;function Fe(e){return{typesWithGroup:{base:Z,key:"type",typeMap:{attachment:k,field:ve,group:e,relationship:Ie}},typesWithoutGroup:{base:Z,key:"type",typeMap:{attachment:k,field:ve,relationship:Ie}}}}function xe(e,t,r=!0){if(!e)return null;const i=r?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter((e=>i[e.type])).map((e=>i[e.type].fromJSON(e)))}function je(e,t,r=!0){if(!e)return null;const i=r?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter((e=>i[e.type])).map((e=>e.toJSON()))}function Ee(e,t,r=!0){return e?e.map((e=>(0,q.N7)(r?t.typesWithGroup:t.typesWithoutGroup,e))):null}var Te;let Oe=Te=class extends Z{constructor(e){super(e),this.elements=null,this.initialState="expanded",this.type="group"}castElements(e){return Ee(e,Re,!1)}readElements(e,t){return xe(t.formElements,Re,!1)}writeElements(e,t){t.formElements=je(e,Re,!1)}clone(){return new Te({description:this.description,elements:(0,g.d9)(this.elements),initialState:this.initialState,label:this.label,visibilityExpression:this.visibilityExpression})}};(0,s._)([(0,x.Cb)({json:{write:!0}})],Oe.prototype,"elements",void 0),(0,s._)([(0,j.p)("elements")],Oe.prototype,"castElements",null),(0,s._)([(0,E.r)("elements",["formElements"])],Oe.prototype,"readElements",null),(0,s._)([(0,O.c)("elements")],Oe.prototype,"writeElements",null),(0,s._)([(0,x.Cb)({type:["collapsed","expanded"],json:{write:!0}})],Oe.prototype,"initialState",void 0),(0,s._)([(0,x.Cb)({type:String,json:{read:!1,write:!0}})],Oe.prototype,"type",void 0),Oe=Te=(0,s._)([(0,T.j)("esri.form.elements.GroupElement")],Oe);const Re=Fe(Oe);var Me;const qe=Fe(Oe);let De=Me=class extends M.wq{constructor(e){super(e),this.description=null,this.elements=null,this.expressionInfos=null,this.title=null}castElements(e){return Ee(e,qe)}readElements(e,t){return xe(t.formElements,qe)}writeElements(e,t){t.formElements=je(e,qe)}clone(){return new Me({description:this.description,expressionInfos:(0,g.d9)(this.expressionInfos),elements:(0,g.d9)(this.elements),title:this.title})}};(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],De.prototype,"description",void 0),(0,s._)([(0,x.Cb)({json:{write:!0}})],De.prototype,"elements",void 0),(0,s._)([(0,j.p)("elements")],De.prototype,"castElements",null),(0,s._)([(0,E.r)("elements",["formElements"])],De.prototype,"readElements",null),(0,s._)([(0,O.c)("elements")],De.prototype,"writeElements",null),(0,s._)([(0,x.Cb)({type:[A],json:{write:!0}})],De.prototype,"expressionInfos",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],De.prototype,"title",void 0),De=Me=(0,s._)([(0,T.j)("esri.form.FormTemplate")],De);const Ae=De;var Le=r(6570),Ze=r(79235),Pe=r(82971),Ge=r(87085),Qe=(r(66577),r(38171)),Ne=r(3920),Ve=r(83379),ke=r(609),Be=r(78346),Ue=r(52421),Je=r(59431),ze=r(28694),We=r(74889),He=r(38913),$e=r(86973);let Ke=0;const Xe="esri.layers.graphics.sources.MemorySource",Ye=w.Z.getLogger(Xe);let et=class extends(Ve.Z.LoadableMixin((0,ke.v)((0,Ne.p)(y.Z)))){constructor(e){super(e),this._idToClientGraphic=null,this.type="memory"}load(e){const t=(0,v.pC)(e)?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){const e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?"polygon":e:null}applyEdits(e){return this.load().then((()=>this._applyEdits(e)))}openPorts(){return this.load().then((()=>this._connection.openPorts()))}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);(0,ze.p)(e,this.layer.spatialReference,r);const i=We.default.fromJSON(r);if(!this._requiresClientGraphicMapping())return i;const s=this.layer.objectIdField;for(const e of i.features){const t=e.attributes[s],r=this._idToClientGraphic.get(t);r&&(e.geometry=r.geometry)}return i.geometryType=this.layer.geometryType,i}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new h.Z("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return(0,ze.p)(e,this.layer.spatialReference,r),r}queryFeatureCount(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)))}queryObjectIds(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)))}queryExtent(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t))).then((e=>({count:e.count,extent:Le.Z.fromJSON(e.extent)})))}querySnapping(e,t={}){return this.load(t).then((()=>this._connection.invoke("querySnapping",e,t)))}async _applyEdits(e){if(!this._connection)throw new h.Z("feature-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField;let r=null;const i=[],s=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);const o=e=>"objectId"in e&&null!=e.objectId?e.objectId:"attributes"in e&&null!=e.attributes[t]?e.attributes[t]:null;if(e.addFeatures&&(r=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(const t of e.deleteFeatures){const e=o(t);null!=e&&i.push(e)}const n=e.updateFeatures&&this._idToClientGraphic?new Map:null;if(e.updateFeatures)for(const t of e.updateFeatures)if(s.push(this._serializeFeature(t)),n){const e=o(t);null!=e&&n.set(e,t)}(0,Je.P)(r?r.features:null,s,this.layer.spatialReference);const{fullExtent:a,featureEditResults:l}=await this._connection.invoke("applyEdits",{adds:r?r.features:[],updates:s,deletes:i});return this.fullExtent=a,r&&r.finish(l.uidToObjectId),this._updateClientGraphicIds(n,l),this._createEditsResult(l)}async _prepareClientMapping(e,t){if("mesh"!==this._layerOrSourceGeometryType||(0,v.Wi)(e))return;const r=[];for(const{geometry:i}of e)!(0,v.pC)(i)||"mesh"!==i.type||i.hasExtent||i.loaded||r.push(i.load({signal:t}));r.length&&await Promise.all(r)}_updateClientGraphicIds(e,t){if(this._idToClientGraphic){if(e)for(const r of t.updateResults){if(!r.success)continue;const t=e.get(r.objectId);null!=t&&this._addIdToClientGraphic(t)}for(const e of t.deleteResults)e.success&&this._idToClientGraphic.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new h.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_prepareAddFeatures(e){const t=new Map,r=new Array(e.length);let i=null;for(let s=0;s<e.length;s++){const o=e[s],n=this._serializeFeature(o);!i&&(0,v.pC)(o.geometry)&&(i=o.geometry.type),r[s]=n,t.set(`${n.uid}`,o)}const s=this;return{features:r,inferredGeometryType:i,finish(e){const r=s.sourceJSON.objectIdField;for(const i in e){const o=e[i],n=t.get(i);n&&(n.attributes||(n.attributes={}),-1===o?delete n.attributes[r]:n.attributes[r]=o,s._addIdToClientGraphic(n))}}}}_addIdToClientGraphic(e){if(!this._idToClientGraphic)return;const t=this.sourceJSON.objectIdField,r=e.attributes&&e.attributes[t];null!=r&&this._idToClientGraphic.set(r,e)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return"mesh"===e||"multipatch"===e||"extent"===e}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e),i=(Ke++).toString();return r?{uid:i,geometry:r.toJSON(),attributes:t}:{uid:i,attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return(0,v.Wi)(t)?null:this._geometryRequiresClientGraphicMapping(t)?t.extent?He.Z.fromExtent(t.extent):null:t}async _startWorker(e){this._connection=await(0,Be.bA)("MemorySourceWorker",{strategy:(0,b.Z)("feature-layers-workers")?"dedicated":"local",signal:e});const{fields:t,spatialReference:r,objectIdField:i,hasM:s,hasZ:o,timeInfo:n}=this.layer,a="defaults"===this.layer.originOf("spatialReference");await this._prepareClientMapping(this.items,e);const l=this._prepareAddFeatures(this.items);this.handles.add(this.on("before-changes",(e=>{Ye.error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),e.preventDefault()})));const p={features:l.features,fields:t&&t.map((e=>e.toJSON())),geometryType:$e.P$.toJSON(this._workerGeometryType),hasM:"mesh"!==this._layerOrSourceGeometryType&&s,hasZ:"mesh"===this._layerOrSourceGeometryType||o,objectIdField:i,spatialReference:a?null:r&&r.toJSON(),timeInfo:n?n.toJSON():null},u=await this._connection.invoke("load",p,{signal:e});for(const e of u.warnings)Ye.warn(e.message,{layer:this.layer,warning:e});u.featureErrors.length&&Ye.warn(`Encountered ${u.featureErrors.length} validation errors while loading features`,u.featureErrors);const d=u.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(l.inferredGeometryType)&&(d.geometryType=$e.P$.toJSON(l.inferredGeometryType)),this.sourceJSON=d,this._requiresClientGraphicMapping()&&(this._idToClientGraphic=new Map),l.finish(u.assignedObjectIds)}};(0,s._)([(0,Ue.c)({Type:Qe.Z,ensureType:(0,q.se)(Qe.Z)})],et.prototype,"itemType",void 0),(0,s._)([(0,x.Cb)()],et.prototype,"type",void 0),(0,s._)([(0,x.Cb)({constructOnly:!0})],et.prototype,"layer",void 0),(0,s._)([(0,x.Cb)({readOnly:!0})],et.prototype,"_workerGeometryType",null),(0,s._)([(0,x.Cb)()],et.prototype,"sourceJSON",void 0),et=(0,s._)([(0,T.j)(Xe)],et);var tt,rt=r(54295),it=r(17287),st=r(71612),ot=r(17017),nt=r(66361),at=r(69637),lt=r(38009),pt=r(68825),ut=r(16859),dt=r(34760),ct=r(72965),yt=r(28294),ht=r(66677),mt=r(21506);let bt=tt=class extends M.wq{constructor(e){super(e)}clone(){const{name:e,fields:t,isAscending:r,isUnique:i,description:s}=this;return new tt({name:e,fields:t,isAscending:r,isUnique:i,description:s})}};(0,s._)([(0,x.Cb)({constructOnly:!0})],bt.prototype,"name",void 0),(0,s._)([(0,x.Cb)({constructOnly:!0})],bt.prototype,"fields",void 0),(0,s._)([(0,x.Cb)({constructOnly:!0})],bt.prototype,"isAscending",void 0),(0,s._)([(0,x.Cb)({constructOnly:!0})],bt.prototype,"isUnique",void 0),(0,s._)([(0,x.Cb)({constructOnly:!0})],bt.prototype,"description",void 0),bt=tt=(0,s._)([(0,T.j)("esri.layers.support.FeatureIndex")],bt);var ft=r(2075),gt=r(70082),wt=r(16451),vt=r(53518),_t=r(35671),Ct=r(67900);let St=class extends((0,c.J)(M.wq)){constructor(e){super(e),this.shapeAreaField=null,this.shapeLengthField=null,this.units=null}};(0,s._)([(0,x.Cb)({type:String,json:{read:{source:"shapeAreaFieldName"}}})],St.prototype,"shapeAreaField",void 0),(0,s._)([(0,x.Cb)({type:String,json:{read:{source:"shapeLengthFieldName"}}})],St.prototype,"shapeLengthField",void 0),(0,s._)([(0,x.Cb)({type:String,json:{read:e=>Ct.gV.read(e)||Ct.Jo.read(e)}})],St.prototype,"units",void 0),St=(0,s._)([(0,T.j)("esri.layers.support.GeometryFieldsInfo")],St);const It=St;var Ft=r(2319),xt=r(30707),jt=r(56765);const Et=new f.X({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),Tt=new f.X({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let Ot=class extends((0,c.J)(M.wq)){constructor(e){super(e),this.cardinality=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,s._)([(0,x.Cb)({json:{read:Et.read,write:Et.write}})],Ot.prototype,"cardinality",void 0),(0,s._)([(0,x.Cb)({json:{read:!0,write:!0}})],Ot.prototype,"composite",void 0),(0,s._)([(0,x.Cb)({json:{read:!0,write:!0}})],Ot.prototype,"id",void 0),(0,s._)([(0,x.Cb)({json:{read:!0,write:!0}})],Ot.prototype,"keyField",void 0),(0,s._)([(0,x.Cb)({json:{read:!0,write:!0}})],Ot.prototype,"keyFieldInRelationshipTable",void 0),(0,s._)([(0,x.Cb)({json:{read:!0,write:!0}})],Ot.prototype,"name",void 0),(0,s._)([(0,x.Cb)({json:{read:!0,write:!0}})],Ot.prototype,"relatedTableId",void 0),(0,s._)([(0,x.Cb)({json:{read:!0,write:!0}})],Ot.prototype,"relationshipTableId",void 0),(0,s._)([(0,x.Cb)({json:{read:Tt.read,write:Tt.write}})],Ot.prototype,"role",void 0),Ot=(0,s._)([(0,T.j)("esri.layers.support.Relationship")],Ot);const Rt=Ot;var Mt=r(30547),qt=r(60199),Dt=r(10158),At=r(40555),Lt=r(56545),Zt=r(57444),Pt=r(75935),Gt=r(28141),Qt=r(32163),Nt=r(65242);const Vt=new f.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"}),kt={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"},Bt="FeatureLayer",Ut="esri.layers.FeatureLayer",Jt=w.Z.getLogger(Ut);function zt(e,t){return new h.Z("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function Wt(e){return e&&e instanceof y.Z}function Ht(e,t,r){return!!(e&&e.hasOwnProperty(t)?e[t]:r)}function $t(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}function Kt(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function Xt(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}const Yt=(0,vt.v)();function er(e,t,r){const i=!!r?.writeLayerSchema;return{enabled:i,ignoreOrigin:i}}let tr=class extends((0,at.b)((0,nt.o1)((0,st.h)((0,pt.c)((0,yt.n)((0,ct.M)((0,dt.Q)((0,it.Y)((0,lt.q)((0,ut.I)((0,_.R)((0,ot.N)((0,rt.V)((0,c.J)(Ge.Z))))))))))))))){constructor(...e){super(...e),this._handles=new m.Z,this.capabilities=null,this.charts=null,this.copyright=null,this.datesInUnknownTimezone=!1,this.displayField=null,this.definitionExpression=null,this.dynamicDataSource=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.featureReduction=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.formTemplate=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.layerId=void 0,this.legendEnabled=!0,this.minScale=0,this.maxScale=0,this.globalIdField=null,this.objectIdField=null,this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.returnM=void 0,this.returnZ=void 0,this.screenSizePerspectiveEnabled=!0,this.serviceDefinitionExpression=null,this.spatialReference=Pe.Z.WGS84,this.subtypeCode=null,this.subtypeField=null,this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.trackIdField=null,this.type="feature",this.typeIdField=null,this.types=null,this.indexes=new(y.Z.ofType(bt)),this.userIsAdmin=!1,this.version=void 0,this.visible=!0}destroy(){this.source?.destroy(),this._handles=(0,v.SC)(this._handles)}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,v.pC)(e)?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then((e=>this._initLayerProperties(e)))),Promise.resolve(this);const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection"]},e).catch(S.r9).then((async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new h.Z("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this._initLayerProperties(await this.createGraphicsSource(t))})).then((()=>this.finishLoadEditablePortalLayer(e)));return this.addResolvingPromise(r),Promise.resolve(this)}readCapabilities(e,t){return t=t.layerDefinition||t,{analytics:this._readAnalyticsCapabilities(t),attachment:this._readAttachmentCapabilities(t),data:this._readDataCapabilities(t),metadata:this._readMetadataCapabilities(t),operations:this._readOperationsCapabilities(t.capabilities||e,t),query:this._readQueryCapabilities(t),queryRelated:this._readQueryRelatedCapabilities(t),queryTopFeatures:this._readQueryTopFeaturesCapabilities(t),editing:this._readEditingCapabilities(t)}}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,r){return this._readEditingEnabled(t,!0,r)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,r,i){this._writeEditingEnabled(e,t,!0,i)}readEditingInfo(e,t){const{editingInfo:r}=t;return r?{lastEditDate:null!=r.lastEditDate?new Date(r.lastEditDate):null}:null}readIsTable(e,t){return"Table"===(t=t?.layerDefinition??t).type||!t.geometryType}writeIsTable(e,t,r,i){i?.writeLayerSchema&&(0,C.RB)(r,e?"Table":"Feature Layer",t)}readMinScale(e,t){return t.effectiveMinScale||e||0}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeOID"===e.type)return e.name}get parsedUrl(){const e=this.url?(0,F.mN)(this.url):null;return null!=e&&(null!=this.dynamicDataSource?e.path=(0,F.v_)(e.path,"dynamicLayer"):null!=this.layerId&&(e.path=(0,F.v_)(e.path,this.layerId.toString()))),e}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,_t.YN)(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){const i=(t=t.layerDefinition||t).drawingInfo?.renderer;if(i){const e=(0,l.a)(i,t,r)??void 0;return e||Jt.error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}if(t.defaultSymbol)return t.types&&t.types.length?new a.Z({defaultSymbol:rr(t.defaultSymbol,t,r),field:t.typeIdField,uniqueValueInfos:t.types.map((e=>({id:e.id,symbol:rr(e.symbol,e,r)})))}):new n.Z({symbol:rr(t.defaultSymbol,t,r)})}set source(e){const t=this._get("source");t!==e&&(Wt(t)&&this._resetMemorySource(t),Wt(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof y.Z?new et({layer:this,items:e}):e:null}readSource(e,t){const r=We.default.fromJSON(t.featureSet);return new et({layer:this,items:r?.features??[]})}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}readTemplates(e,t){const r=t.editFieldsInfo,i=r&&r.creatorField,s=r&&r.editorField;return e=e&&e.map((e=>gt.Z.fromJSON(e))),this._fixTemplates(e,i),this._fixTemplates(e,s),e}readTitle(e,t){const r=t.layerDefinition?.name??t.name,i=t.title||t.layerDefinition&&t.layerDefinition.title;if(r){const e=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return this.url?(0,ht.a7)(this.url,r):r;let t=r;if(!t&&this.url){const e=(0,ht.Qc)(this.url);(0,v.pC)(e)&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),(0,ht.ld)(t)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,t){return t.title||t.layerDefinition&&t.layerDefinition.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}readTypes(e,t){e=(t=t.layerDefinition||t).types;const r=t.editFieldsInfo,i=r&&r.creatorField,s=r&&r.editorField;return e&&e.map((e=>(e=wt.Z.fromJSON(e),this._fixTemplates(e.templates,i),this._fixTemplates(e.templates,s),e)))}set url(e){const t=(0,ht.XG)({layer:this,url:e,nonStandardUrlAllowed:!0,logger:Jt});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){(0,ht.wH)(this,e,null,t,i)}readVersion(e,t){return t.currentVersion?t.currentVersion:t.hasOwnProperty("capabilities")||t.hasOwnProperty("drawingInfo")||t.hasOwnProperty("hasAttachments")||t.hasOwnProperty("htmlPopupType")||t.hasOwnProperty("relationships")||t.hasOwnProperty("timeInfo")||t.hasOwnProperty("typeIdField")||t.hasOwnProperty("types")?10:9.3}readVisible(e,t){return t.layerDefinition&&null!=t.layerDefinition.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}async addAttachment(e,t){const{source:r}=await this.load();if(await this._checkAttachmentSupport(e),!r.addAttachment)throw new h.Z(Bt,"Layer source does not support addAttachment capability");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{source:i}=await this.load();if(await this._checkAttachmentSupport(e),!i.updateAttachment)throw new h.Z(Bt,"Layer source does not support updateAttachment capability");return i.updateAttachment(e,t,r)}async applyEdits(e,t){const i=await r.e(7035).then(r.bind(r,87269)),s=await this.load();return i.applyEdits(s,s.source,e,t)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,Qt.eZ)(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:t}=await(0,S.Hl)(Promise.all([r.e(4599),r.e(8899)]).then(r.bind(r,38899)),e);return new t({layer:this}).load({signal:e})}createQuery(){const e=new Zt.Z,t=this.get("capabilities.data"),r=this.get("capabilities.query");e.dynamicDataSource=this.dynamicDataSource,e.historicMoment=this.historicMoment,e.gdbVersion=this.gdbVersion,e.returnGeometry=!0,r&&(e.compactGeometryEnabled=r.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=r.supportsDefaultSpatialReference),t&&(t.supportsZ&&null!=this.returnZ&&(e.returnZ=this.returnZ),t.supportsM&&null!=this.returnM&&(e.returnM=this.returnM)),e.outFields=["*"];const i=(0,v.pC)(this.subtypeCode)?`${this.subtypeField} = ${this.subtypeCode}`:null,s=(0,I._)(this.definitionExpression,i);e.where=s||"1=1";const{timeOffset:o,timeExtent:n}=this;return e.timeExtent=null!=o&&null!=n?n.offset(-o.value,o.unit):n||null,e.multipatchOption="multipatch"===this.geometryType?"xyFootprint":null,e}async deleteAttachments(e,t){const{source:r}=await this.load();if(await this._checkAttachmentSupport(e),!r.deleteAttachments)throw new h.Z(Bt,"Layer source does not support deleteAttachments capability");return r.deleteAttachments(e,t)}async fetchRecomputedExtents(e){const{source:t}=await this.load({signal:e?.signal});if(!t.fetchRecomputedExtents)throw new h.Z(Bt,"Layer source does not support fetchUpdates capability");return t.fetchRecomputedExtents(e)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(null==i)return null;let s=null;return r?.some((e=>{const{id:t}=e;return null!=t&&(t.toString()===i.toString()&&(s=e),!!s)})),s}getFieldDomain(e,t){const r=t&&t.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}async queryAttachments(e,t){e=Lt.Z.from(e);const{source:r,capabilities:i}=await this.load();if(!i?.data?.supportsAttachment)throw new h.Z(Bt,"this layer doesn't support attachments");const{attachmentTypes:s,objectIds:o,globalIds:n,num:a,size:l,start:p,where:u}=e;if(!i?.operations?.supportsQueryAttachments){const t=o&&o.length>1,r=s&&s.length,i=n&&n.length,d=l&&l.length;if(t||r||i||d||a||p||u)throw new h.Z(Bt,"when 'supportsQueryAttachments' is false, only objectIds of length 1 are supported",e)}if(!o?.length&&!u)throw new h.Z(Bt,"'objectIds' or 'where' are required to perform attachment query",e);if(!r.queryAttachments)throw new h.Z(Bt,"Layer source does not support queryAttachments capability",e);return r.queryAttachments(e)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(Zt.Z.from(e)??r.createQuery(),t);if(i?.features)for(const e of i.features)e.layer=e.sourceLayer=r;return i}async queryObjectIds(e,t){const{source:r}=await this.load();if(!r.queryObjectIds)throw new h.Z(Bt,"Layer source does not support queryObjectIds capability");return r.queryObjectIds(Zt.Z.from(e)??this.createQuery(),t)}async queryFeatureCount(e,t){const{source:r}=await this.load();if(!r.queryFeatureCount)throw new h.Z(Bt,"Layer source does not support queryFeatureCount capability");return r.queryFeatureCount(Zt.Z.from(e)??this.createQuery(),t)}async queryExtent(e,t){const{source:r}=await this.load();if(!r.queryExtent)throw new h.Z(Bt,"Layer source does not support queryExtent capability");return r.queryExtent(Zt.Z.from(e)??this.createQuery(),t)}async queryRelatedFeatures(e,t){const{source:r}=await this.load();if(!r.queryRelatedFeatures)throw new h.Z(Bt,"Layer source does not support queryRelatedFeatures capability");return r.queryRelatedFeatures(Pt.Z.from(e),t)}async queryRelatedFeaturesCount(e,t){const{source:r}=await this.load();if(!r.queryRelatedFeaturesCount)throw new h.Z(Bt,"Layer source does not support queryRelatedFeaturesCount capability");return r.queryRelatedFeaturesCount(Pt.Z.from(e),t)}async queryTopFeatures(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopFeatures||!i?.query?.supportsTopFeaturesQuery)throw new h.Z(Bt,"Layer source does not support queryTopFeatures capability");const s=await r.queryTopFeatures(Gt.Z.from(e),t);if(s?.features)for(const e of s.features)e.layer=e.sourceLayer=this;return s}async queryTopObjectIds(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopObjectIds||!i?.query.supportsTopFeaturesQuery)throw new h.Z(Bt,"Layer source does not support queryTopObjectIds capability");return r.queryTopObjectIds(Gt.Z.from(e),t)}async queryTopFeaturesExtent(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopExtents||!i?.query?.supportsTopFeaturesQuery)throw new h.Z(Bt,"Layer source does not support queryTopExtents capability");return r.queryTopExtents(Gt.Z.from(e),t)}async queryTopFeatureCount(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopCount||!i?.query?.supportsTopFeaturesQuery)throw new h.Z(Bt,"Layer source does not support queryFeatureCount capability");return r.queryTopCount(Gt.Z.from(e),t)}read(e,t){const r=e.featureCollection;if(r){const e=r.layers;e&&1===e.length&&(super.read(e[0],t),null!=r.showLegend&&super.read({showLegend:r.showLegend},t))}super.read(e,t),t&&"service"===t.origin&&this.revert(["objectIdField","fields","timeInfo","spatialReference"],"service")}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};const{origin:r,layerContainerType:i,messages:s}=t;if(this.dynamicDataSource)return s?.push(zt(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==i)return s?.push(zt(this,"using a table source cannot be written to web scenes and web maps")),null;if(this._hasMemorySource())return s?.push(zt(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===i)return s?.push(zt(this,"using a non-table source cannot be written to tables in web maps")),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new h.Z(Bt,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||(0,qt.D)(this,e))}async save(e){return(await Promise.all([r.e(4547),r.e(2664)]).then(r.bind(r,32664))).save(this,e)}async saveAs(e,t){return(await Promise.all([r.e(4547),r.e(2664)]).then(r.bind(r,32664))).saveAs(this,e,t)}_readEditingEnabled(e,t,r){let i=e.layerDefinition?.capabilities;return i?this._hasEditingCapability(i):(i=e.capabilities,t&&"web-map"===r?.origin&&!this._hasMemorySource()&&i?this._hasEditingCapability(i):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map((e=>e.trim())).includes("editing")}_writeEditingEnabled(e,t,r,i){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";(0,C.RB)("layerDefinition.capabilities",e,t),r&&!i?.writeLayerSchema&&(t.capabilities=e)}}_checkAttachmentSupport(e){const{attributes:t}=e,{objectIdField:r}=this;return this.get("capabilities.data.supportsAttachment")?e?t?r&&t[r]?Promise.resolve():Promise.reject(new h.Z(Bt,`feature is missing the identifying attribute ${r}`)):Promise.reject(new h.Z(Bt,"'attributes' are required on a feature to query attachments")):Promise.reject(new h.Z(Bt,"A feature is required to add/delete/update attachments")):Promise.reject(new h.Z(Bt,"this layer doesn't support attachments"))}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}_fetchFirstLayerId(e){return(0,u.default)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then((e=>{const t=e.data;if(t)return Array.isArray(t.layers)&&t.layers.length>0?t.layers[0].id:Array.isArray(t.tables)&&t.tables.length>0?t.tables[0].id:void 0}))}async _initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",url:this.parsedUrl})),this._verifySource(),this._verifyFields(),(0,_t.YN)(this.renderer,this.fieldsIndex),(0,_t.UF)(this.timeInfo,this.fieldsIndex),(0,At.y)(this,{origin:"service"})}async hasDataChanged(){if(this.source?.refresh)try{const{dataChanged:e,updates:t}=await(this.source?.refresh());if((0,v.pC)(t)&&(this.sourceJSON={...this.sourceJSON,...t},this.read(t,{origin:"service",url:this.parsedUrl})),e)return!0}catch{}if(this.definitionExpression)try{return(await(0,I.E)(this.definitionExpression,this.fieldsIndex)).hasDateFunctions}catch{}return!1}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach((e=>{const r=e.prototype&&e.prototype.attributes;r&&t&&delete r[t]}))}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new h.Z("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new h.Z("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach((e=>{e.layer=this,e.sourceLayer=this})),this._handles.add([e.on("after-add",(e=>{e.item.layer=this,e.item.sourceLayer=this})),e.on("after-remove",(e=>{e.item.layer=null,e.item.sourceLayer=null}))],"fl-source")}_resetMemorySource(e){e.forEach((e=>{e.layer=null,e.sourceLayer=null})),this._handles.remove("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}_readAnalyticsCapabilities(e){return{supportsCacheHint:Xt(e.advancedQueryCapabilities,"queryAnalytics")}}_readAttachmentCapabilities(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:Xt(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:Ht(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=kt[e.name];t&&(r[t]=!!e.isEnabled)})),r}_readDataCapabilities(e){return{isVersioned:Ht(e,"isDataVersioned",!1),supportsAttachment:Ht(e,"hasAttachments",!1),supportsM:Ht(e,"hasM",!1),supportsZ:Ht(e,"hasZ",!1)}}_readMetadataCapabilities(e){return{supportsAdvancedFieldProperties:Ht(e,"supportsFieldDescriptionProperty",!1)}}_readOperationsCapabilities(e,t){const r=e?e.toLowerCase().split(",").map((e=>e.trim())):[],i=this.url?(0,ht.Qc)(this.url):null,s=r.includes((0,v.pC)(i)&&"MapServer"===i.serverType?"data":"query"),o=r.includes("editing")&&!t.datesInUnknownTimezone;let n=o&&r.includes("create"),a=o&&r.includes("delete"),l=o&&r.includes("update");const p=r.includes("changetracking"),u=t.advancedQueryCapabilities;return o&&!(n||a||l)&&(n=a=l=!0),{supportsCalculate:Ht(t,"supportsCalculate",!1),supportsTruncate:Ht(t,"supportsTruncate",!1),supportsValidateSql:Ht(t,"supportsValidateSql",!1),supportsAdd:n,supportsDelete:a,supportsEditing:o,supportsChangeTracking:p,supportsQuery:s,supportsQueryAnalytics:Ht(u,"supportsQueryAnalytic",!1),supportsQueryAttachments:Ht(u,"supportsQueryAttachments",!1),supportsQueryTopFeatures:Ht(u,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:Ht(t,"supportsAttachmentsResizing",!1),supportsSync:r.includes("sync"),supportsUpdate:l,supportsExceedsLimitStatistics:Ht(t,"supportsExceedsLimitStatistics",!1)}}_readQueryCapabilities(e){const t=e.advancedQueryCapabilities,r=e.ownershipBasedAccessControlForFeatures,i=e.archivingInfo,s=this.url?.includes("MapServer"),o=!(0,b.Z)("mapserver-pbf-enabled")&&s&&(this.version??0)<10.81,n=(0,ht.M8)(this.url),a=(e.supportedQueryFormats||"").split(",").reduce(((e,t)=>{const r=t.toLowerCase().trim();return r&&e.add(r),e}),new Set);return{supportsStatistics:Ht(t,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:Ht(t,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:Ht(t,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:Kt(t),supportsCentroid:Ht(t,"supportsReturningGeometryCentroid",!1),supportsDistance:Ht(t,"supportsQueryWithDistance",!1),supportsDistinct:Ht(t,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:Ht(t,"supportsReturningQueryExtent",!1),supportsGeometryProperties:Ht(t,"supportsReturningGeometryProperties",!1),supportsHavingClause:Ht(t,"supportsHavingClause",!1),supportsOrderBy:Ht(t,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:Ht(t,"supportsPagination",!1),supportsQuantization:Ht(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:Ht(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:Ht(e,"supportsReturningQueryGeometry",!1),supportsResultType:Ht(t,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:Ht(t,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:Ht(t,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:Ht(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:Ht(t,"supportsTopFeaturesQuery",!1),supportsQueryByOthers:Ht(r,"allowOthersToQuery",!0),supportsHistoricMoment:Ht(i,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:!o&&a.has("pbf"),supportsDisjointSpatialRelationship:Ht(t,"supportsDisjointSpatialRel",!1),supportsCacheHint:Ht(t,"supportsQueryWithCacheHint",!1)||Xt(t,"query"),supportsDefaultSpatialReference:Ht(t,"supportsDefaultSR",!1),supportsCompactGeometry:n,maxRecordCountFactor:$t(e,"maxRecordCountFactor",void 0),maxRecordCount:$t(e,"maxRecordCount",void 0),standardMaxRecordCount:$t(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:$t(e,"tileMaxRecordCount",void 0)}}_readQueryRelatedCapabilities(e){const t=e.advancedQueryCapabilities,r=Ht(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:Ht(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:Xt(t,"queryRelated")}}_readQueryTopFeaturesCapabilities(e){return{supportsCacheHint:Xt(e.advancedQueryCapabilities,"queryTopFilter")}}_readEditingCapabilities(e){const t=e.ownershipBasedAccessControlForFeatures;return{supportsGeometryUpdate:Ht(e,"allowGeometryUpdates",!0),supportsGlobalId:Ht(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:Ht(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:Ht(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:Ht(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:Ht(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:Ht(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:Ht(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:Ht(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:Ht(t,"allowOthersToUpdate",!0)}}};(0,s._)([(0,x.Cb)({readOnly:!0,json:{read:!1}})],tr.prototype,"capabilities",void 0),(0,s._)([(0,E.r)("service","capabilities",["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","maxRecordCount","maxRecordCountFactor","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"])],tr.prototype,"readCapabilities",null),(0,s._)([(0,x.Cb)({json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],tr.prototype,"charts",void 0),(0,s._)([(0,x.Cb)({readOnly:!0})],tr.prototype,"createQueryVersion",null),(0,s._)([(0,x.Cb)({type:String,json:{read:{source:"layerDefinition.copyrightText"},origins:{service:{read:{source:"copyrightText"}}}}})],tr.prototype,"copyright",void 0),(0,s._)([(0,x.Cb)({type:Boolean})],tr.prototype,"datesInUnknownTimezone",void 0),(0,s._)([(0,x.Cb)({type:String,json:{read:{source:"layerDefinition.displayField"},origins:{service:{read:{source:"displayField"}}}}})],tr.prototype,"displayField",void 0),(0,s._)([(0,x.Cb)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],tr.prototype,"definitionExpression",void 0),(0,s._)([(0,x.Cb)({types:d.LB,readOnly:!0})],tr.prototype,"defaultSymbol",void 0),(0,s._)([(0,x.Cb)({type:Dt.n})],tr.prototype,"dynamicDataSource",void 0),(0,s._)([(0,x.Cb)({readOnly:!0})],tr.prototype,"editFieldsInfo",void 0),(0,s._)([(0,x.Cb)({type:Boolean})],tr.prototype,"editingEnabled",null),(0,s._)([(0,E.r)(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],tr.prototype,"readEditingEnabled",null),(0,s._)([(0,E.r)("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],tr.prototype,"readEditingEnabledFromWebMap",null),(0,s._)([(0,O.c)(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],tr.prototype,"writeEditingEnabled",null),(0,s._)([(0,O.c)("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],tr.prototype,"writeEditingEnabledToWebMap",null),(0,s._)([(0,x.Cb)({readOnly:!0})],tr.prototype,"editingInfo",void 0),(0,s._)([(0,E.r)("editingInfo")],tr.prototype,"readEditingInfo",null),(0,s._)([(0,x.Cb)((()=>{const e=(0,g.d9)(mt.PV),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],tr.prototype,"elevationInfo",void 0),(0,s._)([(0,x.Cb)(ft.d)],tr.prototype,"featureReduction",void 0),(0,s._)([(0,x.Cb)({...Yt.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:er}}}}})],tr.prototype,"fields",void 0),(0,s._)([(0,x.Cb)(Yt.fieldsIndex)],tr.prototype,"fieldsIndex",void 0),(0,s._)([(0,x.Cb)({type:jt.Z,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],tr.prototype,"floorInfo",void 0),(0,s._)([(0,x.Cb)({type:Ae,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],tr.prototype,"formTemplate",void 0),(0,s._)([(0,x.Cb)({type:Le.Z,json:{origins:{service:{read:{source:"extent"}}},read:{source:"layerDefinition.extent"}}})],tr.prototype,"fullExtent",void 0),(0,s._)([(0,x.Cb)()],tr.prototype,"gdbVersion",void 0),(0,s._)([(0,x.Cb)({readOnly:!0,type:It,json:{read:{source:"geometryProperties"}}})],tr.prototype,"geometryFieldsInfo",void 0),(0,s._)([(0,x.Cb)({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:Vt.read},"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:er,writer(e,t,r){const i=e?Vt.toJSON(e):null;i&&(0,C.RB)(r,i,t)}}}},read:{source:"layerDefinition.geometryType",reader:Vt.read}}})],tr.prototype,"geometryType",void 0),(0,s._)([(0,x.Cb)({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasM"}}})],tr.prototype,"hasM",void 0),(0,s._)([(0,x.Cb)({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasZ"}}})],tr.prototype,"hasZ",void 0),(0,s._)([(0,x.Cb)({readOnly:!0,type:Ze.Z})],tr.prototype,"heightModelInfo",void 0),(0,s._)([(0,x.Cb)({type:Date})],tr.prototype,"historicMoment",void 0),(0,s._)([(0,x.Cb)(mt.id)],tr.prototype,"id",void 0),(0,s._)([(0,x.Cb)({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],tr.prototype,"infoFor3D",void 0),(0,s._)([(0,x.Cb)({readOnly:!0,json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],tr.prototype,"isTable",void 0),(0,s._)([(0,E.r)("service","isTable",["type","geometryType"]),(0,E.r)("isTable",["layerDefinition.type","layerDefinition.geometryType"])],tr.prototype,"readIsTable",null),(0,s._)([(0,O.c)("web-map","isTable")],tr.prototype,"writeIsTable",null),(0,s._)([(0,x.Cb)(mt.iR)],tr.prototype,"labelsVisible",void 0),(0,s._)([(0,x.Cb)({type:[Ft.Z],json:{origins:{service:{read:{source:"drawingInfo.labelingInfo",reader:xt.r},write:{target:"drawingInfo.labelingInfo",enabled:!1}}},read:{source:"layerDefinition.drawingInfo.labelingInfo",reader:xt.r},write:{target:"layerDefinition.drawingInfo.labelingInfo"}}})],tr.prototype,"labelingInfo",void 0),(0,s._)([(0,x.Cb)((()=>{const e=(0,g.d9)(mt.bT);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,t,r){(0,C.RB)(r,(0,Nt.a)(e),t)}}},e})())],tr.prototype,"opacity",void 0),(0,s._)([(0,x.Cb)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],tr.prototype,"layerId",void 0),(0,s._)([(0,x.Cb)(mt.rn)],tr.prototype,"legendEnabled",void 0),(0,s._)([(0,x.Cb)({type:["show","hide"],json:(()=>{const e=(0,g.d9)(mt.rT.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],tr.prototype,"listMode",void 0),(0,s._)([(0,x.Cb)(mt.rO)],tr.prototype,"minScale",void 0),(0,s._)([(0,E.r)("service","minScale",["minScale","effectiveMinScale"])],tr.prototype,"readMinScale",null),(0,s._)([(0,x.Cb)(mt.u1)],tr.prototype,"maxScale",void 0),(0,s._)([(0,E.r)("service","maxScale",["maxScale","effectiveMaxScale"])],tr.prototype,"readMaxScale",null),(0,s._)([(0,x.Cb)({type:String})],tr.prototype,"globalIdField",void 0),(0,s._)([(0,E.r)("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"]),(0,E.r)("service","globalIdField",["globalIdField","fields"])],tr.prototype,"readGlobalIdFieldFromService",null),(0,s._)([(0,x.Cb)({type:String,json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:er}}}}})],tr.prototype,"objectIdField",void 0),(0,s._)([(0,E.r)("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"]),(0,E.r)("service","objectIdField",["objectIdField","fields"])],tr.prototype,"readObjectIdFieldFromService",null),(0,s._)([(0,x.Cb)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],tr.prototype,"operationalLayerType",void 0),(0,s._)([(0,x.Cb)(Yt.outFields)],tr.prototype,"outFields",void 0),(0,s._)([(0,x.Cb)({readOnly:!0})],tr.prototype,"parsedUrl",null),(0,s._)([(0,x.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],tr.prototype,"path",void 0),(0,s._)([(0,x.Cb)(mt.C_)],tr.prototype,"popupEnabled",void 0),(0,s._)([(0,x.Cb)({type:o.Z,json:{name:"popupInfo",write:!0}})],tr.prototype,"popupTemplate",void 0),(0,s._)([(0,x.Cb)({readOnly:!0})],tr.prototype,"defaultPopupTemplate",null),(0,s._)([(0,x.Cb)({type:[Rt],readOnly:!0})],tr.prototype,"relationships",void 0),(0,s._)([(0,x.Cb)({types:p.A,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:p.o,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema})}}})],tr.prototype,"renderer",null),(0,s._)([(0,E.r)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),(0,E.r)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],tr.prototype,"readRenderer",null),(0,s._)([(0,x.Cb)()],tr.prototype,"sourceJSON",void 0),(0,s._)([(0,x.Cb)({type:Boolean})],tr.prototype,"returnM",void 0),(0,s._)([(0,x.Cb)({type:Boolean})],tr.prototype,"returnZ",void 0),(0,s._)([(0,x.Cb)((()=>{const e=(0,g.d9)(mt.YI);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],tr.prototype,"screenSizePerspectiveEnabled",void 0),(0,s._)([(0,x.Cb)({clonable:!1})],tr.prototype,"source",null),(0,s._)([(0,j.p)("source")],tr.prototype,"castSource",null),(0,s._)([(0,E.r)("portal-item","source",["featureSet"]),(0,E.r)("web-map","source",["featureSet"])],tr.prototype,"readSource",null),(0,s._)([(0,x.Cb)({readOnly:!0})],tr.prototype,"serviceDefinitionExpression",void 0),(0,s._)([(0,E.r)("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],tr.prototype,"readServiceDefinitionExpression",null),(0,s._)([(0,x.Cb)({type:Pe.Z,json:{origins:{service:{read:{source:"extent.spatialReference"}}},read:{source:"layerDefinition.extent.spatialReference"}}})],tr.prototype,"spatialReference",void 0),(0,s._)([(0,x.Cb)({type:Number})],tr.prototype,"subtypeCode",void 0),(0,s._)([(0,x.Cb)({type:String,json:{origins:{service:{read:!0}}}})],tr.prototype,"subtypeField",void 0),(0,s._)([(0,x.Cb)({type:[gt.Z]})],tr.prototype,"templates",void 0),(0,s._)([(0,E.r)("templates",["editFieldsInfo","creatorField","editorField","templates"])],tr.prototype,"readTemplates",null),(0,s._)([(0,x.Cb)({type:Mt.Z})],tr.prototype,"timeInfo",void 0),(0,s._)([(0,x.Cb)()],tr.prototype,"title",void 0),(0,s._)([(0,E.r)("service","title",["name"]),(0,E.r)("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],tr.prototype,"readTitle",null),(0,s._)([(0,E.r)("web-map","title",["layerDefinition.name","title"])],tr.prototype,"readTitleFromWebMap",null),(0,s._)([(0,x.Cb)({type:String})],tr.prototype,"sublayerTitleMode",void 0),(0,s._)([(0,x.Cb)({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],tr.prototype,"trackIdField",void 0),(0,s._)([(0,x.Cb)({json:{read:!1}})],tr.prototype,"type",void 0),(0,s._)([(0,x.Cb)({type:String})],tr.prototype,"typeIdField",void 0),(0,s._)([(0,E.r)("service","typeIdField"),(0,E.r)("typeIdField",["layerDefinition.typeIdField"])],tr.prototype,"readTypeIdField",null),(0,s._)([(0,x.Cb)({type:[wt.Z]})],tr.prototype,"types",void 0),(0,s._)([(0,E.r)("service","types",["types"]),(0,E.r)("types",["layerDefinition.types"])],tr.prototype,"readTypes",null),(0,s._)([(0,x.Cb)({readOnly:!0,json:{write:!1}})],tr.prototype,"serverGens",void 0),(0,s._)([(0,x.Cb)({type:y.Z.ofType(bt),readOnly:!0})],tr.prototype,"indexes",void 0),(0,s._)([(0,x.Cb)(mt.HQ)],tr.prototype,"url",null),(0,s._)([(0,O.c)("url")],tr.prototype,"writeUrl",null),(0,s._)([(0,x.Cb)({readOnly:!0})],tr.prototype,"userIsAdmin",void 0),(0,s._)([(0,x.Cb)({json:{origins:{service:{read:!0}},read:!1}})],tr.prototype,"version",void 0),(0,s._)([(0,E.r)("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],tr.prototype,"readVersion",null),(0,s._)([(0,x.Cb)({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],tr.prototype,"visible",void 0),(0,s._)([(0,E.r)("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],tr.prototype,"readVisible",null),tr=(0,s._)([(0,T.j)(Ut)],tr);const rr=(0,R.d)({types:d.QT}),ir=tr},66361:(e,t,r)=>{r.d(t,{dU:()=>a,lQ:()=>p,o1:()=>u});var i=r(43697),s=r(32448),o=r(22974),n=(r(92604),r(75215),r(20102),r(80442),r(52011));const a=new s.Z.EventEmitter,l=Symbol("EditBusLayer");function p(e){return e&&"object"==typeof e&&l in e}const u=e=>{var t;let r=class extends e{constructor(...e){super(...e),this[t]=!0,this.when().then((()=>{this.own([a.on("edits",(e=>{const t="layer"in e?e.layer:null,r="layer"in e?e.layer.url:e.serviceUrl,i="layer"in e?e.layer.layerId:e.layerId,s=e.event;if(t===this||r!==this.url)return;if(null!=i&&null!=this.layerId&&i===this.layerId)return void this.emit("edits",(0,o.d9)(s));const n=s.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(n){const{adds:e,updates:t,deletes:r}=n.editedFeatures,i={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:e.map((({attributes:e})=>({objectId:e[this.objectIdField],globalId:e[this.globalIdField]}))),deletedFeatures:r.map((({attributes:e})=>({objectId:e[this.objectIdField],globalId:e[this.globalIdField]}))),updatedFeatures:t.map((({current:{attributes:e}})=>({objectId:e[this.objectIdField],globalId:e[this.globalIdField]}))),editedFeatures:(0,o.d9)(s.editedFeatures)};this.emit("edits",i)}}))])}),(()=>{}))}};return t=l,r=(0,i._)([(0,n.j)("esri.layers.mixins.EditBusLayer")],r),r}},68825:(e,t,r)=>{r.d(t,{c:()=>m});var i,s=r(43697),o=r(78286),n=r(5600),a=(r(67676),r(80442),r(75215),r(52011)),l=r(35454),p=r(96674);const u=new l.X({asc:"ascending",desc:"descending"});let d=i=class extends p.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],d.prototype,"field",void 0),(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],d.prototype,"valueExpression",void 0),(0,s._)([(0,n.Cb)({type:u.apiValues,json:{read:u.read,write:u.write}})],d.prototype,"order",void 0),d=i=(0,s._)([(0,a.j)("esri.layers.support.OrderByInfo")],d);const c=d;function y(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const s=new c;return s.read(i,r),[s]}function h(e,t,r,i){const s=e.find((e=>!!e.field));s&&(0,o.RB)(r,[s.toJSON()],t)}const m=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,n.Cb)({type:[c],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:y},write:{target:"layerDefinition.orderBy",writer:h}}})],t.prototype,"orderBy",void 0),t=(0,s._)([(0,a.j)("esri.layers.mixins.OrderedLayer")],t),t}},40555:(e,t,r)=>{r.d(t,{y:()=>n});var i=r(66643),s=r(95330),o=r(20941);async function n(e,t,r){const n=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(n&&"unique-value"===n.type&&n.styleOrigin){const a=await(0,i.q6)(n.populateFromStyle());if((0,s.k_)(r),!1===a.ok){const r=a.error;t&&t.messages&&t.messages.push(new o.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t.origin)}}}},59431:(e,t,r)=>{r.d(t,{P:()=>a});var i=r(70586),s=r(67900),o=r(8744);function n(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function a(e,t,r){if(!e&&!t||!r)return;const i=(0,s._R)(r);l(e,r,i),l(t,r,i)}function l(e,t,r){if(e)for(const i of e)p(i.geometry,t,r)}function p(e,t,r){if((0,i.Wi)(e)||!e.spatialReference||(0,o.fS)(e.spatialReference,t))return;const a=(0,s._R)(e.spatialReference)/r;if(1!==a)if("x"in e)null!=e.z&&(e.z*=a);else if("rings"in e)n(e,e.rings,a);else if("paths"in e)n(e,e.paths,a);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=a)}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3121],{79235:(e,t,r)=>{r.d(t,{Z:()=>w});var i,s=r(43697),o=r(67676),n=r(35454),a=r(96674),l=r(67900),p=r(20941),u=r(5600),d=(r(80442),r(75215),r(71715)),c=r(52011),y=r(30556);const h=(0,n.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=h.jsonValues.slice();(0,o.e$)(m,"orthometric");const b=(0,n.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=i=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return h.write(e,t,r)}readHeightModel(e,t,r){return h.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new p.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return b.read(e)||(r&&r.messages&&r.messages.push(g(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.$C)(e)||b.read(e)||(r&&r.messages&&r.messages.push(g(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function g(e,t){return new p.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,u.Cb)({type:h.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0),(0,s._)([(0,y.c)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,s._)([(0,d.r)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,s._)([(0,u.Cb)({type:b.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:b.jsonValues,write:b.write}}}})],f.prototype,"heightUnit",void 0),(0,s._)([(0,d.r)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,s._)([(0,d.r)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,s._)([(0,u.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,s._)([(0,d.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=i=(0,s._)([(0,c.j)("esri.geometry.HeightModelInfo")],f);const w=f},3121:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ir});var i,s=r(43697),o=r(51773),n=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382)),a=r(81571),l=r(91423),p=r(32400),u=r(3172),d=r(9790),c=r(2368),y=r(46791),h=r(20102),m=r(61247),b=r(80442),f=r(35454),g=r(22974),w=r(92604),v=r(70586),_=r(16453),C=r(78286),S=r(95330),I=r(42033),F=r(17452),x=r(5600),j=r(90578),E=r(71715),T=r(52011),O=r(30556),R=r(63213),M=r(96674),q=(r(67676),r(75215));let D=i=class extends M.wq{constructor(e){super(e),this.expression=null,this.name=null,this.returnType="boolean",this.title=null}clone(){return new i({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],D.prototype,"expression",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],D.prototype,"name",void 0),(0,s._)([(0,x.Cb)({type:["boolean","date","number","string"],json:{write:!0}})],D.prototype,"returnType",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],D.prototype,"title",void 0),D=i=(0,s._)([(0,T.j)("esri.form.ExpressionInfo")],D);const A=D;let L=class extends M.wq{constructor(e){super(e),this.description=null,this.label=null,this.type=null,this.visibilityExpression=null}};(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],L.prototype,"description",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],L.prototype,"label",void 0),(0,s._)([(0,x.Cb)()],L.prototype,"type",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],L.prototype,"visibilityExpression",void 0),L=(0,s._)([(0,T.j)("esri.form.elements.Element")],L);const Z=L;var P;let G=P=class extends M.wq{constructor(e){super(e),this.type=null}clone(){return new P({type:this.type})}};(0,s._)([(0,x.Cb)({type:["attachment","audio","document","image","signature","video"],json:{write:!0}})],G.prototype,"type",void 0),G=P=(0,s._)([(0,T.j)("esri.form.elements.inputs.AttachmentInput")],G);const Q=G;var N;let V=N=class extends Z{constructor(e){super(e),this.attachmentKeyword=null,this.editable=!0,this.input=null,this.type="attachment"}clone(){return new N({attachmentKeyword:this.attachmentKeyword,description:this.description,editable:this.editable,input:this.input,label:this.label,visibilityExpression:this.visibilityExpression})}};(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],V.prototype,"attachmentKeyword",void 0),(0,s._)([(0,x.Cb)({type:Boolean,json:{write:!0}})],V.prototype,"editable",void 0),(0,s._)([(0,x.Cb)({type:Q,json:{read:{source:"inputType"},write:{target:"inputType"}}})],V.prototype,"input",void 0),(0,s._)([(0,x.Cb)({type:["attachment"],json:{read:!1,write:!0}})],V.prototype,"type",void 0),V=N=(0,s._)([(0,T.j)("esri.form.elements.AttachmentElement")],V);const k=V;let B=class extends M.wq{constructor(e){super(e),this.type=null}};(0,s._)([(0,x.Cb)()],B.prototype,"type",void 0),B=(0,s._)([(0,T.j)("esri.form.elements.inputs.Input")],B);const U=B;let J=class extends U{constructor(e){super(e),this.maxLength=null,this.minLength=0}};(0,s._)([(0,x.Cb)({type:Number,json:{write:!0}})],J.prototype,"maxLength",void 0),(0,s._)([(0,x.Cb)({type:Number,json:{write:!0}})],J.prototype,"minLength",void 0),J=(0,s._)([(0,T.j)("esri.form.elements.inputs.TextInput")],J);const z=J;var W;let H=W=class extends z{constructor(e){super(e),this.type="barcode-scanner"}clone(){return new W({maxLength:this.maxLength,minLength:this.minLength})}};(0,s._)([(0,x.Cb)({type:["barcode-scanner"],json:{read:!1,write:!0}})],H.prototype,"type",void 0),H=W=(0,s._)([(0,T.j)("esri.form.elements.inputs.BarcodeScannerInput")],H);const $=H;var K;let X=K=class extends U{constructor(e){super(e),this.noValueOptionLabel=null,this.showNoValueOption=!0,this.type="combo-box"}clone(){return new K({showNoValueOption:this.showNoValueOption,noValueOptionLabel:this.noValueOptionLabel})}};(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],X.prototype,"noValueOptionLabel",void 0),(0,s._)([(0,x.Cb)({type:Boolean,json:{write:!0}})],X.prototype,"showNoValueOption",void 0),(0,s._)([(0,x.Cb)({type:["combo-box"],json:{read:!1,write:!0}})],X.prototype,"type",void 0),X=K=(0,s._)([(0,T.j)("esri.form.elements.inputs.ComboBoxInput")],X);const Y=X;var ee;function te(e){return null!=e?new Date(e):null}function re(e){return e?e.getTime():null}let ie=ee=class extends U{constructor(e){super(e),this.includeTime=!1,this.max=null,this.min=null,this.type="datetime-picker"}readMax(e,t){return te(t.max)}writeMax(e,t){t.max=re(e)}readMin(e,t){return te(t.min)}writeMin(e,t){t.min=re(e)}clone(){return new ee({includeTime:this.includeTime,max:this.max,min:this.min,type:this.type})}};(0,s._)([(0,x.Cb)({type:Boolean,json:{write:!0}})],ie.prototype,"includeTime",void 0),(0,s._)([(0,x.Cb)({type:Date,json:{type:Number,write:!0}})],ie.prototype,"max",void 0),(0,s._)([(0,E.r)("max")],ie.prototype,"readMax",null),(0,s._)([(0,O.c)("max")],ie.prototype,"writeMax",null),(0,s._)([(0,x.Cb)({type:Date,json:{type:Number,write:!0}})],ie.prototype,"min",void 0),(0,s._)([(0,E.r)("min")],ie.prototype,"readMin",null),(0,s._)([(0,O.c)("min")],ie.prototype,"writeMin",null),(0,s._)([(0,x.Cb)({type:["datetime-picker"],json:{read:!1,write:!0}})],ie.prototype,"type",void 0),ie=ee=(0,s._)([(0,T.j)("esri.form.elements.inputs.DateTimePickerInput")],ie);const se=ie;var oe;let ne=oe=class extends U{constructor(e){super(e),this.noValueOptionLabel=null,this.showNoValueOption=!0,this.type="radio-buttons"}clone(){return new oe({noValueOptionLabel:this.noValueOptionLabel,showNoValueOption:this.showNoValueOption})}};(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],ne.prototype,"noValueOptionLabel",void 0),(0,s._)([(0,x.Cb)({type:Boolean,json:{write:!0}})],ne.prototype,"showNoValueOption",void 0),(0,s._)([(0,x.Cb)({type:["radio-buttons"],json:{read:!1,write:!0}})],ne.prototype,"type",void 0),ne=oe=(0,s._)([(0,T.j)("esri.form.elements.inputs.RadioButtonsInput")],ne);const ae=ne;var le;let pe=le=class extends U{constructor(e){super(e),this.offValue=null,this.onValue=null,this.type="switch"}clone(){return new le({offValue:this.offValue,onValue:this.onValue})}};(0,s._)([(0,x.Cb)({type:[String,Number],json:{write:!0}})],pe.prototype,"offValue",void 0),(0,s._)([(0,x.Cb)({type:[String,Number],json:{write:!0}})],pe.prototype,"onValue",void 0),(0,s._)([(0,x.Cb)({type:["switch"],json:{read:!1,write:!0}})],pe.prototype,"type",void 0),pe=le=(0,s._)([(0,T.j)("esri.form.elements.inputs.SwitchInput")],pe);const ue=pe;var de;let ce=de=class extends z{constructor(e){super(e),this.type="text-area"}clone(){return new de({maxLength:this.maxLength,minLength:this.minLength})}};(0,s._)([(0,x.Cb)({type:["text-area"],json:{read:!1,write:!0}})],ce.prototype,"type",void 0),ce=de=(0,s._)([(0,T.j)("esri.form.elements.inputs.TextAreaInput")],ce);const ye=ce;var he;let me=he=class extends z{constructor(e){super(e),this.type="text-box"}clone(){return new he({maxLength:this.maxLength,minLength:this.minLength})}};(0,s._)([(0,x.Cb)({type:["text-box"],json:{read:!1,write:!0}})],me.prototype,"type",void 0),me=he=(0,s._)([(0,T.j)("esri.form.elements.inputs.TextBoxInput")],me);const be={base:U,key:"type",typeMap:{"barcode-scanner":$,"combo-box":Y,"datetime-picker":se,"radio-buttons":ae,switch:ue,"text-area":ye,"text-box":me}};var fe,ge=r(72729);let we=fe=class extends Z{constructor(e){super(e),this.domain=null,this.editable=!0,this.editableExpression=null,this.fieldName=null,this.hint=null,this.input=null,this.requiredExpression=null,this.type="field",this.valueExpression=null}clone(){return new fe({description:this.description,domain:this.domain,editable:this.editable,editableExpression:this.editableExpression,fieldName:this.fieldName,hint:this.hint,input:this.input,label:this.label,requiredExpression:this.requiredExpression,valueExpression:this.valueExpression,visibilityExpression:this.visibilityExpression})}};(0,s._)([(0,x.Cb)({types:ge.V5,json:{read:{reader:ge.im},write:!0}})],we.prototype,"domain",void 0),(0,s._)([(0,x.Cb)({type:Boolean,json:{write:!0}})],we.prototype,"editable",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],we.prototype,"editableExpression",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],we.prototype,"fieldName",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],we.prototype,"hint",void 0),(0,s._)([(0,x.Cb)({types:be,json:{read:{source:"inputType"},write:{target:"inputType"}}})],we.prototype,"input",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],we.prototype,"requiredExpression",void 0),(0,s._)([(0,x.Cb)({type:String,json:{read:!1,write:!0}})],we.prototype,"type",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],we.prototype,"valueExpression",void 0),we=fe=(0,s._)([(0,T.j)("esri.form.elements.FieldElement")],we);const ve=we;var _e,Ce=r(44729);let Se=_e=class extends Z{constructor(e){super(e),this.displayCount=null,this.displayType="list",this.editable=!0,this.orderByFields=null,this.relationshipId=null,this.type="relationship"}clone(){return new _e({description:this.description,displayCount:this.displayCount,displayType:this.displayType,editable:this.editable,label:this.label,orderByFields:(0,g.d9)(this.orderByFields),relationshipId:this.relationshipId,visibilityExpression:this.visibilityExpression})}};(0,s._)([(0,x.Cb)({type:Number,json:{write:!0}})],Se.prototype,"displayCount",void 0),(0,s._)([(0,x.Cb)({type:["list"],json:{write:!0}})],Se.prototype,"displayType",void 0),(0,s._)([(0,x.Cb)({type:Boolean,json:{write:!0}})],Se.prototype,"editable",void 0),(0,s._)([(0,x.Cb)({type:[Ce.Z],json:{write:!0}})],Se.prototype,"orderByFields",void 0),(0,s._)([(0,x.Cb)({type:Number,json:{write:!0}})],Se.prototype,"relationshipId",void 0),(0,s._)([(0,x.Cb)({type:["relationship"],json:{read:!1,write:!0}})],Se.prototype,"type",void 0),Se=_e=(0,s._)([(0,T.j)("esri.form.elements.RelationshipElement")],Se);const Ie=Se;function Fe(e){return{typesWithGroup:{base:Z,key:"type",typeMap:{attachment:k,field:ve,group:e,relationship:Ie}},typesWithoutGroup:{base:Z,key:"type",typeMap:{attachment:k,field:ve,relationship:Ie}}}}function xe(e,t,r=!0){if(!e)return null;const i=r?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter((e=>i[e.type])).map((e=>i[e.type].fromJSON(e)))}function je(e,t,r=!0){if(!e)return null;const i=r?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter((e=>i[e.type])).map((e=>e.toJSON()))}function Ee(e,t,r=!0){return e?e.map((e=>(0,q.N7)(r?t.typesWithGroup:t.typesWithoutGroup,e))):null}var Te;let Oe=Te=class extends Z{constructor(e){super(e),this.elements=null,this.initialState="expanded",this.type="group"}castElements(e){return Ee(e,Re,!1)}readElements(e,t){return xe(t.formElements,Re,!1)}writeElements(e,t){t.formElements=je(e,Re,!1)}clone(){return new Te({description:this.description,elements:(0,g.d9)(this.elements),initialState:this.initialState,label:this.label,visibilityExpression:this.visibilityExpression})}};(0,s._)([(0,x.Cb)({json:{write:!0}})],Oe.prototype,"elements",void 0),(0,s._)([(0,j.p)("elements")],Oe.prototype,"castElements",null),(0,s._)([(0,E.r)("elements",["formElements"])],Oe.prototype,"readElements",null),(0,s._)([(0,O.c)("elements")],Oe.prototype,"writeElements",null),(0,s._)([(0,x.Cb)({type:["collapsed","expanded"],json:{write:!0}})],Oe.prototype,"initialState",void 0),(0,s._)([(0,x.Cb)({type:String,json:{read:!1,write:!0}})],Oe.prototype,"type",void 0),Oe=Te=(0,s._)([(0,T.j)("esri.form.elements.GroupElement")],Oe);const Re=Fe(Oe);var Me;const qe=Fe(Oe);let De=Me=class extends M.wq{constructor(e){super(e),this.description=null,this.elements=null,this.expressionInfos=null,this.title=null}castElements(e){return Ee(e,qe)}readElements(e,t){return xe(t.formElements,qe)}writeElements(e,t){t.formElements=je(e,qe)}clone(){return new Me({description:this.description,expressionInfos:(0,g.d9)(this.expressionInfos),elements:(0,g.d9)(this.elements),title:this.title})}};(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],De.prototype,"description",void 0),(0,s._)([(0,x.Cb)({json:{write:!0}})],De.prototype,"elements",void 0),(0,s._)([(0,j.p)("elements")],De.prototype,"castElements",null),(0,s._)([(0,E.r)("elements",["formElements"])],De.prototype,"readElements",null),(0,s._)([(0,O.c)("elements")],De.prototype,"writeElements",null),(0,s._)([(0,x.Cb)({type:[A],json:{write:!0}})],De.prototype,"expressionInfos",void 0),(0,s._)([(0,x.Cb)({type:String,json:{write:!0}})],De.prototype,"title",void 0),De=Me=(0,s._)([(0,T.j)("esri.form.FormTemplate")],De);const Ae=De;var Le=r(6570),Ze=r(79235),Pe=r(82971),Ge=r(87085),Qe=(r(66577),r(38171)),Ne=r(3920),Ve=r(83379),ke=r(609),Be=r(78346),Ue=r(52421),Je=r(59431),ze=r(28694),We=r(74889),He=r(38913),$e=r(86973);let Ke=0;const Xe="esri.layers.graphics.sources.MemorySource",Ye=w.Z.getLogger(Xe);let et=class extends(Ve.Z.LoadableMixin((0,ke.v)((0,Ne.p)(y.Z)))){constructor(e){super(e),this._idToClientGraphic=null,this.type="memory"}load(e){const t=(0,v.pC)(e)?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){const e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?"polygon":e:null}applyEdits(e){return this.load().then((()=>this._applyEdits(e)))}openPorts(){return this.load().then((()=>this._connection.openPorts()))}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);(0,ze.p)(e,this.layer.spatialReference,r);const i=We.default.fromJSON(r);if(!this._requiresClientGraphicMapping())return i;const s=this.layer.objectIdField;for(const e of i.features){const t=e.attributes[s],r=this._idToClientGraphic.get(t);r&&(e.geometry=r.geometry)}return i.geometryType=this.layer.geometryType,i}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new h.Z("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return(0,ze.p)(e,this.layer.spatialReference,r),r}queryFeatureCount(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)))}queryObjectIds(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)))}queryExtent(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t))).then((e=>({count:e.count,extent:Le.Z.fromJSON(e.extent)})))}querySnapping(e,t={}){return this.load(t).then((()=>this._connection.invoke("querySnapping",e,t)))}async _applyEdits(e){if(!this._connection)throw new h.Z("feature-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField;let r=null;const i=[],s=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);const o=e=>"objectId"in e&&null!=e.objectId?e.objectId:"attributes"in e&&null!=e.attributes[t]?e.attributes[t]:null;if(e.addFeatures&&(r=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(const t of e.deleteFeatures){const e=o(t);null!=e&&i.push(e)}const n=e.updateFeatures&&this._idToClientGraphic?new Map:null;if(e.updateFeatures)for(const t of e.updateFeatures)if(s.push(this._serializeFeature(t)),n){const e=o(t);null!=e&&n.set(e,t)}(0,Je.P)(r?r.features:null,s,this.layer.spatialReference);const{fullExtent:a,featureEditResults:l}=await this._connection.invoke("applyEdits",{adds:r?r.features:[],updates:s,deletes:i});return this.fullExtent=a,r&&r.finish(l.uidToObjectId),this._updateClientGraphicIds(n,l),this._createEditsResult(l)}async _prepareClientMapping(e,t){if("mesh"!==this._layerOrSourceGeometryType||(0,v.Wi)(e))return;const r=[];for(const{geometry:i}of e)!(0,v.pC)(i)||"mesh"!==i.type||i.hasExtent||i.loaded||r.push(i.load({signal:t}));r.length&&await Promise.all(r)}_updateClientGraphicIds(e,t){if(this._idToClientGraphic){if(e)for(const r of t.updateResults){if(!r.success)continue;const t=e.get(r.objectId);null!=t&&this._addIdToClientGraphic(t)}for(const e of t.deleteResults)e.success&&this._idToClientGraphic.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new h.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_prepareAddFeatures(e){const t=new Map,r=new Array(e.length);let i=null;for(let s=0;s<e.length;s++){const o=e[s],n=this._serializeFeature(o);!i&&(0,v.pC)(o.geometry)&&(i=o.geometry.type),r[s]=n,t.set(`${n.uid}`,o)}const s=this;return{features:r,inferredGeometryType:i,finish(e){const r=s.sourceJSON.objectIdField;for(const i in e){const o=e[i],n=t.get(i);n&&(n.attributes||(n.attributes={}),-1===o?delete n.attributes[r]:n.attributes[r]=o,s._addIdToClientGraphic(n))}}}}_addIdToClientGraphic(e){if(!this._idToClientGraphic)return;const t=this.sourceJSON.objectIdField,r=e.attributes&&e.attributes[t];null!=r&&this._idToClientGraphic.set(r,e)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return"mesh"===e||"multipatch"===e||"extent"===e}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e),i=(Ke++).toString();return r?{uid:i,geometry:r.toJSON(),attributes:t}:{uid:i,attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return(0,v.Wi)(t)?null:this._geometryRequiresClientGraphicMapping(t)?t.extent?He.Z.fromExtent(t.extent):null:t}async _startWorker(e){this._connection=await(0,Be.bA)("MemorySourceWorker",{strategy:(0,b.Z)("feature-layers-workers")?"dedicated":"local",signal:e});const{fields:t,spatialReference:r,objectIdField:i,hasM:s,hasZ:o,timeInfo:n}=this.layer,a="defaults"===this.layer.originOf("spatialReference");await this._prepareClientMapping(this.items,e);const l=this._prepareAddFeatures(this.items);this.handles.add(this.on("before-changes",(e=>{Ye.error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),e.preventDefault()})));const p={features:l.features,fields:t&&t.map((e=>e.toJSON())),geometryType:$e.P$.toJSON(this._workerGeometryType),hasM:"mesh"!==this._layerOrSourceGeometryType&&s,hasZ:"mesh"===this._layerOrSourceGeometryType||o,objectIdField:i,spatialReference:a?null:r&&r.toJSON(),timeInfo:n?n.toJSON():null},u=await this._connection.invoke("load",p,{signal:e});for(const e of u.warnings)Ye.warn(e.message,{layer:this.layer,warning:e});u.featureErrors.length&&Ye.warn(`Encountered ${u.featureErrors.length} validation errors while loading features`,u.featureErrors);const d=u.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(l.inferredGeometryType)&&(d.geometryType=$e.P$.toJSON(l.inferredGeometryType)),this.sourceJSON=d,this._requiresClientGraphicMapping()&&(this._idToClientGraphic=new Map),l.finish(u.assignedObjectIds)}};(0,s._)([(0,Ue.c)({Type:Qe.Z,ensureType:(0,q.se)(Qe.Z)})],et.prototype,"itemType",void 0),(0,s._)([(0,x.Cb)()],et.prototype,"type",void 0),(0,s._)([(0,x.Cb)({constructOnly:!0})],et.prototype,"layer",void 0),(0,s._)([(0,x.Cb)({readOnly:!0})],et.prototype,"_workerGeometryType",null),(0,s._)([(0,x.Cb)()],et.prototype,"sourceJSON",void 0),et=(0,s._)([(0,T.j)(Xe)],et);var tt,rt=r(54295),it=r(17287),st=r(71612),ot=r(17017),nt=r(66361),at=r(69637),lt=r(38009),pt=r(68825),ut=r(16859),dt=r(34760),ct=r(72965),yt=r(28294),ht=r(66677),mt=r(21506);let bt=tt=class extends M.wq{constructor(e){super(e)}clone(){const{name:e,fields:t,isAscending:r,isUnique:i,description:s}=this;return new tt({name:e,fields:t,isAscending:r,isUnique:i,description:s})}};(0,s._)([(0,x.Cb)({constructOnly:!0})],bt.prototype,"name",void 0),(0,s._)([(0,x.Cb)({constructOnly:!0})],bt.prototype,"fields",void 0),(0,s._)([(0,x.Cb)({constructOnly:!0})],bt.prototype,"isAscending",void 0),(0,s._)([(0,x.Cb)({constructOnly:!0})],bt.prototype,"isUnique",void 0),(0,s._)([(0,x.Cb)({constructOnly:!0})],bt.prototype,"description",void 0),bt=tt=(0,s._)([(0,T.j)("esri.layers.support.FeatureIndex")],bt);var ft=r(2075),gt=r(70082),wt=r(16451),vt=r(53518),_t=r(35671),Ct=r(67900);let St=class extends((0,c.J)(M.wq)){constructor(e){super(e),this.shapeAreaField=null,this.shapeLengthField=null,this.units=null}};(0,s._)([(0,x.Cb)({type:String,json:{read:{source:"shapeAreaFieldName"}}})],St.prototype,"shapeAreaField",void 0),(0,s._)([(0,x.Cb)({type:String,json:{read:{source:"shapeLengthFieldName"}}})],St.prototype,"shapeLengthField",void 0),(0,s._)([(0,x.Cb)({type:String,json:{read:e=>Ct.gV.read(e)||Ct.Jo.read(e)}})],St.prototype,"units",void 0),St=(0,s._)([(0,T.j)("esri.layers.support.GeometryFieldsInfo")],St);const It=St;var Ft=r(2319),xt=r(30707),jt=r(56765);const Et=new f.X({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),Tt=new f.X({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let Ot=class extends((0,c.J)(M.wq)){constructor(e){super(e),this.cardinality=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,s._)([(0,x.Cb)({json:{read:Et.read,write:Et.write}})],Ot.prototype,"cardinality",void 0),(0,s._)([(0,x.Cb)({json:{read:!0,write:!0}})],Ot.prototype,"composite",void 0),(0,s._)([(0,x.Cb)({json:{read:!0,write:!0}})],Ot.prototype,"id",void 0),(0,s._)([(0,x.Cb)({json:{read:!0,write:!0}})],Ot.prototype,"keyField",void 0),(0,s._)([(0,x.Cb)({json:{read:!0,write:!0}})],Ot.prototype,"keyFieldInRelationshipTable",void 0),(0,s._)([(0,x.Cb)({json:{read:!0,write:!0}})],Ot.prototype,"name",void 0),(0,s._)([(0,x.Cb)({json:{read:!0,write:!0}})],Ot.prototype,"relatedTableId",void 0),(0,s._)([(0,x.Cb)({json:{read:!0,write:!0}})],Ot.prototype,"relationshipTableId",void 0),(0,s._)([(0,x.Cb)({json:{read:Tt.read,write:Tt.write}})],Ot.prototype,"role",void 0),Ot=(0,s._)([(0,T.j)("esri.layers.support.Relationship")],Ot);const Rt=Ot;var Mt=r(30547),qt=r(60199),Dt=r(10158),At=r(40555),Lt=r(56545),Zt=r(57444),Pt=r(75935),Gt=r(28141),Qt=r(32163),Nt=r(65242);const Vt=new f.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"}),kt={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"},Bt="FeatureLayer",Ut="esri.layers.FeatureLayer",Jt=w.Z.getLogger(Ut);function zt(e,t){return new h.Z("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function Wt(e){return e&&e instanceof y.Z}function Ht(e,t,r){return!!(e&&e.hasOwnProperty(t)?e[t]:r)}function $t(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}function Kt(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function Xt(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}const Yt=(0,vt.v)();function er(e,t,r){const i=!!r?.writeLayerSchema;return{enabled:i,ignoreOrigin:i}}let tr=class extends((0,at.b)((0,nt.o1)((0,st.h)((0,pt.c)((0,yt.n)((0,ct.M)((0,dt.Q)((0,it.Y)((0,lt.q)((0,ut.I)((0,_.R)((0,ot.N)((0,rt.V)((0,c.J)(Ge.Z))))))))))))))){constructor(...e){super(...e),this._handles=new m.Z,this.capabilities=null,this.charts=null,this.copyright=null,this.datesInUnknownTimezone=!1,this.displayField=null,this.definitionExpression=null,this.dynamicDataSource=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.featureReduction=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.formTemplate=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.layerId=void 0,this.legendEnabled=!0,this.minScale=0,this.maxScale=0,this.globalIdField=null,this.objectIdField=null,this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.returnM=void 0,this.returnZ=void 0,this.screenSizePerspectiveEnabled=!0,this.serviceDefinitionExpression=null,this.spatialReference=Pe.Z.WGS84,this.subtypeCode=null,this.subtypeField=null,this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.trackIdField=null,this.type="feature",this.typeIdField=null,this.types=null,this.indexes=new(y.Z.ofType(bt)),this.userIsAdmin=!1,this.version=void 0,this.visible=!0}destroy(){this.source?.destroy(),this._handles=(0,v.SC)(this._handles)}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,v.pC)(e)?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then((e=>this._initLayerProperties(e)))),Promise.resolve(this);const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection"]},e).catch(S.r9).then((async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new h.Z("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this._initLayerProperties(await this.createGraphicsSource(t))})).then((()=>this.finishLoadEditablePortalLayer(e)));return this.addResolvingPromise(r),Promise.resolve(this)}readCapabilities(e,t){return t=t.layerDefinition||t,{analytics:this._readAnalyticsCapabilities(t),attachment:this._readAttachmentCapabilities(t),data:this._readDataCapabilities(t),metadata:this._readMetadataCapabilities(t),operations:this._readOperationsCapabilities(t.capabilities||e,t),query:this._readQueryCapabilities(t),queryRelated:this._readQueryRelatedCapabilities(t),queryTopFeatures:this._readQueryTopFeaturesCapabilities(t),editing:this._readEditingCapabilities(t)}}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,r){return this._readEditingEnabled(t,!0,r)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,r,i){this._writeEditingEnabled(e,t,!0,i)}readEditingInfo(e,t){const{editingInfo:r}=t;return r?{lastEditDate:null!=r.lastEditDate?new Date(r.lastEditDate):null}:null}readIsTable(e,t){return"Table"===(t=t?.layerDefinition??t).type||!t.geometryType}writeIsTable(e,t,r,i){i?.writeLayerSchema&&(0,C.RB)(r,e?"Table":"Feature Layer",t)}readMinScale(e,t){return t.effectiveMinScale||e||0}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeOID"===e.type)return e.name}get parsedUrl(){const e=this.url?(0,F.mN)(this.url):null;return null!=e&&(null!=this.dynamicDataSource?e.path=(0,F.v_)(e.path,"dynamicLayer"):null!=this.layerId&&(e.path=(0,F.v_)(e.path,this.layerId.toString()))),e}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,_t.YN)(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){const i=(t=t.layerDefinition||t).drawingInfo?.renderer;if(i){const e=(0,l.a)(i,t,r)??void 0;return e||Jt.error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}if(t.defaultSymbol)return t.types&&t.types.length?new a.Z({defaultSymbol:rr(t.defaultSymbol,t,r),field:t.typeIdField,uniqueValueInfos:t.types.map((e=>({id:e.id,symbol:rr(e.symbol,e,r)})))}):new n.Z({symbol:rr(t.defaultSymbol,t,r)})}set source(e){const t=this._get("source");t!==e&&(Wt(t)&&this._resetMemorySource(t),Wt(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof y.Z?new et({layer:this,items:e}):e:null}readSource(e,t){const r=We.default.fromJSON(t.featureSet);return new et({layer:this,items:r?.features??[]})}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}readTemplates(e,t){const r=t.editFieldsInfo,i=r&&r.creatorField,s=r&&r.editorField;return e=e&&e.map((e=>gt.Z.fromJSON(e))),this._fixTemplates(e,i),this._fixTemplates(e,s),e}readTitle(e,t){const r=t.layerDefinition?.name??t.name,i=t.title||t.layerDefinition&&t.layerDefinition.title;if(r){const e=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return this.url?(0,ht.a7)(this.url,r):r;let t=r;if(!t&&this.url){const e=(0,ht.Qc)(this.url);(0,v.pC)(e)&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),(0,ht.ld)(t)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,t){return t.title||t.layerDefinition&&t.layerDefinition.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}readTypes(e,t){e=(t=t.layerDefinition||t).types;const r=t.editFieldsInfo,i=r&&r.creatorField,s=r&&r.editorField;return e&&e.map((e=>(e=wt.Z.fromJSON(e),this._fixTemplates(e.templates,i),this._fixTemplates(e.templates,s),e)))}set url(e){const t=(0,ht.XG)({layer:this,url:e,nonStandardUrlAllowed:!0,logger:Jt});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){(0,ht.wH)(this,e,null,t,i)}readVersion(e,t){return t.currentVersion?t.currentVersion:t.hasOwnProperty("capabilities")||t.hasOwnProperty("drawingInfo")||t.hasOwnProperty("hasAttachments")||t.hasOwnProperty("htmlPopupType")||t.hasOwnProperty("relationships")||t.hasOwnProperty("timeInfo")||t.hasOwnProperty("typeIdField")||t.hasOwnProperty("types")?10:9.3}readVisible(e,t){return t.layerDefinition&&null!=t.layerDefinition.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}async addAttachment(e,t){const{source:r}=await this.load();if(await this._checkAttachmentSupport(e),!r.addAttachment)throw new h.Z(Bt,"Layer source does not support addAttachment capability");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{source:i}=await this.load();if(await this._checkAttachmentSupport(e),!i.updateAttachment)throw new h.Z(Bt,"Layer source does not support updateAttachment capability");return i.updateAttachment(e,t,r)}async applyEdits(e,t){const i=await r.e(7035).then(r.bind(r,87269)),s=await this.load();return i.applyEdits(s,s.source,e,t)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,Qt.eZ)(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:t}=await(0,S.Hl)(Promise.all([r.e(4599),r.e(8899)]).then(r.bind(r,38899)),e);return new t({layer:this}).load({signal:e})}createQuery(){const e=new Zt.Z,t=this.get("capabilities.data"),r=this.get("capabilities.query");e.dynamicDataSource=this.dynamicDataSource,e.historicMoment=this.historicMoment,e.gdbVersion=this.gdbVersion,e.returnGeometry=!0,r&&(e.compactGeometryEnabled=r.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=r.supportsDefaultSpatialReference),t&&(t.supportsZ&&null!=this.returnZ&&(e.returnZ=this.returnZ),t.supportsM&&null!=this.returnM&&(e.returnM=this.returnM)),e.outFields=["*"];const i=(0,v.pC)(this.subtypeCode)?`${this.subtypeField} = ${this.subtypeCode}`:null,s=(0,I._)(this.definitionExpression,i);e.where=s||"1=1";const{timeOffset:o,timeExtent:n}=this;return e.timeExtent=null!=o&&null!=n?n.offset(-o.value,o.unit):n||null,e.multipatchOption="multipatch"===this.geometryType?"xyFootprint":null,e}async deleteAttachments(e,t){const{source:r}=await this.load();if(await this._checkAttachmentSupport(e),!r.deleteAttachments)throw new h.Z(Bt,"Layer source does not support deleteAttachments capability");return r.deleteAttachments(e,t)}async fetchRecomputedExtents(e){const{source:t}=await this.load({signal:e?.signal});if(!t.fetchRecomputedExtents)throw new h.Z(Bt,"Layer source does not support fetchUpdates capability");return t.fetchRecomputedExtents(e)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(null==i)return null;let s=null;return r?.some((e=>{const{id:t}=e;return null!=t&&(t.toString()===i.toString()&&(s=e),!!s)})),s}getFieldDomain(e,t){const r=t&&t.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}async queryAttachments(e,t){e=Lt.Z.from(e);const{source:r,capabilities:i}=await this.load();if(!i?.data?.supportsAttachment)throw new h.Z(Bt,"this layer doesn't support attachments");const{attachmentTypes:s,objectIds:o,globalIds:n,num:a,size:l,start:p,where:u}=e;if(!i?.operations?.supportsQueryAttachments){const t=o&&o.length>1,r=s&&s.length,i=n&&n.length,d=l&&l.length;if(t||r||i||d||a||p||u)throw new h.Z(Bt,"when 'supportsQueryAttachments' is false, only objectIds of length 1 are supported",e)}if(!o?.length&&!u)throw new h.Z(Bt,"'objectIds' or 'where' are required to perform attachment query",e);if(!r.queryAttachments)throw new h.Z(Bt,"Layer source does not support queryAttachments capability",e);return r.queryAttachments(e)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(Zt.Z.from(e)??r.createQuery(),t);if(i?.features)for(const e of i.features)e.layer=e.sourceLayer=r;return i}async queryObjectIds(e,t){const{source:r}=await this.load();if(!r.queryObjectIds)throw new h.Z(Bt,"Layer source does not support queryObjectIds capability");return r.queryObjectIds(Zt.Z.from(e)??this.createQuery(),t)}async queryFeatureCount(e,t){const{source:r}=await this.load();if(!r.queryFeatureCount)throw new h.Z(Bt,"Layer source does not support queryFeatureCount capability");return r.queryFeatureCount(Zt.Z.from(e)??this.createQuery(),t)}async queryExtent(e,t){const{source:r}=await this.load();if(!r.queryExtent)throw new h.Z(Bt,"Layer source does not support queryExtent capability");return r.queryExtent(Zt.Z.from(e)??this.createQuery(),t)}async queryRelatedFeatures(e,t){const{source:r}=await this.load();if(!r.queryRelatedFeatures)throw new h.Z(Bt,"Layer source does not support queryRelatedFeatures capability");return r.queryRelatedFeatures(Pt.Z.from(e),t)}async queryRelatedFeaturesCount(e,t){const{source:r}=await this.load();if(!r.queryRelatedFeaturesCount)throw new h.Z(Bt,"Layer source does not support queryRelatedFeaturesCount capability");return r.queryRelatedFeaturesCount(Pt.Z.from(e),t)}async queryTopFeatures(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopFeatures||!i?.query?.supportsTopFeaturesQuery)throw new h.Z(Bt,"Layer source does not support queryTopFeatures capability");const s=await r.queryTopFeatures(Gt.Z.from(e),t);if(s?.features)for(const e of s.features)e.layer=e.sourceLayer=this;return s}async queryTopObjectIds(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopObjectIds||!i?.query.supportsTopFeaturesQuery)throw new h.Z(Bt,"Layer source does not support queryTopObjectIds capability");return r.queryTopObjectIds(Gt.Z.from(e),t)}async queryTopFeaturesExtent(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopExtents||!i?.query?.supportsTopFeaturesQuery)throw new h.Z(Bt,"Layer source does not support queryTopExtents capability");return r.queryTopExtents(Gt.Z.from(e),t)}async queryTopFeatureCount(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopCount||!i?.query?.supportsTopFeaturesQuery)throw new h.Z(Bt,"Layer source does not support queryFeatureCount capability");return r.queryTopCount(Gt.Z.from(e),t)}read(e,t){const r=e.featureCollection;if(r){const e=r.layers;e&&1===e.length&&(super.read(e[0],t),null!=r.showLegend&&super.read({showLegend:r.showLegend},t))}super.read(e,t),t&&"service"===t.origin&&this.revert(["objectIdField","fields","timeInfo","spatialReference"],"service")}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};const{origin:r,layerContainerType:i,messages:s}=t;if(this.dynamicDataSource)return s?.push(zt(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==i)return s?.push(zt(this,"using a table source cannot be written to web scenes and web maps")),null;if(this._hasMemorySource())return s?.push(zt(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===i)return s?.push(zt(this,"using a non-table source cannot be written to tables in web maps")),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new h.Z(Bt,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||(0,qt.D)(this,e))}async save(e){return(await Promise.all([r.e(4547),r.e(2664)]).then(r.bind(r,32664))).save(this,e)}async saveAs(e,t){return(await Promise.all([r.e(4547),r.e(2664)]).then(r.bind(r,32664))).saveAs(this,e,t)}_readEditingEnabled(e,t,r){let i=e.layerDefinition?.capabilities;return i?this._hasEditingCapability(i):(i=e.capabilities,t&&"web-map"===r?.origin&&!this._hasMemorySource()&&i?this._hasEditingCapability(i):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map((e=>e.trim())).includes("editing")}_writeEditingEnabled(e,t,r,i){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";(0,C.RB)("layerDefinition.capabilities",e,t),r&&!i?.writeLayerSchema&&(t.capabilities=e)}}_checkAttachmentSupport(e){const{attributes:t}=e,{objectIdField:r}=this;return this.get("capabilities.data.supportsAttachment")?e?t?r&&t[r]?Promise.resolve():Promise.reject(new h.Z(Bt,`feature is missing the identifying attribute ${r}`)):Promise.reject(new h.Z(Bt,"'attributes' are required on a feature to query attachments")):Promise.reject(new h.Z(Bt,"A feature is required to add/delete/update attachments")):Promise.reject(new h.Z(Bt,"this layer doesn't support attachments"))}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}_fetchFirstLayerId(e){return(0,u.default)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then((e=>{const t=e.data;if(t)return Array.isArray(t.layers)&&t.layers.length>0?t.layers[0].id:Array.isArray(t.tables)&&t.tables.length>0?t.tables[0].id:void 0}))}async _initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",url:this.parsedUrl})),this._verifySource(),this._verifyFields(),(0,_t.YN)(this.renderer,this.fieldsIndex),(0,_t.UF)(this.timeInfo,this.fieldsIndex),(0,At.y)(this,{origin:"service"})}async hasDataChanged(){if(this.source?.refresh)try{const{dataChanged:e,updates:t}=await(this.source?.refresh());if((0,v.pC)(t)&&(this.sourceJSON={...this.sourceJSON,...t},this.read(t,{origin:"service",url:this.parsedUrl})),e)return!0}catch{}if(this.definitionExpression)try{return(await(0,I.E)(this.definitionExpression,this.fieldsIndex)).hasDateFunctions}catch{}return!1}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach((e=>{const r=e.prototype&&e.prototype.attributes;r&&t&&delete r[t]}))}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new h.Z("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new h.Z("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach((e=>{e.layer=this,e.sourceLayer=this})),this._handles.add([e.on("after-add",(e=>{e.item.layer=this,e.item.sourceLayer=this})),e.on("after-remove",(e=>{e.item.layer=null,e.item.sourceLayer=null}))],"fl-source")}_resetMemorySource(e){e.forEach((e=>{e.layer=null,e.sourceLayer=null})),this._handles.remove("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}_readAnalyticsCapabilities(e){return{supportsCacheHint:Xt(e.advancedQueryCapabilities,"queryAnalytics")}}_readAttachmentCapabilities(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:Xt(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:Ht(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=kt[e.name];t&&(r[t]=!!e.isEnabled)})),r}_readDataCapabilities(e){return{isVersioned:Ht(e,"isDataVersioned",!1),supportsAttachment:Ht(e,"hasAttachments",!1),supportsM:Ht(e,"hasM",!1),supportsZ:Ht(e,"hasZ",!1)}}_readMetadataCapabilities(e){return{supportsAdvancedFieldProperties:Ht(e,"supportsFieldDescriptionProperty",!1)}}_readOperationsCapabilities(e,t){const r=e?e.toLowerCase().split(",").map((e=>e.trim())):[],i=this.url?(0,ht.Qc)(this.url):null,s=r.includes((0,v.pC)(i)&&"MapServer"===i.serverType?"data":"query"),o=r.includes("editing")&&!t.datesInUnknownTimezone;let n=o&&r.includes("create"),a=o&&r.includes("delete"),l=o&&r.includes("update");const p=r.includes("changetracking"),u=t.advancedQueryCapabilities;return o&&!(n||a||l)&&(n=a=l=!0),{supportsCalculate:Ht(t,"supportsCalculate",!1),supportsTruncate:Ht(t,"supportsTruncate",!1),supportsValidateSql:Ht(t,"supportsValidateSql",!1),supportsAdd:n,supportsDelete:a,supportsEditing:o,supportsChangeTracking:p,supportsQuery:s,supportsQueryAnalytics:Ht(u,"supportsQueryAnalytic",!1),supportsQueryAttachments:Ht(u,"supportsQueryAttachments",!1),supportsQueryTopFeatures:Ht(u,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:Ht(t,"supportsAttachmentsResizing",!1),supportsSync:r.includes("sync"),supportsUpdate:l,supportsExceedsLimitStatistics:Ht(t,"supportsExceedsLimitStatistics",!1)}}_readQueryCapabilities(e){const t=e.advancedQueryCapabilities,r=e.ownershipBasedAccessControlForFeatures,i=e.archivingInfo,s=this.url?.includes("MapServer"),o=!(0,b.Z)("mapserver-pbf-enabled")&&s&&(this.version??0)<10.81,n=(0,ht.M8)(this.url),a=(e.supportedQueryFormats||"").split(",").reduce(((e,t)=>{const r=t.toLowerCase().trim();return r&&e.add(r),e}),new Set);return{supportsStatistics:Ht(t,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:Ht(t,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:Ht(t,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:Kt(t),supportsCentroid:Ht(t,"supportsReturningGeometryCentroid",!1),supportsDistance:Ht(t,"supportsQueryWithDistance",!1),supportsDistinct:Ht(t,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:Ht(t,"supportsReturningQueryExtent",!1),supportsGeometryProperties:Ht(t,"supportsReturningGeometryProperties",!1),supportsHavingClause:Ht(t,"supportsHavingClause",!1),supportsOrderBy:Ht(t,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:Ht(t,"supportsPagination",!1),supportsQuantization:Ht(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:Ht(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:Ht(e,"supportsReturningQueryGeometry",!1),supportsResultType:Ht(t,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:Ht(t,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:Ht(t,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:Ht(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:Ht(t,"supportsTopFeaturesQuery",!1),supportsQueryByOthers:Ht(r,"allowOthersToQuery",!0),supportsHistoricMoment:Ht(i,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:!o&&a.has("pbf"),supportsDisjointSpatialRelationship:Ht(t,"supportsDisjointSpatialRel",!1),supportsCacheHint:Ht(t,"supportsQueryWithCacheHint",!1)||Xt(t,"query"),supportsDefaultSpatialReference:Ht(t,"supportsDefaultSR",!1),supportsCompactGeometry:n,maxRecordCountFactor:$t(e,"maxRecordCountFactor",void 0),maxRecordCount:$t(e,"maxRecordCount",void 0),standardMaxRecordCount:$t(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:$t(e,"tileMaxRecordCount",void 0)}}_readQueryRelatedCapabilities(e){const t=e.advancedQueryCapabilities,r=Ht(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:Ht(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:Xt(t,"queryRelated")}}_readQueryTopFeaturesCapabilities(e){return{supportsCacheHint:Xt(e.advancedQueryCapabilities,"queryTopFilter")}}_readEditingCapabilities(e){const t=e.ownershipBasedAccessControlForFeatures;return{supportsGeometryUpdate:Ht(e,"allowGeometryUpdates",!0),supportsGlobalId:Ht(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:Ht(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:Ht(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:Ht(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:Ht(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:Ht(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:Ht(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:Ht(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:Ht(t,"allowOthersToUpdate",!0)}}};(0,s._)([(0,x.Cb)({readOnly:!0,json:{read:!1}})],tr.prototype,"capabilities",void 0),(0,s._)([(0,E.r)("service","capabilities",["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","maxRecordCount","maxRecordCountFactor","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"])],tr.prototype,"readCapabilities",null),(0,s._)([(0,x.Cb)({json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],tr.prototype,"charts",void 0),(0,s._)([(0,x.Cb)({readOnly:!0})],tr.prototype,"createQueryVersion",null),(0,s._)([(0,x.Cb)({type:String,json:{read:{source:"layerDefinition.copyrightText"},origins:{service:{read:{source:"copyrightText"}}}}})],tr.prototype,"copyright",void 0),(0,s._)([(0,x.Cb)({type:Boolean})],tr.prototype,"datesInUnknownTimezone",void 0),(0,s._)([(0,x.Cb)({type:String,json:{read:{source:"layerDefinition.displayField"},origins:{service:{read:{source:"displayField"}}}}})],tr.prototype,"displayField",void 0),(0,s._)([(0,x.Cb)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],tr.prototype,"definitionExpression",void 0),(0,s._)([(0,x.Cb)({types:d.LB,readOnly:!0})],tr.prototype,"defaultSymbol",void 0),(0,s._)([(0,x.Cb)({type:Dt.n})],tr.prototype,"dynamicDataSource",void 0),(0,s._)([(0,x.Cb)({readOnly:!0})],tr.prototype,"editFieldsInfo",void 0),(0,s._)([(0,x.Cb)({type:Boolean})],tr.prototype,"editingEnabled",null),(0,s._)([(0,E.r)(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],tr.prototype,"readEditingEnabled",null),(0,s._)([(0,E.r)("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],tr.prototype,"readEditingEnabledFromWebMap",null),(0,s._)([(0,O.c)(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],tr.prototype,"writeEditingEnabled",null),(0,s._)([(0,O.c)("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],tr.prototype,"writeEditingEnabledToWebMap",null),(0,s._)([(0,x.Cb)({readOnly:!0})],tr.prototype,"editingInfo",void 0),(0,s._)([(0,E.r)("editingInfo")],tr.prototype,"readEditingInfo",null),(0,s._)([(0,x.Cb)((()=>{const e=(0,g.d9)(mt.PV),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],tr.prototype,"elevationInfo",void 0),(0,s._)([(0,x.Cb)(ft.d)],tr.prototype,"featureReduction",void 0),(0,s._)([(0,x.Cb)({...Yt.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:er}}}}})],tr.prototype,"fields",void 0),(0,s._)([(0,x.Cb)(Yt.fieldsIndex)],tr.prototype,"fieldsIndex",void 0),(0,s._)([(0,x.Cb)({type:jt.Z,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],tr.prototype,"floorInfo",void 0),(0,s._)([(0,x.Cb)({type:Ae,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],tr.prototype,"formTemplate",void 0),(0,s._)([(0,x.Cb)({type:Le.Z,json:{origins:{service:{read:{source:"extent"}}},read:{source:"layerDefinition.extent"}}})],tr.prototype,"fullExtent",void 0),(0,s._)([(0,x.Cb)()],tr.prototype,"gdbVersion",void 0),(0,s._)([(0,x.Cb)({readOnly:!0,type:It,json:{read:{source:"geometryProperties"}}})],tr.prototype,"geometryFieldsInfo",void 0),(0,s._)([(0,x.Cb)({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:Vt.read},"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:er,writer(e,t,r){const i=e?Vt.toJSON(e):null;i&&(0,C.RB)(r,i,t)}}}},read:{source:"layerDefinition.geometryType",reader:Vt.read}}})],tr.prototype,"geometryType",void 0),(0,s._)([(0,x.Cb)({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasM"}}})],tr.prototype,"hasM",void 0),(0,s._)([(0,x.Cb)({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasZ"}}})],tr.prototype,"hasZ",void 0),(0,s._)([(0,x.Cb)({readOnly:!0,type:Ze.Z})],tr.prototype,"heightModelInfo",void 0),(0,s._)([(0,x.Cb)({type:Date})],tr.prototype,"historicMoment",void 0),(0,s._)([(0,x.Cb)(mt.id)],tr.prototype,"id",void 0),(0,s._)([(0,x.Cb)({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],tr.prototype,"infoFor3D",void 0),(0,s._)([(0,x.Cb)({readOnly:!0,json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],tr.prototype,"isTable",void 0),(0,s._)([(0,E.r)("service","isTable",["type","geometryType"]),(0,E.r)("isTable",["layerDefinition.type","layerDefinition.geometryType"])],tr.prototype,"readIsTable",null),(0,s._)([(0,O.c)("web-map","isTable")],tr.prototype,"writeIsTable",null),(0,s._)([(0,x.Cb)(mt.iR)],tr.prototype,"labelsVisible",void 0),(0,s._)([(0,x.Cb)({type:[Ft.Z],json:{origins:{service:{read:{source:"drawingInfo.labelingInfo",reader:xt.r},write:{target:"drawingInfo.labelingInfo",enabled:!1}}},read:{source:"layerDefinition.drawingInfo.labelingInfo",reader:xt.r},write:{target:"layerDefinition.drawingInfo.labelingInfo"}}})],tr.prototype,"labelingInfo",void 0),(0,s._)([(0,x.Cb)((()=>{const e=(0,g.d9)(mt.bT);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,t,r){(0,C.RB)(r,(0,Nt.a)(e),t)}}},e})())],tr.prototype,"opacity",void 0),(0,s._)([(0,x.Cb)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],tr.prototype,"layerId",void 0),(0,s._)([(0,x.Cb)(mt.rn)],tr.prototype,"legendEnabled",void 0),(0,s._)([(0,x.Cb)({type:["show","hide"],json:(()=>{const e=(0,g.d9)(mt.rT.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],tr.prototype,"listMode",void 0),(0,s._)([(0,x.Cb)(mt.rO)],tr.prototype,"minScale",void 0),(0,s._)([(0,E.r)("service","minScale",["minScale","effectiveMinScale"])],tr.prototype,"readMinScale",null),(0,s._)([(0,x.Cb)(mt.u1)],tr.prototype,"maxScale",void 0),(0,s._)([(0,E.r)("service","maxScale",["maxScale","effectiveMaxScale"])],tr.prototype,"readMaxScale",null),(0,s._)([(0,x.Cb)({type:String})],tr.prototype,"globalIdField",void 0),(0,s._)([(0,E.r)("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"]),(0,E.r)("service","globalIdField",["globalIdField","fields"])],tr.prototype,"readGlobalIdFieldFromService",null),(0,s._)([(0,x.Cb)({type:String,json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:er}}}}})],tr.prototype,"objectIdField",void 0),(0,s._)([(0,E.r)("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"]),(0,E.r)("service","objectIdField",["objectIdField","fields"])],tr.prototype,"readObjectIdFieldFromService",null),(0,s._)([(0,x.Cb)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],tr.prototype,"operationalLayerType",void 0),(0,s._)([(0,x.Cb)(Yt.outFields)],tr.prototype,"outFields",void 0),(0,s._)([(0,x.Cb)({readOnly:!0})],tr.prototype,"parsedUrl",null),(0,s._)([(0,x.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],tr.prototype,"path",void 0),(0,s._)([(0,x.Cb)(mt.C_)],tr.prototype,"popupEnabled",void 0),(0,s._)([(0,x.Cb)({type:o.Z,json:{name:"popupInfo",write:!0}})],tr.prototype,"popupTemplate",void 0),(0,s._)([(0,x.Cb)({readOnly:!0})],tr.prototype,"defaultPopupTemplate",null),(0,s._)([(0,x.Cb)({type:[Rt],readOnly:!0})],tr.prototype,"relationships",void 0),(0,s._)([(0,x.Cb)({types:p.A,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:p.o,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema})}}})],tr.prototype,"renderer",null),(0,s._)([(0,E.r)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),(0,E.r)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],tr.prototype,"readRenderer",null),(0,s._)([(0,x.Cb)()],tr.prototype,"sourceJSON",void 0),(0,s._)([(0,x.Cb)({type:Boolean})],tr.prototype,"returnM",void 0),(0,s._)([(0,x.Cb)({type:Boolean})],tr.prototype,"returnZ",void 0),(0,s._)([(0,x.Cb)((()=>{const e=(0,g.d9)(mt.YI);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],tr.prototype,"screenSizePerspectiveEnabled",void 0),(0,s._)([(0,x.Cb)({clonable:!1})],tr.prototype,"source",null),(0,s._)([(0,j.p)("source")],tr.prototype,"castSource",null),(0,s._)([(0,E.r)("portal-item","source",["featureSet"]),(0,E.r)("web-map","source",["featureSet"])],tr.prototype,"readSource",null),(0,s._)([(0,x.Cb)({readOnly:!0})],tr.prototype,"serviceDefinitionExpression",void 0),(0,s._)([(0,E.r)("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],tr.prototype,"readServiceDefinitionExpression",null),(0,s._)([(0,x.Cb)({type:Pe.Z,json:{origins:{service:{read:{source:"extent.spatialReference"}}},read:{source:"layerDefinition.extent.spatialReference"}}})],tr.prototype,"spatialReference",void 0),(0,s._)([(0,x.Cb)({type:Number})],tr.prototype,"subtypeCode",void 0),(0,s._)([(0,x.Cb)({type:String,json:{origins:{service:{read:!0}}}})],tr.prototype,"subtypeField",void 0),(0,s._)([(0,x.Cb)({type:[gt.Z]})],tr.prototype,"templates",void 0),(0,s._)([(0,E.r)("templates",["editFieldsInfo","creatorField","editorField","templates"])],tr.prototype,"readTemplates",null),(0,s._)([(0,x.Cb)({type:Mt.Z})],tr.prototype,"timeInfo",void 0),(0,s._)([(0,x.Cb)()],tr.prototype,"title",void 0),(0,s._)([(0,E.r)("service","title",["name"]),(0,E.r)("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],tr.prototype,"readTitle",null),(0,s._)([(0,E.r)("web-map","title",["layerDefinition.name","title"])],tr.prototype,"readTitleFromWebMap",null),(0,s._)([(0,x.Cb)({type:String})],tr.prototype,"sublayerTitleMode",void 0),(0,s._)([(0,x.Cb)({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],tr.prototype,"trackIdField",void 0),(0,s._)([(0,x.Cb)({json:{read:!1}})],tr.prototype,"type",void 0),(0,s._)([(0,x.Cb)({type:String})],tr.prototype,"typeIdField",void 0),(0,s._)([(0,E.r)("service","typeIdField"),(0,E.r)("typeIdField",["layerDefinition.typeIdField"])],tr.prototype,"readTypeIdField",null),(0,s._)([(0,x.Cb)({type:[wt.Z]})],tr.prototype,"types",void 0),(0,s._)([(0,E.r)("service","types",["types"]),(0,E.r)("types",["layerDefinition.types"])],tr.prototype,"readTypes",null),(0,s._)([(0,x.Cb)({readOnly:!0,json:{write:!1}})],tr.prototype,"serverGens",void 0),(0,s._)([(0,x.Cb)({type:y.Z.ofType(bt),readOnly:!0})],tr.prototype,"indexes",void 0),(0,s._)([(0,x.Cb)(mt.HQ)],tr.prototype,"url",null),(0,s._)([(0,O.c)("url")],tr.prototype,"writeUrl",null),(0,s._)([(0,x.Cb)({readOnly:!0})],tr.prototype,"userIsAdmin",void 0),(0,s._)([(0,x.Cb)({json:{origins:{service:{read:!0}},read:!1}})],tr.prototype,"version",void 0),(0,s._)([(0,E.r)("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],tr.prototype,"readVersion",null),(0,s._)([(0,x.Cb)({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],tr.prototype,"visible",void 0),(0,s._)([(0,E.r)("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],tr.prototype,"readVisible",null),tr=(0,s._)([(0,T.j)(Ut)],tr);const rr=(0,R.d)({types:d.QT}),ir=tr},66361:(e,t,r)=>{r.d(t,{dU:()=>a,lQ:()=>p,o1:()=>u});var i=r(43697),s=r(32448),o=r(22974),n=(r(92604),r(75215),r(20102),r(80442),r(52011));const a=new s.Z.EventEmitter,l=Symbol("EditBusLayer");function p(e){return e&&"object"==typeof e&&l in e}const u=e=>{var t;let r=class extends e{constructor(...e){super(...e),this[t]=!0,this.when().then((()=>{this.own([a.on("edits",(e=>{const t="layer"in e?e.layer:null,r="layer"in e?e.layer.url:e.serviceUrl,i="layer"in e?e.layer.layerId:e.layerId,s=e.event;if(t===this||r!==this.url)return;if(null!=i&&null!=this.layerId&&i===this.layerId)return void this.emit("edits",(0,o.d9)(s));const n=s.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(n){const{adds:e,updates:t,deletes:r}=n.editedFeatures,i={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:e.map((({attributes:e})=>({objectId:e[this.objectIdField],globalId:e[this.globalIdField]}))),deletedFeatures:r.map((({attributes:e})=>({objectId:e[this.objectIdField],globalId:e[this.globalIdField]}))),updatedFeatures:t.map((({current:{attributes:e}})=>({objectId:e[this.objectIdField],globalId:e[this.globalIdField]}))),editedFeatures:(0,o.d9)(s.editedFeatures)};this.emit("edits",i)}}))])}),(()=>{}))}};return t=l,r=(0,i._)([(0,n.j)("esri.layers.mixins.EditBusLayer")],r),r}},68825:(e,t,r)=>{r.d(t,{c:()=>m});var i,s=r(43697),o=r(78286),n=r(5600),a=(r(67676),r(80442),r(75215),r(52011)),l=r(35454),p=r(96674);const u=new l.X({asc:"ascending",desc:"descending"});let d=i=class extends p.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],d.prototype,"field",void 0),(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],d.prototype,"valueExpression",void 0),(0,s._)([(0,n.Cb)({type:u.apiValues,json:{read:u.read,write:u.write}})],d.prototype,"order",void 0),d=i=(0,s._)([(0,a.j)("esri.layers.support.OrderByInfo")],d);const c=d;function y(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const s=new c;return s.read(i,r),[s]}function h(e,t,r,i){const s=e.find((e=>!!e.field));s&&(0,o.RB)(r,[s.toJSON()],t)}const m=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,n.Cb)({type:[c],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:y},write:{target:"layerDefinition.orderBy",writer:h}}})],t.prototype,"orderBy",void 0),t=(0,s._)([(0,a.j)("esri.layers.mixins.OrderedLayer")],t),t}},40555:(e,t,r)=>{r.d(t,{y:()=>n});var i=r(66643),s=r(95330),o=r(20941);async function n(e,t,r){const n=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(n&&"unique-value"===n.type&&n.styleOrigin){const a=await(0,i.q6)(n.populateFromStyle());if((0,s.k_)(r),!1===a.ok){const r=a.error;t&&t.messages&&t.messages.push(new o.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t.origin)}}}},59431:(e,t,r)=>{r.d(t,{P:()=>a});var i=r(70586),s=r(67900),o=r(8744);function n(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function a(e,t,r){if(!e&&!t||!r)return;const i=(0,s._R)(r);l(e,r,i),l(t,r,i)}function l(e,t,r){if(e)for(const i of e)p(i.geometry,t,r)}function p(e,t,r){if((0,i.Wi)(e)||!e.spatialReference||(0,o.fS)(e.spatialReference,t))return;const a=(0,s._R)(e.spatialReference)/r;if(1!==a)if("x"in e)null!=e.z&&(e.z*=a);else if("rings"in e)n(e,e.rings,a);else if("paths"in e)n(e,e.paths,a);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=a)}}}]);
|