@arcgis/core 4.24.0-next.20220520 → 4.24.0-next.20220521

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.
Files changed (49) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{26646a7545a194e67441.js → 27572edd67242e1b6646.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{d94c5f36d52cf71f0bb9.js → 27f974dae930eb12fe38.js} +1 -1
  4. package/assets/esri/core/workers/chunks/2b708cc5ba0edd6c80e1.js +1 -0
  5. package/assets/esri/core/workers/chunks/{c5fadaa98749ffb490f5.js → 3c258ac11c963b7d9509.js} +1 -1
  6. package/assets/esri/core/workers/chunks/40d70d446abe357d6f43.js +1 -0
  7. package/assets/esri/core/workers/chunks/5cf2064bfd9d0847d9ec.js +1 -0
  8. package/assets/esri/core/workers/chunks/{f5089121d845ec594008.js → 6ac32325a961f1cf3c1b.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{1c2805cc97dcee70e60d.js → 816ae3f0513ecf856f8f.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{8033531b0cc706b40d86.js → 8523d45cf4765eddc380.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{a5ee17cdc9eb23ebeaf0.js → 85f2f6a50cf1b6c7ce82.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{c40d9caf5189be2c698e.js → 87b83dfce3ee252aba94.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{6e48b0db65bcaaace838.js → 8cd8dad8bcd5c0ef445e.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{54711b8a98104eeec833.js → 8ec860742695e5bbbcb2.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{e51f0e71f2a55af604d3.js → 93c4e01b237a6b3f871f.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{3e94e35f44aadbb332ff.js → aae70408958f6ee7279e.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{7e150c38e25fbb8bacaf.js → b476a80ef81c211685be.js} +1 -1
  18. package/assets/esri/core/workers/chunks/b8db486a3dba68a8030a.js +1 -0
  19. package/assets/esri/core/workers/chunks/{82b6535a30287c74ba13.js → c0e6dbecdbd30066a82c.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{66e8a253312d72a8e7f9.js → c4115e8d1eb2ca6bb605.js} +1 -1
  21. package/assets/esri/core/workers/chunks/cd04bae81e5fc27ec97b.js +1 -0
  22. package/assets/esri/core/workers/chunks/{24217129d492e170f0f0.js → f668ccaf8bd0be0ab57b.js} +1 -1
  23. package/core/CollectionFlattener.js +1 -1
  24. package/core/promiseUtils.js +1 -1
  25. package/interfaces.d.ts +78 -2
  26. package/layers/FeatureLayer.js +1 -1
  27. package/layers/SubtypeGroupLayer.js +1 -1
  28. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  29. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  30. package/layers/mixins/ArcGISImageService.js +1 -1
  31. package/layers/mixins/refresh.js +1 -1
  32. package/layers/support/FeatureReductionCluster.js +1 -1
  33. package/layers/support/capabilities.js +1 -1
  34. package/package.json +1 -1
  35. package/support/revision.js +1 -1
  36. package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
  37. package/views/2d/engine/webgl/TextureManager.js +1 -1
  38. package/views/2d/engine/webgl/animatedFormats/BaseAnimatableTextureResource.js +1 -1
  39. package/views/2d/engine/webgl/animatedFormats/apng.js +1 -1
  40. package/views/2d/engine/webgl/animatedFormats/gif.js +1 -1
  41. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  42. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  43. package/views/2d/layers/features/schemaUtils.js +1 -1
  44. package/views/SceneView.js +1 -1
  45. package/assets/esri/core/workers/chunks/128f461007ef039d4f73.js +0 -1
  46. package/assets/esri/core/workers/chunks/672da24bbf86718bf48d.js +0 -1
  47. package/assets/esri/core/workers/chunks/824a700ba611e6c4fa9a.js +0 -1
  48. package/assets/esri/core/workers/chunks/be4bf1e4cbe2a593f8b3.js +0 -1
  49. package/assets/esri/core/workers/chunks/d6315aa9eedf79a7bca1.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7202,4889],{78346:(e,t,r)=>{r.d(t,{bA:()=>D});var s=r(20102),o=r(80442),n=r(95330),i=r(80903),a=r(25045),l=r(40330),u=r(92604),p=r(70586),d=r(94362),c=r(99880),h=r(68773),y=(r(2587),r(17452));const f={};function m(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=f.baseUrl),f.packages?.forEach((e=>{!function(e,t){for(const r of e)if(r.name===t.name)return;e.push(t)}(t.packages,e)})),t}var g=r(41213);class b{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class w{constructor(){this._dispatcher=new b,this._workerPostMessage({type:d.Cs.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,g.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,g.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,d.QM)(e);if(t&&t.type===d.Cs.OPEN){const{modulePath:e,jobId:r}=t;let s=await a.default.loadWorker(e);s||(s=await import(e));const o=a.default.connect(s);this._workerPostMessage({type:d.Cs.OPENED,jobId:r,data:o})}}}var v=r(70171),_=r(17202);const k=u.Z.getLogger("esri.core.workers"),{HANDSHAKE:C}=d.Cs;let S,E;const O="Failed to create Worker. Fallback to execute module in main thread";async function R(e){return new Promise((t=>{function r(o){const n=(0,d.QM)(o);n&&n.type===C&&(e.removeEventListener("message",r),e.removeEventListener("error",s),t(e))}function s(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",s),k.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new w).addEventListener("message",r),e.addEventListener("error",s)}e.addEventListener("message",r),e.addEventListener("error",s)}))}let x=0;const I=u.Z.getLogger("esri.core.workers"),{ABORT:N,INVOKE:P,OPEN:F,OPENED:j,RESPONSE:Z}=d.Cs;class J{constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),I.error(e)}))}static async create(e){const t=await async function(){if(!(0,o.Z)("esri-workers")||((0,o.Z)("mozilla"),0))return R(new w);if(!S&&!E)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,buildDate:r,version:t}=configuration.kernelInfo,{revision:n,buildDate:i,version:s}=e.kernelInfo;o!==n&&console.warn(`[esri.core.workers] Version mismatch detected between ArcGIS API for JavaScript and assets:\\nAPI version: ${t} [Date: ${r}, Revision: ${o.slice(0,8)}]\nAssets version: ${s} [Date: ${i}, Revision: ${n.slice(0,8)}]`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let e;function t(o){const t=e.connect(o);self.postMessage({type:2,jobId:r,data:t},[t])}"function"==typeof define&&define.amd?require([workerPath],(r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((r=>(e=r.default,checkWorkerRevision(e),e.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),e=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(e),e.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const e=outgoing.get(r);outgoing.delete(r),o.error?e.reject(JSON.parse(o.error)):e.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.replace('"{CONFIGURATION}"',`'${function(){let e;if(null!=h.Z.default){const t={...h.Z};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(h.Z));e.assetsPath=(0,y.hF)(e.assetsPath),e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,v.Kd)(),e.has={"esri-csp-restrictions":(0,o.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,o.Z)("esri-2d-update-debug"),"esri-2d-query-centroid-enabled":(0,o.Z)("esri-2d-query-centroid-enabled"),"featurelayer-pbf":(0,o.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,o.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,o.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,o.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,o.Z)("esri-atomics"),"esri-shared-array-buffer":(0,o.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,o.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,o.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,o.Z)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,y.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,y.hF)(e.workers.workerPath):e.workers.workerPath=(0,y.hF)((0,c.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=h.Z.workers.loaderConfig,r=m({baseUrl:t?.baseUrl,locale:(0,v.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={version:l.i8,buildDate:_.r,revision:_.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:s})}()}'`);S=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){E=e||{}}let e;if(S)try{e=new Worker(S,{name:"esri-worker-"+x++})}catch(t){k.warn(O,E),e=new w}else k.warn(O,E),e=new w;return R(e)}();return new J(t,e)}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,s=(0,d.jt)();return new Promise(((t,o)=>{const i={resolve:t,reject:o,abortHandle:(0,n.$F)(r,(()=>{this._outJobs.delete(s),this._post({type:N,jobId:s})}))};this._outJobs.set(s,i),this._post({type:F,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,d.QM)(e);if(t)switch(t.type){case j:this._onOpenedMessage(t);break;case Z:this._onResponseMessage(t);break;case N:this._onAbortMessage(t);break;case P:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,s=t.get(r);s&&(s.controller&&s.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:s,abortable:o}=e,i=o?new AbortController:null,a=this._inJobs,u=l.Nv[t];let p;try{if("function"!=typeof u)throw new TypeError(`${t} is not a function`);p=u.call(null,s,{signal:i?i.signal:null})}catch(e){return void this._post({type:Z,jobId:r,error:(0,d.AB)(e)})}(0,n.y8)(p)?(a.set(r,{controller:i,promise:p}),p.then((e=>{a.has(r)&&(a.delete(r),this._post({type:Z,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,n.D_)(e)||this._post({type:Z,jobId:r,error:(0,d.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:Z,jobId:r},p)}_onOpenedMessage(e){const{jobId:t,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,p.hw)(s.abortHandle),s.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:o}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,p.hw)(n.abortHandle),r?n.reject(s.Z.fromJSON(JSON.parse(r))):n.resolve(o))}_post(e,t,r){return(0,d.oi)(this.worker,e,t,r)}}let M=(0,o.Z)("esri-workers-debug")?1:(0,o.Z)("host-browser")?navigator.hardwareConcurrency-1:0;M||(M=(0,o.Z)("safari")&&(0,o.Z)("mac")||(0,o.Z)("trident")?7:2);let q=0;const A=[];async function L(e,t){const r=new i.Z;return await r.open(e,t),r}async function D(e,t={}){if("string"!=typeof e)throw new s.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,o.Z)("host-webworker")&&!(0,o.Z)("esri-workers")&&(r="local"),"local"===r){let r=await a.default.loadWorker(e);r||(r=await import(e)),(0,n.k_)(t.signal);const s=t.client||r;return L([a.default.connect(r)],{...t,client:s})}if(await async function(){if(T)return T;U=new AbortController;const e=[];for(let t=0;t<M;t++){const r=J.create(t).then((e=>(A[t]=e,e)));e.push(r)}return T=Promise.all(e),T}(),(0,n.k_)(t.signal),"dedicated"===r){const r=q++%M;return L([await A[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,M);if(r<M){const s=new Array(r);for(let o=0;o<r;++o){const r=q++%M;s[o]=A[r].open(e,t)}return L(s,t)}}return L(A.map((r=>r.open(e,t))),t)}let U,T=null},2587:(e,t,r)=>{r(90344),r(18848),r(940),r(70171);var s=r(94443),o=r(3172),n=r(20102),i=r(70586);async function a(e){if((0,i.pC)(l.fetchBundleAsset))return l.fetchBundleAsset(e);const t=await(0,o.default)(e,{responseType:"text"});return JSON.parse(t.data)}const l={};var u,p=r(99880);(0,s.tz)((u={pattern:"esri/",location:p.V},new class{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let s;s="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=s,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,o){const i=t.exec(r);if(!i)throw new n.Z("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=i[1]?`${i[1]}/`:"",u=i[2],p=(0,s.Su)(o),d=`${l}${u}.json`,c=p?`${l}${u}_${p}.json`:d;let h;try{h=await a(e(c))}catch(t){if(c===d)throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{h=await a(e(d))}catch(e){throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return h}(this.getAssetUrl,this.matcher,e,t)}}(u)))},940:(e,t,r)=>{r.d(t,{n:()=>u});var s=r(92604),o=r(78286),n=r(19153),i=r(90344),a=r(18848);const l=s.Z.getLogger("esri.intl");function u(e,t,r={}){const{format:s={}}=r;return(0,n.gx)(e,(e=>function(e,t,r){let s,n;const i=e.indexOf(":");if(-1===i?s=e.trim():(s=e.slice(0,i).trim(),n=e.slice(i+1).trim()),!s)return"";const a=(0,o.hS)(s,t);if(null==a)return"";const l=r[n]||r[s];return l?p(a,l):n?d(a,n):c(a)}(e,t,s)))}function p(e,t){switch(t.type){case"date":return(0,i.p6)(e,t.intlOptions);case"number":return(0,a.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),c(e)}}function d(e,t){switch(t.toLowerCase()){case"dateformat":return(0,i.p6)(e);case"numberformat":return(0,a.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,i.p6)(e):/^numberformat/i.test(t)?(0,a.uf)(e):c(e)}}function c(e){switch(typeof e){case"string":return e;case"number":return(0,a.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,i.p6)(e):""}}},23477:(e,t,r)=>{r.r(t),r.d(t,{default:()=>B});var s=r(43697),o=(r(66577),r(51773)),n=(r(16050),r(12501),r(28756),r(92271),r(18746),r(5499),r(84382),r(30687),r(91423),r(32400)),i=r(70586),a=r(16453),l=r(17452),u=r(5600),p=(r(67676),r(80442)),d=(r(75215),r(52011)),c=r(86973),h=r(87085),y=r(20102),f=r(83379),m=r(92604),g=r(95330),b=r(78346),w=r(25278),v=r(74889),_=r(6570),k=r(38913);const C=m.Z.getLogger("esri.layers.graphics.sources.GeoJSONSource");let S=class extends f.Z{constructor(){super(...arguments),this.type="geojson",this.refresh=(0,g.Ds)((async e=>{await this.load();const{extent:t,timeExtent:r}=await this._connection.invoke("refresh",e);return this.sourceJSON.extent=t,r&&(this.sourceJSON.timeInfo.timeExtent=[r.start,r.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}}))}load(e){const t=(0,i.pC)(e)?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}applyEdits(e){return this.load().then((()=>this._applyEdits(e)))}openPorts(){return this.load().then((()=>this._connection.openPorts()))}queryFeatures(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t))).then((e=>v.default.fromJSON(e)))}queryFeaturesJSON(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t)))}queryFeatureCount(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)))}queryObjectIds(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)))}queryExtent(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t))).then((e=>({count:e.count,extent:_.Z.fromJSON(e.extent)})))}querySnapping(e,t={}){return this.load(t).then((()=>this._connection.invoke("querySnapping",e,t)))}_applyEdits(e){if(!this._connection)throw new y.Z("geojson-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField,r=[],s=[],o=[];if(e.addFeatures)for(const t of e.addFeatures)r.push(this._serializeFeature(t));if(e.deleteFeatures)for(const r of e.deleteFeatures)"objectId"in r&&null!=r.objectId?s.push(r.objectId):"attributes"in r&&null!=r.attributes[t]&&s.push(r.attributes[t]);if(e.updateFeatures)for(const t of e.updateFeatures)o.push(this._serializeFeature(t));return this._connection.invoke("applyEdits",{adds:r,updates:o,deletes:s}).then((({extent:e,timeExtent:t,featureEditResults:r})=>(this.sourceJSON.extent=e,t&&(this.sourceJSON.timeInfo.timeExtent=[t.start,t.end]),this._createEditsResult(r))))}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new y.Z("geojson-layer-source:edit-failure",t.description,{code:t.code}):null}}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e);return r?{geometry:r.toJSON(),attributes:t}:{attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return(0,i.Wi)(t)?null:"mesh"===t.type||"extent"===t.type?k.Z.fromExtent(t.extent):t}async _startWorker(e){this._connection=await(0,b.bA)("GeoJSONSourceWorker",{strategy:(0,p.Z)("feature-layers-workers")?"dedicated":"local",signal:e});const{fields:t,spatialReference:r,hasZ:s,geometryType:o,objectIdField:n,url:i,timeInfo:a,customParameters:l}=this.layer,u="defaults"===this.layer.originOf("spatialReference"),d={url:i,customParameters:l,fields:t&&t.map((e=>e.toJSON())),geometryType:c.Mk.toJSON(o),hasZ:s,objectIdField:n,timeInfo:a?a.toJSON():null,spatialReference:u?null:r&&r.toJSON()},h=await this._connection.invoke("load",d,{signal:e});for(const e of h.warnings)C.warn(e.message,{layer:this.layer,warning:e});h.featureErrors.length&&C.warn(`Encountered ${h.featureErrors.length} validation errors while loading features`,h.featureErrors),this.sourceJSON=h.layerDefinition,this.capabilities=(0,w.MS)(this.sourceJSON.hasZ,!0)}};(0,s._)([(0,u.Cb)()],S.prototype,"capabilities",void 0),(0,s._)([(0,u.Cb)()],S.prototype,"type",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],S.prototype,"layer",void 0),(0,s._)([(0,u.Cb)()],S.prototype,"sourceJSON",void 0),S=(0,s._)([(0,d.j)("esri.layers.graphics.sources.GeoJSONSource")],S);var E=r(71612),O=r(17017),R=r(69637),x=r(38009),I=r(68825),N=r(34760),P=r(72965),F=r(28294),j=r(21506),Z=r(2075),J=r(70082),M=r(16451),q=r(1231),A=r(53518),L=r(35671),D=r(2319),U=r(30707),T=r(57444),$=r(32163),G=r(82971);const z=(0,A.v)();let H=class extends((0,I.c)((0,O.N)((0,R.b)((0,E.h)((0,F.n)((0,P.M)((0,N.Q)((0,x.q)((0,a.R)(h.Z)))))))))){constructor(e){super(e),this.copyright=null,this.definitionExpression=null,this.displayField=null,this.editingEnabled=!1,this.elevationInfo=null,this.featureReduction=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="GeoJSON",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new S({layer:this}),this.spatialReference=G.Z.WGS84,this.templates=null,this.title="GeoJSON",this.type="geojson",this.typeIdField=null,this.types=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.source.load(e).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo"],"service"),(0,L.YN)(this.renderer,this.fieldsIndex),(0,L.UF)(this.timeInfo,this.fieldsIndex)}))),Promise.resolve(this)}get capabilities(){return this.source?this.source.capabilities:null}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return this.loaded&&null==this.geometryType}get parsedUrl(){return this.url?(0,l.mN)(this.url):null}set renderer(e){(0,L.YN)(e,this.fieldsIndex),this._set("renderer",e)}set url(e){if(!e)return void this._set("url",e);const t=(0,l.mN)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async applyEdits(e,t){const s=await r.e(4720).then(r.bind(r,14720));await this.load();const o=await s.applyEdits(this,this.source,e,t);return this.read({extent:this.source.sourceJSON.extent,timeInfo:this.source.sourceJSON.timeInfo},{origin:"service",ignoreDefaults:!0}),o}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,$.eZ)(this,e)}createQuery(){const e=new T.Z,t=this.get("capabilities.data");e.returnGeometry=!0,t&&t.supportsZ&&(e.returnZ=!0),e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:r,timeExtent:s}=this;return e.timeExtent=null!=r&&null!=s?s.offset(-r.value,r.unit):s||null,e}getFieldDomain(e,t){let r,s=!1;const o=t&&t.feature,n=o&&o.attributes,i=this.typeIdField&&n&&n[this.typeIdField];return null!=i&&this.types&&(s=this.types.some((t=>t.id==i&&(r=t.domains&&t.domains[e],r&&"inherited"===r.type&&(r=this._getLayerDomain(e)),!0)))),s||r||(r=this._getLayerDomain(e)),r}getField(e){return this.fieldsIndex.get(e)}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(T.Z.from(e)||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this.load().then((()=>this.source.queryObjectIds(T.Z.from(e)||this.createQuery(),t)))}queryFeatureCount(e,t){return this.load().then((()=>this.source.queryFeatureCount(T.Z.from(e)||this.createQuery(),t)))}queryExtent(e,t){return this.load().then((()=>this.source.queryExtent(T.Z.from(e)||this.createQuery(),t)))}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return(0,i.pC)(t)&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}_getLayerDomain(e){if(!this.fields)return null;let t=null;return this.fields.some((r=>(r.name===e&&(t=r.domain),!!t))),t}};(0,s._)([(0,u.Cb)({readOnly:!0,json:{read:!1,write:!1}})],H.prototype,"capabilities",null),(0,s._)([(0,u.Cb)({type:String})],H.prototype,"copyright",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],H.prototype,"createQueryVersion",null),(0,s._)([(0,u.Cb)({readOnly:!0})],H.prototype,"defaultPopupTemplate",null),(0,s._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],H.prototype,"definitionExpression",void 0),(0,s._)([(0,u.Cb)({type:String})],H.prototype,"displayField",void 0),(0,s._)([(0,u.Cb)({type:Boolean})],H.prototype,"editingEnabled",void 0),(0,s._)([(0,u.Cb)(j.PV)],H.prototype,"elevationInfo",void 0),(0,s._)([(0,u.Cb)(Z.d)],H.prototype,"featureReduction",void 0),(0,s._)([(0,u.Cb)({type:[q.Z],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],H.prototype,"fields",void 0),(0,s._)([(0,u.Cb)(z.fieldsIndex)],H.prototype,"fieldsIndex",void 0),(0,s._)([(0,u.Cb)({type:_.Z,json:{name:"extent"}})],H.prototype,"fullExtent",void 0),(0,s._)([(0,u.Cb)({type:["point","polygon","polyline","multipoint"],json:{read:{reader:c.Mk.read}}})],H.prototype,"geometryType",void 0),(0,s._)([(0,u.Cb)({type:Boolean})],H.prototype,"hasZ",void 0),(0,s._)([(0,u.Cb)(j.id)],H.prototype,"id",void 0),(0,s._)([(0,u.Cb)({type:Boolean,readOnly:!0})],H.prototype,"isTable",null),(0,s._)([(0,u.Cb)(j.iR)],H.prototype,"labelsVisible",void 0),(0,s._)([(0,u.Cb)({type:[D.Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:U.r},write:!0}})],H.prototype,"labelingInfo",void 0),(0,s._)([(0,u.Cb)(j.rn)],H.prototype,"legendEnabled",void 0),(0,s._)([(0,u.Cb)({type:["show","hide"]})],H.prototype,"listMode",void 0),(0,s._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],H.prototype,"objectIdField",void 0),(0,s._)([(0,u.Cb)(j.Oh)],H.prototype,"opacity",void 0),(0,s._)([(0,u.Cb)({type:["GeoJSON"]})],H.prototype,"operationalLayerType",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],H.prototype,"parsedUrl",null),(0,s._)([(0,u.Cb)(j.C_)],H.prototype,"popupEnabled",void 0),(0,s._)([(0,u.Cb)({type:o.Z,json:{name:"popupInfo",write:!0}})],H.prototype,"popupTemplate",void 0),(0,s._)([(0,u.Cb)({types:n.A,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:n.o}}}})],H.prototype,"renderer",null),(0,s._)([(0,u.Cb)(j.YI)],H.prototype,"screenSizePerspectiveEnabled",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],H.prototype,"source",void 0),(0,s._)([(0,u.Cb)({type:G.Z})],H.prototype,"spatialReference",void 0),(0,s._)([(0,u.Cb)({type:[J.Z]})],H.prototype,"templates",void 0),(0,s._)([(0,u.Cb)()],H.prototype,"title",void 0),(0,s._)([(0,u.Cb)({json:{read:!1},readOnly:!0})],H.prototype,"type",void 0),(0,s._)([(0,u.Cb)({type:String,readOnly:!0})],H.prototype,"typeIdField",void 0),(0,s._)([(0,u.Cb)({type:[M.Z]})],H.prototype,"types",void 0),(0,s._)([(0,u.Cb)(j.HQ)],H.prototype,"url",null),H=(0,s._)([(0,d.j)("esri.layers.GeoJSONLayer")],H);const B=H},61159:(e,t,r)=>{r.d(t,{g:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},25278:(e,t,r)=>{r.d(t,{Dm:()=>p,Hq:()=>d,MS:()=>c,bU:()=>a});var s=r(80442),o=r(22974),n=r(61159),i=r(58333);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?i.I4:"esriGeometryPolyline"===e?i.ET:i.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,s.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,o.d9)(e)}}]}function c(e,t){return{attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:n.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1}}}},68825:(e,t,r)=>{r.d(t,{c:()=>f});var s,o=r(43697),n=r(78286),i=r(5600),a=(r(67676),r(80442),r(75215),r(52011)),l=r(35454),u=r(96674);const p=new l.X({asc:"ascending",desc:"descending"});let d=s=class extends u.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,o._)([(0,i.Cb)({type:String,json:{write:!0}})],d.prototype,"field",void 0),(0,o._)([(0,i.Cb)({type:String,json:{write:!0}})],d.prototype,"valueExpression",void 0),(0,o._)([(0,i.Cb)({type:p.apiValues,json:{read:p.read,write:p.write}})],d.prototype,"order",void 0),d=s=(0,o._)([(0,a.j)("esri.layers.support.OrderByInfo")],d);const c=d;function h(e,t,r){if(!e)return null;const s=e.find((e=>!!e.field));if(!s)return null;const o=new c;return o.read(s,r),[o]}function y(e,t,r,s){const o=e.find((e=>!!e.field));o&&(0,n.RB)(r,[o.toJSON()],t)}const f=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,o._)([(0,i.Cb)({type:[c],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:h},write:{target:"layerDefinition.orderBy",writer:y}}})],t.prototype,"orderBy",void 0),t=(0,o._)([(0,a.j)("esri.layers.mixins.OrderedLayer")],t),t}},51706:(e,t,r)=>{var s,o;function n(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function i(e){return null!=e&&!isNaN(e)&&isFinite(e)}function a(e){return e.valueExpression?s.Expression:e.field&&"string"==typeof e.field?s.Field:s.Unknown}function l(e,t){const r=t||a(e),n=e.valueUnit||"unknown";return r===s.Unknown?o.Constant:e.stops?o.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?o.ClampedLinear:"unknown"===n?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?o.Proportional:o.Additive:o.Identity:o.RealWorldSize}r.d(t,{PS:()=>a,QW:()=>l,RY:()=>s,hL:()=>o,iY:()=>n,qh:()=>i}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(s||(s={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(o||(o={}))},74889:(e,t,r)=>{r.r(t),r.d(t,{default:()=>v});var s,o=r(43697),n=r(66577),i=r(38171),a=r(35454),l=r(96674),u=r(22974),p=r(70586),d=r(5600),c=(r(75215),r(71715)),h=r(52011),y=r(30556),f=r(82971),m=r(33955),g=r(1231);const b=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=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=f.Z.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const o=e[t],n=i.Z.fromJSON(o),a=o.geometry&&o.geometry.spatialReference;(0,p.pC)(n.geometry)&&!a&&(n.geometry.spatialReference=r);const l=o.aggregateGeometries,u=n.aggregateGeometries;if(l&&(0,p.pC)(u))for(const e in u){const t=u[e],s=l[e]?.spatialReference;(0,p.pC)(t)&&!s&&(t.spatialReference=r)}s.push(n)}return s}writeGeometryType(e,t,r,s){if(e)return void b.write(e,t,r,s);const{features:o}=this;if(o)for(const e of o)if(e&&(0,p.pC)(e.geometry))return void b.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,m.im)(e);return!r&&t.spatialReference&&(s.spatialReference=f.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&&(0,p.pC)(e.geometry)&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,u.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&&e[r];s.geometry=t&&t.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,o]}=e,n=this.features,i=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=n.length;e<t;e++)i((0,p.Wg)(n[e].geometry))||(n.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:[n,i]}=r,a=this._getHydrationFunction(e,(e=>e*n+s),(e=>o-e*i));for(const{geometry:e}of t)(0,p.pC)(e)&&a(e);return this.transform=null,this}_quantizePoints(e,t,r){let s,o;const n=[];for(let i=0,a=e.length;i<a;i++){const a=e[i];if(i>0){const e=t(a[0]),i=r(a[1]);e===s&&i===o||(n.push([e-s,i-o]),s=e,o=i)}else s=t(a[0]),o=r(a[1]),n.push([s,o])}return n.length>0?n: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,m.oU)(e)?e.rings:e.paths,o=[];for(let e=0,n=s.length;e<n;e++){const n=s[e],i=this._quantizePoints(n,t,r);i&&o.push(i)}return o.length>0?((0,m.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const s=(0,m.oU)(e)?e.rings:e.paths;let o,n;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(o+=s[0],n+=s[1]):(o=s[0],n=s[1]),s[0]=t(o),s[1]=r(n)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const s=e.points;let o,n;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],n+=i[1]):(o=i[0],n=i[1]),i[0]=t(o),i[1]=r(n)}}:void 0}};(0,o._)([(0,d.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,d.Cb)({type:[i.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,o._)([(0,c.r)("features")],w.prototype,"readFeatures",null),(0,o._)([(0,d.Cb)({type:[g.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,o._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:b.read}}})],w.prototype,"geometryType",void 0),(0,o._)([(0,y.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,o._)([(0,d.Cb)({types:n.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,o._)([(0,c.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,o._)([(0,d.Cb)({type:f.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,o._)([(0,y.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,o._)([(0,d.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=s=(0,o._)([(0,h.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const v=w}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7202,4889],{78346:(e,t,r)=>{r.d(t,{bA:()=>D});var s=r(20102),o=r(80442),n=r(95330),i=r(80903),a=r(25045),l=r(40330),u=r(92604),p=r(70586),d=r(94362),c=r(99880),h=r(68773),y=(r(2587),r(17452));const f={};function m(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=f.baseUrl),f.packages?.forEach((e=>{!function(e,t){for(const r of e)if(r.name===t.name)return;e.push(t)}(t.packages,e)})),t}var g=r(41213);class b{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class w{constructor(){this._dispatcher=new b,this._workerPostMessage({type:d.Cs.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,g.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,g.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,d.QM)(e);if(t&&t.type===d.Cs.OPEN){const{modulePath:e,jobId:r}=t;let s=await a.default.loadWorker(e);s||(s=await import(e));const o=a.default.connect(s);this._workerPostMessage({type:d.Cs.OPENED,jobId:r,data:o})}}}var v=r(70171),_=r(17202);const k=u.Z.getLogger("esri.core.workers"),{HANDSHAKE:C}=d.Cs;let S,E;const O="Failed to create Worker. Fallback to execute module in main thread";async function R(e){return new Promise((t=>{function r(o){const n=(0,d.QM)(o);n&&n.type===C&&(e.removeEventListener("message",r),e.removeEventListener("error",s),t(e))}function s(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",s),k.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new w).addEventListener("message",r),e.addEventListener("error",s)}e.addEventListener("message",r),e.addEventListener("error",s)}))}let x=0;const I=u.Z.getLogger("esri.core.workers"),{ABORT:N,INVOKE:P,OPEN:F,OPENED:j,RESPONSE:Z}=d.Cs;class J{constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),I.error(e)}))}static async create(e){const t=await async function(){if(!(0,o.Z)("esri-workers")||((0,o.Z)("mozilla"),0))return R(new w);if(!S&&!E)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,buildDate:r,version:t}=configuration.kernelInfo,{revision:n,buildDate:i,version:s}=e.kernelInfo;o!==n&&console.warn(`[esri.core.workers] Version mismatch detected between ArcGIS API for JavaScript and assets:\\nAPI version: ${t} [Date: ${r}, Revision: ${o.slice(0,8)}]\nAssets version: ${s} [Date: ${i}, Revision: ${n.slice(0,8)}]`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let e;function t(o){const t=e.connect(o);self.postMessage({type:2,jobId:r,data:t},[t])}"function"==typeof define&&define.amd?require([workerPath],(r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((r=>(e=r.default,checkWorkerRevision(e),e.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),e=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(e),e.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const e=outgoing.get(r);outgoing.delete(r),o.error?e.reject(JSON.parse(o.error)):e.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.replace('"{CONFIGURATION}"',`'${function(){let e;if(null!=h.Z.default){const t={...h.Z};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(h.Z));e.assetsPath=(0,y.hF)(e.assetsPath),e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,v.Kd)(),e.has={"esri-csp-restrictions":(0,o.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,o.Z)("esri-2d-update-debug"),"esri-2d-query-centroid-enabled":(0,o.Z)("esri-2d-query-centroid-enabled"),"featurelayer-pbf":(0,o.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,o.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,o.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,o.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,o.Z)("esri-atomics"),"esri-shared-array-buffer":(0,o.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,o.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,o.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,o.Z)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,y.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,y.hF)(e.workers.workerPath):e.workers.workerPath=(0,y.hF)((0,c.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=h.Z.workers.loaderConfig,r=m({baseUrl:t?.baseUrl,locale:(0,v.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={version:l.i8,buildDate:_.r,revision:_.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:s})}()}'`);S=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){E=e||{}}let e;if(S)try{e=new Worker(S,{name:"esri-worker-"+x++})}catch(t){k.warn(O,E),e=new w}else k.warn(O,E),e=new w;return R(e)}();return new J(t,e)}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,s=(0,d.jt)();return new Promise(((t,o)=>{const i={resolve:t,reject:o,abortHandle:(0,n.$F)(r,(()=>{this._outJobs.delete(s),this._post({type:N,jobId:s})}))};this._outJobs.set(s,i),this._post({type:F,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,d.QM)(e);if(t)switch(t.type){case j:this._onOpenedMessage(t);break;case Z:this._onResponseMessage(t);break;case N:this._onAbortMessage(t);break;case P:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,s=t.get(r);s&&(s.controller&&s.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:s,abortable:o}=e,i=o?new AbortController:null,a=this._inJobs,u=l.Nv[t];let p;try{if("function"!=typeof u)throw new TypeError(`${t} is not a function`);p=u.call(null,s,{signal:i?i.signal:null})}catch(e){return void this._post({type:Z,jobId:r,error:(0,d.AB)(e)})}(0,n.y8)(p)?(a.set(r,{controller:i,promise:p}),p.then((e=>{a.has(r)&&(a.delete(r),this._post({type:Z,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,n.D_)(e)||this._post({type:Z,jobId:r,error:(0,d.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:Z,jobId:r},p)}_onOpenedMessage(e){const{jobId:t,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,p.hw)(s.abortHandle),s.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:o}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,p.hw)(n.abortHandle),r?n.reject(s.Z.fromJSON(JSON.parse(r))):n.resolve(o))}_post(e,t,r){return(0,d.oi)(this.worker,e,t,r)}}let M=(0,o.Z)("esri-workers-debug")?1:(0,o.Z)("host-browser")?navigator.hardwareConcurrency-1:0;M||(M=(0,o.Z)("safari")&&(0,o.Z)("mac")||(0,o.Z)("trident")?7:2);let q=0;const A=[];async function L(e,t){const r=new i.Z;return await r.open(e,t),r}async function D(e,t={}){if("string"!=typeof e)throw new s.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,o.Z)("host-webworker")&&!(0,o.Z)("esri-workers")&&(r="local"),"local"===r){let r=await a.default.loadWorker(e);r||(r=await import(e)),(0,n.k_)(t.signal);const s=t.client||r;return L([a.default.connect(r)],{...t,client:s})}if(await async function(){if(U)return U;T=new AbortController;const e=[];for(let t=0;t<M;t++){const r=J.create(t).then((e=>(A[t]=e,e)));e.push(r)}return U=Promise.all(e),U}(),(0,n.k_)(t.signal),"dedicated"===r){const r=q++%M;return L([await A[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,M);if(r<M){const s=new Array(r);for(let o=0;o<r;++o){const r=q++%M;s[o]=A[r].open(e,t)}return L(s,t)}}return L(A.map((r=>r.open(e,t))),t)}let T,U=null},2587:(e,t,r)=>{r(90344),r(18848),r(940),r(70171);var s=r(94443),o=r(3172),n=r(20102),i=r(70586);async function a(e){if((0,i.pC)(l.fetchBundleAsset))return l.fetchBundleAsset(e);const t=await(0,o.default)(e,{responseType:"text"});return JSON.parse(t.data)}const l={};var u,p=r(99880);(0,s.tz)((u={pattern:"esri/",location:p.V},new class{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let s;s="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=s,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,o){const i=t.exec(r);if(!i)throw new n.Z("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=i[1]?`${i[1]}/`:"",u=i[2],p=(0,s.Su)(o),d=`${l}${u}.json`,c=p?`${l}${u}_${p}.json`:d;let h;try{h=await a(e(c))}catch(t){if(c===d)throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{h=await a(e(d))}catch(e){throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return h}(this.getAssetUrl,this.matcher,e,t)}}(u)))},940:(e,t,r)=>{r.d(t,{n:()=>u});var s=r(92604),o=r(78286),n=r(19153),i=r(90344),a=r(18848);const l=s.Z.getLogger("esri.intl");function u(e,t,r={}){const{format:s={}}=r;return(0,n.gx)(e,(e=>function(e,t,r){let s,n;const i=e.indexOf(":");if(-1===i?s=e.trim():(s=e.slice(0,i).trim(),n=e.slice(i+1).trim()),!s)return"";const a=(0,o.hS)(s,t);if(null==a)return"";const l=r[n]||r[s];return l?p(a,l):n?d(a,n):c(a)}(e,t,s)))}function p(e,t){switch(t.type){case"date":return(0,i.p6)(e,t.intlOptions);case"number":return(0,a.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),c(e)}}function d(e,t){switch(t.toLowerCase()){case"dateformat":return(0,i.p6)(e);case"numberformat":return(0,a.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,i.p6)(e):/^numberformat/i.test(t)?(0,a.uf)(e):c(e)}}function c(e){switch(typeof e){case"string":return e;case"number":return(0,a.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,i.p6)(e):""}}},23477:(e,t,r)=>{r.r(t),r.d(t,{default:()=>B});var s=r(43697),o=(r(66577),r(51773)),n=(r(16050),r(12501),r(28756),r(92271),r(18746),r(5499),r(84382),r(30687),r(91423),r(32400)),i=r(70586),a=r(16453),l=r(17452),u=r(5600),p=(r(67676),r(80442)),d=(r(75215),r(52011)),c=r(86973),h=r(87085),y=r(20102),f=r(83379),m=r(92604),g=r(95330),b=r(78346),w=r(25278),v=r(74889),_=r(6570),k=r(38913);const C=m.Z.getLogger("esri.layers.graphics.sources.GeoJSONSource");let S=class extends f.Z{constructor(){super(...arguments),this.type="geojson",this.refresh=(0,g.Ds)((async e=>{await this.load();const{extent:t,timeExtent:r}=await this._connection.invoke("refresh",e);return this.sourceJSON.extent=t,r&&(this.sourceJSON.timeInfo.timeExtent=[r.start,r.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}}))}load(e){const t=(0,i.pC)(e)?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}applyEdits(e){return this.load().then((()=>this._applyEdits(e)))}openPorts(){return this.load().then((()=>this._connection.openPorts()))}queryFeatures(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t))).then((e=>v.default.fromJSON(e)))}queryFeaturesJSON(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t)))}queryFeatureCount(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)))}queryObjectIds(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)))}queryExtent(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t))).then((e=>({count:e.count,extent:_.Z.fromJSON(e.extent)})))}querySnapping(e,t={}){return this.load(t).then((()=>this._connection.invoke("querySnapping",e,t)))}_applyEdits(e){if(!this._connection)throw new y.Z("geojson-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField,r=[],s=[],o=[];if(e.addFeatures)for(const t of e.addFeatures)r.push(this._serializeFeature(t));if(e.deleteFeatures)for(const r of e.deleteFeatures)"objectId"in r&&null!=r.objectId?s.push(r.objectId):"attributes"in r&&null!=r.attributes[t]&&s.push(r.attributes[t]);if(e.updateFeatures)for(const t of e.updateFeatures)o.push(this._serializeFeature(t));return this._connection.invoke("applyEdits",{adds:r,updates:o,deletes:s}).then((({extent:e,timeExtent:t,featureEditResults:r})=>(this.sourceJSON.extent=e,t&&(this.sourceJSON.timeInfo.timeExtent=[t.start,t.end]),this._createEditsResult(r))))}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new y.Z("geojson-layer-source:edit-failure",t.description,{code:t.code}):null}}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e);return r?{geometry:r.toJSON(),attributes:t}:{attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return(0,i.Wi)(t)?null:"mesh"===t.type||"extent"===t.type?k.Z.fromExtent(t.extent):t}async _startWorker(e){this._connection=await(0,b.bA)("GeoJSONSourceWorker",{strategy:(0,p.Z)("feature-layers-workers")?"dedicated":"local",signal:e});const{fields:t,spatialReference:r,hasZ:s,geometryType:o,objectIdField:n,url:i,timeInfo:a,customParameters:l}=this.layer,u="defaults"===this.layer.originOf("spatialReference"),d={url:i,customParameters:l,fields:t&&t.map((e=>e.toJSON())),geometryType:c.Mk.toJSON(o),hasZ:s,objectIdField:n,timeInfo:a?a.toJSON():null,spatialReference:u?null:r&&r.toJSON()},h=await this._connection.invoke("load",d,{signal:e});for(const e of h.warnings)C.warn(e.message,{layer:this.layer,warning:e});h.featureErrors.length&&C.warn(`Encountered ${h.featureErrors.length} validation errors while loading features`,h.featureErrors),this.sourceJSON=h.layerDefinition,this.capabilities=(0,w.MS)(this.sourceJSON.hasZ,!0)}};(0,s._)([(0,u.Cb)()],S.prototype,"capabilities",void 0),(0,s._)([(0,u.Cb)()],S.prototype,"type",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],S.prototype,"layer",void 0),(0,s._)([(0,u.Cb)()],S.prototype,"sourceJSON",void 0),S=(0,s._)([(0,d.j)("esri.layers.graphics.sources.GeoJSONSource")],S);var E=r(71612),O=r(17017),R=r(69637),x=r(38009),I=r(68825),N=r(34760),P=r(72965),F=r(28294),j=r(21506),Z=r(2075),J=r(70082),M=r(16451),q=r(1231),A=r(53518),L=r(35671),D=r(2319),T=r(30707),U=r(57444),$=r(32163),G=r(82971);const H=(0,A.v)();let z=class extends((0,I.c)((0,O.N)((0,R.b)((0,E.h)((0,F.n)((0,P.M)((0,N.Q)((0,x.q)((0,a.R)(h.Z)))))))))){constructor(e){super(e),this.copyright=null,this.definitionExpression=null,this.displayField=null,this.editingEnabled=!1,this.elevationInfo=null,this.featureReduction=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="GeoJSON",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new S({layer:this}),this.spatialReference=G.Z.WGS84,this.templates=null,this.title="GeoJSON",this.type="geojson",this.typeIdField=null,this.types=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.source.load(e).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo"],"service"),(0,L.YN)(this.renderer,this.fieldsIndex),(0,L.UF)(this.timeInfo,this.fieldsIndex)}))),Promise.resolve(this)}get capabilities(){return this.source?this.source.capabilities:null}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return this.loaded&&null==this.geometryType}get parsedUrl(){return this.url?(0,l.mN)(this.url):null}set renderer(e){(0,L.YN)(e,this.fieldsIndex),this._set("renderer",e)}set url(e){if(!e)return void this._set("url",e);const t=(0,l.mN)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async applyEdits(e,t){const s=await r.e(4720).then(r.bind(r,14720));await this.load();const o=await s.applyEdits(this,this.source,e,t);return this.read({extent:this.source.sourceJSON.extent,timeInfo:this.source.sourceJSON.timeInfo},{origin:"service",ignoreDefaults:!0}),o}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,$.eZ)(this,e)}createQuery(){const e=new U.Z,t=this.get("capabilities.data");e.returnGeometry=!0,t&&t.supportsZ&&(e.returnZ=!0),e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:r,timeExtent:s}=this;return e.timeExtent=null!=r&&null!=s?s.offset(-r.value,r.unit):s||null,e}getFieldDomain(e,t){let r,s=!1;const o=t&&t.feature,n=o&&o.attributes,i=this.typeIdField&&n&&n[this.typeIdField];return null!=i&&this.types&&(s=this.types.some((t=>t.id==i&&(r=t.domains&&t.domains[e],r&&"inherited"===r.type&&(r=this._getLayerDomain(e)),!0)))),s||r||(r=this._getLayerDomain(e)),r}getField(e){return this.fieldsIndex.get(e)}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(U.Z.from(e)||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this.load().then((()=>this.source.queryObjectIds(U.Z.from(e)||this.createQuery(),t)))}queryFeatureCount(e,t){return this.load().then((()=>this.source.queryFeatureCount(U.Z.from(e)||this.createQuery(),t)))}queryExtent(e,t){return this.load().then((()=>this.source.queryExtent(U.Z.from(e)||this.createQuery(),t)))}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return(0,i.pC)(t)&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}_getLayerDomain(e){if(!this.fields)return null;let t=null;return this.fields.some((r=>(r.name===e&&(t=r.domain),!!t))),t}};(0,s._)([(0,u.Cb)({readOnly:!0,json:{read:!1,write:!1}})],z.prototype,"capabilities",null),(0,s._)([(0,u.Cb)({type:String})],z.prototype,"copyright",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],z.prototype,"createQueryVersion",null),(0,s._)([(0,u.Cb)({readOnly:!0})],z.prototype,"defaultPopupTemplate",null),(0,s._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],z.prototype,"definitionExpression",void 0),(0,s._)([(0,u.Cb)({type:String})],z.prototype,"displayField",void 0),(0,s._)([(0,u.Cb)({type:Boolean})],z.prototype,"editingEnabled",void 0),(0,s._)([(0,u.Cb)(j.PV)],z.prototype,"elevationInfo",void 0),(0,s._)([(0,u.Cb)(Z.d)],z.prototype,"featureReduction",void 0),(0,s._)([(0,u.Cb)({type:[q.Z],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],z.prototype,"fields",void 0),(0,s._)([(0,u.Cb)(H.fieldsIndex)],z.prototype,"fieldsIndex",void 0),(0,s._)([(0,u.Cb)({type:_.Z,json:{name:"extent"}})],z.prototype,"fullExtent",void 0),(0,s._)([(0,u.Cb)({type:["point","polygon","polyline","multipoint"],json:{read:{reader:c.Mk.read}}})],z.prototype,"geometryType",void 0),(0,s._)([(0,u.Cb)({type:Boolean})],z.prototype,"hasZ",void 0),(0,s._)([(0,u.Cb)(j.id)],z.prototype,"id",void 0),(0,s._)([(0,u.Cb)({type:Boolean,readOnly:!0})],z.prototype,"isTable",null),(0,s._)([(0,u.Cb)(j.iR)],z.prototype,"labelsVisible",void 0),(0,s._)([(0,u.Cb)({type:[D.Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:T.r},write:!0}})],z.prototype,"labelingInfo",void 0),(0,s._)([(0,u.Cb)(j.rn)],z.prototype,"legendEnabled",void 0),(0,s._)([(0,u.Cb)({type:["show","hide"]})],z.prototype,"listMode",void 0),(0,s._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],z.prototype,"objectIdField",void 0),(0,s._)([(0,u.Cb)(j.Oh)],z.prototype,"opacity",void 0),(0,s._)([(0,u.Cb)({type:["GeoJSON"]})],z.prototype,"operationalLayerType",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],z.prototype,"parsedUrl",null),(0,s._)([(0,u.Cb)(j.C_)],z.prototype,"popupEnabled",void 0),(0,s._)([(0,u.Cb)({type:o.Z,json:{name:"popupInfo",write:!0}})],z.prototype,"popupTemplate",void 0),(0,s._)([(0,u.Cb)({types:n.A,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:n.o}}}})],z.prototype,"renderer",null),(0,s._)([(0,u.Cb)(j.YI)],z.prototype,"screenSizePerspectiveEnabled",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],z.prototype,"source",void 0),(0,s._)([(0,u.Cb)({type:G.Z})],z.prototype,"spatialReference",void 0),(0,s._)([(0,u.Cb)({type:[J.Z]})],z.prototype,"templates",void 0),(0,s._)([(0,u.Cb)()],z.prototype,"title",void 0),(0,s._)([(0,u.Cb)({json:{read:!1},readOnly:!0})],z.prototype,"type",void 0),(0,s._)([(0,u.Cb)({type:String,readOnly:!0})],z.prototype,"typeIdField",void 0),(0,s._)([(0,u.Cb)({type:[M.Z]})],z.prototype,"types",void 0),(0,s._)([(0,u.Cb)(j.HQ)],z.prototype,"url",null),z=(0,s._)([(0,d.j)("esri.layers.GeoJSONLayer")],z);const B=z},61159:(e,t,r)=>{r.d(t,{g:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},25278:(e,t,r)=>{r.d(t,{Dm:()=>p,Hq:()=>d,MS:()=>c,bU:()=>a});var s=r(80442),o=r(22974),n=r(61159),i=r(58333);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?i.I4:"esriGeometryPolyline"===e?i.ET:i.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,s.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,o.d9)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:n.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1}}}},68825:(e,t,r)=>{r.d(t,{c:()=>f});var s,o=r(43697),n=r(78286),i=r(5600),a=(r(67676),r(80442),r(75215),r(52011)),l=r(35454),u=r(96674);const p=new l.X({asc:"ascending",desc:"descending"});let d=s=class extends u.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,o._)([(0,i.Cb)({type:String,json:{write:!0}})],d.prototype,"field",void 0),(0,o._)([(0,i.Cb)({type:String,json:{write:!0}})],d.prototype,"valueExpression",void 0),(0,o._)([(0,i.Cb)({type:p.apiValues,json:{read:p.read,write:p.write}})],d.prototype,"order",void 0),d=s=(0,o._)([(0,a.j)("esri.layers.support.OrderByInfo")],d);const c=d;function h(e,t,r){if(!e)return null;const s=e.find((e=>!!e.field));if(!s)return null;const o=new c;return o.read(s,r),[o]}function y(e,t,r,s){const o=e.find((e=>!!e.field));o&&(0,n.RB)(r,[o.toJSON()],t)}const f=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,o._)([(0,i.Cb)({type:[c],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:h},write:{target:"layerDefinition.orderBy",writer:y}}})],t.prototype,"orderBy",void 0),t=(0,o._)([(0,a.j)("esri.layers.mixins.OrderedLayer")],t),t}},51706:(e,t,r)=>{var s,o;function n(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function i(e){return null!=e&&!isNaN(e)&&isFinite(e)}function a(e){return e.valueExpression?s.Expression:e.field&&"string"==typeof e.field?s.Field:s.Unknown}function l(e,t){const r=t||a(e),n=e.valueUnit||"unknown";return r===s.Unknown?o.Constant:e.stops?o.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?o.ClampedLinear:"unknown"===n?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?o.Proportional:o.Additive:o.Identity:o.RealWorldSize}r.d(t,{PS:()=>a,QW:()=>l,RY:()=>s,hL:()=>o,iY:()=>n,qh:()=>i}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(s||(s={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(o||(o={}))},74889:(e,t,r)=>{r.r(t),r.d(t,{default:()=>v});var s,o=r(43697),n=r(66577),i=r(38171),a=r(35454),l=r(96674),u=r(22974),p=r(70586),d=r(5600),c=(r(75215),r(71715)),h=r(52011),y=r(30556),f=r(82971),m=r(33955),g=r(1231);const b=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=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=f.Z.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const o=e[t],n=i.Z.fromJSON(o),a=o.geometry&&o.geometry.spatialReference;(0,p.pC)(n.geometry)&&!a&&(n.geometry.spatialReference=r);const l=o.aggregateGeometries,u=n.aggregateGeometries;if(l&&(0,p.pC)(u))for(const e in u){const t=u[e],s=l[e]?.spatialReference;(0,p.pC)(t)&&!s&&(t.spatialReference=r)}s.push(n)}return s}writeGeometryType(e,t,r,s){if(e)return void b.write(e,t,r,s);const{features:o}=this;if(o)for(const e of o)if(e&&(0,p.pC)(e.geometry))return void b.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,m.im)(e);return!r&&t.spatialReference&&(s.spatialReference=f.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&&(0,p.pC)(e.geometry)&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,u.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&&e[r];s.geometry=t&&t.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,o]}=e,n=this.features,i=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=n.length;e<t;e++)i((0,p.Wg)(n[e].geometry))||(n.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:[n,i]}=r,a=this._getHydrationFunction(e,(e=>e*n+s),(e=>o-e*i));for(const{geometry:e}of t)(0,p.pC)(e)&&a(e);return this.transform=null,this}_quantizePoints(e,t,r){let s,o;const n=[];for(let i=0,a=e.length;i<a;i++){const a=e[i];if(i>0){const e=t(a[0]),i=r(a[1]);e===s&&i===o||(n.push([e-s,i-o]),s=e,o=i)}else s=t(a[0]),o=r(a[1]),n.push([s,o])}return n.length>0?n: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,m.oU)(e)?e.rings:e.paths,o=[];for(let e=0,n=s.length;e<n;e++){const n=s[e],i=this._quantizePoints(n,t,r);i&&o.push(i)}return o.length>0?((0,m.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const s=(0,m.oU)(e)?e.rings:e.paths;let o,n;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(o+=s[0],n+=s[1]):(o=s[0],n=s[1]),s[0]=t(o),s[1]=r(n)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const s=e.points;let o,n;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],n+=i[1]):(o=i[0],n=i[1]),i[0]=t(o),i[1]=r(n)}}:void 0}};(0,o._)([(0,d.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,d.Cb)({type:[i.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,o._)([(0,c.r)("features")],w.prototype,"readFeatures",null),(0,o._)([(0,d.Cb)({type:[g.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,o._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:b.read}}})],w.prototype,"geometryType",void 0),(0,o._)([(0,y.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,o._)([(0,d.Cb)({types:n.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,o._)([(0,c.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,o._)([(0,d.Cb)({type:f.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,o._)([(0,y.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,o._)([(0,d.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=s=(0,o._)([(0,h.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const v=w}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9348,5787],{57435:(e,t,i)=>{i.d(t,{Z:()=>u});var r=i(43697),s=i(80539),o=i(3920),n=i(70586),l=(i(20102),i(92604),i(26258),i(87538)),a=i(5600),d=(i(67676),i(80442),i(75215),i(52011));let p=class extends((0,o.p)(s.Z)){constructor(e){super(e),this.getCollections=null}initialize(){this.handles.add((0,l.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=(0,n.pC)(this.getCollections)?this.getCollections():null;if((0,n.Wi)(e))return void this.removeAll();let t=0;for(const i of e)(0,n.pC)(i)&&(t=this._processCollection(t,i));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const i=this.itemFilterFunction?this.itemFilterFunction:e=>!!e;for(const r of t)if(r){if(i(r)){const t=this.indexOf(r,e);t>=0?t!==e&&this.reorder(r,e):this.add(r,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(r);if(Array.isArray(t))for(const i of t)e=this._processCollection(e,i);else e=this._processCollection(e,t)}}return e}};(0,r._)([(0,a.Cb)()],p.prototype,"getCollections",void 0),(0,r._)([(0,a.Cb)()],p.prototype,"getChildrenFunction",void 0),(0,r._)([(0,a.Cb)()],p.prototype,"itemFilterFunction",void 0),p=(0,r._)([(0,d.j)("esri.core.CollectionFlattener")],p);const u=p},10699:(e,t,i)=>{i.d(t,{IG:()=>n});var r=i(43697),s=i(52011);let o=0;const n=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return t=(0,r._)([(0,s.j)("esri.core.Identifiable")],t),t};let l=class extends(n(class{})){};l=(0,r._)([(0,s.j)("esri.core.Identifiable")],l)},16453:(e,t,i)=>{i.d(t,{R:()=>m,w:()=>_});var r=i(43697),s=i(15923),o=i(70586),n=i(41103),l=i(22974),a=i(31263);class d{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.kk),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new d,i=this._originStores[a.s3.DEFAULTS];i&&i.forEach(((e,i)=>{t.set(i,(0,l.d9)(e),a.s3.DEFAULTS)}));for(let i=a.s3.SERVICE;i<a.kk;i++){const r=this._originStores[i];r&&r.forEach(((r,s)=>{e&&e.has(s)||t.set(s,(0,l.d9)(r),i)}))}return t}get(e,t){const i=void 0===t?this._values:this._originStores[t];return i?i.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,i=a.s3.USER){let r=this._originStores[i];if(r||(r=new Map,this._originStores[i]=r),r.set(e,t),!this._values.has(e)||(0,o.j0)(this._propertyOriginMap.get(e))<=i){const r=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,i),r!==t}return!1}delete(e,t=a.s3.USER){const i=this._originStores[t];if(!i)return;const r=i.get(e);if(i.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let i=t-1;i>=0;i--){const t=this._originStores[i];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,i);break}}}return r}has(e,t){const i=void 0===t?this._values:this._originStores[t];return!!i&&i.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const i=this._originStores[t],r=i&&i.get(e),s=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),s!==r}originOf(e){return this._propertyOriginMap.get(e)||a.s3.DEFAULTS}forEach(e){this._values.forEach(e)}}var p=i(50549),u=i(1153),h=i(52011);const y=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,o.j0)((0,u.vw)(this)),i=t.store,r=new d;t.store=r,(0,n.M)(t,i,r)}read(e,t){(0,p.i)(this,e,t)}getAtOrigin(e,t){const i=c(this),r=(0,a.M9)(t);if("string"==typeof e)return i.get(e,r);const s={};return e.forEach((e=>{s[e]=i.get(e,r)})),s}originOf(e){return(0,a.x3)(this.originIdOf(e))}originIdOf(e){return c(this).originOf(e)}revert(e,t){const i=c(this),r=(0,a.M9)(t),s=(0,u.vw)(this);let o;o="string"==typeof e?"*"===e?i.keys(r):[e]:e,o.forEach((e=>{s.invalidate(e),i.revert(e,r),s.commit(e)}))}};return t=(0,r._)([(0,h.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function c(e){return(0,u.vw)(e).store}let f=class extends(y(s.Z)){};f=(0,r._)([(0,h.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],f);var b=i(76169);const g=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,a.M9)(t))}write(e={},t){return(0,b.c)(this,e=e||{},t),e}setAtOrigin(e,t,i){(0,u.vw)(this).setAtOrigin(e,t,(0,a.M9)(i))}removeOrigin(e){const t=v(this),i=(0,a.M9)(e),r=t.keys(i);for(const e of r)t.originOf(e)===i&&t.set(e,t.get(e,i),a.s3.USER)}updateOrigin(e,t){const i=v(this),r=(0,a.M9)(t),s=this.get(e);for(let t=r+1;t<a.kk;++t)i.delete(e,t);i.set(e,s,r)}toJSON(e){return this.write({},e)}};return t=(0,r._)([(0,h.j)("esri.core.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,u.vw)(e).store}const m=e=>{let t=class extends(g(y(e))){constructor(...e){super(...e)}};return t=(0,r._)([(0,h.j)("esri.core.MultiOriginJSONSupport")],t),t};let _=class extends(m(s.Z)){};_=(0,r._)([(0,h.j)("esri.core.MultiOriginJSONSupport")],_)},70921:(e,t,i)=>{i.d(t,{R:()=>o,Z:()=>s});var r=i(80539);function s(e,t,i=r.Z){return t||(t=new i),t===e||(t.removeAll(),(s=e)&&(Array.isArray(s)||"items"in s&&Array.isArray(s.items))?t.addMany(e):e&&t.add(e)),t;var s}function o(e){return e}},68668:(e,t,i)=>{i.d(t,{G:()=>l,w:()=>a});var r=i(66643),s=i(80539),o=i(83379),n=i(70586);async function l(e,t){return await e.load(),a(e,t)}async function a(e,t){const i=[],l=(...e)=>{for(const t of e)(0,n.Wi)(t)||(Array.isArray(t)?l(...t):s.Z.isCollection(t)?t.forEach((e=>l(e))):o.Z.isLoadable(t)&&i.push(t))};t(l);let a=null;if(await(0,r.UI)(i,(async e=>{!1!==(await(0,r.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load())).ok||a||(a=e)})),a)throw a.loadError;return e}},89348:(e,t,i)=>{i.r(t),i.d(t,{default:()=>x});var r=i(43697),s=i(57435),o=i(68668),n=i(70586),l=i(16453),a=i(17445),d=i(5600),p=(i(67676),i(80442),i(1153)),u=(i(75215),i(52011)),h=i(30556),y=i(87085),c=i(71612),f=i(38009),b=i(16859),g=i(72965),v=i(80539),m=i(70921),_=i(92604),w=i(95330);function C(e,t,i){let r,s;if(e)for(let o=0,n=e.length;o<n;o++){if(r=e.getItemAt(o),r[t]===i)return r;if("group"===r?.type&&(s=C(r.layers,t,i),s))return s}}const I=_.Z.getLogger("esri.support.LayersMixin"),S=e=>{let t=class extends e{constructor(...e){super(...e),this.layers=new v.Z;const t=e=>{e.parent=this,this.layerAdded(e),"elevation"!==e.type&&"base-elevation"!==e.type||I.error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`)},i=e=>{e.parent=null,this.layerRemoved(e)};this.layers.on("before-add",(e=>(e=>{e.parent&&"remove"in e.parent&&e.parent.remove(e)})(e.item))),this.layers.on("after-add",(e=>t(e.item))),this.layers.on("after-remove",(e=>i(e.item)))}destroy(){const e=this.layers.removeAll();for(const t of e)this.layerRemoved(t),t.destroy();this.layers.destroy()}set layers(e){this._set("layers",(0,m.Z)(e,this._get("layers")))}add(e,t){const i=this.layers;if(t=i.getNextIndex(t),e instanceof y.Z){const r=e;r.parent===this?this.reorder(r,t):i.add(r,t)}else(0,w.y8)(e)?e.then((e=>{this.destroyed||this.add(e,t)})):I.error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(e,t){const i=this.layers;t=i.getNextIndex(t),e.slice().forEach((e=>{e.parent!==this?(i.add(e,t),t+=1):this.reorder(e,t)}))}findLayerById(e){return C(this.layers,"id",e)}findLayerByUid(e){return C(this.layers,"uid",e)}remove(e){return this.layers.remove(e)}removeMany(e){return this.layers.removeMany(e)}removeAll(){return this.layers.removeAll()}reorder(e,t){return this.layers.reorder(e,t)}layerAdded(e){}layerRemoved(e){}};return(0,r._)([(0,d.Cb)()],t.prototype,"layers",null),t=(0,r._)([(0,u.j)("esri.support.LayersMixin")],t),t},O="esri.support.TablesMixin",M=_.Z.getLogger(O);function L(e,t,i){if(e)for(let r=0,s=e.length;r<s;r++){const s=e.getItemAt(r);if(s[t]===i)return s;if("group"===s?.type){const e=L(s.tables,t,i);if(e)return e}}}const E=e=>{let t=class extends e{constructor(...e){super(...e),this.tables=new v.Z,this.tables.on("after-add",(e=>{const t=e.item;t.parent&&t.parent!==this&&"tables"in t.parent&&t.parent.tables.remove(t),t.parent=this,"feature"!==t.type&&M.error(`Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`)})),this.tables.on("after-remove",(e=>{e.item.parent=null}))}destroy(){const e=this.tables.removeAll();for(const t of e)t.destroy();this.tables.destroy()}set tables(e){this._set("tables",(0,m.Z)(e,this._get("tables")))}findTableById(e){return L(this.tables,"id",e)}findTableByUid(e){return L(this.tables,"uid",e)}};return(0,r._)([(0,d.Cb)()],t.prototype,"tables",null),t=(0,r._)([(0,u.j)(O)],t),t};var A=i(15650);let Z=class extends((0,c.h)((0,g.M)((0,f.q)((0,b.I)(E(S((0,l.R)(y.Z)))))))){constructor(e){var t;super(e),this._visibilityHandles={},this.allLayers=new s.Z({getCollections:()=>[this.layers],getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=(t=this,new s.Z({getCollections:()=>[t.tables,t.layers],getChildrenFunction:e=>{const t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:e=>{const t=e.parent;return t&&"tables"in t&&t.tables.includes(e)}})),this.fullExtent=void 0,this.operationalLayerType="GroupLayer",this.spatialReference=void 0,this.type="group"}initialize(){this._enforceVisibility(this.visibilityMode,this.visible),this.own((0,a.YP)((()=>this.visible),this._onVisibilityChange.bind(this),a.Z_))}_writeLayers(e,t,i,r){const s=[];if(!e)return s;e.forEach((e=>{const t=(0,A.Nw)(e,r.webmap?r.webmap.getLayerJSONFromResourceInfo(e):null,r);(0,n.pC)(t)&&t.layerType&&s.push(t)})),t.layers=s}set portalItem(e){this._set("portalItem",e)}set visibilityMode(e){const t=this._get("visibilityMode")!==e;this._set("visibilityMode",e),t&&this._enforceVisibility(e,this.visible)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e)),Promise.resolve(this)}loadAll(){return(0,o.G)(this,(e=>{e(this.layers,this.tables)}))}layerAdded(e){e.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(e):"inherited"===this.visibilityMode&&(e.visible=this.visible),this._visibilityHandles[e.uid]=(0,a.YP)((()=>e.visible),(t=>this._onChildVisibilityChange(e,t)),a.Z_)}layerRemoved(e){const t=this._visibilityHandles[e.uid];t&&(t.remove(),delete this._visibilityHandles[e.uid]),this._enforceVisibility(this.visibilityMode,this.visible)}_turnOffOtherLayers(e){this.layers.forEach((t=>{t!==e&&(t.visible=!1)}))}_enforceVisibility(e,t){if(!(0,p.vw)(this).initialized)return;const i=this.layers;let r=i.find((e=>e.visible));switch(e){case"exclusive":i.length&&!r&&(r=i.getItemAt(0),r.visible=!0),this._turnOffOtherLayers(r);break;case"inherited":i.forEach((e=>{e.visible=t}))}}_onVisibilityChange(e){"inherited"===this.visibilityMode&&this.layers.forEach((t=>{t.visible=e}))}_onChildVisibilityChange(e,t){switch(this.visibilityMode){case"exclusive":t?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case"inherited":e.visible=this.visible}}_isAnyLayerVisible(){return this.layers.some((e=>e.visible))}};(0,r._)([(0,d.Cb)({readOnly:!0,dependsOn:[]})],Z.prototype,"allLayers",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],Z.prototype,"allTables",void 0),(0,r._)([(0,d.Cb)()],Z.prototype,"fullExtent",void 0),(0,r._)([(0,d.Cb)({json:{read:!1,write:{ignoreOrigin:!0}}})],Z.prototype,"layers",void 0),(0,r._)([(0,h.c)("layers")],Z.prototype,"_writeLayers",null),(0,r._)([(0,d.Cb)({type:["GroupLayer"]})],Z.prototype,"operationalLayerType",void 0),(0,r._)([(0,d.Cb)({json:{origins:{"web-document":{read:!1,write:!1}}}})],Z.prototype,"portalItem",null),(0,r._)([(0,d.Cb)()],Z.prototype,"spatialReference",void 0),(0,r._)([(0,d.Cb)({json:{read:!1},readOnly:!0,value:"group"})],Z.prototype,"type",void 0),(0,r._)([(0,d.Cb)({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{read:!1,write:!1}}}})],Z.prototype,"visibilityMode",null),Z=(0,r._)([(0,u.j)("esri.layers.GroupLayer")],Z);const x=Z},87085:(e,t,i)=>{i.d(t,{Z:()=>_});var r=i(43697),s=(i(66577),i(3172)),o=i(20102),n=i(32448),l=i(10699),a=i(83379),d=i(92604),p=i(95330),u=i(17452),h=i(5600),y=(i(67676),i(80442),i(75215),i(52011)),c=i(68773);const f=d.Z.getLogger("esri.layers.support.fromPortalItem");var b=i(6570),g=i(82971);let v=0,m=class extends(n.Z.EventedMixin((0,l.IG)(a.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new b.Z(-180,-90,180,90,g.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await i.e(3529).then(i.bind(i,63529))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},r=await Promise.all([i.e(4547),i.e(8008)]).then(i.bind(i,28008));try{return await r.fromItem(t)}catch(e){const i=t&&t.portalItem,r=i&&i.id||"unset",s=i&&i.portal&&i.portal.url||c.Z.portalUrl;throw f.error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,p.D_)(e)||d.Z.getLogger(this.declaredClass).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,t=this.parent;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"baseLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){const e=this.url;return e?(0,u.mN)(e):null}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,h.Cb)({type:String})],m.prototype,"attributionDataUrl",void 0),(0,r._)([(0,h.Cb)({type:b.Z})],m.prototype,"fullExtent",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],m.prototype,"hasAttributionData",null),(0,r._)([(0,h.Cb)({type:String,clonable:!1})],m.prototype,"id",void 0),(0,r._)([(0,h.Cb)({type:Boolean,nonNullable:!0})],m.prototype,"legendEnabled",void 0),(0,r._)([(0,h.Cb)({type:["show","hide","hide-children"]})],m.prototype,"listMode",void 0),(0,r._)([(0,h.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],m.prototype,"opacity",void 0),(0,r._)([(0,h.Cb)({clonable:!1})],m.prototype,"parent",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],m.prototype,"parsedUrl",null),(0,r._)([(0,h.Cb)({type:Boolean})],m.prototype,"popupEnabled",void 0),(0,r._)([(0,h.Cb)({type:Boolean})],m.prototype,"attributionVisible",void 0),(0,r._)([(0,h.Cb)({type:g.Z})],m.prototype,"spatialReference",void 0),(0,r._)([(0,h.Cb)({type:String})],m.prototype,"title",void 0),(0,r._)([(0,h.Cb)({readOnly:!0,json:{read:!1}})],m.prototype,"type",void 0),(0,r._)([(0,h.Cb)()],m.prototype,"url",void 0),(0,r._)([(0,h.Cb)({type:Boolean,nonNullable:!0})],m.prototype,"visible",void 0),m=(0,r._)([(0,y.j)("esri.layers.Layer")],m);const _=m},16859:(e,t,i)=>{i.d(t,{I:()=>_});var r=i(43697),s=i(40330),o=i(3172),n=i(66643),l=i(20102),a=i(92604),d=i(70586),p=i(95330),u=i(17452),h=i(5600),y=(i(67676),i(80442),i(75215),i(71715)),c=i(52011),f=i(30556),b=i(65587),g=i(15235),v=i(86082);const m=a.Z.getLogger("esri.layers.mixins.PortalLayer"),_=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem?.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const r=await i.e(8062).then(i.bind(i,18062));return(0,p.k_)(t),await r.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,p.D_)(e)||m.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=w.credential===t?w.user:await this._fetchEditingUser(e);return w.credential=t,w.user=i,(0,d.Wi)(i)||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id.findServerInfo(this.url);if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,l=b.Z.getDefault();if(l&&l.loaded&&(0,u.Fv)(l.restUrl)===(0,u.Fv)(r))return l.user;const a=`${r}/community/self`,p=(0,d.pC)(e)?e.signal:null,h=await(0,n.q6)((0,o.default)(a,{authMode:"no-prompt",query:{f:"json"},signal:p}));return h.ok?v.default.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||b.Z.getDefault());return i&&r&&!(0,u.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,h.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,h.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,r._)([(0,c.j)("esri.layers.mixins.PortalLayer")],t),t},w={credential:null,user:null}},84230:(e,t,i)=>{function r(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}i.d(t,{rQ:()=>r})},15650:(e,t,i)=>{i.d(t,{Nw:()=>h});var r=i(20102),s=i(22974),o=i(70586),n=i(78286),l=i(827),a=i(84230);const d=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),p=new Set(["csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","map-image","map-notes","ogc-feature","route","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function u(e,t){"maxScale"in e&&(t.maxScale=(0,l.k)(e.maxScale)),"minScale"in e&&(t.minScale=(0,l.k)(e.minScale))}function h(e,t,i){if(!("write"in e)||!e.write)return i&&i.messages&&i.messages.push(new r.Z("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if(function(e,t){if(t.restrictedWebMapWriting){const i=function(e){return"basemap"===e.layerContainerType?d:"operational-layers"===e.layerContainerType?p:null}(t);return!(0,o.pC)(i)||i.has(e.type)&&!(0,a.rQ)(e)}return!0}(e,i)){const t={};return e.write(t,i)?t:null}return(0,o.pC)(t)&&function(e,t){if(function(e,t){if((0,a.rQ)(e)){const i=(0,n.hS)("featureCollection.layers",t),r=i&&i[0]&&i[0].layerDefinition;r&&u(e,r)}else"stream"===e.type?u(e,t.layerDefinition=t.layerDefinition||{}):"group"!==e.type&&u(e,t)}(e,t),"blendMode"in e&&(t.blendMode=e.blendMode,"normal"===t.blendMode&&delete t.blendMode),t.opacity=(0,l.k)(e.opacity),t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type)if((0,a.rQ)(e)){const i=t.featureCollection;i&&(i.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}(e,t=(0,s.d9)(t)),t}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9348,5787],{57435:(e,t,i)=>{i.d(t,{Z:()=>u});var r=i(43697),s=i(80539),o=i(3920),n=i(70586),l=(i(80442),i(20102),i(92604),i(26258),i(87538)),a=i(5600),d=(i(67676),i(75215),i(52011));let p=class extends((0,o.p)(s.Z)){constructor(e){super(e),this.getCollections=null}initialize(){this.handles.add((0,l.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=(0,n.pC)(this.getCollections)?this.getCollections():null;if((0,n.Wi)(e))return void this.removeAll();let t=0;for(const i of e)(0,n.pC)(i)&&(t=this._processCollection(t,i));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const i=this.itemFilterFunction?this.itemFilterFunction:e=>!!e;for(const r of t)if(r){if(i(r)){const t=this.indexOf(r,e);t>=0?t!==e&&this.reorder(r,e):this.add(r,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(r);if(Array.isArray(t))for(const i of t)e=this._processCollection(e,i);else e=this._processCollection(e,t)}}return e}};(0,r._)([(0,a.Cb)()],p.prototype,"getCollections",void 0),(0,r._)([(0,a.Cb)()],p.prototype,"getChildrenFunction",void 0),(0,r._)([(0,a.Cb)()],p.prototype,"itemFilterFunction",void 0),p=(0,r._)([(0,d.j)("esri.core.CollectionFlattener")],p);const u=p},10699:(e,t,i)=>{i.d(t,{IG:()=>n});var r=i(43697),s=i(52011);let o=0;const n=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return t=(0,r._)([(0,s.j)("esri.core.Identifiable")],t),t};let l=class extends(n(class{})){};l=(0,r._)([(0,s.j)("esri.core.Identifiable")],l)},16453:(e,t,i)=>{i.d(t,{R:()=>m,w:()=>_});var r=i(43697),s=i(15923),o=i(70586),n=i(41103),l=i(22974),a=i(31263);class d{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.kk),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new d,i=this._originStores[a.s3.DEFAULTS];i&&i.forEach(((e,i)=>{t.set(i,(0,l.d9)(e),a.s3.DEFAULTS)}));for(let i=a.s3.SERVICE;i<a.kk;i++){const r=this._originStores[i];r&&r.forEach(((r,s)=>{e&&e.has(s)||t.set(s,(0,l.d9)(r),i)}))}return t}get(e,t){const i=void 0===t?this._values:this._originStores[t];return i?i.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,i=a.s3.USER){let r=this._originStores[i];if(r||(r=new Map,this._originStores[i]=r),r.set(e,t),!this._values.has(e)||(0,o.j0)(this._propertyOriginMap.get(e))<=i){const r=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,i),r!==t}return!1}delete(e,t=a.s3.USER){const i=this._originStores[t];if(!i)return;const r=i.get(e);if(i.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let i=t-1;i>=0;i--){const t=this._originStores[i];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,i);break}}}return r}has(e,t){const i=void 0===t?this._values:this._originStores[t];return!!i&&i.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const i=this._originStores[t],r=i&&i.get(e),s=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),s!==r}originOf(e){return this._propertyOriginMap.get(e)||a.s3.DEFAULTS}forEach(e){this._values.forEach(e)}}var p=i(50549),u=i(1153),h=i(52011);const y=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,o.j0)((0,u.vw)(this)),i=t.store,r=new d;t.store=r,(0,n.M)(t,i,r)}read(e,t){(0,p.i)(this,e,t)}getAtOrigin(e,t){const i=c(this),r=(0,a.M9)(t);if("string"==typeof e)return i.get(e,r);const s={};return e.forEach((e=>{s[e]=i.get(e,r)})),s}originOf(e){return(0,a.x3)(this.originIdOf(e))}originIdOf(e){return c(this).originOf(e)}revert(e,t){const i=c(this),r=(0,a.M9)(t),s=(0,u.vw)(this);let o;o="string"==typeof e?"*"===e?i.keys(r):[e]:e,o.forEach((e=>{s.invalidate(e),i.revert(e,r),s.commit(e)}))}};return t=(0,r._)([(0,h.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function c(e){return(0,u.vw)(e).store}let f=class extends(y(s.Z)){};f=(0,r._)([(0,h.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],f);var b=i(76169);const g=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,a.M9)(t))}write(e={},t){return(0,b.c)(this,e=e||{},t),e}setAtOrigin(e,t,i){(0,u.vw)(this).setAtOrigin(e,t,(0,a.M9)(i))}removeOrigin(e){const t=v(this),i=(0,a.M9)(e),r=t.keys(i);for(const e of r)t.originOf(e)===i&&t.set(e,t.get(e,i),a.s3.USER)}updateOrigin(e,t){const i=v(this),r=(0,a.M9)(t),s=this.get(e);for(let t=r+1;t<a.kk;++t)i.delete(e,t);i.set(e,s,r)}toJSON(e){return this.write({},e)}};return t=(0,r._)([(0,h.j)("esri.core.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,u.vw)(e).store}const m=e=>{let t=class extends(g(y(e))){constructor(...e){super(...e)}};return t=(0,r._)([(0,h.j)("esri.core.MultiOriginJSONSupport")],t),t};let _=class extends(m(s.Z)){};_=(0,r._)([(0,h.j)("esri.core.MultiOriginJSONSupport")],_)},70921:(e,t,i)=>{i.d(t,{R:()=>o,Z:()=>s});var r=i(80539);function s(e,t,i=r.Z){return t||(t=new i),t===e||(t.removeAll(),(s=e)&&(Array.isArray(s)||"items"in s&&Array.isArray(s.items))?t.addMany(e):e&&t.add(e)),t;var s}function o(e){return e}},68668:(e,t,i)=>{i.d(t,{G:()=>l,w:()=>a});var r=i(66643),s=i(80539),o=i(83379),n=i(70586);async function l(e,t){return await e.load(),a(e,t)}async function a(e,t){const i=[],l=(...e)=>{for(const t of e)(0,n.Wi)(t)||(Array.isArray(t)?l(...t):s.Z.isCollection(t)?t.forEach((e=>l(e))):o.Z.isLoadable(t)&&i.push(t))};t(l);let a=null;if(await(0,r.UI)(i,(async e=>{!1!==(await(0,r.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load())).ok||a||(a=e)})),a)throw a.loadError;return e}},89348:(e,t,i)=>{i.r(t),i.d(t,{default:()=>x});var r=i(43697),s=i(57435),o=i(68668),n=i(70586),l=i(16453),a=i(17445),d=i(5600),p=(i(67676),i(80442),i(1153)),u=(i(75215),i(52011)),h=i(30556),y=i(87085),c=i(71612),f=i(38009),b=i(16859),g=i(72965),v=i(80539),m=i(70921),_=i(92604),w=i(95330);function C(e,t,i){let r,s;if(e)for(let o=0,n=e.length;o<n;o++){if(r=e.getItemAt(o),r[t]===i)return r;if("group"===r?.type&&(s=C(r.layers,t,i),s))return s}}const I=_.Z.getLogger("esri.support.LayersMixin"),S=e=>{let t=class extends e{constructor(...e){super(...e),this.layers=new v.Z;const t=e=>{e.parent=this,this.layerAdded(e),"elevation"!==e.type&&"base-elevation"!==e.type||I.error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`)},i=e=>{e.parent=null,this.layerRemoved(e)};this.layers.on("before-add",(e=>(e=>{e.parent&&"remove"in e.parent&&e.parent.remove(e)})(e.item))),this.layers.on("after-add",(e=>t(e.item))),this.layers.on("after-remove",(e=>i(e.item)))}destroy(){const e=this.layers.removeAll();for(const t of e)this.layerRemoved(t),t.destroy();this.layers.destroy()}set layers(e){this._set("layers",(0,m.Z)(e,this._get("layers")))}add(e,t){const i=this.layers;if(t=i.getNextIndex(t),e instanceof y.Z){const r=e;r.parent===this?this.reorder(r,t):i.add(r,t)}else(0,w.y8)(e)?e.then((e=>{this.destroyed||this.add(e,t)})):I.error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(e,t){const i=this.layers;t=i.getNextIndex(t),e.slice().forEach((e=>{e.parent!==this?(i.add(e,t),t+=1):this.reorder(e,t)}))}findLayerById(e){return C(this.layers,"id",e)}findLayerByUid(e){return C(this.layers,"uid",e)}remove(e){return this.layers.remove(e)}removeMany(e){return this.layers.removeMany(e)}removeAll(){return this.layers.removeAll()}reorder(e,t){return this.layers.reorder(e,t)}layerAdded(e){}layerRemoved(e){}};return(0,r._)([(0,d.Cb)()],t.prototype,"layers",null),t=(0,r._)([(0,u.j)("esri.support.LayersMixin")],t),t},O="esri.support.TablesMixin",M=_.Z.getLogger(O);function L(e,t,i){if(e)for(let r=0,s=e.length;r<s;r++){const s=e.getItemAt(r);if(s[t]===i)return s;if("group"===s?.type){const e=L(s.tables,t,i);if(e)return e}}}const E=e=>{let t=class extends e{constructor(...e){super(...e),this.tables=new v.Z,this.tables.on("after-add",(e=>{const t=e.item;t.parent&&t.parent!==this&&"tables"in t.parent&&t.parent.tables.remove(t),t.parent=this,"feature"!==t.type&&M.error(`Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`)})),this.tables.on("after-remove",(e=>{e.item.parent=null}))}destroy(){const e=this.tables.removeAll();for(const t of e)t.destroy();this.tables.destroy()}set tables(e){this._set("tables",(0,m.Z)(e,this._get("tables")))}findTableById(e){return L(this.tables,"id",e)}findTableByUid(e){return L(this.tables,"uid",e)}};return(0,r._)([(0,d.Cb)()],t.prototype,"tables",null),t=(0,r._)([(0,u.j)(O)],t),t};var A=i(15650);let Z=class extends((0,c.h)((0,g.M)((0,f.q)((0,b.I)(E(S((0,l.R)(y.Z)))))))){constructor(e){var t;super(e),this._visibilityHandles={},this.allLayers=new s.Z({getCollections:()=>[this.layers],getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=(t=this,new s.Z({getCollections:()=>[t.tables,t.layers],getChildrenFunction:e=>{const t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:e=>{const t=e.parent;return t&&"tables"in t&&t.tables.includes(e)}})),this.fullExtent=void 0,this.operationalLayerType="GroupLayer",this.spatialReference=void 0,this.type="group"}initialize(){this._enforceVisibility(this.visibilityMode,this.visible),this.own((0,a.YP)((()=>this.visible),this._onVisibilityChange.bind(this),a.Z_))}_writeLayers(e,t,i,r){const s=[];if(!e)return s;e.forEach((e=>{const t=(0,A.Nw)(e,r.webmap?r.webmap.getLayerJSONFromResourceInfo(e):null,r);(0,n.pC)(t)&&t.layerType&&s.push(t)})),t.layers=s}set portalItem(e){this._set("portalItem",e)}set visibilityMode(e){const t=this._get("visibilityMode")!==e;this._set("visibilityMode",e),t&&this._enforceVisibility(e,this.visible)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e)),Promise.resolve(this)}loadAll(){return(0,o.G)(this,(e=>{e(this.layers,this.tables)}))}layerAdded(e){e.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(e):"inherited"===this.visibilityMode&&(e.visible=this.visible),this._visibilityHandles[e.uid]=(0,a.YP)((()=>e.visible),(t=>this._onChildVisibilityChange(e,t)),a.Z_)}layerRemoved(e){const t=this._visibilityHandles[e.uid];t&&(t.remove(),delete this._visibilityHandles[e.uid]),this._enforceVisibility(this.visibilityMode,this.visible)}_turnOffOtherLayers(e){this.layers.forEach((t=>{t!==e&&(t.visible=!1)}))}_enforceVisibility(e,t){if(!(0,p.vw)(this).initialized)return;const i=this.layers;let r=i.find((e=>e.visible));switch(e){case"exclusive":i.length&&!r&&(r=i.getItemAt(0),r.visible=!0),this._turnOffOtherLayers(r);break;case"inherited":i.forEach((e=>{e.visible=t}))}}_onVisibilityChange(e){"inherited"===this.visibilityMode&&this.layers.forEach((t=>{t.visible=e}))}_onChildVisibilityChange(e,t){switch(this.visibilityMode){case"exclusive":t?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case"inherited":e.visible=this.visible}}_isAnyLayerVisible(){return this.layers.some((e=>e.visible))}};(0,r._)([(0,d.Cb)({readOnly:!0,dependsOn:[]})],Z.prototype,"allLayers",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],Z.prototype,"allTables",void 0),(0,r._)([(0,d.Cb)()],Z.prototype,"fullExtent",void 0),(0,r._)([(0,d.Cb)({json:{read:!1,write:{ignoreOrigin:!0}}})],Z.prototype,"layers",void 0),(0,r._)([(0,h.c)("layers")],Z.prototype,"_writeLayers",null),(0,r._)([(0,d.Cb)({type:["GroupLayer"]})],Z.prototype,"operationalLayerType",void 0),(0,r._)([(0,d.Cb)({json:{origins:{"web-document":{read:!1,write:!1}}}})],Z.prototype,"portalItem",null),(0,r._)([(0,d.Cb)()],Z.prototype,"spatialReference",void 0),(0,r._)([(0,d.Cb)({json:{read:!1},readOnly:!0,value:"group"})],Z.prototype,"type",void 0),(0,r._)([(0,d.Cb)({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{read:!1,write:!1}}}})],Z.prototype,"visibilityMode",null),Z=(0,r._)([(0,u.j)("esri.layers.GroupLayer")],Z);const x=Z},87085:(e,t,i)=>{i.d(t,{Z:()=>_});var r=i(43697),s=(i(66577),i(3172)),o=i(20102),n=i(32448),l=i(10699),a=i(83379),d=i(92604),p=i(95330),u=i(17452),h=i(5600),y=(i(67676),i(80442),i(75215),i(52011)),c=i(68773);const f=d.Z.getLogger("esri.layers.support.fromPortalItem");var b=i(6570),g=i(82971);let v=0,m=class extends(n.Z.EventedMixin((0,l.IG)(a.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new b.Z(-180,-90,180,90,g.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await i.e(3529).then(i.bind(i,63529))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},r=await Promise.all([i.e(4547),i.e(8008)]).then(i.bind(i,28008));try{return await r.fromItem(t)}catch(e){const i=t&&t.portalItem,r=i&&i.id||"unset",s=i&&i.portal&&i.portal.url||c.Z.portalUrl;throw f.error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,p.D_)(e)||d.Z.getLogger(this.declaredClass).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,t=this.parent;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"baseLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){const e=this.url;return e?(0,u.mN)(e):null}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,h.Cb)({type:String})],m.prototype,"attributionDataUrl",void 0),(0,r._)([(0,h.Cb)({type:b.Z})],m.prototype,"fullExtent",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],m.prototype,"hasAttributionData",null),(0,r._)([(0,h.Cb)({type:String,clonable:!1})],m.prototype,"id",void 0),(0,r._)([(0,h.Cb)({type:Boolean,nonNullable:!0})],m.prototype,"legendEnabled",void 0),(0,r._)([(0,h.Cb)({type:["show","hide","hide-children"]})],m.prototype,"listMode",void 0),(0,r._)([(0,h.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],m.prototype,"opacity",void 0),(0,r._)([(0,h.Cb)({clonable:!1})],m.prototype,"parent",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],m.prototype,"parsedUrl",null),(0,r._)([(0,h.Cb)({type:Boolean})],m.prototype,"popupEnabled",void 0),(0,r._)([(0,h.Cb)({type:Boolean})],m.prototype,"attributionVisible",void 0),(0,r._)([(0,h.Cb)({type:g.Z})],m.prototype,"spatialReference",void 0),(0,r._)([(0,h.Cb)({type:String})],m.prototype,"title",void 0),(0,r._)([(0,h.Cb)({readOnly:!0,json:{read:!1}})],m.prototype,"type",void 0),(0,r._)([(0,h.Cb)()],m.prototype,"url",void 0),(0,r._)([(0,h.Cb)({type:Boolean,nonNullable:!0})],m.prototype,"visible",void 0),m=(0,r._)([(0,y.j)("esri.layers.Layer")],m);const _=m},16859:(e,t,i)=>{i.d(t,{I:()=>_});var r=i(43697),s=i(40330),o=i(3172),n=i(66643),l=i(20102),a=i(92604),d=i(70586),p=i(95330),u=i(17452),h=i(5600),y=(i(67676),i(80442),i(75215),i(71715)),c=i(52011),f=i(30556),b=i(65587),g=i(15235),v=i(86082);const m=a.Z.getLogger("esri.layers.mixins.PortalLayer"),_=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem?.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const r=await i.e(8062).then(i.bind(i,18062));return(0,p.k_)(t),await r.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,p.D_)(e)||m.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=w.credential===t?w.user:await this._fetchEditingUser(e);return w.credential=t,w.user=i,(0,d.Wi)(i)||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id.findServerInfo(this.url);if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,l=b.Z.getDefault();if(l&&l.loaded&&(0,u.Fv)(l.restUrl)===(0,u.Fv)(r))return l.user;const a=`${r}/community/self`,p=(0,d.pC)(e)?e.signal:null,h=await(0,n.q6)((0,o.default)(a,{authMode:"no-prompt",query:{f:"json"},signal:p}));return h.ok?v.default.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||b.Z.getDefault());return i&&r&&!(0,u.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,h.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,h.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,r._)([(0,c.j)("esri.layers.mixins.PortalLayer")],t),t},w={credential:null,user:null}},84230:(e,t,i)=>{function r(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}i.d(t,{rQ:()=>r})},15650:(e,t,i)=>{i.d(t,{Nw:()=>h});var r=i(20102),s=i(22974),o=i(70586),n=i(78286),l=i(827),a=i(84230);const d=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),p=new Set(["csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","map-image","map-notes","ogc-feature","route","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function u(e,t){"maxScale"in e&&(t.maxScale=(0,l.k)(e.maxScale)),"minScale"in e&&(t.minScale=(0,l.k)(e.minScale))}function h(e,t,i){if(!("write"in e)||!e.write)return i&&i.messages&&i.messages.push(new r.Z("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if(function(e,t){if(t.restrictedWebMapWriting){const i=function(e){return"basemap"===e.layerContainerType?d:"operational-layers"===e.layerContainerType?p:null}(t);return!(0,o.pC)(i)||i.has(e.type)&&!(0,a.rQ)(e)}return!0}(e,i)){const t={};return e.write(t,i)?t:null}return(0,o.pC)(t)&&function(e,t){if(function(e,t){if((0,a.rQ)(e)){const i=(0,n.hS)("featureCollection.layers",t),r=i&&i[0]&&i[0].layerDefinition;r&&u(e,r)}else"stream"===e.type?u(e,t.layerDefinition=t.layerDefinition||{}):"group"!==e.type&&u(e,t)}(e,t),"blendMode"in e&&(t.blendMode=e.blendMode,"normal"===t.blendMode&&delete t.blendMode),t.opacity=(0,l.k)(e.opacity),t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type)if((0,a.rQ)(e)){const i=t.featureCollection;i&&(i.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}(e,t=(0,s.d9)(t)),t}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2855,4889],{88068:(e,t,r)=>{r.r(t),r.d(t,{default:()=>L});var i=r(43697),n=(r(66577),r(51773)),o=(r(16050),r(12501),r(28756),r(92271),r(18746),r(5499),r(84382),r(30687),r(91423),r(32400)),s=r(16453),a=r(5600),l=(r(67676),r(80442),r(75215),r(52011)),p=r(86973),u=r(87085),c=r(20102),d=r(83379),y=r(70586),f=r(16467),m=r(74889),h=r(82971);let g=class extends d.Z{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getFeatureDefinition(){const{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:i},layer:{apiKey:n,capabilities:o,customParameters:s}}=this;return{capabilities:o,collection:e,layerDefinition:t,queryParameters:{apiKey:n,customParameters:s},spatialReference:r,supportedCrs:i}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then((e=>m.default.fromJSON(e)))}queryFeaturesJSON(e,t={}){const r=this.getFeatureDefinition();return this.load(t).then((()=>(0,f.yN)(r,e,t)))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){return!(!e.isWGS84&&!e.isWebMercator&&!this.featureDefinition.supportedCrs[e.wkid])}_conformsToType(e,t){const r=new RegExp(`^${t}$`,"i");return e.conformsTo.some((e=>r.test(e)))??!1}_getCapabilities(e,t){const r=(0,y.pC)(t)?t.components?.parameters:null;return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1},query:{maxRecordCount:r?.limit?.schema?.maximum??r?.limitFeatures?.schema?.maximum??5e3,maxRecordCountFactor:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1}}}_getExtent(e){const t=e.extent?.spatial;if(!t)return null;const r=t.bbox[0],i=4===r.length,n=r[0],o=r[1],s=i?void 0:r[2];return{xmin:n,ymin:o,xmax:i?r[2]:r[3],ymax:i?r[3]:r[4],zmin:s,zmax:i?void 0:r[5],spatialReference:h.Z.WGS84.toJSON()}}_getStorageSpatialReference(e){const t=e.storageCrs??f.$9,r=(0,f.d)(t);return(0,y.Wi)(r)?h.Z.WGS84:new h.Z({wkid:r})}_getSupportedSpatialReferences(e,t){const r="#/crs",i=e.crs??[f.$9],n=i.includes(r)?i.filter((e=>e!==r)).concat(t.crs):i,o=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return n.filter((e=>!o.test(e)))}async _loadOGCServices(e,t){const r=(0,y.pC)(t)?t.signal:null,{apiKey:i,collectionId:n,customParameters:o,fields:s,geometryType:a,hasZ:l,objectIdField:u,timeInfo:d,url:m}=e,h={fields:s?.map((e=>e.toJSON())),geometryType:p.P$.toJSON(a),hasZ:l,objectIdField:u,timeInfo:d?.toJSON()},g={apiKey:i,customParameters:o,signal:r},w=await(0,f.gp)(m,g),[b,v]=await Promise.all([(0,f.G4)(w,g),(0,f.j)(w,g)]);if(!this._conformsToType(b,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new c.Z("ogc-feature-layer:no-geojson-support","Server does not support geojson");const S=v.collections.find((e=>e.id===n));if(!S)throw new c.Z("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const C=this._conformsToType(b,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,f.eS)(w,g):null,I=await(0,f.w9)(S,h,g),F=this._getCapabilities(I.hasZ,C),_=this._getExtent(S),x=this._getStorageSpatialReference(S).toJSON(),T=this._getSupportedSpatialReferences(S,v),j=new RegExp(`^${f.Lu}`,"i"),P={};for(const e of T){const t=(0,f.d)(e);(0,y.pC)(t)&&(P[t]||(P[t]=e.replace(j,"")))}I.extent=_,this.featureDefinition={capabilities:F,collection:S,layerDefinition:I,queryParameters:{},spatialReference:x,supportedCrs:P}}};(0,i._)([(0,a.Cb)()],g.prototype,"featureDefinition",void 0),(0,i._)([(0,a.Cb)({constructOnly:!0})],g.prototype,"layer",void 0),(0,i._)([(0,a.Cb)()],g.prototype,"type",void 0),g=(0,i._)([(0,l.j)("esri.layers.graphics.sources.OGCFeatureSource")],g);var w=r(54295),b=r(71612),v=r(17017),S=r(69637),C=r(38009),I=r(68825),F=r(16859),_=r(34760),x=r(72965),T=r(28294),j=r(21506),P=r(2075),R=r(16451),O=r(1231),Z=r(53518),G=r(35671),D=r(2319),k=r(30707),q=r(57444),M=r(32163),N=r(6570);const E=(0,Z.v)();let $=class extends((0,w.V)((0,v.N)((0,S.b)((0,b.h)((0,I.c)((0,T.n)((0,x.M)((0,C.q)((0,F.I)((0,_.Q)((0,s.R)(u.Z)))))))))))){constructor(e){super(e),this.collectionId=null,this.copyright=null,this.definitionExpression=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.featureReduction=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new g({layer:this}),this.spatialReference=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then((()=>this._fetchService(e)))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,G.YN)(e,this.fieldsIndex),this._set("renderer",e)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,M.eZ)(this,e)}createQuery(){return new q.Z}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,i=!1;const n=t?.feature?.attributes,o=this.typeIdField&&n?.[this.typeIdField];return null!=o&&this.types&&(i=this.types.some((t=>t.id==o&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0)))),i||r||(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(q.Z.from(e)||this.createQuery(),t))).then((e=>(e?.features?.forEach((e=>{e.layer=e.sourceLayer=this})),e)))}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,G.YN)(this.renderer,this.fieldsIndex),(0,G.UF)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(const t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,i._)([(0,a.Cb)({readOnly:!0,json:{origins:{service:{read:!0}}}})],$.prototype,"capabilities",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],$.prototype,"collectionId",void 0),(0,i._)([(0,a.Cb)({type:String})],$.prototype,"copyright",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],$.prototype,"defaultPopupTemplate",null),(0,i._)([(0,a.Cb)({type:String})],$.prototype,"definitionExpression",void 0),(0,i._)([(0,a.Cb)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],$.prototype,"description",void 0),(0,i._)([(0,a.Cb)({type:String})],$.prototype,"displayField",void 0),(0,i._)([(0,a.Cb)(j.PV)],$.prototype,"elevationInfo",void 0),(0,i._)([(0,a.Cb)(P.d)],$.prototype,"featureReduction",void 0),(0,i._)([(0,a.Cb)({type:[O.Z],json:{origins:{service:{name:"layerDefinition.fields"}}}})],$.prototype,"fields",void 0),(0,i._)([(0,a.Cb)(E.fieldsIndex)],$.prototype,"fieldsIndex",void 0),(0,i._)([(0,a.Cb)({readOnly:!0,type:N.Z,json:{origins:{service:{name:"layerDefinition.extent"}}}})],$.prototype,"fullExtent",void 0),(0,i._)([(0,a.Cb)({type:p.Mk.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:p.Mk.read}}}}})],$.prototype,"geometryType",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],$.prototype,"hasZ",void 0),(0,i._)([(0,a.Cb)({type:Boolean,readOnly:!0})],$.prototype,"isTable",null),(0,i._)([(0,a.Cb)({type:[D.Z],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:k.r},write:!0}}}})],$.prototype,"labelingInfo",void 0),(0,i._)([(0,a.Cb)(j.iR)],$.prototype,"labelsVisible",void 0),(0,i._)([(0,a.Cb)(j.rn)],$.prototype,"legendEnabled",void 0),(0,i._)([(0,a.Cb)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],$.prototype,"objectIdField",void 0),(0,i._)([(0,a.Cb)({type:["OGCFeatureLayer"]})],$.prototype,"operationalLayerType",void 0),(0,i._)([(0,a.Cb)(j.C_)],$.prototype,"popupEnabled",void 0),(0,i._)([(0,a.Cb)({type:n.Z,json:{name:"popupInfo",write:!0}})],$.prototype,"popupTemplate",void 0),(0,i._)([(0,a.Cb)({types:o.A,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:o.o,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],$.prototype,"renderer",null),(0,i._)([(0,a.Cb)(j.YI)],$.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],$.prototype,"source",void 0),(0,i._)([(0,a.Cb)({readOnly:!0,type:h.Z,json:{origins:{service:{read:!0}}}})],$.prototype,"spatialReference",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],$.prototype,"title",void 0),(0,i._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],$.prototype,"type",void 0),(0,i._)([(0,a.Cb)({type:String,readOnly:!0})],$.prototype,"typeIdField",void 0),(0,i._)([(0,a.Cb)({type:[R.Z]})],$.prototype,"types",void 0),(0,i._)([(0,a.Cb)(j.HQ)],$.prototype,"url",void 0),$=(0,i._)([(0,l.j)("esri.layers.OGCFeatureLayer")],$);const L=$},61159:(e,t,r)=>{r.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},92722:(e,t,r)=>{r.d(t,{O3:()=>S,lG:()=>I,my:()=>C,q9:()=>l});var i=r(20102),n=r(70272),o=r(5428),s=r(35671);const a={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function l(e){return a[e]}function*p(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*u(e){if(!e)return null;switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function c(e){for(const t of e)if(t.length>2)return!0;return!1}function d(e){let t=0;for(let r=0;r<e.length;r++){const i=e[r],n=e[(r+1)%e.length];t+=i[0]*n[1]-n[0]*i[1]}return t<=0}function y(e){const t=e[0],r=e[e.length-1];return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]||e.push(t),e}function f(e,t,r){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,r){return g(e,t.coordinates,r),e}(e,t,r);case"MultiLineString":return function(e,t,r){for(const i of t.coordinates)g(e,i,r);return e}(e,t,r);case"MultiPolygon":return function(e,t,r){for(const i of t.coordinates){m(e,i[0],r);for(let t=1;t<i.length;t++)h(e,i[t],r)}return e}(e,t,r);case"Point":return function(e,t,r){return b(e,t.coordinates,r),e}(e,t,r);case"Polygon":return function(e,t,r){const i=t.coordinates;m(e,i[0],r);for(let t=1;t<i.length;t++)h(e,i[t],r);return e}(e,t,r)}}function m(e,t,r){const i=y(t);!function(e){return!d(e)}(i)?g(e,i,r):w(e,i,r)}function h(e,t,r){const i=y(t);!function(e){return d(e)}(i)?g(e,i,r):w(e,i,r)}function g(e,t,r){for(const i of t)b(e,i,r);e.lengths.push(t.length)}function w(e,t,r){for(let i=t.length-1;i>=0;i--)b(e,t[i],r);e.lengths.push(t.length)}function b(e,t,r){const[i,n,o]=t;e.coords.push(i,n),r.hasZ&&e.coords.push(o||0)}function v(e){switch(typeof e){case"string":return"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function S(e){if(!e)throw new i.Z("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new i.Z("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:t}=e;if(!t)return;const r="string"==typeof t?t:"name"===t.type?t.properties.name:"EPSG"===t.type?t.properties.code:null,n=new RegExp(".*(CRS84H?|4326)$","i");if(!r||!n.test(r))throw new i.Z("geojson-layer:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:t})}function C(e,t={}){const r=[],i=new Set,n=new Set;let o,a=!1,d=null,y=!1,{geometryType:f=null}=t,m=!1;for(const t of p(e)){const{geometry:e,properties:s,id:p}=t;if((!e||(f||(f=l(e.type)),l(e.type)===f))&&(a||(a=c(u(e))),y||(y=null!=p,y&&(o=typeof p,d=Object.keys(s).filter((e=>s[e]===p)))),y&&null!=p&&(d.length>1?d=d.filter((e=>s[e]===p)):1===d.length&&(d=s[d[0]]===p?d:[])),!m&&s)){let e=!0;for(const t in s){if(i.has(t))continue;const o=s[t];if(null==o){e=!1,n.add(t);continue}const a=v(o);"unknown"!==a?(n.delete(t),i.add(t),r.push({name:t,alias:t,type:a})):n.add(t)}m=e}}const h=d&&1===d.length&&d[0]||null;if(h)for(const e of r)if(e.name===h&&(0,s.H7)(e)){e.type="esriFieldTypeOID";break}return{fields:r,geometryType:f,hasZ:a,objectIdFieldName:h,objectIdFieldType:o,unknownFields:Array.from(n)}}function I(e,t){return Array.from(function*(e,t={}){const{geometryType:r,objectIdField:i}=t;for(const s of e){const{geometry:e,properties:a,id:p}=s;if(e&&l(e.type)!==r)continue;const u=a||{};let c=u[i]??null;i&&null!=p&&!u[i]&&(u[i]=c=p);const d=new n.u_(e?f(new o.Z,e,t):null,u,null,c);yield d}}(p(e),t))}},25278:(e,t,r)=>{r.d(t,{Dm:()=>u,Hq:()=>c,MS:()=>d,bU:()=>a});var i=r(80442),n=r(22974),o=r(61159),s=r(58333);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.I4:"esriGeometryPolyline"===e?s.ET:s.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function u(e,t){if((0,i.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch(r){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.d9)(e)}}]}function d(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:o.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1}}}},54295:(e,t,r)=>{r.d(t,{V:()=>s});var i=r(43697),n=r(5600),o=(r(67676),r(80442),r(75215),r(52011));const s=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,n.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.APIKeyMixin")],t),t}},68825:(e,t,r)=>{r.d(t,{c:()=>m});var i,n=r(43697),o=r(78286),s=r(5600),a=(r(67676),r(80442),r(75215),r(52011)),l=r(35454),p=r(96674);const u=new l.X({asc:"ascending",desc:"descending"});let c=i=class extends p.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n._)([(0,s.Cb)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,n._)([(0,s.Cb)({type:String,json:{write:!0}})],c.prototype,"valueExpression",void 0),(0,n._)([(0,s.Cb)({type:u.apiValues,json:{read:u.read,write:u.write}})],c.prototype,"order",void 0),c=i=(0,n._)([(0,a.j)("esri.layers.support.OrderByInfo")],c);const d=c;function y(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const n=new d;return n.read(i,r),[n]}function f(e,t,r,i){const n=e.find((e=>!!e.field));n&&(0,o.RB)(r,[n.toJSON()],t)}const m=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,n._)([(0,s.Cb)({type:[d],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:y},write:{target:"layerDefinition.orderBy",writer:f}}})],t.prototype,"orderBy",void 0),t=(0,n._)([(0,a.j)("esri.layers.mixins.OrderedLayer")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>v});var i=r(43697),n=r(40330),o=r(3172),s=r(66643),a=r(20102),l=r(92604),p=r(70586),u=r(95330),c=r(17452),d=r(5600),y=(r(67676),r(80442),r(75215),r(71715)),f=r(52011),m=r(30556),h=r(65587),g=r(15235),w=r(86082);const b=l.Z.getLogger("esri.layers.mixins.PortalLayer"),v=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem?.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new g.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const i=await r.e(8062).then(r.bind(r,18062));return(0,u.k_)(t),await i.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,u.D_)(e)||b.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,u.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=r,(0,p.Wi)(r)||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id.findServerInfo(this.url);if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,a=h.Z.getDefault();if(a&&a.loaded&&(0,c.Fv)(a.restUrl)===(0,c.Fv)(i))return a.user;const l=`${i}/community/self`,u=(0,p.pC)(e)?e.signal:null,d=await(0,s.q6)((0,o.default)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return d.ok?w.default.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||h.Z.getDefault());return r&&i&&!(0,c.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,d.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,d.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,d.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,i._)([(0,f.j)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},16467:(e,t,r)=>{r.d(t,{$9:()=>w,G4:()=>S,Lu:()=>g,WW:()=>x,d:()=>F,eS:()=>I,gp:()=>C,j:()=>v,w9:()=>b,yN:()=>_}),r(66577);var i=r(3172),n=r(20102),o=r(92604),s=r(70586),a=r(8744),l=r(40488),p=r(98732),u=r(44876),c=r(92722),d=r(25278),y=r(99514),f=r(86719),m=r(82971);const h=o.Z.getLogger("esri.layers.graphics.sources.ogcfeature"),g="http://www.opengis.net/def/crs/",w=`${g}OGC/1.3/CRS84`;async function b(e,t,r={},o=5){const{links:a}=e,l=R(a,"items","application/geo+json")||R(a,"http://www.opengis.net/def/rel/ogc/1.0/items","application/geo+json");if((0,s.Wi)(l))throw new n.Z("ogc-feature-layer:missing-items-page","Missing items url");const{data:p}=await(0,i.default)(l.href,{signal:r.signal,query:{limit:o,...r.customParameters,token:r.apiKey},headers:{accept:"application/geo+json"}});await(0,c.O3)(p);const u=(0,c.my)(p,{geometryType:t.geometryType}),m=t.fields||u.fields||[],g=null!=t.hasZ?t.hasZ:u.hasZ,w=u.geometryType,b=t.objectIdField||u.objectIdFieldName||"OBJECTID";let v=t.timeInfo;const S=m.find((e=>e.name===b));if(S)S.type="esriFieldTypeOID",S.editable=!1,S.nullable=!1;else{if(!u.objectIdFieldType)throw new n.Z("ogc-feature-layer:missing-feature-id","Collection geojson require a feature id as a unique identifier");m.unshift({name:b,alias:b,type:"esriFieldTypeOID",editable:!1,nullable:!1})}if(b!==u.objectIdFieldName){const e=m.find((e=>e.name===u.objectIdFieldName));e&&(e.type="esriFieldTypeInteger")}m===u.fields&&u.unknownFields.length>0&&h.warn({name:"ogc-feature-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:u.unknownFields}});for(const e of m){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),"esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type&&(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable),!e.name)throw new n.Z("ogc-feature-layer:invalid-field-name","field name is missing",{field:e});if(!f.v.jsonValues.includes(e.type))throw new n.Z("ogc-feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e})}if(v){const e=new y.Z(m);if(v.startTimeField){const t=e.get(v.startTimeField);t?(v.startTimeField=t.name,t.type="esriFieldTypeDate"):v.startTimeField=null}if(v.endTimeField){const t=e.get(v.endTimeField);t?(v.endTimeField=t.name,t.type="esriFieldTypeDate"):v.endTimeField=null}if(v.trackIdField){const t=e.get(v.trackIdField);t?v.trackIdField=t.name:(v.trackIdField=null,h.warn({name:"ogc-feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:v}}))}v.startTimeField||v.endTimeField||(h.warn({name:"ogc-feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:v}}),v=null)}return{drawingInfo:w?(0,d.bU)(w):null,geometryType:w,fields:m,hasZ:!!g,objectIdField:b,timeInfo:v}}async function v(e,t={}){const{links:r}=e,o=R(r,"data","application/json")||R(r,"http://www.opengis.net/def/rel/ogc/1.0/data","application/json");if((0,s.Wi)(o))throw new n.Z("ogc-feature-layer:missing-collections-page","Missing collections url");const{apiKey:a,customParameters:l,signal:p}=t,{data:u}=await(0,i.default)(o.href,{signal:p,headers:{accept:"application/json"},query:{...l,token:a}});return u}async function S(e,t={}){const{links:r}=e,o=R(r,"conformance","application/json")||R(r,"http://www.opengis.net/def/rel/ogc/1.0/conformance","application/json");if((0,s.Wi)(o))throw new n.Z("ogc-feature-layer:missing-conformance-page","Missing conformance url");const{apiKey:a,customParameters:l,signal:p}=t,{data:u}=await(0,i.default)(o.href,{signal:p,headers:{accept:"application/json"},query:{...l,token:a}});return u}async function C(e,t={}){const{apiKey:r,customParameters:n,signal:o}=t,{data:s}=await(0,i.default)(e,{signal:o,headers:{accept:"application/json"},query:{...n,token:r}});return s}async function I(e,t={}){const r="application/vnd.oai.openapi+json;version=3.0",n=R(e.links,"service-desc",r);if((0,s.Wi)(n))return h.warn("ogc-feature-layer:missing-openapi-page","The OGC API-Features server does not have an OpenAPI page."),null;const{apiKey:o,customParameters:a,signal:l}=t,{data:p}=await(0,i.default)(n.href,{signal:l,headers:{accept:r},query:{...a,token:o}});return p}function F(e){const t=/^http:\/\/www\.opengis.net\/def\/crs\/(?<authority>.*)\/(?<version>.*)\/(?<code>.*)$/i.exec(e)?.groups;if(!t)return null;const{authority:r,code:i}=t;switch(r.toLowerCase()){case"ogc":switch(i.toLowerCase()){case"crs27":return m.Z.GCS_NAD_1927.wkid;case"crs83":return 4269;case"crs84":case"crs84h":return m.Z.WGS84.wkid;default:return null}case"esri":case"epsg":{const e=Number.parseInt(i,10);return Number.isNaN(e)?null:e}default:return null}}async function _(e,t,r){const i=await x(e,t,r);return(0,p.cn)(i)}async function x(e,t,r){const{capabilities:{query:{maxRecordCount:o}},collection:d,layerDefinition:y,queryParameters:{apiKey:f,customParameters:h},spatialReference:g,supportedCrs:w}=e,{links:b}=d,v=R(b,"items","application/geo+json")||R(b,"http://www.opengis.net/def/rel/ogc/1.0/items","application/geo+json");if((0,s.Wi)(v))throw new n.Z("ogc-feature-layer:missing-items-page","Missing items url");const{geometry:S,num:C,start:I,timeExtent:F,where:_}=t;if(t.objectIds)throw new n.Z("ogc-feature-layer:query-by-objectids-not-supported","Queries with objectids are not supported");const x=m.Z.fromJSON(g),j=(0,s.Pt)(t.outSpatialReference,x),O=j.isWGS84?null:T(j,w),Z=P(S,w),G=function(e){if((0,s.Wi)(e))return null;const{start:t,end:r}=e;return`${(0,s.pC)(t)?t.toISOString():".."}/${(0,s.pC)(r)?r.toISOString():".."}`}(F),D=(M=_,(0,s.Wi)(M)||!M||"1=1"===M?null:M),k=C??(null!=I&&void 0!==I?10:o),{data:q}=await(0,i.default)(v.href,{...r,query:{...h,...Z,crs:O,datetime:G,query:D,limit:k,startindex:I,token:f},headers:{accept:"application/geo+json"}});var M;let N=!1;q.links&&(N=!!q.links.find((e=>"next"===e.rel))),!N&&Number.isInteger(q.numberMatched)&&Number.isInteger(q.numberReturned)&&(N=q.numberReturned<q.numberMatched);const{fields:E,globalIdField:$,hasM:L,hasZ:A,objectIdField:W}=y,U=y.geometryType,Q=(0,c.lG)(q,{geometryType:U,hasZ:A,objectIdField:W});if(!O&&j.isWebMercator)for(const e of Q)if((0,s.pC)(e.geometry)){const t=(0,p.di)(e.geometry,U,A,!1);t.spatialReference=m.Z.WGS84,e.geometry=(0,p.GH)((0,l.iV)(t,j))}for(const e of Q)e.objectId=e.attributes[W];const z=O||!O&&j.isWebMercator?j.toJSON():a.Zn,B=new u.Z;return B.exceededTransferLimit=N,B.features=Q,B.fields=E,B.geometryType=U,B.globalIdFieldName=$,B.hasM=L,B.hasZ=A,B.objectIdFieldName=W,B.spatialReference=z,B}function T(e,t){const{isWebMercator:r,wkid:i}=e;if(!i)return null;const n=r?t[3857]??t[102100]??t[102113]??t[900913]:t[e.wkid];return n?`${g}${n}`:null}function j(e){if((0,s.Wi)(e))return"";const{xmin:t,ymin:r,xmax:i,ymax:n}=e;return`${t},${r},${i},${n}`}function P(e,t){if(!function(e){return(0,s.pC)(e)&&"extent"===e.type}(e))return null;const{spatialReference:r}=e;if(!r||r.isWGS84)return{bbox:j(e)};const i=T(r,t);return(0,s.pC)(i)?{bbox:j(e),"bbox-crs":i}:r.isWebMercator?{bbox:j((0,l.iV)(e,m.Z.WGS84))}:null}function R(e,t,r){return e.find((e=>e.rel===t&&e.type===r))||e.find((e=>e.rel===t&&!e.type))}},51706:(e,t,r)=>{var i,n;function o(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function s(e){return null!=e&&!isNaN(e)&&isFinite(e)}function a(e){return e.valueExpression?i.Expression:e.field&&"string"==typeof e.field?i.Field:i.Unknown}function l(e,t){const r=t||a(e),o=e.valueUnit||"unknown";return r===i.Unknown?n.Constant:e.stops?n.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?n.ClampedLinear:"unknown"===o?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?n.Proportional:n.Additive:n.Identity:n.RealWorldSize}r.d(t,{PS:()=>a,QW:()=>l,RY:()=>i,hL:()=>n,iY:()=>o,qh:()=>s}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(i||(i={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(n||(n={}))},74889:(e,t,r)=>{r.r(t),r.d(t,{default:()=>v});var i,n=r(43697),o=r(66577),s=r(38171),a=r(35454),l=r(96674),p=r(22974),u=r(70586),c=r(5600),d=(r(75215),r(71715)),y=r(52011),f=r(30556),m=r(82971),h=r(33955),g=r(1231);const w=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=i=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=m.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],o=s.Z.fromJSON(n),a=n.geometry&&n.geometry.spatialReference;(0,u.pC)(o.geometry)&&!a&&(o.geometry.spatialReference=r);const l=n.aggregateGeometries,p=o.aggregateGeometries;if(l&&(0,u.pC)(p))for(const e in p){const t=p[e],i=l[e]?.spatialReference;(0,u.pC)(t)&&!i&&(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void w.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(e&&(0,u.pC)(e.geometry))return void w.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,h.im)(e);return!r&&t.spatialReference&&(i.spatialReference=m.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&(0,u.pC)(e.geometry)&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(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 i=t.features[r];if(i.geometry){const t=e&&e[r];i.geometry=t&&t.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=o.length;e<t;e++)s((0,u.Wg)(o[e].geometry))||(o.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:[i,n],scale:[o,s]}=r,a=this._getHydrationFunction(e,(e=>e*o+i),(e=>n-e*s));for(const{geometry:e}of t)(0,u.pC)(e)&&a(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,n;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===i&&s===n||(o.push([e-i,s-n]),i=e,n=s)}else i=t(a[0]),n=r(a[1]),o.push([i,n])}return o.length>0?o: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 i=(0,h.oU)(e)?e.rings:e.paths,n=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],s=this._quantizePoints(o,t,r);s&&n.push(s)}return n.length>0?((0,h.oU)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const i=(0,h.oU)(e)?e.rings:e.paths;let n,o;for(let e=0,s=i.length;e<s;e++){const s=i[e];for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(n+=i[0],o+=i[1]):(n=i[0],o=i[1]),i[0]=t(n),i[1]=r(o)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const i=e.points;let n,o;for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(n+=s[0],o+=s[1]):(n=s[0],o=s[1]),s[0]=t(n),s[1]=r(o)}}:void 0}};(0,n._)([(0,c.Cb)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,n._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,c.Cb)({type:[s.Z],json:{write:!0}})],b.prototype,"features",void 0),(0,n._)([(0,d.r)("features")],b.prototype,"readFeatures",null),(0,n._)([(0,c.Cb)({type:[g.Z],json:{write:!0}})],b.prototype,"fields",void 0),(0,n._)([(0,c.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:w.read}}})],b.prototype,"geometryType",void 0),(0,n._)([(0,f.c)("geometryType")],b.prototype,"writeGeometryType",null),(0,n._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,n._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,n._)([(0,c.Cb)({types:o.qM,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,n._)([(0,d.r)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,n._)([(0,c.Cb)({type:m.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,n._)([(0,f.c)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,n._)([(0,c.Cb)({json:{write:!0}})],b.prototype,"transform",void 0),b=i=(0,n._)([(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([[8422],{13867:(t,e,r)=>{r.d(e,{Z:()=>s});var o=r(69801);class s{constructor(t,e){this._storage=new o.WJ,this._storage.maxSize=t,e&&this._storage.registerRemoveFunc("",e)}put(t,e,r){this._storage.put(t,e,r,1)}pop(t){return this._storage.pop(t)}get(t){return this._storage.get(t)}clear(){this._storage.clearAll()}destroy(){this._storage.destroy()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}}},83379:(t,e,r)=>{r.d(e,{Z:()=>y});var o=r(43697),s=r(20102),i=r(609),l=r(95330),n=r(20941),a=r(5600),u=r(52011);const p="loaded",d=t=>{let e=class extends t{constructor(...t){super(...t),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise((t=>{const e=this.load.bind(this);this.load=r=>{const o=new Promise(((t,e)=>{const o=(0,l.$F)(r,e);this.destroyed&&e(new s.Z("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this._promiseProps.when(t,e).finally((()=>{o&&o.remove()}))}));if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const t=this._loadController=new AbortController;e({signal:t.signal}),(0,l.fu)(t.signal,(()=>{this._promiseProps.abort()}))}return t(),o}}))),this.when((()=>{this._set("loadStatus",p),this._loadController=null}),(t=>{this._set("loadStatus","failed"),this._set("loadError",t),this._loadController=null}))}get loaded(){return this.loadStatus===p}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new s.Z("load:cancelled","Cancelled")),this._loadController?.abort()),this}};return(0,o._)([(0,a.Cb)({readOnly:!0})],e.prototype,"loaded",null),(0,o._)([(0,a.Cb)({readOnly:!0})],e.prototype,"loadError",void 0),(0,o._)([(0,a.Cb)({clonable:!1})],e.prototype,"loadStatus",void 0),(0,o._)([(0,a.Cb)({type:[n.Z],readOnly:!0})],e.prototype,"loadWarnings",null),e=(0,o._)([(0,u.j)("esri.core.Loadable")],e),e};let h=class extends(d(i.D)){};var c;h=(0,o._)([(0,u.j)("esri.core.Loadable")],h),(c=h||(h={})).LoadableMixin=d,c.isLoadable=function(t){return!(!t||!t.load)};const y=h},609:(t,e,r)=>{r.d(e,{D:()=>h,v:()=>d});var o,s,i=r(43697),l=r(15923),n=r(70586),a=r(95330),u=r(52011);(s=o||(o={}))[s.PENDING=0]="PENDING",s[s.RESOLVED=1]="RESOLVED",s[s.REJECTED=2]="REJECTED";class p{constructor(t){this.instance=t,this._resolver=(0,a.dD)(),this._status=o.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=o.RESOLVED,this._cleanUp()}),(()=>{this._status=o.REJECTED,this._cleanUp()}))}addResolvingPromise(t){this._resolvingPromises.push(t),this._tryResolve()}isResolved(){return this._status===o.RESOLVED}isRejected(){return this._status===o.REJECTED}isFulfilled(){return this._status!==o.PENDING}abort(){this._resolver.reject((0,a.zE)())}when(t,e){return this._resolver.promise.then(t,e)}_cleanUp(){this._allPromise=this._resolvingPromises=this._allPromise=null}_tryResolve(){if(this.isFulfilled())return;const t=(0,a.dD)(),e=[...this._resolvingPromises,(0,n.j0)(t.promise)],r=this._allPromise=Promise.all(e);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve(this.instance)}),(t=>{this.isFulfilled()||this._allPromise!==r||(0,a.D_)(t)||this._resolver.reject(t)})),t.resolve()}}const d=t=>{let e=class extends t{constructor(...t){super(...t),this._promiseProps=new p(this),this.addResolvingPromise(Promise.resolve())}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(t,e){return new Promise(((t,e)=>{this._promiseProps.when(t,e)})).then(t,e)}catch(t){return this.when(null,t)}addResolvingPromise(t){t&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in t?t.when():t)}};return e=(0,i._)([(0,u.j)("esri.core.Promise")],e),e};let h=class extends(d(l.Z)){};h=(0,i._)([(0,u.j)("esri.core.Promise")],h)},62357:(t,e,r)=>{r.d(e,{F2:()=>s,Wz:()=>i,t_:()=>l});const o=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;function s(t){return t?t/72*96:0}function i(t){return t?72*t/96:0}function l(t){if("string"==typeof t){const e=t.match(o);if(e){const r=Number(e[1]),o=e[3]&&e[3].toLowerCase(),s="-"===t.charAt(0),l="px"===o?i(r):r;return s?-l:l}return console.warn("screenUtils.toPt: input not recognized!"),null}return t}},65587:(t,e,r)=>{r.d(e,{Z:()=>G});var o=r(43697),s=r(68773),i=r(40330),l=r(3172),n=r(20102),a=r(96674),u=r(83379),p=r(70586),d=r(95330),h=r(5600),c=(r(67676),r(80442),r(75215)),y=r(71715),m=r(52011),_=r(6570),v=r(70171),b=r(41253),f=r(15923);let C=class extends f.Z{constructor(t){super(t),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,o._)([(0,h.Cb)()],C.prototype,"nextQueryParams",void 0),(0,o._)([(0,h.Cb)()],C.prototype,"queryParams",void 0),(0,o._)([(0,h.Cb)()],C.prototype,"results",void 0),(0,o._)([(0,h.Cb)()],C.prototype,"total",void 0),C=(0,o._)([(0,m.j)("esri.portal.PortalQueryResult")],C);const g=C;var S,P=r(86082),w=r(71058);let O;const q={PortalGroup:()=>Promise.resolve().then(r.bind(r,68916)),PortalItem:()=>r.e(5235).then(r.bind(r,15235)),PortalUser:()=>Promise.resolve().then(r.bind(r,86082))};let U=S=class extends((0,a.eC)(u.Z)){constructor(t){super(t),this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=s.Z.portalUrl,this.urlKey=null,this.user=null,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(t){return"string"==typeof t?{url:t}:t}destroy(){this._esriId_credentialCreateHandle&&(this._esriId_credentialCreateHandle.remove(),this._esriId_credentialCreateHandle=null)}readAuthorizedCrossOriginDomains(t){if(t)for(const e of t)s.Z.request.trustedServers.includes(e)||s.Z.request.trustedServers.push(e);return t}readDefaultBasemap(t){return this._readBasemap(t)}readDefaultDevBasemap(t){return this._readBasemap(t)}readDefaultVectorBasemap(t){return this._readBasemap(t)}get extraQuery(){const t=!(this.user&&this.user.orgId)||this.canSearchPublic;return this.id&&!t?` AND orgid:${this.id}`:null}get isOrganization(){return!!this.access}get restUrl(){let t=this.url;if(t){const e=t.indexOf("/sharing");t=e>0?t.substring(0,e):this.url.replace(/\/+$/,""),t+="/sharing/rest"}return t}get thumbnailUrl(){const t=this.restUrl,e=this.thumbnail;return t&&e?this._normalizeSSL(t+"/portals/self/resources/"+e):null}readUrlKey(t){return t?t.toLowerCase():t}readUser(t){let e=null;return t&&(e=P.default.fromJSON(t),e.portal=this),e}load(t){const e=r.e(3308).then(r.bind(r,53308)).then((({default:e})=>{(0,d.k_)(t),O=e})).then((()=>this.sourceJSON?this.sourceJSON:this._fetchSelf(this.authMode,!1,t))).then((t=>{if(i.id){const t=i.id;this.credential=t.findCredential(this.restUrl),this.credential||this.authMode!==S.AUTH_MODE_AUTO||(this._esriId_credentialCreateHandle=t.on("credential-create",(()=>{t.findCredential(this.restUrl)&&this._signIn()})))}this.sourceJSON=t,this.read(t)}));return this.addResolvingPromise(e),Promise.resolve(this)}async createElevationLayers(){await this.load();const t=this._getHelperService("defaultElevationLayers"),e=(await Promise.all([r.e(1938),r.e(9932),r.e(6130)]).then(r.bind(r,49932))).default;return t?t.map((t=>new e({id:t.id,url:t.url}))):[]}fetchBasemaps(t,e){const r=new b.Z;return r.query=t||(s.Z.apiKey&&(0,w.r)(this.url)?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0,this.queryGroups(r,e).then((t=>{if(r.num=100,r.query='type:"Web Map" -type:"Web Application"',t.total){const o=t.results[0];return r.sortField=o.sortField||"name",r.sortOrder=o.sortOrder||"desc",o.queryItems(r,e)}return null})).then((t=>{let e;return e=t&&t.total?t.results.filter((t=>"Web Map"===t.type)).map((t=>new O({portalItem:t}))):[],e}))}fetchCategorySchema(t){return this.hasCategorySchema?this._request(this.restUrl+"/portals/self/categorySchema",t).then((t=>t.categorySchema)):(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchFeaturedGroups(t){const e=this.featuredGroups,r=new b.Z;if(r.num=100,r.sortField="title",e&&e.length){const o=[];for(const t of e)o.push(`(title:"${t.title}" AND owner:${t.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,t).then((t=>t.results))}return(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchRegions(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this._request(this.restUrl+"/portals/regions",{...t,query:{culture:e}})}fetchSettings(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this._request(this.restUrl+"/portals/self/settings",{...t,query:{culture:e}})}static getDefault(){return S._default&&!S._default.destroyed||(S._default=new S),S._default}queryGroups(t,e){return this._queryPortal("/community/groups",t,"PortalGroup",e)}queryItems(t,e){return this._queryPortal("/search",t,"PortalItem",e)}queryUsers(t,e){return t.sortField||(t.sortField="username"),this._queryPortal("/community/users",t,"PortalUser",e)}toJSON(){throw new n.Z("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");return new S({sourceJSON:t})}_getHelperService(t){const e=this.helperServices&&this.helperServices[t];if(!e)throw new n.Z("portal:service-not-found",`The \`helperServices\` do not include an entry named "${t}"`);return e}_getHelperServiceUrl(t){const e=this._getHelperService(t);if(!e.url)throw new n.Z("portal:service-url-not-found",`The \`helperServices\` entry "${t}" does not include a \`url\` value`);return e.url}_fetchSelf(t=this.authMode,e=!1,r){const o=this.restUrl+"/portals/self",s={authMode:t,query:{culture:(0,v.Kd)().toLowerCase()},...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),e&&(s.query.default=!0),this._request(o,s)}_queryPortal(t,e,r,o){const s=(0,c.se)(b.Z,e),i=e=>this._request(this.restUrl+t,{...s.toRequestOptions(this),...o}).then((t=>{const r=s.clone();return r.start=t.nextStart,new g({nextQueryParams:r,queryParams:s,total:t.total,results:S._resultsToTypedArray(e,{portal:this},t,o)})})).then((t=>Promise.all(t.results.map((e=>"function"==typeof e.when?e.when():t))).then((()=>t),(e=>((0,d.r9)(e),t)))));return r&&q[r]?q[r]().then((({default:t})=>((0,d.k_)(o),i(t)))):i()}_signIn(){if(this.authMode===S.AUTH_MODE_ANONYMOUS)return Promise.reject(new n.Z("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const t=t=>Promise.resolve().then((()=>"not-loaded"===this.loadStatus?(t||(this.authMode="immediate"),this.load().then((()=>null))):"loading"===this.loadStatus?this.load().then((()=>this.credential?null:(this.credential=t,this._fetchSelf("immediate")))):this.user&&this.credential===t?null:(this.credential=t,this._fetchSelf("immediate")))).then((t=>{t&&(this.sourceJSON=t,this.read(t))}));return i.id?i.id.getCredential(this.restUrl).then((e=>t(e))):t(this.credential)}_normalizeSSL(t){return t.replace(/^http:/i,"https:").replace(":7080",":7443")}_normalizeUrl(t){const e=this.credential&&this.credential.token;return this._normalizeSSL(e?t+(t.includes("?")?"&":"?")+"token="+e:t)}_requestToTypedArray(t,e,r){return this._request(t,e).then((t=>{const e=S._resultsToTypedArray(r,{portal:this},t);return Promise.all(e.map((e=>"function"==typeof e.when?e.when():t))).then((()=>e),(()=>e))}))}_readBasemap(t){if(t){const e=O.fromJSON(t);return e.portalItem={portal:this},e}return null}_request(t,e={}){const r={f:"json",...e.query},{authMode:o=(this.authMode===S.AUTH_MODE_ANONYMOUS?"anonymous":"auto"),body:s=null,cacheBust:i=!1,method:n="auto",responseType:a="json",signal:u}=e,p={authMode:o,body:s,cacheBust:i,method:n,query:r,responseType:a,timeout:0,signal:u};return(0,l.default)(this._normalizeSSL(t),p).then((t=>t.data))}static _resultsToTypedArray(t,e,r,o){let s;if(r){const i=(0,p.pC)(o)?o.signal:null;s=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(t||e)&&(s=s.map((r=>{const o=Object.assign(t?t.fromJSON(r):r,e);return"function"==typeof o.load&&o.load(i),o})))}else s=[];return s}};U.AUTH_MODE_ANONYMOUS="anonymous",U.AUTH_MODE_AUTO="auto",U.AUTH_MODE_IMMEDIATE="immediate",(0,o._)([(0,h.Cb)()],U.prototype,"access",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"allSSL",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"authMode",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"authorizedCrossOriginDomains",void 0),(0,o._)([(0,y.r)("authorizedCrossOriginDomains")],U.prototype,"readAuthorizedCrossOriginDomains",null),(0,o._)([(0,h.Cb)()],U.prototype,"basemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"bingKey",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"canListApps",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"canListData",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"canListPreProvisionedItems",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"canProvisionDirectPurchase",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"canSearchPublic",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"canShareBingPublic",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"canSharePublic",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"canSignInArcGIS",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"canSignInIDP",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"colorSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"commentsEnabled",void 0),(0,o._)([(0,h.Cb)({type:Date})],U.prototype,"created",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"credential",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"culture",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"currentVersion",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"customBaseUrl",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"defaultBasemap",void 0),(0,o._)([(0,y.r)("defaultBasemap")],U.prototype,"readDefaultBasemap",null),(0,o._)([(0,h.Cb)()],U.prototype,"defaultDevBasemap",void 0),(0,o._)([(0,y.r)("defaultDevBasemap")],U.prototype,"readDefaultDevBasemap",null),(0,o._)([(0,h.Cb)({type:_.Z})],U.prototype,"defaultExtent",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"defaultVectorBasemap",void 0),(0,o._)([(0,y.r)("defaultVectorBasemap")],U.prototype,"readDefaultVectorBasemap",null),(0,o._)([(0,h.Cb)()],U.prototype,"description",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"devBasemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"eueiEnabled",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],U.prototype,"extraQuery",null),(0,o._)([(0,h.Cb)()],U.prototype,"featuredGroups",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"featuredItemsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"galleryTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"livingAtlasGroupQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"hasCategorySchema",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"helpBase",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"helperServices",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"helpMap",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"homePageFeaturedContent",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"homePageFeaturedContentCount",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"httpPort",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"httpsPort",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"id",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"ipCntryCode",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],U.prototype,"isOrganization",null),(0,o._)([(0,h.Cb)()],U.prototype,"isPortal",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"isReadOnly",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"layerTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"maxTokenExpirationMinutes",void 0),(0,o._)([(0,h.Cb)({type:Date})],U.prototype,"modified",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"name",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"portalHostname",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"portalMode",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"portalProperties",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"region",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],U.prototype,"restUrl",null),(0,o._)([(0,h.Cb)()],U.prototype,"rotatorPanels",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"showHomePageDescription",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"sourceJSON",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"staticImagesUrl",void 0),(0,o._)([(0,h.Cb)({json:{name:"2DStylesGroupQuery"}})],U.prototype,"stylesGroupQuery2d",void 0),(0,o._)([(0,h.Cb)({json:{name:"stylesGroupQuery"}})],U.prototype,"stylesGroupQuery3d",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"supportsHostedServices",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"symbolSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"templatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"thumbnail",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],U.prototype,"thumbnailUrl",null),(0,o._)([(0,h.Cb)()],U.prototype,"units",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"url",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"urlKey",void 0),(0,o._)([(0,y.r)("urlKey")],U.prototype,"readUrlKey",null),(0,o._)([(0,h.Cb)()],U.prototype,"user",void 0),(0,o._)([(0,y.r)("user")],U.prototype,"readUser",null),(0,o._)([(0,h.Cb)()],U.prototype,"useStandardizedQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"useVectorBasemaps",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"vectorBasemapGalleryGroupQuery",void 0),U=S=(0,o._)([(0,m.j)("esri.portal.Portal")],U);const G=U},68916:(t,e,r)=>{r.r(e),r.d(e,{default:()=>d});var o=r(43697),s=r(20102),i=r(96674),l=r(5600),n=(r(67676),r(80442),r(75215)),a=r(52011),u=r(41253);let p=class extends i.wq{constructor(t){super(t),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.tags=null,this.title=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e?this.portal._normalizeUrl(`${t}/info/${e}?f=json`):null}get url(){const t=this.get("portal.restUrl");return t?t+"/community/groups/"+this.id:null}fetchCategorySchema(t){return this.portal._request(this.url+"/categorySchema",t).then((e=>{const r=e.categorySchema||[];return r.some((t=>"contentCategorySetsGroupQuery.LivingAtlas"===t.source))?this._fetchCategorySchemaSet("LivingAtlas",t):r}))}fetchMembers(t){return this.portal._request(this.url+"/users",t)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}queryItems(t,e){let r=(0,n.se)(u.Z,t);return parseFloat(this.portal.currentVersion)>5?(r=r||new u.Z,this.portal._queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",e)):(r=r?r.clone():new u.Z,r.query="group:"+this.id+(r.query?" "+r.query:""),this.portal.queryItems(r,e))}_fetchCategorySchemaSet(t,e){return this.portal._fetchSelf(this.portal.authMode,!0,e).then((t=>{const r=t.contentCategorySetsGroupQuery;if(r){const t=new u.Z;return t.disableExtraQuery=!0,t.num=1,t.query=r,this.portal.queryGroups(t,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")})).then((r=>{if(r.total){const o=r.results[0],s=new u.Z;return s.num=1,s.query=`typekeywords:"${t}"`,o.queryItems(s,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")})).then((t=>t.total?t.results[0].fetchData("json",e).then((t=>{const e=t&&t.categorySchema;return e&&e.length?e:[]})):[]))}};(0,o._)([(0,l.Cb)()],p.prototype,"access",void 0),(0,o._)([(0,l.Cb)({type:Date})],p.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"description",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"id",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"isInvitationOnly",void 0),(0,o._)([(0,l.Cb)({type:Date})],p.prototype,"modified",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"owner",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"snippet",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"sortField",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"sortOrder",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"tags",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"thumbnail",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],p.prototype,"thumbnailUrl",null),(0,o._)([(0,l.Cb)()],p.prototype,"title",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],p.prototype,"url",null),p=(0,o._)([(0,a.j)("esri.portal.PortalGroup")],p);const d=p},41253:(t,e,r)=>{r.d(e,{Z:()=>_});var o,s=r(43697),i=r(15923),l=r(35454),n=r(22974),a=r(70586),u=r(5600),p=(r(75215),r(52011)),d=r(6570),h=r(82971),c=r(40488);const y=new l.X({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let m=o=class extends i.Z{constructor(t){super(t),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(t){"asc"!==t&&"desc"!==t||this._set("sortOrder",t)}clone(){return new o({categories:this.categories?(0,n.d9)(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(t,e){let r,o;if(this.categories&&(r=this.categories.map((t=>Array.isArray(t)?JSON.stringify(t):t))),this.extent){const t=(0,c.iV)(this.extent,h.Z.WGS84);(0,a.pC)(t)&&(o=`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`)}let s=this.query;!this.disableExtraQuery&&t.extraQuery&&(s="("+s+")"+t.extraQuery);const i={categories:r,bbox:o,q:s,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(i.sortField=this.sortField.split(",").map((t=>y.toJSON(t.trim()))).join(","),i.sortOrder=this.sortOrder),{query:{...e,...i}}}};(0,s._)([(0,u.Cb)()],m.prototype,"categories",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"disableExtraQuery",void 0),(0,s._)([(0,u.Cb)({type:d.Z})],m.prototype,"extent",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"filter",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"num",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"query",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"sortField",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"sortOrder",null),(0,s._)([(0,u.Cb)()],m.prototype,"start",void 0),m=o=(0,s._)([(0,p.j)("esri.portal.PortalQueryParams")],m);const _=m},86082:(t,e,r)=>{r.r(e),r.d(e,{default:()=>c});var o=r(43697),s=r(20102),i=r(96674),l=r(5600),n=(r(67676),r(80442),r(75215),r(52011));let a=class extends i.wq{constructor(t){super(t),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,o._)([(0,l.Cb)({type:Date})],a.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"id",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"title",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],a.prototype,"url",null),(0,o._)([(0,l.Cb)()],a.prototype,"username",void 0),a=(0,o._)([(0,n.j)("esri.portal.PortalFolder")],a);const u=a;var p,d=r(68916);let h=p=class extends i.wq{constructor(...t){super(...t),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userType=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e?this.portal._normalizeUrl(`${t}/info/${e}?f=json`):null}get userContentUrl(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}`:null}get url(){const t=this.get("portal.restUrl");return t?`${t}/community/users/${this.username}`:null}addItem(t){const e=t&&t.item,r=t&&t.data,o=t&&t.folder,s={method:"post"};e&&(s.query=e.createPostQuery(),null!=r&&("string"==typeof r?s.query.text=r:"object"==typeof r&&(s.query.text=JSON.stringify(r))));let i=this.userContentUrl;return o&&(i+="/"+("string"==typeof o?o:o.id)),this.portal._request(i+"/addItem",s).then((t=>(e.id=t.id,e.portal=this.portal,e.loaded?e.reload():e.load())))}deleteItem(t){let e=this.userContentUrl;return t.ownerFolder&&(e+="/"+t.ownerFolder),this.portal._request(e+`/items/${t.id}/delete`,{method:"post"}).then((()=>{t.id=null,t.portal=null}))}deleteItems(t){const e=this.userContentUrl+"/deleteItems",r=t.map((t=>t.id));if(r.length){const o={method:"post",query:{items:r.join(",")}};return this.portal._request(e,o).then((()=>{t.forEach((t=>{t.id=null,t.portal=null}))}))}return Promise.resolve(void 0)}fetchFolders(){return this.portal._request(this.userContentUrl,{query:{num:1}}).then((t=>{let e;return e=t&&t.folders?t.folders.map((t=>{const e=u.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchGroups(){return this.portal._request(this.url).then((t=>{let e;return e=t&&t.groups?t.groups.map((t=>{const e=d.default.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchItems(t){t||(t={});let e,o=this.userContentUrl;return t.folder&&(o+="/"+t.folder.id),r.e(5235).then(r.bind(r,15235)).then((({default:r})=>{e=r;const s={folders:!1,num:t.num||10,start:t.start||1,sortField:t.sortField||"created",sortOrder:t.sortOrder||"asc"};return this.portal._request(o,{query:s})})).then((t=>{let r;return t&&t.items?(r=t.items.map((t=>{const r=e.fromJSON(t);return r.portal=this.portal,r})),Promise.all(r.map((t=>t.load()))).catch((t=>t)).then((()=>({items:r,nextStart:t.nextStart,total:t.total})))):{items:[],nextStart:-1,total:0}}))}fetchTags(){return this.portal._request(this.url+"/tags").then((t=>t.tags))}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}queryFavorites(t){return this.favGroupId?(this._favGroup||(this._favGroup=new d.default({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(t)):Promise.reject(new s.Z("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new p;return e.sourceJSON=t,e.read(t),e}};(0,o._)([(0,l.Cb)()],h.prototype,"access",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"culture",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"description",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"email",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"favGroupId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"fullName",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"modified",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"orgId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"preferredView",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"privileges",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"region",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"role",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"roleId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"sourceJSON",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"thumbnail",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"thumbnailUrl",null),(0,o._)([(0,l.Cb)()],h.prototype,"units",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"userContentUrl",null),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"url",null),(0,o._)([(0,l.Cb)()],h.prototype,"username",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"userType",void 0),h=p=(0,o._)([(0,n.j)("esri.portal.PortalUser")],h);const c=h},27391:(t,e,r)=>{r.d(e,{wm:()=>v,n2:()=>d,KV:()=>h,EJ:()=>y,v9:()=>c});var o=r(3172),s=r(20102),i=r(95330),l=r(17452),n=r(65587),a=r(41253),u=r(80442);const p={};function d(t,e,r){return t.styleUrl?async function(t,e){try{return{data:(await y(t,e)).data,baseUrl:(0,l.Yd)(t),styleUrl:t}}catch(t){return(0,i.r9)(t),null}}(t.styleUrl,r):t.styleName?function(t,e,r){const o=e&&e.portal||n.Z.getDefault();let i;const l=`${o.url} - ${o.user&&o.user.username} - ${t}`;return p[l]||(p[l]=function(t,e,r){return e.load(r).then((()=>{const o=new a.Z({disableExtraQuery:!0,query:`owner:${m} AND type:${_} AND typekeywords:"${t}"`});return e.queryItems(o,r)})).then((({results:e})=>{let o=null;const i=t.toLowerCase();if(e&&Array.isArray(e))for(const t of e)if(t.typeKeywords.some((t=>t.toLowerCase()===i))&&t.type===_&&t.owner===m){o=t;break}if(!o)throw new s.Z("symbolstyleutils:style-not-found",`The style '${t}' could not be found`,{styleName:t});return o.load(r)}))}(t,o,r).then((t=>(i=t,t.fetchData()))).then((e=>({data:e,baseUrl:i.itemUrl,styleName:t})))),p[l]}(t.styleName,e,r):Promise.reject(new s.Z("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function h(t){return null===t||"CIMSymbolReference"===t.type?t:{type:"CIMSymbolReference",symbol:t}}function c(t,e){if("cimRef"===e)return t.cimRef;if(t.formatInfos&&!(0,u.Z)("enable-feature:force-wosr"))for(const e of t.formatInfos)if("gltf"===e.type)return e.href;return t.webRef}function y(t,e){const r={responseType:"json",query:{f:"json"},...e};return(0,o.default)((0,l.Fv)(t),r)}const m="esri_en",_="Style",v="https://cdn.arcgis.com/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f=json"}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8422],{13867:(t,e,r)=>{r.d(e,{Z:()=>s});var o=r(69801);class s{constructor(t,e){this._storage=new o.WJ,this._storage.maxSize=t,e&&this._storage.registerRemoveFunc("",e)}put(t,e,r){this._storage.put(t,e,r,1)}pop(t){return this._storage.pop(t)}get(t){return this._storage.get(t)}clear(){this._storage.clearAll()}destroy(){this._storage.destroy()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}}},83379:(t,e,r)=>{r.d(e,{Z:()=>y});var o=r(43697),s=r(20102),i=r(609),l=r(95330),n=r(20941),a=r(5600),u=r(52011);const p="loaded",d=t=>{let e=class extends t{constructor(...t){super(...t),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise((t=>{const e=this.load.bind(this);this.load=r=>{const o=new Promise(((t,e)=>{const o=(0,l.$F)(r,e);this.destroyed&&e(new s.Z("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this._promiseProps.when(t,e).finally((()=>{o&&o.remove()}))}));if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const t=this._loadController=new AbortController;e({signal:t.signal}),(0,l.fu)(t.signal,(()=>{this._promiseProps.abort()}))}return t(),o}}))),this.when((()=>{this._set("loadStatus",p),this._loadController=null}),(t=>{this._set("loadStatus","failed"),this._set("loadError",t),this._loadController=null}))}get loaded(){return this.loadStatus===p}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new s.Z("load:cancelled","Cancelled")),this._loadController?.abort()),this}};return(0,o._)([(0,a.Cb)({readOnly:!0})],e.prototype,"loaded",null),(0,o._)([(0,a.Cb)({readOnly:!0})],e.prototype,"loadError",void 0),(0,o._)([(0,a.Cb)({clonable:!1})],e.prototype,"loadStatus",void 0),(0,o._)([(0,a.Cb)({type:[n.Z],readOnly:!0})],e.prototype,"loadWarnings",null),e=(0,o._)([(0,u.j)("esri.core.Loadable")],e),e};let h=class extends(d(i.D)){};var c;h=(0,o._)([(0,u.j)("esri.core.Loadable")],h),(c=h||(h={})).LoadableMixin=d,c.isLoadable=function(t){return!(!t||!t.load)};const y=h},609:(t,e,r)=>{r.d(e,{D:()=>h,v:()=>d});var o,s,i=r(43697),l=r(15923),n=r(70586),a=r(95330),u=r(52011);(s=o||(o={}))[s.PENDING=0]="PENDING",s[s.RESOLVED=1]="RESOLVED",s[s.REJECTED=2]="REJECTED";class p{constructor(t){this.instance=t,this._resolver=(0,a.dD)(),this._status=o.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=o.RESOLVED,this._cleanUp()}),(()=>{this._status=o.REJECTED,this._cleanUp()}))}addResolvingPromise(t){this._resolvingPromises.push(t),this._tryResolve()}isResolved(){return this._status===o.RESOLVED}isRejected(){return this._status===o.REJECTED}isFulfilled(){return this._status!==o.PENDING}abort(){this._resolver.reject((0,a.zE)())}when(t,e){return this._resolver.promise.then(t,e)}_cleanUp(){this._allPromise=this._resolvingPromises=this._allPromise=null}_tryResolve(){if(this.isFulfilled())return;const t=(0,a.dD)(),e=[...this._resolvingPromises,(0,n.j0)(t.promise)],r=this._allPromise=Promise.all(e);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve(this.instance)}),(t=>{this.isFulfilled()||this._allPromise!==r||(0,a.D_)(t)||this._resolver.reject(t)})),t.resolve()}}const d=t=>{let e=class extends t{constructor(...t){super(...t),this._promiseProps=new p(this),this.addResolvingPromise(Promise.resolve())}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(t,e){return new Promise(((t,e)=>{this._promiseProps.when(t,e)})).then(t,e)}catch(t){return this.when(null,t)}addResolvingPromise(t){t&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in t?t.when():t)}};return e=(0,i._)([(0,u.j)("esri.core.Promise")],e),e};let h=class extends(d(l.Z)){};h=(0,i._)([(0,u.j)("esri.core.Promise")],h)},62357:(t,e,r)=>{r.d(e,{F2:()=>s,Wz:()=>i,t_:()=>l});const o=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;function s(t){return t?t/72*96:0}function i(t){return t?72*t/96:0}function l(t){if("string"==typeof t){const e=t.match(o);if(e){const r=Number(e[1]),o=e[3]&&e[3].toLowerCase(),s="-"===t.charAt(0),l="px"===o?i(r):r;return s?-l:l}return console.warn("screenUtils.toPt: input not recognized!"),null}return t}},65587:(t,e,r)=>{r.d(e,{Z:()=>G});var o=r(43697),s=r(68773),i=r(40330),l=r(3172),n=r(20102),a=r(96674),u=r(83379),p=r(70586),d=r(95330),h=r(5600),c=(r(67676),r(80442),r(75215)),y=r(71715),m=r(52011),_=r(6570),v=r(70171),b=r(41253),f=r(15923);let C=class extends f.Z{constructor(t){super(t),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,o._)([(0,h.Cb)()],C.prototype,"nextQueryParams",void 0),(0,o._)([(0,h.Cb)()],C.prototype,"queryParams",void 0),(0,o._)([(0,h.Cb)()],C.prototype,"results",void 0),(0,o._)([(0,h.Cb)()],C.prototype,"total",void 0),C=(0,o._)([(0,m.j)("esri.portal.PortalQueryResult")],C);const g=C;var S,P=r(86082),w=r(71058);let O;const q={PortalGroup:()=>Promise.resolve().then(r.bind(r,68916)),PortalItem:()=>r.e(5235).then(r.bind(r,15235)),PortalUser:()=>Promise.resolve().then(r.bind(r,86082))};let U=S=class extends((0,a.eC)(u.Z)){constructor(t){super(t),this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=s.Z.portalUrl,this.urlKey=null,this.user=null,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(t){return"string"==typeof t?{url:t}:t}destroy(){this._esriId_credentialCreateHandle&&(this._esriId_credentialCreateHandle.remove(),this._esriId_credentialCreateHandle=null)}readAuthorizedCrossOriginDomains(t){if(t)for(const e of t)s.Z.request.trustedServers.includes(e)||s.Z.request.trustedServers.push(e);return t}readDefaultBasemap(t){return this._readBasemap(t)}readDefaultDevBasemap(t){return this._readBasemap(t)}readDefaultVectorBasemap(t){return this._readBasemap(t)}get extraQuery(){const t=!(this.user&&this.user.orgId)||this.canSearchPublic;return this.id&&!t?` AND orgid:${this.id}`:null}get isOrganization(){return!!this.access}get restUrl(){let t=this.url;if(t){const e=t.indexOf("/sharing");t=e>0?t.substring(0,e):this.url.replace(/\/+$/,""),t+="/sharing/rest"}return t}get thumbnailUrl(){const t=this.restUrl,e=this.thumbnail;return t&&e?this._normalizeSSL(t+"/portals/self/resources/"+e):null}readUrlKey(t){return t?t.toLowerCase():t}readUser(t){let e=null;return t&&(e=P.default.fromJSON(t),e.portal=this),e}load(t){const e=r.e(3668).then(r.bind(r,93668)).then((({default:e})=>{(0,d.k_)(t),O=e})).then((()=>this.sourceJSON?this.sourceJSON:this._fetchSelf(this.authMode,!1,t))).then((t=>{if(i.id){const t=i.id;this.credential=t.findCredential(this.restUrl),this.credential||this.authMode!==S.AUTH_MODE_AUTO||(this._esriId_credentialCreateHandle=t.on("credential-create",(()=>{t.findCredential(this.restUrl)&&this._signIn()})))}this.sourceJSON=t,this.read(t)}));return this.addResolvingPromise(e),Promise.resolve(this)}async createElevationLayers(){await this.load();const t=this._getHelperService("defaultElevationLayers"),e=(await Promise.all([r.e(1938),r.e(9932),r.e(6130)]).then(r.bind(r,49932))).default;return t?t.map((t=>new e({id:t.id,url:t.url}))):[]}fetchBasemaps(t,e){const r=new b.Z;return r.query=t||(s.Z.apiKey&&(0,w.r)(this.url)?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0,this.queryGroups(r,e).then((t=>{if(r.num=100,r.query='type:"Web Map" -type:"Web Application"',t.total){const o=t.results[0];return r.sortField=o.sortField||"name",r.sortOrder=o.sortOrder||"desc",o.queryItems(r,e)}return null})).then((t=>{let e;return e=t&&t.total?t.results.filter((t=>"Web Map"===t.type)).map((t=>new O({portalItem:t}))):[],e}))}fetchCategorySchema(t){return this.hasCategorySchema?this._request(this.restUrl+"/portals/self/categorySchema",t).then((t=>t.categorySchema)):(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchFeaturedGroups(t){const e=this.featuredGroups,r=new b.Z;if(r.num=100,r.sortField="title",e&&e.length){const o=[];for(const t of e)o.push(`(title:"${t.title}" AND owner:${t.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,t).then((t=>t.results))}return(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchRegions(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this._request(this.restUrl+"/portals/regions",{...t,query:{culture:e}})}fetchSettings(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this._request(this.restUrl+"/portals/self/settings",{...t,query:{culture:e}})}static getDefault(){return S._default&&!S._default.destroyed||(S._default=new S),S._default}queryGroups(t,e){return this._queryPortal("/community/groups",t,"PortalGroup",e)}queryItems(t,e){return this._queryPortal("/search",t,"PortalItem",e)}queryUsers(t,e){return t.sortField||(t.sortField="username"),this._queryPortal("/community/users",t,"PortalUser",e)}toJSON(){throw new n.Z("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");return new S({sourceJSON:t})}_getHelperService(t){const e=this.helperServices&&this.helperServices[t];if(!e)throw new n.Z("portal:service-not-found",`The \`helperServices\` do not include an entry named "${t}"`);return e}_getHelperServiceUrl(t){const e=this._getHelperService(t);if(!e.url)throw new n.Z("portal:service-url-not-found",`The \`helperServices\` entry "${t}" does not include a \`url\` value`);return e.url}_fetchSelf(t=this.authMode,e=!1,r){const o=this.restUrl+"/portals/self",s={authMode:t,query:{culture:(0,v.Kd)().toLowerCase()},...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),e&&(s.query.default=!0),this._request(o,s)}_queryPortal(t,e,r,o){const s=(0,c.se)(b.Z,e),i=e=>this._request(this.restUrl+t,{...s.toRequestOptions(this),...o}).then((t=>{const r=s.clone();return r.start=t.nextStart,new g({nextQueryParams:r,queryParams:s,total:t.total,results:S._resultsToTypedArray(e,{portal:this},t,o)})})).then((t=>Promise.all(t.results.map((e=>"function"==typeof e.when?e.when():t))).then((()=>t),(e=>((0,d.r9)(e),t)))));return r&&q[r]?q[r]().then((({default:t})=>((0,d.k_)(o),i(t)))):i()}_signIn(){if(this.authMode===S.AUTH_MODE_ANONYMOUS)return Promise.reject(new n.Z("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const t=t=>Promise.resolve().then((()=>"not-loaded"===this.loadStatus?(t||(this.authMode="immediate"),this.load().then((()=>null))):"loading"===this.loadStatus?this.load().then((()=>this.credential?null:(this.credential=t,this._fetchSelf("immediate")))):this.user&&this.credential===t?null:(this.credential=t,this._fetchSelf("immediate")))).then((t=>{t&&(this.sourceJSON=t,this.read(t))}));return i.id?i.id.getCredential(this.restUrl).then((e=>t(e))):t(this.credential)}_normalizeSSL(t){return t.replace(/^http:/i,"https:").replace(":7080",":7443")}_normalizeUrl(t){const e=this.credential&&this.credential.token;return this._normalizeSSL(e?t+(t.includes("?")?"&":"?")+"token="+e:t)}_requestToTypedArray(t,e,r){return this._request(t,e).then((t=>{const e=S._resultsToTypedArray(r,{portal:this},t);return Promise.all(e.map((e=>"function"==typeof e.when?e.when():t))).then((()=>e),(()=>e))}))}_readBasemap(t){if(t){const e=O.fromJSON(t);return e.portalItem={portal:this},e}return null}_request(t,e={}){const r={f:"json",...e.query},{authMode:o=(this.authMode===S.AUTH_MODE_ANONYMOUS?"anonymous":"auto"),body:s=null,cacheBust:i=!1,method:n="auto",responseType:a="json",signal:u}=e,p={authMode:o,body:s,cacheBust:i,method:n,query:r,responseType:a,timeout:0,signal:u};return(0,l.default)(this._normalizeSSL(t),p).then((t=>t.data))}static _resultsToTypedArray(t,e,r,o){let s;if(r){const i=(0,p.pC)(o)?o.signal:null;s=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(t||e)&&(s=s.map((r=>{const o=Object.assign(t?t.fromJSON(r):r,e);return"function"==typeof o.load&&o.load(i),o})))}else s=[];return s}};U.AUTH_MODE_ANONYMOUS="anonymous",U.AUTH_MODE_AUTO="auto",U.AUTH_MODE_IMMEDIATE="immediate",(0,o._)([(0,h.Cb)()],U.prototype,"access",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"allSSL",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"authMode",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"authorizedCrossOriginDomains",void 0),(0,o._)([(0,y.r)("authorizedCrossOriginDomains")],U.prototype,"readAuthorizedCrossOriginDomains",null),(0,o._)([(0,h.Cb)()],U.prototype,"basemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"bingKey",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"canListApps",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"canListData",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"canListPreProvisionedItems",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"canProvisionDirectPurchase",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"canSearchPublic",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"canShareBingPublic",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"canSharePublic",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"canSignInArcGIS",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"canSignInIDP",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"colorSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"commentsEnabled",void 0),(0,o._)([(0,h.Cb)({type:Date})],U.prototype,"created",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"credential",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"culture",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"currentVersion",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"customBaseUrl",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"defaultBasemap",void 0),(0,o._)([(0,y.r)("defaultBasemap")],U.prototype,"readDefaultBasemap",null),(0,o._)([(0,h.Cb)()],U.prototype,"defaultDevBasemap",void 0),(0,o._)([(0,y.r)("defaultDevBasemap")],U.prototype,"readDefaultDevBasemap",null),(0,o._)([(0,h.Cb)({type:_.Z})],U.prototype,"defaultExtent",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"defaultVectorBasemap",void 0),(0,o._)([(0,y.r)("defaultVectorBasemap")],U.prototype,"readDefaultVectorBasemap",null),(0,o._)([(0,h.Cb)()],U.prototype,"description",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"devBasemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"eueiEnabled",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],U.prototype,"extraQuery",null),(0,o._)([(0,h.Cb)()],U.prototype,"featuredGroups",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"featuredItemsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"galleryTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"livingAtlasGroupQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"hasCategorySchema",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"helpBase",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"helperServices",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"helpMap",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"homePageFeaturedContent",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"homePageFeaturedContentCount",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"httpPort",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"httpsPort",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"id",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"ipCntryCode",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],U.prototype,"isOrganization",null),(0,o._)([(0,h.Cb)()],U.prototype,"isPortal",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"isReadOnly",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"layerTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"maxTokenExpirationMinutes",void 0),(0,o._)([(0,h.Cb)({type:Date})],U.prototype,"modified",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"name",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"portalHostname",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"portalMode",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"portalProperties",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"region",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],U.prototype,"restUrl",null),(0,o._)([(0,h.Cb)()],U.prototype,"rotatorPanels",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"showHomePageDescription",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"sourceJSON",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"staticImagesUrl",void 0),(0,o._)([(0,h.Cb)({json:{name:"2DStylesGroupQuery"}})],U.prototype,"stylesGroupQuery2d",void 0),(0,o._)([(0,h.Cb)({json:{name:"stylesGroupQuery"}})],U.prototype,"stylesGroupQuery3d",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"supportsHostedServices",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"symbolSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"templatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"thumbnail",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],U.prototype,"thumbnailUrl",null),(0,o._)([(0,h.Cb)()],U.prototype,"units",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"url",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"urlKey",void 0),(0,o._)([(0,y.r)("urlKey")],U.prototype,"readUrlKey",null),(0,o._)([(0,h.Cb)()],U.prototype,"user",void 0),(0,o._)([(0,y.r)("user")],U.prototype,"readUser",null),(0,o._)([(0,h.Cb)()],U.prototype,"useStandardizedQuery",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"useVectorBasemaps",void 0),(0,o._)([(0,h.Cb)()],U.prototype,"vectorBasemapGalleryGroupQuery",void 0),U=S=(0,o._)([(0,m.j)("esri.portal.Portal")],U);const G=U},68916:(t,e,r)=>{r.r(e),r.d(e,{default:()=>d});var o=r(43697),s=r(20102),i=r(96674),l=r(5600),n=(r(67676),r(80442),r(75215)),a=r(52011),u=r(41253);let p=class extends i.wq{constructor(t){super(t),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.tags=null,this.title=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e?this.portal._normalizeUrl(`${t}/info/${e}?f=json`):null}get url(){const t=this.get("portal.restUrl");return t?t+"/community/groups/"+this.id:null}fetchCategorySchema(t){return this.portal._request(this.url+"/categorySchema",t).then((e=>{const r=e.categorySchema||[];return r.some((t=>"contentCategorySetsGroupQuery.LivingAtlas"===t.source))?this._fetchCategorySchemaSet("LivingAtlas",t):r}))}fetchMembers(t){return this.portal._request(this.url+"/users",t)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}queryItems(t,e){let r=(0,n.se)(u.Z,t);return parseFloat(this.portal.currentVersion)>5?(r=r||new u.Z,this.portal._queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",e)):(r=r?r.clone():new u.Z,r.query="group:"+this.id+(r.query?" "+r.query:""),this.portal.queryItems(r,e))}_fetchCategorySchemaSet(t,e){return this.portal._fetchSelf(this.portal.authMode,!0,e).then((t=>{const r=t.contentCategorySetsGroupQuery;if(r){const t=new u.Z;return t.disableExtraQuery=!0,t.num=1,t.query=r,this.portal.queryGroups(t,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")})).then((r=>{if(r.total){const o=r.results[0],s=new u.Z;return s.num=1,s.query=`typekeywords:"${t}"`,o.queryItems(s,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")})).then((t=>t.total?t.results[0].fetchData("json",e).then((t=>{const e=t&&t.categorySchema;return e&&e.length?e:[]})):[]))}};(0,o._)([(0,l.Cb)()],p.prototype,"access",void 0),(0,o._)([(0,l.Cb)({type:Date})],p.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"description",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"id",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"isInvitationOnly",void 0),(0,o._)([(0,l.Cb)({type:Date})],p.prototype,"modified",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"owner",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"snippet",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"sortField",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"sortOrder",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"tags",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"thumbnail",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],p.prototype,"thumbnailUrl",null),(0,o._)([(0,l.Cb)()],p.prototype,"title",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],p.prototype,"url",null),p=(0,o._)([(0,a.j)("esri.portal.PortalGroup")],p);const d=p},41253:(t,e,r)=>{r.d(e,{Z:()=>_});var o,s=r(43697),i=r(15923),l=r(35454),n=r(22974),a=r(70586),u=r(5600),p=(r(75215),r(52011)),d=r(6570),h=r(82971),c=r(40488);const y=new l.X({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let m=o=class extends i.Z{constructor(t){super(t),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(t){"asc"!==t&&"desc"!==t||this._set("sortOrder",t)}clone(){return new o({categories:this.categories?(0,n.d9)(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(t,e){let r,o;if(this.categories&&(r=this.categories.map((t=>Array.isArray(t)?JSON.stringify(t):t))),this.extent){const t=(0,c.iV)(this.extent,h.Z.WGS84);(0,a.pC)(t)&&(o=`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`)}let s=this.query;!this.disableExtraQuery&&t.extraQuery&&(s="("+s+")"+t.extraQuery);const i={categories:r,bbox:o,q:s,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(i.sortField=this.sortField.split(",").map((t=>y.toJSON(t.trim()))).join(","),i.sortOrder=this.sortOrder),{query:{...e,...i}}}};(0,s._)([(0,u.Cb)()],m.prototype,"categories",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"disableExtraQuery",void 0),(0,s._)([(0,u.Cb)({type:d.Z})],m.prototype,"extent",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"filter",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"num",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"query",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"sortField",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"sortOrder",null),(0,s._)([(0,u.Cb)()],m.prototype,"start",void 0),m=o=(0,s._)([(0,p.j)("esri.portal.PortalQueryParams")],m);const _=m},86082:(t,e,r)=>{r.r(e),r.d(e,{default:()=>c});var o=r(43697),s=r(20102),i=r(96674),l=r(5600),n=(r(67676),r(80442),r(75215),r(52011));let a=class extends i.wq{constructor(t){super(t),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,o._)([(0,l.Cb)({type:Date})],a.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"id",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"title",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],a.prototype,"url",null),(0,o._)([(0,l.Cb)()],a.prototype,"username",void 0),a=(0,o._)([(0,n.j)("esri.portal.PortalFolder")],a);const u=a;var p,d=r(68916);let h=p=class extends i.wq{constructor(...t){super(...t),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userType=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e?this.portal._normalizeUrl(`${t}/info/${e}?f=json`):null}get userContentUrl(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}`:null}get url(){const t=this.get("portal.restUrl");return t?`${t}/community/users/${this.username}`:null}addItem(t){const e=t&&t.item,r=t&&t.data,o=t&&t.folder,s={method:"post"};e&&(s.query=e.createPostQuery(),null!=r&&("string"==typeof r?s.query.text=r:"object"==typeof r&&(s.query.text=JSON.stringify(r))));let i=this.userContentUrl;return o&&(i+="/"+("string"==typeof o?o:o.id)),this.portal._request(i+"/addItem",s).then((t=>(e.id=t.id,e.portal=this.portal,e.loaded?e.reload():e.load())))}deleteItem(t){let e=this.userContentUrl;return t.ownerFolder&&(e+="/"+t.ownerFolder),this.portal._request(e+`/items/${t.id}/delete`,{method:"post"}).then((()=>{t.id=null,t.portal=null}))}deleteItems(t){const e=this.userContentUrl+"/deleteItems",r=t.map((t=>t.id));if(r.length){const o={method:"post",query:{items:r.join(",")}};return this.portal._request(e,o).then((()=>{t.forEach((t=>{t.id=null,t.portal=null}))}))}return Promise.resolve(void 0)}fetchFolders(){return this.portal._request(this.userContentUrl,{query:{num:1}}).then((t=>{let e;return e=t&&t.folders?t.folders.map((t=>{const e=u.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchGroups(){return this.portal._request(this.url).then((t=>{let e;return e=t&&t.groups?t.groups.map((t=>{const e=d.default.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchItems(t){t||(t={});let e,o=this.userContentUrl;return t.folder&&(o+="/"+t.folder.id),r.e(5235).then(r.bind(r,15235)).then((({default:r})=>{e=r;const s={folders:!1,num:t.num||10,start:t.start||1,sortField:t.sortField||"created",sortOrder:t.sortOrder||"asc"};return this.portal._request(o,{query:s})})).then((t=>{let r;return t&&t.items?(r=t.items.map((t=>{const r=e.fromJSON(t);return r.portal=this.portal,r})),Promise.all(r.map((t=>t.load()))).catch((t=>t)).then((()=>({items:r,nextStart:t.nextStart,total:t.total})))):{items:[],nextStart:-1,total:0}}))}fetchTags(){return this.portal._request(this.url+"/tags").then((t=>t.tags))}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}queryFavorites(t){return this.favGroupId?(this._favGroup||(this._favGroup=new d.default({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(t)):Promise.reject(new s.Z("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new p;return e.sourceJSON=t,e.read(t),e}};(0,o._)([(0,l.Cb)()],h.prototype,"access",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"culture",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"description",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"email",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"favGroupId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"fullName",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"modified",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"orgId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"preferredView",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"privileges",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"region",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"role",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"roleId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"sourceJSON",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"thumbnail",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"thumbnailUrl",null),(0,o._)([(0,l.Cb)()],h.prototype,"units",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"userContentUrl",null),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"url",null),(0,o._)([(0,l.Cb)()],h.prototype,"username",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"userType",void 0),h=p=(0,o._)([(0,n.j)("esri.portal.PortalUser")],h);const c=h},27391:(t,e,r)=>{r.d(e,{wm:()=>v,n2:()=>d,KV:()=>h,EJ:()=>y,v9:()=>c});var o=r(3172),s=r(20102),i=r(95330),l=r(17452),n=r(65587),a=r(41253),u=r(80442);const p={};function d(t,e,r){return t.styleUrl?async function(t,e){try{return{data:(await y(t,e)).data,baseUrl:(0,l.Yd)(t),styleUrl:t}}catch(t){return(0,i.r9)(t),null}}(t.styleUrl,r):t.styleName?function(t,e,r){const o=e&&e.portal||n.Z.getDefault();let i;const l=`${o.url} - ${o.user&&o.user.username} - ${t}`;return p[l]||(p[l]=function(t,e,r){return e.load(r).then((()=>{const o=new a.Z({disableExtraQuery:!0,query:`owner:${m} AND type:${_} AND typekeywords:"${t}"`});return e.queryItems(o,r)})).then((({results:e})=>{let o=null;const i=t.toLowerCase();if(e&&Array.isArray(e))for(const t of e)if(t.typeKeywords.some((t=>t.toLowerCase()===i))&&t.type===_&&t.owner===m){o=t;break}if(!o)throw new s.Z("symbolstyleutils:style-not-found",`The style '${t}' could not be found`,{styleName:t});return o.load(r)}))}(t,o,r).then((t=>(i=t,t.fetchData()))).then((e=>({data:e,baseUrl:i.itemUrl,styleName:t})))),p[l]}(t.styleName,e,r):Promise.reject(new s.Z("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function h(t){return null===t||"CIMSymbolReference"===t.type?t:{type:"CIMSymbolReference",symbol:t}}function c(t,e){if("cimRef"===e)return t.cimRef;if(t.formatInfos&&!(0,u.Z)("enable-feature:force-wosr"))for(const e of t.formatInfos)if("gltf"===e.type)return e.href;return t.webRef}function y(t,e){const r={responseType:"json",query:{f:"json"},...e};return(0,o.default)((0,l.Fv)(t),r)}const m="esri_en",_="Style",v="https://cdn.arcgis.com/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f=json"}}]);