@arcgis/core 5.0.0-next.8 → 5.0.0-next.9

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 (123) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/02e7359162cf974b41b6.js +1 -0
  3. package/assets/esri/core/workers/chunks/0f735b0dec173142f3b6.js +2 -0
  4. package/assets/esri/core/workers/chunks/{a8f998b8ec8c56150479.js.LICENSE.txt → 0f735b0dec173142f3b6.js.LICENSE.txt} +1 -1
  5. package/assets/esri/core/workers/chunks/{b708792c84620b73c847.js → 21293b0c6405a10ec7b6.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{a876d6159ca120c1567e.js → 28d1f2cf6aae547615c3.js} +1 -1
  7. package/assets/esri/core/workers/chunks/292daac70bb828e4923f.js +1 -0
  8. package/assets/esri/core/workers/chunks/31b6406960261da21dd4.js +1 -0
  9. package/assets/esri/core/workers/chunks/31dbe07047dc61303d7d.js +1 -0
  10. package/assets/esri/core/workers/chunks/{59d3cac32ad6dad941dc.js → 35c9b24e4430bd6c2b6b.js} +1 -1
  11. package/assets/esri/core/workers/chunks/3a457e718a901a45902e.js.LICENSE.txt +1 -1
  12. package/assets/esri/core/workers/chunks/4fb5f1c671892001a4fd.js +1 -0
  13. package/assets/esri/core/workers/chunks/{d88f2fe680b8d5603ef8.js → 5350d50b47b6a4e0e169.js} +1 -1
  14. package/assets/esri/core/workers/chunks/58e59ead33368ce38c8f.js +1 -0
  15. package/assets/esri/core/workers/chunks/{aff8e40a641c6822af1d.js → 5db37547963857295273.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{3afb83f5de033dda89ec.js → 604777417722d4effe06.js} +1 -1
  17. package/assets/esri/core/workers/chunks/67f03d042455cd0f7009.js +1 -0
  18. package/assets/esri/core/workers/chunks/7565b382f6b3d2cb46a3.js +2 -0
  19. package/assets/esri/core/workers/chunks/{b96eb0ea506379182d62.js.LICENSE.txt → 7565b382f6b3d2cb46a3.js.LICENSE.txt} +1 -1
  20. package/assets/esri/core/workers/chunks/7d641f2f5edd95b9bc18.js +1 -0
  21. package/assets/esri/core/workers/chunks/812f2ccc01f44e3cfd41.js +1 -0
  22. package/assets/esri/core/workers/chunks/826fa0dfb63df77bfd95.js +1 -0
  23. package/assets/esri/core/workers/chunks/87921f3fa9001f5801ed.js +1 -0
  24. package/assets/esri/core/workers/chunks/{2a8dff8521e1e6a10cf6.js → 89b748e064ca90b4f76a.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{fef45bc59c71f88c60b5.js → 8d9d3797c6d62fdfff9d.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{e5a06ce0ef6a9a90e100.js → 9f21436016ff7a899e79.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js → 9ff8ee6ed6b98c03ae7e.js} +2 -2
  28. package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js.LICENSE.txt → 9ff8ee6ed6b98c03ae7e.js.LICENSE.txt} +1 -1
  29. package/assets/esri/core/workers/chunks/aa78b69219d9a0ef1c54.js.LICENSE.txt +1 -1
  30. package/assets/esri/core/workers/chunks/b05208d56a724a8f1661.js +1 -0
  31. package/assets/esri/core/workers/chunks/{b0365cbc3d2a41969e3b.js → b7eb486354994dc70855.js} +1 -1
  32. package/assets/esri/core/workers/chunks/bc19a232076d98825eef.js +1 -0
  33. package/assets/esri/core/workers/chunks/c715fd32f814a0f14f40.js +1 -0
  34. package/assets/esri/core/workers/chunks/ce16489cf7eb0d78c741.js.LICENSE.txt +1 -1
  35. package/assets/esri/core/workers/chunks/cf971e7b1b98d9c502d3.js +1 -0
  36. package/assets/esri/core/workers/chunks/{20975513be0a3a1da286.js → d1ca7c3a32ce00ed8b81.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{b017bac40dc8328013e3.js → d391bfbaf0e790cd10d6.js} +2 -2
  38. package/assets/esri/core/workers/chunks/{b017bac40dc8328013e3.js.LICENSE.txt → d391bfbaf0e790cd10d6.js.LICENSE.txt} +1 -1
  39. package/assets/esri/core/workers/chunks/d6e0528eacee7ea4c1ce.js.LICENSE.txt +1 -1
  40. package/assets/esri/core/workers/chunks/db678a6e352275e507a9.js +1 -0
  41. package/assets/esri/core/workers/chunks/de2ebd9cc3d9e68d435b.js +1 -0
  42. package/assets/esri/core/workers/chunks/e599125e746c27de106e.js +1 -0
  43. package/assets/esri/core/workers/chunks/{05429f9d292a7a714309.js → ebcc94234d9d4be1941f.js} +1 -1
  44. package/assets/esri/core/workers/chunks/ee5f0fd5384caa11c986.js +1 -0
  45. package/assets/esri/core/workers/chunks/f651c05604eab83aef5f.js.LICENSE.txt +1 -1
  46. package/assets/esri/core/workers/chunks/f80f5dbf96c343ac4df6.js +1 -0
  47. package/assets/esri/core/workers/chunks/fccd931f95d81ecc57b2.js +1 -0
  48. package/assets/esri/themes/base/widgets/_NavigationToggle.scss +1 -1
  49. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -4
  50. package/assets/esri/themes/base/widgets/_Widget.scss +1 -1
  51. package/assets/esri/themes/dark/main.css +1 -1
  52. package/assets/esri/themes/light/main.css +1 -1
  53. package/assets/esri/themes/light/view.css +1 -1
  54. package/config.js +1 -1
  55. package/form/FormTemplate.js +1 -1
  56. package/form/elements/Element.js +1 -1
  57. package/form/elements/FieldElement.js +1 -1
  58. package/form/elements/GroupElement.js +1 -1
  59. package/interfaces.d.ts +25 -23
  60. package/kernel.js +1 -1
  61. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  62. package/layers/knowledgeGraph/layerUtils.js +1 -1
  63. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  64. package/layers/support/RasterJobHandler.js +1 -1
  65. package/layers/support/RasterWorker.js +1 -1
  66. package/layers/support/rasterDatasets/pixelReader.js +1 -1
  67. package/layers/support/rasterFunctions/pixelTransformUtils.js +5 -0
  68. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  69. package/package.json +2 -2
  70. package/smartMapping/renderers/size.js +1 -1
  71. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  72. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  73. package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
  74. package/smartMapping/support/adapters/support/utils.js +1 -1
  75. package/support/revision.js +1 -1
  76. package/symbols/support/utils.js +1 -1
  77. package/views/3d/GroundView3D.js +1 -1
  78. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  79. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  80. package/views/support/PromiseQueue.js +1 -1
  81. package/views/support/Scheduler.js +1 -1
  82. package/widgets/Editor/AddAssociationWorkflow.js +1 -1
  83. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  84. package/widgets/Editor/EditorViewModel.js +1 -1
  85. package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
  86. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  87. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  88. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  89. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  90. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  91. package/widgets/Editor/UpdateWorkflow.js +1 -1
  92. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  93. package/widgets/Editor/support/SketchController.js +1 -1
  94. package/widgets/Editor/support/errors.js +5 -0
  95. package/widgets/Editor/workflowUtils.js +1 -1
  96. package/widgets/Editor.js +1 -1
  97. package/widgets/Legend/LegendViewModel.js +1 -1
  98. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  99. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  100. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  101. package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
  102. package/assets/esri/core/workers/chunks/06ba43843e9c4988049b.js +0 -1
  103. package/assets/esri/core/workers/chunks/1d15d1b20dc10fde6def.js +0 -1
  104. package/assets/esri/core/workers/chunks/28020063048e644f17a5.js +0 -1
  105. package/assets/esri/core/workers/chunks/36d067c8d03d7a894f5f.js +0 -1
  106. package/assets/esri/core/workers/chunks/38cc18fd93c18815ded0.js +0 -1
  107. package/assets/esri/core/workers/chunks/4eebd74ebc20579dade8.js +0 -1
  108. package/assets/esri/core/workers/chunks/5f402b3c00bc4afc77b2.js +0 -1
  109. package/assets/esri/core/workers/chunks/63a6f3e70d2b6ea57e40.js +0 -1
  110. package/assets/esri/core/workers/chunks/695cdef5057e5461078a.js +0 -1
  111. package/assets/esri/core/workers/chunks/6bb7dbc46787b8e34bd9.js +0 -1
  112. package/assets/esri/core/workers/chunks/6ee2f0f708494102a493.js +0 -1
  113. package/assets/esri/core/workers/chunks/78694ad8229347903f41.js +0 -1
  114. package/assets/esri/core/workers/chunks/90cbd627d4113db3b686.js +0 -1
  115. package/assets/esri/core/workers/chunks/a31635a6366347dcef0f.js +0 -1
  116. package/assets/esri/core/workers/chunks/a8f998b8ec8c56150479.js +0 -2
  117. package/assets/esri/core/workers/chunks/afc13d5b842275db7dbc.js +0 -1
  118. package/assets/esri/core/workers/chunks/b548910e820d731ffe8a.js +0 -1
  119. package/assets/esri/core/workers/chunks/b96eb0ea506379182d62.js +0 -2
  120. package/assets/esri/core/workers/chunks/c476643002387f60ea42.js +0 -1
  121. package/assets/esri/core/workers/chunks/ce98416437cc1a89d8ea.js +0 -1
  122. package/assets/esri/core/workers/chunks/e0bbfbe1ed39c82f1bd4.js +0 -1
  123. package/assets/esri/core/workers/chunks/ebf23b46db56aaa88841.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1874,7694,9644,9645],{159:(e,t,n)=>{n.d(t,{A:()=>u});var r,i=n(31635),o=n(69622),s=n(10107),l=(n(44208),n(53966),n(87811),n(64108)),a=n(99157);let u=r=class extends o.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new r;for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}};(0,i.Cg)([(0,s.MZ)({type:[a.A],nonNullable:!0})],u.prototype,"steps",void 0),u=r=(0,i.Cg)([(0,l.$)("esri.geometry.operators.support.GeographicTransformation")],u)},4197:(e,t,n)=>{n.d(t,{Vj:()=>u,cj:()=>a,jh:()=>o,l5:()=>l,xm:()=>s});var r=n(34275),i=n(9093);function o(e){return e<=r.y9?new Array(e).fill(0):new Float64Array(e)}function s(e){return((0,r.iu)(e)?e.byteLength/8:e.length)<=r.y9?Array.from(e):new Float64Array(e)}function l(e,t,n){return Array.isArray(e)?e.slice(t,t+n):e.subarray(t,t+n)}function a(e){return[...e]}function u(e){const t=(0,i.vt)();for(let n=0;n<16;++n)t[n]=e[n];return t}},6797:(e,t,n)=>{n.d(t,{Ui:()=>d});var r=n(69622),i=n(7762),o=n(88620);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof r.A}function a(e){return e instanceof i.A?Object.keys(e.items):l(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof i.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function p(e,t){const n=e.diff;if(n&&"function"==typeof n)return n(e,t);const r=a(e),i=a(t);if(0===r.length&&0===i.length)return;if(!r.length||!i.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=i.filter(e=>!r.includes(e)),d=r.filter(e=>!i.includes(e)),f=r.filter(n=>i.includes(n)&&u(e,n)!==u(t,n)).concat(o,d).sort(),h=c(e);if(h&&s.has(h)&&f.length)return{type:"complete",oldValue:e,newValue:t};let y;const m=l(e)&&l(t);for(const r of f){const i=u(e,r),o=u(t,r);let s;if((m||"function"!=typeof i&&"function"!=typeof o)&&i!==o&&(null!=i||null!=o)){if(n&&n[r]&&"function"==typeof n[r])s=n[r]?.(i,o);else if(i instanceof Date&&o instanceof Date){if(i.getTime()===o.getTime())continue;s={type:"complete",oldValue:i,newValue:o}}else s="object"==typeof i&&"object"==typeof o&&c(i)===c(o)?p(i,o):{type:"complete",oldValue:i,newValue:o};null!=s&&(null!=y?y.diff[r]=s:y={type:"partial",diff:{[r]:s}})}}return y}function d(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},9093:(e,t,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}n.d(t,{o8:()=>i,vt:()=>r,zK:()=>o});const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:i,create:r,fromValues:function(e,t,n,r,i,o,s,l,a,u,c,p,d,f,h,y){return[e,t,n,r,i,o,s,l,a,u,c,p,d,f,h,y]}},Symbol.toStringTag,{value:"Module"}))},9762:(e,t,n)=>{n.r(t),n.d(t,{projectBuffer:()=>i});var r=n(37539);function i(e,t,n,i,o,s,l=Math.floor(e.length/3)){const a=(0,r.jd)(t,o);if(null==a)return!1;if(a===r.pO){if(e===i&&n===s)return!0;const t=n+3*l;for(let r=n,o=s;r<t;r++,o++)i[o]=e[r];return!0}const u=n+3*l;for(let t=n,r=s;t<u;t+=3,r+=3)a(e,t,i,r);return!0}},13069:(e,t,n)=>{n.d(t,{AG:()=>l,lk:()=>i,vD:()=>s,yS:()=>o});const r="randomUUID"in crypto;function i(){if(r)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}function l(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},16494:(e,t,n)=>{n.d(t,{Nd:()=>l,W5:()=>s});var r=n(37330);const i=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),o=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],s=new r.I({whiteList:i,onTagAttr:(e,t,n)=>{const r=`${t}="${n}"`;if(o.includes(t))return r},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),l=new r.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},17311:(e,t,n)=>{n.d(t,{A:()=>h});var r=n(31635),i=n(69622),o=n(4576),s=n(60999),l=n(7762),a=n(16494),u=n(10107),c=(n(44208),n(53966),n(64108)),p=n(30524),d=n(43668);const f=/<br\s*\/*>/gi;let h=class extends i.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,s.UT)(()=>(0,d.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??n.e(9926).then(n.bind(n,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new l.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const n=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(n.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:n,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(n,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const n=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of n){const n=t.split("."),r=this.fieldsIndex.get(n.at(-1)??"");r&&e.add(r.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const n of t){const t=this.fieldsIndex.get(n);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,n){const r=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],n)).get(r)??""}async getTitles(e,t,n){const r=new Map,i=n?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:o}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);n?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:s,workingTitle:l}=this,u=l&&s;t.forEach(t=>{const c=t.getObjectId()??t.attributes[e.objectIdField];let p=u?o({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:s,globalAttributes:this._createFormattedAttributes(e,t,i).global,layer:e,text:l}):"";n?.removeHTML&&(p=a.Nd.sanitize(p).replaceAll(f," ")),r.set(c,p)})}catch{}return r}async _checkAndReQueryGraphics(e,t){const n=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(o.Ru);if(n.length!==t.length)return t;if(t.some(e=>!(0,p.Kl)(e,this.requiredFields))){const r=e.createQuery();r.where="1=1",r.outFields=[...this.requiredFields],r.objectIds=n;const i=await e.queryFeatures(r);if(i?.features.length===t.length)return i.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const n of e){if(!n.fieldName)continue;const e=this.fieldsIndex.get(n.fieldName),r=e?.name??n.fieldName;n.fieldName=r,t.set(r.toLowerCase(),n)}return t}_createFormattedAttributes(e,t,n="system"){const r=this.effectivePopupTemplate?.fieldInfos??[],i={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const n=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{i[`expression/${e.name}`]=e.func({vars:{$feature:n}})}catch{}}const o={...t.attributes,...i};return{global:this._featureUtils.formatAttributes({fieldInfos:r,attributes:o,graphic:t,timeZone:n,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,p.nw)(e).filter(e=>!(e.startsWith("relationships/")||e.startsWith("expression/")))}};(0,r.Cg)([(0,u.MZ)({readOnly:!0})],h.prototype,"_arcadeTask",null),(0,r.Cg)([(0,u.MZ)()],h.prototype,"_featureUtils",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],h.prototype,"featureUtilsPromise",null),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],h.prototype,"calculatedExpressions",null),(0,r.Cg)([(0,u.MZ)()],h.prototype,"displayField",void 0),(0,r.Cg)([(0,u.MZ)()],h.prototype,"effectivePopupTemplate",void 0),(0,r.Cg)([(0,u.MZ)()],h.prototype,"expressionsUsedInTitle",null),(0,r.Cg)([(0,u.MZ)()],h.prototype,"fieldsIndex",void 0),(0,r.Cg)([(0,u.MZ)()],h.prototype,"fieldInfoMap",null),(0,r.Cg)([(0,u.MZ)()],h.prototype,"fields",void 0),(0,r.Cg)([(0,u.MZ)()],h.prototype,"objectIdField",void 0),(0,r.Cg)([(0,u.MZ)()],h.prototype,"requiredFields",null),h=(0,r.Cg)([(0,c.$)("esri.layers.support.TitleCreator")],h)},29005:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(31635),i=n(69540),o=n(66552),s=n(25482),l=n(10107),a=(n(44208),n(53966),n(87811),n(64108));const u=new o.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let c=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,r.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,r.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"description",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],c.prototype,"drawingTool",void 0),(0,r.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"prototype",void 0),(0,r.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"thumbnail",void 0),c=(0,r.Cg)([(0,a.$)("esri.layers.support.FeatureTemplate")],c)},32730:(e,t,n)=>{n.d(t,{BI:()=>m,D3:()=>h,XJ:()=>y,lc:()=>f,mX:()=>b,rU:()=>g,tH:()=>I});var r=n(799);const i="__begin__",o="__end__",s=new RegExp(i,"ig"),l=new RegExp(o,"ig"),a=new RegExp("^"+i,"i"),u=new RegExp(o+"$","i"),c='"',p=c+" + ",d=" + "+c;function f(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function y(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=f(e.labelExpression),t.type="conventional"),t}function m(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return b(t.expression);case"arcade":return t.expression}return null}function g(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return I(t.expression)}return null}function b(e){let t;return e?(t=(0,r.HC)(e,e=>i+'$feature["'+e+'"]'+o),t=a.test(t)?t.replace(a,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(s,p).replaceAll(l,d)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,M=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,F=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function I(e){if(!e)return null;let t=M.exec(e)||v.exec(e);return t?t[1]||t[3]:(t=F.exec(e),t?t[2]:null)}},37352:(e,t,n)=>{n.d(t,{A:()=>u});var r,i=n(31635),o=n(7762),s=n(25482),l=n(10107),a=(n(44208),n(53966),n(87811),n(64108));let u=r=class extends s.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.A}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,i.Cg)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],u.prototype,"floorField",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=r=(0,i.Cg)([(0,a.$)("esri.layers.support.LayerFloorInfo")],u)},37531:(e,t,n)=>{n.d(t,{dt:()=>d,GG:()=>g,UQ:()=>m,Sx:()=>c});var r=n(68197),i=n(60999),o=(n(44208),n(51850)),s=(n(76369),n(62046)),l=(n(2741),n(43773),n(66344));new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new l.q(1e3),new r.A([128,128,128]);var a=n(28975),u=n(33910);function c(e,t){if(!e)return null;let n=null;return(0,u.wk)(e)?n=function(e){const t=e.symbolLayers;if(!t)return null;let n=null;return t.forEach(e=>{"object"===e.type&&e.resource?.href||(n="water"===e.type?e.color:e.material?e.material.color:null)}),n?new r.A(n):null}(e):(0,u.$y)(e)&&(n="cim"===e.type?(0,s.Nk)(e):e.color?new r.A(e.color):null),n?p(n,t):null}function p(e,t){if(null==t||null==e)return e;const n=e.toRgba();return n[3]=n[3]*t,new r.A(n)}function d(e,t,n){e&&(t||null!=n)&&(t&&(t=new r.A(t)),(0,u.wk)(e)?function(e,t,n){const i=e.symbolLayers;if(!i)return;const o=(e,i=!1)=>{let o=t??e??null;return null!=n?.override&&(!o&&i&&(o=new r.A([255,255,255])),o&&(o.a=n.override)),p(o,n?.add)};i.forEach(e=>{if("water"===e.type)return void(e.color=p(e.color,n?.add));const t=null!=e.material?e.material.color:null,r=o(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new a.N({color:r}):e.material.color=r,"outline"in e&&e.outline?.color&&null!=n?.add&&(e.outline.color=p(e.outline.color,n.add)),"marker"in e&&null!=e.marker&&(e.marker.color=o(e.marker.color))})}(e,t,n):(0,u.$y)(e)&&function(e,t,n){t=t??e.color,null!=n?.override&&t&&(t.a=n.override),t&&(e.color=p(t,n?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=p(e.outline.color,n?.add))}(e,t,n))}function f(e){for(const t of e)if("number"==typeof t)return t;return null}function h(e,t,n){for(let r=0;r<3;r++){const i=e[r];switch(i){case"symbol-value":{const e=n[r];return null!=e?e/t[r]:1}case"proportional":break;default:if(i&&t[r])return i/t[r]}}return null}function y(e,t,n,r){switch(e){case"proportional":return n*r;case"symbol-value":return null!=t?t:n;default:return e}}async function m(e,t){if(e&&t)return(0,u.wk)(e)?async function(e,t){const r=e.symbolLayers;r&&await(0,i.jJ)(r,async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){const n=t[2];"number"==typeof n&&(e.size=n)}(e,t);break;case"icon":case"line":case"text":!function(e,t){const n=f(t);null!=n&&(e.size=n)}(e,t);break;case"path":!function(e,t){const n=h(t,o.Un,[e.width,void 0,e.height]);null!=n&&(e.width=y(t[0],e.width,1,n),e.height=y(t[2],e.height,1,n))}(e,t);break;case"object":await async function(e,t){const{resourceSize:r,symbolSize:i}=await async function(e){const{computeObjectLayerResourceSize:t}=await n.e(5404).then(n.bind(n,95404)),r=await t(e,10),{width:i,height:o,depth:s}=e,l=[i,s,o];let a=1;for(let e=0;e<3;e++){const t=l[e];if(null!=t){a=t/r[e];break}}for(let e=0;e<3;e++)null==l[e]&&(l[e]=r[e]*a);return{resourceSize:r,symbolSize:l}}(e),o=h(t,r,i);null!=o&&(e.width=y(t[0],i[0],r[0],o),e.depth=y(t[1],i[1],r[1],o),e.height=y(t[2],i[2],r[2],o))}(e,t)}}(e,t))}(e,t):void((0,u.$y)(e)&&function(e,t){const n=f(t);if(null!=n)switch(e.type){case"simple-marker":e.size=n;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=n,e.height=n*t):(e.width=n*t,e.height=n);break}case"simple-line":e.width=n;break;case"text":e.font.size=n}}(e,t))}function g(e,t,n){if(e&&null!=t)if((0,u.wk)(e)){const r=e.symbolLayers;r&&r.forEach(e=>{if("object"===e.type)switch(n){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)})}else if((0,u.$y)(e))switch(e.type){case"simple-marker":case"picture-marker":case"text":e.angle+=t;break;case"cim":(0,s.KU)(e,t,!0)}}},37539:(e,t,n)=>{n.d(t,{pO:()=>y,jd:()=>d,Tp:()=>f,w5:()=>p});var r=n(34727),i=n(83047),o=n(73941),s=n(79258);Math.PI;const l=s.$O.radius,a=s.$O.eccentricitySquared,u={a1:l*a,a2:l*a*l*a,a3:l*a*a/2,a4:l*a*l*a*2.5,a5:l*a+l*a*a/2,a6:1-a};s.$O.radius,s.$O.flattening,s.Sw.radius,s.Sw.flattening,s.sH.radius,s.sH.flattening,s.sH.radius;var c=n(21325);const p={2:{5:y,7:null,9:null,10:y,1:I,6:null,8:null,0:null,3:g,11:b,2:y,4:S},5:{5:y,7:null,9:null,10:y,1:I,6:null,8:null,0:null,3:g,11:b,2:y,4:S},7:{5:null,7:y,9:null,10:y,1:null,6:F,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:y,10:y,1:null,6:null,8:v,0:null,3:null,11:null,2:null,4:null},3:{5:m,7:null,9:null,10:m,1:function(e,t,n,r){const i=e[t]/R,o=k-2*Math.atan(Math.exp(-e[t+1]/R)),s=R+e[t+2],l=Math.cos(o)*s;n[r]=Math.cos(i)*l,n[r+1]=Math.sin(i)*l,n[r+2]=Math.sin(o)*s},6:null,8:null,0:null,3:y,11:function(e,t,n,r){m(e,t,n,r),b(n,r,n,r)},2:m,4:function(e,t,n,r){m(e,t,n,r),S(n,r,n,r)}},4:{5:j,7:null,9:null,10:j,1:function(e,t,n,r){j(e,t,n,r),I(n,r,n,r)},6:null,8:null,0:null,3:function(e,t,n,r){j(e,t,n,r),g(n,r,n,r)},11:function(e,t,n,r){j(e,t,n,r),b(n,r,n,r)},2:j,4:y},1:{5:A,7:null,9:null,10:A,1:y,6:null,8:null,0:null,3:function(e,t,n,r){A(e,t,n,r),g(n,r,n,r)},11:function(e,t,n,r){A(e,t,n,r),b(n,r,n,r)},2:A,4:function(e,t,n,r){A(e,t,n,r),S(n,r,n,r)}},6:{5:null,7:x,9:null,10:x,1:null,6:y,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:T,10:T,1:null,6:null,8:y,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:y,3:null,11:null,2:null,4:null},10:{5:y,7:y,9:y,10:y,1:I,6:F,8:v,0:null,3:g,11:b,2:y,4:S},11:{5:w,7:null,9:null,10:w,1:function(e,t,n,r){w(e,t,n,r),I(n,r,n,r)},6:null,8:null,0:null,3:function(e,t,n,r){w(e,t,n,r),g(n,r,n,r)},11:y,2:w,4:function(e,t,n,r){w(e,t,n,r),S(n,r,n,r)}}};function d(e,t){return f(e,t)?.projector}function f(e,t){if(null==e||null==t)return null;if(_.source.spatialReference===e&&_.dest.spatialReference===t)return _;const n=h(e,_.source),r=h(t,_.dest);return 0===n&&0===r?(0,c.aI)(e,t)?_.projector=y:_.projector=null:_.projector=p[n][r],_}function h(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,i.GA)(e,1)),(0,o.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===o.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===o.FY.wkt?t.spatialReferenceId=6:e.wkt===o.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function y(e,t,n,r){e!==n&&(n[r++]=e[t++],n[r++]=e[t++],n[r]=e[t])}function m(e,t,n,r){n[r]=O*(e[t]/R),n[r+1]=O*(k-2*Math.atan(Math.exp(-e[t+1]/R))),n[r+2]=e[t+2]}function g(e,t,n,i){!function(e,t,n,i,o){const s=.4999999*Math.PI,l=(0,r.qE)(Z*e[t+1],-s,s),a=Math.sin(l);n[i++]=Z*e[t]*o.radius,n[i++]=o.halfSemiMajorAxis*Math.log((1+a)/(1-a)),n[i]=e[t+2]}(e,t,n,i,s.$O)}function b(e,t,n,r){n[r]=e[t]*E,n[r+1]=e[t+1]*E,n[r+2]=e[t+2]}function w(e,t,n,r){n[r]=e[t]*P,n[r+1]=e[t+1]*P,n[r+2]=e[t+2]}function M(e,t,n,r,i){const o=i+e[t+2],s=Z*e[t+1],l=Z*e[t],a=Math.cos(s)*o;n[r]=Math.cos(l)*a,n[r+1]=Math.sin(l)*a,n[r+2]=Math.sin(s)*o}function v(e,t,n,r){M(e,t,n,r,s.Sw.radius)}function F(e,t,n,r){M(e,t,n,r,s.sH.radius)}function I(e,t,n,r){M(e,t,n,r,s.$O.radius)}function C(e,t,n,i,o){const s=e[t],l=e[t+1],a=e[t+2],u=Math.sqrt(s*s+l*l+a*a),c=(0,r.YN)(a/(0===u?1:u)),p=Math.atan2(l,s);n[i++]=O*p,n[i++]=O*c,n[i]=u-o}function T(e,t,n,r){C(e,t,n,r,s.Sw.radius)}function x(e,t,n,r){C(e,t,n,r,s.sH.radius)}function A(e,t,n,r){C(e,t,n,r,s.$O.radius)}function S(e,t,n,r){!function(e,t,n,r,i){const o=Z*e[t],s=Z*e[t+1],l=e[t+2],a=Math.sin(s),u=Math.cos(s),c=i.radius/Math.sqrt(1-i.eccentricitySquared*a*a);n[r++]=(c+l)*u*Math.cos(o),n[r++]=(c+l)*u*Math.sin(o),n[r++]=(c*(1-i.eccentricitySquared)+l)*a}(e,t,n,r,s.$O)}function j(e,t,n,r){const i=u,o=e[t],l=e[t+1],a=e[t+2];let c,p,d,f,h,y,m,g,b,w,M,v,F,I,C,T,x,A,S,j,_;c=Math.abs(a),p=o*o+l*l,d=Math.sqrt(p),f=p+a*a,h=Math.sqrt(f),j=Math.atan2(l,o),y=a*a/f,m=p/f,I=i.a2/h,C=i.a3-i.a4/h,m>.3?(g=c/h*(1+m*(i.a1+I+y*C)/h),S=Math.asin(g),w=g*g,b=Math.sqrt(1-w)):(b=d/h*(1-y*(i.a5-I-m*C)/h),S=Math.acos(b),w=1-b*b,g=Math.sqrt(w)),M=1-s.$O.eccentricitySquared*w,v=s.$O.radius/Math.sqrt(M),F=i.a6*v,I=d-v*b,C=c-F*g,x=b*I+g*C,T=b*C-g*I,A=T/(F/M+x),S+=A,_=x+T*A/2,a<0&&(S=-S),n[r++]=O*j,n[r++]=O*S,n[r]=_}const _={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:y},Z=(0,r.kU)(1),O=(0,r.KJ)(1),k=.5*Math.PI,R=s.$O.radius,E=R*Math.PI/180,P=180/(R*Math.PI)},41366:(e,t,n)=>{n.d(t,{K:()=>d,Q:()=>u});var r=n(31635),i=n(66552),o=n(53966),s=n(10107),l=(n(44208),n(87811),n(93223)),a=n(64108);const u=(0,i.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",p="field",d=e=>{const t=e;let n=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,n=null!=this.normalizationTotal;return t||n?(e=t&&p||n&&c||null,t&&n&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==p&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,r.Cg)([(0,s.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],n.prototype,"normalizationField",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],n.prototype,"normalizationMaxValue",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],n.prototype,"normalizationMinValue",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],n.prototype,"normalizationTotal",void 0),(0,r.Cg)([(0,l.e)(u,{name:"parameters.normalizationType"})],n.prototype,"normalizationType",null),n=(0,r.Cg)([(0,a.$)("esri.rest.support.NormalizationBinParametersMixin")],n),n}},41560:(e,t,n)=>{n.d(t,{Ch:()=>s,mW:()=>o});var r=n(34727),i=n(39516);function o(e,t){return{...t,filterMode:e.mode}}function s(e,t,n){const o=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:n,maxScale:r}of e.filters)t[0]=Math.max(t[0],c(n)),t[1]=Math.min(t[1],p(r));return t}(e);if(o&&((0,r.gg)(t,o[0])||(0,r.ZH)(n,o[1])))return"";const s=Array.from(l(e,t,n)),a=function(e,t,n){if(0===e.length)return!0;const i=c(e.at(0)?.minScale),o=p(e.at(-1)?.maxScale);if((0,r.ZH)(i,t)||(0,r.gg)(o,n))return!0;for(let t=0;t<e.length-1;t++){const n=e[t],i=e[t+1];if((0,r.ZH)(c(i.minScale),p(n.maxScale)))return!0}return!1}(s,t,n)?"1=1":s.map(e=>e.where||"1=1").reduce((e,t)=>(0,i.IW)(e,t),"");return a&&"1=1"!==a?a:""}function*l(e,t,n){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const r of e.filters)a(r.minScale,r.maxScale,t,n)&&(yield r)}}function a(e,t,n,i){return e=c(e),n=c(n),t=p(t),!(!(0,r.Sp)(n,e)&&(i??n)>e||(0,r.Hx)(t,n)||void 0!==i&&(0,r.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function p(e){return e||0}},45067:(e,t,n)=>{n.d(t,{A:()=>p});var r=n(31635),i=n(69540),o=n(66552),s=n(25482),l=n(10107),a=(n(44208),n(53966),n(87811),n(64108));const u=new o.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),c=new o.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let p=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,r.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"cardinality",void 0),(0,r.Cg)([(0,l.MZ)({json:{name:"catalogID"}})],p.prototype,"catalogId",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"composite",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"id",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyField",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyFieldInRelationshipTable",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"name",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"relatedTableId",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"relationshipTableId",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:c.read,write:c.write}})],p.prototype,"role",void 0),p=(0,r.Cg)([(0,a.$)("esri.layers.support.Relationship")],p)},50498:(e,t,n)=>{n.d(t,{Ye:()=>p,gy:()=>c,yR:()=>d});var r=n(66552),i=n(5443),o=n(91075),s=n(48526),l=n(86738),a=n(39829),u=n(82799);const c=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),p=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:o.A,key:"type",typeMap:{extent:i.A,multipoint:s.A,point:l.A,polyline:u.A,polygon:a.A}}},52106:(e,t,n)=>{n.d(t,{A:()=>F});var r,i=n(31635),o=n(37838),s=n(69540),l=n(51447),a=n(25482),u=n(53966),c=n(36708),p=n(24326),d=n(10107),f=(n(44208),n(87811),n(64108)),h=n(12195),y=n(65864),m=n(50498),g=n(55156),b=n(60950),w=n(54339),M=n(33910);function v(e){if(null==e)return null;const t={};for(const n in e){const r=e[n];r&&(t[n]=r.toJSON())}return 0!==Object.keys(t).length?t:null}let F=class extends((0,s.OU)(a.o)){static{r=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,p.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new r({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,b.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const n=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[n,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const n=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",n,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,g.I)(this.origin);if(e)return(0,w.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,w.r)(this,t):null}getGlobalId(){const e=(0,g.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){return{aggregateGeometries:v(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,h.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const n={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",n,n,e.action)}}_notifyLayer(e,t,n,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:n};"origin-transform"===e&&(i.action=r),"attributes"===e&&(i.attributeName=r),this.layer.graphicChanged(i)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,i.Cg)([(0,d.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const n in e){const r=(0,y.rS)(e[n]);r&&(t[n]=r)}return 0!==Object.keys(t).length?t:null}}})],F.prototype,"aggregateGeometries",null),(0,i.Cg)([(0,d.MZ)({value:null})],F.prototype,"attributes",null),(0,i.Cg)([(0,d.MZ)({value:null,types:m.yR,json:{read:y.rS}})],F.prototype,"geometry",null),(0,i.Cg)([(0,d.MZ)({type:Boolean})],F.prototype,"isAggregate",void 0),(0,i.Cg)([(0,d.MZ)({clonable:!1})],F.prototype,"layer",void 0),(0,i.Cg)([(0,d.MZ)({clonable:"reference"})],F.prototype,"origin",void 0),(0,i.Cg)([(0,d.MZ)({type:o.A,value:null})],F.prototype,"popupTemplate",null),(0,i.Cg)([(0,d.MZ)({clonable:"reference"})],F.prototype,"sourceLayer",void 0),(0,i.Cg)([(0,d.MZ)({value:null,types:M.Es})],F.prototype,"symbol",null),(0,i.Cg)([(0,d.MZ)({clonable:!1,json:{read:!1,write:!1}})],F.prototype,"_version",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,value:!0})],F.prototype,"visible",null),F=r=(0,i.Cg)([(0,f.$)("esri.Graphic")],F)},52136:(e,t,n)=>{n.d(t,{p:()=>s});var r=n(31635),i=n(10107),o=(n(44208),n(53966),n(87811),n(64108));const s=e=>{const t=e;let n=class extends t{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,r.Cg)([(0,i.MZ)({type:String})],n.prototype,"apiKey",null),n=(0,r.Cg)([(0,o.$)("esri.layers.mixins.APIKeyMixin")],n),n}},54339:(e,t,n)=>{function r(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const n=[];for(const r of t.fieldNames)n.push(e.attributes[r]??null);return JSON.stringify(n)}}}function i(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const n=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(n)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}n.d(t,{W:()=>r,r:()=>i})},55156:(e,t,n)=>{n.d(t,{I:()=>i,e:()=>r});const r=Symbol("idFieldsProviderSymbol");function i(e){return(t=e)&&r in t?e[r]:void 0;var t}},62046:(e,t,n)=>{n.d(t,{Fe:()=>c,KU:()=>h,Nk:()=>o});var r=n(68197),i=n(93397);function o(e){const t=[];return s((0,i.lW)(e),t),t.length?new r.A((0,i.e6)(t[0])):null}function s(e,t){if(!e)return;let n;n="CIMTextSymbol"===e.type?e.symbol:e;const r="CIMPolygonSymbol"===e.type;if(n?.symbolLayers)for(const e of n.symbolLayers)if(!(e.colorLocked||r&&((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&l(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{s(e.symbol,t)});break;case"CIMSolidStroke":case"CIMSolidFill":l(t,e.color);break;case"CIMGradientFill":a(t,e);break;case"CIMHatchFill":s(e.lineSymbol,t)}}function l(e,t){for(const n of e)if(n.join(".")===t.join("."))return;e.push(t)}function a(e,t){const n=t.colorRamp?.type;switch(n){case"CIMMultipartColorRamp":t.colorRamp.colorRamps?.forEach(t=>{"CIMLinearContinuousColorRamp"===t.type&&u(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":u(e,t.colorRamp)}}function u(e,t){t&&(t.fromColor&&l(e,t.fromColor),t.toColor&&l(e,t.toColor))}function c(e,t,n){t instanceof r.A||(t=new r.A(t));const o=(0,i.lW)(e);o&&p(o,t,n)}function p(e,t,n){if(!e)return;let r;r="CIMTextSymbol"===e.type?e.symbol:e;const o="CIMPolygonSymbol"===r?.type;if(r?.symbolLayers)for(const e of r.symbolLayers){if(e.colorLocked)continue;if(o)if(n){const{layersToColor:t}=n;if(((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))&&"fill"===t||(0,i.jn)(e)&&"outline"===t)continue}else if((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))continue;const r=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=r;break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{p(e.symbol,t,n)});break;case"CIMSolidStroke":case"CIMSolidFill":e.color=r;break;case"CIMGradientFill":d(e,t);break;case"CIMHatchFill":p(e.lineSymbol,t,n)}}}function d(e,t){const n=e.colorRamp?.type;switch(n){case"CIMMultipartColorRamp":e.colorRamp.colorRamps?.forEach(e=>{"CIMLinearContinuousColorRamp"===e.type&&f(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":f(e.colorRamp,t)}}function f(e,t){if(e&&(e.fromColor&&(e.fromColor=t.toArray()),e.toColor)){const n=t.clone();n.a=0,e.toColor=n.toArray()}}function h(e,t,n=!1){const r=(0,i.lW)(e);if(n&&(t=360-t),"CIMTextSymbol"!==r?.type){if("CIMPointSymbol"===r?.type&&r.symbolLayers){const e=t-(r.angle||0);for(const t of r.symbolLayers)if((0,i.MM)(t)){let n=t.rotation||0;t.rotateClockwise?n-=e:n+=e,t.rotation=n}r.angle=t}}else r.angle=t}},62815:(e,t,n)=>{n.d(t,{N:()=>s});var r=n(83047),i=n(73941),o=n(21325);function s(e,t,n){if(null==t||null==n||n.vcsWkid||(0,o.aI)(t,n)||(0,i.xP)(t)||(0,i.xP)(n))return null;const s=(0,r.G9)(t)/(0,r.G9)(n);if(1===s)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,s);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}(e,s);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}(e,s);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,s);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,s);default:return null}}},70328:(e,t,n)=>{n.d(t,{BI:()=>w,DC:()=>p,Ej:()=>f,Ie:()=>g,Jt:()=>b,Ne:()=>h,RF:()=>c,aI:()=>v,fA:()=>s,gE:()=>a,hZ:()=>m,iT:()=>d,is:()=>M,qv:()=>F,vI:()=>y,vY:()=>l,v_:()=>I,vt:()=>o,w1:()=>u});var r=n(5443),i=(n(19419),n(4197));function o(e=I){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,n,r,i,s,l=o()){return l[0]=e,l[1]=t,l[2]=n,l[3]=r,l[4]=i,l[5]=s,l}function l(e,t=o()){return function(e,t,n,r=o()){return m(r,F),function(e,t,n=0,r=t.length/3){let i=e[0],o=e[1],s=e[2],l=e[3],a=e[4],u=e[5];for(let e=0;e<r;e++)i=Math.min(i,t[n+3*e]),o=Math.min(o,t[n+3*e+1]),s=Math.min(s,t[n+3*e+2]),l=Math.max(l,t[n+3*e]),a=Math.max(a,t[n+3*e+1]),u=Math.max(u,t[n+3*e+2]);e[0]=i,e[1]=o,e[2]=s,e[3]=l,e[4]=a,e[5]=u}(r,e,t,n),r}(e,0,e.length/3,t)}function a(e,t=(0,i.jh)(24)){const[n,r,o,s,l,a]=e;return t[0]=n,t[1]=r,t[2]=o,t[3]=n,t[4]=r,t[5]=a,t[6]=n,t[7]=l,t[8]=o,t[9]=n,t[10]=l,t[11]=a,t[12]=s,t[13]=r,t[14]=o,t[15]=s,t[16]=r,t[17]=a,t[18]=s,t[19]=l,t[20]=o,t[21]=s,t[22]=l,t[23]=a,t}function u(e,t){const n=isFinite(e[2])||isFinite(e[5]);return new r.A(n?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function f(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function h(e,t,n=e){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n!==e&&(n[3]=e[3],n[4]=e[4],n[5]=e[5]),n}function y(e,t,n=e){return n[3]=t[0],n[4]=t[1],n[5]=t[2],n!==e&&(n[0]=e[0],n[1]=e[1],n[2]=e[2]),e}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?m(e,F):o(F)}function b(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function w(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function M(e){return 6===e.length}function v(e,t,n){if(null==e||null==t)return e===t;if(!M(e)||!M(t))return!1;if(n){for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1}else for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const F=[1/0,1/0,1/0,-1/0,-1/0,-1/0],I=[0,0,0,0,0,0];o()},81583:(e,t,n)=>{n.d(t,{L:()=>l,g:()=>s});var r=n(60999),i=n(7762),o=n(92474);async function s(e,t){return await e.load(),l(e,t)}async function l(e,t){const n=[],s=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?s(...t):i.A.isCollection(t)?t.forEach(e=>s(e)):(0,o.Zm)(t)&&n.push(t))};t(s);let l=null;if(await(0,r.Tj)(n,async e=>{const t=await(0,r.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||l||(l=t)}),l)throw l.error;return e}},85334:(e,t,n)=>{n.d(t,{$:()=>g,IB:()=>s,Iy:()=>v,N2:()=>b,RH:()=>M,ZD:()=>w});var r=n(68197),i=n(4576),o=n(4718);function s(e){return"r"in e&&"g"in e&&"b"in e}function l(e){return"h"in e&&"s"in e&&"v"in e}function a(e){return"l"in e&&"a"in e&&"b"in e}function u(e){return"l"in e&&"c"in e&&"h"in e}n(34727),n(87317),n(91829);const c=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],p=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function d(e,t){const n=[];let r,i;if(e[0].length!==t.length)throw new Error("dimensions do not match");const o=e.length,s=e[0].length;let l=0;for(r=0;r<o;r++){for(l=0,i=0;i<s;i++)l+=e[r][i]*t[i];n.push(l)}return n}function f(e){const t=[e.r/255,e.g/255,e.b/255].map(e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4),n=d(c,t);return{x:100*n[0],y:100*n[1],z:100*n[2]}}function h(e){const t=d(p,[e.x/100,e.y/100,e.z/100]).map(e=>{const t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))});return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function y(e){const t=[e.x/95.047,e.y/100,e.z/108.883].map(e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29);return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function m(e){const t=e.l,n=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map(e=>e>6/29?e**3:3*(6/29)**2*(e-4/29));return{x:95.047*n[0],y:100*n[1],z:108.883*n[2]}}function g(e){return s(e)?e:u(e)?function(e){return h(m(function(e){const t=e.l,n=e.c,r=e.h;return{l:t,a:n*Math.cos(r),b:n*Math.sin(r)}}(e)))}(e):a(e)?function(e){return h(m(e))}(e):function(e){return"x"in e&&"y"in e&&"z"in e}(e)?h(e):l(e)?function(e){const t=(e.h+360)%360/60,n=e.s/100,r=e.v/100*255,i=r*n,o=i*(1-Math.abs(t%2-1));let s;switch(Math.floor(t)){case 0:s={r:i,g:o,b:0};break;case 1:s={r:o,g:i,b:0};break;case 2:s={r:0,g:i,b:o};break;case 3:s={r:0,g:o,b:i};break;case 4:s={r:o,g:0,b:i};break;case 5:case 6:s={r:i,g:0,b:o};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+r-i),s.g=Math.round(s.g+r-i),s.b=Math.round(s.b+r-i),s}(e):e}function b(e){return l(e)?e:function(e){const t=e.r,n=e.g,r=e.b,i=Math.max(t,n,r),o=i-Math.min(t,n,r);let s=i,l=0===o?0:i===t?(n-r)/o%6:i===n?(r-t)/o+2:(t-n)/o+4,a=0===o?0:o/s;return l<0&&(l+=6),l*=60,a*=100,s*=100/255,{h:l,s:a,v:s}}(g(e))}function w(e){return a(e)?e:function(e){return y(f(e))}(g(e))}function M(e){return u(e)?e:function(e){return function(e){const t=e.l,n=e.a,r=e.b,i=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o=o>0?o:o+2*Math.PI,{l:t,c:i,h:o}}(y(f(e)))}(g(e))}function v(e,t,n={}){if(0===e.length||t<=0)return[];if(1===(e=e.map(e=>"string"==typeof e?new r.A(e):e)).length||1===t){const n=[],r=e[0];for(let e=0;e<t;e++)n.push(r.clone());return n}if(n.shuffle&&(e=(0,i.k4)((0,o.o8)(e),n.seed)),e.length>=t){const n=[],r=(e.length-1)/(t-1);for(let i=0;i<t;i++){const t=Math.round(i*r);n.push(e[t].clone())}return n}return function(e,t,n={}){const r=[],o=e.length-1,s=Math.ceil((t-e.length)/o);e:for(let i=0;i<o;i++){const o=e[i],l=e[i+1];for(let i=1;i<=s;i++){const a=i/(s+1);if(r.push(I(o,l,a,n)),r.length+e.length===t)break e}}return[...e.map(e=>e.clone()),...(0,i.k4)(r,n.seed??1)]}(e,t,n)}const F=(e,t)=>{const n=Math.floor(10*t())-5;return Math.min(255,Math.max(0,e+n))};function I(e,t,n,o={}){const s=e.r,l=e.g,a=e.b,u=t.r,c=t.g,p=t.b,d=Math.round(s+(u-s)*n),f=Math.round(l+(c-l)*n),h=Math.round(a+(p-a)*n);if(!o.offset)return new r.A([d,f,h]);const y=(0,i.Mo)(o.seed);return new r.A([F(d,y),F(f,y),F(h,y)])}},91218:(e,t,n)=>{n.r(t),n.d(t,{canProjectWithoutEngine:()=>D,initializeProjection:()=>B,isEqualBaseGCS:()=>V,isLoaded:()=>_,isLoadedOrLoad:()=>Z,isLoadedOrLoadFor:()=>O,load:()=>R,project:()=>E,projectExtent:()=>ne,projectMany:()=>P,projectMultipoint:()=>W,projectOrLoad:()=>L,projectOrLoadMany:()=>N,projectPoint:()=>J,projectPolygon:()=>ee,projectPolyline:()=>Y,projectWithZConversion:()=>U,projectWithoutEngine:()=>H,requiresLoad:()=>k,test:()=>G,tryProjectWithZConversion:()=>z,unload:()=>$});var r=n(49186),i=n(74887),o=n(62788),s=n(95488),l=n(51850),a=n(21276),u=n(73941),c=n(5443),p=n(91075),d=n(48526),f=n(86738),h=n(39829),y=n(82799),m=n(16930),g=n(159),b=n(9762),w=n(37539);function M(e,t,n,r,i,o){return v[0]=e,v[1]=t,v[2]=n,(0,b.projectBuffer)(v,r,0,i,o,0)}const v=(0,l.vt)();var F=n(21325),I=n(62815);let C=null,T=null,x=null,A=null,S={};const j=new s.I;function _(){return!!(T?.isLoaded()&&x?.isLoaded()&&A?.isLoaded())}function Z(){return!!_()||((0,o.gc)(j),R(),!1)}function O(e,t){return!e||!t||D(e,t)||Z()}function k(e,t){return!D(e,t)&&!_()}async function R(e){null==C&&(C=Promise.all([n.e(3276).then(n.bind(n,83276)).then(e=>(T=e,T.load())),n.e(8377).then(n.bind(n,8377)).then(e=>(x=e,x.load())),n.e(2158).then(n.bind(n,12158)).then(e=>(A=e,A.load()))])),await C,(0,i.Te)(e),j.notify()}function E(e,t,n){return Array.isArray(e)?0===e.length?[]:((0,a.H)(e),P(e,e[0].spatialReference,t,n)):((0,a.f)(e),P([e],e.spatialReference,t,n)[0])}function P(e,t,n,r){if(null==t||null==n)return e;if(D(t,n,r))return e.map(e=>H(e,t,n));if(null==r?.geographicTransformation&&(0,u.jA)(t))return e.map(e=>H(e,t,m.A.WGS84)).map(e=>z(e,n));if(null==r?.geographicTransformation&&(0,u.jA)(n))return e.map(e=>z(e,m.A.WGS84)).map(e=>H(e,m.A.WGS84,n));if(!_())throw new q;if(!r?.geographicTransformation)if(r?.extendedParams)r={...r,geographicTransformation:A.getTransformation(t,n,r.areaOfInterestExtent)||new g.A};else if(!r?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,n);let i=S[e];i||(i=A.getTransformation(t,n)||new g.A,S[e]=i),r={geographicTransformation:i}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof p.A?T.executeMany(e,n,r):x.executeMany(e,n,r)}function L(e,t){const n=N([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function N(e,t){if(!_())for(const n of e)if(null!=n&&!(0,F.aI)(n.spatialReference,t)&&(0,F.fn)(n.spatialReference)&&(0,F.fn)(t)&&!D(n.spatialReference,t))return(0,o.gc)(j),{pending:R(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,F.aI)(e.spatialReference,t)?e:(0,F.fn)(e.spatialReference)&&(0,F.fn)(t)?z(e,t):null)}}class q extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function $(){C=null,T=null,x=null,A=null,S={}}const G={get loadPromise(){return C}};function z(e,t){try{const n=E(e,t);if(null==n)return null;"xmin"in e&&"xmin"in n&&(n.zmin=e.zmin,n.zmax=e.zmax);const r=(0,I.N)(n.type,e.spatialReference,t);return null!=r&&r(n),n}catch(e){if(!(e instanceof q))throw e;return null}}async function U(e,t,n){const r=e.spatialReference;return null!=r&&null!=t&&await B(r,t,null,n),z(e,t)}function D(e,t,n){return!(n?.areaOfInterestExtent||n?.extendedParams||n?.geographicTransformation)&&(!!(0,F.aI)(e,t)||(0,F.fn)(e)&&(0,F.fn)(t)&&!!(0,w.jd)(e,t))}function V(e,t){if((0,F.aI)(e,t))return!0;if(!(0,F.fn)(e)||!(0,F.fn)(t))return!1;const n=(0,F.oT)(e)||(0,F.K8)(e)||(0,F.x1)(e),r=(0,F.oT)(t)||(0,F.K8)(t)||(0,F.x1)(t);return n&&r}async function B(e,t,n,r){if(_())return(0,i.NO)(r);if(Array.isArray(e)){for(const{source:t,dest:n,options:i}of e)if(t&&n&&!D(t,n,i))return R(r)}else if(e&&t&&!D(e,t,n))return R(r);return(0,i.NO)(r)}function H(e,t,n){return e?"x"in e?K(e,t,new f.A,n,0):"xmin"in e?re(e,t,new c.A,n,0):"rings"in e?te(e,t,new h.A,n,0):"paths"in e?X(e,t,new y.A,n,0):"points"in e?Q(e,t,new d.A,n,0):null:null}function J(e,t,n=t.spatialReference,r=0){return null!=n&&null!=e.spatialReference&&null!=K(e,e.spatialReference,t,n,r)}function K(e,t,n,r,i){oe[0]=e.x,oe[1]=e.y;const o=e.z;return oe[2]=void 0!==o?o:i,(0,b.projectBuffer)(oe,t,0,oe,r,0)?(n.x=oe[0],n.y=oe[1],n.spatialReference=r,void 0!==o||(0,u.xP)(r)?(n.z=oe[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function W(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=Q(e,e.spatialReference,t,n,r)}function Q(e,t,n,r,i){const{points:o,hasZ:s,hasM:l}=e,a=[],c=o.length,p=[];for(const e of o)p.push(e[0],e[1],s?e[2]:i);if(!(0,b.projectBuffer)(p,t,0,p,r,0,c))return null;const d=s||(0,u.xP)(r);for(let e=0;e<c;++e){const t=3*e,n=p[t],r=p[t+1];d&&l?a.push([n,r,p[t+2],o[e][3]]):d?a.push([n,r,p[t+2]]):l?a.push([n,r,o[e][2]]):a.push([n,r])}return n.points=a,n.spatialReference=r,n.hasZ=s,n.hasM=l,n}function Y(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=X(e,e.spatialReference,t,n,r)}function X(e,t,n,r,i){const{paths:o,hasZ:s,hasM:l}=e,a=[];if(!ie(o,s??!1,l??!1,t,a,r,i))return null;const c=s||(0,u.xP)(r);return n.paths=a,n.spatialReference=r,n.hasZ=c,n.hasM=l,n}function ee(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=te(e,e.spatialReference,t,n,r)}function te(e,t,n,r,i){const{rings:o,hasZ:s,hasM:l}=e,a=[];if(!ie(o,s??!1,l??!1,t,a,r,i))return null;const c=s||(0,u.xP)(r);return n.rings=a,n.spatialReference=r,n.hasZ=c,n.hasM=l,n}function ne(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=re(e,e.spatialReference,t,n,r)}function re(e,t,n,r,i){const{xmin:o,ymin:s,xmax:l,ymax:a,hasZ:c,hasM:p}=e;if(!M(o,s,c?e.zmin:i,t,oe,r))return null;const d=c||(0,u.xP)(r);return n.xmin=oe[0],n.ymin=oe[1],d&&(n.zmin=oe[2]),M(l,a,c?e.zmax:i,t,oe,r)?(n.xmax=oe[0],n.ymax=oe[1],d&&(n.zmax=oe[2]),p&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=r,n):null}function ie(e,t,n,r,i,o,s=0){const l=new Array;for(const n of e)for(const e of n)l.push(e[0],e[1],t?e[2]:s);if(!(0,b.projectBuffer)(l,r,0,l,o,0))return!1;let a=0;i.length=0;const c=t||(0,u.xP)(o);for(const t of e){const e=new Array;for(const r of t)c&&n?e.push([l[a++],l[a++],l[a++],r[3]]):c?e.push([l[a++],l[a++],l[a++]]):n?(e.push([l[a++],l[a++],r[2]]),a++):(e.push([l[a++],l[a++]]),a++);i.push(e)}return!0}const oe=(0,l.vt)()},95466:(e,t,n)=>{n.d(t,{A:()=>f});var r=n(49186),i=n(53966),o=n(91869),s=n(3330),l=n(12195),a=n(30524),u=n(98623),c=n(56400),p=n(28097);const d=new Map;class f{static fromJSON(e){return new f(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new f(e.fields??[],g(e))}static fromLayerJSON(e){return new f(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const n=[];for(const e of this.fields){const t=e?.name,r=y(t);if(t&&r){const i=h(t);this._fieldsMap.set(t,e),this._fieldsMap.set(i,e),this._normalizedFieldsMap.set(r,e),n.push(`${i}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}n.sort(),this.uid=n.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(h(e))??this._normalizedFieldsMap.get(y(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(i.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new r.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?s.GB.instance:t===u.n$?p.mQ.utcInstance:(0,o.tE)(d,t,()=>p.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,l.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function h(e){return e.trim().toLowerCase()}function y(e){return(0,a.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const n=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:i}=e,o=(r?"startField"in r?r.startField:r.startTimeField:"")??"",s=(r?"endField"in r?r.endField:r.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,a=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.dateFieldsTimeReference?(0,c.ZS)(i.dateFieldsTimeReference):l??u.n$:null,p=r?function(e){return"timeZone"in e}(r)?r.timeZone??l:r.timeReference?(0,c.ZS)(r.timeReference):l:null,d=new Map([[h(i?.creationDateField??""),a],[h(i?.editDateField??""),a],[h(o),p],[h(s),p]]);for(const{name:r,type:i}of e.fields)if(m.has(i))t.set(r,u.L5);else if("date"!==i&&"esriFieldTypeDate"!==i)t.set(r,null);else if(n)t.set(r,u.L5);else{const e=d.get(h(r??""))??l;t.set(r,e)}return t}},97483:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Pe});var r=n(31635),i=n(69540),o=n(7762),s=n(49186),l=n(81583),a=n(91869),u=n(25728),c=n(74887),p=n(36708),d=n(39516),f=n(10107),h=(n(44208),n(53966)),y=(n(87811),n(36005)),m=n(64108),g=n(4146),b=n(52136),w=n(18768),M=n(63074),v=n(69208),F=n(6455),I=n(47685),C=n(87796),T=n(16131),x=n(8303),A=n(54310),S=n(25036),j=n(82935),_=n(60694),Z=n(10873),O=n(15426),k=n(17036),R=n(30524),E=n(85334),P=n(90360),L=n(86162),N=n(92438),q=n(96576),$=n(93618),G=n(62046),z=n(37531);const U={key:"type",base:N.A,errorContext:"renderer",typeMap:{simple:q.A,"unique-value":$.A,"class-breaks":L.A}},D=(0,P.C)({types:U}),V=["#ed5151","#149ece","#a7c636","#9e559c","#fc921f","#ffde3e","#f789d8","#b7814a","#3caf99","#6b6bd6","#b54779","#7f7f7f"];var B=n(37838),H=n(4902),J=n(4718),K=n(92474),W=n(97768),Q=n(93637),Y=n(43937),X=n(89317),ee=n(965),te=n(16930),ne=n(55156),re=n(60950),ie=n(89808),oe=n(99959);const se=Symbol("isSubtypeGroupGraphicOriginSymbol");var le;class ae extends oe.A{get[(le=se,re.ym)](){return this.sublayer}get[ne.e](){return this.sublayer}get[ie.Q](){return this.layer}constructor(e){super(),this[le]=!0,this.type="subtype-group",this.sublayer=e}get layer(){return this.sublayer.parent}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var ue=n(29005),ce=n(46499),pe=n(39383),de=n(17311),fe=n(61956),he=n(30291),ye=n(59868),me=n(43440);const ge=(0,k.p)();let be=0;function we(e,t){let n=e.json.write;return"object"!=typeof n&&(n=e.json.write={}),n.ignoreOrigin=!0,t?.spatialOnly&&(n.layerContainerTypes=X.K),e}function Me(e){const t={write:{ignoreOrigin:!0}};return e?.name&&(t.name=e.name),"object"==typeof t.write&&(e?.spatialOnly&&(t.write.layerContainerTypes=X.K),e?.target&&(t.write.target=e.target)),t}function ve(e){switch(e){case"point":case"multipoint":return ye.UK.clone();case"polyline":return ye.A7.clone();case"polygon":case"multipatch":return ye.Cx.clone();default:return null}}function Fe(e,t){return null==e?null:t.subtypes?.find(t=>t.code===e)}function Ie(e,t){let n=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":n="point";break;case"esriGeometryPolyline":n="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":n="polygon";break;default:t.type,n=null}const r={},i=Fe(e,t);if(null!=i){const{defaultValues:e}=i;for(const t in e)r[t]=e[t]}return r[t.subtypeField]=e,new ue.A({name:"New Feature",drawingTool:n,prototype:{attributes:r}})}let Ce=class extends((0,u.P)((0,i.OU)((0,H.s)(K.x_)))){constructor(e){super(e),this.attributeTableTemplate=null,this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.graphicOrigin=new ae(this),this.id=`${Date.now().toString(16)}-subtype-sublayer-${be++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}load(e){return(0,R.yp)(this.renderer,this.fieldsIndex),Promise.resolve(this)}get _titleCreator(){const e=this._get("_titleCreator");return(0,W.pR)(e),new de.A({fieldsIndex:this.fieldsIndex,objectIdField:this.objectIdField,displayField:this.parent?.displayField??"",fields:this.fields,effectivePopupTemplate:this.popupTemplate??this.defaultPopupTemplate})}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}get featureTitleFields(){return[...this._titleCreator.requiredFields]}writeFieldOverrides(e,t,n){const{fields:r,parent:i}=this;let o;if(r){o=[];let e=0;r.forEach(({name:t,alias:n,editable:r,visible:s})=>{if(!s)return;const l=i?.fields?.find(e=>e.name===t);if(!l)return;const a={name:t};let u=!1;n!==l.alias&&(a.alias=n,u=!0),r!==l.editable&&(a.editable=r,u=!0),o.push(a),u&&e++}),0===e&&o.length===r.length&&(o=null)}else o=(0,J.o8)(e);o?.length&&(0,Q.sM)(n,o,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:n}=this,r=e?.fields;if(!e||!r?.length)return null;const{subtypes:i,subtypeField:o}=e,s=i?.find(e=>e.code===n),l=s?.defaultValues,a=s?.domains,u=[];for(const e of r){const r=e.clone(),{name:i}=r,s=t?.find(e=>e.name===i);if(r.visible=!t?.length||!!s,s){const{alias:e,editable:t}=s;e&&(r.alias=e),!1===t&&(r.editable=!1)}const c=l?.[i]??null;r.defaultValue=i===o?n:c;const p=a?.[i]??null;r.domain=i===o?null:p?"inherited"===p.type?r.domain:p.clone():null,u.push(r)}return u}get floorInfo(){return this.parent?.floorInfo}get isTable(){return!!this.parent?.isTable}get geometryType(){return this.parent?.geometryType}get globalIdField(){return this.parent?this.parent.globalIdField:(h.A.getLogger(this).error(Ae("globalIdField")),null)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||h.A.getLogger(this).error(Ae("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}get relationships(){return this.parent?.relationships}set renderer(e){(0,R.yp)(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?function(e){return new q.A({symbol:ve(e)})}(e.geometryType):null}readRendererFromService(e,t,n){if("Table"===t.type)return null;const r=t.drawingInfo?.renderer,i=D(r,t,n);let o;const{subtypeCode:s}=this;if(null!=s&&function(e,t){return!(!t||"unique-value"!==e?.type||null==e.field||e.field.toLowerCase()!==t.toLowerCase()||e.field2||e.field3||e.valueExpression)}(i,t.subtypeField)){const e=i.uniqueValueInfos?.find(({value:e})=>(e="number"==typeof e?String(e):e)===String(s));e&&(o=new q.A({symbol:e.symbol}))}else"simple"!==i?.type||i.visualVariables?.length||(o=i);return o}readRenderer(e,t,n){const r=t?.layerDefinition?.drawingInfo?.renderer;if(!r)return;const i=r.visualVariables?.some(e=>"rotationInfo"!==e.type);return i?void 0:D(r,t,n)||void 0}get spatialReference(){return this.parent?.spatialReference??te.A.WGS84}get subtypeField(){return this.parent?.subtypeField}readTemplatesFromService(e,t){return[Ie(this.subtypeCode,t)]}readTitleFromService(e,t){const n=Fe(this.subtypeCode,t);return null!=n?n.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:n}=this;if(!n)throw Ae("addAttachment");if(e.getAttribute(n.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return n.addAttachment(e,t)}async updateAttachment(e,t,n){const{parent:r}=this;if(!r)throw Ae("updateAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return r.updateAttachment(e,t,n)}async deleteAttachments(e,t){const{parent:n}=this;if(!n)throw Ae("deleteAttachments");if(e.getAttribute(n.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return n.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw Ae("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:n,fields:r,title:i}=this;if(n){const{displayField:e,editFieldsInfo:o,objectIdField:s}=n;t={displayField:e,editFieldsInfo:o,fields:r,objectIdField:s,title:i}}return(0,he.tn)(t,e)}createQuery(){if(!this.parent)throw Ae("createQuery");const e=(0,O.VZ)(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=(0,d.mA)(t,this.parent.definitionExpression),e}getFeatureTitle(e,t){return this._titleCreator.getTitle(this,e,t)}getFeatureTitles(e,t){return this._titleCreator.getTitles(this,e,t)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains&&this.parent){const t=(0,O.pc)(this.parent,e);if(t)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){const n=await this.load();if(!n.parent)throw Ae("queryAttachments");const r=e.clone();return r.where=xe(r.where,n.parent.subtypeField,n.subtypeCode),n.parent.queryAttachments(e,t)}async queryFeatureCount(e,t){const n=await this.load();if(!n.parent)throw Ae("queryFeatureCount");return n.parent.queryFeatureCount(Te(n.parent,n,e),t)}async queryFeatures(e,t){const n=await this.load();if(!n.parent)throw Ae("queryFeatures");return n.parent.queryFeatures(Te(n.parent,n,e),t)}async queryObjectIds(e,t){const n=await this.load();if(!n.parent)throw Ae("queryObjectIds");return n.parent.queryObjectIds(Te(n.parent,n,e),t)}async queryRelatedFeatures(e,t){const n=await this.load();if(!n.parent)throw Ae("queryRelatedFeatures");return n.parent.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){const n=await this.load();if(!n.parent)throw Ae("queryRelatedFeaturesCount");return n.parent.queryRelatedFeaturesCount(e,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};(0,r.Cg)([(0,f.MZ)({clonable:!1,readOnly:!0})],Ce.prototype,"_titleCreator",null),(0,r.Cg)([(0,f.MZ)({type:me.A,json:Me({name:"attributeTableInfo"})})],Ce.prototype,"attributeTableTemplate",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ce.prototype,"capabilities",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ce.prototype,"effectiveCapabilities",null),(0,r.Cg)([(0,f.MZ)({json:Me()})],Ce.prototype,"charts",void 0),(0,r.Cg)([(0,f.MZ)({type:Boolean,nonNullable:!0,json:Me({name:"enableEditing"})})],Ce.prototype,"editingEnabled",void 0),(0,r.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],Ce.prototype,"effectiveEditingEnabled",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ce.prototype,"elevationInfo",null),(0,r.Cg)([(0,f.MZ)({clonable:!1,readOnly:!0})],Ce.prototype,"featureTitleFields",null),(0,r.Cg)([(0,f.MZ)({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],Ce.prototype,"fieldOverrides",void 0),(0,r.Cg)([(0,Y.K)("fieldOverrides")],Ce.prototype,"writeFieldOverrides",null),(0,r.Cg)([(0,f.MZ)({...ge.fields,readOnly:!0,json:{read:!1}})],Ce.prototype,"fields",null),(0,r.Cg)([(0,f.MZ)(ge.fieldsIndex)],Ce.prototype,"fieldsIndex",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ce.prototype,"floorInfo",null),(0,r.Cg)([(0,f.MZ)({type:ee.A,json:Me({name:"formInfo"})})],Ce.prototype,"formTemplate",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0,clonable:!1})],Ce.prototype,"graphicOrigin",void 0),(0,r.Cg)([(0,f.MZ)({type:String,clonable:!1,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],Ce.prototype,"id",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ce.prototype,"isTable",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ce.prototype,"geometryType",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ce.prototype,"globalIdField",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ce.prototype,"type",void 0),(0,r.Cg)([(0,f.MZ)(we((0,J.o8)(Z.kF)))],Ce.prototype,"labelsVisible",void 0),(0,r.Cg)([(0,f.MZ)({type:[ce.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:pe.w},write:{ignoreOrigin:!0,layerContainerTypes:X.K}}})],Ce.prototype,"labelingInfo",void 0),(0,r.Cg)([(0,f.MZ)({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,layerContainerTypes:X.K}}})],Ce.prototype,"layerType",void 0),(0,r.Cg)([(0,f.MZ)(we((0,J.o8)(Z.fV)))],Ce.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,f.MZ)({type:["show","hide"]})],Ce.prototype,"listMode",void 0),(0,r.Cg)([(0,f.MZ)((()=>{const e=(0,J.o8)(Z.hn);return e.json.origins.service.read=!1,we(e,{spatialOnly:!0})})())],Ce.prototype,"minScale",void 0),(0,r.Cg)([(0,f.MZ)((()=>{const e=(0,J.o8)(Z.hG);return e.json.origins.service.read=!1,we(e,{spatialOnly:!0})})())],Ce.prototype,"maxScale",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0})],Ce.prototype,"effectiveScaleRange",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ce.prototype,"objectIdField",null),(0,r.Cg)([(0,f.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0,json:Me({spatialOnly:!0})})],Ce.prototype,"opacity",void 0),(0,r.Cg)([(0,f.MZ)({clonable:!1})],Ce.prototype,"parent",void 0),(0,r.Cg)([(0,f.MZ)(we((0,J.o8)(Z.M6)))],Ce.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,f.MZ)({type:B.A,json:Me({name:"popupInfo"})})],Ce.prototype,"popupTemplate",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0})],Ce.prototype,"defaultPopupTemplate",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ce.prototype,"relationships",null),(0,r.Cg)([(0,f.MZ)({types:U,json:Me({target:"layerDefinition.drawingInfo.renderer",spatialOnly:!0})})],Ce.prototype,"renderer",null),(0,r.Cg)([(0,y.w)("service","renderer",["drawingInfo.renderer","subtypeField","type"])],Ce.prototype,"readRendererFromService",null),(0,r.Cg)([(0,y.w)("renderer",["layerDefinition.drawingInfo.renderer"])],Ce.prototype,"readRenderer",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ce.prototype,"spatialReference",null),(0,r.Cg)([(0,f.MZ)({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],Ce.prototype,"subtypeCode",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ce.prototype,"subtypeField",null),(0,r.Cg)([(0,f.MZ)({type:[ue.A],json:Me({name:"layerDefinition.templates"})})],Ce.prototype,"templates",void 0),(0,r.Cg)([(0,y.w)("service","templates",["geometryType","subtypeField","subtypes","type"])],Ce.prototype,"readTemplatesFromService",null),(0,r.Cg)([(0,f.MZ)({type:String,json:Me()})],Ce.prototype,"title",void 0),(0,r.Cg)([(0,y.w)("service","title",["subtypes"])],Ce.prototype,"readTitleFromService",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ce.prototype,"url",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0})],Ce.prototype,"userHasUpdateItemPrivileges",null),(0,r.Cg)([(0,f.MZ)({type:Boolean,nonNullable:!0,json:Me({name:"visibility",spatialOnly:!0})})],Ce.prototype,"visible",void 0),Ce=(0,r.Cg)([(0,m.$)("esri.layers.support.SubtypeSublayer")],Ce);const Te=(e,t,n)=>{if(!n)return t.createQuery();const r=fe.A.from(n);return r.where=xe(r.where,e.subtypeField,t.subtypeCode),r},xe=(e,t,n)=>{const r=new RegExp(`${t}\\s*=\\s*\\d+`),i=`${t}=${n}`,o=e??"";return r.test(o)?o.replace(r,i):(0,d.mA)(i,o)},Ae=e=>new s.A("subtype-sublayer:parent-missing",`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`);var Se=n(96184),je=n(91908),_e=n(54218);const Ze="SubtypeGroupLayer";function Oe(e,t){return new s.A("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function ke(e,t){const n=[];for(const r of e){const e=new Ce;e.read(r,t),n.push(e)}return n}const Re=(0,k.p)();let Ee=class extends((0,C.j)((0,F.FJ)((0,I.w6)((0,M.dM)((0,j.e)((0,S.j)((0,A.J)((0,w.b)((0,T.q)((0,x.A)((0,u.P)((0,v.d)((0,b.p)((0,i.OU)(g.A))))))))))))))){constructor(...e){super(...e),this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.sublayers=new(o.A.ofType(Ce)),this.useUniqueColorsForSublayers=!0,this.supportedSourceTypes=new Set(["Feature Layer","Table"]),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this._debouncedSaveOperations=(0,c.sg)(async(e,t,r)=>{const{save:i,saveAs:o}=await n.e(5740).then(n.bind(n,33359));switch(e){case 0:return i(this,t);case 1:return o(this,r,t)}}),this.addHandles((0,p.wB)(()=>this.sublayers,(e,t)=>this._handleSublayersChange(e,t),p.OH))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,n=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(c.QP).then(async()=>{if(!this.url)throw new s.A("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new s.A("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");this._initLayerProperties(await this.createGraphicsSource(t))}).then(()=>(0,O.VA)(this,"load",e));return this.addResolvingPromise(n),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return(0,O.C$)(this)}get operationalLayerType(){return this.isTable?"SubtypeGroupTable":"SubtypeGroupLayer"}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?(0,_.yG)(this.url,t):t}async addAttachment(e,t){const n=await(0,O.Xl)(this,e,t,Ze);return this.lastEditsEventDate=new Date,n}async updateAttachment(e,t,n){const r=await(0,O.bt)(this,e,t,n,Ze);return this.lastEditsEventDate=new Date,r}async applyEdits(e,t){return(0,O.ct)(this,e,t)}async createGraphicsSource(e){const{default:t}=await(0,c.qr)(Promise.all([n.e(708),n.e(893),n.e(8628),n.e(2593),n.e(9062)]).then(n.bind(n,72593)),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=(0,O.VZ)(this),t=this.sublayers.map(e=>e.subtypeCode);return e.where=(0,d.mA)(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){const n=await(0,O.mm)(this,e,t,Ze);return this.lastEditsEventDate=new Date,n}async fetchRecomputedExtents(e){return(0,O.WP)(this,e,Ze)}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),n=e.attributes[t.name];return this.findSublayerForSubtypeCode(n)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains){const t=(0,O.pc)(this,e);if(t)return t}const n=(0,O.Nv)(this,t?.feature);if(n){const t=n.domains?.[e];return"inherited"===t?.type?this._getLayerDomain(e):t}return this._getLayerDomain(e)}loadAll(){return(0,l.g)(this,e=>{e(this.sublayers)})}async queryAttachments(e,t){return(0,O.lV)(this,e,t,Ze)}async queryFeatures(e,t){const n=await this.load(),r=fe.A.from(e)??n.createQuery(),i=r.outFields??[];i.includes(this.subtypeField)||(i.push(this.subtypeField),r.outFields=i);const o=await n.source.queryFeatures(r,t);if(o?.features)for(const e of o.features){const t=this.findSublayerForFeature(e);e.origin=t?.graphicOrigin,e.layer=e.sourceLayer=this.findSublayerForFeature(e)}return o}async queryObjectIds(e,t){return(await(0,O.sg)(this,e,t,Ze)).filter(_e.Et)}async queryFeatureCount(e,t){return(0,O.Ye)(this,e,t,Ze)}async queryExtent(e,t){return(0,O.B5)(this,e,t,Ze)}async queryRelatedFeatures(e,t){return(0,O.hM)(this,e,t,Ze)}async queryRelatedFeaturesCount(e,t){return(0,O.S2)(this,e,t,Ze)}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}write(e,t){const{origin:n,layerContainerType:r,messages:i}=t;if(this.isTable){if("web-scene"===n||"web-map"===n&&"tables"!==r)return i?.push(Oe(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===n&&"tables"===r)return i?.push(Oe(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,t):(i?.push(new s.A("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&(0,je.D)(this,e)}async getFeatureTitle(e,t){const n=this.findSublayerForFeature(e);return n?await n.getFeatureTitle(e,t):this._getFeatureTitleForUnknownSublayer(e)}async getFeatureTitles(e,t){const n=new Map,r=new Map,i=[r];e.forEach(e=>{const t=this.findSublayerForFeature(e);if(t)(0,a.tE)(n,t,()=>[]).push(e);else{const t=e.getObjectId()??e.attributes[this.objectIdField];r.set(t,this._getFeatureTitleForUnknownSublayer(e))}});const o=await Promise.all(Array.from(n).map(([e,n])=>e.getFeatureTitles(n,t)));return o.forEach(e=>i.push(e)),new Map(i.flatMap(e=>[...e]))}get featureTitleFields(){const e=new Set;for(const t of this.sublayers){const n=t.featureTitleFields;for(const t of n)e.add(t)}return[...e]}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}_initLayerProperties(e){this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),!this.subtypes?.length)throw new s.A("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),(0,R.sv)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,O.jp)(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some(e=>"geometry"===e.type)||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach(e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),e.on("after-remove",({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)})],"sublayers-owner"))}_getFeatureTitleForUnknownSublayer(e){const{displayField:t,fieldsIndex:n,objectIdField:r}=this;if(t&&n.has(t))return e.attributes[n.get(t).name]??"";const i=e.getObjectId();return null!=i?i.toString():r&&n.has(r)?e.attributes[n.get(r).name]??"":""}};(0,r.Cg)([(0,f.MZ)({readOnly:!0})],Ee.prototype,"createQueryVersion",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0})],Ee.prototype,"editingEnabled",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0})],Ee.prototype,"effectiveEditingEnabled",null),(0,r.Cg)([(0,f.MZ)({...Re.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Ee.prototype,"fields",void 0),(0,r.Cg)([(0,f.MZ)(Re.fieldsIndex)],Ee.prototype,"fieldsIndex",void 0),(0,r.Cg)([(0,f.MZ)(Z.id)],Ee.prototype,"id",void 0),(0,r.Cg)([(0,f.MZ)({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],Ee.prototype,"listMode",void 0),(0,r.Cg)([(0,f.MZ)({type:["SubtypeGroupLayer","SubtypeGroupTable"],json:{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{"web-document":{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0}},"portal-item":{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0}}}}})],Ee.prototype,"operationalLayerType",null),(0,r.Cg)([(0,f.MZ)(Re.outFields)],Ee.prototype,"outFields",void 0),(0,r.Cg)([(0,f.MZ)({clonable:!1})],Ee.prototype,"source",null),(0,r.Cg)([(0,f.MZ)({type:o.A.ofType(Ce),json:{origins:{service:{read:{source:"subtypes",reader(e,t,n){let r=null;if(this.useUniqueColorsForSublayers){const i=function(e,t){const n=e.drawingInfo?.renderer,r=n?D(n,e,t):null;if("simple"===r?.type)return(0,z.Sx)(r.symbol,null)?r.symbol.clone():null}(t,n);r=i?function(e,t){return(0,E.Iy)(V,e,{offset:!0,shuffle:!0}).reverse().map(e=>{const n=t.clone();return"cim"===n.type?(0,G.Fe)(n,e):(0,z.dt)(n,e),new q.A({symbol:n})})}(e.length,i):null}const i=e.map(({code:e},i)=>{const o=new Ce({subtypeCode:e});o.read(t,n);const s=r?.[i];return s&&o.read({drawingInfo:{renderer:s.toJSON()}},n),o});return new(o.A.ofType(Ce))(i)}}}},read:{source:["layers","tables"],reader(e,t,n){let r;return"SubtypeGroupLayer"===t.layerType&&t.layers?.length?r=ke(t.layers,n):"SubtypeGroupTable"===t.layerType&&t.tables?.length&&(r=ke(t.tables,n)),new(o.A.ofType(Ce))(r)}},write:{ignoreOrigin:!0,writer(e,t,n,r){const i=[];for(const t of e){const e=t.write({},r);i.push(e)}this.isTable?t.tables=i:t.layers=i}}}})],Ee.prototype,"sublayers",void 0),(0,r.Cg)([(0,f.MZ)()],Ee.prototype,"useUniqueColorsForSublayers",void 0),(0,r.Cg)([(0,f.MZ)({type:Se.A})],Ee.prototype,"timeInfo",void 0),(0,r.Cg)([(0,f.MZ)({json:{origins:{"portal-item":{write:{enabled:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],Ee.prototype,"title",void 0),(0,r.Cg)([(0,y.w)("service","title",["name"])],Ee.prototype,"readTitleFromService",null),(0,r.Cg)([(0,f.MZ)({json:{read:!1}})],Ee.prototype,"type",void 0),(0,r.Cg)([(0,f.MZ)({clonable:!1,readOnly:!0})],Ee.prototype,"featureTitleFields",null),Ee=(0,r.Cg)([(0,m.$)("esri.layers.SubtypeGroupLayer")],Ee);const Pe=Ee},99157:(e,t,n)=>{n.d(t,{A:()=>a});var r,i=n(31635),o=n(69622),s=n(10107),l=(n(44208),n(53966),n(87811),n(64108));let a=r=class extends o.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new r({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,i.Cg)([(0,s.MZ)()],a.prototype,"isInverse",void 0),(0,i.Cg)([(0,s.MZ)()],a.prototype,"wkt",void 0),(0,i.Cg)([(0,s.MZ)()],a.prototype,"wkid",void 0),a=r=(0,i.Cg)([(0,l.$)("esri.geometry.operators.support.GeographicTransformationStep")],a)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7548,7883],{4146:(e,t,n)=>{n.d(t,{A:()=>w});var r=n(31635),l=n(43773),o=n(49186),i=n(65529),s=n(4902),a=n(92474),u=n(53966),c=n(74887),y=n(84952),m=n(10107),p=(n(44208),n(87811),n(64108)),d=n(5443),f=n(16930),b=n(92602),g=n(79677);let h=0,w=class extends((0,i.Zt)((0,s.s)(a.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new d.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+h++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([n.e(812),n.e(7982)]).then(n.bind(n,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await Promise.all([n.e(812),n.e(5613),n.e(5710)]).then(n.bind(n,45613));try{return await r(t)}catch(e){const n=t?.portalItem,r=n?.id||"unset",l=n?.portal?.url||b.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+l+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,y.An)(this.url)}createLayerView(e,t){return Promise.reject(new o.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,l.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r.Cg)([(0,m.MZ)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],w.prototype,"effectiveVisible",null),(0,r.Cg)([(0,m.MZ)({type:d.A})],w.prototype,"fullExtent",void 0),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,r.Cg)([(0,m.MZ)({type:String,clonable:!1})],w.prototype,"id",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,m.MZ)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,r.Cg)([(0,m.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,r.Cg)([(0,m.MZ)({clonable:!1})],w.prototype,"parent",void 0),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,r.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],w.prototype,"persistenceEnabled",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,r.Cg)([(0,m.MZ)({type:f.A})],w.prototype,"spatialReference",void 0),(0,r.Cg)([(0,m.MZ)({type:String})],w.prototype,"title",void 0),(0,r.Cg)([(0,m.MZ)({readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,r.Cg)([(0,m.MZ)()],w.prototype,"url",void 0),(0,r.Cg)([(0,m.MZ)({type:g.A})],w.prototype,"visibilityTimeExtent",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,r.Cg)([(0,p.$)("esri.layers.Layer")],w)},16215:(e,t,n)=>{n.d(t,{S:()=>l,Y:()=>r});const r=Symbol("BasemapInstance");function l(e){return null!=e&&"object"==typeof e&&r in e}},27883:(e,t,n)=>{n.d(t,{resolveWebStyleSymbol:()=>d});var r=n(61473),l=n(49186),o=n(84952),i=n(20655),s=n(97159),a=n(73838),u=n(98751),c=n(85594),y=n(57212),m=n(33910);const p=["web-gltf","web","cim"];function d(e,t,n){const r=e.name;return null==r?Promise.reject(new l.A("symbolstyleutils:style-symbol-reference-name-missing","Missing name in style symbol reference")):"Esri2DPointSymbolsStyle"===e.styleName?function(e,t,n){const r=c.jg.replaceAll(/\{SymbolName\}/gi,e),l=null!=t.portal?t.portal:i.A.getDefault();return(0,c.yA)(r,n).then(e=>{const t=(0,c.bo)(e.data);return(0,a.rS)(t,{portal:l,url:(0,o.An)((0,o.nM)(r)),origin:"portal-item"})})}(r,t,n):(0,c.cF)(e,t,n).then(e=>f(e,r,t,c.o5,n))}async function f(e,t,n,d,f){const b=null!=n?.portal?n.portal:i.A.getDefault(),g={portal:b,url:(0,o.An)(e.baseUrl)},h=function(e,t){return t.items.find(t=>t.name===e)}(t,e.data);if(!h)throw new l.A("symbolstyleutils:symbol-name-not-found",`The symbol name '${t}' could not be found`,{symbolName:t});const w=f?.acceptedFormats??p,S=d(h,w);if(!S)throw new l.A("symbolstyleutils:symbol-reference-no-accepted-format",`The symbol name '${t}' does not have an accepted format (one of ${w})`,{symbolName:t});const{url:A,format:C}=S;let v=(0,s.f)(A,g),M=h.thumbnail?.href??null;const T=h.thumbnail?.imageData;(0,r.b5)()&&(v=(0,r.EM)(v)??"",M=(0,r.EM)(M));const L={portal:b,url:(0,o.An)((0,o.nM)(v)),origin:"portal-item"};return(0,c.yA)(v,f).then(r=>{const l="cim"===C?(0,c.bo)(r.data):r.data,o=(0,a.rS)(l,L);if(o&&(0,m.wk)(o)){if(M){const e=(0,s.f)(M,g);o.thumbnail=new y.V({url:e})}else T&&(o.thumbnail=new y.V({url:`data:image/png;base64,${T}`}));e.styleUrl?o.styleOrigin=new u.A({portal:n.portal,styleUrl:e.styleUrl,name:t}):e.styleName&&(o.styleOrigin=new u.A({portal:n.portal,styleName:e.styleName,name:t}))}return o})}},59868:(e,t,n)=>{n.d(t,{A7:()=>u,Cx:()=>c,Hk:()=>y,UK:()=>a}),n(44208);var r=n(94985),l=n(31593),o=n(53930),i=n(68249),s=n(93470);const a=o.A.fromJSON(s.Cb),u=l.A.fromJSON(s.yM),c=r.A.fromJSON(s.WR),y=i.A.fromJSON(s.JZ);o.A.fromJSON(s.nC),l.A.fromJSON(s.HW),r.A.fromJSON(s.b6)},61473:(e,t,n)=>{function r(e){return e=e||globalThis.location.hostname,u.some(t=>null!=e?.match(t))}function l(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(o)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(i)||null!=t.match(a)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}n.d(t,{EM:()=>l,b5:()=>r});const o=/^devext\.arcgis\.com$/,i=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,a=/^[\w-]*\.mapsqa\.arcgis\.com$/,u=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,o,i,/^jsapps\.esri\.com$/,s,a]},73838:(e,t,n)=>{n.d(t,{rS:()=>$,M9:()=>N,oO:()=>I});var r=n(49186),l=n(93637),o=n(77548),i=n(37757),s=n(13313),a=n(97887),u=n(68548),c=n(58592),y=n(75981),m=n(65365),p=n(94985),d=n(31593),f=n(53930),b=n(68249),g=n(68197),h=n(7762),w=(n(44208),n(90629)),S=n(27845),A=n(11506),C=n(39065),v=n(59868),M=n(93470);y.A.fromSimpleMarkerSymbol(v.UK),a.A.fromSimpleLineSymbol(v.A7),m.A.fromSimpleFillSymbol(v.Cx),new u.A({symbolLayers:new h.A([new S.A({material:{color:M.fT},edges:new C.A({size:(0,w.PN)(1),color:new g.A(M.JR)})})])});const T=new a.A({symbolLayers:new h.A([new A.A({material:{color:new g.A([0,0,0])},size:(0,w.PN)(1)})])}),L=new m.A({symbolLayers:new h.A([new S.A({outline:{color:new g.A([0,0,0]),size:(0,w.PN)(1)}})])});var D=n(33910);const E="#useCIMFallbackSymbology()",U={retainId:!1,ignoreDrivers:!1,hasLabelingContext:!0};function N(e,t,n,r){const o=k(e,{},{context:r,isLabelSymbol:!1});null!=o&&(0,l.sM)(n,o,t)}function I(e,t,n,r){const l=k(e,{},{context:r,isLabelSymbol:!0});null!=l&&(t[n]=l)}function x(e){return(0,D.wk)(e)||e instanceof i.A}function k(e,t,n){if(null==e)return null;const{context:l,isLabelSymbol:g}=n,h=l?.origin,w=l?.messages;if("web-scene"===h&&!x(e)){const n=function(e,t=U){if(!e)return{symbol:null};const{retainId:n=U.retainId,ignoreDrivers:l=U.ignoreDrivers,hasLabelingContext:o=U.hasLabelingContext,retainCIM:g=U.retainCIM,cimFallbackEnabled:h=U.cimFallbackEnabled}=t;let w=null;if((0,D.wk)(e))w=e.clone();else if("web-style"===e.type)w=e.clone();else if("cim"===e.type){const n=e.data?.symbol?.type;switch(n){case"CIMPointSymbol":w=g?e.clone():y.A.fromCIMSymbol(e);break;case"CIMLineSymbol":h&&(w=T.clone(),t?.logWarning?.(E,"Unsupported CIM line symbology converted to fallback 3D line symbology"));break;case"CIMPolygonSymbol":h&&(w=L.clone(),t?.logWarning?.(E,"Unsupported CIM polygon symbology converted to fallback 3D polygon symbology"))}if(!w)return{error:new r.A("symbol-conversion:unsupported-cim-symbol",`CIM symbol of type '${n||"unknown"}' is unsupported in 3D`,{symbol:e})}}else if(e instanceof d.A)w=a.A.fromSimpleLineSymbol(e);else if(e instanceof f.A)w=y.A.fromSimpleMarkerSymbol(e);else if(e instanceof c.A)w=y.A.fromPictureMarkerSymbol(e);else if(e instanceof p.A)w=t.geometryType&&"mesh"===t.geometryType?u.A.fromSimpleFillSymbol(e):m.A.fromSimpleFillSymbol(e);else{if(!(e instanceof b.A))return{error:new r.A("symbol-conversion:unsupported-2d-symbol",`2D symbol of type '${e.type||e.declaredClass}' is unsupported in 3D`,{symbol:e})};w=o?s.A.fromTextSymbol(e):y.A.fromTextSymbol(e)}return n&&w&&"cim"!==w.type&&(w.id=e.id),!l||"cim"===w.type||w instanceof i.A||w.symbolLayers.forEach(e=>e.ignoreDrivers=!0),{symbol:w}}(e,{retainCIM:!0,hasLabelingContext:g});return null!=n.symbol?n.symbol.write(t,l):(w?.push(new r.A("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView`,{symbol:e,context:l,error:n.error})),null)}return(0,o.TU)(l?.layer)&&(S=e,"polygon-3d"===S?.type||"line-3d"===S?.type)?(w?.push(new r.A("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported on layers of type '${l?.layer?.declaredClass}'.`,{symbol:e,context:l})),null):("web-map"===h||"portal-item"===h&&!(0,o.TU)(l?.layer))&&x(e)?(w?.push(new r.A("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in web maps and portal items. Use 2D symbology and CIMSymbol instead when working with MapView`,{symbol:e,context:l})),null):e.write(t,l);var S}function $(e,t){return(0,D.Bu)(e,null,t)}},77548:(e,t,n)=>{n.d(t,{Gh:()=>b,tk:()=>m,BR:()=>y,wI:()=>c,G$:()=>d,$x:()=>p,Ov:()=>s,W_:()=>a,OP:()=>f,TU:()=>i,XX:()=>o,jy:()=>u});var r=n(70333),l=n(43773);n(7762),n(84952),n(36563),n(36708),n(4146),new WeakMap,n(16215);const o={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function i(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function s(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function a(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function u(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}async function c(e,t){const n=r.id?.findServerInfo(e);if(null!=n?.currentVersion)return n.owningSystemUrl||null;const o=e.toLowerCase().indexOf("/rest/services");if(-1===o)return null;const i=`${e.slice(0,o)}/rest/info`,s=null!=t?t.signal:null,{data:a}=await(0,l.A)(i,{query:{f:"json"},responseType:"json",signal:s});return a?.owningSystemUrl||null}function y(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function m(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function p(e,t){return null}function d(e){return null}function f(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function b(e,t){if(!t||!f(e))return;const n=(e.url,null);n&&(e.url=n)}},79677:(e,t,n)=>{n.d(t,{A:()=>m});var r,l=n(31635),o=n(25482),i=n(88930),s=n(10107),a=(n(44208),n(53966),n(87811),n(36005)),u=n(64108),c=n(43937),y=n(98623);let m=class extends o.o{static{r=this}static get allTime(){return p}static get empty(){return d}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,l=e.end?.getTime()??e.end;return t===r&&n===l}expandTo(e,t=y.qU){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=(0,i.lL)(n,e,t));let l=this.end;if(l){const n=(0,i.lL)(l,e,t);l=l.getTime()===n.getTime()?n:(0,i.S1)(n,1,e,t)}return new r({start:n,end:l})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,l=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let i,s;return l>=t&&l<=n?i=l:t>=l&&t<=o&&(i=t),n>=l&&n<=o?s=n:o>=t&&o<=n&&(s=o),null==i||null==s||isNaN(i)||isNaN(s)?r.empty:new r({start:i===-1/0?null:new Date(i),end:s===1/0?null:new Date(s)})}offset(e,t,n=y.qU){if(this.isEmpty||this.isAllTime)return this.clone();const l=new r,{start:o,end:s}=this;return null!=o&&(l.start=(0,i.S1)(o,e,t,n)),null!=s&&(l.end=(0,i.S1)(s,e,t,n)),l}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,n=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:n})}};(0,l.Cg)([(0,s.MZ)({type:Date,json:{write:{allowNull:!0}}})],m.prototype,"end",void 0),(0,l.Cg)([(0,a.w)("end")],m.prototype,"readEnd",null),(0,l.Cg)([(0,c.K)("end")],m.prototype,"writeEnd",null),(0,l.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],m.prototype,"isAllTime",null),(0,l.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],m.prototype,"isEmpty",null),(0,l.Cg)([(0,s.MZ)({type:Date,json:{write:{allowNull:!0}}})],m.prototype,"start",void 0),(0,l.Cg)([(0,a.w)("start")],m.prototype,"readStart",null),(0,l.Cg)([(0,c.K)("start")],m.prototype,"writeStart",null),m=r=(0,l.Cg)([(0,u.$)("esri.time.TimeExtent")],m);const p=new m,d=new m({start:void 0,end:void 0})},85594:(e,t,n)=>{n.d(t,{jg:()=>h,cF:()=>y,bo:()=>m,yA:()=>f,o5:()=>p});var r=n(43773),l=n(49186),o=n(44208),i=n(74887),s=n(84952),a=n(20655),u=n(16405);const c=new Map;function y(e,t,n){return null!=e?.styleUrl?async function(e,t){try{return{data:(await f(e,t)).data,baseUrl:(0,s.nM)(e),styleUrl:e}}catch(e){return(0,i.QP)(e),null}}(e.styleUrl,n):null!=e?.styleName?function(e,t,n){const r=null!=t.portal?t.portal:a.A.getDefault();let o;const i=`${r.url} - ${r.user?.username} - ${e}`,s=c.get(i);if(s)return s;const y=function(e,t,n){return t.load(n).then(()=>{const r=new u.A({disableExtraQuery:!0,query:`owner:${b} AND type:${g} AND typekeywords:"${e}"`});return t.queryItems(r,n)}).then(({results:t})=>{let r=null;const o=e.toLowerCase();if(t&&Array.isArray(t))for(const e of t){const t=e.typeKeywords?.some(e=>e.toLowerCase()===o);if(t&&e.type===g&&e.owner===b){r=e;break}}if(!r)throw new l.A("symbolstyleutils:style-not-found",`The style '${e}' could not be found`,{styleName:e});return r.load(n)})}(e,r,n).then(e=>(o=e,e.fetchData())).then(t=>({data:t,baseUrl:o.itemUrl??"",styleName:e}));return c.set(i,y),y}(e.styleName,t,n):Promise.reject(new l.A("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function m(e){return null===e||"CIMSymbolReference"===e.type?e:{type:"CIMSymbolReference",symbol:e}}function p(e,t){for(const n of t)switch(n){case"cim":if(e.cimRef)return{format:n,url:encodeURI(e.cimRef)};break;case"web-gltf-basisu":{const t=d(e,"gltf_basisu");if(t)return{format:n,url:t};break}case"web-gltf":{const t=d(e,"gltf");if(t)return{format:n,url:t};break}case"web":{const t=d(e,"gltf");if(t)return{format:"web-gltf",url:t};if(e.webRef)return{format:n,url:encodeURI(e.webRef)};break}}}function d(e,t){if(!(0,o.A)("enable-feature:force-wosr"))return e.formatInfos?.find(e=>e.type===t)?.href}function f(e,t){const n={responseType:"json",query:{f:"json"},...t};return(0,r.A)((0,s.S8)(e),n)}const b="esri_en",g="Style",h="https://cdn.arcgis.com/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f=json"},93470:(e,t,n)=>{n.d(t,{Cb:()=>o,HW:()=>c,JR:()=>l,JZ:()=>a,WR:()=>s,b6:()=>y,fT:()=>r,nC:()=>u,yM:()=>i});const r=[252,146,31,255],l=[153,153,153,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},i={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r},s={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},y={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7548,7883],{4146:(e,t,n)=>{n.d(t,{A:()=>w});var r=n(31635),l=n(43773),o=n(49186),i=n(65529),s=n(4902),a=n(92474),u=n(53966),c=n(74887),y=n(84952),m=n(10107),p=(n(44208),n(87811),n(64108)),d=n(5443),f=n(16930),b=n(92602),g=n(79677);let h=0,w=class extends((0,i.Zt)((0,s.s)(a.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new d.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+h++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([n.e(812),n.e(7982)]).then(n.bind(n,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await Promise.all([n.e(812),n.e(5613),n.e(5710)]).then(n.bind(n,45613));try{return await r(t)}catch(e){const n=t?.portalItem,r=n?.id||"unset",l=n?.portal?.url||b.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+l+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,y.An)(this.url)}createLayerView(e,t){return Promise.reject(new o.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,l.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r.Cg)([(0,m.MZ)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],w.prototype,"effectiveVisible",null),(0,r.Cg)([(0,m.MZ)({type:d.A})],w.prototype,"fullExtent",void 0),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,r.Cg)([(0,m.MZ)({type:String,clonable:!1})],w.prototype,"id",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,m.MZ)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,r.Cg)([(0,m.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,r.Cg)([(0,m.MZ)({clonable:!1})],w.prototype,"parent",void 0),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,r.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],w.prototype,"persistenceEnabled",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,r.Cg)([(0,m.MZ)({type:f.A})],w.prototype,"spatialReference",void 0),(0,r.Cg)([(0,m.MZ)({type:String})],w.prototype,"title",void 0),(0,r.Cg)([(0,m.MZ)({readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,r.Cg)([(0,m.MZ)()],w.prototype,"url",void 0),(0,r.Cg)([(0,m.MZ)({type:g.A})],w.prototype,"visibilityTimeExtent",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,r.Cg)([(0,p.$)("esri.layers.Layer")],w)},16215:(e,t,n)=>{n.d(t,{S:()=>l,Y:()=>r});const r=Symbol("BasemapInstance");function l(e){return null!=e&&"object"==typeof e&&r in e}},27883:(e,t,n)=>{n.d(t,{resolveWebStyleSymbol:()=>d});var r=n(61473),l=n(49186),o=n(84952),i=n(20655),s=n(97159),a=n(73838),u=n(98751),c=n(85594),y=n(57212),m=n(33910);const p=["web-gltf","web","cim"];function d(e,t,n){const r=e.name;return null==r?Promise.reject(new l.A("symbolstyleutils:style-symbol-reference-name-missing","Missing name in style symbol reference")):"Esri2DPointSymbolsStyle"===e.styleName?function(e,t,n){const r=c.jg.replaceAll(/\{SymbolName\}/gi,e),l=null!=t.portal?t.portal:i.A.getDefault();return(0,c.yA)(r,n).then(e=>{const t=(0,c.bo)(e.data);return(0,a.rS)(t,{portal:l,url:(0,o.An)((0,o.nM)(r)),origin:"portal-item"})})}(r,t,n):(0,c.cF)(e,t,n).then(e=>f(e,r,t,c.o5,n))}async function f(e,t,n,d,f){const b=null!=n?.portal?n.portal:i.A.getDefault(),g={portal:b,url:(0,o.An)(e.baseUrl)},h=function(e,t){return t.items.find(t=>t.name===e)}(t,e.data);if(!h)throw new l.A("symbolstyleutils:symbol-name-not-found",`The symbol name '${t}' could not be found`,{symbolName:t});const w=f?.acceptedFormats??p,S=d(h,w);if(!S)throw new l.A("symbolstyleutils:symbol-reference-no-accepted-format",`The symbol name '${t}' does not have an accepted format (one of ${w})`,{symbolName:t});const{url:A,format:C}=S;let v=(0,s.f)(A,g),M=h.thumbnail?.href??null;const T=h.thumbnail?.imageData;(0,r.b5)()&&(v=(0,r.EM)(v)??"",M=(0,r.EM)(M));const L={portal:b,url:(0,o.An)((0,o.nM)(v)),origin:"portal-item"};return(0,c.yA)(v,f).then(r=>{const l="cim"===C?(0,c.bo)(r.data):r.data,o=(0,a.rS)(l,L);if(o&&(0,m.wk)(o)){if(M){const e=(0,s.f)(M,g);o.thumbnail=new y.V({url:e})}else T&&(o.thumbnail=new y.V({url:`data:image/png;base64,${T}`}));e.styleUrl?o.styleOrigin=new u.A({portal:n.portal,styleUrl:e.styleUrl,name:t}):e.styleName&&(o.styleOrigin=new u.A({portal:n.portal,styleName:e.styleName,name:t}))}return o})}},59868:(e,t,n)=>{n.d(t,{A7:()=>u,Cx:()=>c,Hk:()=>y,UK:()=>a}),n(44208);var r=n(94985),l=n(31593),o=n(53930),i=n(68249),s=n(93470);const a=o.A.fromJSON(s.Cb),u=l.A.fromJSON(s.yM),c=r.A.fromJSON(s.WR),y=i.A.fromJSON(s.JZ);o.A.fromJSON(s.nC),l.A.fromJSON(s.HW),r.A.fromJSON(s.b6)},61473:(e,t,n)=>{function r(e){return e=e||globalThis.location.hostname,u.some(t=>null!=e?.match(t))}function l(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(o)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(i)||null!=t.match(a)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}n.d(t,{EM:()=>l,b5:()=>r});const o=/^devext\.arcgis\.com$/,i=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,a=/^[\w-]*\.mapsqa\.arcgis\.com$/,u=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,o,i,/^jsapps\.esri\.com$/,s,a]},73838:(e,t,n)=>{n.d(t,{rS:()=>$,M9:()=>N,oO:()=>I});var r=n(49186),l=n(93637),o=n(77548),i=n(37757),s=n(13313),a=n(97887),u=n(68548),c=n(58592),y=n(75981),m=n(65365),p=n(94985),d=n(31593),f=n(53930),b=n(68249),g=n(68197),h=n(7762),w=(n(44208),n(90629)),S=n(27845),A=n(11506),C=n(39065),v=n(59868),M=n(93470);y.A.fromSimpleMarkerSymbol(v.UK),a.A.fromSimpleLineSymbol(v.A7),m.A.fromSimpleFillSymbol(v.Cx),new u.A({symbolLayers:new h.A([new S.A({material:{color:M.fT},edges:new C.A({size:(0,w.PN)(1),color:new g.A(M.JR)})})])});const T=new a.A({symbolLayers:new h.A([new A.A({material:{color:new g.A([0,0,0])},size:(0,w.PN)(1)})])}),L=new m.A({symbolLayers:new h.A([new S.A({outline:{color:new g.A([0,0,0]),size:(0,w.PN)(1)}})])});var D=n(33910);const E="#useCIMFallbackSymbology()",U={retainId:!1,ignoreDrivers:!1,hasLabelingContext:!0};function N(e,t,n,r){const o=x(e,{},{context:r,isLabelSymbol:!1});null!=o&&(0,l.sM)(n,o,t)}function I(e,t,n,r){const l=x(e,{},{context:r,isLabelSymbol:!0});null!=l&&(t[n]=l)}function k(e){return(0,D.wk)(e)||e instanceof i.A}function x(e,t,n){if(null==e)return null;const{context:l,isLabelSymbol:g}=n,h=l?.origin,w=l?.messages;if("web-scene"===h&&!k(e)){const n=function(e,t=U){if(!e)return{symbol:null};const{retainId:n=U.retainId,ignoreDrivers:l=U.ignoreDrivers,hasLabelingContext:o=U.hasLabelingContext,retainCIM:g=U.retainCIM,cimFallbackEnabled:h=U.cimFallbackEnabled}=t;let w=null;if((0,D.wk)(e))w=e.clone();else if("web-style"===e.type)w=e.clone();else if("cim"===e.type){const n=e.data?.symbol?.type;switch(n){case"CIMPointSymbol":w=g?e.clone():y.A.fromCIMSymbol(e);break;case"CIMLineSymbol":h&&(w=T.clone(),t?.logWarning?.(E,"Unsupported CIM line symbology converted to fallback 3D line symbology"));break;case"CIMPolygonSymbol":h&&(w=L.clone(),t?.logWarning?.(E,"Unsupported CIM polygon symbology converted to fallback 3D polygon symbology"))}if(!w)return{error:new r.A("symbol-conversion:unsupported-cim-symbol",`CIM symbol of type '${n||"unknown"}' is unsupported in 3D`,{symbol:e})}}else if(e instanceof d.A)w=a.A.fromSimpleLineSymbol(e);else if(e instanceof f.A)w=y.A.fromSimpleMarkerSymbol(e);else if(e instanceof c.A)w=y.A.fromPictureMarkerSymbol(e);else if(e instanceof p.A)w=t.geometryType&&"mesh"===t.geometryType?u.A.fromSimpleFillSymbol(e):m.A.fromSimpleFillSymbol(e);else{if(!(e instanceof b.A))return{error:new r.A("symbol-conversion:unsupported-2d-symbol",`2D symbol of type '${e.type||e.declaredClass}' is unsupported in 3D`,{symbol:e})};w=o?s.A.fromTextSymbol(e):y.A.fromTextSymbol(e)}return n&&w&&"cim"!==w.type&&(w.id=e.id),!l||"cim"===w.type||w instanceof i.A||w.symbolLayers.forEach(e=>e.ignoreDrivers=!0),{symbol:w}}(e,{retainCIM:!0,hasLabelingContext:g});return null!=n.symbol?n.symbol.write(t,l):(w?.push(new r.A("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView`,{symbol:e,context:l,error:n.error})),null)}return(0,o.TU)(l?.layer)&&(S=e,"polygon-3d"===S?.type||"line-3d"===S?.type)?(w?.push(new r.A("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported on layers of type '${l?.layer?.declaredClass}'.`,{symbol:e,context:l})),null):("web-map"===h||"portal-item"===h&&!(0,o.TU)(l?.layer))&&k(e)?(w?.push(new r.A("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in web maps and portal items. Use 2D symbology and CIMSymbol instead when working with MapView`,{symbol:e,context:l})),null):e.write(t,l);var S}function $(e,t){return(0,D.Bu)(e,null,t)}},77548:(e,t,n)=>{n.d(t,{Gh:()=>g,tk:()=>p,BR:()=>m,wI:()=>y,G$:()=>f,$x:()=>d,Ov:()=>a,UC:()=>o,W_:()=>u,OP:()=>b,TU:()=>s,XX:()=>i,jy:()=>c});var r=n(70333),l=n(43773);function o(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph-sublayer"===e.type}n(7762),n(84952),n(36563),n(36708),n(4146),new WeakMap,n(16215);const i={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function s(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function a(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function u(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function c(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}async function y(e,t){const n=r.id?.findServerInfo(e);if(null!=n?.currentVersion)return n.owningSystemUrl||null;const o=e.toLowerCase().indexOf("/rest/services");if(-1===o)return null;const i=`${e.slice(0,o)}/rest/info`,s=null!=t?t.signal:null,{data:a}=await(0,l.A)(i,{query:{f:"json"},responseType:"json",signal:s});return a?.owningSystemUrl||null}function m(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function p(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function d(e,t){return null}function f(e){return null}function b(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function g(e,t){if(!t||!b(e))return;const n=(e.url,null);n&&(e.url=n)}},79677:(e,t,n)=>{n.d(t,{A:()=>m});var r,l=n(31635),o=n(25482),i=n(88930),s=n(10107),a=(n(44208),n(53966),n(87811),n(36005)),u=n(64108),c=n(43937),y=n(98623);let m=class extends o.o{static{r=this}static get allTime(){return p}static get empty(){return d}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,l=e.end?.getTime()??e.end;return t===r&&n===l}expandTo(e,t=y.qU){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=(0,i.lL)(n,e,t));let l=this.end;if(l){const n=(0,i.lL)(l,e,t);l=l.getTime()===n.getTime()?n:(0,i.S1)(n,1,e,t)}return new r({start:n,end:l})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,l=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let i,s;return l>=t&&l<=n?i=l:t>=l&&t<=o&&(i=t),n>=l&&n<=o?s=n:o>=t&&o<=n&&(s=o),null==i||null==s||isNaN(i)||isNaN(s)?r.empty:new r({start:i===-1/0?null:new Date(i),end:s===1/0?null:new Date(s)})}offset(e,t,n=y.qU){if(this.isEmpty||this.isAllTime)return this.clone();const l=new r,{start:o,end:s}=this;return null!=o&&(l.start=(0,i.S1)(o,e,t,n)),null!=s&&(l.end=(0,i.S1)(s,e,t,n)),l}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,n=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:n})}};(0,l.Cg)([(0,s.MZ)({type:Date,json:{write:{allowNull:!0}}})],m.prototype,"end",void 0),(0,l.Cg)([(0,a.w)("end")],m.prototype,"readEnd",null),(0,l.Cg)([(0,c.K)("end")],m.prototype,"writeEnd",null),(0,l.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],m.prototype,"isAllTime",null),(0,l.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],m.prototype,"isEmpty",null),(0,l.Cg)([(0,s.MZ)({type:Date,json:{write:{allowNull:!0}}})],m.prototype,"start",void 0),(0,l.Cg)([(0,a.w)("start")],m.prototype,"readStart",null),(0,l.Cg)([(0,c.K)("start")],m.prototype,"writeStart",null),m=r=(0,l.Cg)([(0,u.$)("esri.time.TimeExtent")],m);const p=new m,d=new m({start:void 0,end:void 0})},85594:(e,t,n)=>{n.d(t,{jg:()=>h,cF:()=>y,bo:()=>m,yA:()=>f,o5:()=>p});var r=n(43773),l=n(49186),o=n(44208),i=n(74887),s=n(84952),a=n(20655),u=n(16405);const c=new Map;function y(e,t,n){return null!=e?.styleUrl?async function(e,t){try{return{data:(await f(e,t)).data,baseUrl:(0,s.nM)(e),styleUrl:e}}catch(e){return(0,i.QP)(e),null}}(e.styleUrl,n):null!=e?.styleName?function(e,t,n){const r=null!=t.portal?t.portal:a.A.getDefault();let o;const i=`${r.url} - ${r.user?.username} - ${e}`,s=c.get(i);if(s)return s;const y=function(e,t,n){return t.load(n).then(()=>{const r=new u.A({disableExtraQuery:!0,query:`owner:${b} AND type:${g} AND typekeywords:"${e}"`});return t.queryItems(r,n)}).then(({results:t})=>{let r=null;const o=e.toLowerCase();if(t&&Array.isArray(t))for(const e of t){const t=e.typeKeywords?.some(e=>e.toLowerCase()===o);if(t&&e.type===g&&e.owner===b){r=e;break}}if(!r)throw new l.A("symbolstyleutils:style-not-found",`The style '${e}' could not be found`,{styleName:e});return r.load(n)})}(e,r,n).then(e=>(o=e,e.fetchData())).then(t=>({data:t,baseUrl:o.itemUrl??"",styleName:e}));return c.set(i,y),y}(e.styleName,t,n):Promise.reject(new l.A("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function m(e){return null===e||"CIMSymbolReference"===e.type?e:{type:"CIMSymbolReference",symbol:e}}function p(e,t){for(const n of t)switch(n){case"cim":if(e.cimRef)return{format:n,url:encodeURI(e.cimRef)};break;case"web-gltf-basisu":{const t=d(e,"gltf_basisu");if(t)return{format:n,url:t};break}case"web-gltf":{const t=d(e,"gltf");if(t)return{format:n,url:t};break}case"web":{const t=d(e,"gltf");if(t)return{format:"web-gltf",url:t};if(e.webRef)return{format:n,url:encodeURI(e.webRef)};break}}}function d(e,t){if(!(0,o.A)("enable-feature:force-wosr"))return e.formatInfos?.find(e=>e.type===t)?.href}function f(e,t){const n={responseType:"json",query:{f:"json"},...t};return(0,r.A)((0,s.S8)(e),n)}const b="esri_en",g="Style",h="https://cdn.arcgis.com/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f=json"},93470:(e,t,n)=>{n.d(t,{Cb:()=>o,HW:()=>c,JR:()=>l,JZ:()=>a,WR:()=>s,b6:()=>y,fT:()=>r,nC:()=>u,yM:()=>i});const r=[252,146,31,255],l=[153,153,153,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},i={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r},s={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},y={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -1,3 +1,3 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v3.3.1 */
3
+ v3.3.2 */
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8948],{6518:(e,t,n)=>{n.d(t,{F:()=>a});var i=n(44208),r=n(75503),s=n(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.wq(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((n,i)=>{e[t++]=i}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,s.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,n)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},8460:(e,t,n)=>{n.d(t,{$C:()=>y,Hh:()=>o,Tu:()=>c,Wg:()=>h,Xq:()=>g,i6:()=>f,pM:()=>u,vJ:()=>m});var i=n(2741);let r,s=null;function o(){return r||(r=n.e(3666).then(n.bind(n,3666)).then(e=>e.l).then(({default:e})=>e({locateFile:e=>(0,i.s)(`esri/libs/linkchartlayout/${e}`)})).then(e=>{!function(e){s=e}(e)}),r)}const a={right:0,left:1,top:2,bottom:3},l={none:0,"start-only":1,"start-and-end":2};function p(e){const t={timeDirection:"right",timeBannerUTCOffsetInMinutes:0,eventsTicksVisualization:"start-and-end",showDurationLineForNonZeroDurationEntityEvents:!0,durationLineWidth:5,entityPositionAtDurationRatio:1,showNonZeroDurationIntervalBounds:!1,separateTimeOverlaps:!0,separateTimelineOverlaps:!0,moveFirstBends:!0,secondBendRatio:.3,lineSeparationMultiplier:1,spaceSeparatedLinesEvenly:!1,useBezierCurves:!1,separatedLineShapeRatio:0,...e?.toJSON(),eventsTicksVisualization:e?.eventsTicksVisualization??"start-and-end"};return{...t,timeDirection:{value:a[t.timeDirection]??a.right},eventsTicksVisualization:{value:l[t.eventsTicksVisualization]??l["start-and-end"]}}}function d(e,t,n,i,r,o){const a=n.length,l=r.length,p=Float64Array.BYTES_PER_ELEMENT,d=Uint32Array.BYTES_PER_ELEMENT,u=Uint8Array.BYTES_PER_ELEMENT,c=16+a*(u+2*p)+l*(2*d),h=s._malloc(c);try{const u=h+16-h%16,c=u+a*p,y=c+a*p,m=y+l*d,g=m+l*d,f=()=>[s.HEAPF64.subarray(u>>3,(u>>3)+a),s.HEAPF64.subarray(c>>3,(c>>3)+a),s.HEAPU32.subarray(y>>2,(y>>2)+l),s.HEAPU32.subarray(m>>2,(m>>2)+l),s.HEAPU8.subarray(g,g+a)],[b,w,_,M,I]=f();b.set(n),w.set(i),_.set(r),M.set(o),I.set(t);const T=e(a,g,u,c,l,y,m);let C=null,v=null;if(0===T.value){const e=s.getLayoutLinksTypes(),t=s.getLayoutLinksVerticesEndIndices(),n=s.getLayoutLinksVertices(),i=s.countLayoutLinksVertices();!l||e&&t?i&&!n?T.value=1:(C={types:new Uint8Array(s.HEAPU8.subarray(e,e+l)),vertexEndIndex:new Uint32Array(s.HEAPU32.subarray(t>>2,(t>>2)+l)),vertices:new Float64Array(s.HEAPF64.subarray(n>>3,(n>>3)+2*i))},v=s.getAuxiliaryGraphicElements()):T.value=1}const[A,x,E,S,k]=f();return n.set(A),i.set(x),r.set(E),o.set(S),t.set(k),{status:T.value,links:C,graphics:v}}finally{s._free(h),s.cleanupLayout()}}var u,c,h,y,m,g,f,b;(b=u||(u={})).getMinIdealEdgeLength=function(){return s.getMinIdealEdgeLength()},b.apply=function(e,t,n,i,r,o,a=2,l=1,p=-1){return d((t,n,i,r,o,d,u)=>s.applyForceDirectedLayout(e,t,n,i,r,o,d,u,a,l,p),t,n,i,r,o)},function(e){e.apply=function(e,t,n,i,r,o,a=2,l=1,p=-1){return d((t,n,i,r,o,d,u)=>s.applyCommunityLayout(e,t,n,i,r,o,d,u,a,l,p),t,n,i,r,o)}}(c||(c={})),function(e){e.apply=function(e,t,n,i,r,o){return d((t,n,i,r,o,a,l)=>s.applySimpleLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(h||(h={})),function(e){e.apply=function(e,t,n,i,r,o){return d((t,n,i,r,o,a,l)=>s.applyHierarchicalLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(y||(y={})),function(e){e.apply=function(e,t,n,i,r,o){return d((t,n,i,r,o,a,l)=>s.applyRadialTreeLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(m||(m={})),function(e){e.apply=function(e,t,n,i,r,o){return d((t,n,i,r,o,a,l)=>s.applySmartTreeLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(g||(g={})),function(e){e.apply=function(e,t,n,i,r,o,a,l,u,c,h,y){return d((t,n,i,a,l,d,m)=>{if(r.length!==t)return{value:1};if(o.length!==t)return{value:1};if(u.length!==l)return{value:1};if(c.length!==l)return{value:1};const g=Float64Array.BYTES_PER_ELEMENT,f=16,b=s._malloc(f+t*g),w=s._malloc(f+t*g),_=s._malloc(f+l*g),M=s._malloc(f+l*g),I=b+f-b%f,T=w+f-w%f,C=_+f-_%f,v=M+f-M%f;try{return s.HEAPF64.subarray(I>>3,(I>>3)+t).set(r),s.HEAPF64.subarray(T>>3,(T>>3)+t).set(o),s.HEAPF64.subarray(C>>3,(C>>3)+l).set(u),s.HEAPF64.subarray(v>>3,(v>>3)+l).set(c),s.applyChronologicalLayout(e,t,n,i,a,I,T,l,d,m,C,v,h,p(y))}finally{s._free(b),s._free(w),s._free(_),s._free(M)}},t,n,i,a,l)}}(f||(f={}))},15375:(e,t,n)=>{n.d(t,{BL:()=>l,Cz:()=>r,KQ:()=>s,M1:()=>a,T1:()=>o,dr:()=>i});const i="ESRI__ID",r="ESRI__OriginID",s="ESRI__DestID",o="ESRI__LayoutGeometry",a="ESRI__AggregationCount",l="LC.ESRI__IsSpatial"},23150:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(31635),r=n(10107),s=(n(44208),n(53966),n(87811),n(64108)),o=n(82799),a=n(54238);let l=class extends a.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],l.prototype,"originId",void 0),(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],l.prototype,"destinationId",void 0),(0,i.Cg)([(0,r.MZ)({type:o.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,i.Cg)([(0,s.$)("esri.rest.knowledgeGraph.Relationship")],l)},24137:(e,t,n)=>{n.d(t,{P:()=>T});var i=n(31635),r=n(69622),s=n(49186),o=n(53966),a=n(91869),l=n(74887),p=n(39516),d=n(10107),u=(n(44208),n(87811),n(64108)),c=n(5443),h=n(39829),y=n(91218),m=n(21325),g=n(15375);const f=(e,t)=>{if("column-reference"===e.type)return e.column===t.systemOidFieldName?"ID(n)":`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&t.supportedSqlTypes.has(e.left.type)&&t.supportedSqlTypes.has(e.right.type)&&t.supportedSqlOperators.has(e.operator))return`${f(e.left,t)} ${e.operator} ${f(e.right,t)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let n="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)n+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return t.unsupportedOperationFound=!0,"";n+=`lower(n.${e.left.column})`}if(n+=" CONTAINS (","string"!==e.right.type)return t.unsupportedOperationFound=!0,"";{let t=e.right.value;t.startsWith("%")&&(t=t.slice(1)),t.endsWith("%")&&(t=t.slice(0,-1)),n+=`'${t.toLowerCase()}')`}return n}return t.unsupportedOperationFound=!0,""};var b=n(69860),w=n(30504),_=n(62568),M=n(42538),I=n(61956);let T=class extends r.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach(n=>{n.name&&(t.set(n.name,"entity"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(n.name),n.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.knowledgeGraph.dataModel.relationshipTypes?.forEach(n=>{n.name&&(t.set(n.name,"relationship"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(n.name),n.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.inclusionModeDefinition?.namedTypeDefinitions.forEach((n,i)=>{if("entity"===t.get(i))this.entityTypeNames.add(i);else{if("relationship"!==t.get(i))return o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(i);this.relationshipTypeNames.add(i)}const r=new Map;n.members?.forEach(e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,()=>new Set).add(i)}),this.sublayerCaches.set(i,r)})}addToLayer(e){e.forEach(({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new s.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const n=this.inclusionModeDefinition.namedTypeDefinitions.get(e);n.members||(n.members=new Map),n.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}}else{const n=new Map;n.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:n}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}})}getById(e){return b.A.getInstance().readFromStoreById(e)}async getData(e,t,n){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let i;if(i=e||new I.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,n=this._processingCacheUpdatesLookup.get(t.objectType.name??""),r=i.outFields;r&&1===r.length&&r[0]===g.dr&&"1=1"===i.where||await Promise.all(n??[]);const s=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],o=[];return s.forEach(n=>{if(this.relationshipTypeNames.has(t.objectType.name)){n.geometry=e.relationshipLinkChartDiagramLookup.get(n.attributes[t.objectIdField]);const i=this.memberIdTypeLookup.get(n.attributes[g.Cz]),r=this.memberIdTypeLookup.get(n.attributes[g.KQ]),s=this._isEndEntitySpatial(i,n,g.Cz),o=this._isEndEntitySpatial(r,n,g.KQ);n.attributes[g.BL]=Number(s&&o)}else{n.geometry=e.entityLinkChartDiagramLookup.get(n.attributes[t.objectIdField]);const i=this.geographicLookup.get(t.objectType.name);i&&n.attributes[i.name]?n.attributes[g.BL]=1:n.attributes[g.BL]=0}n.attributes[g.T1]=n.geometry,o.push(n)}),o}return this.retrieveDataFromService(i,t,n)}async getConnectedRecordIds(e,t,n){const i=[];let r="";const s=this._getNamedTypeIdMapFromNodeIds(e);if(t&&0!==t?.length){for(const e of t)r=r+e+"|";r=r.slice(0,-1)}const o={},a=[];for(const[e,n]of s){const i=`${e}_ids`;o[i]=n,t&&0!==t?.length?a.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r:${r}]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`):a.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`)}if(!a.length)return i;const l=a.join(" UNION "),p=(await(0,_.executeQueryStreaming)(this.knowledgeGraph,new M.A({openCypherQuery:l,bindParameters:o}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];i.push({id:n[0],typeName:n[1]}),i.push({id:n[2],typeName:n[3]})}}return i}async getRelationshipsBetweenNodes(e,t,n){const i=this._getNamedTypeIdMapFromNodeIds(e);if(0===i.size)return[];const r={relationshipExclusionIds:t,possibleConnectionEntityIds:e},s=[];for(const[e,t]of i.entries()){const n=`${e}_ids`;r[n]=t,s.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]->(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const o=s.join(" UNION "),a=[],l=(await(0,_.executeQueryStreaming)(this.knowledgeGraph,new M.A({openCypherQuery:o,bindParameters:r}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await l.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];a.push({id:n[0],typeName:n[1]})}}return a}async getRelationshipsFromNodes(e,t,n,i){const r=this._getNamedTypeIdMapFromNodeIds(e);if(0===r.size||0===t.length)return[];const s={relationshipExclusionIds:n,possibleConnectionEntityIds:t},o=[];for(const[e,t]of r.entries()){const n=`${e}_ids`;s[n]=t,o.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]-(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const a=o.join(" UNION "),l=new Map,p=(await(0,_.executeQueryStreaming)(this.knowledgeGraph,new M.A({openCypherQuery:a,bindParameters:s}),{signal:i?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];let i=l.get(n[1]);i||(i=new Set,l.set(n[1],i)),i.add(n[0])}}const d=[];for(const[e,t]of l)for(const n of t)d.push({id:n,typeName:e});return d}async refreshCacheContent(e,t,n,i=!0,r){const o=b.A.getInstance(),p=[],d=new Map,u=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&u.set(e.name,e)}),this.knowledgeGraph.dataModel.relationshipTypes?.forEach(e=>{e.name&&u.set(e.name,e)}),e||this.inclusionModeDefinition?e?e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))d.has(t)?d.get(t)?.push(e):d.set(t,[e])}):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{e.useAllData?d.set(t,null):e.members&&e.members.forEach(e=>{d.has(t)&&null!==d.get(t)?d.get(t)?.push(e.id):d.set(t,[e.id])})}):(this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,null)}),this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,null)}));for(const[e,l]of d){const d=new Set(l),c=new Promise((p,c)=>{(async()=>{const p=new Set,c=[];let h,y="",m=!1;if(t||u.get(e)?.properties?.forEach(e=>{e.name&&p.add(e.name)}),n&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&p.add(t)}if(this.entityTypeNames.has(e))y=`MATCH (n:${e}) ${l?"WHERE id(n) IN $ids ":""}return ID(n)`,p.forEach(e=>{y+=`, n.${e}`,c.push(e)});else{if(!this.relationshipTypeNames.has(e))throw new s.A("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);m=!0,y=`MATCH ()-[n:${e}]->() ${l?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,p.forEach(e=>{y+=`, n.${e}`,c.push(e)})}h=new M.A(l?{openCypherQuery:y,bindParameters:{ids:l}}:{openCypherQuery:y});const f=(await(0,_.executeQueryStreaming)(this.knowledgeGraph,h,{signal:r?.signal})).resultRowsStream.getReader();for(;;){const{done:t,value:n}=await f.read();if(t)break;const r=[];for(let e=0;e<n.length;e++){const t=n[e];let i=0,s=0;const o={properties:{}};for(o.id=t[i],i++,s++,m&&(o.originId=t[i],i++,s++,o.destinationId=t[i],i++,s++,(0,a.tE)(this.nodeConnectionsLookup,o.originId,()=>new Set).add(o.id),(0,a.tE)(this.nodeConnectionsLookup,o.destinationId,()=>new Set).add(o.id),(0,a.tE)(this.relationshipConnectionsLookup,o.id,()=>[o.originId,o.destinationId]));i<t.length;i++)o.properties[c[i-s]]=t[i];d.delete(o.id),r.push(o)}const s=o.writeToStore(r,g.dr,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const l=this.sublayerCaches.get(e);s.forEach(t=>{l?.set(t.attributes[g.dr],t),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[g.dr])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[g.dr],{id:t.attributes[g.dr]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[g.dr],()=>new Set).add(e))})}const b=this.inclusionModeDefinition?.namedTypeDefinitions.get(e);if(b)for(const e of d)b.members?.delete(e)})().then(()=>{p(null)}).catch(e=>{"AbortError"===e.name?p(null):c(e)})});p.push(c),this._processingCacheUpdatesLookup.get(e)?.push(c)}if(await Promise.all(p),r?.signal?.aborted)throw(0,l.NK)()}removeFromLayer(e){const t=new Set,n=new Set(e.map(e=>e.id));for(const n of e)t.add(n.typeName),1===this.memberIdTypeLookup.get(n.id)?.size?this.memberIdTypeLookup.delete(n.id):this.memberIdTypeLookup.get(n.id)?.delete(n.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach((e,t)=>{t===n.typeName&&e.members?.has(n.id)&&e.members.delete(n.id)});t.forEach(e=>{this.sublayerCaches.get(e)?.forEach((t,i)=>{n.has(i)&&this.sublayerCaches.get(e)?.delete(i)})})}async retrieveDataFromService(e,t,n){const i=b.A.getInstance(),r=new Set,o=[];let a,l="",d=[];const u="relationship"===t.graphType,I=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,T=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let C=!I&&T?Array.from(T).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(C=e.objectIds);else if(null!=e.objectIds&&C&&C.length>0){const t=e.objectIds;e.objectIds=C.filter(e=>t.includes(e))}else if(null!=e.objectIds)C=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],[];e.objectIds=C}if(null!=e.outFields){const n=e.outFields;n.includes("*")?t.fields.forEach(e=>{r.add(e.name)}):n.forEach(e=>{e!==g.dr&&e!==t.geometryFieldName&&r.add(e)})}if(null!=e.geometry){const n=e.geometry;let i;const d=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,g=d?.spatialReference,f=d?.serviceCapabilities?.geometryCapabilities;let b=f?.geometryMaxBoundingRectangleSizeX,_=f?.geometryMaxBoundingRectangleSizeY;if("point"===n.type){let e=n;e.spatialReference?.isWGS84||(await(0,y.initializeProjection)(e.spatialReference,m.KK),e=(0,y.project)(e,m.KK)),i=new c.A({spatialReference:m.KK,xmin:e.x-1e-4,ymin:e.y-1e-4,xmax:e.x+1e-4,ymax:e.y+1e-4})}else n?.extent?.spatialReference&&!n.spatialReference?.isWGS84?(await(0,y.initializeProjection)(n.extent.spatialReference,m.KK),i=(0,y.project)(n.extent,m.KK)):i=n.extent;if(b&&_&&g){if(4326!==g.wkid){const e=new c.A({spatialReference:g,xmax:b,ymax:_}),t=(0,y.project)(e,m.KK);b=t.xmax,_=t.ymax}if(i.xmax-i.xmin>b)throw new s.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${b}° latitude, limit exceeded`);if(i.ymax-i.ymin>_)throw new s.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${_}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const n=await(0,p.GP)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach(e=>{n.fieldNames.includes(e.name)&&r.add(e.name)})}l=u?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach(e=>{l+=`, n.${e}`,o.push(e)}),a=new M.A({openCypherQuery:l,bindParameters:{param_filter_geom:new h.A({rings:(0,w.Wq)(i)})}})}else{let n="";if(null!=e.where&&"1=1"!==e.where){const i=await(0,p.GP)(e.where,t.fieldsIndex);t.fields.forEach(e=>{i.fieldNames.includes(e.name)&&r.add(e.name)});const s={systemOidFieldName:g.dr,supportedSqlTypes:new Set(["column-reference","string","number","binary-expression"]),supportedSqlOperators:new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]),unsupportedOperationFound:!1};n=f(i.parseTree,s),s.unsupportedOperationFound&&(n="")}let i="";i=u?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let s=!1;C&&(s=!0,i+=" WHERE ID(n) IN $ids"),n&&(i+=s?" AND":" WHERE",i+=` ${n}`),i+=" return ID(n)",u&&(i+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach(e=>{i+=`, n.${e}`,o.push(e)}),a=new M.A(C?{openCypherQuery:i,bindParameters:{ids:C}}:{openCypherQuery:i})}const v=(await(0,_.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,n)).resultRowsStream.getReader();for(;;){const{done:e,value:n}=await v.read();if(e)break;const r=[];for(let e=0;e<n.length;e++){const t=n[e];let i=0,s=0;const a={properties:{}};for(a.id=t[i],i++,s++,u&&(a.originId=t[i],i++,s++,a.destinationId=t[i],i++,s++);i<t.length;i++)a.properties[o[i-s]]=t[i];r.push(a)}d=d.concat(i.writeToStore(r,g.dr,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return d}_isEndEntitySpatial(e,t,n){for(const i of e??[])if(this.entityTypeNames.has(i)){const e=this.geographicLookup.get(i),r=e&&this.sublayerCaches.get(i)?.get(t.attributes[n]);if(e&&r?.attributes[e.name])return!0}return!1}_getNamedTypeIdMapFromNodeIds(e){const t=new Map;return e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(const n of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(n))return;t.has(n)?t.get(n)?.push(e):t.set(n,[e])}}),t}};(0,i.Cg)([(0,d.MZ)()],T.prototype,"knowledgeGraph",void 0),(0,i.Cg)([(0,d.MZ)()],T.prototype,"inclusionModeDefinition",void 0),(0,i.Cg)([(0,d.MZ)()],T.prototype,"entityTypeNames",void 0),(0,i.Cg)([(0,d.MZ)()],T.prototype,"relationshipTypeNames",void 0),(0,i.Cg)([(0,d.MZ)()],T.prototype,"geographicLookup",void 0),(0,i.Cg)([(0,d.MZ)()],T.prototype,"sublayerCaches",void 0),(0,i.Cg)([(0,d.MZ)()],T.prototype,"nodeConnectionsLookup",void 0),(0,i.Cg)([(0,d.MZ)()],T.prototype,"relationshipConnectionsLookup",void 0),(0,i.Cg)([(0,d.MZ)()],T.prototype,"memberIdTypeLookup",void 0),T=(0,i.Cg)([(0,u.$)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],T)},25927:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(31635),r=n(10107),s=(n(44208),n(53966),n(87811),n(64108)),o=n(86738),a=n(54238);let l=class extends a.A{constructor(e){super(e),this.layoutGeometry=null}};(0,i.Cg)([(0,r.MZ)({type:o.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,i.Cg)([(0,s.$)("esri.rest.knowledgeGraph.Entity")],l)},30504:(e,t,n)=>{n.d(t,{k5:()=>p,aq:()=>l,Wq:()=>d}),n(52106);var i=n(49186),r=(n(86738),n(39829),n(82799),n(94194),n(69860),n(8460),n(66552));(0,r.O)()({none:"none",startAndEnd:"start-and-end",startOnly:"start-only"}),(0,r.O)()({absoluteValue:"absolute-value",multiplier:"multiplier"});const s=new Map([["basic-grid","basic-grid"],["geographic-organic-standard","geographic-organic-standard"],["hierarchical-bottom-to-top","hierarchical-bottom-to-top"],["hierarchical-top-to-bottom","hierarchical-bottom-to-top"],["organic-community","organic-community"],["organic-fusiform","organic-standard"],["organic-leaf-circle","organic-standard"],["organic-standard","organic-standard"],["radial-node-centric","radial-root-centric"],["radial-root-centric","radial-root-centric"],["tree-bottom-to-top","tree-left-to-right"],["tree-left-to-right","tree-left-to-right"],["tree-right-to-left","tree-left-to-right"],["tree-top-to-bottom","tree-left-to-right"],["chronological-mono-timeline","chronological-mono-timeline"],["chronological-multi-timeline","chronological-multi-timeline"]]);var o=n(62568),a=n(42538);async function l(e,t,n){const i=[],r=function(e,t){const n=new Map;if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&n.set(e.name,[]);for(const t of e)n.has(t.typeName)&&n.get(t.typeName)?.push(t.id);return n}(e,t),s={},l=[];for(const[e,t]of r){if(t.length<1)continue;const n=`${e}_ids`;s[n]=t,l.push(`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $${n} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===l.length)return[];const p=l.join(" UNION "),d=new a.A({openCypherQuery:p,bindParameters:s}),u=(await(0,o.executeQueryStreaming)(t,d,n?.requestOptions)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await u.read();if(e)break;for(const e of t)i.push({id:e[0],typeName:e[1]}),i.push({id:e[2],typeName:e[3]})}return i}n(40863),n(94985),n(68249);const p=e=>s.get(e)??"radial-root-centric";function d(e){if(!e.spatialReference.isWGS84)throw new i.A("knowledge-graph:layer-support-utils","The utilsExtentToInBoundsRings function only supports WGS84 spatial references.");return e.clone().normalize().map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}},37531:(e,t,n)=>{n.d(t,{dt:()=>c,GG:()=>f,UQ:()=>g,Sx:()=>d});var i=n(68197),r=n(60999),s=(n(44208),n(51850)),o=(n(76369),n(62046)),a=(n(2741),n(43773),n(66344));new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new a.q(1e3),new i.A([128,128,128]);var l=n(28975),p=n(33910);function d(e,t){if(!e)return null;let n=null;return(0,p.wk)(e)?n=function(e){const t=e.symbolLayers;if(!t)return null;let n=null;return t.forEach(e=>{"object"===e.type&&e.resource?.href||(n="water"===e.type?e.color:e.material?e.material.color:null)}),n?new i.A(n):null}(e):(0,p.$y)(e)&&(n="cim"===e.type?(0,o.Nk)(e):e.color?new i.A(e.color):null),n?u(n,t):null}function u(e,t){if(null==t||null==e)return e;const n=e.toRgba();return n[3]=n[3]*t,new i.A(n)}function c(e,t,n){e&&(t||null!=n)&&(t&&(t=new i.A(t)),(0,p.wk)(e)?function(e,t,n){const r=e.symbolLayers;if(!r)return;const s=(e,r=!1)=>{let s=t??e??null;return null!=n?.override&&(!s&&r&&(s=new i.A([255,255,255])),s&&(s.a=n.override)),u(s,n?.add)};r.forEach(e=>{if("water"===e.type)return void(e.color=u(e.color,n?.add));const t=null!=e.material?e.material.color:null,i=s(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new l.N({color:i}):e.material.color=i,"outline"in e&&e.outline?.color&&null!=n?.add&&(e.outline.color=u(e.outline.color,n.add)),"marker"in e&&null!=e.marker&&(e.marker.color=s(e.marker.color))})}(e,t,n):(0,p.$y)(e)&&function(e,t,n){t=t??e.color,null!=n?.override&&t&&(t.a=n.override),t&&(e.color=u(t,n?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=u(e.outline.color,n?.add))}(e,t,n))}function h(e){for(const t of e)if("number"==typeof t)return t;return null}function y(e,t,n){for(let i=0;i<3;i++){const r=e[i];switch(r){case"symbol-value":{const e=n[i];return null!=e?e/t[i]:1}case"proportional":break;default:if(r&&t[i])return r/t[i]}}return null}function m(e,t,n,i){switch(e){case"proportional":return n*i;case"symbol-value":return null!=t?t:n;default:return e}}async function g(e,t){if(e&&t)return(0,p.wk)(e)?async function(e,t){const i=e.symbolLayers;i&&await(0,r.jJ)(i,async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){const n=t[2];"number"==typeof n&&(e.size=n)}(e,t);break;case"icon":case"line":case"text":!function(e,t){const n=h(t);null!=n&&(e.size=n)}(e,t);break;case"path":!function(e,t){const n=y(t,s.Un,[e.width,void 0,e.height]);null!=n&&(e.width=m(t[0],e.width,1,n),e.height=m(t[2],e.height,1,n))}(e,t);break;case"object":await async function(e,t){const{resourceSize:i,symbolSize:r}=await async function(e){const{computeObjectLayerResourceSize:t}=await n.e(5404).then(n.bind(n,95404)),i=await t(e,10),{width:r,height:s,depth:o}=e,a=[r,o,s];let l=1;for(let e=0;e<3;e++){const t=a[e];if(null!=t){l=t/i[e];break}}for(let e=0;e<3;e++)null==a[e]&&(a[e]=i[e]*l);return{resourceSize:i,symbolSize:a}}(e),s=y(t,i,r);null!=s&&(e.width=m(t[0],r[0],i[0],s),e.depth=m(t[1],r[1],i[1],s),e.height=m(t[2],r[2],i[2],s))}(e,t)}}(e,t))}(e,t):void((0,p.$y)(e)&&function(e,t){const n=h(t);if(null!=n)switch(e.type){case"simple-marker":e.size=n;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=n,e.height=n*t):(e.width=n*t,e.height=n);break}case"simple-line":e.width=n;break;case"text":e.font.size=n}}(e,t))}function f(e,t,n){if(e&&null!=t)if((0,p.wk)(e)){const i=e.symbolLayers;i&&i.forEach(e=>{if("object"===e.type)switch(n){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)})}else if((0,p.$y)(e))switch(e.type){case"simple-marker":case"picture-marker":case"text":e.angle+=t;break;case"cim":(0,o.KU)(e,t,!0)}}},37730:(e,t,n)=>{n.d(t,{T:()=>r});var i=n(43334);const r={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new i.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},40662:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(31635),r=(n(53966),n(44208),n(87811),n(49186),n(64108)),s=n(77901);let o=class extends s.A{constructor(e){super(e)}};o=(0,i.Cg)([(0,r.$)("esri.rest.knowledgeGraph.ObjectValue")],o)},42095:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(31635),r=n(25482),s=n(10107),o=(n(44208),n(53966),n(87811),n(64108)),a=n(77901);let l=class extends r.o{constructor(e){super(e),this.path=[]}};(0,i.Cg)([(0,s.MZ)({type:[a.A],json:{write:!0}})],l.prototype,"path",void 0),l=(0,i.Cg)([(0,o.$)("esri.rest.knowledgeGraph.Path")],l)},42538:(e,t,n)=>{n.d(t,{A:()=>p});var i=n(31635),r=n(10107),s=(n(44208),n(53966),n(87811),n(64108)),o=n(16930),a=n(69622);let l=class extends a.A{constructor(e){super(e),this.openCypherQuery=""}};(0,i.Cg)([(0,r.MZ)()],l.prototype,"openCypherQuery",void 0),l=(0,i.Cg)([(0,s.$)("esri.rest.knowledgeGraph.GraphQuery")],l);let p=class extends l{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,i.Cg)([(0,r.MZ)()],p.prototype,"bindParameters",void 0),(0,i.Cg)([(0,r.MZ)()],p.prototype,"bindGeometryQuantizationParameters",void 0),(0,i.Cg)([(0,r.MZ)()],p.prototype,"outputQuantizationParameters",void 0),(0,i.Cg)([(0,r.MZ)({type:o.A})],p.prototype,"outputSpatialReference",void 0),(0,i.Cg)([(0,r.MZ)()],p.prototype,"provenanceBehavior",void 0),p=(0,i.Cg)([(0,s.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],p)},54238:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(31635),r=n(10107),s=(n(44208),n(53966),n(87811),n(64108)),o=n(77901);let a=class extends o.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"typeName",void 0),(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"id",void 0),a=(0,i.Cg)([(0,s.$)("esri.rest.knowledgeGraph.GraphNamedObject")],a)},54898:(e,t,n)=>{n.d(t,{Gz:()=>$,O9:()=>G,hZ:()=>P,CP:()=>q,dD:()=>Z,UT:()=>F,MY:()=>D,Td:()=>R,iW:()=>j,e$:()=>B,qN:()=>k});var i=n(68197),r=n(91869),s=(n(85105),n(58769));n(39410),n(33421),n(21774),n(93885);const o=s.A;var a=n(965),l=n(91218),p=n(16930),d=n(17136),u=n(99352),c=n(15375),h=n(29005),y=n(46499),m=n(73913),g=n(77548),f=n(62568),b=n(25927),w=n(31635),_=n(69622),M=n(10107),I=(n(44208),n(53966),n(87811),n(64108));let T=class extends _.A{constructor(e){super(e),this.entityAdds=void 0,this.entityUpdates=void 0,this.entityDeletes=void 0,this.relationshipAdds=void 0,this.relationshipUpdates=void 0,this.relationshipDeletes=void 0,this.options=void 0}};(0,w.Cg)([(0,M.MZ)()],T.prototype,"entityAdds",void 0),(0,w.Cg)([(0,M.MZ)()],T.prototype,"entityUpdates",void 0),(0,w.Cg)([(0,M.MZ)()],T.prototype,"entityDeletes",void 0),(0,w.Cg)([(0,M.MZ)()],T.prototype,"relationshipAdds",void 0),(0,w.Cg)([(0,M.MZ)()],T.prototype,"relationshipUpdates",void 0),(0,w.Cg)([(0,M.MZ)()],T.prototype,"relationshipDeletes",void 0),(0,w.Cg)([(0,M.MZ)()],T.prototype,"options",void 0),T=(0,w.Cg)([(0,I.$)("esri.rest.knowledgeGraph.GraphApplyEdits")],T);var C=n(23150),v=n(54218),A=n(40863),x=n(68249);const E={initializeLayersFromClientData:async(e,t,n)=>{if(t||(t=[...e.layers,...e.tables].map(e=>e.graphTypeName)),0===t?.length)return;const i=new Map;for(const n of t)i.set(n,S(e,n));const r=await(0,f.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(i.values()),{requestOptions:{signal:n?.signal}});for(const t of[...e.layers,...e.tables]){const n=t.objectType.name;if(null==n)continue;const i=r.get(S(e,n));if(i){const e=JSON.parse(i);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),t.read(e,{origin:"service"})}}}},S=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function k(e,t,n){return E.initializeLayersFromClientData(e,t,n)}const N=["#4a0932","#b31515","#18382e","#a64f1b","#102432","#8c213f","#ed9310","#2c6954","#144d59","#ffc730","#75351e","#454f4b","#78b1c2","#191921","#8f8f82","#9be0c0","#dbb658","#87b051","#11495c","#c43541","#9c5596","#44498b","#ad9d63","#86afb3","#5c98ca","#b0bfa2","#73241f","#b86b53","#d9d78c","#3e756d","#f260a1","#a0d17d","#c27c30","#eb82eb","#ffdf3c","#ffb259","#ab52b3","#3cccb4","#0095ba","#d92b30"],L="#8f8f82";function R(e){return e<0||e>=N.length?new i.A(L):new i.A(N[e])}function F(e){const t=e.toArray();return new A.A({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,style:"solid",width:.75,color:t},{type:"CIMVectorMarker",enable:!0,size:6,markerPlacement:{type:"CIMMarkerPlacementOnLine",angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-10,ymin:-5,xmax:0,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[-12,-3.47],[-12,3.6],[1.96,-.03],[-12,-3.47]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:t}]}}]}]}}})}function D(e){let t="ESRI__ID",n=4;for(const i of e)if(i.name){if("name"===i.name.toLowerCase()){t=i.name;break}i.name.toLowerCase().includes("name")?(t=i.name,n=2):"esriFieldTypeString"===i.fieldType&&n>3&&(t=i.name,n=3)}return t}function j(e,t,n){const i={color:[80,80,80],haloColor:[255,255,255],haloSize:.7,font:{size:10,weight:"normal"}},r=new y.A({labelExpressionInfo:new m.A({expression:"ESRI__ID"===n?`${t}`:`$feature.${n}`}),labelPlacement:"above-center",symbol:new x.A(i)}),s=new y.A({labelExpressionInfo:new m.A({expression:`'${t}' + IIf($feature.ESRI__AggregationCount>1, ' (' + $feature.ESRI__AggregationCount + ')', '')`}),labelPlacement:"center-along",labelPosition:"parallel",repeatLabel:!1,symbol:new x.A({...i,yoffset:"12px"})});return"entity"===e?[r]:[s]}function B(e,t,n){const i={color:[255,255,255],haloColor:[0,0,0],haloSize:.7,font:{size:10,weight:"bold"}},r="ESRI__ID"===n?`${e}`:`$feature.${n}`;return"point"===t?[new y.A({labelExpressionInfo:new m.A({expression:r}),labelPlacement:"above-center",symbol:new x.A(i)})]:"polyline"===t?[new y.A({labelExpressionInfo:new m.A({expression:r}),labelPlacement:"center-along",repeatLabel:!0,symbol:new x.A(i)})]:"polygon"===t?[new y.A({labelExpressionInfo:new m.A({expression:r}),labelPlacement:"always-horizontal",symbol:new x.A(i)})]:null}const O={capabilities:[],allowGeometryUpdates:!1,serviceCapabilities:{geometryCapabilities:{supportsZValues:!1,supportsMValues:!1}}};function P(e){const{capabilities:t,allowGeometryUpdates:n,serviceCapabilities:{geometryCapabilities:{supportsZValues:i,supportsMValues:r}}}=e?.serviceDefinition||O,s=e?.dataModel.arcgisManaged?t:t.filter(e=>"Query"===e),o=new Set(s);return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:r,supportsZ:i},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:o.has("Create"),supportsDelete:o.has("Delete"),supportsEditing:o.has("Editing"),supportsChangeTracking:!1,supportsQuery:o.has("Query"),supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:o.has("Update"),supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:u.F,queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:u.P,editing:{supportsGeometryUpdate:!!e?.dataModel.arcgisManaged&&n,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:o.has("Delete"),supportsUpdateByAnonymous:!1,supportsUpdateByOthers:o.has("Update"),supportsAsyncApplyEdits:!1,zDefault:void 0}}}async function G(e,t){const n=new T,i=t.graphTypeName,s=t.graphType,o="knowledge-graph"===t.parentCompositeLayer.type?t.geometryFieldName:null,a=!!t.fieldsIndex.get(o)?.editable,u=e=>{const n={...e};for(const e of t.fields)e.editable||delete n[e.name];for(const t of Object.keys(e))t.includes("ESRI__")&&delete n[t];return n},h=async e=>{await(0,l.initializeProjection)(e.spatialReference,p.A.WGS84);const t=(0,l.project)(e,p.A.WGS84);return"point"===t.type?t.normalize():(await(0,d.el)(t))[0]};for(const t of e.addFeatures??[]){const e=u(t.attributes);(0,g.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===i&&("entity"===s?(n.entityAdds||(n.entityAdds=[]),o&&t.geometry&&(e[o]=await h(t.geometry)),n.entityAdds.push(new b.A({properties:e,typeName:i}))):(n.relationshipAdds||(n.relationshipAdds=[]),n.relationshipAdds.push(new C.A({properties:e,typeName:i}))))}for(const t of e.updateFeatures??[]){const e=t.attributes[c.dr],r=u(t.attributes);(0,g.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===i&&("entity"===s?(n.entityUpdates||(n.entityUpdates=[]),o&&a&&t.geometry&&(r[o]=await h(t.geometry)),n.entityUpdates.push(new b.A({id:e,properties:r,typeName:i}))):(n.relationshipUpdates||(n.relationshipUpdates=[]),n.relationshipUpdates.push(new C.A({id:e,properties:r,typeName:i}))))}const y=new Map;for(const t of e.deleteFeatures??[])if((0,v.DU)(t)){const e=t,n=(0,r.tE)(y,e.sourceLayer.graphTypeName,()=>({typeName:e.sourceLayer.graphTypeName,ids:[]}));e.sourceLayer.graphTypeName===i&&n.ids.push(e.attributes[c.dr])}else t.objectId&&"string"==typeof t.objectId&&(0,r.tE)(y,i,()=>({typeName:i,ids:[]})).ids.push(t.objectId);for(const e of y.values())e.ids.length>0&&("entity"===s?(n.entityDeletes||(n.entityDeletes=[]),n.entityDeletes.push({typeName:e.typeName,ids:e.ids})):(n.relationshipDeletes||(n.relationshipDeletes=[]),n.relationshipDeletes.push({typeName:e.typeName,ids:e.ids})));return n}function $(e,t){const n={addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]};for(const i of e.editResults)if(i.typeName===t){for(const e of i.adds)n.addFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of i.updates)n.updateFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of i.deletes)n.deleteFeatureResults.push({objectId:e.id,globalId:e.id})}return n}function Z(e){if(!e.objectType)return null;const t=[];for(const n of e.fields)!n.name.includes("ESRI__")&&n.editable&&"geometry"!==n.type&&t.push(new o({fieldName:n.name}));return new a.A({elements:t})}function q(e){if(!e.objectType)return null;let t=null;switch(e.geometryType){case"point":case"multipoint":t="point";break;case"polyline":t="line";break;case"polygon":t="polygon";break;default:t=null}return[new h.A({name:e.graphTypeName,drawingTool:t,prototype:{}})]}},62046:(e,t,n)=>{n.d(t,{Fe:()=>d,KU:()=>y,Nk:()=>s});var i=n(68197),r=n(93397);function s(e){const t=[];return o((0,r.lW)(e),t),t.length?new i.A((0,r.e6)(t[0])):null}function o(e,t){if(!e)return;let n;n="CIMTextSymbol"===e.type?e.symbol:e;const i="CIMPolygonSymbol"===e.type;if(n?.symbolLayers)for(const e of n.symbolLayers)if(!(e.colorLocked||i&&((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&a(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{o(e.symbol,t)});break;case"CIMSolidStroke":case"CIMSolidFill":a(t,e.color);break;case"CIMGradientFill":l(t,e);break;case"CIMHatchFill":o(e.lineSymbol,t)}}function a(e,t){for(const n of e)if(n.join(".")===t.join("."))return;e.push(t)}function l(e,t){const n=t.colorRamp?.type;switch(n){case"CIMMultipartColorRamp":t.colorRamp.colorRamps?.forEach(t=>{"CIMLinearContinuousColorRamp"===t.type&&p(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":p(e,t.colorRamp)}}function p(e,t){t&&(t.fromColor&&a(e,t.fromColor),t.toColor&&a(e,t.toColor))}function d(e,t,n){t instanceof i.A||(t=new i.A(t));const s=(0,r.lW)(e);s&&u(s,t,n)}function u(e,t,n){if(!e)return;let i;i="CIMTextSymbol"===e.type?e.symbol:e;const s="CIMPolygonSymbol"===i?.type;if(i?.symbolLayers)for(const e of i.symbolLayers){if(e.colorLocked)continue;if(s)if(n){const{layersToColor:t}=n;if(((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))&&"fill"===t||(0,r.jn)(e)&&"outline"===t)continue}else if((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))continue;const i=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=i;break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{u(e.symbol,t,n)});break;case"CIMSolidStroke":case"CIMSolidFill":e.color=i;break;case"CIMGradientFill":c(e,t);break;case"CIMHatchFill":u(e.lineSymbol,t,n)}}}function c(e,t){const n=e.colorRamp?.type;switch(n){case"CIMMultipartColorRamp":e.colorRamp.colorRamps?.forEach(e=>{"CIMLinearContinuousColorRamp"===e.type&&h(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":h(e.colorRamp,t)}}function h(e,t){if(e&&(e.fromColor&&(e.fromColor=t.toArray()),e.toColor)){const n=t.clone();n.a=0,e.toColor=n.toArray()}}function y(e,t,n=!1){const i=(0,r.lW)(e);if(n&&(t=360-t),"CIMTextSymbol"!==i?.type){if("CIMPointSymbol"===i?.type&&i.symbolLayers){const e=t-(i.angle||0);for(const t of i.symbolLayers)if((0,r.MM)(t)){let n=t.rotation||0;t.rotateClockwise?n-=e:n+=e,t.rotation=n}i.angle=t}}else i.angle=t}},62796:(e,t,n)=>{n.d(t,{A:()=>he});var i=n(31635),r=n(37838),s=n(49186),o=n(4718),a=n(53966),l=n(25728),p=(n(29953),n(10107)),d=(n(44208),n(64108)),u=n(43937),c=n(5443),h=n(86738),y=n(39829),m=n(82799),g=n(91218),f=n(16930),b=n(21325),w=n(50498),_=n(55156),M=n(60950),I=n(89808),T=n(99959);const C=Symbol("isKnowledgeGraphGraphicOriginSymbol");var v;class A extends T.A{get[(v=C,M.ym)](){return this.sublayer}get[_.e](){return this.sublayer}get[I.Q](){return this.sublayer}constructor(e,t){super(),this[v]=!0,this.type="knowledge-graph",this.layer=e,this.sublayer=t}get id(){return this.layer.id}}const x=Symbol("isLinkChartGraphicOriginSymbol");var E;class S extends T.A{get[(E=x,I.Q)](){return this.layer}constructor(e,t){super(),this[E]=!0,this.type="link-chart",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var k=n(4146),N=n(83221),L=n(56390),R=n(64714),F=n(15375);n(87811);const D=(0,n(17036).p)(),j=e=>{const t=e;let n=class extends t{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,i.Cg)([(0,p.MZ)(D.fields)],n.prototype,"fields",void 0),(0,i.Cg)([(0,p.MZ)(D.fieldsIndex)],n.prototype,"fieldsIndex",void 0),n=(0,i.Cg)([(0,d.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],n),n};var B=n(54898),O=n(63074),P=n(6455),G=n(87718),$=n(56658),Z=n(32756),q=n(54310),U=n(25036),z=n(82935),Q=n(10873),Y=n(13213),H=n(20437),W=n(30524),X=n(46499),V=n(39383),J=n(96184),K=n(96576),ee=n(65494),te=n(41214),ne=n(62568),ie=n(22671),re=n(61956),se=n(30291),oe=n(37531),ae=n(61322);function le(e){if(!e.json)return e;e.json.write=pe(e.json.write);const t=e.json.origins;if(!t)return e;let n;for(n in t){const e=t[n];e&&(e.write=pe(e.write))}return e}function pe(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:n,overridePolicy:i,...r}=e;return function(e,t){const n=ue.call(this,e,t);return n.enabled?{...r,...n}:n}}(e)),e):!0===e?de():e}function de(){return{overridePolicy:ue}}function ue(e,t){const n=!!this.geometryType;let i={enabled:n};return n&&(i={...i,...ce.call(this,e,t)}),i}function ce(e,t){return{ignoreOrigin:this.originIdOf(t)>0}}let he=class extends(j((0,P.FJ)((0,$.J)((0,G.F)((0,O.dM)((0,Z.fY)((0,z.e)((0,U.j)((0,q.J)((0,l.P)(k.A))))))))))){constructor(e){super(e),this.blendMode="normal",this.charts=null,this.definitionExpression=null,this.displayFilterEnabled=!0,this.displayFilterInfo=null,this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=F.dr,this.objectType=null,this.opacity=1,this.orderBy=null,this.parent=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then(()=>{const e=new MessageChannel;return new ae.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const n=re.A.fromJSON(e);return this.queryFeaturesJSON(n,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get capabilities(){return this.parent?this.parent.sublayerCapabilities:(0,B.hZ)(null)}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.capabilities.operations.supportsEditing}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get isTable(){return"link-chart"!==this.parentCompositeLayer.type&&null==this.geometryFieldName}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach(t=>{const n="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(H.A.fromJSON({name:t.name,type:n,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))}),e.push(H.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),H.A.fromJSON({name:F.M1,type:"esriFieldTypeInteger",alias:F.M1,editable:!1}),H.A.fromJSON({name:F.BL,type:"esriFieldTypeInteger",alias:F.BL,editable:!1})),e}get formTemplate(){return this._isOverridden("formTemplate")?this._get("formTemplate"):(0,B.dD)(this)}set formTemplate(e){this._overrideIfSome("formTemplate",e)}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?w.gy.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return F.T1;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphicOrigin(){if(!this.parent)return null;switch(this.parent.type){case"knowledge-graph":return new A(this.parent,this);case"link-chart":return new S(this.parent,this)}}get graphTypeName(){return this.objectType?.name}set graphTypeName(e){this._set("graphTypeName",e)}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,n=t?this.objectType?.properties?.[t]:null;return n?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,n=t?this.objectType?.properties?.[t]:null;return n?.hasZ??!1}set labelingInfo(e){this._set("labelingInfo",e)}get labelingInfo(){if(this._isOverridden("labelingInfo"))return this._get("labelingInfo");if(!this.objectType||!this.parentCompositeLayer||!this.graphTypeName)return null;const e=this.objectType.properties?(0,B.MY)(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?(0,B.iW)(this.graphType,this.graphTypeName,e):(0,B.e$)(this.graphTypeName,this.geometryType,e)}set renderer(e){(0,W.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const e=this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel,t=[...e?.entityTypes??[],...e?.relationshipTypes??[]].map(e=>e.name).indexOf(this.graphTypeName),n=(0,B.Td)(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new K.A({type:"simple",symbol:(0,B.UT)(n)});const e=(0,ee.r)((0,R.F0)(w.gy.toJSON("point")).renderer);return(0,oe.dt)(e.symbol,n),e}const i=(0,ee.r)((0,R.F0)(w.gy.toJSON(this.geometryType)).renderer);return(0,oe.dt)(i.symbol,n),i}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??f.A.WGS84}get templates(){return this._isOverridden("templates")?this._get("templates"):(0,B.CP)(this)}set templates(e){this._overrideIfSome("templates",e)}set timeInfo(e){this._set("timeInfo",e)}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return(0,se.tn)(this,e)}createQuery(){return new re.A({where:"1=1",outFields:["*"]})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return null}async queryFeatures(e,t){await this.load();const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e),r=this.graphicOrigin,s=ie.A.fromJSON(await i.executeQuery(n.toJSON(),t?.signal));return s.features.forEach(e=>{e.sourceLayer=this,e.origin=r}),s}async queryFeaturesJSON(e,t){await this.load();const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e);return await i.executeQuery(n.toJSON(),t?.signal)}async queryFeatureCount(e,t){await this.load();const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e);return i.executeQueryForCount(n.toJSON(),t?.signal)}async queryExtent(e={},t){await this.load();const n={...e,returnGeometry:!0},{resolvedQuery:i,queryEngine:r}=await this._setupQueryObjects(n),s=await r.executeQueryForExtent(i.toJSON(),t?.signal);let o;return o=null!=s.extent?.xmin&&null!=s.extent?.xmax&&null!=s.extent?.ymin&&null!=s.extent?.ymax?new c.A(s.extent):new c.A,{count:s.count,extent:o}}async queryObjectIds(e,t){await this.load();const n=re.A.from(e);let i;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);i=this.loadQueryEngine(e)}return await i.executeQueryForIds(n.toJSON(),t?.signal)}async applyEdits(e){if(!this.parentCompositeLayer.dataManager.knowledgeGraph)throw new s.A("knowledge-graph-sublayer:no-knowledge-graph","ApplyEdits cannot be executed because the parent does not have a Knowledge Graph model. This is usually caused by the layer not yet being loaded");const t=await(0,B.O9)(e,this);t.options={cascadeDelete:!0,cascadeProvenanceDelete:!!this.parent?.knowledgeGraph.serviceDefinition.supportsProvenance||void 0};const n=await(0,ne.executeApplyEdits)(this.parentCompositeLayer.dataManager.knowledgeGraph,t),i=(0,B.Gz)(n,this.graphTypeName),r={addedFeatures:i.addFeatureResults,updatedFeatures:i.updateFeatureResults,deletedFeatures:i.deleteFeatureResults,addedAttachments:i.addAttachmentResults,deletedAttachments:i.deleteAttachmentResults,updatedAttachments:i.updateAttachmentResults,exceededTransferLimit:!1,historicMoment:new Date,edits:void 0};return this.emit("edits",r),this.emit("apply-edits",{result:Promise.resolve(r)}),"link-chart"===this.parentCompositeLayer.type&&await this.parentCompositeLayer.refreshLinkChartCache([...r.addedFeatures.map(e=>e.globalId),...r.updatedFeatures.map(e=>e.globalId),...r.deletedFeatures.map(e=>e.globalId)]),i}loadQueryEngine(e){const t=new N.A({geometryType:w.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),n=new L.do({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:w.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,featureIdInfo:{type:"object-id",fieldName:this.objectIdField},spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return n.featureStore.addMany(e),n}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new re.A({where:"1=1",outFields:[F.dr]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then(()=>(0,W.sv)(this.timeInfo,this.fieldsIndex))),Promise.resolve(this)}async _setupQueryObjects(e,t){const n=re.A.from(e),i=n.geometry;if(i&&!i.spatialReference?.isWGS84&&(await(0,g.initializeProjection)(i.spatialReference,b.KK),n.geometry=(0,g.project)(i instanceof y.A||i instanceof m.A||i instanceof h.A?i:i.extent,b.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:n,queryEngine:this._cachedQueryEngine};const r=await this.parentCompositeLayer.dataManager.getData(n,this,t);return{resolvedQuery:n,queryEngine:this.loadQueryEngine(r)}}};(0,i.Cg)([(0,p.MZ)(le((0,o.o8)(O.sU)))],he.prototype,"blendMode",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],he.prototype,"capabilities",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],he.prototype,"userHasUpdateItemPrivileges",null),(0,i.Cg)([(0,p.MZ)({type:Boolean})],he.prototype,"editingEnabled",null),(0,i.Cg)([(0,p.MZ)()],he.prototype,"isTable",null),(0,i.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{write:!1}},write:de()}})],he.prototype,"charts",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],he.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],he.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,p.MZ)(le((0,o.o8)(P.Dp)))],he.prototype,"displayFilterEnabled",void 0),(0,i.Cg)([(0,p.MZ)(le((0,o.o8)(P.KV)))],he.prototype,"displayFilterInfo",void 0),(0,i.Cg)([(0,p.MZ)(le((0,o.o8)(O.LF)))],he.prototype,"effect",void 0),(0,i.Cg)([(0,p.MZ)()],he.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,p.MZ)(le((0,o.o8)(G.Y)))],he.prototype,"featureEffect",void 0),(0,i.Cg)([(0,p.MZ)(le((0,o.o8)(Y.d)))],he.prototype,"featureReduction",null),(0,i.Cg)([(0,p.MZ)()],he.prototype,"fields",null),(0,i.Cg)([(0,p.MZ)()],he.prototype,"formTemplate",null),(0,i.Cg)([(0,p.MZ)()],he.prototype,"geometryType",null),(0,i.Cg)([(0,p.MZ)()],he.prototype,"geometryFieldName",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],he.prototype,"graphicOrigin",null),(0,i.Cg)([(0,p.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],he.prototype,"graphType",void 0),(0,i.Cg)([(0,p.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],he.prototype,"graphTypeName",null),(0,i.Cg)([(0,p.MZ)()],he.prototype,"hasM",null),(0,i.Cg)([(0,p.MZ)()],he.prototype,"hasZ",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],he.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",default:!1,write:{overridePolicy(){return{enabled:!!this.geometryType,alwaysWriteDefaults:!0,ignoreOrigin:!0}}}}})],he.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,p.MZ)({type:[X.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:function(e,t,n){const i=[["ESRI__AGGREGATION_COUNT",F.M1],["ESRI__ORIGIN_ID",F.Cz],["ESRI__DESTINATION_ID",F.KQ],["ESRI__LAYOUT_GEOMETRY",F.T1]];try{for(const t of e)for(const[e,n]of i)t.labelExpression=t.labelExpression?.replaceAll(e,n),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,n))}catch(e){a.A.getLogger(this).warn("Error updating labelingInfo",e)}return(0,V.w)(e,t,n)},write:de()}})],he.prototype,"labelingInfo",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:{writer(e,t){switch(this.parentCompositeLayer?.type){case"link-chart":t.layerType="LinkChartSubLayer";break;case"knowledge-graph":t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"}},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],he.prototype,"layerType",void 0),(0,i.Cg)([(0,p.MZ)(le((0,o.o8)(Q.fV)))],he.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)(le((0,o.o8)(Q.hG)))],he.prototype,"maxScale",void 0),(0,i.Cg)([(0,p.MZ)(le((0,o.o8)(Q.hn)))],he.prototype,"minScale",void 0),(0,i.Cg)([(0,p.MZ)()],he.prototype,"objectIdField",void 0),(0,i.Cg)([(0,p.MZ)()],he.prototype,"objectType",void 0),(0,i.Cg)([(0,p.MZ)(le((0,o.o8)(Q.ke)))],he.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)(le((0,o.o8)(Z.ne)))],he.prototype,"orderBy",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1})],he.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)()],he.prototype,"parentCompositeLayer",void 0),(0,i.Cg)([(0,p.MZ)(le((0,o.o8)(Q.M6)))],he.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:r.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],he.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,p.MZ)({type:Number,json:{write:{overridePolicy:ce}}})],he.prototype,"refreshInterval",void 0),(0,i.Cg)([(0,p.MZ)({types:te.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:de()}})],he.prototype,"renderer",null),(0,i.Cg)([(0,p.MZ)()],he.prototype,"source",void 0),(0,i.Cg)([(0,p.MZ)()],he.prototype,"spatialReference",null),(0,i.Cg)([(0,p.MZ)()],he.prototype,"templates",null),(0,i.Cg)([(0,p.MZ)({type:J.A,json:{name:"layerDefinition.timeInfo",write:{overridePolicy:ce},origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:ce}},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:ce}}}}})],he.prototype,"timeInfo",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],he.prototype,"title",null),(0,i.Cg)([(0,u.K)("title")],he.prototype,"writeTitle",null),(0,i.Cg)([(0,p.MZ)({json:{read:!1}})],he.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)(le((0,o.o8)(z.B)))],he.prototype,"useViewTime",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,json:{name:"visibility",write:de()}})],he.prototype,"visible",void 0),he=(0,i.Cg)([(0,d.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],he)},64714:(e,t,n)=>{n.d(t,{F0:()=>a,Vx:()=>d,e2:()=>c,f:()=>h});var i=n(44208),r=n(4718),s=n(99352),o=n(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function d(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this${u(t)} = null;`;for(const t in e)n+=`this${u(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new i}catch(n){return()=>({[t]:null,...e})}}function u(e){return l.test(e)?`.${e}`:`["${e}"]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function h(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!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,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:s.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},67996:(e,t,n)=>{n.d(t,{cZ:()=>S,XW:()=>R,fe:()=>k});var i=n(43773),r=n(49186),s=n(91869),o=(n(90708),n(92722)),a=n(16930);class l{constructor(){this.version="",this.queryResult=new p}}class p{constructor(){this.featureResult=new d}}class d{constructor(){this.objectIdFieldName="",this.uniqueIdField=new u,this.globalIdFieldName="",this.geohashFieldName="",this.geometryProperties=new c,this.geometryType=null,this.spatialReference=new a.A,this.exceededTransferLimit=!1,this.hasZ=!1,this.hasM=!1,this.transform=new h,this.fields=[],this.fieldNameToAttributeIndexMap={},this.values=[],this.features=[],this.geometryFields=[]}}class u{constructor(){this.name="",this.isSystemMaintained=!1}}class c{constructor(){this.shapeAreaFieldName="",this.shapeLengthFieldName="",this.units=""}}class h{constructor(){this.quantizeOriginPosition="upperLeft",this.scale=new y,this.translate=new m}}class y{constructor(){this.xScale=0,this.yScale=0,this.mScale=0,this.zScale=0}}class m{constructor(){this.xTranslate=0,this.yTranslate=0,this.mTranslate=0,this.zTranslate=0}}class g{constructor(){this.name="",this.fieldType="esriFieldTypeString",this.alias="",this.sqlType="sqlTypeVarchar",this.domain="",this.defaultValue=""}}class f{constructor(){this.attributes=[],this.compressedGeometry=new b,this.centroid=new b,this.aggregateGeometries=[]}}class b{constructor(){this.geometryType=null,this.lengths=[],this.coords=[]}}const w=["ELEMENTUID","TYPENAME"];var _=n(45724),M=n(35448);const I={upperLeft:0,lowerLeft:1},T={sqlTypeBigInt:0,sqlTypeBinary:1,sqlTypeBit:2,sqlTypeChar:3,sqlTypeDate:4,sqlTypeDecimal:5,sqlTypeDouble:6,sqlTypeFloat:7,sqlTypeGeometry:8,sqlTypeGUID:9,sqlTypeInteger:10,sqlTypeLongNVarchar:11,sqlTypeLongVarbinary:12,sqlTypeLongVarchar:13,sqlTypeNChar:14,sqlTypeNVarChar:15,sqlTypeOther:16,sqlTypeReal:17,sqlTypeSmallInt:18,sqlTypeSqlXml:19,sqlTypeTime:20,sqlTypeTimestamp:21,sqlTypeTimestamp2:22,sqlTypeTinyInt:23,sqlTypeVarbinary:24,sqlTypeVarchar:25};var C=n(93637);function v(e){const t=new b;t.geometryType=(0,C.i7)(M.bV,e.geometry_type.value);const n=[],i=[];for(let t=0;t<e.lengths.length;t++)n.push(e.lengths[t]);for(let t=0;t<e.coords.length;t++)i.push(e.coords[t]);return t.lengths=n,t.coords=i,t}function A(e){const t=new g;return t.name=e.name,t.alias=e.alias,t.fieldType=(0,C.i7)(M.r5,e.field_type.value),t.sqlType=(0,C.i7)(T,e.sql_type.value),t.domain=e.domain,t.defaultValue=e.default_value,t}function x(e){const t=A(e);return t.geometryType=(0,C.i7)(M.bV,e.geometry_type.value),t}function E(e){const t=new h;t.quantizeOriginPosition=(0,C.i7)(I,e.quantizeOriginPosition.value);const n=t.scale,i=e.scale;n.xScale=i.xScale,n.yScale=i.yScale,n.mScale=i.mScale,n.zScale=i.zScale;const r=t.translate,s=e.translate;return r.xTranslate=s.xTranslate,r.yTranslate=s.yTranslate,r.mTranslate=s.mTranslate,r.zTranslate=s.zTranslate,t}async function S(e,t,n){t??=!1;const o={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e,t){const n=await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal}),s=await n.data;return async function(e){const t=new((await(0,_.I)()).MapOfObjectIdentifierSetsDecoder),n=t.decode(new Uint8Array(e)),i=new Map;if(0!==n.error_code)throw new r.A("knowledge-graph:layer-support-utils",n.error_message);const s=t.get_map_of_identifier_sets(),o=s.keys,a=o.size();for(let e=0;e<a;e++){const t=o.get(e),n=s.query_identifier_set(t),a=[];if(1===n.id_array_type.value){const e=n.get_globalid_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_globalid_at(n))}else if(3===n.id_array_type.value){const e=n.get_identifier_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_identifier_at(n).toString())}else if(2===n.id_array_type.value){const e=n.get_string_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_string_at(n))}else{if(0!==n.id_array_type.value)throw new r.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=n.get_oid_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_objectid_at(n).toString())}}i.set(t,a)}return t.delete(),i}(new Uint8Array(s))}(e,n).then(e=>{!function(e,t){for(const[n,i]of e){const e=(0,s.tE)(t.namedTypeDefinitions,n,()=>({useAllData:!1,members:new Map}));for(const t of i)e.members.has(t)||e.members.set(t,{id:t})}}(e,o)}),o}async function k(e){const t=await(0,_.I)(),n=new t.MapOfObjectIdentifierSets;!function(e,t,n){for(const[i,r]of n.namedTypeDefinitions){if(!r.members||r.useAllData)continue;const n=r.members.keys();let s=!1,o=!0;const a=new t.ObjectIdArray,l=new t.StringArray,p=new t.GlobalIdArray,d=new t.IdentifierArray,u=new t.ObjectIdentifierSet;for(const e of n)o&&(s=!isNaN(Number(e)),o=!1),s?a.add_objectid(Number(e)):(l.add_string(e),p.add_globalid(e)),d.add_identifier(e);u.set_oid_array(a),u.set_string_array(l),u.set_globalid_array(p),u.set_identifier_array(d),a.delete(),l.delete(),p.delete(),d.delete(),e.put_identifier_set(i,u),u.delete()}}(n,t,e);const i=new t.MapOfObjectIdentifierSetsEncoder;try{i.set_map_of_identifier_sets(n),i.encode();const e=i.get_encoding_result();if(0!==e.error.error_code)throw new r.A("knowledge-graph:layer-support-utils",e.error.error_message);const t=structuredClone(e.get_byte_buffer());return i.delete(),t}finally{n.delete()}}async function N(e,t){const n=await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal});return async function(e){const t=new((await(0,_.I)()).FeatureCollectionDecoder),n=t.decode(new Uint8Array(e));if(0!==n.error_code)throw new r.A("knowledge-graph:layer-support-utils",n.error_message);const i=function(e){const t=new l;t.version=e.version;const n=e.get_query_result();if(0!==n.results_type.value)throw new Error("Got a non-feature collection type");const i=n.get_feature_result(),r=t.queryResult.featureResult;r.objectIdFieldName=i.objectid_field_name,r.exceededTransferLimit=i.exceeded_transfer_limit,r.hasM=i.has_m,r.hasZ=i.has_z,r.geometryType=(0,C.i7)(M.bV,i.geometry_type.value),r.globalIdFieldName=i.globalid_field_name,r.geohashFieldName=i.geohash_field_name;const s=r.uniqueIdField,o=i.unique_id_field;s.name=o.name,s.isSystemMaintained=o.isSystemMaintained;const a=r.geometryProperties,p=i.geometry_properties;a.shapeAreaFieldName=p.shapeAreaFieldName,a.shapeLengthFieldName=p.shapeLengthFieldName,a.units=p.units;const d=r.spatialReference,u=i.spatial_reference;d.wkid=u.wkid,d.latestWkid=u.latestWkid,d.vcsWkid=u.vcsWkid,d.latestVcsWkid=u.latestVcsWkid,d.wkt=u.wkt,r.transform=E(i.transform);const c=r.fields,h=r.fieldNameToAttributeIndexMap,y=i.fields,m=y.size();for(let e=0;e<m;e++){const t=y.get(e),n=A(t);c.push(n),h[n.name]=e,t.delete()}y.delete();const g=r.values,b=i.values_count();for(let e=0;e<b;e++)g.push(i.get_value_at(e));const _=r.features,I=i.features,T=I.size();if(T>0)for(const e of w)if(void 0===h[e])throw new Error(`Feature collection missing required attribute: ${e}`);for(let e=0;e<T;e++){const t=new f,n=I.get(e),i=t.attributes,r=n.attributes_count();for(let e=0;e<r;e++)i.push(n.get_attribute_at(e));const s=n.get_compressed_geometry();s&&(t.compressedGeometry=v(s),t.centroid=v(n.get_centroid()));const o=t.aggregateGeometries,a=n.aggregate_geometries,l=a.size();for(let e=0;e<l;e++){const t=a.get(e),n=v(t);o.push(n),t.delete()}a.delete(),_.push(t),n.delete()}I.delete();const S=r.geometryFields,k=i.geometry_fields,N=k.size();for(let e=0;e<N;e++){const t=k.get(e),n=x(t);S.push(n),t.delete()}return k.delete(),t}(t.get_feature_collection());return t.delete(),i}(await n.data)}function L(e,t){if(!e?.queryResult?.featureResult)return t;const{hasZ:n,hasM:i}=e.queryResult.featureResult,r=e.queryResult.featureResult.fieldNameToAttributeIndexMap;for(const a of e.queryResult.featureResult.features){const e=a.attributes[r.TYPENAME],l=(0,s.tE)(t.namedTypeDefinitions,e,()=>({useAllData:!1,members:new Map})),p=a.attributes[r.ELEMENTUID];if(a.compressedGeometry?.coords?.length>0){let e=a.compressedGeometry.lengths;"esriGeometryPoint"===a.compressedGeometry.geometryType&&(e=[]),l.members.set(p,{id:p,linkChartLocation:new o.A(e,a.compressedGeometry.coords,n,i)})}else l.members.set(p,{id:p})}return t}const R={fetchAndConvertSerializedLinkChart:e=>async function(e,t){const n=[],i={generateAllSublayers:!1,namedTypeDefinitions:new Map};return e.entitiesUrl&&n.push(N(e.entitiesUrl,t).then(e=>{L(e,i)})),e.relationshipsUrl&&n.push(N(e.relationshipsUrl,t).then(e=>{L(e,i)})),await Promise.all(n),i}(e)}},69860:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(65864),r=n(90708),s=n(43334),o=n(15375);class a{constructor(){this._featureLookup=new Map}static getInstance(){return a.instance||(a.instance=new a),a.instance}static resetInstance(){a.instance&&(a.instance=null)}deleteFromStore(e){e.forEach(e=>{this._featureLookup.delete(e)})}readFromStoreByList(e){const t=[];return e.forEach(e=>{const n=this.readFromStoreById(e);n&&t.push(n)}),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,n){const a=[];return e.forEach(e=>{if(!e?.id)return;e.properties||(e.properties=[]);let l,p=null;if(n&&e.properties[n]&&(p=(0,r.Ux)(e.properties[n])),"originId"in e&&"destinationId"in e&&(e.properties[o.Cz]=e.originId,e.properties[o.KQ]=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const r=this._featureLookup.get(e.id),o=JSON.parse(JSON.stringify(Object.assign(r.attributes,e.properties)));n&&e.properties[n]&&(o[n]=(0,i.rS)(e.properties[n])),l=new s.Om(p?JSON.parse(JSON.stringify(p)):r?.geometry?JSON.parse(JSON.stringify(r.geometry)):null,o,null,e.properties[t])}else l=new s.Om(p?JSON.parse(JSON.stringify(p)):null,e.properties,null,e.properties[t]);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,l),a.push(l)}),a}}},75503:(e,t,n)=>{n.d(t,{EC:()=>v,wq:()=>a});var i=n(4576),r=n(21818),s=(n(44208),n(15142)),o=n(11006);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=h,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),M.prune(),I.prune(),T.prune(),C.prune()}all(e){l(this._data,e)}search(e,t){let n=this._data;const i=this._toBBox;if(w(e,n))for(M.clear();n;){for(let r=0,s=n.children.length;r<s;r++){const s=n.children[r],o=n.leaf?i(s):s;w(e,o)&&(n.leaf?t(s):b(e,o)?l(s,t):M.push(s))}n=M.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!w(e,t))return!1;for(M.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],s=t.leaf?n(r):r;if(w(e,s)){if(t.leaf||b(e,s))return!0;M.push(r)}}t=M.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new x([]),this}remove(e){if(!e)return this;let t,n=this._data,s=null,o=0,a=!1;const l=this._toBBox(e);for(T.clear(),C.clear();n||T.length>0;){if(n||(n=T.pop(),s=T.data[T.length-1],o=C.pop()??0,a=!0),n.leaf&&(t=(0,i.qh)(n.children,(0,r.zI)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),T.push(n),this._condense(T),this;a||n.leaf||!b(n,l)?s?(o++,n=s.children[o],a=!1):n=null:(T.push(n),C.push(o),o=0,s=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,i){const r=n-t+1;let s=this._maxEntries;if(r<=s){const i=new x(e.slice(t,n+1));return p(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/s**(i-1)));const o=new E([]);o.height=i;const a=Math.ceil(r/s),l=a*Math.ceil(Math.sqrt(s));_(e,t,n,l,this._compareMinX);for(let r=t;r<=n;r+=l){const t=Math.min(r+l-1,n);_(e,r,t,a,this._compareMinY);for(let n=r;n<=t;n+=a){const r=Math.min(n+a-1,t);o.children.push(this._build(e,n,r,i-1))}}return p(o,this._toBBox),o}_insert(e,t,n){const i=this._toBBox,r=n?e:i(e);T.clear();const s=function(e,t,n,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==n;){let n,i=1/0,r=1/0;for(let s=0,o=t.children.length;s<o;s++){const o=t.children[s],a=y(o),l=g(e,o)-a;l<r?(r=l,i=a<i?a:i,n=o):l===r&&a<i&&(i=a,n=o)}t=n||t.children[0]}return t}(r,this._data,t,T);for(s.children.push(e),u(s,r);t>=0&&T.data[t].children.length>this._maxEntries;)this._split(T,t),t--;!function(e,t,n){for(let i=n;i>=0;i--)u(t.data[i],e)}(r,T,t)}_split(e,t){const n=e.data[t],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);const s=this._chooseSplitIndex(n,r,i);if(!s)return;const o=n.children.splice(s,n.children.length-s),a=n.leaf?new x(o):new E(o);a.height=n.height,p(n,this._toBBox),p(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new E([e,t]),this._data.height=e.height+1,p(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let i,r,s;i=r=1/0;for(let o=t;o<=n-t;o++){const t=d(e,0,o,this._toBBox),a=d(e,o,n,this._toBBox),l=f(t,a),p=y(t)+y(a);l<i?(i=l,s=o,r=p<r?p:r):l===i&&p<r&&(r=p,s=o)}return s}_chooseSplitAxis(e,t,n){const i=e.leaf?this._compareMinX:c,r=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,r)&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const r=this._toBBox,s=d(e,0,t,r),o=d(e,n-t,n,r);let a=m(s)+m(o);for(let i=t;i<n-t;i++){const t=e.children[i];u(s,e.leaf?r(t):t),a+=m(s)}for(let i=n-t-1;i>=t;i--){const t=e.children[i];u(o,e.leaf?r(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const r=e.data[t-1],s=r.children;s.splice((0,i.qh)(s,n,s.length,r.indexHint),1)}else this.clear();else p(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let n=e;for(I.clear();n;){if(!0===n.leaf)for(const e of n.children)t((0,r.zI)(e));else I.pushArray(n.children);n=I.pop()??null}}function p(e,t){d(e,0,e.children.length,t,e)}function d(e,t,n,i,r){r||(r=new x([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s,o=t;o<n;o++)s=e.children[o],u(r,e.leaf?i(s):s);return r}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function y(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function f(e,t){const n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,r-n)*Math.max(0,s-i)}function b(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function w(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function _(e,t,n,i,r){const s=[t,n];for(;s.length;){const t=s.pop(),n=s.pop();if(t-n<=i)continue;const a=n+Math.ceil((t-n)/i/2)*i;(0,o.q)(e,a,n,t,r),s.push(n,a,a,t)}}const M=new s.A,I=new s.A,T=new s.A,C=new s.A({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class x extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class E extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},77901:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(31635),r=n(25482),s=n(10107),o=(n(44208),n(53966),n(87811),n(64108));let a=class extends r.o{constructor(e){super(e),this.properties=null}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],a.prototype,"properties",void 0),a=(0,i.Cg)([(0,o.$)("esri.rest.knowledgeGraph.GraphObject")],a)},83221:(e,t,n)=>{n.d(t,{A:()=>y});var i=n(4576),r=n(49186),s=n(65529),o=n(53966),a=n(70328),l=n(19419),p=n(90708),d=n(6518),u=n(51441),c=n(37730);const h=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new d.F,this._featuresById=new Map,this._usedMemory=0,this.events=new s.bk,this.featureAdapter=c.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,n,i,r]=this.fullBounds;return{xmin:t,ymin:n,xmax:i,ymax:r,spatialReference:(0,u.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const n of e){const e=this._boundsStore.get(n.objectId);e&&t((0,a.Jt)(h,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const n=this._featuresById.get(t);let i;if(n?(e.displayId=n.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,p.jQ)(null!=i?i:(0,l.vt)(),e.geometry),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const n=this._featuresById.get(t);if(!n)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0;const{geometry:i,attributes:s}=e;for(const e in s)n.attributes[e]=s[e];return i&&(n.geometry=i,this._boundsStore.set(t,(0,p.jQ)((0,l.vt)(),i)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(n)??0,n}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}}}]);