@arcgis/core 4.28.8 → 4.28.10
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 +14 -108
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/332f807c109f3c566316.js +1 -0
- package/assets/esri/core/workers/chunks/3b44696ed6608cfdef34.js +1 -0
- package/assets/esri/core/workers/chunks/5b416d7ef5f3f57b052c.js +1 -0
- package/assets/esri/core/workers/chunks/7e79ffd645f94ebf07a7.js +1 -0
- package/assets/esri/core/workers/chunks/{df7267892b6e0493e1d7.js → 95ce288362649909ffe6.js} +1 -1
- package/assets/esri/core/workers/chunks/a48cb80b8f10522ccba4.js +1 -0
- package/assets/esri/core/workers/chunks/aa3bb965d4495ee3dfe0.js +1 -0
- package/assets/esri/core/workers/chunks/afc396fd3afbebd39a93.js +1 -0
- package/assets/esri/core/workers/chunks/{9979ff59a144fe1df80b.js → b2eb4308afc34e3e0acb.js} +1 -1
- package/assets/esri/core/workers/chunks/b4bbace5b409b804a52f.js +1 -0
- package/assets/esri/core/workers/chunks/b5b04f8380197abb50ab.js +1 -0
- package/assets/esri/core/workers/chunks/{c3b8b40115be5a2b960e.js → c6d1a6db8cfa0a7e3bd2.js} +1 -1
- package/assets/esri/core/workers/chunks/d5e6676cd2de77527c92.js +1 -0
- package/assets/esri/core/workers/chunks/d8482a5aa176426352bf.js +1 -0
- package/assets/esri/core/workers/chunks/ead02c933d1af20cbaa0.js +1 -0
- package/assets/esri/core/workers/chunks/f1152b991c33d8c94219.js +1 -0
- package/assets/esri/core/workers/chunks/faa2da66e9934f7fee04.js +1 -0
- package/core/uuid.js +1 -1
- package/interfaces.d.ts +13 -7
- package/kernel.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/versionManagement/support/versionManagementUtils.js +1 -1
- package/views/3d/layers/VoxelWasm.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/assets/esri/core/workers/chunks/175bbe8a048f17dd482b.js +0 -1
- package/assets/esri/core/workers/chunks/19c9966f74d287750aaa.js +0 -1
- package/assets/esri/core/workers/chunks/30776102fbab294bfe7b.js +0 -1
- package/assets/esri/core/workers/chunks/30d3b31df52d40e5b2e6.js +0 -1
- package/assets/esri/core/workers/chunks/4564a7885d045a850887.js +0 -1
- package/assets/esri/core/workers/chunks/4bd342f13002888b6467.js +0 -1
- package/assets/esri/core/workers/chunks/633b34a5817f1f719e22.js +0 -1
- package/assets/esri/core/workers/chunks/70eba80261d7fdc624ad.js +0 -1
- package/assets/esri/core/workers/chunks/9ef3746c545296565ef6.js +0 -1
- package/assets/esri/core/workers/chunks/a3bbf5da4f7830d2a2a1.js +0 -1
- package/assets/esri/core/workers/chunks/a47f74fc959b11f029a5.js +0 -1
- package/assets/esri/core/workers/chunks/bdc751a752a7ff1387de.js +0 -1
- package/assets/esri/core/workers/chunks/c3ddf5dbc34f118002df.js +0 -1
- package/assets/esri/core/workers/chunks/f85107720159b855a469.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4723],{84552:(e,t,i)=>{i.d(t,{Z:()=>c});var r=i(43697),o=i(2368),n=i(96674),s=i(35463),l=i(5600),p=(i(75215),i(67676),i(80442),i(36030)),a=i(52011),d=i(78981);let u=class extends((0,o.J)(n.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.rJ)(this.value,this.unit,"milliseconds")}};(0,r._)([(0,p.J)(d.v,{nonNullable:!0})],u.prototype,"unit",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0},nonNullable:!0})],u.prototype,"value",void 0),u=(0,r._)([(0,a.j)("esri.TimeInterval")],u);const c=u},41123:(e,t,i)=>{i.d(t,{DO:()=>o,dG:()=>s,zS:()=>n});const r="randomUUID"in crypto;function o(){if(r)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${o().toUpperCase()}}`}function s(){return`{${o()}}`}},90100:(e,t,i)=>{i.d(t,{Z:()=>Ue});var r,o=i(43697),n=i(96674),s=i(22974),l=i(5600),p=i(90578),a=i(71715),d=i(52011),u=i(30556),c=i(75215);i(67676),i(80442);let y=r=class extends n.wq{constructor(e){super(e),this.expression=null,this.name=null,this.returnType="boolean",this.title=null}clone(){return new r({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"expression",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,o._)([(0,l.Cb)({type:["boolean","date","number","string"],json:{write:!0}})],y.prototype,"returnType",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"title",void 0),y=r=(0,o._)([(0,d.j)("esri.form.ExpressionInfo")],y);const h=y;let m=class extends n.wq{constructor(e){super(e),this.description=null,this.label=null,this.type=null,this.visibilityExpression=null}};(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],m.prototype,"description",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],m.prototype,"label",void 0),(0,o._)([(0,l.Cb)()],m.prototype,"type",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],m.prototype,"visibilityExpression",void 0),m=(0,o._)([(0,d.j)("esri.form.elements.Element")],m);const b=m;var v;let f=v=class extends n.wq{constructor(e){super(e),this.type=null}clone(){return new v({type:this.type})}};(0,o._)([(0,l.Cb)({type:["attachment","audio","document","image","signature","video"],json:{write:!0}})],f.prototype,"type",void 0),f=v=(0,o._)([(0,d.j)("esri.form.elements.inputs.AttachmentInput")],f);const w=f;var g;let _=g=class extends b{constructor(e){super(e),this.attachmentKeyword=null,this.editableExpression=null,this.input=null,this.type="attachment"}clone(){return new g({attachmentKeyword:this.attachmentKeyword,description:this.description,editableExpression:this.editableExpression,input:this.input,label:this.label,visibilityExpression:this.visibilityExpression})}};(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],_.prototype,"attachmentKeyword",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],_.prototype,"editableExpression",void 0),(0,o._)([(0,l.Cb)({type:w,json:{read:{source:"inputType"},write:{target:"inputType"}}})],_.prototype,"input",void 0),(0,o._)([(0,l.Cb)({type:["attachment"],json:{read:!1,write:!0}})],_.prototype,"type",void 0),_=g=(0,o._)([(0,d.j)("esri.form.elements.AttachmentElement")],_);const x=_;var C=i(60235),j=i(92604);let S=class extends n.wq{constructor(e){super(e),this.type=null}};(0,o._)([(0,l.Cb)()],S.prototype,"type",void 0),S=(0,o._)([(0,d.j)("esri.form.elements.inputs.Input")],S);const I=S;let F=class extends I{constructor(e){super(e),this.maxLength=null,this.minLength=0}};(0,o._)([(0,l.Cb)({type:Number,json:{write:!0}})],F.prototype,"maxLength",void 0),(0,o._)([(0,l.Cb)({type:Number,json:{write:!0}})],F.prototype,"minLength",void 0),F=(0,o._)([(0,d.j)("esri.form.elements.inputs.TextInput")],F);const E=F;var T;let M=T=class extends E{constructor(e){super(e),this.type="barcode-scanner"}clone(){return new T({maxLength:this.maxLength,minLength:this.minLength})}};(0,o._)([(0,l.Cb)({type:["barcode-scanner"],json:{read:!1,write:!0}})],M.prototype,"type",void 0),M=T=(0,o._)([(0,d.j)("esri.form.elements.inputs.BarcodeScannerInput")],M);const O=M;var R;let U=R=class extends I{constructor(e){super(e),this.noValueOptionLabel=null,this.showNoValueOption=!0,this.type="combo-box"}clone(){return new R({showNoValueOption:this.showNoValueOption,noValueOptionLabel:this.noValueOptionLabel})}};(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],U.prototype,"noValueOptionLabel",void 0),(0,o._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],U.prototype,"showNoValueOption",void 0),(0,o._)([(0,l.Cb)({type:["combo-box"],json:{read:!1,write:!0}})],U.prototype,"type",void 0),U=R=(0,o._)([(0,d.j)("esri.form.elements.inputs.ComboBoxInput")],U);const V=U;var k;function D(e){return null!=e?e:null}function N(e){return null!=e?e:null}let A=k=class extends I{constructor(e){super(e),this.max=null,this.min=null,this.type="date-picker"}readMax(e,t){return D(t.max)}writeMax(e,t){t.max=N(e)}readMin(e,t){return D(t.min)}writeMin(e,t){t.min=N(e)}clone(){return new k({max:this.max,min:this.min})}};(0,o._)([(0,l.Cb)({type:String,json:{type:String,write:!0}})],A.prototype,"max",void 0),(0,o._)([(0,a.r)("max")],A.prototype,"readMax",null),(0,o._)([(0,u.c)("max")],A.prototype,"writeMax",null),(0,o._)([(0,l.Cb)({type:String,json:{type:String,write:!0}})],A.prototype,"min",void 0),(0,o._)([(0,a.r)("min")],A.prototype,"readMin",null),(0,o._)([(0,u.c)("min")],A.prototype,"writeMin",null),(0,o._)([(0,l.Cb)({type:["date-picker"],json:{read:!1,write:!0}})],A.prototype,"type",void 0),A=k=(0,o._)([(0,d.j)("esri.form.elements.inputs.DatePickerInput")],A);const Z=A;var B;function L(e){return null!=e?e:null}function H(e){return null!=e?e:null}let J=B=class extends I{constructor(e){super(e),this.includeTimeOffset=!0,this.max=null,this.min=null,this.timeResolution="minutes",this.type="datetimeoffset-picker"}readMax(e,t){return L(t.max)}writeMax(e,t){t.max=H(e)}readMin(e,t){return L(t.min)}writeMin(e,t){t.min=H(e)}readTimeResolution(e,t){return L(t.timeResolution)}writeTimeResolution(e,t){t.timeResolution=H(e)}clone(){return new B({includeTimeOffset:this.includeTimeOffset,max:this.max,min:this.min,timeResolution:this.timeResolution})}};(0,o._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],J.prototype,"includeTimeOffset",void 0),(0,o._)([(0,l.Cb)({type:String,json:{type:String,write:!0}})],J.prototype,"max",void 0),(0,o._)([(0,a.r)("max")],J.prototype,"readMax",null),(0,o._)([(0,u.c)("max")],J.prototype,"writeMax",null),(0,o._)([(0,l.Cb)({type:String,json:{type:String,write:!0}})],J.prototype,"min",void 0),(0,o._)([(0,a.r)("min")],J.prototype,"readMin",null),(0,o._)([(0,u.c)("min")],J.prototype,"writeMin",null),(0,o._)([(0,l.Cb)({type:String,json:{type:String,write:!0}})],J.prototype,"timeResolution",void 0),(0,o._)([(0,a.r)("timeResolution")],J.prototype,"readTimeResolution",null),(0,o._)([(0,u.c)("timeResolution")],J.prototype,"writeTimeResolution",null),(0,o._)([(0,l.Cb)({type:["datetimeoffset-picker"],json:{read:!1,write:!0}})],J.prototype,"type",void 0),J=B=(0,o._)([(0,d.j)("esri.form.elements.inputs.DateTimeOffsetPickerInput")],J);const G=J;var q;function W(e){return null!=e?new Date(e):null}function Q(e){return e?e.getTime():null}let P=q=class extends I{constructor(e){super(e),this.includeTime=!1,this.max=null,this.min=null,this.type="datetime-picker"}readMax(e,t){return W(t.max)}writeMax(e,t){t.max=Q(e)}readMin(e,t){return W(t.min)}writeMin(e,t){t.min=Q(e)}clone(){return new q({includeTime:this.includeTime,max:this.max,min:this.min})}};(0,o._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],P.prototype,"includeTime",void 0),(0,o._)([(0,l.Cb)({type:Date,json:{type:Number,write:!0}})],P.prototype,"max",void 0),(0,o._)([(0,a.r)("max")],P.prototype,"readMax",null),(0,o._)([(0,u.c)("max")],P.prototype,"writeMax",null),(0,o._)([(0,l.Cb)({type:Date,json:{type:Number,write:!0}})],P.prototype,"min",void 0),(0,o._)([(0,a.r)("min")],P.prototype,"readMin",null),(0,o._)([(0,u.c)("min")],P.prototype,"writeMin",null),(0,o._)([(0,l.Cb)({type:["datetime-picker"],json:{read:!1,write:!0}})],P.prototype,"type",void 0),P=q=(0,o._)([(0,d.j)("esri.form.elements.inputs.DateTimePickerInput")],P);const z=P;var $;let K=$=class extends I{constructor(e){super(e),this.noValueOptionLabel=null,this.showNoValueOption=!0,this.type="radio-buttons"}clone(){return new $({noValueOptionLabel:this.noValueOptionLabel,showNoValueOption:this.showNoValueOption})}};(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],K.prototype,"noValueOptionLabel",void 0),(0,o._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],K.prototype,"showNoValueOption",void 0),(0,o._)([(0,l.Cb)({type:["radio-buttons"],json:{read:!1,write:!0}})],K.prototype,"type",void 0),K=$=(0,o._)([(0,d.j)("esri.form.elements.inputs.RadioButtonsInput")],K);const X=K;var Y;let ee=Y=class extends I{constructor(e){super(e),this.offValue=null,this.onValue=null,this.type="switch"}clone(){return new Y({offValue:this.offValue,onValue:this.onValue})}};(0,o._)([(0,l.Cb)({type:[String,Number],json:{write:!0}})],ee.prototype,"offValue",void 0),(0,o._)([(0,l.Cb)({type:[String,Number],json:{write:!0}})],ee.prototype,"onValue",void 0),(0,o._)([(0,l.Cb)({type:["switch"],json:{read:!1,write:!0}})],ee.prototype,"type",void 0),ee=Y=(0,o._)([(0,d.j)("esri.form.elements.inputs.SwitchInput")],ee);const te=ee;var ie;let re=ie=class extends E{constructor(e){super(e),this.type="text-area"}clone(){return new ie({maxLength:this.maxLength,minLength:this.minLength})}};(0,o._)([(0,l.Cb)({type:["text-area"],json:{read:!1,write:!0}})],re.prototype,"type",void 0),re=ie=(0,o._)([(0,d.j)("esri.form.elements.inputs.TextAreaInput")],re);const oe=re;var ne;let se=ne=class extends E{constructor(e){super(e),this.type="text-box"}clone(){return new ne({maxLength:this.maxLength,minLength:this.minLength})}};(0,o._)([(0,l.Cb)({type:["text-box"],json:{read:!1,write:!0}})],se.prototype,"type",void 0),se=ne=(0,o._)([(0,d.j)("esri.form.elements.inputs.TextBoxInput")],se);const le=se;var pe;function ae(e){return null!=e?e:null}function de(e){return null!=e?e:null}let ue=pe=class extends I{constructor(e){super(e),this.max=null,this.min=null,this.timeResolution="minutes",this.type="time-picker"}readMax(e,t){return ae(t.max)}writeMax(e,t){t.max=de(e)}readMin(e,t){return ae(t.min)}writeMin(e,t){t.min=de(e)}readTimeResolution(e,t){return ae(t.timeResolution)}writeTimeResolution(e,t){t.timeResolution=de(e)}clone(){return new pe({max:this.max,min:this.min,timeResolution:this.timeResolution})}};(0,o._)([(0,l.Cb)({type:String,json:{type:String,write:!0}})],ue.prototype,"max",void 0),(0,o._)([(0,a.r)("max")],ue.prototype,"readMax",null),(0,o._)([(0,u.c)("max")],ue.prototype,"writeMax",null),(0,o._)([(0,l.Cb)({type:String,json:{type:String,write:!0}})],ue.prototype,"min",void 0),(0,o._)([(0,a.r)("min")],ue.prototype,"readMin",null),(0,o._)([(0,u.c)("min")],ue.prototype,"writeMin",null),(0,o._)([(0,l.Cb)({type:String,json:{type:String,write:!0}})],ue.prototype,"timeResolution",void 0),(0,o._)([(0,a.r)("timeResolution")],ue.prototype,"readTimeResolution",null),(0,o._)([(0,u.c)("timeResolution")],ue.prototype,"writeTimeResolution",null),(0,o._)([(0,l.Cb)({type:["time-picker"],json:{read:!1,write:!0}})],ue.prototype,"type",void 0),ue=pe=(0,o._)([(0,d.j)("esri.form.elements.inputs.TimePickerInput")],ue);const ce={base:I,key:"type",typeMap:{"barcode-scanner":O,"combo-box":V,"date-picker":Z,"datetime-picker":z,"datetimeoffset-picker":G,"radio-buttons":X,switch:te,"text-area":oe,"text-box":le,"time-picker":ue}};var ye,he=i(72729);const me="esri.form.elements.FieldElement",be=j.Z.getLogger(me);let ve=ye=class extends b{constructor(e){super(e),this.domain=null,this.editableExpression=null,this.fieldName=null,this.hint=null,this.input=null,this.requiredExpression=null,this.type="field",this.valueExpression=null}get editable(){return(0,C.Mr)(be,"editable",{replacement:"editableExpression",version:"4.26",warnOnce:!0}),this._get("editable")??!0}set editable(e){(0,C.Mr)(be,"editable",{replacement:"editableExpression",version:"4.26",warnOnce:!0}),this._set("editable",e)}clone(){return new ye({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,o._)([(0,l.Cb)({types:he.V5,json:{read:{reader:he.im},write:!0}})],ve.prototype,"domain",void 0),(0,o._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],ve.prototype,"editable",null),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],ve.prototype,"editableExpression",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],ve.prototype,"fieldName",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],ve.prototype,"hint",void 0),(0,o._)([(0,l.Cb)({types:ce,json:{read:{source:"inputType"},write:{target:"inputType"}}})],ve.prototype,"input",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],ve.prototype,"requiredExpression",void 0),(0,o._)([(0,l.Cb)({type:String,json:{read:!1,write:!0}})],ve.prototype,"type",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],ve.prototype,"valueExpression",void 0),ve=ye=(0,o._)([(0,d.j)(me)],ve);const fe=ve;var we,ge=i(44729);let _e=we=class extends b{constructor(e){super(e),this.displayCount=null,this.displayType="list",this.editableExpression=null,this.orderByFields=null,this.relationshipId=null,this.type="relationship"}clone(){return new we({description:this.description,displayCount:this.displayCount,displayType:this.displayType,editableExpression:this.editableExpression,label:this.label,orderByFields:(0,s.d9)(this.orderByFields),relationshipId:this.relationshipId,visibilityExpression:this.visibilityExpression})}};(0,o._)([(0,l.Cb)({type:Number,json:{write:!0}})],_e.prototype,"displayCount",void 0),(0,o._)([(0,l.Cb)({type:["list"],json:{write:!0}})],_e.prototype,"displayType",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],_e.prototype,"editableExpression",void 0),(0,o._)([(0,l.Cb)({type:[ge.Z],json:{write:!0}})],_e.prototype,"orderByFields",void 0),(0,o._)([(0,l.Cb)({type:Number,json:{write:!0}})],_e.prototype,"relationshipId",void 0),(0,o._)([(0,l.Cb)({type:["relationship"],json:{read:!1,write:!0}})],_e.prototype,"type",void 0),_e=we=(0,o._)([(0,d.j)("esri.form.elements.RelationshipElement")],_e);const xe=_e;function Ce(e){return{typesWithGroup:{base:b,key:"type",typeMap:{attachment:x,field:fe,group:e,relationship:xe}},typesWithoutGroup:{base:b,key:"type",typeMap:{attachment:x,field:fe,relationship:xe}}}}function je(e,t,i=!0){if(!e)return null;const r=i?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter((e=>r[e.type])).map((e=>r[e.type].fromJSON(e)))}function Se(e,t,i=!0){if(!e)return null;const r=i?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter((e=>r[e.type])).map((e=>e.toJSON()))}function Ie(e,t,i=!0){return e?e.map((e=>(0,c.N7)(i?t.typesWithGroup:t.typesWithoutGroup,e))):null}var Fe;let Ee=Fe=class extends b{constructor(e){super(e),this.elements=null,this.initialState="expanded",this.type="group"}castElements(e){return Ie(e,Te,!1)}readElements(e,t){return je(t.formElements,Te,!1)}writeElements(e,t){t.formElements=Se(e,Te,!1)}clone(){return new Fe({description:this.description,elements:(0,s.d9)(this.elements),initialState:this.initialState,label:this.label,visibilityExpression:this.visibilityExpression})}};(0,o._)([(0,l.Cb)({json:{write:!0}})],Ee.prototype,"elements",void 0),(0,o._)([(0,p.p)("elements")],Ee.prototype,"castElements",null),(0,o._)([(0,a.r)("elements",["formElements"])],Ee.prototype,"readElements",null),(0,o._)([(0,u.c)("elements")],Ee.prototype,"writeElements",null),(0,o._)([(0,l.Cb)({type:["collapsed","expanded"],json:{write:!0}})],Ee.prototype,"initialState",void 0),(0,o._)([(0,l.Cb)({type:String,json:{read:!1,write:!0}})],Ee.prototype,"type",void 0),Ee=Fe=(0,o._)([(0,d.j)("esri.form.elements.GroupElement")],Ee);const Te=Ce(Ee);var Me;const Oe=Ce(Ee);let Re=Me=class extends n.wq{constructor(e){super(e),this.description=null,this.elements=null,this.expressionInfos=null,this.preserveFieldValuesWhenHidden=!1,this.title=null}castElements(e){return Ie(e,Oe)}readElements(e,t){return je(t.formElements,Oe)}writeElements(e,t){t.formElements=Se(e,Oe)}clone(){return new Me({description:this.description,expressionInfos:(0,s.d9)(this.expressionInfos),elements:(0,s.d9)(this.elements),title:this.title,preserveFieldValuesWhenHidden:this.preserveFieldValuesWhenHidden})}};(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],Re.prototype,"description",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],Re.prototype,"elements",void 0),(0,o._)([(0,p.p)("elements")],Re.prototype,"castElements",null),(0,o._)([(0,a.r)("elements",["formElements"])],Re.prototype,"readElements",null),(0,o._)([(0,u.c)("elements")],Re.prototype,"writeElements",null),(0,o._)([(0,l.Cb)({type:[h],json:{write:!0}})],Re.prototype,"expressionInfos",void 0),(0,o._)([(0,l.Cb)({type:Boolean,json:{default:!1,write:!0}})],Re.prototype,"preserveFieldValuesWhenHidden",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],Re.prototype,"title",void 0),Re=Me=(0,o._)([(0,d.j)("esri.form.FormTemplate")],Re);const Ue=Re},79235:(e,t,i)=>{i.d(t,{Z:()=>w});var r,o=i(43697),n=i(67676),s=i(35454),l=i(96674),p=i(67900),a=i(20941),d=i(5600),u=(i(75215),i(80442),i(71715)),c=i(52011),y=i(30556);const h=(0,s.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=h.jsonValues.slice();(0,n.e$)(m,"orthometric");const b=(0,s.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 v=r=class extends l.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return h.write(e,t,i)}readHeightModel(e,t,i){return h.read(e)||(i?.messages&&i.messages.push(function(e,t){return new a.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return b.read(e)||(i?.messages&&i.messages.push(f(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,p.$C)(e)||b.read(e)||(i?.messages&&i.messages.push(f(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({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 i=(0,p.cM)(t);return new r({heightModel:e.heightModel,heightUnit:i,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 r;return t.read(e,{origin:"web-scene"}),t}};function f(e,t){return new a.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,o._)([(0,d.Cb)({type:h.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],v.prototype,"heightModel",void 0),(0,o._)([(0,y.c)("web-scene","heightModel")],v.prototype,"writeHeightModel",null),(0,o._)([(0,u.r)(["web-scene","service"],"heightModel")],v.prototype,"readHeightModel",null),(0,o._)([(0,d.Cb)({type:b.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:b.jsonValues,write:b.write}}}})],v.prototype,"heightUnit",void 0),(0,o._)([(0,u.r)("web-scene","heightUnit")],v.prototype,"readHeightUnit",null),(0,o._)([(0,u.r)("service","heightUnit")],v.prototype,"readHeightUnitService",null),(0,o._)([(0,d.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],v.prototype,"vertCRS",void 0),(0,o._)([(0,u.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],v.prototype,"readVertCRS",null),v=r=(0,o._)([(0,c.j)("esri.geometry.HeightModelInfo")],v);const w=v},66361:(e,t,i)=>{i.d(t,{jF:()=>d,lQ:()=>y,o1:()=>b});var r=i(43697),o=i(32448),n=i(22974),s=i(95330),l=(i(92604),i(75215),i(20102),i(80442),i(52011)),p=i(18596);const a=new o.Z.EventEmitter;function d(e,t,i=null,r=!1){const o=(0,s.hh)();return r=null==t||r,a.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:i,mayReceiveServiceEdits:r,result:o.promise}),o}const u="esri.layers.mixins.EditBusLayer",c=Symbol(u);function y(e){return null!=e&&"object"==typeof e&&c in e}function h(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function m(e,t,i){const r=new URL(e).host,o=p.Jp.get(r),n=e=>!e||e===o;return n(t)&&n(i)||t===i}const b=e=>{var t;let i=class extends e{constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:i,gdbVersion:r,mayReceiveServiceEdits:o,result:s}=e,l=t===this.url,a=null!=i&&null!=this.layerId&&i===this.layerId,d=h(this),u=h(this)&&m(t,r,this.gdbVersion);if(!l||d&&!u||!a&&!o)return;const c=s.then((e=>{if(a&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.d9)(e)),e;const t=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(t){const{adds:i,updates:r,deletes:o}=t.editedFeatures,s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:i?i.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:o?o.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:r?r.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,n.d9)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.d9)(e.historicMoment)};return this.emit("edits",s),s}return{edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.d9)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.d9)(e.historicMoment)}})).then((e=>("historicMoment"in this&&this.historicMoment!==e.historicMoment&&(0,p.JV)(t,r)&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:c})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:i,moment:r}=e,o=t===this.url,n=h(this),s=h(this)&&m(t,i,this.gdbVersion),l=h(this)&&!m(t,this.gdbVersion,null);o&&n&&s&&l&&"historicMoment"in this&&this.historicMoment!==r&&(this.historicMoment=r)},this.when().then((()=>{this.addHandles(function(e){return a.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return a.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}};return t=c,i=(0,r._)([(0,l.j)(u)],i),i}},25113:(e,t,i)=>{i.d(t,{B:()=>N});var r=i(43697),o=i(46791),n=i(22974),s=i(92604),l=i(5600),p=(i(75215),i(71715)),a=i(52011),d=i(30556),u=i(82960),c=i(6570),y=i(79235),h=i(82971),m=i(66677),b=i(21506),v=i(2368),f=i(96674),w=(i(67676),i(80442),i(25031));let g=class extends((0,v.J)(f.wq)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,r._)([(0,l.Cb)()],g.prototype,"creatorField",void 0),(0,r._)([(0,l.Cb)()],g.prototype,"creationDateField",void 0),(0,r._)([(0,l.Cb)()],g.prototype,"editorField",void 0),(0,r._)([(0,l.Cb)()],g.prototype,"editDateField",void 0),(0,r._)([(0,l.Cb)()],g.prototype,"realm",void 0),(0,r._)([(0,l.Cb)((0,w.mi)("dateFieldsTimeReference",!0))],g.prototype,"timeZone",void 0),g=(0,r._)([(0,a.j)("esri.layers.support.EditFieldsInfo")],g);const _=g;let x=class extends((0,v.J)(f.wq)){constructor(e){super(e)}};(0,r._)([(0,l.Cb)({constructOnly:!0,json:{write:!0}})],x.prototype,"name",void 0),(0,r._)([(0,l.Cb)({constructOnly:!0,json:{write:!0}})],x.prototype,"fields",void 0),(0,r._)([(0,l.Cb)({constructOnly:!0,json:{write:!0}})],x.prototype,"isAscending",void 0),(0,r._)([(0,l.Cb)({constructOnly:!0,json:{write:!0}})],x.prototype,"indexType",void 0),(0,r._)([(0,l.Cb)({constructOnly:!0,json:{write:!0}})],x.prototype,"isUnique",void 0),(0,r._)([(0,l.Cb)({constructOnly:!0,json:{write:!0}})],x.prototype,"description",void 0),x=(0,r._)([(0,a.j)("esri.layers.support.FeatureIndex")],x);var C=i(45574),j=i(67900);let S=class extends((0,v.J)(f.wq)){constructor(e){super(e),this.shapeAreaField=null,this.shapeLengthField=null,this.units=null}};(0,r._)([(0,l.Cb)({type:String,json:{read:{source:"shapeAreaFieldName"}}})],S.prototype,"shapeAreaField",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:{source:"shapeLengthFieldName"}}})],S.prototype,"shapeLengthField",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:e=>j.gV.read(e)||j.Jo.read(e)}})],S.prototype,"units",void 0),S=(0,r._)([(0,a.j)("esri.layers.support.GeometryFieldsInfo")],S);const I=S;var F=i(56765),E=i(35454);const T=new E.X({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),M=new E.X({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let O=class extends((0,v.J)(f.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,r._)([(0,l.Cb)({json:{read:T.read,write:T.write}})],O.prototype,"cardinality",void 0),(0,r._)([(0,l.Cb)({json:{read:!0,write:!0}})],O.prototype,"composite",void 0),(0,r._)([(0,l.Cb)({json:{read:!0,write:!0}})],O.prototype,"id",void 0),(0,r._)([(0,l.Cb)({json:{read:!0,write:!0}})],O.prototype,"keyField",void 0),(0,r._)([(0,l.Cb)({json:{read:!0,write:!0}})],O.prototype,"keyFieldInRelationshipTable",void 0),(0,r._)([(0,l.Cb)({json:{read:!0,write:!0}})],O.prototype,"name",void 0),(0,r._)([(0,l.Cb)({json:{read:!0,write:!0}})],O.prototype,"relatedTableId",void 0),(0,r._)([(0,l.Cb)({json:{read:!0,write:!0}})],O.prototype,"relationshipTableId",void 0),(0,r._)([(0,l.Cb)({json:{read:M.read,write:M.write}})],O.prototype,"role",void 0),O=(0,r._)([(0,a.j)("esri.layers.support.Relationship")],O);const R=O;var U=i(54275),V=i(72729);let k=class extends((0,v.J)(f.wq)){constructor(e){super(e),this.code=null,this.defaultValues={},this.domains=null,this.name=null}readDomains(e){if(!e)return null;const t={};for(const i of Object.keys(e))t[i]=(0,V.im)(e[i]);return t}writeDomains(e,t){if(!e)return;const i={};for(const t of Object.keys(e))e[t]&&(i[t]=e[t]?.toJSON());t.domains=i}};(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],k.prototype,"code",void 0),(0,r._)([(0,l.Cb)({type:Object,json:{write:!0}})],k.prototype,"defaultValues",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"domains",void 0),(0,r._)([(0,p.r)("domains")],k.prototype,"readDomains",null),(0,r._)([(0,d.c)("domains")],k.prototype,"writeDomains",null),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],k.prototype,"name",void 0),k=(0,r._)([(0,a.j)("esri.layers.support.Subtype")],k);const D=k,N=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.capabilities=null,this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.definitionExpression=null,this.displayField=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.globalIdField=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.indexes=new(o.Z.ofType(x)),this.isTable=!1,this.layerId=void 0,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.preferredTimeZone=null,this.relationships=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.serviceItemId=null,this.sourceJSON=null,this.spatialReference=h.Z.WGS84,this.subtypeField=null,this.subtypes=null,this.trackIdField=null,this.version=void 0}get authenticationTriggerEvent(){if(!this.url)return null;const{capabilities:e}=this;if(e){const{query:t,operations:i,editing:r}=e;if(!t.supportsQueryByOthers||!t.supportsQueryByAnonymous)return"load";if(i.supportsEditing&&!(r.supportsUpdateByOthers&&r.supportsUpdateByAnonymous&&r.supportsDeleteByOthers&&r.supportsDeleteByAnonymous))return"load"}return this.userHasUpdateItemPrivileges?(0,C.uA)(this)?"load":this.hasUpdateItemRestrictions?e.operations.supportsQuery?"editing":"load":null:this.userHasFullEditingPrivileges&&this.hasFullEditingRestrictions?"editing":null}readCapabilitiesFromService(e,t){return(0,U.h)(t,this.url)}readEditingInfo(e,t){const{editingInfo:i}=t;return i?{lastEditDate:null!=i.lastEditDate?new Date(i.lastEditDate):null}:null}get effectiveCapabilities(){const e=this.capabilities;if(!e)return null;const t=(0,n.d9)(e),{operations:i,editing:r}=t;return this.sourceJSON?.isMultiServicesView?(this.userHasUpdateItemPrivileges&&(i.supportsQuery=!0),t):this.userHasUpdateItemPrivileges?(i.supportsAdd=i.supportsDelete=i.supportsEditing=i.supportsQuery=i.supportsUpdate=r.supportsDeleteByOthers=r.supportsGeometryUpdate=r.supportsUpdateByOthers=!0,t):(this.userHasFullEditingPrivileges&&i.supportsEditing&&(i.supportsAdd=i.supportsDelete=i.supportsUpdate=r.supportsGeometryUpdate=!0),t)}readGlobalIdFieldFromService(e,t){return(0,C.rk)(t)}get hasFullEditingRestrictions(){const e=this.capabilities;if(!e||this.sourceJSON?.isMultiServicesView)return!1;const{operations:t,editing:i}=e;return t.supportsEditing&&!(t.supportsAdd&&t.supportsDelete&&t.supportsUpdate&&i.supportsGeometryUpdate)}get hasUpdateItemRestrictions(){const e=this.capabilities;if(!e)return!1;const{operations:t,editing:i}=e;return this.sourceJSON?.isMultiServicesView?!t.supportsQuery:!(t.supportsAdd&&t.supportsDelete&&t.supportsEditing&&t.supportsQuery&&t.supportsUpdate&&i.supportsDeleteByOthers&&i.supportsGeometryUpdate&&i.supportsUpdateByOthers)}readIsTableFromService(e,t){return"Table"===t.type}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readMinScale(e,t){return t.effectiveMinScale||e||0}readObjectIdFieldFromService(e,t){return(0,C.kZ)(t)}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}set url(e){const t=(0,m.XG)({layer:this,url:e,nonStandardUrlAllowed:!0,logger:s.Z.getLogger(this)});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,i,r){(0,m.wH)(this,e,null,t,r)}readVersion(e,t){return(0,C.JY)(t)}};return(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"authenticationTriggerEvent",null),(0,r._)([(0,l.Cb)({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],t.prototype,"copyright",void 0),(0,r._)([(0,l.Cb)({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["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"]}}}}})],t.prototype,"capabilities",void 0),(0,r._)([(0,p.r)("service","capabilities")],t.prototype,"readCapabilitiesFromService",null),(0,r._)([(0,l.Cb)((0,w.mi)("dateFieldsTimeReference"))],t.prototype,"dateFieldsTimeZone",void 0),(0,r._)([(0,l.Cb)({type:Boolean})],t.prototype,"datesInUnknownTimezone",void 0),(0,r._)([(0,l.Cb)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,r._)([(0,l.Cb)({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],t.prototype,"displayField",void 0),(0,r._)([(0,l.Cb)({readOnly:!0,type:_})],t.prototype,"editFieldsInfo",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"editingInfo",void 0),(0,r._)([(0,p.r)("editingInfo")],t.prototype,"readEditingInfo",null),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"effectiveCapabilities",null),(0,r._)([(0,l.Cb)((()=>{const e=(0,n.d9)(b.PV),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],t.prototype,"elevationInfo",void 0),(0,r._)([(0,l.Cb)({type:F.Z,json:{name:"layerDefinition.floorInfo",write:!0,origins:{"web-scene":{name:"layerDefinition.floorInfo",write:{enabled:!0,layerContainerTypes:u.C}}}}})],t.prototype,"floorInfo",void 0),(0,r._)([(0,l.Cb)({type:c.Z,json:{origins:{service:{read:{source:"extent"}}}}})],t.prototype,"fullExtent",void 0),(0,r._)([(0,l.Cb)()],t.prototype,"gdbVersion",void 0),(0,r._)([(0,l.Cb)({readOnly:!0,type:I,json:{read:{source:"geometryProperties"}}})],t.prototype,"geometryFieldsInfo",void 0),(0,r._)([(0,l.Cb)({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:C.Fr.read}}}})],t.prototype,"geometryType",void 0),(0,r._)([(0,l.Cb)({type:String})],t.prototype,"globalIdField",void 0),(0,r._)([(0,p.r)("service","globalIdField",["globalIdField","fields"])],t.prototype,"readGlobalIdFieldFromService",null),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"hasFullEditingRestrictions",null),(0,r._)([(0,l.Cb)({type:Boolean,json:{origins:{service:{read:!0}}}})],t.prototype,"hasM",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"hasUpdateItemRestrictions",null),(0,r._)([(0,l.Cb)({type:Boolean,json:{origins:{service:{read:!0}}}})],t.prototype,"hasZ",void 0),(0,r._)([(0,l.Cb)({readOnly:!0,type:y.Z})],t.prototype,"heightModelInfo",void 0),(0,r._)([(0,l.Cb)({type:Date})],t.prototype,"historicMoment",void 0),(0,r._)([(0,l.Cb)({type:o.Z.ofType(x),readOnly:!0})],t.prototype,"indexes",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"isTable",void 0),(0,r._)([(0,p.r)("service","isTable",["type"])],t.prototype,"readIsTableFromService",null),(0,r._)([(0,l.Cb)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],t.prototype,"layerId",void 0),(0,r._)([(0,l.Cb)(b.u1)],t.prototype,"maxScale",void 0),(0,r._)([(0,p.r)("service","maxScale",["maxScale","effectiveMaxScale"])],t.prototype,"readMaxScale",null),(0,r._)([(0,l.Cb)(b.rO)],t.prototype,"minScale",void 0),(0,r._)([(0,p.r)("service","minScale",["minScale","effectiveMinScale"])],t.prototype,"readMinScale",null),(0,r._)([(0,l.Cb)({type:String})],t.prototype,"objectIdField",void 0),(0,r._)([(0,p.r)("service","objectIdField",["objectIdField","fields"])],t.prototype,"readObjectIdFieldFromService",null),(0,r._)([(0,l.Cb)((0,w.mi)("preferredTimeReference"))],t.prototype,"preferredTimeZone",void 0),(0,r._)([(0,l.Cb)({type:[R],readOnly:!0})],t.prototype,"relationships",void 0),(0,r._)([(0,l.Cb)({type:Boolean})],t.prototype,"returnM",void 0),(0,r._)([(0,l.Cb)({type:Boolean})],t.prototype,"returnZ",void 0),(0,r._)([(0,l.Cb)({readOnly:!0,json:{write:!1}})],t.prototype,"serverGens",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"serviceDefinitionExpression",void 0),(0,r._)([(0,p.r)("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],t.prototype,"readServiceDefinitionExpression",null),(0,r._)([(0,l.Cb)({type:String,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],t.prototype,"serviceItemId",void 0),(0,r._)([(0,l.Cb)()],t.prototype,"sourceJSON",void 0),(0,r._)([(0,l.Cb)({type:h.Z,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],t.prototype,"spatialReference",void 0),(0,r._)([(0,l.Cb)({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],t.prototype,"subtypeField",void 0),(0,r._)([(0,l.Cb)({type:[D],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],t.prototype,"subtypes",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],t.prototype,"trackIdField",void 0),(0,r._)([(0,l.Cb)(b.HQ)],t.prototype,"url",null),(0,r._)([(0,d.c)("url")],t.prototype,"writeUrl",null),(0,r._)([(0,l.Cb)({json:{origins:{service:{read:!0}},read:!1}})],t.prototype,"version",void 0),(0,r._)([(0,p.r)("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],t.prototype,"readVersion",null),t=(0,r._)([(0,a.j)("esri.layers.mixins.FeatureLayerBase")],t),t}},28294:(e,t,i)=>{i.d(t,{n:()=>c});var r=i(43697),o=i(92835),n=i(84552),s=i(5600),l=(i(75215),i(67676),i(80442),i(71715)),p=i(52011),a=i(69165),d=i(76259),u=i(78981);const c=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const i=t.timeInfo.exportOptions;if(!i)return null;const r=i.timeOffset,o=u.v.fromJSON(i.timeOffsetUnits);return r&&o?new n.Z({value:r,unit:o}):null}set timeInfo(e){(0,a.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,r._)([(0,s.Cb)({type:o.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,r._)([(0,s.Cb)({type:n.Z})],t.prototype,"timeOffset",void 0),(0,r._)([(0,l.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,r._)([(0,s.Cb)({value:null,type:d.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,r._)([(0,s.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,r._)([(0,p.j)("esri.layers.mixins.TemporalLayer")],t),t}},76259:(e,t,i)=>{i.d(t,{Z:()=>m});var r=i(43697),o=i(92835),n=i(84552),s=i(2368),l=i(96674),p=i(5600),a=(i(75215),i(67676),i(80442),i(71715)),d=i(52011),u=i(30556),c=i(25031);function y(e,t){return n.Z.fromJSON({value:e,unit:t})}let h=class extends((0,s.J)(l.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const i=new Date(t.timeExtent[0]),r=new Date(t.timeExtent[1]);return new o.Z({start:i,end:r})}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?y(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?y(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,r._)([(0,p.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,r._)([(0,p.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,r._)([(0,p.Cb)({type:o.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,r._)([(0,a.r)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,r._)([(0,u.c)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,r._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,r._)([(0,p.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,r._)([(0,a.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,r._)([(0,u.c)("interval")],h.prototype,"writeInterval",null),(0,r._)([(0,p.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,r._)([(0,p.Cb)((0,c.mi)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,r._)([(0,p.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,r._)([(0,p.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),h=(0,r._)([(0,d.j)("esri.layers.support.TimeInfo")],h);const m=h},60199:(e,t,i)=>{i.d(t,{D:()=>n});var r=i(66677);const o=[];function n(e,t){if((0,r.M8)(e.url??""))return!0;const{wkid:i}=t;for(const t of o){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(i))return!1}return!0}o.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),o.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),o.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),o.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),o.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}]),o.push([10.7,()=>{const e=new Set([8387,8391,8427,8545,8682,8685,8818,31370,104022,104024,104975]);for(let t=8065;t<=8068;t++)e.add(t);for(let t=8082;t<=8083;t++)e.add(t);for(let t=8379;t<=8385;t++)e.add(t);for(let t=8836;t<=8840;t++)e.add(t);for(let t=8857;t<=8860;t++)e.add(t);for(let t=53035;t<=53037;t++)e.add(t);for(let t=54090;t<=54091;t++)e.add(t);for(let t=102498;t<=102499;t++)e.add(t);return e}]),o.push([10.61,()=>new Set([102497])]),o.push([10.6,()=>{const e=new Set([7803,7805,7887,8086,8232,8237,8240,8246,8249,8252,8255,9019,9391]);for(let t=7755;t<=7787;t++)e.add(t);for(let t=7791;t<=7795;t++)e.add(t);for(let t=7799;t<=7801;t++)e.add(t);for(let t=7825;t<=7831;t++)e.add(t);for(let t=7877;t<=7878;t++)e.add(t);for(let t=7882;t<=7883;t++)e.add(t);for(let t=7991;t<=7992;t++)e.add(t);for(let t=8042;t<=8043;t++)e.add(t);for(let t=8058;t<=8059;t++)e.add(t);for(let t=8311;t<=8348;t++)e.add(t);for(let t=9060;t<=9067;t++)e.add(t);for(let t=102562;t<=102568;t++)e.add(t);for(let t=102799;t<=102900;t++)e.add(t);return e}])},78981:(e,t,i)=>{i.d(t,{v:()=>r});const r=(0,i(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},18596:(e,t,i)=>{i.d(t,{JV:()=>l,Jp:()=>o,Px:()=>s,U8:()=>r});const r=(0,i(41123).dG)(),o=new Map,n=new Map;async function s(e,t,o=!1){if(!e||!t)return!0;const s=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),l=n.get(s)?.entries();if(l)for(const[e,n]of l)if(n.name===t){const t=!n.stack?.hasForwardEdits();if(!t&&o){const[{deleteForwardEdits:t},{default:o}]=await Promise.all([i.e(1316).then(i.bind(i,51316)),i.e(4573).then(i.bind(i,84573))]);return t(s,e,new o({sessionId:r,moment:n.moment}))}return t}return!0}function l(e,t){if(!e)return!1;const i=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),r=n.get(i)?.entries();if(r)for(const[e,i]of r)if(i.name===t)return"edit"===i.lockType;return!1}new Map},12259:(e,t,i)=>{var r;i.d(t,{x:()=>r}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(r||(r={}))}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3554,5732],{5732:(e,t,r)=>{r.d(t,{c:()=>s,g:()=>o});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},57435:(e,t,r)=>{r.d(t,{Z:()=>p});var s=r(43697),o=r(46791),i=(r(66643),r(20102),r(92604),r(26258),r(87538)),n=r(5600),a=r(52011);let l=class extends o.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,i.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new o.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(r(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,n.Cb)()],l.prototype,"getCollections",void 0),(0,s._)([(0,n.Cb)()],l.prototype,"getChildrenFunction",void 0),(0,s._)([(0,n.Cb)()],l.prototype,"itemFilterFunction",void 0),l=(0,s._)([(0,a.j)("esri.core.CollectionFlattener")],l);const p=l},30223:(e,t,r)=>{r.r(t),r.d(t,{default:()=>$e});var s=r(43697),o=r(46791),i=r(57435),n=r(20102),a=r(22974),l=r(68668),p=r(92604),u=r(16453),d=r(95330),y=r(17452),c=r(5600),h=r(75215),f=r(71715),g=r(52011),m=r(82971),b=r(87085),v=r(38171),w=r(51773),_=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),C=r(3172),S=r(35454),x=r(83379),F=r(609),T=(r(67676),r(80442),r(36030)),j=r(6570),O=r(19238),R=r(10699),I=r(21506);let A=class extends((0,R.IG)(u.w)){constructor(e){super(e),this.title="",this.id=-1,this.modelName=null,this.isEmpty=null,this.legendEnabled=!0,this.visible=!0,this.opacity=1}readTitle(e,t){return"string"==typeof t.alias?t.alias:"string"==typeof t.name?t.name:""}readIdOnlyOnce(e){return-1!==this.id?this.id:"number"==typeof e?e:-1}};(0,s._)([(0,c.Cb)({type:String,json:{origins:{"web-scene":{write:!0},"portal-item":{write:!0}}}})],A.prototype,"title",void 0),(0,s._)([(0,f.r)("service","title",["alias","name"])],A.prototype,"readTitle",null),(0,s._)([(0,c.Cb)()],A.prototype,"layer",void 0),(0,s._)([(0,c.Cb)({type:h.z8,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],A.prototype,"id",void 0),(0,s._)([(0,f.r)("service","id")],A.prototype,"readIdOnlyOnce",null),(0,s._)([(0,c.Cb)((0,I.Lx)(String))],A.prototype,"modelName",void 0),(0,s._)([(0,c.Cb)((0,I.Lx)(Boolean))],A.prototype,"isEmpty",void 0),(0,s._)([(0,c.Cb)({type:Boolean,nonNullable:!0})],A.prototype,"legendEnabled",void 0),(0,s._)([(0,c.Cb)({type:Boolean,json:{name:"visibility",write:!0}})],A.prototype,"visible",void 0),(0,s._)([(0,c.Cb)({type:Number,json:{write:!0}})],A.prototype,"opacity",void 0),A=(0,s._)([(0,g.j)("esri.layers.buildingSublayers.BuildingSublayer")],A);const L=A;var E=r(15506),q=r(53518),Z=r(99514),P=r(69165),Q=r(61064),B=r(51161),M=r(14165),N=r(32163),D=r(86787),k=r(2358),z=r(19833);const U="esri.layers.buildingSublayers.BuildingComponentSublayer",G=p.Z.getLogger(U),H=(0,q.v)();let V=class extends(x.Z.LoadableMixin((0,F.v)(L))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new Z.Z(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,s=t.associatedLayerID;return null!=r&&"number"==typeof s?new O.default({portalItem:r,layerId:s}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return null}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then((()=>{this.indexInfo=(0,Q.T)(this.parsedUrl.path,this.rootNode,this.nodePages,this.apiKey,G,t)}));return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return(0,N.eZ)(this,e)}async _fetchService(e){const t=(await(0,C.Z)(this.parsedUrl.path,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:E.C,{query:t,data:{supportsZ:r,supportsM:s,isVersioned:o}}=e;return{query:t,data:{supportsZ:r,supportsM:s,isVersioned:o}}}createQuery(){const e=new M.Z;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}async queryCachedAttributes(e,t){const r=(0,P.Lk)(this.fieldsIndex,await(0,z.e7)(this,(0,z.V5)(this)));return(0,k.xe)(this.parsedUrl.path,this.attributeStorageInfo,e,t,r)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new n.Z("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new v.Z;return s.attributes=r[0],s.layer=this,s.sourceLayer=this,s}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new n.Z("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new n.Z("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};(0,s._)([(0,c.Cb)({readOnly:!0})],V.prototype,"parsedUrl",null),(0,s._)([(0,c.Cb)({type:B.U4,readOnly:!0})],V.prototype,"nodePages",void 0),(0,s._)([(0,c.Cb)({type:[B.QI],readOnly:!0})],V.prototype,"materialDefinitions",void 0),(0,s._)([(0,c.Cb)({type:[B.Yh],readOnly:!0})],V.prototype,"textureSetDefinitions",void 0),(0,s._)([(0,c.Cb)({type:[B.H3],readOnly:!0})],V.prototype,"geometryDefinitions",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],V.prototype,"serviceUpdateTimeStamp",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],V.prototype,"store",void 0),(0,s._)([(0,c.Cb)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],V.prototype,"rootNode",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],V.prototype,"attributeStorageInfo",void 0),(0,s._)([(0,c.Cb)(H.fields)],V.prototype,"fields",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],V.prototype,"fieldsIndex",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:O.default})],V.prototype,"associatedLayer",void 0),(0,s._)([(0,f.r)("service","associatedLayer",["associatedLayerID"])],V.prototype,"readAssociatedLayer",null),(0,s._)([(0,c.Cb)(H.outFields)],V.prototype,"outFields",void 0),(0,s._)([(0,c.Cb)({type:String,readOnly:!0})],V.prototype,"objectIdField",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:String,json:{read:!1}})],V.prototype,"displayField",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:String})],V.prototype,"apiKey",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:j.Z})],V.prototype,"fullExtent",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:m.Z})],V.prototype,"spatialReference",null),(0,s._)([(0,c.Cb)({readOnly:!0})],V.prototype,"version",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:D.Z})],V.prototype,"elevationInfo",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:Number})],V.prototype,"minScale",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:Number})],V.prototype,"maxScale",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:Number})],V.prototype,"effectiveScaleRange",null),(0,s._)([(0,c.Cb)({type:["hide","show"],json:{write:!0}})],V.prototype,"listMode",void 0),(0,s._)([(0,c.Cb)({types:_.o,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],V.prototype,"renderer",void 0),(0,s._)([(0,c.Cb)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],V.prototype,"definitionExpression",void 0),(0,s._)([(0,c.Cb)(I.C_)],V.prototype,"popupEnabled",void 0),(0,s._)([(0,c.Cb)({type:w.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],V.prototype,"popupTemplate",void 0),(0,s._)([(0,c.Cb)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],V.prototype,"normalReferenceFrame",void 0),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],V.prototype,"defaultPopupTemplate",null),(0,s._)([(0,c.Cb)()],V.prototype,"types",null),(0,s._)([(0,c.Cb)()],V.prototype,"typeIdField",null),(0,s._)([(0,c.Cb)({json:{write:!1}}),(0,T.J)(new S.X({"3DObject":"3d-object",Point:"point"}))],V.prototype,"layerType",void 0),(0,s._)([(0,c.Cb)()],V.prototype,"geometryType",null),(0,s._)([(0,c.Cb)()],V.prototype,"profile",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],V.prototype,"capabilities",null),V=(0,s._)([(0,g.j)(U)],V);const J=V;var K,W=r(20941);const X={type:o.Z,readOnly:!0,json:{origins:{service:{read:{source:"sublayers",reader:$}}},read:!1}};function $(e,t,r){if(e&&Array.isArray(e))return new o.Z(e.map((e=>{const t=function(e){return"group"===e.layerType?Y:J}(e);if(t){const s=new t;return s.read(e,r),s}return r?.messages&&e&&r.messages.push(new W.Z("building-scene-layer:unsupported-sublayer-type","Building scene sublayer of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:r})),null})))}let Y=K=class extends L{constructor(e){super(e),this.type="building-group",this.listMode="show",this.sublayers=null}loadAll(){return(0,l.w)(this,(e=>K.forEachSublayer(this.sublayers,(t=>{"building-group"!==t.type&&e(t)}))))}};var ee;(0,s._)([(0,c.Cb)({type:["hide","show","hide-children"],json:{write:!0}})],Y.prototype,"listMode",void 0),(0,s._)([(0,c.Cb)(X)],Y.prototype,"sublayers",void 0),Y=K=(0,s._)([(0,g.j)("esri.layers.buildingSublayers.BuildingGroupSublayer")],Y),(ee=Y||(Y={})).sublayersProperty=X,ee.readSublayers=$,ee.forEachSublayer=function e(t,r){t.forEach((t=>{r(t),"building-group"===t.type&&e(t.sublayers,r)}))};const te=Y;var re=r(54295),se=r(17287),oe=r(38009),ie=r(16859),ne=r(72965),ae=r(37253),le=r(71592),pe=r(96674),ue=r(41123);let de=class extends pe.wq{constructor(){super(...arguments),this.type=null}};(0,s._)([(0,c.Cb)({type:String,readOnly:!0,json:{write:!0}})],de.prototype,"type",void 0),de=(0,s._)([(0,g.j)("esri.layers.support.BuildingFilterAuthoringInfo")],de);const ye=de;var ce;let he=ce=class extends pe.wq{constructor(){super(...arguments),this.filterType=null,this.filterValues=null}clone(){return new ce({filterType:this.filterType,filterValues:(0,a.d9)(this.filterValues)})}};(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],he.prototype,"filterType",void 0),(0,s._)([(0,c.Cb)({type:[String],json:{write:!0}})],he.prototype,"filterValues",void 0),he=ce=(0,s._)([(0,g.j)("esri.layers.support.BuildingFilterAuthoringInfoType")],he);const fe=he;var ge;const me=o.Z.ofType(fe);let be=ge=class extends pe.wq{clone(){return new ge({filterTypes:(0,a.d9)(this.filterTypes)})}};(0,s._)([(0,c.Cb)({type:me,json:{write:!0}})],be.prototype,"filterTypes",void 0),be=ge=(0,s._)([(0,g.j)("esri.layers.support.BuildingFilterAuthoringInfoBlock")],be);const ve=be;var we;const _e=o.Z.ofType(ve);let Ce=we=class extends ye{constructor(){super(...arguments),this.type="checkbox"}clone(){return new we({filterBlocks:(0,a.d9)(this.filterBlocks)})}};(0,s._)([(0,c.Cb)({type:["checkbox"]})],Ce.prototype,"type",void 0),(0,s._)([(0,c.Cb)({type:_e,json:{write:!0}})],Ce.prototype,"filterBlocks",void 0),Ce=we=(0,s._)([(0,g.j)("esri.layers.support.BuildingFilterAuthoringInfoCheckbox")],Ce);const Se=Ce;let xe=class extends pe.wq{};(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],xe.prototype,"type",void 0),xe=(0,s._)([(0,g.j)("esri.layers.support.BuildingFilterMode")],xe);const Fe=xe;var Te;let je=Te=class extends Fe{constructor(){super(...arguments),this.type="solid"}clone(){return new Te}};(0,s._)([(0,c.Cb)({type:["solid"],readOnly:!0,json:{write:!0}})],je.prototype,"type",void 0),je=Te=(0,s._)([(0,g.j)("esri.layers.support.BuildingFilterModeSolid")],je);const Oe=je;var Re,Ie=r(56332);let Ae=Re=class extends Fe{constructor(){super(...arguments),this.type="wire-frame",this.edges=null}clone(){return new Re({edges:(0,a.d9)(this.edges)})}};(0,s._)([(0,T.J)({wireFrame:"wire-frame"})],Ae.prototype,"type",void 0),(0,s._)([(0,c.Cb)(Ie.Z)],Ae.prototype,"edges",void 0),Ae=Re=(0,s._)([(0,g.j)("esri.layers.support.BuildingFilterModeWireFrame")],Ae);const Le=Ae;var Ee;let qe=Ee=class extends Fe{constructor(){super(...arguments),this.type="x-ray"}clone(){return new Ee}};(0,s._)([(0,c.Cb)({type:["x-ray"],readOnly:!0,json:{write:!0}})],qe.prototype,"type",void 0),qe=Ee=(0,s._)([(0,g.j)("esri.layers.support.BuildingFilterModeXRay")],qe);const Ze=qe;var Pe;const Qe={nonNullable:!0,types:{key:"type",base:Fe,typeMap:{solid:Oe,"wire-frame":Le,"x-ray":Ze}},json:{read:e=>{switch(e?.type){case"solid":return Oe.fromJSON(e);case"wireFrame":return Le.fromJSON(e);case"x-ray":return Ze.fromJSON(e);default:return}},write:{enabled:!0,isRequired:!0}}};let Be=Pe=class extends pe.wq{constructor(){super(...arguments),this.filterExpression=null,this.filterMode=new Oe,this.title=""}clone(){return new Pe({filterExpression:this.filterExpression,filterMode:(0,a.d9)(this.filterMode),title:this.title})}};(0,s._)([(0,c.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Be.prototype,"filterExpression",void 0),(0,s._)([(0,c.Cb)(Qe)],Be.prototype,"filterMode",void 0),(0,s._)([(0,c.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Be.prototype,"title",void 0),Be=Pe=(0,s._)([(0,g.j)("esri.layers.support.BuildingFilterBlock")],Be);const Me=Be;var Ne;const De=o.Z.ofType(Me);let ke=Ne=class extends pe.wq{constructor(){super(...arguments),this.description=null,this.filterBlocks=null,this.id=(0,ue.DO)(),this.name=null}clone(){return new Ne({description:this.description,filterBlocks:(0,a.d9)(this.filterBlocks),id:this.id,name:this.name,filterAuthoringInfo:(0,a.d9)(this.filterAuthoringInfo)})}};(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],ke.prototype,"description",void 0),(0,s._)([(0,c.Cb)({type:De,json:{write:{enabled:!0,isRequired:!0}}})],ke.prototype,"filterBlocks",void 0),(0,s._)([(0,c.Cb)({types:{key:"type",base:ye,typeMap:{checkbox:Se}},json:{read:e=>"checkbox"===e?.type?Se.fromJSON(e):null,write:!0}})],ke.prototype,"filterAuthoringInfo",void 0),(0,s._)([(0,c.Cb)({type:String,constructOnly:!0,json:{write:{enabled:!0,isRequired:!0}}})],ke.prototype,"id",void 0),(0,s._)([(0,c.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],ke.prototype,"name",void 0),ke=Ne=(0,s._)([(0,g.j)("esri.layers.support.BuildingFilter")],ke);const ze=ke;let Ue=class extends pe.wq{constructor(){super(...arguments),this.fieldName=null,this.modelName=null,this.label=null,this.min=null,this.max=null,this.mostFrequentValues=null,this.subLayerIds=null}};(0,s._)([(0,c.Cb)({type:String})],Ue.prototype,"fieldName",void 0),(0,s._)([(0,c.Cb)({type:String})],Ue.prototype,"modelName",void 0),(0,s._)([(0,c.Cb)({type:String})],Ue.prototype,"label",void 0),(0,s._)([(0,c.Cb)({type:Number})],Ue.prototype,"min",void 0),(0,s._)([(0,c.Cb)({type:Number})],Ue.prototype,"max",void 0),(0,s._)([(0,c.Cb)({json:{read:e=>Array.isArray(e)&&(e.every((e=>"string"==typeof e))||e.every((e=>"number"==typeof e)))?e.slice():null}})],Ue.prototype,"mostFrequentValues",void 0),(0,s._)([(0,c.Cb)({type:[Number]})],Ue.prototype,"subLayerIds",void 0),Ue=(0,s._)([(0,g.j)("esri.layers.support.BuildingFieldStatistics")],Ue);let Ge=class extends(x.Z.LoadableMixin((0,F.v)(pe.wq))){constructor(){super(...arguments),this.url=null}get fields(){return this.loaded||"loading"===this.loadStatus?this._get("fields"):(p.Z.getLogger(this).error("building summary statistics are not loaded"),null)}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._fetchService(t)),Promise.resolve(this)}async _fetchService(e){const t=(await(0,C.Z)(this.url,{query:{f:"json"},responseType:"json",signal:e})).data;this.read(t,{origin:"service"})}};(0,s._)([(0,c.Cb)({constructOnly:!0,type:String})],Ge.prototype,"url",void 0),(0,s._)([(0,c.Cb)({readOnly:!0,type:[Ue],json:{read:{source:"summary"}}})],Ge.prototype,"fields",null),Ge=(0,s._)([(0,g.j)("esri.layers.support.BuildingSummaryStatistics")],Ge);const He=Ge;var Ve=r(36405);const Je=o.Z.ofType(ze),Ke=(0,a.d9)(te.sublayersProperty),We=Ke.json?.origins;We&&(We["web-scene"]={type:[J],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}},We["portal-item"]={type:[J],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}});let Xe=class extends((0,ae.Vt)((0,se.Y)((0,oe.q)((0,ie.I)((0,ne.M)((0,u.R)((0,re.V)(b.Z)))))))){constructor(e){super(e),this.operationalLayerType="BuildingSceneLayer",this.allSublayers=new i.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>"building-group"===e.type?e.sublayers:null}),this.sublayers=null,this._sublayerOverrides=null,this.filters=new Je,this.activeFilterId=null,this.summaryStatistics=null,this.outFields=null,this.legendEnabled=!0,this.type="building-scene"}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e??{}}destroy(){this.allSublayers.destroy()}readSublayers(e,t,r){const s=te.readSublayers(e,t,r);return te.forEachSublayer(s,(e=>e.layer=this)),this._sublayerOverrides&&(this.applySublayerOverrides(s,this._sublayerOverrides),this._sublayerOverrides=null),s}applySublayerOverrides(e,{overrides:t,context:r}){te.forEachSublayer(e,(e=>e.read(t.get(e.id),r)))}readSublayerOverrides(e,t){const r=new Map;for(const s of e)null!=s&&"object"==typeof s&&"number"==typeof s.id?r.set(s.id,s):t.messages?.push(new n.Z("building-scene-layer:invalid-sublayer-override","Invalid value for sublayer override. Not an object or no id specified.",{value:s}));return{overrides:r,context:t}}writeSublayerOverrides(e,t,r){const s=[];te.forEachSublayer(this.sublayers,(e=>{const t=e.write({},r);Object.keys(t).length>1&&s.push(t)})),s.length>0&&(t.sublayers=s)}writeUnappliedOverrides(e,t){t.sublayers=[],e.overrides.forEach((e=>{t.sublayers.push((0,a.d9)(e))}))}write(e,t){return e=super.write(e,t),!t||"web-scene"!==t.origin&&"portal-item"!==t.origin||(this.sublayers?this.writeSublayerOverrides(this.sublayers,e,t):this._sublayerOverrides&&this.writeUnappliedOverrides(this._sublayerOverrides,e)),e}read(e,t){if(super.read(e,t),t&&("web-scene"===t.origin||"portal-item"===t.origin)&&null!=e&&Array.isArray(e.sublayers)){const r=this.readSublayerOverrides(e.sublayers,t);this.sublayers?this.applySublayerOverrides(this.sublayers,r):this._sublayerOverrides=r}}readSummaryStatistics(e,t){if("string"==typeof t.statisticsHRef){const e=(0,y.v_)(this.parsedUrl?.path,t.statisticsHRef);return new He({url:e})}return null}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d.r9).then((()=>this._fetchService(t))).then((()=>this._fetchAssociatedFeatureService(t)));return this.addResolvingPromise(r),Promise.resolve(this)}loadAll(){return(0,l.G)(this,(e=>{te.forEachSublayer(this.sublayers,(t=>{"building-group"!==t.type&&e(t)})),this.summaryStatistics&&e(this.summaryStatistics)}))}async saveAs(e,t){return this._debouncedSaveOperations(ae.xp.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"};return this._debouncedSaveOperations(ae.xp.SAVE,e)}validateLayer(e){if(!e.layerType||"Building"!==e.layerType)throw new n.Z("buildingscenelayer:layer-type-not-supported","BuildingSceneLayer does not support this layer type",{layerType:e.layerType})}_getTypeKeywords(){return["Building"]}async _fetchAssociatedFeatureService(e){try{const{portalItem:t}=await(0,le.w)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,apiKey:this.apiKey,signal:e});this.associatedFeatureServiceItem=t}catch(e){p.Z.getLogger(this).warn("Associated feature service item could not be loaded",e)}}_validateElevationInfo(){const e=this.elevationInfo,t="Building scene layers";(0,Ve.LR)(p.Z.getLogger(this),(0,Ve.Uy)(t,"absolute-height",e)),(0,Ve.LR)(p.Z.getLogger(this),(0,Ve.kf)(t,e))}};(0,s._)([(0,c.Cb)({type:["BuildingSceneLayer"]})],Xe.prototype,"operationalLayerType",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],Xe.prototype,"allSublayers",void 0),(0,s._)([(0,c.Cb)(Ke)],Xe.prototype,"sublayers",void 0),(0,s._)([(0,f.r)("service","sublayers")],Xe.prototype,"readSublayers",null),(0,s._)([(0,c.Cb)({type:Je,nonNullable:!0,json:{write:!0}})],Xe.prototype,"filters",void 0),(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],Xe.prototype,"activeFilterId",void 0),(0,s._)([(0,c.Cb)({readOnly:!0,type:He})],Xe.prototype,"summaryStatistics",void 0),(0,s._)([(0,f.r)("summaryStatistics",["statisticsHRef"])],Xe.prototype,"readSummaryStatistics",null),(0,s._)([(0,c.Cb)({type:[String],json:{read:!1}})],Xe.prototype,"outFields",void 0),(0,s._)([(0,c.Cb)(I.vg)],Xe.prototype,"fullExtent",void 0),(0,s._)([(0,c.Cb)(I.rn)],Xe.prototype,"legendEnabled",void 0),(0,s._)([(0,c.Cb)({type:["show","hide","hide-children"]})],Xe.prototype,"listMode",void 0),(0,s._)([(0,c.Cb)((0,I.Lx)(m.Z))],Xe.prototype,"spatialReference",void 0),(0,s._)([(0,c.Cb)(I.PV)],Xe.prototype,"elevationInfo",null),(0,s._)([(0,c.Cb)({json:{read:!1},readOnly:!0})],Xe.prototype,"type",void 0),(0,s._)([(0,c.Cb)()],Xe.prototype,"associatedFeatureServiceItem",void 0),Xe=(0,s._)([(0,g.j)("esri.layers.BuildingSceneLayer")],Xe);const $e=Xe},17017:(e,t,r)=>{r.d(t,{N:()=>n});var s=r(43697),o=r(5600),i=(r(75215),r(67676),r(80442),r(52011));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,o.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,s._)([(0,i.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},34760:(e,t,r)=>{r.d(t,{Q:()=>v});var s=r(43697),o=r(92604),i=r(95330),n=r(5600),a=r(90578),l=(r(67676),r(80442),r(52011)),p=r(82960),u=r(46791),d=(r(66643),r(20102),r(26258),r(87538));const y=new u.Z,c=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&y.push(new WeakRef(e))}function f(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:f(t,e%t):0}let g=0,m=0;function b(){const e=Date.now();let t=!1;for(const r of y){const s=r.deref();s?s.refreshInterval&&e-(c.get(s)??0)+5>=6e4*s.refreshInterval&&(c.set(s,e),s.refresh(e)):t=!0}if(t)for(let e=y.length-1;e>=0;e--)y.at(e).deref()||y.removeAt(e)}(0,d.EH)((()=>{const e=Date.now();let t=0;for(const r of y){const s=r.deref();s&&(t=f(Math.round(6e4*s.refreshInterval),t),s.refreshInterval?c.get(s)||c.set(s,e):c.delete(s))}if(t!==m){if(m=t,clearInterval(g),0===m)return void(g=0);g=setInterval(b,m)}}));const v=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,i.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const t=y.find((t=>t.deref()===e));t&&y.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,i.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{o.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,s._)([(0,n.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:p.C}}}}})],t.prototype,"refreshInterval",void 0),(0,s._)([(0,a.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,s._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,s._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,s._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>d});var s=r(43697),o=r(2368),i=r(35454),n=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const p=new i.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,o.J)(n.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,s._)([(0,a.Cb)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,s._)([(0,l.j)("esri.layers.support.FeatureTemplate")],u);const d=u},16451:(e,t,r)=>{r.d(t,{Z:()=>c});var s=r(43697),o=r(2368),i=r(96674),n=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),l=r(52011),p=r(30556),u=r(72729),d=r(70082);let y=class extends((0,o.J)(i.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,s._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"id",void 0),(0,s._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"name",void 0),(0,s._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"domains",void 0),(0,s._)([(0,a.r)("domains")],y.prototype,"readDomains",null),(0,s._)([(0,p.c)("domains")],y.prototype,"writeDomains",null),(0,s._)([(0,n.Cb)({type:[d.Z],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,s._)([(0,l.j)("esri.layers.support.FeatureType")],y);const c=y},54275:(e,t,r)=>{r.d(t,{h:()=>d});var s=r(80442),o=r(66677);function i(e,t,r){return!!a(e,t,r)}function n(e,t,r){return a(e,t,r)}function a(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const l={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function p(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function u(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function d(e,t){return{analytics:y(e),attachment:c(e),data:h(e),metadata:f(e),operations:g(e.capabilities,e,t),query:m(e,t),queryRelated:b(e),queryTopFeatures:v(e),editing:w(e)}}function y(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryAnalytics")}}function c(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:u(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:i(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=l[e.name];t&&(r[t]=!!e.isEnabled)})),r}function h(e){return{isVersioned:i(e,"isDataVersioned",!1),supportsAttachment:i(e,"hasAttachments",!1),supportsM:i(e,"hasM",!1),supportsZ:i(e,"hasZ",!1)}}function f(e){return{supportsAdvancedFieldProperties:i(e,"supportsFieldDescriptionProperty",!1)}}function g(e,t,r){const s=e?e.toLowerCase().split(",").map((e=>e.trim())):[],n=r?(0,o.Qc)(r):null,a=s.includes(null!=n&&"MapServer"===n.serverType?"data":"query"),l=s.includes("editing")&&!t.datesInUnknownTimezone;let p=l&&s.includes("create"),u=l&&s.includes("delete"),d=l&&s.includes("update");const y=s.includes("changetracking"),c=t.advancedQueryCapabilities;return l&&!(p||u||d)&&(p=u=d=!0),{supportsCalculate:i(t,"supportsCalculate",!1),supportsTruncate:i(t,"supportsTruncate",!1),supportsValidateSql:i(t,"supportsValidateSql",!1),supportsAdd:p,supportsDelete:u,supportsEditing:l,supportsChangeTracking:y,supportsQuery:a,supportsQueryAnalytics:i(c,"supportsQueryAnalytic",!1),supportsQueryAttachments:i(c,"supportsQueryAttachments",!1),supportsQueryTopFeatures:i(c,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:i(t,"supportsAttachmentsResizing",!1),supportsSync:s.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:i(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:i(t,"supportsAsyncConvert3D",!1)}}function m(e,t){const r=e.advancedQueryCapabilities,a=e.ownershipBasedAccessControlForFeatures,l=e.archivingInfo,d=e.currentVersion,y=t?.includes("MapServer"),c=!y||d>=(0,s.Z)("mapserver-pbf-version-support"),h=(0,o.M8)(t),f=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:i(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:i(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:i(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:p(r),supportsCentroid:i(r,"supportsReturningGeometryCentroid",!1),supportsDistance:i(r,"supportsQueryWithDistance",!1),supportsDistinct:i(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:i(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:i(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:i(r,"supportsHavingClause",!1),supportsOrderBy:i(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:i(r,"supportsPagination",!1),supportsQuantization:i(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:i(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:i(e,"supportsReturningQueryGeometry",!1),supportsResultType:i(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:i(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:i(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:i(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:i(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:i(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:i(a,"allowOthersToQuery",!0),supportsHistoricMoment:i(l,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:c&&f.has("pbf"),supportsDisjointSpatialRelationship:i(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:i(r,"supportsQueryWithCacheHint",!1)||u(r,"query"),supportsDefaultSpatialReference:i(r,"supportsDefaultSR",!1),supportsCompactGeometry:h,supportsFullTextSearch:i(r,"supportsFullTextSearch",!1),maxRecordCountFactor:n(e,"maxRecordCountFactor",void 0),maxRecordCount:n(e,"maxRecordCount",void 0),standardMaxRecordCount:n(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:n(e,"tileMaxRecordCount",void 0)}}function b(e){const t=e.advancedQueryCapabilities,r=i(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:i(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:u(t,"queryRelated")}}function v(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryTopFilter")}}function w(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:i(e,"allowGeometryUpdates",!0),supportsGlobalId:i(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:i(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:i(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:i(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:i(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:i(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:i(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:i(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:i(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:i(r,"supportsAsyncApplyEdits",!1),zDefault:n(e,"zDefault",void 0)}}},28694:(e,t,r)=>{r.d(t,{p:()=>o});var s=r(69285);function o(e,t,r){if(!r?.features||!r.hasZ)return;const o=(0,s.k)(r.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of r.features)o(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>v});var s,o=r(43697),i=r(66577),n=r(38171),a=r(35454),l=r(96674),p=r(22974),u=r(5600),d=(r(75215),r(71715)),y=r(52011),c=r(30556),h=r(82971),f=r(33955),g=r(1231);const m=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=s=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.Z.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const o=e[t],i=n.Z.fromJSON(o),a=o.geometry?.spatialReference;null==i.geometry||a||(i.geometry.spatialReference=r);const l=o.aggregateGeometries,p=i.aggregateGeometries;if(l&&null!=p)for(const e in p){const t=p[e],s=l[e],o=s?.spatialReference;null==t||o||(t.spatialReference=r)}s.push(i)}return s}writeGeometryType(e,t,r,s){if(e)return void m.write(e,t,r,s);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,f.im)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=h.Z.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,p.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,o]}=e,i=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=i.length;e<t;e++)n?.(i[e].geometry)||(i.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,o],scale:[i,n]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const p=this._getHydrationFunction(e,(e=>e*i+s),(e=>o-e*n),a,l);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}_quantizePoints(e,t,r){let s,o;const i=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];if(n>0){const e=t(a[0]),n=r(a[1]);e===s&&n===o||(i.push([e-s,n-o]),s=e,o=n)}else s=t(a[0]),o=r(a[1]),i.push([s,o])}return i.length>0?i:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,f.oU)(e)?e.rings:e.paths,o=[];for(let e=0,i=s.length;e<i;e++){const i=s[e],n=this._quantizePoints(i,t,r);n&&o.push(n)}return o.length>0?((0,f.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const i=(0,f.oU)(e)?e.rings:e.paths;let n,a;for(let e=0,s=i.length;e<s;e++){const s=i[e];for(let e=0,o=s.length;e<o;e++){const o=s[e];e>0?(n+=o[0],a+=o[1]):(n=o[0],a=o[1]),o[0]=t(n),o[1]=r(a)}}if(s&&o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=o(r[3])}}else if(s)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const i=e.points;let n,a;for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(n+=s[0],a+=s[1]):(n=s[0],a=s[1]),s[0]=t(n),s[1]=r(a)}if(s&&o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=s(t[2]),t[3]=o(t[3])}else if(s)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=s(t[2])}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,u.Cb)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,o._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,u.Cb)({type:[n.Z],json:{write:!0}})],b.prototype,"features",void 0),(0,o._)([(0,d.r)("features")],b.prototype,"readFeatures",null),(0,o._)([(0,u.Cb)({type:[g.Z],json:{write:!0}})],b.prototype,"fields",void 0),(0,o._)([(0,u.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],b.prototype,"geometryType",void 0),(0,o._)([(0,c.c)("geometryType")],b.prototype,"writeGeometryType",null),(0,o._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,o._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,o._)([(0,u.Cb)({types:i.qM,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,o._)([(0,d.r)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,o._)([(0,u.Cb)({type:h.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,o._)([(0,c.c)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,o._)([(0,u.Cb)({json:{write:!0}})],b.prototype,"transform",void 0),b=s=(0,o._)([(0,y.j)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0;const v=b}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1444],{16306:(e,t,r)=>{r.d(t,{aX:()=>A});var n=r(68773),a=r(20102),s=r(92604),i=r(38913),o=r(58901),l=r(73913),u=r(8744),d=r(40488),p=(r(66577),r(3172)),c=r(33955),f=r(11282),h=r(17452);async function y(e,t,r){const n="string"==typeof e?(0,h.mN)(e):e,a=t[0].spatialReference,s=(0,c.Ji)(t[0]),i={...r,query:{...n.query,f:"json",sr:(0,u.B9)(a),geometries:JSON.stringify((l=t,{geometryType:(0,c.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:o}=await(0,p.Z)(n.path+"/simplify",i);var l;return function(e,t,r){const n=(0,c.q9)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=r,t}))}(o.geometries,s,a)}const m=s.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function w(e,t,r){if(t){const t=function(e,t){if(!(e instanceof o.Z||e instanceof i.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m.error(e),new a.Z(e)}const r=(0,l.x3)(e),n=[];for(const e of r){const r=[];n.push(r),r.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const a=e[n][0],s=e[n][1],i=e[n+1][0],o=e[n+1][1],l=Math.sqrt((i-a)*(i-a)+(o-s)*(o-s)),u=(o-s)/l,d=(i-a)/l,p=l/t;if(p>1){for(let e=1;e<=p-1;e++){const n=e*t,i=d*n+a,o=u*n+s;r.push([i,o])}const e=(l+Math.floor(p-1)*t)/2,n=d*e+a,i=u*e+s;r.push([n,i])}r.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new i.Z({rings:n,spatialReference:e.spatialReference}):new o.Z({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.Sx)(t,!0)}return r&&(e=(0,l.Sy)(e,r)),e}function F(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,l.XZ)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,l.XZ)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,l.XZ)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,l.XZ)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function Z(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const a=t.cutIndexes[n],s=t.geometries[n],i=(0,l.x3)(s);for(let e=0;e<i.length;e++){const t=i[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const n=t[e][0];r=n>r?n:r}r=Number(r.toFixed(9));const n=-360*(0,l.XZ)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(n,0))}return!0}}))}if(a===r){if(g(e))for(const t of(0,l.x3)(s))e[a]=e[a].addRing(t);else if(b(e))for(const t of(0,l.x3)(s))e[a]=e[a].addPath(t)}else r=a,e[a]=s}return e}async function A(e,t,r){if(!Array.isArray(e))return A([e],t);t&&"string"!=typeof t&&m.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const a="string"==typeof t?t:t?.url??n.default.geometryServiceUrl;let s,h,g,b,v,S,I,R,$=0;const E=[],x=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,h=(0,u.C5)(s),g=s.isWebMercator,S=g?102100:4326,b=l.UZ[S].maxX,v=l.UZ[S].minX,I=l.UZ[S].plus180Line,R=l.UZ[S].minus180Line),h)if("mesh"===t.type)x.push(t);else if("point"===t.type)x.push(F(t.clone(),b,v));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>F(e,b,v))),x.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,h);x.push(e.rings?new i.Z(e):e)}else if(t.extent){const e=t.extent,r=(0,l.XZ)(e.xmin,v)*(2*b);let n=0===r?t.clone():(0,l.Sy)(t.clone(),r);e.offset(r,0),e.intersects(I)&&e.xmax!==b?($=e.xmax>$?e.xmax:$,n=w(n,g),E.push(n),x.push("cut")):e.intersects(R)&&e.xmin!==v?($=e.xmax*(2*b)>$?e.xmax*(2*b):$,n=w(n,g,360),E.push(n),x.push("cut")):x.push(n)}else x.push(t.clone());else x.push(t);else x.push(t);let O=(0,l.XZ)($,b),L=-90;const U=O,k=new o.Z;for(;O>0;){const e=360*O-180;k.addPath([[e,L],[e,-1*L]]),L*=-1,O--}if(E.length>0&&U>0){const t=Z(E,await async function(e,t,r,n){const a=(0,f.en)(e),s=t[0].spatialReference,i={...n,responseType:"json",query:{...a.query,f:"json",sr:(0,u.B9)(s),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},o=await(0,p.Z)(a.path+"/cut",i),{cutIndexes:l,geometries:d=[]}=o.data;return{cutIndexes:l,geometries:d.map((e=>{const t=(0,c.im)(e);return t.spatialReference=s,t}))}}(a,E,k,r)),n=[],s=[];for(let r=0;r<x.length;r++){const a=x[r];if("cut"!==a)s.push(a);else{const a=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&a.rings.length>=i.rings.length?(n.push(a),s.push("simplify")):s.push(g?(0,d.$)(a):a)}}if(!n.length)return s;const i=await y(a,n,r),o=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?o.push(t):o.push(g?(0,d.$)(i.shift()):i.shift())}return o}const X=[];for(let e=0;e<x.length;e++){const t=x[e];if("cut"!==t)X.push(t);else{const e=E.shift();X.push(!0===g?(0,d.$)(e):e)}}return X}},73913:(e,t,r)=>{r.d(t,{Sy:()=>l,UZ:()=>i,XZ:()=>o,x3:()=>u});var n=r(58901),a=r(82971),s=r(33955);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.Z.WebMercator}),minus180Line:new n.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.Z({paths:[[[180,-180],[180,180]]],spatialReference:a.Z.WGS84}),minus180Line:new n.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:a.Z.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,s.oU)(e)?e.rings:e.paths}},14720:(e,t,r)=>{r.d(t,{Ey:()=>F,applyEdits:()=>Z,aw:()=>b,uploadAssets:()=>E});var n=r(38171),a=r(46791),s=r(20102),i=r(22974),o=r(92604),l=r(95330),u=r(17452),d=r(41123),p=r(16306),c=r(66361),f=r(69165),h=r(2981),y=r(84230);function m(e){return null!=e?.applyEdits}function g(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function b(e){return e.every(g)}function w(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(w)}async function Z(e,t,r,n={}){let u;const p="gdbVersion"in e?e.gdbVersion:null,f=n.gdbVersion??p;if((0,c.lQ)(e)&&e.url)u=(0,c.jF)(e.url,e.layerId,f,"original-and-current-features"===n.returnServiceEditsOption);else{u=(0,l.hh)(),u.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:u.promise};e.emit("apply-edits",t)}try{const{results:l,edits:p}=await async function(e,t,r,n){if(await e.load(),!m(t))throw new s.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,y.ln)(e))throw new s.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:l}=await async function(e,t,r){const n=(0,y.S1)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),l=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),u=null!=e.infoFor3D;if(function(e,t,r,n,a,i){if(!e||!n&&!a)throw new s.Z(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new s.Z(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&a)throw new s.Z(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&a)throw new s.Z(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,n,r,!!i,!!l,`${e.type}-layer`),!n.data.isVersioned&&r?.gdbVersion)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!n.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const p={...r};if(null!=p.rollbackOnFailureEnabled||n.editing.supportsRollbackOnFailure||(p.rollbackOnFailureEnabled=!0),p.rollbackOnFailureEnabled||"original-and-current-features"!==p.returnServiceEditsOption||(!1===p.rollbackOnFailureEnabled&&o.Z.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwrritten and set to true."),p.rollbackOnFailureEnabled=!0),!n.editing.supportsReturnServiceEditsInSourceSpatialReference&&p.returnServiceEditsInSourceSR)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(p.returnServiceEditsInSourceSR&&"original-and-current-features"!==p.returnServiceEditsOption)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const c=function(e,t,r){const n=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&a.Z.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(n.addFeatures?.length&&!t.operations.supportsAdd)throw new s.Z(`${r}:unsupported-operation`,"Layer does not support adding features.");if(n.updateFeatures?.length&&!t.operations.supportsUpdate)throw new s.Z(`${r}:unsupported-operation`,"Layer does not support updating features.");if(n.deleteFeatures?.length&&!t.operations.supportsDelete)throw new s.Z(`${r}:unsupported-operation`,"Layer does not support deleting features.");return n.addFeatures=n.addFeatures.map(R),n.updateFeatures=n.updateFeatures.map(R),n.addAssetFeatures=[],n}(t,n,`${e.type}-layer`),f=r?.globalIdUsed||u,m=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(f){const{globalIdField:t}=e;if(null==t)throw new s.Z(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");c.addFeatures.forEach((e=>function(e,t){const{attributes:r}=e;null==r[t]&&(r[t]=(0,d.z)())}(e,t)))}return c.addFeatures.forEach((t=>function(e,t,r,n){A(e,t,r,n),v(e,t)}(t,e,f,m))),c.updateFeatures.forEach((t=>function(e,t,r,n){A(e,t,r,n),v(e,t);const a=(0,y.S1)(t);if("geometry"in e&&null!=e.geometry&&!a?.editing.supportsGeometryUpdate)throw new s.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,f,m))),c.deleteFeatures.forEach((t=>function(e,t,r,n){A(e,t,r,n)}(t,e,f,m))),c.addAttachments.forEach((t=>S(t,e))),c.updateAttachments.forEach((t=>S(t,e))),u&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,n=(0,h.S0)("model/gltf-binary",r.supportedFormats)??(0,h.Ow)("glb",r.supportedFormats);if(!n||!r.editFormats.includes(n))throw new s.Z(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:a}=e;for(const t of e.addFeatures??[])$(t)&&a.push(t);for(const t of e.updateFeatures??[])$(t)&&a.push(t)}(c,e),{edits:await I(c),options:p}}(e,r,n);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,l)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,n),c=e=>e.filter((e=>!e.error)).map(i.d9),f={edits:p,addedFeatures:c(l.addFeatureResults),updatedFeatures:c(l.updateFeatureResults),deletedFeatures:c(l.deleteFeatureResults),addedAttachments:c(l.addAttachmentResults),updatedAttachments:c(l.updateAttachmentResults),deletedAttachments:c(l.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:l.editMoment?new Date(l.editMoment):null,globalIdToObjectId:n.globalIdToObjectId};return l.editedFeatureResults?.length&&(f.editedFeatures=l.editedFeatureResults),u.resolve(f),l}catch(e){throw u.reject(e),e}}function A(e,t,r,n){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new s.Z(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(n.length&&"attributes"in e)for(const r of n){const n=e.attributes[r.name];if(void 0!==n&&!(0,f.d2)(r,n))throw new s.Z(`${t.type}-layer:invalid-parameter`,`Big-integer field '${r.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new s.Z(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new s.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function v(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D){const{geometry:r}=e;if(r.vertexSpace.isGeoreferenced)throw new s.Z(`${t.type}-layer:georeferenced-mesh-unsupported`,"Uploading georeferenced meshes to a layer is not supported.")}}function S(e,t){const{feature:r,attachment:n}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!n.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!n.data&&!n.uploadId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(n.data instanceof File&&n.data.name||n.name))throw new s.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&n.uploadId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof n.data){const e=(0,u.sJ)(n.data);if(e&&!e.isBase64)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function I(e){const t=e.addFeatures??[],r=e.updateFeatures??[],n=t.concat(r).map((e=>e.geometry)),a=await(0,p.aX)(n),s=t.length,i=r.length;return a.slice(0,s).forEach(((e,r)=>t[r].geometry=e)),a.slice(s,s+i).forEach(((e,t)=>r[t].geometry=e)),e}function R(e){const t=new n.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function $(e){return"mesh"===e?.geometry?.type}function E(e,t,r,n){if(!m(t))throw new s.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new s.Z(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,n)}},2981:(e,t,r)=>{r.d(t,{$6:()=>h,$z:()=>s,F7:()=>a,Ow:()=>o,S0:()=>i,d1:()=>l,dm:()=>u});const n=[["binary","application/octet-stream","bin",""]];function a(e,t){return null!=p(t.name,e?.supportedFormats??[])}function s(e,t){if(!e)return!1;const r=u(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function i(e,t){return c(function(e,t){const r=e.toLowerCase();return d(t).find((e=>f(e)===r))}(e,t))}function o(e,t){return c(p(e,t))}function l(e,t){return f(function(e,t){return d(t).find((t=>c(t)===e))}(e,t))}function u(e,t){return o(e.name,t)??i(e.type,t)}function d(e){return[...n,...e]}function p(e,t){const r=e.toLowerCase();return d(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>r.endsWith(e)))))}function c(e){return e?.[0]}function f(e){return e?.[1].toLowerCase()}function h(e){return e.tables?.find((e=>"assetMaps"===e.role))}},11282:(e,t,r)=>{r.d(t,{cv:()=>o,en:()=>i,lA:()=>s}),r(68773),r(40330);var n=r(22974),a=r(17452);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,a.mN)(e):(0,n.d9)(e)}function o(e,t,r){const n={};for(const a in e){if("declaredClass"===a)continue;const s=e[a];if(null!=s&&"function"!=typeof s)if(Array.isArray(s)){n[a]=[];for(let e=0;e<s.length;e++)n[a][e]=o(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(r?.[a]);n[a]=t?e:JSON.stringify(e)}else n[a]=t?s:JSON.stringify(s);else n[a]=s}return n}r(71058)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1444],{16306:(e,t,r)=>{r.d(t,{aX:()=>A});var n=r(68773),a=r(20102),s=r(92604),i=r(38913),o=r(58901),l=r(73913),u=r(8744),d=r(40488),p=(r(66577),r(3172)),c=r(33955),f=r(11282),h=r(17452);async function y(e,t,r){const n="string"==typeof e?(0,h.mN)(e):e,a=t[0].spatialReference,s=(0,c.Ji)(t[0]),i={...r,query:{...n.query,f:"json",sr:(0,u.B9)(a),geometries:JSON.stringify((l=t,{geometryType:(0,c.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:o}=await(0,p.Z)(n.path+"/simplify",i);var l;return function(e,t,r){const n=(0,c.q9)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=r,t}))}(o.geometries,s,a)}const m=s.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function w(e,t,r){if(t){const t=function(e,t){if(!(e instanceof o.Z||e instanceof i.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m.error(e),new a.Z(e)}const r=(0,l.x3)(e),n=[];for(const e of r){const r=[];n.push(r),r.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const a=e[n][0],s=e[n][1],i=e[n+1][0],o=e[n+1][1],l=Math.sqrt((i-a)*(i-a)+(o-s)*(o-s)),u=(o-s)/l,d=(i-a)/l,p=l/t;if(p>1){for(let e=1;e<=p-1;e++){const n=e*t,i=d*n+a,o=u*n+s;r.push([i,o])}const e=(l+Math.floor(p-1)*t)/2,n=d*e+a,i=u*e+s;r.push([n,i])}r.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new i.Z({rings:n,spatialReference:e.spatialReference}):new o.Z({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.Sx)(t,!0)}return r&&(e=(0,l.Sy)(e,r)),e}function F(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,l.XZ)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,l.XZ)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,l.XZ)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,l.XZ)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function Z(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const a=t.cutIndexes[n],s=t.geometries[n],i=(0,l.x3)(s);for(let e=0;e<i.length;e++){const t=i[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const n=t[e][0];r=n>r?n:r}r=Number(r.toFixed(9));const n=-360*(0,l.XZ)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(n,0))}return!0}}))}if(a===r){if(g(e))for(const t of(0,l.x3)(s))e[a]=e[a].addRing(t);else if(b(e))for(const t of(0,l.x3)(s))e[a]=e[a].addPath(t)}else r=a,e[a]=s}return e}async function A(e,t,r){if(!Array.isArray(e))return A([e],t);t&&"string"!=typeof t&&m.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const a="string"==typeof t?t:t?.url??n.default.geometryServiceUrl;let s,h,g,b,v,S,I,R,$=0;const E=[],x=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,h=(0,u.C5)(s),g=s.isWebMercator,S=g?102100:4326,b=l.UZ[S].maxX,v=l.UZ[S].minX,I=l.UZ[S].plus180Line,R=l.UZ[S].minus180Line),h)if("mesh"===t.type)x.push(t);else if("point"===t.type)x.push(F(t.clone(),b,v));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>F(e,b,v))),x.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,h);x.push(e.rings?new i.Z(e):e)}else if(t.extent){const e=t.extent,r=(0,l.XZ)(e.xmin,v)*(2*b);let n=0===r?t.clone():(0,l.Sy)(t.clone(),r);e.offset(r,0),e.intersects(I)&&e.xmax!==b?($=e.xmax>$?e.xmax:$,n=w(n,g),E.push(n),x.push("cut")):e.intersects(R)&&e.xmin!==v?($=e.xmax*(2*b)>$?e.xmax*(2*b):$,n=w(n,g,360),E.push(n),x.push("cut")):x.push(n)}else x.push(t.clone());else x.push(t);else x.push(t);let O=(0,l.XZ)($,b),L=-90;const U=O,k=new o.Z;for(;O>0;){const e=360*O-180;k.addPath([[e,L],[e,-1*L]]),L*=-1,O--}if(E.length>0&&U>0){const t=Z(E,await async function(e,t,r,n){const a=(0,f.en)(e),s=t[0].spatialReference,i={...n,responseType:"json",query:{...a.query,f:"json",sr:(0,u.B9)(s),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},o=await(0,p.Z)(a.path+"/cut",i),{cutIndexes:l,geometries:d=[]}=o.data;return{cutIndexes:l,geometries:d.map((e=>{const t=(0,c.im)(e);return t.spatialReference=s,t}))}}(a,E,k,r)),n=[],s=[];for(let r=0;r<x.length;r++){const a=x[r];if("cut"!==a)s.push(a);else{const a=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&a.rings.length>=i.rings.length?(n.push(a),s.push("simplify")):s.push(g?(0,d.$)(a):a)}}if(!n.length)return s;const i=await y(a,n,r),o=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?o.push(t):o.push(g?(0,d.$)(i.shift()):i.shift())}return o}const X=[];for(let e=0;e<x.length;e++){const t=x[e];if("cut"!==t)X.push(t);else{const e=E.shift();X.push(!0===g?(0,d.$)(e):e)}}return X}},73913:(e,t,r)=>{r.d(t,{Sy:()=>l,UZ:()=>i,XZ:()=>o,x3:()=>u});var n=r(58901),a=r(82971),s=r(33955);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.Z.WebMercator}),minus180Line:new n.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.Z({paths:[[[180,-180],[180,180]]],spatialReference:a.Z.WGS84}),minus180Line:new n.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:a.Z.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,s.oU)(e)?e.rings:e.paths}},14720:(e,t,r)=>{r.d(t,{Ey:()=>F,applyEdits:()=>Z,aw:()=>b,uploadAssets:()=>E});var n=r(38171),a=r(46791),s=r(20102),i=r(22974),o=r(92604),l=r(95330),u=r(17452),d=r(41123),p=r(16306),c=r(66361),f=r(69165),h=r(2981),y=r(84230);function m(e){return null!=e?.applyEdits}function g(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function b(e){return e.every(g)}function w(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(w)}async function Z(e,t,r,n={}){let u;const p="gdbVersion"in e?e.gdbVersion:null,f=n.gdbVersion??p;if((0,c.lQ)(e)&&e.url)u=(0,c.jF)(e.url,e.layerId,f,"original-and-current-features"===n.returnServiceEditsOption);else{u=(0,l.hh)(),u.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:u.promise};e.emit("apply-edits",t)}try{const{results:l,edits:p}=await async function(e,t,r,n){if(await e.load(),!m(t))throw new s.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,y.ln)(e))throw new s.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:l}=await async function(e,t,r){const n=(0,y.S1)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),l=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),u=null!=e.infoFor3D;if(function(e,t,r,n,a,i){if(!e||!n&&!a)throw new s.Z(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new s.Z(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&a)throw new s.Z(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&a)throw new s.Z(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,n,r,!!i,!!l,`${e.type}-layer`),!n.data.isVersioned&&r?.gdbVersion)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!n.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const p={...r};if(null!=p.rollbackOnFailureEnabled||n.editing.supportsRollbackOnFailure||(p.rollbackOnFailureEnabled=!0),p.rollbackOnFailureEnabled||"original-and-current-features"!==p.returnServiceEditsOption||(!1===p.rollbackOnFailureEnabled&&o.Z.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwrritten and set to true."),p.rollbackOnFailureEnabled=!0),!n.editing.supportsReturnServiceEditsInSourceSpatialReference&&p.returnServiceEditsInSourceSR)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(p.returnServiceEditsInSourceSR&&"original-and-current-features"!==p.returnServiceEditsOption)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const c=function(e,t,r){const n=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&a.Z.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(n.addFeatures?.length&&!t.operations.supportsAdd)throw new s.Z(`${r}:unsupported-operation`,"Layer does not support adding features.");if(n.updateFeatures?.length&&!t.operations.supportsUpdate)throw new s.Z(`${r}:unsupported-operation`,"Layer does not support updating features.");if(n.deleteFeatures?.length&&!t.operations.supportsDelete)throw new s.Z(`${r}:unsupported-operation`,"Layer does not support deleting features.");return n.addFeatures=n.addFeatures.map(R),n.updateFeatures=n.updateFeatures.map(R),n.addAssetFeatures=[],n}(t,n,`${e.type}-layer`),f=r?.globalIdUsed||u,m=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(f){const{globalIdField:t}=e;if(null==t)throw new s.Z(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");c.addFeatures.forEach((e=>function(e,t){const{attributes:r}=e;null==r[t]&&(r[t]=(0,d.zS)())}(e,t)))}return c.addFeatures.forEach((t=>function(e,t,r,n){A(e,t,r,n),v(e,t)}(t,e,f,m))),c.updateFeatures.forEach((t=>function(e,t,r,n){A(e,t,r,n),v(e,t);const a=(0,y.S1)(t);if("geometry"in e&&null!=e.geometry&&!a?.editing.supportsGeometryUpdate)throw new s.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,f,m))),c.deleteFeatures.forEach((t=>function(e,t,r,n){A(e,t,r,n)}(t,e,f,m))),c.addAttachments.forEach((t=>S(t,e))),c.updateAttachments.forEach((t=>S(t,e))),u&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,n=(0,h.S0)("model/gltf-binary",r.supportedFormats)??(0,h.Ow)("glb",r.supportedFormats);if(!n||!r.editFormats.includes(n))throw new s.Z(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:a}=e;for(const t of e.addFeatures??[])$(t)&&a.push(t);for(const t of e.updateFeatures??[])$(t)&&a.push(t)}(c,e),{edits:await I(c),options:p}}(e,r,n);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,l)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,n),c=e=>e.filter((e=>!e.error)).map(i.d9),f={edits:p,addedFeatures:c(l.addFeatureResults),updatedFeatures:c(l.updateFeatureResults),deletedFeatures:c(l.deleteFeatureResults),addedAttachments:c(l.addAttachmentResults),updatedAttachments:c(l.updateAttachmentResults),deletedAttachments:c(l.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:l.editMoment?new Date(l.editMoment):null,globalIdToObjectId:n.globalIdToObjectId};return l.editedFeatureResults?.length&&(f.editedFeatures=l.editedFeatureResults),u.resolve(f),l}catch(e){throw u.reject(e),e}}function A(e,t,r,n){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new s.Z(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(n.length&&"attributes"in e)for(const r of n){const n=e.attributes[r.name];if(void 0!==n&&!(0,f.d2)(r,n))throw new s.Z(`${t.type}-layer:invalid-parameter`,`Big-integer field '${r.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new s.Z(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new s.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function v(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D){const{geometry:r}=e;if(r.vertexSpace.isGeoreferenced)throw new s.Z(`${t.type}-layer:georeferenced-mesh-unsupported`,"Uploading georeferenced meshes to a layer is not supported.")}}function S(e,t){const{feature:r,attachment:n}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!n.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!n.data&&!n.uploadId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(n.data instanceof File&&n.data.name||n.name))throw new s.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&n.uploadId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof n.data){const e=(0,u.sJ)(n.data);if(e&&!e.isBase64)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function I(e){const t=e.addFeatures??[],r=e.updateFeatures??[],n=t.concat(r).map((e=>e.geometry)),a=await(0,p.aX)(n),s=t.length,i=r.length;return a.slice(0,s).forEach(((e,r)=>t[r].geometry=e)),a.slice(s,s+i).forEach(((e,t)=>r[t].geometry=e)),e}function R(e){const t=new n.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function $(e){return"mesh"===e?.geometry?.type}function E(e,t,r,n){if(!m(t))throw new s.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new s.Z(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,n)}},2981:(e,t,r)=>{r.d(t,{$6:()=>h,$z:()=>s,F7:()=>a,Ow:()=>o,S0:()=>i,d1:()=>l,dm:()=>u});const n=[["binary","application/octet-stream","bin",""]];function a(e,t){return null!=p(t.name,e?.supportedFormats??[])}function s(e,t){if(!e)return!1;const r=u(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function i(e,t){return c(function(e,t){const r=e.toLowerCase();return d(t).find((e=>f(e)===r))}(e,t))}function o(e,t){return c(p(e,t))}function l(e,t){return f(function(e,t){return d(t).find((t=>c(t)===e))}(e,t))}function u(e,t){return o(e.name,t)??i(e.type,t)}function d(e){return[...n,...e]}function p(e,t){const r=e.toLowerCase();return d(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>r.endsWith(e)))))}function c(e){return e?.[0]}function f(e){return e?.[1].toLowerCase()}function h(e){return e.tables?.find((e=>"assetMaps"===e.role))}},11282:(e,t,r)=>{r.d(t,{cv:()=>o,en:()=>i,lA:()=>s}),r(68773),r(40330);var n=r(22974),a=r(17452);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,a.mN)(e):(0,n.d9)(e)}function o(e,t,r){const n={};for(const a in e){if("declaredClass"===a)continue;const s=e[a];if(null!=s&&"function"!=typeof s)if(Array.isArray(s)){n[a]=[];for(let e=0;e<s.length;e++)n[a][e]=o(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(r?.[a]);n[a]=t?e:JSON.stringify(e)}else n[a]=t?s:JSON.stringify(s);else n[a]=s}return n}r(71058)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[299,5935],{44543:(e,t,r)=>{r.d(t,{F:()=>f,M:()=>i});const i={Base64:0,Hex:1,String:2,Raw:3},s=8,n=(1<<s)-1;function o(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e){const t=[];for(let r=0,i=e.length*s;r<i;r+=s)t[r>>5]|=(e.charCodeAt(r/s)&n)<<r%32;return t}function l(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=s)t.push(String.fromCharCode(e[r>>5]>>>r%32&n));return t.join("")}function d(e,t,r,i,s,n){return o(function(e,t){return e<<t|e>>>32-t}(o(o(t,e),o(i,n)),s),r)}function u(e,t,r,i,s,n,o){return d(t&r|~t&i,e,t,s,n,o)}function c(e,t,r,i,s,n,o){return d(t&i|r&~i,e,t,s,n,o)}function p(e,t,r,i,s,n,o){return d(t^r^i,e,t,s,n,o)}function y(e,t,r,i,s,n,o){return d(r^(t|~i),e,t,s,n,o)}function h(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,s=-1732584194,n=271733878;for(let t=0;t<e.length;t+=16){const a=r,l=i,d=s,h=n;r=u(r,i,s,n,e[t],7,-680876936),n=u(n,r,i,s,e[t+1],12,-389564586),s=u(s,n,r,i,e[t+2],17,606105819),i=u(i,s,n,r,e[t+3],22,-1044525330),r=u(r,i,s,n,e[t+4],7,-176418897),n=u(n,r,i,s,e[t+5],12,1200080426),s=u(s,n,r,i,e[t+6],17,-1473231341),i=u(i,s,n,r,e[t+7],22,-45705983),r=u(r,i,s,n,e[t+8],7,1770035416),n=u(n,r,i,s,e[t+9],12,-1958414417),s=u(s,n,r,i,e[t+10],17,-42063),i=u(i,s,n,r,e[t+11],22,-1990404162),r=u(r,i,s,n,e[t+12],7,1804603682),n=u(n,r,i,s,e[t+13],12,-40341101),s=u(s,n,r,i,e[t+14],17,-1502002290),i=u(i,s,n,r,e[t+15],22,1236535329),r=c(r,i,s,n,e[t+1],5,-165796510),n=c(n,r,i,s,e[t+6],9,-1069501632),s=c(s,n,r,i,e[t+11],14,643717713),i=c(i,s,n,r,e[t],20,-373897302),r=c(r,i,s,n,e[t+5],5,-701558691),n=c(n,r,i,s,e[t+10],9,38016083),s=c(s,n,r,i,e[t+15],14,-660478335),i=c(i,s,n,r,e[t+4],20,-405537848),r=c(r,i,s,n,e[t+9],5,568446438),n=c(n,r,i,s,e[t+14],9,-1019803690),s=c(s,n,r,i,e[t+3],14,-187363961),i=c(i,s,n,r,e[t+8],20,1163531501),r=c(r,i,s,n,e[t+13],5,-1444681467),n=c(n,r,i,s,e[t+2],9,-51403784),s=c(s,n,r,i,e[t+7],14,1735328473),i=c(i,s,n,r,e[t+12],20,-1926607734),r=p(r,i,s,n,e[t+5],4,-378558),n=p(n,r,i,s,e[t+8],11,-2022574463),s=p(s,n,r,i,e[t+11],16,1839030562),i=p(i,s,n,r,e[t+14],23,-35309556),r=p(r,i,s,n,e[t+1],4,-1530992060),n=p(n,r,i,s,e[t+4],11,1272893353),s=p(s,n,r,i,e[t+7],16,-155497632),i=p(i,s,n,r,e[t+10],23,-1094730640),r=p(r,i,s,n,e[t+13],4,681279174),n=p(n,r,i,s,e[t],11,-358537222),s=p(s,n,r,i,e[t+3],16,-722521979),i=p(i,s,n,r,e[t+6],23,76029189),r=p(r,i,s,n,e[t+9],4,-640364487),n=p(n,r,i,s,e[t+12],11,-421815835),s=p(s,n,r,i,e[t+15],16,530742520),i=p(i,s,n,r,e[t+2],23,-995338651),r=y(r,i,s,n,e[t],6,-198630844),n=y(n,r,i,s,e[t+7],10,1126891415),s=y(s,n,r,i,e[t+14],15,-1416354905),i=y(i,s,n,r,e[t+5],21,-57434055),r=y(r,i,s,n,e[t+12],6,1700485571),n=y(n,r,i,s,e[t+3],10,-1894986606),s=y(s,n,r,i,e[t+10],15,-1051523),i=y(i,s,n,r,e[t+1],21,-2054922799),r=y(r,i,s,n,e[t+8],6,1873313359),n=y(n,r,i,s,e[t+15],10,-30611744),s=y(s,n,r,i,e[t+6],15,-1560198380),i=y(i,s,n,r,e[t+13],21,1309151649),r=y(r,i,s,n,e[t+4],6,-145523070),n=y(n,r,i,s,e[t+11],10,-1120210379),s=y(s,n,r,i,e[t+2],15,718787259),i=y(i,s,n,r,e[t+9],21,-343485551),r=o(r,a),i=o(i,l),s=o(s,d),n=o(n,h)}return[r,i,s,n]}function f(e,t=i.Hex){const r=t||i.Base64,n=h(a(e),e.length*s);switch(r){case i.Raw:return n;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,s=4*e.length;i<s;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(n);case i.String:return l(n);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let s=0;s<4;s++)8*r+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-s)&63))}return t.join("")}(n)}}},28576:(e,t,r)=>{r.d(t,{B:()=>y});var i=r(20102),s=r(44543),n=r(81153),o=r(17452),a=r(41123),l=r(7628),d=r(31263),u=r(5600),c=r(66094),p=r(25929);function y(e){const t=e?.origins??[void 0];return(r,i)=>{const s=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,l.Oe)(t,r);return{type:String,read:(e,t,r)=>{const s=(0,p.r)(e,t,r);return i.type===String?s:"function"==typeof i.type?new i.type({url:s}):void 0},write:{writer(t,s,a,l){if(!l?.resources)return"string"==typeof t?void(s[a]=(0,p.t)(t,l)):void(s[a]=t.write({},l));const u=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),y=(0,p.t)(u,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},p.M.NO),g=i.type!==String&&(!(0,n.l)(this)||l?.origin&&this.originIdOf(r)>(0,d.M9)(l.origin)),b={object:this,propertyName:r,value:t,targetUrl:y,dest:s,targetPropertyName:a,context:l,params:e};l?.portalItem&&y&&!(0,o.YP)(y)?g&&e?.contentAddressed?h(b):g?function(e){const{context:t,targetUrl:r,params:i,value:s,dest:n,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),d=m(s,r,t),u=(0,c.B)(d),p=(0,o.Ml)(l.path),y=i?.compress??!1;u===p?(t.resources&&f({...e,resource:l,content:d,compress:y,updates:t.resources.toUpdate}),n[a]=r):h(e)}(b):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(b):l?.portalItem&&(null==y||null!=(0,p.i)(y)||(0,o.jc)(y)||g)?h(b):s[a]=y}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=p.a;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,u.CJ)(r,e,i);for(const e in s)t[e]=s[e]}}}function h(e){const{targetUrl:t,params:r,value:n,context:l,dest:d,targetPropertyName:u}=e;if(!l.portalItem)return;const y=(0,p.p)(t),h=m(n,t,l);if(r?.contentAddressed&&"json"!==h.type)return void l.messages?.push(new i.Z("persistable:contentAddressingUnsupported",`Property "${u}" is trying to serializing a resource with content of type ${h.type} with content addressing. Content addressing is only supported for json resources.`,{content:h}));const g=r?.contentAddressed&&"json"===h.type?(0,s.F)(h.jsonString):y?.filename??(0,a.DO)(),b=(0,o.v_)(r?.prefix??y?.prefix,g),w=`${b}.${(0,c.B)(h)}`;if(r?.contentAddressed&&l.resources&&"json"===h.type){const e=l.resources.toKeep.find((e=>e.resource.path===w))??l.resources.toAdd.find((e=>e.resource.path===w));if(e)return void(d[u]=e.resource.itemRelativeUrl)}const v=l.portalItem.resourceFromPath(w);(0,o.jc)(t)&&l.resources&&l.resources.pendingOperations.push((0,o.gi)(t).then((e=>{v.path=`${b}.${(0,c.B)({type:"blob",blob:e})}`,d[u]=v.itemRelativeUrl})).catch((()=>{})));const I=r?.compress??!1;l.resources&&f({...e,resource:v,content:h,compress:I,updates:l.resources.toAdd}),d[u]=v.itemRelativeUrl}function f({object:e,propertyName:t,updates:r,resource:i,content:s,compress:n}){r.push({resource:i,content:s,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function m(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},41123:(e,t,r)=>{r.d(t,{DO:()=>s,dG:()=>o,zS:()=>n});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${s().toUpperCase()}}`}function o(){return`{${s()}}`}},79235:(e,t,r)=>{r.d(t,{Z:()=>w});var i,s=r(43697),n=r(67676),o=r(35454),a=r(96674),l=r(67900),d=r(20941),u=r(5600),c=(r(75215),r(80442),r(71715)),p=r(52011),y=r(30556);const h=(0,o.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=h.jsonValues.slice();(0,n.e$)(f,"orthometric");const m=(0,o.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 g=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?.messages&&r.messages.push(function(e,t){return new d.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return m.read(e)||(r?.messages&&r.messages.push(b(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.$C)(e)||m.read(e)||(r?.messages&&r.messages.push(b(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 b(e,t){return new d.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:f,default:"ellipsoidal"}}}})],g.prototype,"heightModel",void 0),(0,s._)([(0,y.c)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,s._)([(0,c.r)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,s._)([(0,u.Cb)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:m.write}}}})],g.prototype,"heightUnit",void 0),(0,s._)([(0,c.r)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,s._)([(0,c.r)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,s._)([(0,u.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,s._)([(0,c.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=i=(0,s._)([(0,p.j)("esri.geometry.HeightModelInfo")],g);const w=g},57476:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ge});var i=r(43697),s=r(38171),n=r(51773),o=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),a=r(3172),l=r(2368),d=r(46791),u=r(20102),c=r(92604),p=r(16453),y=r(95330),h=r(17445),f=r(17452),m=r(5600),g=(r(75215),r(67676),r(80442),r(1153)),b=r(71715),w=r(52011),v=r(31263),I=r(87085),S=r(54295),_=r(17287),F=r(66361),j=r(38009),C=r(16859),L=r(72965),x=r(37253),R=r(66677),O=r(71592),A=r(15506),E=r(21506),Z=r(45574),P=r(61960),M=r(85857),U=r(53518),q=r(99514),T=r(69165),N=r(51161),D=r(54306),V=r(30707),k=r(56765),G=r(87344),H=r(96674);let $=class extends H.wq{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,i._)([(0,m.Cb)({type:String,json:{read:!0,write:!0}})],$.prototype,"name",void 0),(0,i._)([(0,m.Cb)({type:String,json:{read:!0,write:!0}})],$.prototype,"field",void 0),(0,i._)([(0,m.Cb)({type:[Number],json:{read:!0,write:!0}})],$.prototype,"currentRangeExtent",void 0),(0,i._)([(0,m.Cb)({type:[Number],json:{read:!0,write:!0}})],$.prototype,"fullRangeExtent",void 0),(0,i._)([(0,m.Cb)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:!0}})],$.prototype,"type",void 0),$=(0,i._)([(0,w.j)("esri.layers.support.RangeInfo")],$);var Q,J=r(22974),B=r(28576),z=r(20941),K=r(38913),W=r(73615);let Y=Q=class extends((0,H.eC)(d.Z.ofType(K.Z))){constructor(e){super(e)}clone(){return new Q(this.items.map((e=>e.clone())))}write(e,t){return this.toJSON(t)}toJSON(e){const t=e?.layer?.spatialReference;return t?this.toArray().map((r=>{if(!t.equals(r.spatialReference)){if(!(0,W.canProjectWithoutEngine)(r.spatialReference,t))return e?.messages&&e.messages.push(new z.Z("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const i=new K.Z;(0,W.projectPolygon)(r,i,t),r=i}const i=r.toJSON(e);return delete i.spatialReference,i})).filter((e=>null!=e)):(e?.messages&&e.messages.push(new z.Z("scenefilter:unsupported","Writing Scene filters without context layer is not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),this.toArray().map((t=>t.toJSON(e))))}static fromJSON(e,t){const r=new Q;return e.forEach((e=>r.add(K.Z.fromJSON(e,t)))),r}};Y=Q=(0,i._)([(0,w.j)("esri.layers.support.PolygonCollection")],Y);const X=Y;var ee,te=r(25929);let re=ee=class extends H.wq{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new X,this._geometriesSource=null}initialize(){this.addHandles((0,h.on)((()=>this.geometries),"after-changes",(()=>this.geometries=this.geometries),h.Z_))}readGeometries(e,t,r){Array.isArray(e)?this.geometries=X.fromJSON(e,r):this._geometriesSource={url:(0,te.f)(e,r),context:r}}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:r,context:i}=this._geometriesSource,s=await(0,a.Z)(r,{responseType:"json",signal:t?.signal}),n=e.toJSON(),o=s.data.map((e=>({...e,spatialReference:n})));this.geometries=X.fromJSON(o,i),this._geometriesSource=null}clone(){const e=new ee({geometries:(0,J.d9)(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};(0,i._)([(0,m.Cb)({type:["disjoint","contains"],nonNullable:!0,json:{write:!0}})],re.prototype,"spatialRelationship",void 0),(0,i._)([(0,m.Cb)({type:X,nonNullable:!0,json:{write:!0}}),(0,B.B)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],re.prototype,"geometries",void 0),(0,i._)([(0,b.r)(["web-scene","portal-item"],"geometries")],re.prototype,"readGeometries",null),re=ee=(0,i._)([(0,w.j)("esri.layers.support.SceneFilter")],re);const ie=re;var se=r(40555),ne=r(14165),oe=r(36405),ae=r(72245),le=r(32163),de=r(2358),ue=r(19833),ce=r(65242);const pe=new Set(["3DObject","Point"]),ye=(0,U.v)();let he=class extends((0,F.o1)((0,x.Vt)((0,_.Y)((0,j.q)((0,C.I)((0,L.M)((0,p.R)((0,S.V)((0,l.J)(I.Z)))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new d.Z,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new q.Z(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:N.U4.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&(0,Z.sX)(this.associatedLayer)}get geometryType(){return me[this.profile]||"mesh"}set renderer(e){(0,T.YN)(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:A.C;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:n,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:l,supportsM:d,isVersioned:u,supportsAttachment:c},operations:{supportsEditing:p,supportsAdd:y,supportsUpdate:h,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:b}}=e,w=e.operations.supportsChangeTracking,v=!!this.associatedLayer?.infoFor3D&&(0,ae.Rx)();return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:v&&o,supportsUploadWithItemId:n},data:{supportsAttachment:c,supportsZ:l,supportsM:d,isVersioned:u},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:p&&w,supportsAdd:v&&y&&w,supportsDelete:v&&f&&w,supportsUpdate:h&&w,supportsAsyncConvert3D:b}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&fe[r]?fe[r]:(c.Z.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(y.r9),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await(0,se.y)(this,{origin:"service"},t),(0,T.YN)(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){c.Z.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new ne.Z;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new u.Z("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new u.Z("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=(0,T.Lk)(this.fieldsIndex,await(0,ue.e7)(this,(0,ue.V5)(this)));return(0,de.xe)(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new u.Z("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const i=new s.Z;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(c.Z.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,le.eZ)(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new u.Z("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new u.Z("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){if(await this.load(t),!this.statisticsInfo)throw new u.Z("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new u.Z("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const e of this.statisticsInfo)if(e.name===r.name){const r=(0,f.v_)(this.parsedUrl.path,e.href);return(0,a.Z)(r,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new u.Z("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(x.xp.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(x.xp.SAVE,e)}async applyEdits(e,t){const{applyEdits:i}=await r.e(1444).then(r.bind(r,14720));let s=t;await this.load();const n=this.associatedLayer;if(!n)throw new u.Z(`${this.type}-layer:not-editable`,"Service is not editable");await n.load();const{globalIdField:o}=n,a=!!n.infoFor3D,l=s?.globalIdUsed??!0;if(a&&null==o)throw new u.Z(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(a&&!l)throw new u.Z(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return(0,R.M8)(n.url)&&a&&null!=e.deleteFeatures&&null!=o&&(s={...s,globalIdToObjectId:await(0,Z.HW)(n,e.deleteFeatures,o)}),i(this,n.source,e,s)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new u.Z(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}validateLayer(e){if(e.layerType&&!pe.has(e.layerType))throw new u.Z("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new u.Z("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new u.Z("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new u.Z("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new u.Z("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new u.Z("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!(!this.attributeStorageInfo||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=(0,g.vw)(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),n=this.associatedLayer.originIdOf(i);s<n&&(n===v.s3.SERVICE||n===v.s3.PORTAL_ITEM)&&t.setAtOrigin(i,this.associatedLayer[i],n)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.editingInfo?.lastEditDate,t=this.associatedLayer?.serverGens,r=this.associatedLayer?.getAtOrigin("fullExtent","service");(0,ae.Rx)()&&null!=this.associatedLayer?.infoFor3D&&r&&(0,R.M8)(this.associatedLayer?.url)&&e&&this.serviceUpdateTimeStamp?.lastUpdate!==e.getTime()&&(this.serviceUpdateTimeStamp||t?.minServerGen!==t?.serverGen)&&(0,g.vw)(this).setAtOrigin("fullExtent",r.clone(),v.s3.SERVICE)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await(0,O.w)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,apiKey:this.apiKey,signal:e}),s=await G.T.FeatureLayer();this.associatedLayer=new s({url:t,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(e){(0,y.D_)(e)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await(0,h.N1)((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?c.Z.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):c.Z.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&(0,oe.LR)(c.Z.getLogger(this),(0,oe.Wb)("Mesh scene layers","relative-to-scene",e)),(0,oe.LR)(c.Z.getLogger(this),(0,oe.kf)("Scene layers",e))}};(0,i._)([(0,m.Cb)({types:{key:"type",base:P.B,typeMap:{selection:M.Z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],he.prototype,"featureReduction",void 0),(0,i._)([(0,m.Cb)({type:[$],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],he.prototype,"rangeInfos",void 0),(0,i._)([(0,m.Cb)({json:{read:!1}})],he.prototype,"associatedLayer",void 0),(0,i._)([(0,m.Cb)({type:["show","hide"]})],he.prototype,"listMode",void 0),(0,i._)([(0,m.Cb)({type:["ArcGISSceneServiceLayer"]})],he.prototype,"operationalLayerType",void 0),(0,i._)([(0,m.Cb)({json:{read:!1},readOnly:!0})],he.prototype,"type",void 0),(0,i._)([(0,m.Cb)({...ye.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],he.prototype,"fields",void 0),(0,i._)([(0,m.Cb)()],he.prototype,"types",null),(0,i._)([(0,m.Cb)()],he.prototype,"typeIdField",null),(0,i._)([(0,m.Cb)()],he.prototype,"templates",null),(0,i._)([(0,m.Cb)()],he.prototype,"formTemplate",null),(0,i._)([(0,m.Cb)({readOnly:!0,clonable:!1})],he.prototype,"fieldsIndex",null),(0,i._)([(0,m.Cb)({type:k.Z,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],he.prototype,"floorInfo",void 0),(0,i._)([(0,m.Cb)(ye.outFields)],he.prototype,"outFields",void 0),(0,i._)([(0,m.Cb)({type:N.U4,readOnly:!0,json:{read:!1}})],he.prototype,"nodePages",void 0),(0,i._)([(0,b.r)("service","nodePages",["nodePages","pointNodePages"])],he.prototype,"readNodePages",null),(0,i._)([(0,m.Cb)({type:[N.QI],readOnly:!0})],he.prototype,"materialDefinitions",void 0),(0,i._)([(0,m.Cb)({type:[N.Yh],readOnly:!0})],he.prototype,"textureSetDefinitions",void 0),(0,i._)([(0,m.Cb)({type:[N.H3],readOnly:!0})],he.prototype,"geometryDefinitions",void 0),(0,i._)([(0,m.Cb)({readOnly:!0})],he.prototype,"serviceUpdateTimeStamp",void 0),(0,i._)([(0,m.Cb)({readOnly:!0})],he.prototype,"attributeStorageInfo",void 0),(0,i._)([(0,m.Cb)({readOnly:!0})],he.prototype,"statisticsInfo",void 0),(0,i._)([(0,m.Cb)({type:d.Z.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],he.prototype,"excludeObjectIds",void 0),(0,i._)([(0,m.Cb)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],he.prototype,"definitionExpression",void 0),(0,i._)([(0,m.Cb)({type:ie,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],he.prototype,"filter",void 0),(0,i._)([(0,m.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],he.prototype,"path",void 0),(0,i._)([(0,m.Cb)(E.PV)],he.prototype,"elevationInfo",null),(0,i._)([(0,m.Cb)({readOnly:!0,json:{read:!1}})],he.prototype,"effectiveCapabilities",null),(0,i._)([(0,m.Cb)({readOnly:!0})],he.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,m.Cb)({type:String})],he.prototype,"geometryType",null),(0,i._)([(0,m.Cb)(E.iR)],he.prototype,"labelsVisible",void 0),(0,i._)([(0,m.Cb)({type:[D.Z],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:V.r},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:V.r},write:!0}})],he.prototype,"labelingInfo",void 0),(0,i._)([(0,m.Cb)(E.rn)],he.prototype,"legendEnabled",void 0),(0,i._)([(0,m.Cb)({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?(0,ce.b)(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],he.prototype,"opacity",void 0),(0,i._)([(0,m.Cb)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],he.prototype,"priority",void 0),(0,i._)([(0,m.Cb)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],he.prototype,"semantic",void 0),(0,i._)([(0,m.Cb)({types:o.o,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],he.prototype,"renderer",null),(0,i._)([(0,m.Cb)({json:{read:!1}})],he.prototype,"cachedDrawingInfo",void 0),(0,i._)([(0,b.r)("service","cachedDrawingInfo")],he.prototype,"readCachedDrawingInfo",null),(0,i._)([(0,m.Cb)({readOnly:!0,json:{read:!1}})],he.prototype,"capabilities",null),(0,i._)([(0,m.Cb)({type:Boolean,json:{read:!1}})],he.prototype,"editingEnabled",null),(0,i._)([(0,m.Cb)({readOnly:!0,json:{write:!1,read:!1}})],he.prototype,"infoFor3D",null),(0,i._)([(0,m.Cb)({readOnly:!0,json:{write:!1,read:!1}})],he.prototype,"relationships",null),(0,i._)([(0,m.Cb)(E.C_)],he.prototype,"popupEnabled",void 0),(0,i._)([(0,m.Cb)({type:n.Z,json:{name:"popupInfo",write:!0}})],he.prototype,"popupTemplate",void 0),(0,i._)([(0,m.Cb)({readOnly:!0,json:{read:!1}})],he.prototype,"defaultPopupTemplate",null),(0,i._)([(0,m.Cb)({type:String,json:{read:!1}})],he.prototype,"objectIdField",void 0),(0,i._)([(0,b.r)("service","objectIdField",["objectIdField","fields"])],he.prototype,"readObjectIdField",null),(0,i._)([(0,m.Cb)({type:String,json:{read:!1}})],he.prototype,"globalIdField",void 0),(0,i._)([(0,b.r)("service","globalIdField",["globalIdField","fields"])],he.prototype,"readGlobalIdField",null),(0,i._)([(0,m.Cb)({readOnly:!0,type:String,json:{read:!1}})],he.prototype,"displayField",null),(0,i._)([(0,m.Cb)({type:String,json:{read:!1}})],he.prototype,"profile",void 0),(0,i._)([(0,b.r)("service","profile",["store.profile"])],he.prototype,"readProfile",null),(0,i._)([(0,m.Cb)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],he.prototype,"normalReferenceFrame",void 0),(0,i._)([(0,m.Cb)(E.YI)],he.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,m.Cb)({json:{read:!1,origins:{service:{read:!0}}}})],he.prototype,"serviceItemId",void 0),he=(0,i._)([(0,w.j)("esri.layers.SceneLayer")],he);const fe={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},me={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},ge=he},66361:(e,t,r)=>{r.d(t,{jF:()=>u,lQ:()=>y,o1:()=>m});var i=r(43697),s=r(32448),n=r(22974),o=r(95330),a=(r(92604),r(75215),r(20102),r(80442),r(52011)),l=r(18596);const d=new s.Z.EventEmitter;function u(e,t,r=null,i=!1){const s=(0,o.hh)();return i=null==t||i,d.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:i,result:s.promise}),s}const c="esri.layers.mixins.EditBusLayer",p=Symbol(c);function y(e){return null!=e&&"object"==typeof e&&p in e}function h(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function f(e,t,r){const i=new URL(e).host,s=l.Jp.get(i),n=e=>!e||e===s;return n(t)&&n(r)||t===r}const m=e=>{var t;let r=class extends e{constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:r,gdbVersion:i,mayReceiveServiceEdits:s,result:o}=e,a=t===this.url,d=null!=r&&null!=this.layerId&&r===this.layerId,u=h(this),c=h(this)&&f(t,i,this.gdbVersion);if(!a||u&&!c||!d&&!s)return;const p=o.then((e=>{if(d&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.d9)(e)),e;const t=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(t){const{adds:r,updates:i,deletes:s}=t.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:r?r.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:s?s.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:i?i.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,n.d9)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.d9)(e.historicMoment)};return this.emit("edits",o),o}return{edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.d9)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.d9)(e.historicMoment)}})).then((e=>("historicMoment"in this&&this.historicMoment!==e.historicMoment&&(0,l.JV)(t,i)&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:p})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:i}=e,s=t===this.url,n=h(this),o=h(this)&&f(t,r,this.gdbVersion),a=h(this)&&!f(t,this.gdbVersion,null);s&&n&&o&&a&&"historicMoment"in this&&this.historicMoment!==i&&(this.historicMoment=i)},this.when().then((()=>{this.addHandles(function(e){return d.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return d.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}};return t=p,r=(0,i._)([(0,a.j)(c)],r),r}},72965:(e,t,r)=>{r.d(t,{M:()=>o});var i=r(43697),s=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,s.Cb)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.ScaleRangeLayer")],t),t}},61960:(e,t,r)=>{r.d(t,{B:()=>a});var i=r(43697),s=r(96674),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011));let a=class extends s.wq{constructor(){super(...arguments),this.type=null}};(0,i._)([(0,n.Cb)({type:["selection","cluster","binning"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,i._)([(0,o.j)("esri.layers.support.FeatureReduction")],a)},85857:(e,t,r)=>{r.d(t,{Z:()=>d});var i,s=r(43697),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011)),a=r(61960);let l=i=class extends a.B{constructor(e){super(e),this.type="selection"}clone(){return new i}};(0,s._)([(0,n.Cb)({type:["selection"]})],l.prototype,"type",void 0),l=i=(0,s._)([(0,o.j)("esri.layers.support.FeatureReductionSelection")],l);const d=l},45574:(e,t,r)=>{r.d(t,{JD:()=>w,Jj:()=>S,sX:()=>N,Ob:()=>V,rP:()=>Z,FV:()=>F,nU:()=>T,Ci:()=>j,Fr:()=>b,HW:()=>G,gG:()=>E,uA:()=>k,SU:()=>C,KE:()=>R,VG:()=>x,tD:()=>L,kp:()=>O,C9:()=>A,rk:()=>P,kZ:()=>M,JY:()=>U,Y5:()=>I,uj:()=>_});var i=r(40330),s=r(9790),n=r(66643),o=r(20102),a=r(35454),l=r(42033),d=r(63213),u=r(14165);async function c(e,t,r){t=t.clone(),e.capabilities.query.supportsMaxRecordCountFactor&&(t.maxRecordCountFactor=p(e));const i=function(e){return p(e)*function(e){return e.capabilities.query.maxRecordCount||2e3}(e)}(e),s=e.capabilities.query.supportsPagination;t.start=0,t.num=i;let n=null;for(;;){const o=await e.source.queryFeaturesJSON(t,r);if(null==n?n=o:n.features=n.features.concat(o.features),n.exceededTransferLimit=o.exceededTransferLimit,!s||!o.exceededTransferLimit)break;t.start+=i}return n}function p(e){return e.capabilities.query.supportsMaxRecordCountFactor?u.Z.MAX_MAX_RECORD_COUNT_FACTOR:1}var y=r(84230),h=r(84382),f=r(81571),m=r(56545),g=r(75935);const b=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function w(e,t,r,i){const s=await q(e);if(await v(e,t,i),!s.addAttachment)throw new o.Z(i,"Layer source does not support addAttachment capability");return s.addAttachment(t,r)}function v(e,t,r){const{attributes:i}=t,{objectIdField:s}=e;return e.capabilities?.data?.supportsAttachment?t?i?s&&i[s]?Promise.resolve():Promise.reject(new o.Z(r,`feature is missing the identifying attribute ${s}`)):Promise.reject(new o.Z(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new o.Z(r,"A feature is required to add/delete/update attachments")):Promise.reject(new o.Z(r,"this layer doesn't support attachments"))}async function I(e,t,r,i,s){const n=await q(e);if(await v(e,t,s),!n.updateAttachment)throw new o.Z(s,"Layer source does not support updateAttachment capability");return n.updateAttachment(t,r,i)}async function S(e,t,i){const{applyEdits:s}=await r.e(4720).then(r.bind(r,14720)),n=await e.load(),{source:o,globalIdField:a}=n;let l=i;return("feature"===n.type?n.infoFor3D:null)&&null!=t.deleteFeatures&&null!=a&&(l={...l,globalIdToObjectId:await G(e,t.deleteFeatures,a)}),s(n,o,t,i)}async function _(e,t,i){const{uploadAssets:s}=await r.e(4720).then(r.bind(r,14720)),n=await e.load();return s(n,n.source,t,i)}async function F(e,t,r,i){const s=await q(e);if(await v(e,t,i),!s.deleteAttachments)throw new o.Z(i,"Layer source does not support deleteAttachments capability");return s.deleteAttachments(t,r)}async function j(e,t,r){const i=(await e.load({signal:t?.signal})).source;if(!i.fetchRecomputedExtents)throw new o.Z(r,"Layer source does not support fetchUpdates capability");return i.fetchRecomputedExtents(t)}async function C(e,t,r,i){t=m.Z.from(t),await e.load();const s=e.source,n=e.capabilities;if(!n?.data?.supportsAttachment)throw new o.Z(i,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:l,globalIds:d,num:u,size:c,start:p,where:y}=t;if(!n?.operations?.supportsQueryAttachments&&(a?.length>0||d?.length>0||c?.length>0||u||p||y))throw new o.Z(i,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t);if(!(l?.length||d?.length||y))throw new o.Z(i,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!s.queryAttachments)throw new o.Z(i,"Layer source does not support queryAttachments capability",t);return s.queryAttachments(t)}async function L(e,t,r,i){const s=await q(e);if(!s.queryObjectIds)throw new o.Z(i,"Layer source does not support queryObjectIds capability");return s.queryObjectIds(u.Z.from(t)??e.createQuery(),r)}async function x(e,t,r,i){const s=await q(e);if(!s.queryFeatureCount)throw new o.Z(i,"Layer source does not support queryFeatureCount capability");return s.queryFeatureCount(u.Z.from(t)??e.createQuery(),r)}async function R(e,t,r,i){const s=await q(e);if(!s.queryExtent)throw new o.Z(i,"Layer source does not support queryExtent capability");return s.queryExtent(u.Z.from(t)??e.createQuery(),r)}async function O(e,t,r,i){const s=await q(e);if(!s.queryRelatedFeatures)throw new o.Z(i,"Layer source does not support queryRelatedFeatures capability");return s.queryRelatedFeatures(g.default.from(t),r)}async function A(e,t,r,i){const s=await q(e);if(!s.queryRelatedFeaturesCount)throw new o.Z(i,"Layer source does not support queryRelatedFeaturesCount capability");return s.queryRelatedFeaturesCount(g.default.from(t),r)}async function E(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:i}=await t.refresh();if(null!=i&&(e.sourceJSON={...e.sourceJSON,...i},e.read(i,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await(0,l.E)(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function Z(e){const t=new u.Z,r=e.capabilities?.data,i=e.capabilities?.query;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,i&&(t.compactGeometryEnabled=i.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=i.supportsDefaultSpatialReference),r&&(r.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),r.supportsM&&null!=e.returnM&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:s,timeExtent:n}=e;return t.timeExtent=null!=s&&null!=n?n.offset(-s.value,s.unit):n||null,t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null,t}function P(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeGlobalID"===e.type)return e.name}function M(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeOID"===e.type)return e.name}function U(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}async function q(e){return(await e.load()).source}async function T(e,t,r){const s=e.parsedUrl?.path;s&&e.authenticationTriggerEvent===t&&await async function(e,t){if(!i.id)return;if(i.id.findCredential(e))return;let r;try{const s=await(0,y.oP)(e,t);s&&(r=await i.id.checkSignInStatus(`${s}/sharing`))}catch(e){}if(r)try{const r=null!=t?t.signal:null;await i.id.getCredential(e,{signal:r})}catch(e){}}(s,r)}function N(e){return!e.sourceJSON?.isMultiServicesView&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const D=(0,d.d)({types:s.QT});function V(e,t){if(e.defaultSymbol)return e.types?.length?new f.Z({defaultSymbol:D(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:D(e.symbol,e,t)})))}):new h.Z({symbol:D(e.defaultSymbol,e,t)})}function k(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function G(e,t,r){if(null==t)return null;const i=[],{objectIdField:s}=e;if(t.forEach((e=>{let t=null;if("attributes"in e){const{attributes:i}=e;t={globalId:i[r],objectId:null!=i[s]&&-1!==i[s]?i[s]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||i.push(t.globalId))})),0===i.length)return null;const o=e.createQuery();o.where=i.map((e=>`${r}='${e}'`)).join(" OR "),o.returnGeometry=!1,o.outFields=[s,r],o.cacheHint=!1;const a=await(0,n.mt)(c(e,o));if(!a.ok)return null;const l=new Map,d=a.value.features;for(const e of d){const t=e.attributes[r],i=e.attributes[s];null!=t&&null!=i&&-1!==i&&l.set(t,i)}return l}},53518:(e,t,r)=>{r.d(t,{v:()=>l});var i=r(80442),s=r(92604),n=r(1231),o=r(99514),a=r(69165);function l(){return{fields:{type:[n.Z],value:null,set:function(e){if(e&&(0,i.Z)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");s.Z.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.Z.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||s.Z.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.Q0)(this.fieldsIndex,e)}}}}},66094:(e,t,r)=>{r.d(t,{B:()=>s});var i=r(17452);function s(e){return n[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Ml)(e);return l[t]||o}(e.url)}(e)]||a}const n={},o="text/plain",a=n[o],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)n[l[e]]=e},40555:(e,t,r)=>{r.d(t,{y:()=>o});var i=r(66643),s=r(95330),n=r(20941);async function o(e,t,r){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const a=await(0,i.q6)(o.populateFromStyle());if((0,s.k_)(r),!1===a.ok){const r=a.error;t?.messages&&t.messages.push(new n.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},75935:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var i,s=r(43697),n=(r(66577),r(96674)),o=r(22974),a=r(5600),l=r(75215),d=r(52011),u=r(30556),c=r(10158),p=r(82971);let y=i=class extends n.wq{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new i((0,o.d9)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"cacheHint",void 0),(0,s._)([(0,a.Cb)({type:c.n,json:{write:!0}})],y.prototype,"dynamicDataSource",void 0),(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"gdbVersion",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],y.prototype,"geometryPrecision",void 0),(0,s._)([(0,a.Cb)({type:Date})],y.prototype,"historicMoment",void 0),(0,s._)([(0,u.c)("historicMoment")],y.prototype,"_writeHistoricMoment",null),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],y.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],y.prototype,"objectIds",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],y.prototype,"outFields",void 0),(0,s._)([(0,a.Cb)({type:p.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],y.prototype,"outSpatialReference",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],y.prototype,"relationshipId",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],y.prototype,"start",void 0),(0,s._)([(0,u.c)("start"),(0,u.c)("num")],y.prototype,"writeStart",null),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],y.prototype,"num",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],y.prototype,"returnGeometry",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnM",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnZ",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],y.prototype,"where",void 0),y=i=(0,s._)([(0,d.j)("esri.rest.support.RelationshipQuery")],y),y.from=(0,l.se)(y);const h=y},18596:(e,t,r)=>{r.d(t,{JV:()=>a,Jp:()=>s,Px:()=>o,U8:()=>i});const i=(0,r(41123).dG)(),s=new Map,n=new Map;async function o(e,t,s=!1){if(!e||!t)return!0;const o=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=n.get(o)?.entries();if(a)for(const[e,n]of a)if(n.name===t){const t=!n.stack?.hasForwardEdits();if(!t&&s){const[{deleteForwardEdits:t},{default:s}]=await Promise.all([r.e(1316).then(r.bind(r,51316)),r.e(4573).then(r.bind(r,84573))]);return t(o,e,new s({sessionId:i,moment:n.moment}))}return t}return!0}function a(e,t){if(!e)return!1;const r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=n.get(r)?.entries();if(i)for(const[e,r]of i)if(r.name===t)return"edit"===r.lockType;return!1}new Map}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4720,1444],{41123:(e,t,n)=>{n.d(t,{DO:()=>a,dG:()=>i,zS:()=>s});const r="randomUUID"in crypto;function a(){if(r)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${a().toUpperCase()}}`}function i(){return`{${a()}}`}},16306:(e,t,n)=>{n.d(t,{aX:()=>A});var r=n(68773),a=n(20102),s=n(92604),i=n(38913),o=n(58901),l=n(73913),d=n(8744),u=n(40488),c=(n(66577),n(3172)),p=n(33955),f=n(11282),h=n(17452);async function m(e,t,n){const r="string"==typeof e?(0,h.mN)(e):e,a=t[0].spatialReference,s=(0,p.Ji)(t[0]),i={...n,query:{...r.query,f:"json",sr:(0,d.B9)(a),geometries:JSON.stringify((l=t,{geometryType:(0,p.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:o}=await(0,c.Z)(r.path+"/simplify",i);var l;return function(e,t,n){const r=(0,p.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=n,t}))}(o.geometries,s,a)}const y=s.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function w(e,t,n){if(t){const t=function(e,t){if(!(e instanceof o.Z||e instanceof i.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y.error(e),new a.Z(e)}const n=(0,l.x3)(e),r=[];for(const e of n){const n=[];r.push(n),n.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const a=e[r][0],s=e[r][1],i=e[r+1][0],o=e[r+1][1],l=Math.sqrt((i-a)*(i-a)+(o-s)*(o-s)),d=(o-s)/l,u=(i-a)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const r=e*t,i=u*r+a,o=d*r+s;n.push([i,o])}const e=(l+Math.floor(c-1)*t)/2,r=u*e+a,i=d*e+s;n.push([r,i])}n.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new i.Z({rings:r,spatialReference:e.spatialReference}):new o.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.Sx)(t,!0)}return n&&(e=(0,l.Sy)(e,n)),e}function F(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,l.XZ)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,l.XZ)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,l.XZ)(r,t);e=e.clone().offset(n*(-2*t),0)}else if(r<n){const t=(0,l.XZ)(r,n);e=e.clone().offset(t*(-2*n),0)}}return e}function I(e,t){let n=-1;for(let r=0;r<t.cutIndexes.length;r++){const a=t.cutIndexes[r],s=t.geometries[r],i=(0,l.x3)(s);for(let e=0;e<i.length;e++){const t=i[e];t.some((n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const r=t[e][0];n=r>n?r:n}n=Number(n.toFixed(9));const r=-360*(0,l.XZ)(n,180);for(let n=0;n<t.length;n++){const t=s.getPoint(e,n);s.setPoint(e,n,t.clone().offset(r,0))}return!0}}))}if(a===n){if(g(e))for(const t of(0,l.x3)(s))e[a]=e[a].addRing(t);else if(b(e))for(const t of(0,l.x3)(s))e[a]=e[a].addPath(t)}else n=a,e[a]=s}return e}async function A(e,t,n){if(!Array.isArray(e))return A([e],t);t&&"string"!=typeof t&&y.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const a="string"==typeof t?t:t?.url??r.default.geometryServiceUrl;let s,h,g,b,v,Z,S,R,$=0;const E=[],x=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,h=(0,d.C5)(s),g=s.isWebMercator,Z=g?102100:4326,b=l.UZ[Z].maxX,v=l.UZ[Z].minX,S=l.UZ[Z].plus180Line,R=l.UZ[Z].minus180Line),h)if("mesh"===t.type)x.push(t);else if("point"===t.type)x.push(F(t.clone(),b,v));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>F(e,b,v))),x.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,h);x.push(e.rings?new i.Z(e):e)}else if(t.extent){const e=t.extent,n=(0,l.XZ)(e.xmin,v)*(2*b);let r=0===n?t.clone():(0,l.Sy)(t.clone(),n);e.offset(n,0),e.intersects(S)&&e.xmax!==b?($=e.xmax>$?e.xmax:$,r=w(r,g),E.push(r),x.push("cut")):e.intersects(R)&&e.xmin!==v?($=e.xmax*(2*b)>$?e.xmax*(2*b):$,r=w(r,g,360),E.push(r),x.push("cut")):x.push(r)}else x.push(t.clone());else x.push(t);else x.push(t);let M=(0,l.XZ)($,b),O=-90;const U=M,L=new o.Z;for(;M>0;){const e=360*M-180;L.addPath([[e,O],[e,-1*O]]),O*=-1,M--}if(E.length>0&&U>0){const t=I(E,await async function(e,t,n,r){const a=(0,f.en)(e),s=t[0].spatialReference,i={...r,responseType:"json",query:{...a.query,f:"json",sr:(0,d.B9)(s),target:JSON.stringify({geometryType:(0,p.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},o=await(0,c.Z)(a.path+"/cut",i),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map((e=>{const t=(0,p.im)(e);return t.spatialReference=s,t}))}}(a,E,L,n)),r=[],s=[];for(let n=0;n<x.length;n++){const a=x[n];if("cut"!==a)s.push(a);else{const a=t.shift(),i=e[n];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&a.rings.length>=i.rings.length?(r.push(a),s.push("simplify")):s.push(g?(0,u.$)(a):a)}}if(!r.length)return s;const i=await m(a,r,n),o=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?o.push(t):o.push(g?(0,u.$)(i.shift()):i.shift())}return o}const j=[];for(let e=0;e<x.length;e++){const t=x[e];if("cut"!==t)j.push(t);else{const e=E.shift();j.push(!0===g?(0,u.$)(e):e)}}return j}},73913:(e,t,n)=>{n.d(t,{Sy:()=>l,UZ:()=>i,XZ:()=>o,x3:()=>d});var r=n(58901),a=n(82971),s=n(33955);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.Z.WebMercator}),minus180Line:new r.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.Z({paths:[[[180,-180],[180,180]]],spatialReference:a.Z.WGS84}),minus180Line:new r.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:a.Z.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=d(e);for(const e of n)for(const n of e)n[0]+=t;return e}function d(e){return(0,s.oU)(e)?e.rings:e.paths}},14720:(e,t,n)=>{n.d(t,{Ey:()=>F,applyEdits:()=>I,aw:()=>b,uploadAssets:()=>E});var r=n(38171),a=n(46791),s=n(20102),i=n(22974),o=n(92604),l=n(95330),d=n(17452),u=n(41123),c=n(16306),p=n(66361),f=n(69165),h=n(2981),m=n(84230);function y(e){return null!=e?.applyEdits}function g(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function b(e){return e.every(g)}function w(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(w)}async function I(e,t,n,r={}){let d;const c="gdbVersion"in e?e.gdbVersion:null,f=r.gdbVersion??c;if((0,p.lQ)(e)&&e.url)d=(0,p.jF)(e.url,e.layerId,f,"original-and-current-features"===r.returnServiceEditsOption);else{d=(0,l.hh)(),d.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:d.promise};e.emit("apply-edits",t)}try{const{results:l,edits:c}=await async function(e,t,n,r){if(await e.load(),!y(t))throw new s.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,m.ln)(e))throw new s.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:l}=await async function(e,t,n){const r=(0,m.S1)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),l=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),d=null!=e.infoFor3D;if(function(e,t,n,r,a,i){if(!e||!r&&!a)throw new s.Z(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&n?.globalIdUsed)throw new s.Z(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&a)throw new s.Z(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!n?.globalIdUsed&&a)throw new s.Z(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,r,n,!!i,!!l,`${e.type}-layer`),!r.data.isVersioned&&n?.gdbVersion)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!r.editing.supportsRollbackOnFailure&&n?.rollbackOnFailureEnabled)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const c={...n};if(null!=c.rollbackOnFailureEnabled||r.editing.supportsRollbackOnFailure||(c.rollbackOnFailureEnabled=!0),c.rollbackOnFailureEnabled||"original-and-current-features"!==c.returnServiceEditsOption||(!1===c.rollbackOnFailureEnabled&&o.Z.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwrritten and set to true."),c.rollbackOnFailureEnabled=!0),!r.editing.supportsReturnServiceEditsInSourceSpatialReference&&c.returnServiceEditsInSourceSR)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(c.returnServiceEditsInSourceSR&&"original-and-current-features"!==c.returnServiceEditsOption)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p=function(e,t,n){const r=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&a.Z.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(r.addFeatures?.length&&!t.operations.supportsAdd)throw new s.Z(`${n}:unsupported-operation`,"Layer does not support adding features.");if(r.updateFeatures?.length&&!t.operations.supportsUpdate)throw new s.Z(`${n}:unsupported-operation`,"Layer does not support updating features.");if(r.deleteFeatures?.length&&!t.operations.supportsDelete)throw new s.Z(`${n}:unsupported-operation`,"Layer does not support deleting features.");return r.addFeatures=r.addFeatures.map(R),r.updateFeatures=r.updateFeatures.map(R),r.addAssetFeatures=[],r}(t,r,`${e.type}-layer`),f=n?.globalIdUsed||d,y=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(f){const{globalIdField:t}=e;if(null==t)throw new s.Z(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");p.addFeatures.forEach((e=>function(e,t){const{attributes:n}=e;null==n[t]&&(n[t]=(0,u.zS)())}(e,t)))}return p.addFeatures.forEach((t=>function(e,t,n,r){A(e,t,n,r),v(e,t)}(t,e,f,y))),p.updateFeatures.forEach((t=>function(e,t,n,r){A(e,t,n,r),v(e,t);const a=(0,m.S1)(t);if("geometry"in e&&null!=e.geometry&&!a?.editing.supportsGeometryUpdate)throw new s.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,f,y))),p.deleteFeatures.forEach((t=>function(e,t,n,r){A(e,t,n,r)}(t,e,f,y))),p.addAttachments.forEach((t=>Z(t,e))),p.updateAttachments.forEach((t=>Z(t,e))),d&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:n}=t,r=(0,h.S0)("model/gltf-binary",n.supportedFormats)??(0,h.Ow)("glb",n.supportedFormats);if(!r||!n.editFormats.includes(r))throw new s.Z(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:a}=e;for(const t of e.addFeatures??[])$(t)&&a.push(t);for(const t of e.updateFeatures??[])$(t)&&a.push(t)}(p,e),{edits:await S(p),options:c}}(e,n,r);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,l)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,n,r),p=e=>e.filter((e=>!e.error)).map(i.d9),f={edits:c,addedFeatures:p(l.addFeatureResults),updatedFeatures:p(l.updateFeatureResults),deletedFeatures:p(l.deleteFeatureResults),addedAttachments:p(l.addAttachmentResults),updatedAttachments:p(l.updateAttachmentResults),deletedAttachments:p(l.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:l.editMoment?new Date(l.editMoment):null,globalIdToObjectId:r.globalIdToObjectId};return l.editedFeatureResults?.length&&(f.editedFeatures=l.editedFeatureResults),d.resolve(f),l}catch(e){throw d.reject(e),e}}function A(e,t,n,r){if(n){if("attributes"in e&&!e.attributes[t.globalIdField])throw new s.Z(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(r.length&&"attributes"in e)for(const n of r){const r=e.attributes[n.name];if(void 0!==r&&!(0,f.d2)(n,r))throw new s.Z(`${t.type}-layer:invalid-parameter`,`Big-integer field '${n.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new s.Z(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new s.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function v(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D){const{geometry:n}=e;if(n.vertexSpace.isGeoreferenced)throw new s.Z(`${t.type}-layer:georeferenced-mesh-unsupported`,"Uploading georeferenced meshes to a layer is not supported.")}}function Z(e,t){const{feature:n,attachment:r}=e;if(!n||"attributes"in n&&!n.attributes[t.globalIdField])throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in n)&&!n.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!r.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!r.data&&!r.uploadId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(r.data instanceof File&&r.data.name||r.name))throw new s.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&r.uploadId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof r.data){const e=(0,d.sJ)(r.data);if(e&&!e.isBase64)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function S(e){const t=e.addFeatures??[],n=e.updateFeatures??[],r=t.concat(n).map((e=>e.geometry)),a=await(0,c.aX)(r),s=t.length,i=n.length;return a.slice(0,s).forEach(((e,n)=>t[n].geometry=e)),a.slice(s,s+i).forEach(((e,t)=>n[t].geometry=e)),e}function R(e){const t=new r.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function $(e){return"mesh"===e?.geometry?.type}function E(e,t,n,r){if(!y(t))throw new s.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new s.Z(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(n,r)}},66361:(e,t,n)=>{n.d(t,{jF:()=>u,lQ:()=>f,o1:()=>y});var r=n(43697),a=n(32448),s=n(22974),i=n(95330),o=(n(92604),n(75215),n(20102),n(80442),n(52011)),l=n(18596);const d=new a.Z.EventEmitter;function u(e,t,n=null,r=!1){const a=(0,i.hh)();return r=null==t||r,d.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:n,mayReceiveServiceEdits:r,result:a.promise}),a}const c="esri.layers.mixins.EditBusLayer",p=Symbol(c);function f(e){return null!=e&&"object"==typeof e&&p in e}function h(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function m(e,t,n){const r=new URL(e).host,a=l.Jp.get(r),s=e=>!e||e===a;return s(t)&&s(n)||t===n}const y=e=>{var t;let n=class extends e{constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:n,gdbVersion:r,mayReceiveServiceEdits:a,result:i}=e,o=t===this.url,d=null!=n&&null!=this.layerId&&n===this.layerId,u=h(this),c=h(this)&&m(t,r,this.gdbVersion);if(!o||u&&!c||!d&&!a)return;const p=i.then((e=>{if(d&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,s.d9)(e)),e;const t=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(t){const{adds:n,updates:r,deletes:a}=t.editedFeatures,i={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:n?n.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:a?a.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:r?r.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,s.d9)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,s.d9)(e.historicMoment)};return this.emit("edits",i),i}return{edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,s.d9)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,s.d9)(e.historicMoment)}})).then((e=>("historicMoment"in this&&this.historicMoment!==e.historicMoment&&(0,l.JV)(t,r)&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:p})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:n,moment:r}=e,a=t===this.url,s=h(this),i=h(this)&&m(t,n,this.gdbVersion),o=h(this)&&!m(t,this.gdbVersion,null);a&&s&&i&&o&&"historicMoment"in this&&this.historicMoment!==r&&(this.historicMoment=r)},this.when().then((()=>{this.addHandles(function(e){return d.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return d.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}};return t=p,n=(0,r._)([(0,o.j)(c)],n),n}},2981:(e,t,n)=>{n.d(t,{$6:()=>h,$z:()=>s,F7:()=>a,Ow:()=>o,S0:()=>i,d1:()=>l,dm:()=>d});const r=[["binary","application/octet-stream","bin",""]];function a(e,t){return null!=c(t.name,e?.supportedFormats??[])}function s(e,t){if(!e)return!1;const n=d(t,e.supportedFormats??[]);return null!=n&&e.editFormats.includes(n)}function i(e,t){return p(function(e,t){const n=e.toLowerCase();return u(t).find((e=>f(e)===n))}(e,t))}function o(e,t){return p(c(e,t))}function l(e,t){return f(function(e,t){return u(t).find((t=>p(t)===e))}(e,t))}function d(e,t){return o(e.name,t)??i(e.type,t)}function u(e){return[...r,...e]}function c(e,t){const n=e.toLowerCase();return u(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>n.endsWith(e)))))}function p(e){return e?.[0]}function f(e){return e?.[1].toLowerCase()}function h(e){return e.tables?.find((e=>"assetMaps"===e.role))}},11282:(e,t,n)=>{n.d(t,{cv:()=>o,en:()=>i,lA:()=>s}),n(68773),n(40330);var r=n(22974),a=n(17452);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,a.mN)(e):(0,r.d9)(e)}function o(e,t,n){const r={};for(const a in e){if("declaredClass"===a)continue;const s=e[a];if(null!=s&&"function"!=typeof s)if(Array.isArray(s)){r[a]=[];for(let e=0;e<s.length;e++)r[a][e]=o(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(n?.[a]);r[a]=t?e:JSON.stringify(e)}else r[a]=t?s:JSON.stringify(s);else r[a]=s}return r}n(71058)},18596:(e,t,n)=>{n.d(t,{JV:()=>o,Jp:()=>a,Px:()=>i,U8:()=>r});const r=(0,n(41123).dG)(),a=new Map,s=new Map;async function i(e,t,a=!1){if(!e||!t)return!0;const i=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),o=s.get(i)?.entries();if(o)for(const[e,s]of o)if(s.name===t){const t=!s.stack?.hasForwardEdits();if(!t&&a){const[{deleteForwardEdits:t},{default:a}]=await Promise.all([n.e(1316).then(n.bind(n,51316)),n.e(4573).then(n.bind(n,84573))]);return t(i,e,new a({sessionId:r,moment:s.moment}))}return t}return!0}function o(e,t){if(!e)return!1;const n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),r=s.get(n)?.entries();if(r)for(const[e,n]of r)if(n.name===t)return"edit"===n.lockType;return!1}new Map}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2046],{2046:(e,s,t)=>{t.d(s,{uploadAssets:()=>q});var o=t(3172),r=t(80442),n=t(92604),a=t(95330),i=t(76882),c=t(17452),u=t(41123),l=t(84470),p=t(20102);const d="upload-assets",m=()=>new Error;class f extends p.Z{constructor(){super(`${d}:unsupported`,"Layer does not support asset uploads.",m())}}class h extends p.Z{constructor(){super(`${d}:no-glb-support`,"Layer does not support glb.",m())}}class g extends p.Z{constructor(){super(`${d}:no-supported-source`,"No supported external source found",m())}}class w extends p.Z{constructor(){super(`${d}:not-base-64`,"Expected gltf data in base64 format after conversion.",m())}}class y extends p.Z{constructor(){super(`${d}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",m())}}class P extends p.Z{constructor(e,s){super(`${d}:bad-response`,`Bad response. Uploaded ${e} items and received ${s} results.`,m())}}class b extends p.Z{constructor(e,s){super(`${d}-layer:upload-failed`,`Failed to upload mesh file ${e}. Error code: ${s?.code??"-1"}. Error message: ${s?.messages??"unknown"}`,m())}}class _ extends p.Z{constructor(e){super(`${d}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${e}, but it does not list it in its supported formats.`,m())}}class T extends p.Z{constructor(){super(`${d}:convert3D-failed`,"convert3D failed.")}}const v={upload:{createFromFiles:.8,loadMesh:.2},uploadAssetBlobs:{prepareAssetItems:.9,uploadAssetItems:.1},uploadConvertibleSource:{uploadEditSource:.5,serviceAssetsToGlb:.5},uploadLocalMesh:{meshToAssetBlob:.5,uploadAssetBlobs:.5}};var k=t(66677),A=t(50758),x=t(30175);function F(e,s=(e=>{}),t){return new Z(e,s,t)}class Z{constructor(e,s=(e=>{}),t){if(this.onProgress=s,this.taskName=t,this._progressMap=new Map,this._startTime=void 0,this._timingsMap=new Map,"number"==typeof e){this._weights={};for(let s=0;s<e;s++){const t=s,o=1/e;this._weights[t]=o,this._progressMap.set(t,0)}}else this._weights=e;this.emitProgress()}emitProgress(){let e=0;for(const[s,t]of this._progressMap.entries())e+=t*this._weights[s];if(1===e&&(0,r.Z)("enable-feature:esri-3dofl-upload-timings")){const e=Math.round(performance.now()-(this._startTime??0))/1e3;console.log(`${this.taskName} done in ${e} sec`);for(const[s,t]of this._timingsMap){const o=Math.round(t.end-t.start)/1e3,r=Math.round(o/e*100);console.log(this.taskName??"Task",{stepKey:s,stepTime:o,relativeTime:r})}}this.onProgress(e)}setProgress(e,s){if(this._progressMap.set(e,s),(0,r.Z)("enable-feature:esri-3dofl-upload-timings")){const t=performance.now();this._startTime??=t;const o=(0,x.s1)(this._timingsMap,e,(()=>({start:t,end:0})));1===s&&(o.end=t)}this.emitProgress()}simulate(e,s){return $((s=>this.setProgress(e,s)),s)}makeOnProgress(e){return s=>this.setProgress(e,s)}}function $(e=(e=>{}),s=N){const t=performance.now();e(0);const o=setInterval((()=>{const o=performance.now()-t,r=1-Math.exp(-o/s);e(r)}),I);return(0,A.kB)((()=>{clearInterval(o),e(1)}))}function E(e,s=M){return(0,i.up)((0,i._H)(e*S/s))}const M=10,j=10,S=8e-6,I=(0,i.HA)(50),N=(0,i.HA)(1e3),D=1e6,C=20*D,U=2e9,B=3;async function L({data:e,name:s,description:t},r,n){let i=null;try{const u=(0,c.v_)(r,"uploads"),l=(0,c.v_)(u,"info"),{data:p}=await(0,o.Z)(l,{query:{f:"json"},responseType:"json"});(0,a.k_)(n);const d=(0,k.M8)(r),m=p.maxUploadFileSize*D,f=d?U:m,h=d?Math.min(C,m):C;if(e.size>f)throw new Error("Data too large");const g=(0,c.v_)(u,"register"),{data:w}=await(0,o.Z)(g,{query:{f:"json",itemName:O(s),description:t},responseType:"json",method:"post"});if((0,a.k_)(n),!w.success)throw new Error("Registration failed");const{itemID:y}=w.item;i=(0,c.v_)(u,y);const P=(0,c.v_)(i,"uploadPart"),b=Math.ceil(e.size/h),_=new Array;for(let s=0;s<b;++s)_.push(e.slice(s*h,Math.min((s+1)*h,e.size)));const T=_.slice().reverse(),v=new Array,A=F(b,n?.onProgress,"uploadItem"),x=async()=>{for(;0!==T.length;){const e=_.length-T.length,s=T.pop(),t=new FormData,r=A.simulate(e,E(s.size));try{const r=s;t.append("f","json"),t.append("file",r),t.append("partId",`${e}`);const{data:i}=await(0,o.Z)(P,{timeout:0,body:t,responseType:"json",method:"post"});if((0,a.k_)(n),!i.success)throw new Error("Part upload failed")}finally{r.remove()}}};for(let e=0;e<B&&0!==T.length;++e)v.push(x());await Promise.all(v);const Z=(0,c.v_)(i,"commit"),{data:$}=await(0,o.Z)(Z,{query:{f:"json",parts:_.map(((e,s)=>s)).join(",")},responseType:"json",method:"post"});if((0,a.k_)(n),!$.success)throw new Error("Commit failed");return $.item}catch(e){if(null!=i){const e=(0,c.v_)(i,"delete");await(0,o.Z)(e,{query:{f:"json"},responseType:"json",method:"post"})}throw e}}function O(e){return e.replaceAll("/","_").replaceAll("\\","_")}var R=t(2981);async function q(e,s,t){const o=e.length;if(!o)return t?.onProgress?.(1),[];const r=F(o,t?.onProgress,"uploadAssets");return Promise.all(e.map(((e,o)=>async function(e,{layer:s,ongoingUploads:t},o){const r=t.get(e);if(r)return r;if(!function(e){return!!e.infoFor3D&&!!e.url}(s))throw new f;if(function(e,s){const{parsedUrl:t}=s;return null!=t&&e.metadata.externalSources.some((e=>(0,l.JG)(e,t)))}(e,s))return o?.onProgress?.(1),e;const n=async function(e,s,t){const{metadata:o}=e,{displaySource:r}=o,n=H(r?.source,s),c=!!n,l=o.externalSources.length>0,p=c?async function(e,s,t){return{source:await G(e,s,t),original:!0}}(n,s,t):l?async function(e,s,t){const o=X(s),{externalSources:r}=e.metadata,n=function(e,s){for(const t of e){const e=H(t.source,s);if(e)return e}return null}(r,s);if(!n)throw new g;const a=F(v.uploadConvertibleSource,t?.onProgress,"uploadConvertibleSource"),c=await G(n,s,{onProgress:a.makeOnProgress("uploadEditSource")});e.addExternalSources([{source:c,original:!0}]);const u=n.reduce(((e,{asset:s})=>s instanceof File?e+s.size:e),0),l=a.simulate("serviceAssetsToGlb",function(e,s=j){return(0,i.up)((0,i._H)(e*S/s))}(u));try{return{source:await W(c,s,o)}}finally{l.remove()}}(e,s,t):async function(e,s,t){const o=F(v.uploadLocalMesh,t?.onProgress,"uploadLocalMesh"),r=async function(e,s,t){const o=X(s),r=await e.load(t),n=await r.toBinaryGLTF({ignoreLocalTransform:!0});(0,a.k_)(t);const i=await n.buffer();return(0,a.k_)(t),{blob:new Blob([i.data],{type:i.type}),assetName:`${(0,u.z)()}.glb`,assetType:o}}(e,s,{...t,onProgress:o.makeOnProgress("meshToAssetBlob")});return{source:await J([r],s,{...t,onProgress:o.makeOnProgress("uploadAssetBlobs")}),extent:e.extent.clone(),original:!0}}(e,s,t),d=await p;return(0,a.k_)(t),e.addExternalSources([d]),e}(e,s,o);t.set(e,n);try{await n}finally{t.delete(e)}return e}(e,s,{...t,onProgress:r.makeOnProgress(o)}))))}function H(e,s){if(!e)return null;const{infoFor3D:{supportedFormats:t,editFormats:o}}=s,r=(0,l.zE)(e),n=new Array;let a=!1;for(let e=0;e<r.length;++e){const s=z(r[e],t);if(!s)return null;o.includes(s.assetType)&&(a=!0),n.push(s)}return a?n:null}function z(e,s){const t=(0,l.vj)(e,s);return t?{asset:e,assetType:t}:null}async function G(e,s,t){return J(e.map((e=>async function(e,s){const{asset:t,assetType:o}=e;if(t instanceof File)return{blob:t,assetName:t.name,assetType:o};const r=await t.toBlob(s);return(0,a.k_)(s),{blob:r,assetName:t.assetName,assetType:o}}(e,t))),s,t)}async function J(e,s,t){const o=F(v.uploadAssetBlobs,t?.onProgress,"uploadAssetBlobs"),r=await function(e,s,t){const o=F(e.length,t?.onProgress,"prepareAssetItems");return Promise.all(e.map((async(e,r)=>{const i=async function(e,s,t){const{blob:o,assetType:r,assetName:i}=e;let u=null;try{const e=await L({data:o,name:i},s.url,t);(0,a.k_)(t),u={assetType:r,assetUploadId:e.itemID}}catch(e){(0,a.r9)(e),n.Z.getLogger("esri.layers.graphics.sources.support.uploadAssets").warnOnce(`Service ${s.url} does not support the REST Uploads API.`)}if(!u){const e=await(0,c.IR)(o);if((0,a.k_)(t),!e.isBase64)throw new w;u={assetType:r,assetData:e.data}}if(!u)throw new y;return{item:u,assetName:i}}(await e,s,{...t,onProgress:o.makeOnProgress(r)});return(0,a.k_)(t),i})))}(e,s,{...t,onProgress:o.makeOnProgress("prepareAssetItems")});(0,a.k_)(t);const i=r.map((({item:e})=>e)),{uploadResults:u}=await K(i,s,{...t,onProgress:o.makeOnProgress("uploadAssetItems")});return(0,a.k_)(t),e.map(((e,t)=>function(e,s,t){const{success:o}=s;if(!o){const{error:t}=s;throw new b(e.assetName,t)}const{assetHash:r}=s,{assetName:n,item:{assetType:a}}=e,{infoFor3D:{supportedFormats:i}}=t,c=(0,R.d1)(a,i);if(!c)throw new _(a);return new l.CP(n,c,[new l.LL(`${t.parsedUrl.path}/assets/${r}`,r)])}(r[t],u[t],s)))}async function K(e,s,t){const r=$(t?.onProgress);try{const r=await(0,o.Z)((0,c.v_)(s.parsedUrl.path,"uploadAssets"),{timeout:0,query:{f:"json",assets:JSON.stringify(e)},method:"post",responseType:"json"});if((0,a.k_)(t),r.data.uploadResults.length!==e.length)throw new P(e.length,r.data.uploadResults.length);return r.data}finally{r.remove()}}async function W(e,s,t){const o=e.map((({assetName:e,parts:s})=>({assetName:e,assetHash:s[0].partHash}))),r=s.capabilities?.operations.supportsAsyncConvert3D,n={f:"json",assets:JSON.stringify(o),transportType:"esriTransportTypeUrl",targetFormat:t,async:r},a=(0,c.v_)(s.parsedUrl.path,"convert3D");let i;try{i=(await(r?V:Q)(a,{query:n,responseType:"json",timeout:0})).data}catch(e){throw new T}const{supportedFormats:u}=s.infoFor3D;return i.assets.map((e=>{const s=(0,R.S0)(e.contentType,u);if(!s)throw new _(s);return new l.CP(e.assetName,e.contentType,[new l.LL(e.assetURL,e.assetHash)])}))}function Q(e,s){return(0,o.Z)(e,s)}async function V(e,s){const t=(await(0,o.Z)(e,s)).data.statusUrl;for(;;){const e=(await(0,o.Z)(t,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,o.Z)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new Error(e.status);case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new Error}await(0,a.e4)(Y)}}function X(e){const{infoFor3D:s}=e,t=(0,R.S0)("model/gltf-binary",s.supportedFormats)??(0,R.Ow)("glb",s.supportedFormats);if(!t)throw new h;return t}const Y=(0,i.HA)(1e3)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2046],{2046:(e,s,t)=>{t.d(s,{uploadAssets:()=>q});var o=t(3172),r=t(80442),n=t(92604),a=t(95330),i=t(76882),c=t(17452),u=t(41123),l=t(84470),p=t(20102);const d="upload-assets",m=()=>new Error;class f extends p.Z{constructor(){super(`${d}:unsupported`,"Layer does not support asset uploads.",m())}}class h extends p.Z{constructor(){super(`${d}:no-glb-support`,"Layer does not support glb.",m())}}class g extends p.Z{constructor(){super(`${d}:no-supported-source`,"No supported external source found",m())}}class w extends p.Z{constructor(){super(`${d}:not-base-64`,"Expected gltf data in base64 format after conversion.",m())}}class y extends p.Z{constructor(){super(`${d}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",m())}}class P extends p.Z{constructor(e,s){super(`${d}:bad-response`,`Bad response. Uploaded ${e} items and received ${s} results.`,m())}}class b extends p.Z{constructor(e,s){super(`${d}-layer:upload-failed`,`Failed to upload mesh file ${e}. Error code: ${s?.code??"-1"}. Error message: ${s?.messages??"unknown"}`,m())}}class _ extends p.Z{constructor(e){super(`${d}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${e}, but it does not list it in its supported formats.`,m())}}class T extends p.Z{constructor(){super(`${d}:convert3D-failed`,"convert3D failed.")}}const v={upload:{createFromFiles:.8,loadMesh:.2},uploadAssetBlobs:{prepareAssetItems:.9,uploadAssetItems:.1},uploadConvertibleSource:{uploadEditSource:.5,serviceAssetsToGlb:.5},uploadLocalMesh:{meshToAssetBlob:.5,uploadAssetBlobs:.5}};var k=t(66677),A=t(50758),x=t(30175);function F(e,s=(e=>{}),t){return new Z(e,s,t)}class Z{constructor(e,s=(e=>{}),t){if(this.onProgress=s,this.taskName=t,this._progressMap=new Map,this._startTime=void 0,this._timingsMap=new Map,"number"==typeof e){this._weights={};for(let s=0;s<e;s++){const t=s,o=1/e;this._weights[t]=o,this._progressMap.set(t,0)}}else this._weights=e;this.emitProgress()}emitProgress(){let e=0;for(const[s,t]of this._progressMap.entries())e+=t*this._weights[s];if(1===e&&(0,r.Z)("enable-feature:esri-3dofl-upload-timings")){const e=Math.round(performance.now()-(this._startTime??0))/1e3;console.log(`${this.taskName} done in ${e} sec`);for(const[s,t]of this._timingsMap){const o=Math.round(t.end-t.start)/1e3,r=Math.round(o/e*100);console.log(this.taskName??"Task",{stepKey:s,stepTime:o,relativeTime:r})}}this.onProgress(e)}setProgress(e,s){if(this._progressMap.set(e,s),(0,r.Z)("enable-feature:esri-3dofl-upload-timings")){const t=performance.now();this._startTime??=t;const o=(0,x.s1)(this._timingsMap,e,(()=>({start:t,end:0})));1===s&&(o.end=t)}this.emitProgress()}simulate(e,s){return $((s=>this.setProgress(e,s)),s)}makeOnProgress(e){return s=>this.setProgress(e,s)}}function $(e=(e=>{}),s=N){const t=performance.now();e(0);const o=setInterval((()=>{const o=performance.now()-t,r=1-Math.exp(-o/s);e(r)}),I);return(0,A.kB)((()=>{clearInterval(o),e(1)}))}function E(e,s=M){return(0,i.up)((0,i._H)(e*S/s))}const M=10,j=10,S=8e-6,I=(0,i.HA)(50),N=(0,i.HA)(1e3),D=1e6,C=20*D,U=2e9,B=3;async function L({data:e,name:s,description:t},r,n){let i=null;try{const u=(0,c.v_)(r,"uploads"),l=(0,c.v_)(u,"info"),{data:p}=await(0,o.Z)(l,{query:{f:"json"},responseType:"json"});(0,a.k_)(n);const d=(0,k.M8)(r),m=p.maxUploadFileSize*D,f=d?U:m,h=d?Math.min(C,m):C;if(e.size>f)throw new Error("Data too large");const g=(0,c.v_)(u,"register"),{data:w}=await(0,o.Z)(g,{query:{f:"json",itemName:O(s),description:t},responseType:"json",method:"post"});if((0,a.k_)(n),!w.success)throw new Error("Registration failed");const{itemID:y}=w.item;i=(0,c.v_)(u,y);const P=(0,c.v_)(i,"uploadPart"),b=Math.ceil(e.size/h),_=new Array;for(let s=0;s<b;++s)_.push(e.slice(s*h,Math.min((s+1)*h,e.size)));const T=_.slice().reverse(),v=new Array,A=F(b,n?.onProgress,"uploadItem"),x=async()=>{for(;0!==T.length;){const e=_.length-T.length,s=T.pop(),t=new FormData,r=A.simulate(e,E(s.size));try{const r=s;t.append("f","json"),t.append("file",r),t.append("partId",`${e}`);const{data:i}=await(0,o.Z)(P,{timeout:0,body:t,responseType:"json",method:"post"});if((0,a.k_)(n),!i.success)throw new Error("Part upload failed")}finally{r.remove()}}};for(let e=0;e<B&&0!==T.length;++e)v.push(x());await Promise.all(v);const Z=(0,c.v_)(i,"commit"),{data:$}=await(0,o.Z)(Z,{query:{f:"json",parts:_.map(((e,s)=>s)).join(",")},responseType:"json",method:"post"});if((0,a.k_)(n),!$.success)throw new Error("Commit failed");return $.item}catch(e){if(null!=i){const e=(0,c.v_)(i,"delete");await(0,o.Z)(e,{query:{f:"json"},responseType:"json",method:"post"})}throw e}}function O(e){return e.replaceAll("/","_").replaceAll("\\","_")}var R=t(2981);async function q(e,s,t){const o=e.length;if(!o)return t?.onProgress?.(1),[];const r=F(o,t?.onProgress,"uploadAssets");return Promise.all(e.map(((e,o)=>async function(e,{layer:s,ongoingUploads:t},o){const r=t.get(e);if(r)return r;if(!function(e){return!!e.infoFor3D&&!!e.url}(s))throw new f;if(function(e,s){const{parsedUrl:t}=s;return null!=t&&e.metadata.externalSources.some((e=>(0,l.JG)(e,t)))}(e,s))return o?.onProgress?.(1),e;const n=async function(e,s,t){const{metadata:o}=e,{displaySource:r}=o,n=H(r?.source,s),c=!!n,l=o.externalSources.length>0,p=c?async function(e,s,t){return{source:await G(e,s,t),original:!0}}(n,s,t):l?async function(e,s,t){const o=X(s),{externalSources:r}=e.metadata,n=function(e,s){for(const t of e){const e=H(t.source,s);if(e)return e}return null}(r,s);if(!n)throw new g;const a=F(v.uploadConvertibleSource,t?.onProgress,"uploadConvertibleSource"),c=await G(n,s,{onProgress:a.makeOnProgress("uploadEditSource")});e.addExternalSources([{source:c,original:!0}]);const u=n.reduce(((e,{asset:s})=>s instanceof File?e+s.size:e),0),l=a.simulate("serviceAssetsToGlb",function(e,s=j){return(0,i.up)((0,i._H)(e*S/s))}(u));try{return{source:await W(c,s,o)}}finally{l.remove()}}(e,s,t):async function(e,s,t){const o=F(v.uploadLocalMesh,t?.onProgress,"uploadLocalMesh"),r=async function(e,s,t){const o=X(s),r=await e.load(t),n=await r.toBinaryGLTF({ignoreLocalTransform:!0});(0,a.k_)(t);const i=await n.buffer();return(0,a.k_)(t),{blob:new Blob([i.data],{type:i.type}),assetName:`${(0,u.zS)()}.glb`,assetType:o}}(e,s,{...t,onProgress:o.makeOnProgress("meshToAssetBlob")});return{source:await J([r],s,{...t,onProgress:o.makeOnProgress("uploadAssetBlobs")}),extent:e.extent.clone(),original:!0}}(e,s,t),d=await p;return(0,a.k_)(t),e.addExternalSources([d]),e}(e,s,o);t.set(e,n);try{await n}finally{t.delete(e)}return e}(e,s,{...t,onProgress:r.makeOnProgress(o)}))))}function H(e,s){if(!e)return null;const{infoFor3D:{supportedFormats:t,editFormats:o}}=s,r=(0,l.zE)(e),n=new Array;let a=!1;for(let e=0;e<r.length;++e){const s=z(r[e],t);if(!s)return null;o.includes(s.assetType)&&(a=!0),n.push(s)}return a?n:null}function z(e,s){const t=(0,l.vj)(e,s);return t?{asset:e,assetType:t}:null}async function G(e,s,t){return J(e.map((e=>async function(e,s){const{asset:t,assetType:o}=e;if(t instanceof File)return{blob:t,assetName:t.name,assetType:o};const r=await t.toBlob(s);return(0,a.k_)(s),{blob:r,assetName:t.assetName,assetType:o}}(e,t))),s,t)}async function J(e,s,t){const o=F(v.uploadAssetBlobs,t?.onProgress,"uploadAssetBlobs"),r=await function(e,s,t){const o=F(e.length,t?.onProgress,"prepareAssetItems");return Promise.all(e.map((async(e,r)=>{const i=async function(e,s,t){const{blob:o,assetType:r,assetName:i}=e;let u=null;try{const e=await L({data:o,name:i},s.url,t);(0,a.k_)(t),u={assetType:r,assetUploadId:e.itemID}}catch(e){(0,a.r9)(e),n.Z.getLogger("esri.layers.graphics.sources.support.uploadAssets").warnOnce(`Service ${s.url} does not support the REST Uploads API.`)}if(!u){const e=await(0,c.IR)(o);if((0,a.k_)(t),!e.isBase64)throw new w;u={assetType:r,assetData:e.data}}if(!u)throw new y;return{item:u,assetName:i}}(await e,s,{...t,onProgress:o.makeOnProgress(r)});return(0,a.k_)(t),i})))}(e,s,{...t,onProgress:o.makeOnProgress("prepareAssetItems")});(0,a.k_)(t);const i=r.map((({item:e})=>e)),{uploadResults:u}=await K(i,s,{...t,onProgress:o.makeOnProgress("uploadAssetItems")});return(0,a.k_)(t),e.map(((e,t)=>function(e,s,t){const{success:o}=s;if(!o){const{error:t}=s;throw new b(e.assetName,t)}const{assetHash:r}=s,{assetName:n,item:{assetType:a}}=e,{infoFor3D:{supportedFormats:i}}=t,c=(0,R.d1)(a,i);if(!c)throw new _(a);return new l.CP(n,c,[new l.LL(`${t.parsedUrl.path}/assets/${r}`,r)])}(r[t],u[t],s)))}async function K(e,s,t){const r=$(t?.onProgress);try{const r=await(0,o.Z)((0,c.v_)(s.parsedUrl.path,"uploadAssets"),{timeout:0,query:{f:"json",assets:JSON.stringify(e)},method:"post",responseType:"json"});if((0,a.k_)(t),r.data.uploadResults.length!==e.length)throw new P(e.length,r.data.uploadResults.length);return r.data}finally{r.remove()}}async function W(e,s,t){const o=e.map((({assetName:e,parts:s})=>({assetName:e,assetHash:s[0].partHash}))),r=s.capabilities?.operations.supportsAsyncConvert3D,n={f:"json",assets:JSON.stringify(o),transportType:"esriTransportTypeUrl",targetFormat:t,async:r},a=(0,c.v_)(s.parsedUrl.path,"convert3D");let i;try{i=(await(r?V:Q)(a,{query:n,responseType:"json",timeout:0})).data}catch(e){throw new T}const{supportedFormats:u}=s.infoFor3D;return i.assets.map((e=>{const s=(0,R.S0)(e.contentType,u);if(!s)throw new _(s);return new l.CP(e.assetName,e.contentType,[new l.LL(e.assetURL,e.assetHash)])}))}function Q(e,s){return(0,o.Z)(e,s)}async function V(e,s){const t=(await(0,o.Z)(e,s)).data.statusUrl;for(;;){const e=(await(0,o.Z)(t,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,o.Z)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new Error(e.status);case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new Error}await(0,a.e4)(Y)}}function X(e){const{infoFor3D:s}=e,t=(0,R.S0)("model/gltf-binary",s.supportedFormats)??(0,R.Ow)("glb",s.supportedFormats);if(!t)throw new h;return t}const Y=(0,i.HA)(1e3)}}]);
|