@arcgis/core 6.0.0-next.6 → 6.0.0-next.7

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 (122) hide show
  1. package/arcade/functions/knowledgegraph.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{f09c9d9a554c33a753b4.js → 02253bdffbd580af22d8.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{83589144eeeb08f45557.js → 2aeb5cc32284dd3e4d22.js} +1 -1
  5. package/assets/esri/core/workers/chunks/3ffda5bf0b91700dc308.js +1 -0
  6. package/assets/esri/core/workers/chunks/{1317ecdfd0cfa683a493.js → 42323093827adffe56d3.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{f46a0d7cf588ba1b4157.js → 518e8883b6ed613bf451.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{67ac6b326bf80fc3d33d.js → 53be85d04cd2da4f391d.js} +1 -1
  9. package/assets/esri/core/workers/chunks/54778dec1598818d93cb.js +1 -0
  10. package/assets/esri/core/workers/chunks/{3ac9dcbb0571a2580236.js → 62c8c9ad09e0166207fd.js} +1 -1
  11. package/assets/esri/core/workers/chunks/6588725275c75fae0d9c.js +1 -0
  12. package/assets/esri/core/workers/chunks/6ebe73f69ae822053b70.js +1 -0
  13. package/assets/esri/core/workers/chunks/7038ead1fa1674416ab3.js +1 -0
  14. package/assets/esri/core/workers/chunks/70cc2d79653d66e85b58.js +1 -0
  15. package/assets/esri/core/workers/chunks/{8ba32d3a0df4a206ef1c.js → 7165d6f6a5078768bebb.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{cbe6c0f32608cb504695.js → 776ae25a34352d3468bc.js} +1 -1
  17. package/assets/esri/core/workers/chunks/801e9e66edb4961461eb.js +1 -0
  18. package/assets/esri/core/workers/chunks/9ce91a909eccc4dfe388.js +1 -0
  19. package/assets/esri/core/workers/chunks/ad76f7ab2f3e6d5a5b3c.js +1 -0
  20. package/assets/esri/core/workers/chunks/{250d3be6d3849d71fed8.js → c29c474c4b1049352d3e.js} +1 -1
  21. package/assets/esri/core/workers/chunks/ddf0671976648f621269.js +1 -0
  22. package/assets/esri/core/workers/chunks/ecaac39dde7ec4213264.js +1 -0
  23. package/assets/esri/core/workers/chunks/fb444954be74c1962ced.js +1 -0
  24. package/assets/esri/core/workers/chunks/{fccbb902fe08448f91de.js → fd0a5c243f3426f2a0b5.js} +1 -1
  25. package/assets/esri/core/workers/chunks/fecaf0bc28aeea4d15db.js +1 -0
  26. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationSettings.scss +1 -1
  27. package/assets/esri/themes/base/widgets/_Features.scss +1 -1
  28. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +5 -9
  29. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +2 -4
  30. package/assets/esri/themes/base/widgets/_Tooltip.scss +1 -1
  31. package/assets/esri/themes/dark/main.css +1 -1
  32. package/assets/esri/themes/light/main.css +1 -1
  33. package/assets/esri/themes/light/view.css +1 -1
  34. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.en.json +1 -1
  35. package/chunks/GlobalIllumination.glsl.js +4 -2
  36. package/chunks/GlobalIlluminationBlur.glsl.js +3 -5
  37. package/chunks/GlobalIlluminationUpscale.glsl.js +1 -1
  38. package/config.js +1 -1
  39. package/core/colorUtils.js +1 -1
  40. package/core/has.js +1 -1
  41. package/core/workers/workerFactory.js +1 -1
  42. package/geometry/projectionUtils.js +1 -1
  43. package/kernel.js +1 -1
  44. package/layers/graphics/data/FeatureStore.js +1 -1
  45. package/layers/graphics/data/QueryEngineResult.js +1 -1
  46. package/layers/graphics/data/geometryUtils.js +1 -1
  47. package/layers/graphics/data/projectionSupport.js +1 -1
  48. package/layers/knowledgeGraph/layerUtils.js +1 -1
  49. package/layers/knowledgeGraph/nodeMovementUtils.js +1 -1
  50. package/layers/raster/datasets/TIFFRaster.js +1 -1
  51. package/package.json +2 -2
  52. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  53. package/views/2d/layers/features/FeatureSourceEventLog.js +1 -1
  54. package/views/2d/layers/features/sources/strategies/AFeatureTileLoadStrategy.js +1 -1
  55. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  56. package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
  57. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  58. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  59. package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
  60. package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
  61. package/views/3d/support/elevationUpdateUtils.js +1 -1
  62. package/views/3d/terrain/TerrainRenderer.js +1 -1
  63. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js +2 -2
  64. package/views/draw/Draw.d.ts +1 -1
  65. package/views/draw/support/InteractiveHandle.js +1 -1
  66. package/views/interactive/options/SnappingOptions.d.ts +1 -0
  67. package/views/interactive/options/TooltipOptions.d.ts +1 -0
  68. package/views/interactive/options/ViewOptions.d.ts +1 -0
  69. package/views/interactive/support/Units.d.ts +1 -0
  70. package/views/interactive/tooltip/components/DrawHeaderActions.js +1 -1
  71. package/views/interactive/tooltip/components/ElevationModeSelect.js +1 -1
  72. package/views/support/projectionUtils.js +1 -1
  73. package/widgets/BasemapLayerList.js +1 -1
  74. package/widgets/BatchAttributeForm.js +1 -1
  75. package/widgets/DirectionalPad.js +1 -1
  76. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  77. package/widgets/Expand.js +1 -1
  78. package/widgets/FeatureForm.js +1 -1
  79. package/widgets/FeatureTable/FieldColumn.js +1 -1
  80. package/widgets/FeatureTable.js +1 -1
  81. package/widgets/Features/FeaturesDrillIn.js +1 -1
  82. package/widgets/Features.js +1 -1
  83. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  84. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  85. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
  86. package/widgets/OrientedImageryViewer/components/SketchTools.js +1 -1
  87. package/widgets/PanoramicVideoViewer.js +1 -1
  88. package/widgets/Print.js +1 -1
  89. package/widgets/ScaleRangeSlider.js +1 -1
  90. package/widgets/Search/SearchResultRenderer.js +1 -1
  91. package/widgets/Sketch/SketchViewModel.d.ts +1 -1
  92. package/widgets/Sketch/support/ResponsiveToolbar/ResponsiveToolbar.js +1 -1
  93. package/widgets/Sketch.d.ts +1 -1
  94. package/widgets/Track/TrackViewModel.d.ts +1 -1
  95. package/widgets/UtilityNetworkAssociations.js +1 -1
  96. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
  97. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
  98. package/widgets/UtilityNetworkTrace/types.d.ts +2 -2
  99. package/widgets/UtilityNetworkTrace.js +1 -1
  100. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  101. package/widgets/ValuePicker.js +1 -1
  102. package/widgets/VideoPlayer/components/PlayerActionsGroup.js +1 -1
  103. package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
  104. package/widgets/support/GridControls.js +1 -1
  105. package/widgets/support/PluginSettingsControls.js +1 -1
  106. package/widgets/support/SelectionToolbar.js +1 -1
  107. package/widgets/support/SnappingControls.js +1 -1
  108. package/widgets/support/componentsUtils.js +1 -1
  109. package/assets/esri/core/workers/chunks/02d4f91652a79d2b637e.js +0 -1
  110. package/assets/esri/core/workers/chunks/107b025dc5b09465a78f.js +0 -1
  111. package/assets/esri/core/workers/chunks/1f43e06dcfe56229bb0f.js +0 -1
  112. package/assets/esri/core/workers/chunks/2a570ce6b99dac6ee996.js +0 -1
  113. package/assets/esri/core/workers/chunks/3880d2c7fb14955d7f93.js +0 -1
  114. package/assets/esri/core/workers/chunks/56851011276de0b3e318.js +0 -1
  115. package/assets/esri/core/workers/chunks/5f3ab77a79c408423fde.js +0 -1
  116. package/assets/esri/core/workers/chunks/65654e481cce9ae40e54.js +0 -1
  117. package/assets/esri/core/workers/chunks/8b54589f173259c1ba55.js +0 -1
  118. package/assets/esri/core/workers/chunks/bff767ec5bb4c0d6b324.js +0 -1
  119. package/assets/esri/core/workers/chunks/c906f984b2b6e7578c06.js +0 -1
  120. package/assets/esri/core/workers/chunks/de02a6a1f4810f99e9bb.js +0 -1
  121. package/assets/esri/core/workers/chunks/e5943f3a4bbc12c06c4d.js +0 -1
  122. package/assets/esri/core/workers/chunks/f0aaa646b17ffdbdcefa.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4708],{69052(e,t,r){r.d(t,{hr:()=>i});var n=r(34727);class i{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return s(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,n.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+o(this.range,e-t,r)}minimalMonotonic(e,t,r){return s(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);let r=(t=this.normalize(t))-e,n=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(n)?r:n}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function s(e,t,r,n,i=0,s=!1){return(n-=i)<t?n+=o(e,t-n):n>r&&(n-=o(e,n-r)),s&&n===r&&(n=t),n+i}function o(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const a=new i(0,2*Math.PI),l=(new i(-Math.PI,Math.PI),new i(0,360));r.d(t,["ie",0,l,"uC",0,a])},18370(e,t,r){r.d(t,{z:()=>i});class n{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function i(e){return new n(e)}},52039(e,t,r){r.d(t,{O7:()=>f,el:()=>c});var n=r(69052),i=(r(49186),r(18370)),s=r(17676),o=(r(5443),r(39829)),a=(r(82799),r(16930)),l=(r(80754),r(21325));async function c(e,t,r){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(r=t);let n=null;for(let t of e)n??=t?.spatialReference;if(!n)return e;let i=(0,l.Vp)(n);if(!i)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(i);return["xmin"in t?t:new o.A(t)]}let[a,c]=i.valid,f=!1;for(let t of e){if(!t)continue;if("point"===t.type){f||=t.x>=c,f||=t.x<=a;continue}let{extent:e}=t;if(null==e){f=!0;break}f||=e.xmin>=c,f||=e.xmin<=a,f||=e.xmax>=c,f||=e.xmax<=a}if(!f)return e;let[{foldInto360Range:d},g]=await(0,s.qr)(Promise.all([u.getImportPromise(),h.getImportPromise()]),r),m=g.fromSpatialReference(n);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=g.fromGeometry(e),r=g.toGeometry(d(t,m),n);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const u=(0,i.z)(()=>r.e(4144).then(()=>r(4144)).then(e=>e.load().then(()=>e))),h=(0,i.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(()=>r(78125)));function f(e,t,r){let n=(0,l.Vp)(r);if(null==n)return e;let[i,s]=n.valid,o=2*s,a=0,c=0;t>s?a=Math.ceil(Math.abs(t-s)/o):t<i&&(a=-Math.ceil(Math.abs(t-i)/o)),e>s?c=Math.ceil(Math.abs(e-s)/o):e<i&&(c=-Math.ceil(Math.abs(e-i)/o));let u=e+(a-c)*o,h=u-t;return h>s?u-=o:h<i&&(u+=o),u}function d(e){let t=(0,l.Vp)(e);if(null==t)return null;let[r,i]=t.valid;return new n.hr(r,i)}const g=d(a.A.WGS84);d(a.A.WebMercator),r.d(t,["Y_",0,g])},80754(e,t,r){r.d(t,{kS:()=>c,kd:()=>l});var n=r(82799),i=r(16930),s=r(60408),o=r(52006);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){if((0,o.Ed)(e))for(let r of function(e){return(0,s.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of r)if((0,o.aO)(e)){let[r,n]=e.c;r[0]+=t,n[0]+=t}else if((0,o.FG)(e)){let[r,n]=e.a;r[0]+=t,n[0]+=t}else if((0,o.n1)(e)){let[r,n,i]=e.b;r[0]+=t,n[0]+=t,i[0]+=t}else e[0]+=t;for(let r of function(e){return(0,s.Bi)(e)?e.rings:e.paths}(e))for(let e of r)e[0]+=t;return e}r.d(t,["j7",0,a])},31464(e,t,r){r.d(t,{Cv:()=>d,Nk:()=>f,lK:()=>m});var n=r(4576),i=r(99917),s=r(60408),o=r(21325),a=r(28735);const l=[0,0];function c(e,t){let r=(0,o.K8)(e)?a.je:a.tD;if((0,s.fT)(t)){let e={x:0,y:0};return[e.x,e.y]=r(t.x,t.y,l),null!=t.z&&(e.z=t.z),null!=t.m&&(e.m=t.m),e}if((0,s.ZC)(t)){let e={xmin:0,ymin:0,xmax:0,ymax:0};return[e.xmin,e.ymin]=r(t.xmin,t.ymin,l),[e.xmax,e.ymax]=r(t.xmax,t.ymax,l),t.hasZ&&(e.zmin=t.zmin,e.zmax=t.zmax,e.hasZ=!0),t.hasM&&(e.mmin=t.mmin,e.mmax=t.mmax,e.hasM=!0),e}if((0,s.Bi)(t))return{rings:u(t.rings,r),hasM:t.hasM,hasZ:t.hasZ};if((0,s.Rg)(t))return{paths:u(t.paths,r),hasM:t.hasM,hasZ:t.hasZ};if((0,s.U9)(t))return{points:h(t.points,r),hasM:t.hasM,hasZ:t.hasZ};throw Error()}function u(e,t){let r=[];for(let n of e)r.push(h(n,t));return r}function h(e,t){let r=[];for(let n of e){let e=t(n[0],n[1],[0,0]);r.push(e),n.length>2&&e.push(n[2]),n.length>3&&e.push(n[3])}return r}async function f(e,t){if(!e||!t)return;let r=Array.isArray(e)?e.map(e=>null==e.geometry?null:e.geometry.spatialReference).filter(n.Ru):[e];await(0,i.initializeProjection)(r.map(e=>({source:e,dest:t})))}function d(e,t,r,n){if(!e)return null;if(r||(r=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(r)||(0,o.aI)(t,r))return e;if((0,a.y7)(t,r)){let t=c(r,e);return t.spatialReference=r,t}return(0,i.projectMany)([e],t,r,n)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,r,n){if(!e?.length||!t||!r||(0,o.aI)(t,r))return e;let i={geometries:e,inSpatialReference:t,outSpatialReference:r,options:n,resolve:Promise.withResolvers()};return this._jobs.push(i),this._timer??=setTimeout(this._process,10),i.resolve.promise}_process(){this._timer=null;let e=this._jobs.shift();if(!e)return;let t,{geometries:r,inSpatialReference:n,outSpatialReference:s,resolve:o,options:l}=e,u=r.filter(e=>null!=e);t=(0,a.y7)(n,s)&&null==l?.extendedParams?u.map(e=>c(s,e)):(0,i.projectMany)(u,n,s,l);let h=0,f=r.map(e=>null==e?null:t[h++]);o.resolve(f),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function m(e,t,r,n){return g.push(e,t,r,n)}},60986(e,t,r){r.r(t),r.d(t,{createConnection:()=>C});var n=r(56507),i=r(49186),s=r(31464),o=r(9916),a=r(32198),l=r(65529),c=r(91429);let u=class extends l.nJ{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new i.A("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,a.Cg)([(0,c.MZ)({readOnly:!0})],u.prototype,"connectionError",null),u=(0,a.Cg)([(0,c.$K)("esri.layers.support.StreamConnection")],u);class h extends u{constructor(e,t){super(),this._config=e,this._outSpatialReference=t,this.connectionStatus="connected",this.errorString=null,this._isPolling=!1,this._lastIngestedAt=null,this._pollTimer=null,this._pollRecentData=async()=>{if(!this.destroyed&&!this._isPolling){this._isPolling=!0;try{let e=await this._queryChanges(this._lastIngestedAt);if(this.destroyed)return;this._handleResult(e)}catch(e){this.errorString=e instanceof Error?e.message:"Failed to fetch"}finally{this._isPolling=!1}}},this._initialize()}destroy(){super.destroy(),this._pollTimer&&=(clearInterval(this._pollTimer),null)}sendMessageToSocket(e){throw new i.A("kusto:unsupported","sendMessageToSocket not supported for Kusto connections")}sendMessageToClient(e){throw new i.A("kusto:unsupported","sendMessageToClient not supported for Kusto connections")}updateCustomParameters(e){throw new i.A("kusto:unsupported","updateCustomParameters not supported for Kusto connections")}async _initialize(){await(0,s.Nk)(this._config.sourceSpatialReference,this._outSpatialReference);try{let e=await this._queryInitial();this._handleResult(e),this._pollTimer=setInterval(this._pollRecentData,6e4*this._config.refreshInterval)}catch{throw new i.A("kusto:connection","Failed to query KQL database")}}async _queryInitial(){let{trackIdField:e}=this._config,t=f(await this._executeQuery(`${(0,o.xw)(this._config.table)} | extend IngestedAt = ingestion_time() | summarize arg_max(IngestedAt, *) by ${(0,o.xw)(e)}`));if(!t)throw new i.A("kusto:connection","Unable to find primaryTable");return{ingestedAt:d(t),table:t}}async _queryChanges(e=null){let t=e??"1970-01-01T00:00:00Z",r=f(await this._executeQuery(`${(0,o.xw)(this._config.table)} | extend IngestedAt = ingestion_time() | where IngestedAt > todatetime('${(0,o.iD)(t)}') | order by IngestedAt asc`));if(!r)throw new i.A("kusto:connection","Unable to find primaryTable");return{ingestedAt:d(r),table:r}}async _executeQuery(e){let t=this._config.database,r=t.properties.queryServiceUri,{data:i}=await(0,n.A)(`${r}/v2/rest/query`,{responseType:"json",method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({db:t.displayName,csl:e})});return i}_handleResult(e){this._lastIngestedAt=e.ingestedAt;let t=this._createFeatures(e.table);if(null!=t){this.onMessage(t);for(let e of t)this.onFeature(e)}}_createFeatures(e){if(null==e||0===e.Rows.length)return null;let{xField:t,yField:r}=this._config.geometryEncoding,n=e.Columns.findIndex(e=>e.ColumnName===t),i=e.Columns.findIndex(e=>e.ColumnName===r);return e.Rows.map(t=>this._createFeature(e.Columns,n,i,t))}_createFeature(e,t,r,n){let{xField:i,yField:o}=this._config.geometryEncoding,a={};for(let t=0;t<e.length;t++){let r=e[t],s=n[t]??null;r.ColumnName!==o&&r.ColumnName!==i&&(a[r.ColumnName]=s)}let l=null,c=n[t],u=n[r];return null!=u&&null!=c&&(l=(0,s.Cv)({x:c,y:u},this._config.sourceSpatialReference,this._outSpatialReference)),{attributes:a,geometry:l}}}function f(e){return e.find(e=>"DataTable"===e.FrameType&&"PrimaryResult"===e.TableKind)??null}function d(e){let t=e.Columns.findIndex(e=>"IngestedAt"===e.ColumnName);if(t<0)return null;let r=null;for(let n of e.Rows){let e=n[t];"string"==typeof e&&(null==r||e>r)&&(r=e)}return r}var g=r(53966),m=r(84952),p=r(16930),y=r(65864),_=r(17676),w=r(62815);function b(e,t){if(null==e&&null==t)return null;let r={};return null!=t&&(r.geometry=t),null!=e&&(r.where=e),r}let S=class extends u{constructor(e,t){super({}),this._outSpatialReference=t,this._outstandingMessages=[],this.errorString=null;let{geometryType:r,sourceSpatialReference:n}=e;this._config=e,this._featureZScaler=(0,w.N)(r,n,this._outSpatialReference),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case 0:case 1:return"connected";case 2:case 3:return"disconnected"}}sendMessageToSocket(e){null==this._websocket?this._outstandingMessages.push(e):this._websocket.send(JSON.stringify(e))}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.url.path,t=1e3,r=0){try{if(this.destroyed)return;let t=(0,m.a6)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(n){let s=t/1e3;return this._config.maxReconnectionAttempts&&r>=this._config.maxReconnectionAttempts?(g.A.getLogger(this).error(new i.A("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(g.A.getLogger(this).error(new i.A("websocket-connection",`Failed to connect. Attempting to reconnect in ${s}s`,n)),await(0,_.Pl)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),r+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{let t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void g.A.getLogger(this).error(new i.A("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise((t,r)=>{let n=new WebSocket(e);n.onopen=()=>{n.onopen=null,this.destroyed?(n.onclose=null,n.close()):(n.onclose=e=>this._onClose(e),n.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(n),t(n))},n.onclose=e=>{n.onopen=n.onclose=null,r(e)}})}async _handshake(e=1e4){let t=this._websocket;if(null==t)return;let r=Promise.withResolvers(),n=t.onmessage,s=b(this._config.definitionExpression,this._config.geometryDefinition),{outFields:o}=this._config,a=setTimeout(()=>r.reject(),e),l=()=>{clearTimeout(a),r.reject()};return t.onmessage=e=>{let c=null;try{c=JSON.parse(e.data)}catch{}(!c||"object"!=typeof c)&&(g.A.getLogger(this).error(new i.A("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),l(),this.destroy()),c.spatialReference?.wkid!==this._outSpatialReference?.wkid&&(g.A.getLogger(this).error(new i.A("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${this._outSpatialReference.wkid}`,e.data)),l(),this.destroy()),"json"!==c.format&&(g.A.getLogger(this).error(new i.A("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),l(),this.destroy()),s&&c.filter!==s&&g.A.getLogger(this).error(new i.A("websocket-connection","Tried to set filter, but server doesn't support it")),o&&c.outFields!==o&&g.A.getLogger(this).error(new i.A("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=n;for(let e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],clearTimeout(a),r.resolve()},t.send(JSON.stringify({filter:s,outFields:o,format:"json",spatialReference:{wkid:this._outSpatialReference.wkid}})),r.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(let t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){let t="Encountered an error over WebSocket connection";this._set("errorString",t),g.A.getLogger(this).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&g.A.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,a.Cg)([(0,c.MZ)()],S.prototype,"connectionStatus",null),(0,a.Cg)([(0,c.MZ)()],S.prototype,"errorString",void 0),S=(0,a.Cg)([(0,c.$K)("esri.layers.graphics.sources.connections.WebSocketConnection")],S);var k=r(80893),A=r(97552);const x={maxQueryDepth:5,maxRecordCountFactor:3};let v=class extends S{constructor(e,t){super({...x,...e},t),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){let e=await this._fetchServiceDefinition(this._config.url);e.timeInfo.trackIdField||g.A.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");let t=this._fetchWebSocketUrl(e.streamUrls,this._outSpatialReference);this._buddyServicesQuery||=this._queryBuddyServices(),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);let r=b(this._config.definitionExpression,this._config.geometryDefinition),{outFields:n}=this._config;this.destroyed||this._setFilter(r,n)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void g.A.getLogger(this).error(new i.A("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){let t={f:"json",...this._config.customParameters},r=(await(0,n.A)(e.path,{query:t,responseType:"json"})).data;return this._serviceDefinition=r,r}_fetchWebSocketUrl(e,t){let{urls:r,token:n}=e[0],i=this._inferWebSocketBaseUrl(r);return(0,m.a6)(`${i}/subscribe`,{outSR:""+t.wkid,token:n})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(let t of e)if(t.includes("wss"))return t;return g.A.getLogger(this).error(new i.A("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){let r=this._websocket;if(null==r||null==e&&null==t)return;let n=JSON.stringify({filter:this._serializeFilter(e,t)}),s=!1,o=Promise.withResolvers();return r.onmessage=e=>{let t=JSON.parse(e.data);t.filter&&(t.error&&(g.A.getLogger(this).error(new i.A("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),o.reject(t.error)),this._setWebSocketJSONParseHandler(r),s=!0,o.resolve())},r.send(n),setTimeout(()=>{s||(!this.destroyed&&this._websocket===r&&g.A.getLogger(this).error(new i.A("geoevent-connection","Server timed out when setting filter")),o.reject())},1e4),o.promise}_serializeFilter(e,t){let r={};if(null==e&&null==t)return r;if(e?.geometry)try{let t=(0,y.rS)(e.geometry);if("extent"!==t.type)throw new i.A("geoevent-connection",`Expected extent but found type ${t.type}`);r.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){g.A.getLogger(this).error(new i.A("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return e?.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(r.where=e.where),null!=t&&(r.outFields=t.join(",")),r}_enrich(e){if(!this._relatedFeatures)return e;let t=this._serviceDefinition.relatedFeatures.joinField,r=e.attributes[t],n=this._relatedFeatures.get(r);if(!n)return g.A.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;let{attributes:s,geometry:o}=n;for(let t in s)e.attributes[t]=s[t];return o&&(e.geometry=o),!e.geometry&&!e.centroid&&g.A.getLogger(this).error(new i.A("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{let{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,r=this._queryRelatedFeatures(e),n=this._queryArchive(t);await r;let i=await n;if(!i)return;for(let e of i.features)this.onFeature(this._enrich(e))}catch(e){g.A.getLogger(this).error(new i.A("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;let t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){let t=new((await Promise.all([r.e(6361),r.e(6914),r.e(7865),r.e(5732),r.e(2869),r.e(9953),r.e(3910),r.e(564),r.e(1214),r.e(2889),r.e(1017),r.e(9789),r.e(4674),r.e(7283),r.e(8589),r.e(812),r.e(5879),r.e(9279)]).then(()=>r(18589))).default)({url:e}),{capabilities:n}=await t.load(),i=n.query.supportsMaxRecordCountFactor,s=n.query.supportsPagination,o=n.query.supportsCentroid,a=this._config.maxRecordCountFactor,l=t.capabilities.query.maxRecordCount,c=i?l*a:l,u=new A.A;if(u.outFields=this._config.outFields??["*"],u.where=this._config.definitionExpression??"1=1",u.returnGeometry=!0,u.returnExceededLimitFeatures=!0,u.outSpatialReference=p.A.fromJSON(this._outSpatialReference),o&&(u.returnCentroid=!0),i&&(u.maxRecordCountFactor=a),s)return u.num=c,t.destroy(),this._queryPages(e,u);let h=await(0,k.eW)(e,u,this._config.sourceSpatialReference);return t.destroy(),h}async _queryPages(e,t,r=[],n=0){t.start=null==t.num?null:n*t.num;let i=await(0,k.eW)(e,t,this._config.sourceSpatialReference);return i.exceededTransferLimit&&n<(this._config.maxQueryDepth??0)?(i.features.forEach(e=>r.push(e)),this._queryPages(e,t,r,n+1)):(r.forEach(e=>i.features.push(e)),i)}_addRelatedFeatures(e){let t=new Map,r=e.features,n=this._serviceDefinition.relatedFeatures.joinField;for(let e of r){let r=e.attributes[n];t.set(r,e)}this._relatedFeatures=t}};v=(0,a.Cg)([(0,c.$K)("esri.layers.graphics.sources.connections.GeoEventConnection")],v);var R=r(64108);let M=class extends u{constructor(e,t){super({}),this.connectionStatus="connected",this.errorString=null;let{geometryType:r,sourceSpatialReference:n}=e;this._featureZScaler=(0,w.N)(r,n,t)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(let t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function C(e,t){let r=t.toJSON();switch(e.type){case"client":return new M(e,r);case"custom":return new S(e,r);case"geoevent":return new v(e,r);case"kusto":return new h(e,r)}}(0,a.Cg)([(0,c.MZ)()],M.prototype,"connectionStatus",void 0),(0,a.Cg)([(0,c.MZ)()],M.prototype,"errorString",void 0),M=(0,a.Cg)([(0,R.$)("esri.layers.support.ClientSideConnection")],M)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9512],{9741(e,t,r){r.r(t),r.d(t,{registerFunctions:()=>K});var n=r(92602),o=r(66131),a=r(47609),i=r(66395),s=r(85935),l=r(78878),p=r(80672),u=r(19334),c=r(91075),f=r(99917),d=r(16930),h=r(28735),g=r(80812),y=r(56507),m=r(78888),w=r(60408),A=r(2272),v=r(65864),S=r(32198),C=r(25482),b=r(91429),R=r(21325);let G=class extends C.o{constructor(e){super(e),this.geometries=[],this.outSpatialReference=null,this.transformation=null,this.transformForward=null}toJSON(){let e=this.geometries.map(e=>e.toJSON()),t=this.geometries[0],r={};return r.outSR=(0,R.YX)(this.outSpatialReference),r.inSR=(0,R.YX)(t.spatialReference),r.geometries=JSON.stringify({geometryType:(0,w.$B)(t),geometries:e}),this.transformation&&(r.transformation=this.transformation.wkid||JSON.stringify(this.transformation)),null!=this.transformForward&&(r.transformForward=this.transformForward),r}};(0,S.Cg)([(0,b.MZ)()],G.prototype,"geometries",void 0),(0,S.Cg)([(0,b.MZ)({type:d.A,json:{read:{source:"outSR"}}})],G.prototype,"outSpatialReference",void 0),(0,S.Cg)([(0,b.MZ)()],G.prototype,"transformation",void 0),(0,S.Cg)([(0,b.MZ)()],G.prototype,"transformForward",void 0),G=(0,S.Cg)([(0,b.$K)("esri.rest.support.ProjectParameters")],G);const M=(0,m.dp)(G);var j=r(25927),Z=r(42538),P=r(40662),k=r(42095),$=r(23150),x=r(54218);let _=null;function N(e,t,r,n){if(null===e)return null;if((0,x.Kg)(e)||(0,x.Et)(e))return e;if((0,l.f)(e)||(0,l.f)(e))return e.toJSDate();if((0,l.q)(e))return e.toStorageFormat();if((0,l.r)(e))return e.toStorageString();if((0,l.l)(e)){let o={};for(let a of e.keys())o[a]=N(e.field(a),t,r,n),o[a]instanceof c.A&&n.push({get:()=>o[a],set:e=>{o[a]=e}});return o}if((0,x.cy)(e)){let o=e.map(e=>N(e,t,r,n));for(let e=0;e<o.length;e++)o[e]instanceof c.A&&n.push({get:()=>o[e],set:t=>{o[e]=t}});return o}return(0,l.d)(e)?e.spatialReference.isWGS84?e.asAccessorGeometry():e.spatialReference.isWebMercator&&t?(0,h.ci)(e.asAccessorGeometry()):e.asAccessorGeometry():void 0}function O(e,t){if(!e)return null;let r=Object.create(null);for(let n in e)r[n]=I(e[n],t);return i.A.createMutable(r)}function I(e,t){return null===e?null:Array.isArray(e)?e.map(e=>I(e,t)):e instanceof j.A?i.A.createMutable({__proto__:null,graphTypeName:e.typeName,id:e.id,graphType:"entity",properties:O(e.properties,t)}):e instanceof P.A?i.A.createMutable({__proto__:null,graphType:"object",properties:O(e.properties,t)}):e instanceof $.A?i.A.createMutable({__proto__:null,graphTypeName:e.typeName,id:e.id,graphType:"relationship",originId:e.originId??null,destinationId:e.destinationId??null,properties:O(e.properties,t)}):e instanceof k.A?i.A.createMutable({__proto__:null,graphType:"path",path:e.path?e.path.map(e=>I(e,t)):null}):e instanceof c.A?(0,u.e)(function(e,t){if(!e)return e;if(e.spatialReference.isWGS84&&t.spatialReference.isWebMercator)return(0,h.Gh)(e);if(e.spatialReference.equals(t.spatialReference))return e;throw new s.D$("WrongSpatialReference",null)}(e,t)):"string"==typeof e||"number"==typeof e?e:e instanceof Date?o.lY.dateJSAndZoneToArcadeDate(e,(0,l.S)(t)):null}function K(e){"async"===e.mode&&(e.functions.knowledgegraphbyportalitem=function(t,n){return e.standardFunctionAsync(t,n,(e,o,i)=>{if((0,l.E)(i,2,2,n),!(i[0]instanceof a.A))throw new s.D$("PortalRequired",n);let u=(0,l.w)(i[1]);return async function(e,t){let n=new g.default({portal:e,id:t});return await n.load(),null===_&&(_=await Promise.all([r.e(2869),r.e(3910),r.e(5128),r.e(3902),r.e(3318)]).then(()=>r(53902))),await _.fetchKnowledgeGraph(n.url)}((0,p.RI)(t,i[0]),u)})},e.signatures.push({name:"knowledgegraphbyportalitem",min:2,max:2}),e.functions.querygraph=function(t,o){return e.standardFunctionAsync(t,o,async(e,a,p)=>{(0,l.E)(p,2,4,o);let u=p[0];if(!(0,l.o)(u))throw new s.D$("InvalidParameter",o);let c=p[1];if(!(0,x.Kg)(c))throw new s.D$("InvalidParameter",o);null===_&&(_=await Promise.all([r.e(2869),r.e(3910),r.e(5128),r.e(3902),r.e(3318)]).then(()=>r(53902)));let h=null,g=(0,l.N)(p[2],null);if(!(g instanceof i.A||null===g))throw new s.D$("InvalidParameter",o);if(g){let e=[];h=N(g,!0,!1,e),e=e.filter(e=>!e.get().spatialReference.isWGS84),e.length>0&&await async function(e){let t=n.A.geometryServiceUrl??"";if(!t){(0,f.isLoaded)()||await(0,f.load)();for(let t of e)t.set((0,f.project)(t.get(),d.A.WGS84));return}let r=e.map(e=>e.get()),o=new G({geometries:r,outSpatialReference:d.A.WGS84}),a=await async function(e,t,r){t=M(t);let n=(0,A.Dl)(e),o={...n.query,f:"json",...t.toJSON()},a=t.outSpatialReference,i=(0,w.$B)(t.geometries[0]),s=(0,A.jV)(o,r);return(0,y.A)(n.path+"/project",s).then(({data:{geometries:e}})=>function(e,t,r){let n=(0,v.xD)(t);return e.map(e=>{let t=n.fromJSON(e);return t.spatialReference=r,t})}(e,i,a))}(t,o);for(let t=0;t<a.length;t++)e[t].set(a[t])}(e)}let m=(0,l.N)(p[3],!1),S=new Z.A({openCypherQuery:c,bindParameters:h,provenanceBehavior:m?"include":"exclude"});(u?.serviceDefinition?.currentVersion??11.3)>11.2&&(S.outputSpatialReference=t.spatialReference);let C=(await _.executeQueryStreaming(u,S)).resultRowsStream.getReader(),b=[];try{for(;;){let{done:e,value:r}=await C.read();if(e)break;if(Array.isArray(r))for(let e of r)b.push(I(e,t));else{let e=[];for(let n of r)e.push(I(r[n],t));b.push(e)}}}catch(e){throw e}return b})},e.signatures.push({name:"querygraph",min:2,max:4}))}},69540(e,t,r){var n=r(32198),o=r(69622),a=(r(44208),r(4718)),i=(r(53966),r(97768)),s=r(88620),l=r(64108);const p=Symbol("ClonableMixin"),u=e=>{var t;let r=e,o=class extends r{constructor(){super(...arguments),this[t]=!0}static{t=p}clone(e){let t=(0,s.oY)(this);(0,i.Lw)(t,"unable to clone instance of non-accessor class");let r=t.metadata,n=t.store,o={},l=new Map;for(let t in r){let i=r[t],s=n?.originOf(t),p=i.clonable;if(i.readOnly||!1===p||7!==s&&0!==s&&5!==s&&4!==s)continue;let u=this[t],c=null;if("function"==typeof p)c=p(u,e);else if("reference"===p)c=u;else if(c=(0,a.TU)(u,e),null!=u&&null==c)continue;0===s?l.set(t,c):o[t]=c}let p=new(0,Object.getPrototypeOf(this).constructor)(o);if(l.size){let e=(0,s.oY)(p)?.store;if(e)for(let[t,r]of l)e.set(t,r,0)}return p}};return o=(0,n.Cg)([(0,l.$)("esri.core.Clonable")],o),o},c=u(o.A);r.d(t,["OU",0,u,"Pw",0,c])},25927(e,t,r){r.d(t,{A:()=>s});var n=r(32198),o=r(91429),a=r(86738),i=r(54238);let s=class extends i.A{constructor(e){super(e),this.layoutGeometry=null}};(0,n.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],s.prototype,"layoutGeometry",void 0),s=(0,n.Cg)([(0,o.$K)("esri.rest.knowledgeGraph.Entity")],s)},54238(e,t,r){r.d(t,{A:()=>i});var n=r(32198),o=r(91429),a=r(77901);let i=class extends a.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],i.prototype,"typeName",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],i.prototype,"id",void 0),i=(0,n.Cg)([(0,o.$K)("esri.rest.knowledgeGraph.GraphNamedObject")],i)},77901(e,t,r){r.d(t,{A:()=>i});var n=r(32198),o=r(25482),a=r(91429);let i=class extends o.o{constructor(e){super(e),this.properties={}}};(0,n.Cg)([(0,a.MZ)({json:{write:!0}})],i.prototype,"properties",void 0),i=(0,n.Cg)([(0,a.$K)("esri.rest.knowledgeGraph.GraphObject")],i)},42538(e,t,r){r.d(t,{A:()=>l});var n=r(32198),o=r(91429),a=r(16930),i=r(69622);let s=class extends i.A{constructor(e){super(e),this.openCypherQuery=""}};(0,n.Cg)([(0,o.MZ)()],s.prototype,"openCypherQuery",void 0),s=(0,n.Cg)([(0,o.$K)("esri.rest.knowledgeGraph.GraphQuery")],s);let l=class extends s{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,n.Cg)([(0,o.MZ)()],l.prototype,"bindParameters",void 0),(0,n.Cg)([(0,o.MZ)()],l.prototype,"bindGeometryQuantizationParameters",void 0),(0,n.Cg)([(0,o.MZ)()],l.prototype,"outputQuantizationParameters",void 0),(0,n.Cg)([(0,o.MZ)({type:a.A})],l.prototype,"outputSpatialReference",void 0),(0,n.Cg)([(0,o.MZ)()],l.prototype,"provenanceBehavior",void 0),l=(0,n.Cg)([(0,o.$K)("esri.rest.knowledgeGraph.GraphQueryStreaming")],l)},40662(e,t,r){r.d(t,{A:()=>i});var n=r(32198),o=r(91429),a=r(77901);let i=class extends a.A{constructor(e){super(e)}};i=(0,n.Cg)([(0,o.$K)("esri.rest.knowledgeGraph.ObjectValue")],i)},42095(e,t,r){r.d(t,{A:()=>s});var n=r(32198),o=r(25482),a=r(91429),i=r(77901);let s=class extends o.o{constructor(e){super(e),this.path=[]}};(0,n.Cg)([(0,a.MZ)({type:[i.A],json:{write:!0}})],s.prototype,"path",void 0),s=(0,n.Cg)([(0,a.$K)("esri.rest.knowledgeGraph.Path")],s)},23150(e,t,r){r.d(t,{A:()=>s});var n=r(32198),o=r(91429),a=r(82799),i=r(54238);let s=class extends i.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],s.prototype,"originId",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],s.prototype,"destinationId",void 0),(0,n.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],s.prototype,"layoutGeometry",void 0),s=(0,n.Cg)([(0,o.$K)("esri.rest.knowledgeGraph.Relationship")],s)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3103,6956,7745],{31464(e,t,r){r.d(t,{Cv:()=>m,Nk:()=>y,lK:()=>f});var i=r(4576),n=r(99917),s=r(60408),o=r(21325),a=r(28735);const l=[0,0];function u(e,t){let r=(0,o.K8)(e)?a.je:a.tD;if((0,s.fT)(t)){let e={x:0,y:0};return[e.x,e.y]=r(t.x,t.y,l),null!=t.z&&(e.z=t.z),null!=t.m&&(e.m=t.m),e}if((0,s.ZC)(t)){let e={xmin:0,ymin:0,xmax:0,ymax:0};return[e.xmin,e.ymin]=r(t.xmin,t.ymin,l),[e.xmax,e.ymax]=r(t.xmax,t.ymax,l),t.hasZ&&(e.zmin=t.zmin,e.zmax=t.zmax,e.hasZ=!0),t.hasM&&(e.mmin=t.mmin,e.mmax=t.mmax,e.hasM=!0),e}if((0,s.Bi)(t))return{rings:p(t.rings,r),hasM:t.hasM,hasZ:t.hasZ};if((0,s.Rg)(t))return{paths:p(t.paths,r),hasM:t.hasM,hasZ:t.hasZ};if((0,s.U9)(t))return{points:d(t.points,r),hasM:t.hasM,hasZ:t.hasZ};throw Error()}function p(e,t){let r=[];for(let i of e)r.push(d(i,t));return r}function d(e,t){let r=[];for(let i of e){let e=t(i[0],i[1],[0,0]);r.push(e),i.length>2&&e.push(i[2]),i.length>3&&e.push(i[3])}return r}async function y(e,t){if(!e||!t)return;let r=Array.isArray(e)?e.map(e=>null==e.geometry?null:e.geometry.spatialReference).filter(i.Ru):[e];await(0,n.initializeProjection)(r.map(e=>({source:e,dest:t})))}function m(e,t,r,i){if(!e)return null;if(r||(r=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(r)||(0,o.aI)(t,r))return e;if((0,a.y7)(t,r)){let t=u(r,e);return t.spatialReference=r,t}return(0,n.projectMany)([e],t,r,i)[0]}const c=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,r,i){if(!e?.length||!t||!r||(0,o.aI)(t,r))return e;let n={geometries:e,inSpatialReference:t,outSpatialReference:r,options:i,resolve:Promise.withResolvers()};return this._jobs.push(n),this._timer??=setTimeout(this._process,10),n.resolve.promise}_process(){this._timer=null;let e=this._jobs.shift();if(!e)return;let t,{geometries:r,inSpatialReference:i,outSpatialReference:s,resolve:o,options:l}=e,p=r.filter(e=>null!=e);t=(0,a.y7)(i,s)&&null==l?.extendedParams?p.map(e=>u(s,e)):(0,n.projectMany)(p,i,s,l);let d=0,y=r.map(e=>null==e?null:t[d++]);o.resolve(y),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function f(e,t,r,i){return c.push(e,t,r,i)}},58727(e,t,r){r.d(t,{GC:()=>h,T2:()=>v,dO:()=>S,iJ:()=>g});var i=r(49186),n=r(66552),s=r(86211),o=r(39829),a=r(99917),l=r(90634),u=r(60408),p=r(65864),d=r(52039),y=r(21325),m=r(31464);const c=new n.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),f=Object.freeze({});async function g(e,t,r){let i=e.bin;return i.onField&&=i.onField.trim(),i.onExpression?.value&&(i.onExpression.value=i.onExpression.value.trim()),i.splitBy&&(i.splitBy.value&&(i.splitBy.value=i.splitBy.value.trim()),i.splitBy.outAlias&&(i.splitBy.outAlias=i.splitBy.outAlias.trim())),i.stackBy&&(i.stackBy.value&&(i.stackBy.value=i.stackBy.value.trim()),i.stackBy.outAlias&&(i.stackBy.outAlias=i.stackBy.outAlias.trim())),"normalizationField"in i.parameters&&i.parameters.normalizationField&&(i.parameters.normalizationField=i.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:"frequency"}]),h(e,t,r)}async function h(e,t,r){let{outFields:i,orderByFields:n,groupByFieldsForStatistics:s,outStatistics:o}=e;if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(o)for(let e=0;e<o.length;e++)o[e].onStatisticField&&(o[e].onStatisticField=o[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),v(e,t,r)}async function v(e,t,r){if(!e)return null;let{where:i}=e;if(e.where=i=i?.trim(),(!i||/^1 *= *1$/.test(i)||t&&t===i)&&(e.where=null),!e.geometry)return e;let n=await w(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){let{spatialReference:t}=e.geometry;n=(0,l.HA)(n),n.spatialReference=t}if(!n)return e;await(0,m.Nk)(n.spatialReference,r);let[s]=await(0,d.el)((0,p.rS)(n));if(null==s)throw f;let c=!1;((0,u.ZC)(s)||(0,u.Bi)(s)||(0,u.Rg)(s))&&(c=!(0,y.aI)(s.spatialReference,r)&&!(0,a.canProjectWithoutEngine)(s.spatialReference,r)),c&&(0,u.ZC)(s)&&(s=o.A.fromExtent(s));let g="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,h=c&&g?{extendedParams:{densificationStep:8*g}}:void 0,v=s.toJSON(),S=(0,m.Cv)(v,v.spatialReference,r,h);if(!S)throw f;return S.spatialReference=r,e.geometry=S,e}async function w(e){let{distance:t,units:n}=e,o=e.geometry;if(!t||"vertexAttributes"in o)return o;let a=o.spatialReference,l=n?c.fromJSON(n):(0,s.Ij)(a),p=a&&((0,y.EA)(a)||(0,y.K8)(a))?o:await(0,m.Nk)(a,y.KK).then(()=>(0,m.Cv)(o,y.KK)),{geodesicBufferExecute:d,geodesicBufferLoad:f}=await r.e(9159).then(()=>r(49159));await f();let g=d(p,t||1,{unit:l})??void 0;if(!g||!(0,u.Bi)(g)||0===g.rings.length)throw new i.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return g}function S(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}r.d(t,["VY",0,c,"v8",0,f])},33103(e,t,r){r.r(t),r.d(t,{executeAttributeBinsQuery:()=>m});var i=r(2272),n=r(56507),s=r(84952),o=r(60408),a=r(52039),l=r(21325),u=r(10536);function p(e){let t,r,i,n=e.geometry,s=e.toJSON(),a=s;if(null!=n&&(r=n.spatialReference,i=(0,l.YX)(r),a.geometryType=(0,o.$B)(n),a.geometry=JSON.stringify(n),a.inSR=i),s.outSR?(a.outSR=(0,l.YX)(s.outSR),t=e.outSpatialReference):n&&(a.outSR=a.inSR,t=r),a.bin&&=JSON.stringify(a.bin),a.quantizationParameters&&=JSON.stringify(a.quantizationParameters),a.outStatistics&&=JSON.stringify(a.outStatistics),a.outTimeReference&&=JSON.stringify(a.outTimeReference),s.timeExtent){let{start:e,end:t}=s.timeExtent;(null!=e||null!=t)&&(a.time=e===t?e:`${e??"null"},${t??"null"}`),delete s.timeExtent}return e.defaultSpatialReference&&(0,l.aI)(r,t)&&(a.defaultSR=a.inSR,delete a.inSR,delete a.outSR),a}var d=r(37745),y=r(14575);async function m(e,t,r){let{data:o}=await async function(e,t,r){return null!=t.timeExtent&&t.timeExtent.isEmpty?{data:{features:[]}}:await async function(e,t,r={}){let i="string"==typeof e?(0,s.An)(e):e,[o]=await(0,a.el)([t.geometry],r);null!=o&&((t=t.clone()).geometry=o);let l=(0,u.z)({...i.query,f:"json",...p(t)});return(0,n.A)((0,s.fj)(i.path,"queryBins"),{...r,query:{...l,...r.query}})}(e,t,r)}((0,i.Dl)(e),y.default.from(t),r);return d.default.fromJSON(o)}},37745(e,t,r){r.r(t),r.d(t,{default:()=>y});var i,n=r(32198),s=r(52106),o=r(4718),a=r(91429);let l=class extends s.A{static{i=this}constructor(e){super(e),this.stackedAttributes=null}cloneShallow(){return new i(Object.assign({stackedAttributes:this.stackedAttributes},super.cloneShallow()))}toJSON(){return{...super.toJSON(),stackedAttributes:(0,o.o8)(this.stackedAttributes)}}};(0,n.Cg)([(0,a.MZ)()],l.prototype,"stackedAttributes",void 0),l=i=(0,n.Cg)([(0,a.$K)("esri.AttributeBinsGraphic")],l);var u=r(69540),p=r(22671),d=r(36005);let y=class extends((0,u.OU)(p.A)){constructor(e){super(e),this.features=[]}readFeatures(e,t){return this.readFeaturesWithClass(e,t,l)}};(0,n.Cg)([(0,a.MZ)({type:[l],json:{write:!0}})],y.prototype,"features",void 0),(0,n.Cg)([(0,d.w)("features")],y.prototype,"readFeatures",null),y=(0,n.Cg)([(0,a.$K)("esri.rest.support.AttributeBinsFeatureSet")],y)},14575(e,t,r){r.d(t,{default:()=>A});var i=r(32198),n=r(69540),s=r(66552),o=r(25482),a=r(53966),l=r(91429),u=r(78888),p=r(16930),d=r(65864),y=r(50498),m=r(58727),c=r(5834),f=r(41266),g=r(59977),h=r(11440),v=r(60909),w=r(58174),S=r(7562),C=r(79677),B=r(56400),x=r(93223);const M=new s.J({asc:"ascending",desc:"descending"}),Z={base:f.A,key:"type",typeMap:{"auto-interval":c.A,date:g.A,"fixed-boundaries":h.A,"fixed-interval":v.A}};let A=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.binParameters=null,this.binOrder="ascending",this.cacheHint=void 0,this.datumTransformation=null,this.defaultSpatialReference=null,this.distance=void 0,this.geometry=null,this.lowerBoundaryAlias=null,this.outSpatialReference=null,this.outStatistics=null,this.returnDistinctValues=null,this.spatialRelationship="intersects",this.timeExtent=null,this.upperBoundaryAlias=null,this.units=null,this.where="1=1"}set outTimeZone(e){this._set("outTimeZone",e),e&&!(0,B.wr)(e)&&a.A.getLogger(this).warn("#outTimeZone",`the parsed value '${e}' may not be a valid IANA time zone`)}};(0,i.Cg)([(0,l.MZ)({types:Z,json:{name:"bin",write:!0}})],A.prototype,"binParameters",void 0),(0,i.Cg)([(0,x.e)(M)],A.prototype,"binOrder",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0}})],A.prototype,"cacheHint",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],A.prototype,"datumTransformation",void 0),(0,i.Cg)([(0,l.MZ)({type:p.A,json:{name:"defaultSR",write:!0}})],A.prototype,"defaultSpatialReference",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],A.prototype,"distance",void 0),(0,i.Cg)([(0,l.MZ)({types:y.yR,json:{read:d.rS,write:!0}})],A.prototype,"geometry",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],A.prototype,"lowerBoundaryAlias",void 0),(0,i.Cg)([(0,l.MZ)({type:p.A,json:{name:"outSR",write:!0}})],A.prototype,"outSpatialReference",void 0),(0,i.Cg)([(0,l.MZ)({type:[S.A],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.outStatistics&&this.outStatistics.length>0}}}}})],A.prototype,"outStatistics",void 0),(0,i.Cg)([(0,l.MZ)({value:null,json:{name:"outTimeReference",read:{reader:e=>e.ianaTimeZone},write:{writer:(e,t,r)=>{e&&(t[r]={ianaTimeZone:e})}}}})],A.prototype,"outTimeZone",null),(0,i.Cg)([(0,l.MZ)({type:Boolean,json:{name:"returnAggIds",write:{overridePolicy:e=>({enabled:null!=e})}}})],A.prototype,"returnAggregateIds",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0}})],A.prototype,"returnDistinctValues",void 0),(0,i.Cg)([(0,x.e)(w.x,{name:"spatialRel"})],A.prototype,"spatialRelationship",void 0),(0,i.Cg)([(0,l.MZ)({type:C.A,json:{write:!0}})],A.prototype,"timeExtent",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],A.prototype,"upperBoundaryAlias",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{read:m.VY.read,write:{writer:m.VY.write,overridePolicy(e){return{enabled:null!=e&&!!this.distance}}}}})],A.prototype,"units",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],A.prototype,"where",void 0),A=(0,i.Cg)([(0,l.$K)("esri.rest.support.AttributeBinsQuery")],A),A.from=(0,u.dp)(A)},5834(e,t,r){r.d(t,{A:()=>d});var i=r(32198),n=r(93637),s=r(91429),o=r(78888),a=r(41266),l=r(41366),u=r(93223);function p(e,t,r){(0,n.sM)(r,e instanceof Date?e.getTime():e,t)}let d=class extends((0,l.K)(a.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,i.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"parameters.end",write:{writer:p}}})],d.prototype,"end",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"parameters.start",write:{writer:p}}})],d.prototype,"start",void 0),(0,i.Cg)([(0,u.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,i.Cg)([(0,s.$K)("esri.rest.support.AutoIntervalBinParameters")],d),d.from=(0,o.dp)(d)},41266(e,t,r){r.d(t,{A:()=>f});var i=r(32198),n=r(69540),s=r(66552),o=r(25482),a=r(91429),l=r(78888),u=r(93223);const p=new s.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let d=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,i.Cg)([(0,a.MZ)({type:String,json:{name:"outAlias",write:!0}})],d.prototype,"alias",void 0),(0,i.Cg)([(0,a.MZ)({type:String})],d.prototype,"responseType",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"value",void 0),(0,i.Cg)([(0,u.e)(p)],d.prototype,"valueType",void 0),d=(0,i.Cg)([(0,a.$K)("esri.rest.support.AttributeBinsGrouping")],d);const y=d;d.from=(0,l.dp)(d);const m=new s.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),c=new s.J({naturalLog:"natural-log",squareRoot:"square-root"});let f=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,i.Cg)([(0,a.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],f.prototype,"expression",void 0),(0,i.Cg)([(0,u.e)(m,{name:"onExpression.valueType"})],f.prototype,"expressionValueType",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{name:"onField",write:!0}})],f.prototype,"field",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],f.prototype,"firstDayOfWeek",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"hideUpperBound",void 0),(0,i.Cg)([(0,a.MZ)({type:y,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],f.prototype,"splitBy",void 0),(0,i.Cg)([(0,a.MZ)({type:y,json:{write:{target:{stackBy:{type:y},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>y.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],f.prototype,"stackBy",void 0),(0,i.Cg)([(0,u.e)(c)],f.prototype,"transformation",void 0),f=(0,i.Cg)([(0,a.$K)("esri.rest.support.BinParametersBase")],f)},59977(e,t,r){r.d(t,{A:()=>g});var i=r(32198),n=r(93637),s=r(91429),o=r(78888),a=r(41266),l=r(69540),u=r(25482),p=r(57231),d=r(93223);let y=class extends((0,l.OU)(u.o)){constructor(e){super(e),this.value=null,this.unit=null}};(0,i.Cg)([(0,s.MZ)({type:Number,json:{name:"number",write:!0}})],y.prototype,"value",void 0),(0,i.Cg)([(0,d.e)(p.g)],y.prototype,"unit",void 0),y=(0,i.Cg)([(0,s.$K)("esri.rest.support.DateBinTimeInterval")],y);const m=y;function c(e,t,r){(0,n.sM)(r,"string"==typeof e?e:e?.getTime(),t)}function f(e,t){let r=e.parameters[t];return r?"string"==typeof r?r:new Date(r):null}y.from=(0,o.dp)(y);let g=class extends a.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=!1,this.start=null,this.snapToData=null,this.type="date"}};(0,i.Cg)([(0,s.MZ)({cast:e=>null==e?null:"string"==typeof e?e:new Date(e),json:{name:"parameters.end",read:{reader:(e,t)=>f(t,"end")},write:{writer:c}}})],g.prototype,"end",void 0),(0,i.Cg)([(0,s.MZ)({type:m,json:{name:"parameters",write:!0}})],g.prototype,"interval",void 0),(0,i.Cg)([(0,s.MZ)({type:m,json:{name:"parameters.offset",write:!0}})],g.prototype,"offset",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],g.prototype,"returnFullIntervalBin",void 0),(0,i.Cg)([(0,s.MZ)({cast:e=>null==e?null:"string"==typeof e?e:new Date(e),json:{name:"parameters.start",read:{reader:(e,t)=>f(t,"start")},write:{writer:c}}})],g.prototype,"start",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],g.prototype,"snapToData",void 0),(0,i.Cg)([(0,d.e)({dateBin:"date"},{readOnly:!0})],g.prototype,"type",void 0),g=(0,i.Cg)([(0,s.$K)("esri.rest.support.DateBinParameters")],g),g.from=(0,o.dp)(g)},57231(e,t,r){const i=(0,r(66552).O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"});r.d(t,["g",0,i])},11440(e,t,r){r.d(t,{A:()=>u});var i=r(32198),n=r(93637),s=r(91429),o=r(78888),a=r(41266),l=r(93223);let u=class extends a.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,i.Cg)([(0,s.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,r){(0,n.sM)(r,e&&function(e){return e[0]instanceof Date}(e)?e.map(e=>e.getTime()):e,t)}}}})],u.prototype,"boundaries",void 0),(0,i.Cg)([(0,l.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],u.prototype,"type",void 0),u=(0,i.Cg)([(0,s.$K)("esri.rest.support.FixedBoundariesBinParameters")],u),u.from=(0,o.dp)(u)},60909(e,t,r){r.d(t,{A:()=>d});var i=r(32198),n=r(93637),s=r(91429),o=r(78888),a=r(41266),l=r(41366),u=r(93223);function p(e,t,r){(0,n.sM)(r,e instanceof Date?e.getTime():e,t)}let d=class extends((0,l.K)(a.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,i.Cg)([(0,s.MZ)({json:{name:"parameters.end",write:{writer:p}}})],d.prototype,"end",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"parameters.start",write:{writer:p}}})],d.prototype,"start",void 0),(0,i.Cg)([(0,u.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,i.Cg)([(0,s.$K)("esri.rest.support.FixedIntervalBinParameters")],d),d.from=(0,o.dp)(d)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[359],{11006(e,t,r){function n(e,t,r,n,o){s(e,t,r||0,n||e.length-1,o||i)}function s(e,t,r,n,i){for(;n>r;){if(n-r>600){var l=n-r+1,u=t-r+1,a=Math.log(l),h=.5*Math.exp(2*a/3),f=.5*Math.sqrt(a*h*(l-h)/l)*(u-l/2<0?-1:1);s(e,t,Math.max(r,Math.floor(t-u*h/l+f)),Math.min(n,Math.floor(t+(l-u)*h/l+f)),i)}var c=e[t],d=r,m=n;for(o(e,r,t),i(e[n],c)>0&&o(e,r,n);d<m;){for(o(e,d,m),d++,m--;i(e[d],c)<0;)d++;for(;i(e[m],c)>0;)m--}0===i(e[r],c)?o(e,r,m):o(e,++m,n),m<=t&&(r=m+1),t<=m&&(n=m-1)}}function o(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function i(e,t){return e<t?-1:+(e>t)}r.d(t,{q:()=>n})},43334(e,t,r){r.d(t,{N3:()=>l,Om:()=>i});var n=r(69397),s=r(27647),o=r(92722);class i{constructor(e,t,r,n,s=0,o=null,i=null){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=n,this.displayId=s,this.distance=o,this.vertexCount=i}static fromJSON(e){let t=e.geometry?o.A.fromJSON(e.geometry):null,r=e.centroid?o.A.fromJSON(e.centroid):null,n=e.objectId;return new i(t,e.attributes,r,n,void 0,e.distance,e.vertexCount)}weakClone(){return new i(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId,this.distance,this.vertexCount)}clone(){return new i(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId,this.distance,this.vertexCount)}ensureCentroid(e){return this.centroid??=(0,s.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,n.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function l(e){return!!e.geometry?.coords?.length}},58512(e,t,r){r.d(t,{A:()=>n});class n{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){let e=new n;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722(e,t,r){r.d(t,{A:()=>s});var n=r(69397);class s{constructor(e=[],t=[],r=!1,n=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=n}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:n}){return new s(e,t,r||!1,n||!1)}static fromRect([e,t,r,n]){let o=r-e,i=n-t;return new s([5],[e,t,o,0,0,i,-o,0,0,-i])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,n.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let e=0,t=0;for(let r of this.lengths){if(r<3)continue;let{stride:n}=this,s=this.coords[n*t],o=this.coords[n*t+1];for(let i=1;i<r;i+=1){let r=n*(t+i),l=this.coords[r],u=this.coords[r+1];e+=-.5*(l-s)*(u+o),s=l,o=u}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);let{stride:r}=this;for(let n of this.lengths){for(let s=0;s<n;s++){let n=r*(t+s);e(this.coords[n],this.coords[n+1])}t+=n}}deltaDecode(){let e=this.clone(),{coords:t,lengths:r}=e,n=0,{stride:s}=this;for(let e of r){for(let r=1;r<e;r++){let e=s*(n+r);t[e]+=t[e-s],t[e+1]+=t[e+1-s]}n+=e}return e}clone(e){if(this.isPoint)return new s([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let t=Array.from(this.lengths),{stride:r,size:n}=this,o=this.coords.slice(0,n*r);return e?(e.set(o),new s(t,e,this.hasZ,this.hasM)):new s(t,Array.from(o),this.hasZ,this.hasM)}justXY(){let{stride:e,size:t}=this;if(2===e)return this;let r=Array(t*e);for(let t=0,n=0;t<r.length;t+=e)r[n++]=this.coords[t],r[n++]=this.coords[t+1];return new s(this.lengths,r,!1,!1)}}},27647(e,t,r){r.d(t,{Q:()=>o});var n=r(92722);function s(e,t){return e?t?4:3:t?3:2}function o(e){if(null==e||!e?.lengths.length)return null;let{lengths:t,coords:r,stride:s,hasZ:o,hasM:u}=e,a=new n.A([],[],o,!1),h=a.coords,f=[],c=o?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0],d=0;for(let e of t){let t=i(c,r,d,e,o,u);t&&f.push(t),d+=e*s}if(f.sort((e,t)=>{let r=e[2]-t[2];return 0===r&&o&&(r=e[4]-t[4]),r}),f.length){let e=6*f[0][2];h[0]=f[0][0]/e,h[1]=f[0][1]/e,o&&(e=6*f[0][4],h[2]=0===e?0:f[0][3]/e),(h[0]<c[0]||h[0]>c[1]||h[1]<c[2]||h[1]>c[3]||o&&(h[2]<c[4]||h[2]>c[5]))&&(h.length=0)}if(!h.length){let n=e.lengths[0]?l(r,0,t[0],o,u):null;if(!n)return null;h[0]=n[0],h[1]=n[1],o&&(h[2]=n[2]??0)}return a}function i(e,t,r,n,o,i){let l=s(o,i),u=r,a=r+l,h=0,f=0,c=0,d=0,m=0;for(let r=0,s=n-1;r<s;r++,u+=l,a+=l){let r=t[u],n=t[u+1],s=t[u+2],i=t[a],l=t[a+1],g=t[a+2],y=r*l-i*n;d+=y,h+=(r+i)*y,f+=(n+l)*y,o&&(y=r*g-i*s,c+=(s+g)*y,m+=y),r<e[0]&&(e[0]=r),r>e[1]&&(e[1]=r),n<e[2]&&(e[2]=n),n>e[3]&&(e[3]=n),o&&(s<e[4]&&(e[4]=s),s>e[5]&&(e[5]=s))}if(d>0&&(d*=-1),m>0&&(m*=-1),!d)return null;let g=[h,f,.5*d];return o&&(g[3]=c,g[4]=.5*m),g}function l(e,t,r,n,o){let i=s(n,o),l=t,c=t+i,d=0,m=0,g=0,y=0;for(let t=0,s=r-1;t<s;t++,l+=i,c+=i){let t=e[l],r=e[l+1],s=e[l+2],o=e[c],i=e[c+1],p=e[c+2],M=n?a(t,r,s,o,i,p):u(t,r,o,i);if(M)if(d+=M,n){let e=f(t,r,s,o,i,p);m+=M*e[0],g+=M*e[1],y+=M*e[2]}else{let e=h(t,r,o,i);m+=M*e[0],g+=M*e[1]}}return d>0?n?[m/d,g/d,y/d]:[m/d,g/d]:r>0?n?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function u(e,t,r,n){let s=r-e,o=n-t;return Math.sqrt(s*s+o*o)}function a(e,t,r,n,s,o){let i=n-e,l=s-t,u=o-r;return Math.sqrt(i*i+l*l+u*u)}function h(e,t,r,n){return[e+.5*(r-e),t+.5*(n-t)]}function f(e,t,r,n,s,o){return[e+.5*(n-e),t+.5*(s-t),r+.5*(o-r)]}},54339(e,t,r){function n(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{let r=[];for(let n of t.fieldNames)r.push(e.attributes[n]??null);return JSON.stringify(r)}}}function s(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];let r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>n,r:()=>s})},51441(e,t,r){r.d(t,{LQ:()=>s,ag:()=>i,pL:()=>o});var n=r(90708);function s(e,t,r,s=e.hasZ,o=e.hasM){if(null==t)return null;let i=e.hasZ&&s,l=e.hasM&&o;if(r){let e=(0,n.Nl)(t,"esriGeometryPoint",r,s,o);return(0,n.DF)(e,i,l)}return(0,n.DF)(t,i,l)}function o(e,t,r,s,o,i){if(null==t)return null;let l="coords"in t?t:t.geometry;if(null==l)return null;let{hasZ:u,hasM:a}=l,h=u&&(o??=u),f=a&&(i??=a);if(r){let t=(0,n.kz)(l,e,r,o,i);return s&&(t=(0,n.Nl)(t,e,s)),(0,n.zv)(t,e,h,f)}if(s){let t=(0,n.Nl)(l,e,s,o,i);return(0,n.zv)(t,e,h,f)}return(0,n.zv)(l,e,h,f)}function i(e){return e&&l in e?JSON.parse(JSON.stringify(e,u)):e}const l="_geVersion",u=(e,t)=>e===l?void 0:t},31464(e,t,r){r.d(t,{Cv:()=>d,Nk:()=>c,lK:()=>g});var n=r(4576),s=r(99917),o=r(60408),i=r(21325),l=r(28735);const u=[0,0];function a(e,t){let r=(0,i.K8)(e)?l.je:l.tD;if((0,o.fT)(t)){let e={x:0,y:0};return[e.x,e.y]=r(t.x,t.y,u),null!=t.z&&(e.z=t.z),null!=t.m&&(e.m=t.m),e}if((0,o.ZC)(t)){let e={xmin:0,ymin:0,xmax:0,ymax:0};return[e.xmin,e.ymin]=r(t.xmin,t.ymin,u),[e.xmax,e.ymax]=r(t.xmax,t.ymax,u),t.hasZ&&(e.zmin=t.zmin,e.zmax=t.zmax,e.hasZ=!0),t.hasM&&(e.mmin=t.mmin,e.mmax=t.mmax,e.hasM=!0),e}if((0,o.Bi)(t))return{rings:h(t.rings,r),hasM:t.hasM,hasZ:t.hasZ};if((0,o.Rg)(t))return{paths:h(t.paths,r),hasM:t.hasM,hasZ:t.hasZ};if((0,o.U9)(t))return{points:f(t.points,r),hasM:t.hasM,hasZ:t.hasZ};throw Error()}function h(e,t){let r=[];for(let n of e)r.push(f(n,t));return r}function f(e,t){let r=[];for(let n of e){let e=t(n[0],n[1],[0,0]);r.push(e),n.length>2&&e.push(n[2]),n.length>3&&e.push(n[3])}return r}async function c(e,t){if(!e||!t)return;let r=Array.isArray(e)?e.map(e=>null==e.geometry?null:e.geometry.spatialReference).filter(n.Ru):[e];await(0,s.initializeProjection)(r.map(e=>({source:e,dest:t})))}function d(e,t,r,n){if(!e)return null;if(r||(r=t,t=e.spatialReference),!(0,i.fn)(t)||!(0,i.fn)(r)||(0,i.aI)(t,r))return e;if((0,l.y7)(t,r)){let t=a(r,e);return t.spatialReference=r,t}return(0,s.projectMany)([e],t,r,n)[0]}const m=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,r,n){if(!e?.length||!t||!r||(0,i.aI)(t,r))return e;let s={geometries:e,inSpatialReference:t,outSpatialReference:r,options:n,resolve:Promise.withResolvers()};return this._jobs.push(s),this._timer??=setTimeout(this._process,10),s.resolve.promise}_process(){this._timer=null;let e=this._jobs.shift();if(!e)return;let t,{geometries:r,inSpatialReference:n,outSpatialReference:o,resolve:i,options:u}=e,h=r.filter(e=>null!=e);t=(0,l.y7)(n,o)&&null==u?.extendedParams?h.map(e=>a(o,e)):(0,s.projectMany)(h,n,o,u);let f=0,c=r.map(e=>null==e?null:t[f++]);i.resolve(c),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function g(e,t,r,n){return m.push(e,t,r,n)}},90708(e,t,r){r.d(t,{Ap:()=>F,B2:()=>y,DF:()=>x,Di:()=>C,E2:()=>R,IE:()=>g,Nl:()=>L,PR:()=>G,Rk:()=>$,Ux:()=>k,Ye:()=>T,ZF:()=>O,aQ:()=>E,jH:()=>_,jQ:()=>Q,kz:()=>J,oN:()=>j,q3:()=>S,qN:()=>P,zv:()=>z});var n=r(49186),s=r(53966),o=r(97768),i=r(70328),l=r(19419),u=r(60408),a=r(43334),h=r(58512),f=r(92722),c=r(54339);const d=()=>s.A.getLogger("esri.layers.graphics.featureConversionUtils"),m={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0};function g({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function y({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function p({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function M({scale:e,translate:t},r){return Math.round((r-t[1])/e[1])}function b({scale:e,translate:t},r,n){return r*e[n]+t[n]}function v(e,t,r){return t&&(e.hasZ=!0),r&&(e.hasM=!0),e}function w(e,t,r,n){if(t&&n&&e!==r)return(t,r,n,s)=>{n[s++]=t[r++],n[s++]=t[r++],e?r++:n[s++]=0,n[s++]=t[r++]??0};let s=+!!r+2+ +!!n,o=s-((!e&&r?1:0)+(!t&&n?1:0));return(e,t,r,n)=>{for(let i=0;i<s;++i)r[n++]=i<o?e[t++]??0:0}}function x(e,t,r){if(!e)return null;let{coords:n,hasZ:s,hasM:o}=e,[i,l]=n,u=s?n[2]:0,a=o?n[+!!s+2]:0;return{x:i,y:l,z:t?u:void 0,m:r?a:void 0}}function P(e,t=(0,u.Pv)(e),r=(0,u.W0)(e)){let{x:n,y:s,z:o,m:i}=e,l=[n,s];return t&&l.push(o??0),r&&l.push(i??0),new f.A([],l,t,r)}function Z(e,t,r){if(null==e)return null;let{coords:n,stride:s,hasZ:o,hasM:i}=e,l=w(o,i,t,r),u=[];for(let e=0;e<n.length;e+=s){let t=[];l(n,e,t,0),u.push(t)}return v({points:u},t,r)}function G(e,t=(0,u.Pv)(e),r=(0,u.W0)(e)){let{points:n,hasZ:s,hasM:o}=e,i=new f.A([n.length],[],t,r),{coords:l,stride:a}=i,h=0,c=w(s??!1,o??!1,t,r);for(let e of n)c(e,0,l,h),h+=a;return i}function I(e,t,r){if(!e)return null;let{coords:n,lengths:s,stride:o,hasZ:i,hasM:l}=e,u=0,a=w(i,l,t,r),h=[];for(let e of s){let t=[];for(let r=0;r<e;r++){let e=[];a(n,u,e,0),u+=o,t.push(e)}h.push(t)}return v({paths:h},t,r)}function F(e,t=(0,u.Pv)(e),r=(0,u.W0)(e)){let{paths:n,hasZ:s,hasM:o}=e,i=w(s??!1,o??!1,t,r),l=new f.A([],[],t,r),{lengths:a,coords:h,stride:c}=l,d=0;for(let e of n){for(let t of e)i(t,0,h,d),d+=c;a.push(e.length)}return l}function N(e,t,r){if(!e)return null;let{coords:n,lengths:s,stride:o,hasZ:i,hasM:l}=e,u=0,a=w(i,l,t,r),h=[];for(let e of s){let t=[];for(let r=0;r<e;r++){let e=[];a(n,u,e,0),u+=o,t.push(e)}h.push(t)}return v({rings:h},t,r)}function T(e,t=(0,u.Pv)(e),r=(0,u.W0)(e)){let{rings:n,hasZ:s,hasM:o}=e,i=new f.A([],[],t,r),{lengths:l,coords:a,stride:h}=i,c=0,d=w(s??!1,o??!1,t,r);for(let e of n){for(let t of e)d(t,0,a,c),c+=h;l.push(e.length)}return i}const q=[],A=[];function R(e,t,r,n,s){q[0]=e;let[o]=C(A,q,t,r,n,s);return K(q),K(A),o}function C(e,t,r,s,o,i){if(K(e),!r){for(let r of t){let t=(0,c.W)(r,i);e.push(new a.Om(null,r.attributes,null,t,void 0,r.distance,r.vertexCount))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,n,s){for(let o of t){let{geometry:t,attributes:i,centroid:l}=o,h=(0,u.Pv)(t),f=(0,u.W0)(t);e.push(new a.Om(t?P(t,r&&h,n&&f):null,i,l?P(l,!1,!1):null,(0,c.W)(o,s),o.displayId,o.distance,o.vertexCount))}return e}(e,t,s,o,i);case"esriGeometryMultipoint":return function(e,t,r,n,s){for(let o of t){let{geometry:t,attributes:i}=o,l=(0,u.Pv)(t),h=(0,u.W0)(t);e.push(new a.Om(t?G(t,r&&l,n&&h):null,i,null,(0,c.W)(o,s),o.displayId,o.distance,o.vertexCount))}return e}(e,t,s,o,i);case"esriGeometryPolyline":return function(e,t,r,n,s){for(let o of t){let{geometry:t,attributes:i,centroid:l}=o,h=(0,u.Pv)(t),f=(0,u.W0)(t);e.push(new a.Om(t?F(t,r&&h,n&&f):null,i,l?P(l,!1,!1):null,(0,c.W)(o,s),o.displayId,o.distance,o.vertexCount))}return e}(e,t,s,o,i);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return function(e,t,r,n,s){for(let o of t){let{geometry:t,attributes:i,centroid:l}=o,h=(0,u.Pv)(t),f=(0,u.W0)(t);e.push(new a.Om(t?T(t,r&&h,n&&f):null,i,l?P(l,!1,!1):null,(0,c.W)(o,s),o.displayId,o.distance,o.vertexCount))}return e}(e,t,s,o,i);default:d().error("convertToFeatureSet:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${r}'`)),K(e)}return e}function j(e,t,r,n){A[0]=e,W(q,A,t,r,n);let s=q[0];return K(q),K(A),s}function k(e,t=(0,u.Pv)(e),r=(0,u.W0)(e)){return null==e?null:(0,u.fT)(e)?P(e,t,r):(0,u.Bi)(e)?T(e,t,r):(0,u.Rg)(e)?F(e,t,r):(0,u.U9)(e)?G(e,t,r):void d().error("convertFromGeometry:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${e}'`))}function z(e,t,r,s){if(null==e)return null;let o="coords"in e?e:e.geometry;if(null==o)return null;switch(t){case"esriGeometryPoint":return x(o,r,s);case"esriGeometryMultipoint":return Z(o,r,s);case"esriGeometryPolyline":return I(o,r,s);case"esriGeometryPolygon":return N(o,r,s);default:return d().error("convertToGeometry:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${t}'`)),null}}function W(e,t,r,s,o){if(K(e),null==r)return function(e,t){for(let r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,n){for(let{geometry:s,attributes:o}of t)e.push({attributes:o,geometry:x(s,r,n)});return e}(e,t,s,o);case"esriGeometryMultipoint":return function(e,t,r,n){for(let{geometry:s,attributes:o}of t)e.push({geometry:s&&Z(s,r,n),attributes:o});return e}(e,t,s,o);case"esriGeometryPolyline":return function(e,t,r,n){for(let{geometry:s,attributes:o}of t)e.push({geometry:s&&I(s,r,n),attributes:o});return e}(e,t,s,o);case"esriGeometryPolygon":return function(e,t,r,n){for(let{geometry:s,attributes:o,centroid:i}of t){let t=N(s,r,n),l=x(i,!1,!1);e.push(i?{geometry:t,attributes:o,centroid:l}:{geometry:t,attributes:o})}return e}(e,t,s,o);default:d().error("convertToFeatureSet:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${r}'`))}return e}function O(e){let{spatialReference:t,transform:r,fields:n,hasM:s,hasZ:o,features:i,geometryType:l,exceededTransferLimit:u,queryGeometry:a,queryGeometryType:h}=e,f={features:W([],i,l,o,s),fields:n,geometryType:l,spatialReference:t,queryGeometry:z(a,h,o,s)};return r&&(f.transform=r),u&&(f.exceededTransferLimit=u),s&&(f.hasM=s),o&&(f.hasZ=o),f}function S(e,t){let r=new h.A,{hasM:n,hasZ:s,features:o,spatialReference:i,geometryType:l,exceededTransferLimit:u,transform:a,fields:f,globalIdFieldName:c}=e;return f&&(r.fields=f),r.geometryType=l??null,r.spatialReference=i??null,o&&C(r.features,o,l,s,n,t),u&&(r.exceededTransferLimit=u),n&&(r.hasM=n),s&&(r.hasZ=s),a&&(r.transform=a),c&&(r.globalIdFieldName=c),r}function _(e,t){let{geometryType:r,features:n}=t;if(!e)return t;for(let t=0;t<n.length;t++){let s=n[t],o=s.weakClone();o.geometry=L(s.geometry,r,e),o.centroid=L(s.centroid,"esriGeometryPoint",e),n[t]=o}return t.transform=e,t}function L(e,t,r,n,s,o=!1){if(null==e||!e?.coords.length)return null;let i=m[t],{coords:l,lengths:u,stride:a,hasZ:h,hasM:c}=e;n??=h,s??=c;let d=new f.A([],[],n,s),b=d.stride,v=w(h,c,n,s),x=0,P=[0,0,0,0].slice(b),Z=o?p:g,G=o?M:y;function I(){v(l,x,P,0),x+=a,P[0]=Z(r,P[0]),P[1]=G(r,P[1])}if(e.isPoint)return I(),d.coords.push(...P),d;let F=0;for(let e of u){if(e<i)continue;let t=1;I(),d.coords.push(...P);let[r,n]=P;for(let s=1;s<e;s++){I();let[e,s]=P;(r!==e||n!==s)&&(o||(P[0]-=r,P[1]-=n),d.coords.push(...P),r=e,n=s,t++)}t>=i?(d.lengths.push(t),F=d.coords.length):K(d.coords,F)}return K(d.coords,F),d.coords.length?d:null}function J(e,t,r,n=e.hasZ,s=e.hasM){if(!e.coords.length)return null;let o=m[t],{coords:i,lengths:l,stride:u,hasZ:a,hasM:h}=e,c=new f.A([],[],n,s),d=c.stride,g=w(a,h,n,s);if(e.isPoint)return g(i,0,c.coords,0),c;let y=0,p=r*r;for(let e of l){if(e<o){y+=e*u;continue}let t=c.coords.length/d,r=y,n=y+(e-1)*u;g(i,r,c.coords,c.coords.length),D(c.coords,i,u,p,g,r,n),g(i,n,c.coords,c.coords.length);let s=c.coords.length/d-t;s>=o?c.lengths.push(s):K(c.coords,t*d),y+=e*u}return c.coords.length?c:null}function U(e,t,r,n){let s=e[t],o=e[t+1],i=e[r],l=e[r+1],u=e[n],a=e[n+1],h=i,f=l,c=u-h,d=a-f;if(0!==c||0!==d){let e=((s-h)*c+(o-f)*d)/(c*c+d*d);e>1?(h=u,f=a):e>0&&(h+=c*e,f+=d*e)}return c=s-h,d=o-f,c*c+d*d}function D(e,t,r,n,s,o,i){let l,u=n,a=0;for(let e=o+r;e<i;e+=r)l=U(t,e,o,i),l>u&&(a=e,u=l);u>n&&(a-o>r&&D(e,t,r,n,s,o,a),s(t,a,e,e.length),i-a>r&&D(e,t,r,n,s,a,i))}function Q(e,t){if(!t?.coords?.length)return null;let r=1/0,n=1/0,s=-1/0,o=-1/0,{coords:u,stride:a}=t;for(let e=0;e<u.length;e+=a){let t=u[e],i=u[e+1];r=Math.min(r,t),s=Math.max(s,t),n=Math.min(n,i),o=Math.max(o,i)}return(0,i.is)(e)?(0,i.BI)(e,r,n,s,o):(0,l.fA)(r,n,s,o,e),e}function E(e,t){let{coords:r,lengths:n,stride:s,hasZ:i,hasM:l}=e;if(!r.length)return void(n.length=0);(0,o.Lw)(t);let{originPosition:u,scale:a,translate:h}=t,f=V;f.originPosition=u;let c=f.scale;c[0]=a[0]??1,c[1]=-(a[1]??1),c[2]=a[2]??1,c[3]=a[3]??1;let d=f.translate;if(d[0]=h[0]??0,d[1]=h[1]??0,d[2]=h[2]??0,d[3]=h[3]??0,l&&!i&&(c[2]=c[3],d[2]=d[3]),!n.length){for(let e=0;e<s;++e)r[e]=b(f,r[e],e);return void(n.length=0)}let m=0;for(let e=0;e<n.length;e++){let t=n[e];n[e]=t;for(let e=0;e<s;++e)r[m+e]=b(f,r[m+e],e);let o=r[m],i=r[m+1];m+=s;for(let e=1;e<t;e++,m+=s){o+=r[m]*c[0],i+=r[m+1]*c[1],r[m]=o,r[m+1]=i;for(let e=2;e<s;++e)r[m+e]=b(f,r[m+e],e)}}}function B(e,t,r,n){let s=0,o=e[n*t],i=e[n*(t+1)];for(let l=1;l<r;l++){let r=o+e[n*(t+l)],u=i+e[n*(t+l)+1],a=(r-o)*(u+i);o=r,i=u,s+=a}return.5*s}function $(e,t){let{coords:r,lengths:n}=e,s=0,o=0;for(let e=0;e<n.length;e++){let i=n[e];o+=B(r,s,i,t),s+=i}return Math.abs(o)}function K(e,t=0){e.length!==t&&(e.length=t)}const V={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[481,3354],{32198(t,e,n){function r(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(o=(a<3?i(o):a>3?i(e,n,o):i(e,n))||o);return a>3&&o&&Object.defineProperty(e,n,o),o}function i(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var r,i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=e[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=e[Symbol.dispose],n&&(i=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:r,async:n})}else n&&t.stack.push({async:!0});return e}n.d(e,{Cg:()=>r,hk:()=>o,mS:()=>i}),Object.create,Object.create;var a="function"==typeof SuppressedError?SuppressedError:function(t,e,n){var r=new Error(n);return r.name="SuppressedError",r.error=t,r.suppressed=e,r};function o(t){function e(e){t.error=t.hasError?new a(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var n,r=0;return function i(){for(;n=t.stack.pop();)try{if(!n.async&&1===r)return r=0,t.stack.push(n),Promise.resolve().then(i);if(n.dispose){var a=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(a).then(i,function(t){return e(t),i()})}else r|=1}catch(t){e(t)}if(1===r)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},11006(t,e,n){function r(t,e,n,r,a){i(t,e,n||0,r||t.length-1,a||o)}function i(t,e,n,r,o){for(;r>n;){if(r-n>600){var s=r-n+1,u=e-n+1,l=Math.log(s),h=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*h*(s-h)/s)*(u-s/2<0?-1:1);i(t,e,Math.max(n,Math.floor(e-u*h/s+c)),Math.min(r,Math.floor(e+(s-u)*h/s+c)),o)}var f=t[e],p=n,M=r;for(a(t,n,e),o(t[r],f)>0&&a(t,n,r);p<M;){for(a(t,p,M),p++,M--;o(t[p],f)<0;)p++;for(;o(t[M],f)>0;)M--}0===o(t[n],f)?a(t,n,M):a(t,++M,r),M<=e&&(n=M+1),e<=M&&(r=M-1)}}function a(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function o(t,e){return t<e?-1:+(t>e)}n.d(e,{q:()=>r})},73354(t,e,n){n.d(e,{a:()=>c,b:()=>s,c:()=>i,d:()=>o,e:()=>f,f:()=>h,l:()=>l,n:()=>p,t:()=>a}),n(44208);var r=n(72727);function i(t,e,n){a(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function a(t,e,n,i=3,a=i){let o=(0,r.k)(t.length,i,3),s=(0,r.k)(e.length,a,3),u=Math.min(o,s),l=n[0],h=n[1],c=n[2],f=n[4],p=n[5],M=n[6],m=n[8],d=n[9],g=n[10],y=n[12],b=n[13],x=n[14],v=0,_=0;for(let n=0;n<u;n++){let n=e[v],r=e[v+1],o=e[v+2];t[_]=l*n+f*r+m*o+y,t[_+1]=h*n+p*r+d*o+b,t[_+2]=c*n+M*r+g*o+x,v+=a,_+=i}return t}function o(t,e,n){s(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function s(t,e,n,i=3,a=i){let o=(0,r.k)(t.length,i,3),s=(0,r.k)(e.length,a,3),u=Math.min(o,s),l=n[0],h=n[1],c=n[2],f=n[3],p=n[4],M=n[5],m=n[6],d=n[7],g=n[8],y=0,b=0;for(let n=0;n<u;n++){let n=e[y],r=e[y+1],o=e[y+2];t[b]=l*n+f*r+m*o,t[b+1]=h*n+p*r+d*o,t[b+2]=c*n+M*r+g*o,y+=a,b+=i}}function u(t,e,n,r=3,i=r){let a=Math.min(t.length/r,e.length/i),o=0,s=0;for(let u=0;u<a;u++)t[s]=n*e[o],t[s+1]=n*e[o+1],t[s+2]=n*e[o+2],o+=i,s+=r;return t}function l(t,e,n,r){h(t.typedBuffer,e.typedBuffer,n,r,t.typedBufferStride,e.typedBufferStride)}function h(t,e,n,r,i=3,a=i){let o=Math.min(t.length/i,e.length/a),s=0,u=0,l=1/2.2;for(let h=0;h<o;h++)t[u]=r*(n*e[s])**l,t[u+1]=r*(n*e[s+1])**l,t[u+2]=r*(n*e[s+2])**l,s+=a,u+=i}function c(t,e,n,i=3,a=i){let o=(0,r.k)(t.length,i,3),s=(0,r.k)(e.length,a,3),u=Math.min(o,s),l=0,h=0;for(let r=0;r<u;r++)t[h]=e[l]+n[0],t[h+1]=e[l+1]+n[1],t[h+2]=e[l+2]+n[2],l+=a,h+=i;return t}function f(t,e){p(t.typedBuffer,e.typedBuffer,t.typedBufferStride,e.typedBufferStride)}function p(t,e,n=3,r=n){let i=Math.min(t.length/n,e.length/r),a=0,o=0;for(let s=0;s<i;s++){let i=e[a],s=e[a+1],u=e[a+2],l=i*i+s*s+u*u;if(l>0){let e=1/Math.sqrt(l);t[o]=e*i,t[o+1]=e*s,t[o+2]=e*u}a+=r,o+=n}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:h,linearToSRGBView:l,normalize:p,normalizeView:f,scale:u,scaleView:function(t,e,n){u(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)},shiftRight:function(t,e,n){let r=Math.min(t.count,e.count),i=t.typedBuffer,a=t.typedBufferStride,o=e.typedBuffer,s=e.typedBufferStride,u=0,l=0;for(let t=0;t<r;t++)i[l]=o[u]>>n,i[l+1]=o[u+1]>>n,i[l+2]=o[u+2]>>n,u+=s,l+=a},transformMat3:s,transformMat3View:o,transformMat4:a,transformMat4View:i,translate:c},Symbol.toStringTag,{value:"Module"}))},69540(t,e,n){var r=n(32198),i=n(69622),a=(n(44208),n(4718)),o=(n(53966),n(97768)),s=n(88620),u=n(64108);const l=Symbol("ClonableMixin"),h=t=>{var e;let n=t,i=class extends n{constructor(){super(...arguments),this[e]=!0}static{e=l}clone(t){let e=(0,s.oY)(this);(0,o.Lw)(e,"unable to clone instance of non-accessor class");let n=e.metadata,r=e.store,i={},u=new Map;for(let e in n){let o=n[e],s=r?.originOf(e),l=o.clonable;if(o.readOnly||!1===l||7!==s&&0!==s&&5!==s&&4!==s)continue;let h=this[e],c=null;if("function"==typeof l)c=l(h,t);else if("reference"===l)c=h;else if(c=(0,a.TU)(h,t),null!=h&&null==c)continue;0===s?u.set(e,c):i[e]=c}let l=new(0,Object.getPrototypeOf(this).constructor)(i);if(u.size){let t=(0,s.oY)(l)?.store;if(t)for(let[e,n]of u)t.set(e,n,0)}return l}};return i=(0,r.Cg)([(0,u.$)("esri.core.Clonable")],i),i},c=h(i.A);n.d(e,["OU",0,h,"Pw",0,c])},95488(t,e,n){n.d(e,{I:()=>i});var r=n(11406);class i extends r.T{notify(){let t=this._observers;if(t&&t.length>0){let e=t.slice();for(let t of e)t.onInvalidated(),t.onCommitted()}}}},9093(t,e,n){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}n.d(e,{o8:()=>i,vt:()=>r});const a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:i,create:r,fromValues:function(t,e,n,r,i,a,o,s,u,l,h,c,f,p,M,m){return[t,e,n,r,i,a,o,s,u,l,h,c,f,p,M,m]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["zK",0,a])},48163(t,e,n){function r(){return[0,0]}function i(t){return[t[0],t[1]]}function a(t,e){return[t,e]}function o(){return a(1,1)}function s(){return a(-1,-1)}function u(){return a(1,0)}function l(){return a(0,1)}n.d(e,{fA:()=>a,o8:()=>i,vt:()=>r});const h=o(),c=s(),f=u(),p=l();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:c,ONES:h,UNIT_X:f,UNIT_Y:p,ZEROS:[0,0],clone:i,create:r,freeze:function(t,e){return[t,e]},fromArray:function(t,e=[0,0]){let n=Math.min(2,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e},fromValues:a,negativeOnes:s,ones:o,unitX:u,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["IA",0,c,"Un",0,h])},51850(t,e,n){function r(){return[0,0,0]}function i(t){return[t[0],t[1],t[2]]}function a(t,e,n){return[t,e,n]}function o(t,e,n){return[t,e,n]}function s(t,e=[0,0,0]){let n=Math.min(3,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e}function u(){return a(1,1,1)}function l(){return a(1,0,0)}function h(){return a(0,1,0)}function c(){return a(0,0,1)}n.d(e,{CN:()=>o,ci:()=>s,fA:()=>a,o8:()=>i,vt:()=>r});const f=[0,0,0],p=u(),M=l(),m=h(),d=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:p,UNIT_X:M,UNIT_Y:m,UNIT_Z:d,ZEROS:f,clone:i,create:r,freeze:o,fromArray:s,fromValues:a,ones:u,unitX:l,unitY:h,unitZ:c,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["Cb",0,d,"Cw",0,M,"JP",0,m,"Un",0,p,"uY",0,f])},91829(t,e,n){function r(){return[0,0,0,0]}function i(t,e,n,r){return[t,e,n,r]}function a(){return i(1,1,1,1)}function o(){return i(1,0,0,0)}function s(){return i(0,1,0,0)}function u(){return i(0,0,1,0)}function l(){return i(0,0,0,1)}n.d(e,{_Y:()=>l,fA:()=>i,vt:()=>r});const h=[0,0,0,0],c=a(),f=o(),p=s(),M=u(),m=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_W:m,UNIT_X:f,UNIT_Y:p,UNIT_Z:M,ZEROS:h,clone:function(t){return[t[0],t[1],t[2],t[3]]},create:r,freeze:function(t,e,n,r){return[t,e,n,r]},fromArray:function(t,e=[0,0,0,0]){let n=Math.min(4,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e},fromValues:i,ones:a,unitW:l,unitX:o,unitY:s,unitZ:u,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["Un",0,c,"uY",0,h])},34304(t,e,n){n.d(e,{DF:()=>u,FD:()=>i,ct:()=>l});let r=1e-6;function i(){return r}const a=Math.random,o=Math.PI/180,s=180/Math.PI;function u(t){return t*o}function l(t){return t*s}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:a,equals:function(t,e){return Math.abs(t-e)<=r*Math.max(1,Math.abs(t),Math.abs(e))},getEpsilon:i,setEpsilon:function(t){r=t},toDegree:l,toRadian:u},Symbol.toStringTag,{value:"Module"})),n.d(e,["Ov",0,a])},58083(t,e,n){n.d(e,{$0:()=>g,$h:()=>O,B8:()=>h,C:()=>a,D_:()=>s,N9:()=>b,O7:()=>P,Qw:()=>l,Tl:()=>f,X_:()=>w,e$:()=>M,eL:()=>m,hM:()=>y,hZ:()=>o,hs:()=>p,kN:()=>d,l:()=>S,lw:()=>c,mg:()=>u,o1:()=>A,sC:()=>_,t2:()=>Y,t5:()=>R,tZ:()=>X,ut:()=>q});var r=n(51850),i=n(34304);function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function o(t,e,n,r,i,a,o,s,u,l,h,c,f,p,M,m,d){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=u,t[8]=l,t[9]=h,t[10]=c,t[11]=f,t[12]=p,t[13]=M,t[14]=m,t[15]=d,t}function s(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function u(t,e){if(t===e){let n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function l(t,e){return h(t,e)||s(t),t}function h(t,e){let n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],l=e[7],h=e[8],c=e[9],f=e[10],p=e[11],M=e[12],m=e[13],d=e[14],g=e[15],y=n*s-r*o,b=n*u-i*o,x=n*l-a*o,v=r*u-i*s,_=r*l-a*s,w=i*l-a*u,S=h*m-c*M,A=h*d-f*M,P=h*g-p*M,O=c*d-f*m,R=c*g-p*m,B=f*g-p*d,Y=y*B-b*R+x*O+v*P-_*A+w*S;return Y?(Y=1/Y,t[0]=(s*B-u*R+l*O)*Y,t[1]=(i*R-r*B-a*O)*Y,t[2]=(m*w-d*_+g*v)*Y,t[3]=(f*_-c*w-p*v)*Y,t[4]=(u*P-o*B-l*A)*Y,t[5]=(n*B-i*P+a*A)*Y,t[6]=(d*x-M*w-g*b)*Y,t[7]=(h*w-f*x+p*b)*Y,t[8]=(o*R-s*P+l*S)*Y,t[9]=(r*P-n*R-a*S)*Y,t[10]=(M*_-m*x+g*y)*Y,t[11]=(c*x-h*_-p*y)*Y,t[12]=(s*A-o*O-u*S)*Y,t[13]=(n*O-r*A+i*S)*Y,t[14]=(m*b-M*v-d*y)*Y,t[15]=(h*v-c*b+f*y)*Y,t):null}function c(t,e,n){let r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],l=e[6],h=e[7],c=e[8],f=e[9],p=e[10],M=e[11],m=e[12],d=e[13],g=e[14],y=e[15],b=n[0],x=n[1],v=n[2],_=n[3];return t[0]=b*r+x*s+v*c+_*m,t[1]=b*i+x*u+v*f+_*d,t[2]=b*a+x*l+v*p+_*g,t[3]=b*o+x*h+v*M+_*y,b=n[4],x=n[5],v=n[6],_=n[7],t[4]=b*r+x*s+v*c+_*m,t[5]=b*i+x*u+v*f+_*d,t[6]=b*a+x*l+v*p+_*g,t[7]=b*o+x*h+v*M+_*y,b=n[8],x=n[9],v=n[10],_=n[11],t[8]=b*r+x*s+v*c+_*m,t[9]=b*i+x*u+v*f+_*d,t[10]=b*a+x*l+v*p+_*g,t[11]=b*o+x*h+v*M+_*y,b=n[12],x=n[13],v=n[14],_=n[15],t[12]=b*r+x*s+v*c+_*m,t[13]=b*i+x*u+v*f+_*d,t[14]=b*a+x*l+v*p+_*g,t[15]=b*o+x*h+v*M+_*y,t}function f(t,e,n){let r=n[0],i=n[1],a=n[2];if(e===t)t[12]=e[0]*r+e[4]*i+e[8]*a+e[12],t[13]=e[1]*r+e[5]*i+e[9]*a+e[13],t[14]=e[2]*r+e[6]*i+e[10]*a+e[14],t[15]=e[3]*r+e[7]*i+e[11]*a+e[15];else{let n=e[0],o=e[1],s=e[2],u=e[3],l=e[4],h=e[5],c=e[6],f=e[7],p=e[8],M=e[9],m=e[10],d=e[11];t[0]=n,t[1]=o,t[2]=s,t[3]=u,t[4]=l,t[5]=h,t[6]=c,t[7]=f,t[8]=p,t[9]=M,t[10]=m,t[11]=d,t[12]=n*r+l*i+p*a+e[12],t[13]=o*r+h*i+M*a+e[13],t[14]=s*r+c*i+m*a+e[14],t[15]=u*r+f*i+d*a+e[15]}return t}function p(t,e,n){let r=n[0],i=n[1],a=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function M(t,e,n,r){let o=r[0],s=r[1],u=r[2],l=Math.sqrt(o*o+s*s+u*u);if(l<=(0,i.FD)())return void a(t,e);l=1/l,o*=l,s*=l,u*=l;let h=Math.sin(n),c=Math.cos(n),f=1-c,p=e[0],M=e[1],m=e[2],d=e[3],g=e[4],y=e[5],b=e[6],x=e[7],v=e[8],_=e[9],w=e[10],S=e[11],A=o*o*f+c,P=s*o*f+u*h,O=u*o*f-s*h,R=o*s*f-u*h,B=s*s*f+c,Y=u*s*f+o*h,q=o*u*f+s*h,X=s*u*f-o*h,I=u*u*f+c;t[0]=p*A+g*P+v*O,t[1]=M*A+y*P+_*O,t[2]=m*A+b*P+w*O,t[3]=d*A+x*P+S*O,t[4]=p*R+g*B+v*Y,t[5]=M*R+y*B+_*Y,t[6]=m*R+b*B+w*Y,t[7]=d*R+x*B+S*Y,t[8]=p*q+g*X+v*I,t[9]=M*q+y*X+_*I,t[10]=m*q+b*X+w*I,t[11]=d*q+x*X+S*I,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15])}function m(t,e,n){let r=Math.sin(n),i=Math.cos(n),a=e[4],o=e[5],s=e[6],u=e[7],l=e[8],h=e[9],c=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+l*r,t[5]=o*i+h*r,t[6]=s*i+c*r,t[7]=u*i+f*r,t[8]=l*i-a*r,t[9]=h*i-o*r,t[10]=c*i-s*r,t[11]=f*i-u*r,t}function d(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function g(t,e,n){if(0===e)return s(t);let r=n[0],a=n[1],o=n[2],u=Math.sqrt(r*r+a*a+o*o);if(u<=(0,i.FD)())return null;u=1/u,r*=u,a*=u,o*=u;let l=Math.sin(e),h=Math.cos(e),c=1-h;return t[0]=r*r*c+h,t[1]=a*r*c+o*l,t[2]=o*r*c-a*l,t[3]=0,t[4]=r*a*c-o*l,t[5]=a*a*c+h,t[6]=o*a*c+r*l,t[7]=0,t[8]=r*o*c+a*l,t[9]=a*o*c-r*l,t[10]=o*o*c+h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function y(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function b(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function x(t,e,n){let r=e[0],i=e[1],a=e[2],o=e[3],s=r+r,u=i+i,l=a+a,h=r*s,c=r*u,f=r*l,p=i*u,M=i*l,m=a*l,d=o*s,g=o*u,y=o*l;return t[0]=1-(p+m),t[1]=c+y,t[2]=f-g,t[3]=0,t[4]=c-y,t[5]=1-(h+m),t[6]=M+d,t[7]=0,t[8]=f+g,t[9]=M-d,t[10]=1-(h+p),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const v=(0,r.vt)();function _(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function w(t,e){let n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],u=e[8],l=e[9],h=e[10];return t[0]=Math.sqrt(n*n+r*r+i*i),t[1]=Math.sqrt(a*a+o*o+s*s),t[2]=Math.sqrt(u*u+l*l+h*h),t}function S(t,e){let n=e[0]+e[5]+e[10],r=0;return n>0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(e[6]-e[9])/r,t[1]=(e[8]-e[2])/r,t[2]=(e[1]-e[4])/r):e[0]>e[5]&&e[0]>e[10]?(r=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/r,t[0]=.25*r,t[1]=(e[1]+e[4])/r,t[2]=(e[8]+e[2])/r):e[5]>e[10]?(r=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/r,t[0]=(e[1]+e[4])/r,t[1]=.25*r,t[2]=(e[6]+e[9])/r):(r=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/r,t[0]=(e[8]+e[2])/r,t[1]=(e[6]+e[9])/r,t[2]=.25*r),t}function A(t,e,n,r){let i=e[0],a=e[1],o=e[2],s=e[3],u=i+i,l=a+a,h=o+o,c=i*u,f=i*l,p=i*h,M=a*l,m=a*h,d=o*h,g=s*u,y=s*l,b=s*h,x=r[0],v=r[1],_=r[2];return t[0]=(1-(M+d))*x,t[1]=(f+b)*x,t[2]=(p-y)*x,t[3]=0,t[4]=(f-b)*v,t[5]=(1-(c+d))*v,t[6]=(m+g)*v,t[7]=0,t[8]=(p+y)*_,t[9]=(m-g)*_,t[10]=(1-(c+M))*_,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function P(t,e,n,r,i){let a=e[0],o=e[1],s=e[2],u=e[3],l=a+a,h=o+o,c=s+s,f=a*l,p=a*h,M=a*c,m=o*h,d=o*c,g=s*c,y=u*l,b=u*h,x=u*c,v=r[0],_=r[1],w=r[2],S=i[0],A=i[1],P=i[2],O=(1-(m+g))*v,R=(p+x)*v,B=(M-b)*v,Y=(p-x)*_,q=(1-(f+g))*_,X=(d+y)*_,I=(M+b)*w,C=(d-y)*w,T=(1-(f+m))*w;return t[0]=O,t[1]=R,t[2]=B,t[3]=0,t[4]=Y,t[5]=q,t[6]=X,t[7]=0,t[8]=I,t[9]=C,t[10]=T,t[11]=0,t[12]=n[0]+S-(O*S+Y*A+I*P),t[13]=n[1]+A-(R*S+q*A+C*P),t[14]=n[2]+P-(B*S+X*A+T*P),t[15]=1,t}function O(t,e,n,r,i,a,o){let s=1/(n-e),u=1/(i-r),l=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(o+a)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*l,t[15]=0,t}function R(t,e,n,r){let a=e[0],o=e[1],u=e[2],l=a-n[0],h=o-n[1],c=u-n[2],f=(0,i.FD)();if(Math.abs(l)<f&&Math.abs(h)<f&&Math.abs(c)<f)return void s(t);let p=1/Math.sqrt(l*l+h*h+c*c);l*=p,h*=p,c*=p;let M=r[0],m=r[1],d=r[2],g=m*c-d*h,y=d*l-M*c,b=M*h-m*l;p=Math.sqrt(g*g+y*y+b*b),p?(p=1/p,g*=p,y*=p,b*=p):(g=0,y=0,b=0);let x=h*b-c*y,v=c*g-l*b,_=l*y-h*g;p=Math.sqrt(x*x+v*v+_*_),p?(p=1/p,x*=p,v*=p,_*=p):(x=0,v=0,_=0),t[0]=g,t[1]=x,t[2]=l,t[3]=0,t[4]=y,t[5]=v,t[6]=h,t[7]=0,t[8]=b,t[9]=_,t[10]=c,t[11]=0,t[12]=-(g*a+y*o+b*u),t[13]=-(x*a+v*o+_*u),t[14]=-(l*a+h*o+c*u),t[15]=1}function B(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function Y(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function q(t){let e=(0,i.FD)(),n=t[0],r=t[1],a=t[2],o=t[4],s=t[5],u=t[6],l=t[8],h=t[9],c=t[10];return Math.abs(1-(n*n+o*o+l*l))<=e&&Math.abs(1-(r*r+s*s+h*h))<=e&&Math.abs(1-(a*a+u*u+c*c))<=e}function X(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const I=c,C=B;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){let n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],l=e[7],h=e[8],c=e[9],f=e[10],p=e[11],M=e[12],m=e[13],d=e[14],g=e[15];return t[0]=s*(f*g-p*d)-c*(u*g-l*d)+m*(u*p-l*f),t[1]=-(r*(f*g-p*d)-c*(i*g-a*d)+m*(i*p-a*f)),t[2]=r*(u*g-l*d)-s*(i*g-a*d)+m*(i*l-a*u),t[3]=-(r*(u*p-l*f)-s*(i*p-a*f)+c*(i*l-a*u)),t[4]=-(o*(f*g-p*d)-h*(u*g-l*d)+M*(u*p-l*f)),t[5]=n*(f*g-p*d)-h*(i*g-a*d)+M*(i*p-a*f),t[6]=-(n*(u*g-l*d)-o*(i*g-a*d)+M*(i*l-a*u)),t[7]=n*(u*p-l*f)-o*(i*p-a*f)+h*(i*l-a*u),t[8]=o*(c*g-p*m)-h*(s*g-l*m)+M*(s*p-l*c),t[9]=-(n*(c*g-p*m)-h*(r*g-a*m)+M*(r*p-a*c)),t[10]=n*(s*g-l*m)-o*(r*g-a*m)+M*(r*l-a*s),t[11]=-(n*(s*p-l*c)-o*(r*p-a*c)+h*(r*l-a*s)),t[12]=-(o*(c*d-f*m)-h*(s*d-u*m)+M*(s*f-u*c)),t[13]=n*(c*d-f*m)-h*(r*d-i*m)+M*(r*f-i*c),t[14]=-(n*(s*d-u*m)-o*(r*d-i*m)+M*(r*u-i*s)),t[15]=n*(s*f-u*c)-o*(r*f-i*c)+h*(r*u-i*s),t},copy:a,determinant:function(t){let e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],u=t[7],l=t[8],h=t[9],c=t[10],f=t[11],p=t[12],M=t[13],m=t[14],d=t[15];return(e*o-n*a)*(c*d-f*m)-(e*s-r*a)*(h*d-f*M)+(e*u-i*a)*(h*m-c*M)+(n*s-r*o)*(l*d-f*p)-(n*u-i*o)*(l*m-c*p)+(r*u-i*s)*(l*M-h*p)},equals:function(t,e){if(t===e)return!0;let n=t[0],r=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=t[6],h=t[7],c=t[8],f=t[9],p=t[10],M=t[11],m=t[12],d=t[13],g=t[14],y=t[15],b=e[0],x=e[1],v=e[2],_=e[3],w=e[4],S=e[5],A=e[6],P=e[7],O=e[8],R=e[9],B=e[10],Y=e[11],q=e[12],X=e[13],I=e[14],C=e[15],T=(0,i.FD)();return Math.abs(n-b)<=T*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(r-x)<=T*Math.max(1,Math.abs(r),Math.abs(x))&&Math.abs(a-v)<=T*Math.max(1,Math.abs(a),Math.abs(v))&&Math.abs(o-_)<=T*Math.max(1,Math.abs(o),Math.abs(_))&&Math.abs(s-w)<=T*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(u-S)<=T*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(l-A)<=T*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(h-P)<=T*Math.max(1,Math.abs(h),Math.abs(P))&&Math.abs(c-O)<=T*Math.max(1,Math.abs(c),Math.abs(O))&&Math.abs(f-R)<=T*Math.max(1,Math.abs(f),Math.abs(R))&&Math.abs(p-B)<=T*Math.max(1,Math.abs(p),Math.abs(B))&&Math.abs(M-Y)<=T*Math.max(1,Math.abs(M),Math.abs(Y))&&Math.abs(m-q)<=T*Math.max(1,Math.abs(m),Math.abs(q))&&Math.abs(d-X)<=T*Math.max(1,Math.abs(d),Math.abs(X))&&Math.abs(g-I)<=T*Math.max(1,Math.abs(g),Math.abs(I))&&Math.abs(y-C)<=T*Math.max(1,Math.abs(y),Math.abs(C))},exactEquals:Y,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){let n=e[0],r=e[1],i=e[2],a=e[3],o=n+n,s=r+r,u=i+i,l=n*o,h=r*o,c=r*s,f=i*o,p=i*s,M=i*u,m=a*o,d=a*s,g=a*u;return t[0]=1-c-M,t[1]=h+g,t[2]=f-d,t[3]=0,t[4]=h-g,t[5]=1-l-M,t[6]=p+m,t[7]=0,t[8]=f+d,t[9]=p-m,t[10]=1-l-c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){let n=v,r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],u=e[5],l=e[6],h=e[7],c=r*r+i*i+a*a+o*o;return c>0?(n[0]=2*(s*o+h*r+u*a-l*i)/c,n[1]=2*(u*o+h*i+l*r-s*a)/c,n[2]=2*(l*o+h*a+s*i-u*r)/c):(n[0]=2*(s*o+h*r+u*a-l*i),n[1]=2*(u*o+h*i+l*r-s*a),n[2]=2*(l*o+h*a+s*i-u*r)),x(t,e,n),t},fromRotation:g,fromRotationTranslation:x,fromRotationTranslationScale:A,fromRotationTranslationScaleOrigin:P,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:d,fromXRotation:y,fromYRotation:function(t,e){let n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:b,frustum:O,getRotation:S,getScale:w,getTranslation:_,hasIdentityRotation:X,identity:s,invert:h,invertOrIdentity:l,isOrthoNormal:q,lookAt:R,mul:I,multiply:c,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},ortho:function(t,e,n,r,i,a,o){let s=1/(e-n),u=1/(r-i),l=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(o+a)*l,t[15]=1,t},perspective:function(t,e,n,r,i){let a,o=1/Math.tan(e/2);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(a=1/(r-i),t[10]=(i+r)*a,t[14]=2*i*r*a):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,e,n,r){let i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(o+s),l=2/(i+a);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-s)*u*.5,t[9]=(i-a)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},rotate:M,rotateX:m,rotateY:function(t,e,n){let r=Math.sin(n),i=Math.cos(n),a=e[0],o=e[1],s=e[2],u=e[3],l=e[8],h=e[9],c=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i-l*r,t[1]=o*i-h*r,t[2]=s*i-c*r,t[3]=u*i-f*r,t[8]=a*r+l*i,t[9]=o*r+h*i,t[10]=s*r+c*i,t[11]=u*r+f*i,t},rotateZ:function(t,e,n){let r=Math.sin(n),i=Math.cos(n),a=e[0],o=e[1],s=e[2],u=e[3],l=e[4],h=e[5],c=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+l*r,t[1]=o*i+h*r,t[2]=s*i+c*r,t[3]=u*i+f*r,t[4]=l*i-a*r,t[5]=h*i-o*r,t[6]=c*i-s*r,t[7]=f*i-u*r,t},scale:p,set:o,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:C,subtract:B,targetTo:function(t,e,n,r){let i=e[0],a=e[1],o=e[2],s=r[0],u=r[1],l=r[2],h=i-n[0],c=a-n[1],f=o-n[2],p=h*h+c*c+f*f;p>0&&(p=1/Math.sqrt(p),h*=p,c*=p,f*=p);let M=u*f-l*c,m=l*h-s*f,d=s*c-u*h;return p=M*M+m*m+d*d,p>0&&(p=1/Math.sqrt(p),M*=p,m*=p,d*=p),t[0]=M,t[1]=m,t[2]=d,t[3]=0,t[4]=c*d-f*m,t[5]=f*M-h*d,t[6]=h*m-c*M,t[7]=0,t[8]=h,t[9]=c,t[10]=f,t[11]=0,t[12]=i,t[13]=a,t[14]=o,t[15]=1,t},translate:f,transpose:u},Symbol.toStringTag,{value:"Module"}))},35522(t,e,n){n.d(e,{$A:()=>A,Bw:()=>a,C:()=>o,Cc:()=>P,DI:()=>_,Io:()=>y,Ln:()=>g,Om:()=>S,Qr:()=>c,Re:()=>l,S8:()=>w,T9:()=>m,WQ:()=>u,Z0:()=>O,_S:()=>p,aI:()=>C,ei:()=>R,fw:()=>Y,gL:()=>B,hG:()=>b,hZ:()=>s,hs:()=>d,jk:()=>M,lw:()=>h,m3:()=>x,oW:()=>T,t2:()=>I,tn:()=>f,ze:()=>v});var r=n(51850),i=n(34304);function a(t){let e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function s(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function u(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function l(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function h(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function c(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function f(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function p(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function M(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function m(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function d(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function g(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function y(t,e){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}function b(t,e){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function x(t){let e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function v(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function _(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function w(t,e=t){let n=e[0],r=e[1],i=e[2],a=n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}function S(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function A(t,e,n){let r=e[0],i=e[1],a=e[2],o=n[0],s=n[1],u=n[2];return t[0]=i*u-a*s,t[1]=a*o-r*u,t[2]=r*s-i*o,t}function P(t,e,n,r){let i=e[0],a=e[1],o=e[2];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=o+r*(n[2]-o),t}function O(t,e,n){let r=e[0],i=e[1],a=e[2];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12],t[1]=n[1]*r+n[5]*i+n[9]*a+n[13],t[2]=n[2]*r+n[6]*i+n[10]*a+n[14],t}function R(t,e,n){let r=e[0],i=e[1],a=e[2];return t[0]=r*n[0]+i*n[3]+a*n[6],t[1]=r*n[1]+i*n[4]+a*n[7],t[2]=r*n[2]+i*n[5]+a*n[8],t}function B(t,e,n){return Y(t,e,n[0],n[1],n[2],n[3])}function Y(t,e,n,r,i,a){let o=e[0],s=e[1],u=e[2],l=r*u-i*s,h=i*o-n*u,c=n*s-r*o,f=r*c-i*h,p=i*l-n*c,M=n*h-r*l,m=2*a;return t[0]=o+l*m+2*f,t[1]=s+h*m+2*p,t[2]=u+c*m+2*M,t}const q=(0,r.vt)(),X=(0,r.vt)();function I(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function C(t,e){if(t===e)return!0;let n=t[0],r=t[1],a=t[2],o=e[0],s=e[1],u=e[2],l=(0,i.FD)();return Math.abs(n-o)<=l*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-s)<=l*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-u)<=l*Math.max(1,Math.abs(a),Math.abs(u))}function T(t,e,n){let r=n[0]-e[0],i=n[1]-e[1],a=n[2]-e[2],o=r*r+i*i+a*a;return o>0?(o=1/Math.sqrt(o),t[0]=r*o,t[1]=i*o,t[2]=a*o,t):(t[0]=0,t[1]=0,t[2]=0,t)}const j=l,Z=h,N=c,E=y,z=b,D=a,k=x;Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:u,angle:function(t,e){w(q,t),w(X,e);let n=S(q,X);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(t,e,n,r,i,a){let o=1-a,s=o*o,u=a*a,l=s*o,h=3*a*s,c=3*u*o,f=u*a;return t[0]=e[0]*l+n[0]*h+r[0]*c+i[0]*f,t[1]=e[1]*l+n[1]*h+r[1]*c+i[1]*f,t[2]=e[2]*l+n[2]*h+r[2]*c+i[2]*f,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,n=1){return t[0]=Math.min(Math.max(t[0],e),n),t[1]=Math.min(Math.max(t[1],e),n),t[2]=Math.min(Math.max(t[2],e),n),t},copy:o,cross:A,crossAndNormalize:function(t,e,n){let r=e[0],i=e[1],a=e[2],o=n[0],s=n[1],u=n[2],l=i*u-a*s,h=a*o-r*u,c=r*s-i*o,f=Math.sqrt(l*l+h*h+c*c);return t[0]=l/f,t[1]=h/f,t[2]=c/f,t},direction:T,dist:E,distance:y,div:N,divide:c,dot:S,equals:C,exactEquals:I,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,n,r,i,a){let o=a*a,s=o*(2*a-3)+1,u=o*(a-2)+a,l=o*(a-1),h=o*(3-2*a);return t[0]=e[0]*s+n[0]*u+r[0]*l+i[0]*h,t[1]=e[1]*s+n[1]*u+r[1]*l+i[1]*h,t[2]=e[2]*s+n[2]*u+r[2]*l+i[2]*h,t},inverse:_,len:D,length:a,lerp:P,max:m,min:M,mul:Z,multiply:h,negate:v,normalize:w,random:function(t,e=1){let n=i.Ov,r=2*n()*Math.PI,a=2*n()-1,o=Math.sqrt(1-a*a)*e;return t[0]=Math.cos(r)*o,t[1]=Math.sin(r)*o,t[2]=a*e,t},rotateX:function(t,e,n,r){let i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[0],a[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),a[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},rotateY:function(t,e,n,r){let i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),a[1]=i[1],a[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},rotateZ:function(t,e,n,r){let i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),a[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),a[2]=i[2],t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:d,scaleAndAdd:g,scaleTo:function(t,e){return d(t,t,e/D(t))},set:s,sign:p,sqrDist:z,sqrLen:k,squaredDistance:b,squaredLength:x,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:j,subtract:l,transformMat3:R,transformMat4:O,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:B,transformQuatValues:Y},Symbol.toStringTag,{value:"Module"})),n.d(e,["Il",0,D,"jb",0,j,"lo",0,z,"uE",0,k])},78955(t,e,n){n.d(e,{Bw:()=>d,C:()=>i,Cc:()=>x,LI:()=>f,Om:()=>b,S8:()=>y,T9:()=>c,WQ:()=>o,Z0:()=>v,aI:()=>w,hG:()=>m,hZ:()=>a,hs:()=>p,jk:()=>h,m3:()=>g,t2:()=>_});var r=n(34304);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function a(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function o(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function s(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}function u(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}function l(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}function h(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t}function c(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t}function f(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t}function p(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function M(t,e){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(n*n+r*r+i*i+a*a)}function m(t,e){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return n*n+r*r+i*i+a*a}function d(t){let e=t[0],n=t[1],r=t[2],i=t[3];return Math.sqrt(e*e+n*n+r*r+i*i)}function g(t){let e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function y(t,e){let n=e[0],r=e[1],i=e[2],a=e[3],o=n*n+r*r+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),t[0]=n*o,t[1]=r*o,t[2]=i*o,t[3]=a*o),t}function b(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function x(t,e,n,r){let i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=o+r*(n[2]-o),t[3]=s+r*(n[3]-s),t}function v(t,e,n){let r=e[0],i=e[1],a=e[2],o=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*o,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*o,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*o,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*o,t}function _(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function w(t,e){let n=t[0],i=t[1],a=t[2],o=t[3],s=e[0],u=e[1],l=e[2],h=e[3],c=(0,r.FD)();return Math.abs(n-s)<=c*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-u)<=c*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(a-l)<=c*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(o-h)<=c*Math.max(1,Math.abs(o),Math.abs(h))}const S=s,A=u,P=l,O=M,R=m,B=d,Y=g;Object.freeze(Object.defineProperty({__proto__:null,add:o,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t},copy:i,copyVec3:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},dist:O,distance:M,div:P,divide:l,dot:b,equals:w,exactEquals:_,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},len:B,length:d,lerp:x,max:c,min:h,mul:A,multiply:u,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},normalize:y,random:function(t,e=1){let n,i,a,o,s,u,l=r.Ov;do{n=2*l()-1,i=2*l()-1,s=n*n+i*i}while(s>=1);do{a=2*l()-1,o=2*l()-1,u=a*a+o*o}while(u>=1);let h=Math.sqrt((1-s)/u);return t[0]=e*n,t[1]=e*i,t[2]=e*a*h,t[3]=e*o*h,t},round:f,scale:p,scaleAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t},set:a,sqrDist:R,sqrLen:Y,squaredDistance:m,squaredLength:g,str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},sub:S,subtract:s,transformMat4:v,transformQuat:function(t,e,n){let r=e[0],i=e[1],a=e[2],o=n[0],s=n[1],u=n[2],l=n[3],h=l*r+s*a-u*i,c=l*i+u*r-o*a,f=l*a+o*i-s*r,p=-o*r-s*i-u*a;return t[0]=h*l+p*-o+c*-u-f*-s,t[1]=c*l+p*-s+f*-o-h*-u,t[2]=f*l+p*-u+h*-s-c*-o,t[3]=e[3],t}},Symbol.toStringTag,{value:"Module"}))},75503(t,e,n){n.d(e,{wq:()=>s});var r=n(4576),i=n(21818),a=(n(44208),n(15142)),o=n(11006);class s{constructor(t=9,e){this._compareMinX=f,this._compareMinY=p,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),v.prune(),_.prune(),w.prune(),S.prune()}all(t){u(this._data,t)}search(t,e){let n=this._data,r=this._toBBox;if(b(t,n))for(v.clear();n;){for(let i=0,a=n.children.length;i<a;i++){let a=n.children[i],o=n.leaf?r(a):a;b(t,o)&&(n.leaf?e(a):y(t,o)?u(a,e):v.push(a))}n=v.pop()}}collides(t){let e=this._data,n=this._toBBox;if(!b(t,e))return!1;for(v.clear();e;){for(let r=0,i=e.children.length;r<i;r++){let i=e.children[r],a=e.leaf?n(i):i;if(b(t,a)){if(e.leaf||y(t,a))return!0;v.push(i)}}e=v.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){let t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new O([]),this}remove(t){if(!t)return this;let e,n=this._data,a=null,o=0,s=!1,u=this._toBBox(t);for(w.clear(),S.clear();n||w.length>0;){if(n||(n=w.pop(),a=w.data[w.length-1],o=S.pop()??0,s=!0),n.leaf&&(e=(0,r.qh)(n.children,(0,i.z)(t),n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),w.push(n),this._condense(w),this;s||n.leaf||!y(n,u)?a?(o++,n=a.children[o],s=!1):n=null:(w.push(n),S.push(o),o=0,a=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,e,n,r){let i=n-e+1,a=this._maxEntries;if(i<=a){let r=new O(t.slice(e,n+1));return l(r,this._toBBox),r}r||(r=Math.ceil(Math.log(i)/Math.log(a)),a=Math.ceil(i/a**(r-1)));let o=new R([]);o.height=r;let s=Math.ceil(i/a),u=s*Math.ceil(Math.sqrt(a));x(t,e,n,u,this._compareMinX);for(let i=e;i<=n;i+=u){let e=Math.min(i+u-1,n);x(t,i,e,s,this._compareMinY);for(let n=i;n<=e;n+=s){let i=Math.min(n+s-1,e);o.children.push(this._build(t,n,i,r-1))}}return l(o,this._toBBox),o}_insert(t,e,n){let r=this._toBBox,i=n?t:r(t);w.clear();let a=function(t,e,n,r){for(;r.push(e),!0!==e.leaf&&r.length-1!==n;){let n,r=1/0,i=1/0;for(let a=0,o=e.children.length;a<o;a++){let o=e.children[a],s=M(o),u=d(t,o)-s;u<i?(i=u,r=s<r?s:r,n=o):u===i&&s<r&&(r=s,n=o)}e=n||e.children[0]}return e}(i,this._data,e,w);for(a.children.push(t),c(a,i);e>=0&&w.data[e].children.length>this._maxEntries;)this._split(w,e),e--;!function(t,e,n){for(let r=n;r>=0;r--)c(e.data[r],t)}(i,w,e)}_split(t,e){let n=t.data[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);let a=this._chooseSplitIndex(n,i,r);if(!a)return;let o=n.children.splice(a,n.children.length-a),s=n.leaf?new O(o):new R(o);s.height=n.height,l(n,this._toBBox),l(s,this._toBBox),e?t.data[e-1].children.push(s):this._splitRoot(n,s)}_splitRoot(t,e){this._data=new R([t,e]),this._data.height=t.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let r,i,a;r=i=1/0;for(let o=e;o<=n-e;o++){let e=h(t,0,o,this._toBBox),s=h(t,o,n,this._toBBox),u=g(e,s),l=M(e)+M(s);u<r?(r=u,a=o,i=l<i?l:i):u===r&&l<i&&(i=l,a=o)}return a}_chooseSplitAxis(t,e,n){let r=t.leaf?this._compareMinX:f,i=t.leaf?this._compareMinY:p;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)}_allDistMargin(t,e,n,r){t.children.sort(r);let i=this._toBBox,a=h(t,0,e,i),o=h(t,n-e,n,i),s=m(a)+m(o);for(let r=e;r<n-e;r++){let e=t.children[r];c(a,t.leaf?i(e):e),s+=m(a)}for(let r=n-e-1;r>=e;r--){let e=t.children[r];c(o,t.leaf?i(e):e),s+=m(o)}return s}_condense(t){for(let e=t.length-1;e>=0;e--){let n=t.data[e];if(0===n.children.length)if(e>0){let i=t.data[e-1],a=i.children;a.splice((0,r.qh)(a,n,a.length,i.indexHint),1)}else this.clear();else l(n,this._toBBox)}}_initFormat(t){let e=["return a"," - b",";"];this._compareMinX=Function("a","b",e.join(t[0])),this._compareMinY=Function("a","b",e.join(t[1])),this._toBBox=Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function u(t,e){let n=t;for(_.clear();n;){if(!0===n.leaf)for(let t of n.children)e((0,i.z)(t));else _.pushArray(n.children);n=_.pop()??null}}function l(t,e){h(t,0,t.children.length,e,t)}function h(t,e,n,r,i){i||=new O([]),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let a,o=e;o<n;o++)a=t.children[o],c(i,t.leaf?r(a):a);return i}function c(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function f(t,e){return t.minX-e.minX}function p(t,e){return t.minY-e.minY}function M(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function m(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function g(t,e){let n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),a=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,a-r)}function y(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function b(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function x(t,e,n,r,i){let a=[e,n];for(;a.length;){let e=a.pop(),n=a.pop();if(e-n<=r)continue;let s=n+Math.ceil((e-n)/r/2)*r;(0,o.q)(t,s,n,e,i),a.push(n,s,s,e)}}const v=new a.A,_=new a.A,w=new a.A,S=new a.A({deallocator:void 0});class A{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class P extends A{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class O extends P{constructor(t){super(),this.children=t,this.leaf=!0}}class R extends P{constructor(t){super(),this.children=t,this.leaf=!1}}},48526(t,e,n){n.d(e,{A:()=>d});var r,i=n(32198),a=n(4576),o=n(4718),s=n(91429),u=n(5443),l=n(91075),h=n(86738),c=n(16930),f=n(90634),p=n(47610),M=n(56993),m=n(43937);let d=r=class extends l.A{constructor(t){super(function(t){if(!t)return;let{points:e,hasM:n,hasZ:r,spatialReference:i}=t;switch(e??=[],e?.at(0)?.length){case 4:r??=!0,n??=!0;break;case 3:r??=!0!==n,n??=!r;break;default:r??=!1,n??=!1}return i??=c.A.WGS84,{...t,hasM:n,hasZ:r,points:e,spatialReference:i}}(t)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){let t=(0,f.ge)(this);return t?new u.A({...t,spatialReference:this.spatialReference}):null}writePoints(t,e){e.points=(0,o.o8)(this.points)}clone(){let{points:t,spatialReference:e,hasM:n,hasZ:i}=this;return new r({points:(0,o.o8)(t),spatialReference:e.clone(),hasM:n,hasZ:i})}equals(t){if(this===t)return!0;if(null==t)return!1;let e=this.spatialReference,n=t.spatialReference;return!(null!=e!=(null!=n)||null!=e&&null!=n&&!e.equals(n))&&(0,a.aI)(this.points,t.points,p.v6)}addPoint(t){return(0,M.h)(this,t),Array.isArray(t)?this.points.push(t):this.points.push(t.toArray()),this.notifyChange("points"),this}getPoint(t){if(!this._validateInputs(t))return null;let e=this.points[t],n={x:e[0],y:e[1],spatialReference:this.spatialReference},r=2;return this.hasZ&&(n.z=e[2],r=3),this.hasM&&(n.m=e[r]),new h.A(n)}removePoint(t){if(!this._validateInputs(t))return null;let e=new h.A(this.points.splice(t,1)[0],this.spatialReference);return this.notifyChange("points"),e}setPoint(t,e){return this._validateInputs(t)&&((0,M.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.points[t]=e,this.notifyChange("points")),this}toJSON(t){return this.write({},t)}_validateInputs(t){return null!=t&&t>=0&&t<this.points.length}};(0,i.Cg)([(0,s.MZ)({readOnly:!0})],d.prototype,"cache",null),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],d.prototype,"extent",null),(0,i.Cg)([(0,s.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],d.prototype,"points",void 0),(0,i.Cg)([(0,m.K)("points")],d.prototype,"writePoints",null),d=r=(0,i.Cg)([(0,s.$K)("esri.geometry.Multipoint")],d),d.prototype.toJSON.isDefaultToJSON=!0},82799(t,e,n){n.d(e,{A:()=>M});var r,i=n(32198),a=n(4718),o=n(91429),s=n(5443),u=n(91075),l=n(86738),h=n(16930),c=n(90634),f=n(56993),p=n(43937);let M=r=class extends u.A{constructor(t){super(function(t){if(!t)return;let{paths:e,hasM:n,hasZ:r,spatialReference:i}=t;switch(e??=[],function(t){return"number"==typeof t[0]?.[0]}(e)&&(e=[e]),e[0]?.[0]?.length){case 4:r??=!0,n??=!0;break;case 3:r??=!0!==n,n??=!r;break;default:r??=!1,n??=!1}return i??=h.A.WGS84,{...t,hasM:n,hasZ:r,paths:e,spatialReference:i}}(t)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(t,e){e.curvePaths=(0,a.o8)(t)}get extent(){let t=(0,c.Z3)(this),{spatialReference:e}=this;return t?new s.A({...t,spatialReference:e}):null}writePaths(t,e){e.paths=(0,a.o8)(this.paths)}addPath(t){if(!t)return;let e=this.paths,n=e.length;if(function(t){return!Array.isArray(t[0])}(t)){let r=[];for(let e=0,n=t.length;e<n;e++)r[e]=t[e].toArray();e[n]=r}else e[n]=t.slice();return this.notifyChange("paths"),this}clone(){let t=new r;return t.spatialReference=this.spatialReference,t.paths=(0,a.o8)(this.paths),t.curvePaths=(0,a.o8)(this.curvePaths),t.hasZ=this.hasZ,t.hasM=this.hasM,t}getPoint(t,e){if(!this._validateInputs(t,e))return null;let n=this.paths[t][e],r=this.hasZ,i=this.hasM;return r&&!i?new l.A(n[0],n[1],n[2],void 0,this.spatialReference):i&&!r?new l.A(n[0],n[1],void 0,n[2],this.spatialReference):r&&i?new l.A(n[0],n[1],n[2],n[3],this.spatialReference):new l.A(n[0],n[1],this.spatialReference)}insertPoint(t,e,n){return this._validateInputs(t,e,!0)&&((0,f.h)(this,n),Array.isArray(n)||(n=n.toArray()),this.paths[t].splice(e,0,n),this.notifyChange("paths")),this}removePath(t){if(!this._validateInputs(t,null))return null;let e=this.paths.splice(t,1)[0],n=this.spatialReference,r=e.map(t=>new l.A(t,n));return this.notifyChange("paths"),r}removePoint(t,e){if(!this._validateInputs(t,e))return null;let n=new l.A(this.paths[t].splice(e,1)[0],this.spatialReference);return this.notifyChange("paths"),n}setPoint(t,e,n){return this._validateInputs(t,e)&&((0,f.h)(this,n),Array.isArray(n)||(n=n.toArray()),this.paths[t][e]=n,this.notifyChange("paths")),this}_validateInputs(t,e,n=!1){if(null==t||t<0||t>=this.paths.length)return!1;if(null!=e){let r=this.paths[t];if(n&&(e<0||e>r.length)||!n&&(e<0||e>=r.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,i.Cg)([(0,o.MZ)({readOnly:!0})],M.prototype,"cache",null),(0,i.Cg)([(0,o.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],M.prototype,"curvePaths",void 0),(0,i.Cg)([(0,p.K)("curvePaths")],M.prototype,"writeCurvePaths",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],M.prototype,"extent",null),(0,i.Cg)([(0,o.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],M.prototype,"paths",void 0),(0,i.Cg)([(0,p.K)("paths")],M.prototype,"writePaths",null),M=r=(0,i.Cg)([(0,o.$K)("esri.geometry.Polyline")],M),M.prototype.toJSON.isDefaultToJSON=!0},48353(t,e,n){n.d(e,{l:()=>l});var r=n(34727),i=n(58083),a=n(51850);function o(t,e,n){let r=Math.sin(t),i=Math.cos(t),a=Math.sin(e),o=Math.cos(e),s=n;return s[0]=-r,s[4]=-a*i,s[8]=o*i,s[12]=0,s[1]=i,s[5]=-a*r,s[9]=o*r,s[13]=0,s[2]=0,s[6]=o,s[10]=a,s[14]=0,s[3]=0,s[7]=0,s[11]=0,s[15]=1,s}var s=n(49208),u=n(21325);function l(t,e,n,r){let a=(0,s.Tp)(t,r);if(null==a)return!1;let l=a.source.spatialReferenceId,M=a.dest.spatialReferenceId;if(l===M&&!h(M)&&(0!==l||(0,u.aI)(t,r)))return(0,i.kN)(n,e),!0;if(h(M)){let t=s.w5[l][10],r=s.w5[10][M];return null!=t&&null!=r&&(t(e,0,f,0),r(f,0,p,0),o(c*f[0],c*f[1],n),n[12]=p[0],n[13]=p[1],n[14]=p[2],!0)}let m=h(l);if((3===M||11===M||2===M||5===M)&&(2===l||m||3===l||5===l)){let t=s.w5[l][10],r=s.w5[10][M];return null!=t&&null!=r&&(t(e,0,f,0),r(f,0,p,0),m?function(t,e,n){o(t,e,n),(0,i.mg)(n,n)}(c*f[0],c*f[1],n):(0,i.D_)(n),n[12]=p[0],n[13]=p[1],n[14]=p[2],!0)}return!1}function h(t){return 1===t||6===t||8===t||4===t}const c=(0,r.kU)(1),f=(0,a.vt)(),p=(0,a.vt)()},65806(t,e,n){n.d(e,{g:()=>o});var r=n(51850),i=n(99917),a=n(9762);function o(t,e,n,r){if((0,i.canProjectWithoutEngine)(t.spatialReference,n))return s[0]=t.x,s[1]=t.y,s[2]=t.z??0,(0,a.projectBuffer)(s,t.spatialReference,0,e,n,0);let o=(0,i.tryProject)(t,n,r);return!!o&&(e[0]=o.x,e[1]=o.y,e[2]=o.z??0,!0)}const s=(0,r.vt)()},95696(t,e,n){n.d(e,{A:()=>l});var r,i=n(32198),a=n(69540),o=n(25482),s=n(91429),u=n(93223);let l=class extends((0,a.OU)(o.o)){static{r=this}constructor(t){super(t),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,i.Cg)([(0,u.e)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],l.prototype,"origin",void 0),l=r=(0,i.Cg)([(0,s.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l)},18251(t,e,n){n.d(e,{A:()=>l});var r=n(32198),i=n(69540),a=n(25482),o=n(91429),s=n(51850),u=n(93223);let l=class extends((0,i.OU)(a.o)){constructor(t){super(t),this.type="local",this.origin=(0,s.vt)()}};(0,r.Cg)([(0,u.e)({local:"local"},{readOnly:!0})],l.prototype,"type",void 0),(0,r.Cg)([(0,o.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"origin",void 0),l=(0,r.Cg)([(0,o.$K)("esri.geometry.support.MeshLocalVertexSpace")],l)},72727(t,e,n){function r(t,e,n){if(e<=0)return 0;let r=t-n;return r<0?0:Math.floor(r/e)+1}n.d(e,{k:()=>r}),n(53966)},52006(t,e,n){function r(t){return"curveRings"in t&&!!t.curveRings?.length||"curvePaths"in t&&!!t.curvePaths?.length}function i(t){return"curveRings"in t?t.curveRings:t.curvePaths}function a(t){return"b"in t}function o(t){return"c"in t}function s(t){return Array.isArray(t)}function u(t){return"a"in t}function l(t){return"a"in t&&4===t.a.length}function h(t){return"a"in t&&7===t.a.length}function c(t,e){return i(t).flat().some(t=>function(t,e){return!(s(t)||(a(t)?e.has("cubic-bezier"):o(t)?e.has("circular-arc"):!l(t)&&!h(t)||e.has("elliptic-arc")))}(t,e))}function f(t){return s(t)?t:a(t)?t.b[0]:o(t)?t.c[0]:t.a[0]}function p(t){if(a(t)){let[e,n,r]=t.b;return{b:[[...e],[...n],[...r]]}}if(o(t)){let[e,n]=t.c;return{c:[[...e],[...n]]}}if(s(t))return[...t];if(l(t)){let[e,n,r,i]=t.a;return{a:[[...e],[...n],r,i]}}if(h(t)){let[e,n,r,i,a,o,s]=t.a;return{a:[[...e],[...n],r,i,a,o,s]}}return t}n.d(e,{DA:()=>l,Ed:()=>r,FD:()=>i,FG:()=>u,V8:()=>c,Xq:()=>s,aO:()=>o,n1:()=>a,tk:()=>p,wY:()=>h,yP:()=>f}),n(4576)},60408(t,e,n){function r(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function i(t){return void 0!==t.points}function a(t){return void 0!==t.x&&void 0!==t.y}function o(t){return void 0!==t.paths||void 0!==t.curvePaths}function s(t){return void 0!==t.rings||void 0!==t.curveRings}function u(t){return"object"==typeof t&&"vertexAttributes"in t}function l(t){return t?a(t)?"esriGeometryPoint":o(t)?"esriGeometryPolyline":s(t)?"esriGeometryPolygon":r(t)?"esriGeometryEnvelope":i(t)?"esriGeometryMultipoint":null:null}function h(t){return null!=t&&("hasZ"in t&&t.hasZ||"z"in t&&null!=t.z)}function c(t){return null!=t&&("hasM"in t&&t.hasM||"m"in t&&null!=t.m)}n.d(e,{$B:()=>l,Bi:()=>s,Pv:()=>h,Rg:()=>o,U9:()=>i,W0:()=>c,ZC:()=>r,fT:()=>a,uW:()=>u})},38419(t,e,n){n.r(e),n.d(e,{default:()=>s});var r=n(44208),i=n(75503),a=n(95696),o=n(72258);class s{async createIndex(t,e){if(!t.vertexAttributes?.position)return new i.wq;let n=function(t){let{vertexAttributes:{position:e},vertexSpace:n,spatialReference:r,transform:i}=t,s=(0,o.UR)({vertexAttributes:{position:e},vertexSpace:n,spatialReference:r,transform:i},a.A.absolute,{allowBufferReuse:!0})?.position;return s?!t.components||t.components.some(t=>!t.faces)?{position:s.buffer}:{position:s.buffer,components:t.components.map(t=>t.faces)}:null}(t),r=null==e?this.createIndexThread(n).result:await e.invoke("createIndexThread",n,{transferList:[]});return u().fromJSON(r)}createIndexThread(t){let e=u();if(!t)return{result:e.toJSON()};let n=new Float64Array(t.position);return t.components?function(t,e,n){let r=0;for(let t of n)r+=t.length/3;let i=Array(r),a=0;for(let t of n)for(let n=0;n<t.length;n+=3)i[a++]=l(e,3*t[n],3*t[n+1],3*t[n+2]);return t.load(i),{result:t.toJSON()}}(e,n,t.components.map(t=>new Uint32Array(t))):function(t,e){let n=Array(e.length/9),r=0;for(let t=0;t<e.length;t+=9)n[r++]=l(e,t,t+3,t+6);return t.load(n),{result:t.toJSON()}}(e,n)}}function u(){return new i.wq(9,(0,r.A)("esri-csp-restrictions")?t=>t:[".minX",".minY",".maxX",".maxY"])}function l(t,e,n,r){return{minX:Math.min(t[e],t[n],t[r]),maxX:Math.max(t[e],t[n],t[r]),minY:Math.min(t[e+1],t[n+1],t[r+1]),maxY:Math.max(t[e+1],t[n+1],t[r+1]),p0:[t[e],t[e+1],t[e+2]],p1:[t[n],t[n+1],t[n+2]],p2:[t[r],t[r+1],t[r+2]]}}},27615(t,e,n){n.d(e,{CK:()=>u,Hq:()=>s,MW:()=>l,TE:()=>h,yJ:()=>c});var r=n(35522),i=n(86738),a=n(95696),o=n(18251);function s(t){return null!=t.origin}function u(t){return s(t.vertexSpace)}function l(t,e){if(!s(t))return null;let[n,r,a]=t.origin;return new i.A({x:n,y:r,z:a,spatialReference:e})}function h(t,e){let{x:n,y:r,z:i,spatialReference:s}=t,u=[n,r,i??0];return"local"===(e?.vertexSpace??function(t){return t.isGeographic||t.isWebMercator?"local":"georeferenced"}(s))?new o.A({origin:u}):new a.A({origin:u})}function c(t,e){return t.type===e.type&&(t.origin===e.origin||null!=t.origin&&null!=e.origin&&(0,r.t2)(t.origin,e.origin))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4934],{67996(e,t,r){r.d(t,{cZ:()=>x,XW:()=>R,fe:()=>k});var i=r(56507),n=r(49186),a=r(91869),s=(r(90708),r(92722)),o=r(16930);class l{constructor(){this.version="",this.queryResult=new p}}class p{constructor(){this.featureResult=new u}}class u{constructor(){this.objectIdFieldName="",this.uniqueIdField=new d,this.globalIdFieldName="",this.geohashFieldName="",this.geometryProperties=new h,this.geometryType=null,this.spatialReference=new o.A,this.exceededTransferLimit=!1,this.hasZ=!1,this.hasM=!1,this.transform=new c,this.fields=[],this.fieldNameToAttributeIndexMap={},this.values=[],this.features=[],this.geometryFields=[]}}class d{constructor(){this.name="",this.isSystemMaintained=!1}}class h{constructor(){this.shapeAreaFieldName="",this.shapeLengthFieldName="",this.units=""}}class c{constructor(){this.quantizeOriginPosition="upperLeft",this.scale=new y,this.translate=new f}}class y{constructor(){this.xScale=0,this.yScale=0,this.mScale=0,this.zScale=0}}class f{constructor(){this.xTranslate=0,this.yTranslate=0,this.mTranslate=0,this.zTranslate=0}}class m{constructor(){this.name="",this.fieldType="esriFieldTypeString",this.alias="",this.sqlType="sqlTypeVarchar",this.domain="",this.defaultValue=""}}class g{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 M=r(45724),I=r(93637),C=r(49403);const _={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};function A(e){let t=new l;t.version=e.version;let r=e.get_query_result();if(0!==r.results_type.value)throw Error("Got a non-feature collection type");let i=r.get_feature_result(),n=t.queryResult.featureResult;n.objectIdFieldName=i.objectid_field_name,n.exceededTransferLimit=i.exceeded_transfer_limit,n.hasM=i.has_m,n.hasZ=i.has_z,n.geometryType=(0,I.i7)(C.bV,i.geometry_type.value),n.globalIdFieldName=i.globalid_field_name,n.geohashFieldName=i.geohash_field_name;let a=n.uniqueIdField,s=i.unique_id_field;a.name=s.name,a.isSystemMaintained=s.isSystemMaintained;let o=n.geometryProperties,p=i.geometry_properties;o.shapeAreaFieldName=p.shapeAreaFieldName,o.shapeLengthFieldName=p.shapeLengthFieldName,o.units=p.units;let u=n.spatialReference,d=i.spatial_reference;u.wkid=d.wkid,u.latestWkid=d.latestWkid,u.vcsWkid=d.vcsWkid,u.latestVcsWkid=d.latestVcsWkid,u.wkt=d.wkt,n.transform=function(e){let t=new c;t.quantizeOriginPosition=(0,I.i7)(_,e.quantizeOriginPosition.value);let r=t.scale,i=e.scale;r.xScale=i.xScale,r.yScale=i.yScale,r.mScale=i.mScale,r.zScale=i.zScale;let n=t.translate,a=e.translate;return n.xTranslate=a.xTranslate,n.yTranslate=a.yTranslate,n.mTranslate=a.mTranslate,n.zTranslate=a.zTranslate,t}(i.transform);let h=n.fields,y=n.fieldNameToAttributeIndexMap,f=i.fields,m=f.size();for(let e=0;e<m;e++){let t=f.get(e),r=v(t);h.push(r),y[r.name]=e,t.delete()}f.delete();let b=n.values,M=i.values_count();for(let e=0;e<M;e++)b.push(i.get_value_at(e));let T=n.features,A=i.features,x=A.size();if(x>0)for(let e of w)if(void 0===y[e])throw Error(`Feature collection missing required attribute: ${e}`);for(let e=0;e<x;e++){let t=new g,r=A.get(e),i=t.attributes,n=r.attributes_count();for(let e=0;e<n;e++)i.push(r.get_attribute_at(e));let a=r.get_compressed_geometry();a&&(t.compressedGeometry=E(a),t.centroid=E(r.get_centroid()));let s=t.aggregateGeometries,o=r.aggregate_geometries,l=o.size();for(let e=0;e<l;e++){let t=o.get(e),r=E(t);s.push(r),t.delete()}o.delete(),T.push(t),r.delete()}A.delete();let k=n.geometryFields,L=i.geometry_fields,N=L.size();for(let e=0;e<N;e++){let t=L.get(e),r=S(t);k.push(r),t.delete()}return L.delete(),t}function E(e){let t=new b;t.geometryType=(0,I.i7)(C.bV,e.geometry_type.value);let r=[],i=[];for(let t=0;t<e.lengths.length;t++)r.push(e.lengths[t]);for(let t=0;t<e.coords.length;t++)i.push(e.coords[t]);return t.lengths=r,t.coords=i,t}function v(e){let t=new m;return t.name=e.name,t.alias=e.alias,t.fieldType=(0,I.i7)(C.r5,e.field_type.value),t.sqlType=(0,I.i7)(T,e.sql_type.value),t.domain=e.domain,t.defaultValue=e.default_value,t}function S(e){let t=v(e);return t.geometryType=(0,I.i7)(C.bV,e.geometry_type.value),t}async function x(e,t,r){t??=!1;let s={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e,t){let r=await(await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal})).data;return async function(e){let t=new((await(0,M.I)()).MapOfObjectIdentifierSetsDecoder),r=t.decode(new Uint8Array(e)),i=new Map;if(0!==r.error_code)throw new n.A("knowledge-graph:layer-support-utils",r.error_message);let a=t.get_map_of_identifier_sets(),s=a.keys,o=s.size();for(let e=0;e<o;e++){let t=s.get(e),r=a.query_identifier_set(t),o=[];if(1===r.id_array_type.value){let e=r.get_globalid_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_globalid_at(r))}else if(3===r.id_array_type.value){let e=r.get_identifier_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_identifier_at(r).toString())}else if(2===r.id_array_type.value){let e=r.get_string_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_string_at(r))}else{if(0!==r.id_array_type.value)throw new n.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{let e=r.get_oid_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_objectid_at(r).toString())}}i.set(t,o)}return t.delete(),i}(new Uint8Array(r))}(e,r).then(e=>{!function(e,t){for(let[r,i]of e){let e=(0,a.tE)(t.namedTypeDefinitions,r,()=>({useAllData:!1,members:new Map}));for(let t of i)e.members.has(t)||e.members.set(t,{id:t})}}(e,s)}),s}async function k(e){let t=await(0,M.I)(),r=new t.MapOfObjectIdentifierSets;!function(e,t,r){for(let[i,n]of r.namedTypeDefinitions){if(!n.members||n.useAllData)continue;let r=n.members.keys(),a=!1,s=!0,o=new t.ObjectIdArray,l=new t.StringArray,p=new t.GlobalIdArray,u=new t.IdentifierArray,d=new t.ObjectIdentifierSet;for(let e of r)s&&=(a=!isNaN(Number(e)),!1),a?o.add_objectid(Number(e)):(l.add_string(e),p.add_globalid(e)),u.add_identifier(e);d.set_oid_array(o),d.set_string_array(l),d.set_globalid_array(p),d.set_identifier_array(u),o.delete(),l.delete(),p.delete(),u.delete(),e.put_identifier_set(i,d),d.delete()}}(r,t,e);let i=new t.MapOfObjectIdentifierSetsEncoder;try{i.set_map_of_identifier_sets(r),i.encode();let e=i.get_encoding_result();if(0!==e.error.error_code)throw new n.A("knowledge-graph:layer-support-utils",e.error.error_message);let t=structuredClone(e.get_byte_buffer());return i.delete(),t}finally{r.delete()}}async function L(e,t){return async function(e){let t=new((await(0,M.I)()).FeatureCollectionDecoder),r=t.decode(new Uint8Array(e));if(0!==r.error_code)throw new n.A("knowledge-graph:layer-support-utils",r.error_message);let i=A(t.get_feature_collection());return t.delete(),i}(await(await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal})).data)}function N(e,t){if(!e?.queryResult?.featureResult)return t;let{hasZ:r,hasM:i}=e.queryResult.featureResult,n=e.queryResult.featureResult.fieldNameToAttributeIndexMap;for(let o of e.queryResult.featureResult.features){let e=o.attributes[n.TYPENAME],l=(0,a.tE)(t.namedTypeDefinitions,e,()=>({useAllData:!1,members:new Map})),p=o.attributes[n.ELEMENTUID];if(o.compressedGeometry?.coords?.length>0){let e=o.compressedGeometry.lengths;"esriGeometryPoint"===o.compressedGeometry.geometryType&&(e=[]),l.members.set(p,{id:p,linkChartLocation:new s.A(e,o.compressedGeometry.coords,r,i)})}else l.members.set(p,{id:p})}return t}const R={fetchAndConvertSerializedLinkChart:(e,t)=>async function(e,t){let r=[],i={generateAllSublayers:!1,namedTypeDefinitions:new Map};return e.entitiesUrl&&r.push(L(e.entitiesUrl,t).then(e=>{N(e,i)})),e.relationshipsUrl&&r.push(L(e.relationshipsUrl,t).then(e=>{N(e,i)})),await Promise.all(r),i}(e,t)}},75503(e,t,r){r.d(t,{wq:()=>o});var i=r(4576),n=r(21818),a=(r(44208),r(15142)),s=r(11006);class o{constructor(e=9,t){this._compareMinX=h,this._compareMinY=c,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(),I.prune(),C.prune(),_.prune(),T.prune()}all(e){l(this._data,e)}search(e,t){let r=this._data,i=this._toBBox;if(w(e,r))for(I.clear();r;){for(let n=0,a=r.children.length;n<a;n++){let a=r.children[n],s=r.leaf?i(a):a;w(e,s)&&(r.leaf?t(a):b(e,s)?l(a,t):I.push(a))}r=I.pop()}}collides(e){let t=this._data,r=this._toBBox;if(!w(e,t))return!1;for(I.clear();t;){for(let i=0,n=t.children.length;i<n;i++){let n=t.children[i],a=t.leaf?r(n):n;if(w(e,a)){if(t.leaf||b(e,a))return!0;I.push(n)}}t=I.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;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){let 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 v([]),this}remove(e){if(!e)return this;let t,r=this._data,a=null,s=0,o=!1,l=this._toBBox(e);for(_.clear(),T.clear();r||_.length>0;){if(r||(r=_.pop(),a=_.data[_.length-1],s=T.pop()??0,o=!0),r.leaf&&(t=(0,i.qh)(r.children,(0,n.z)(e),r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),_.push(r),this._condense(_),this;o||r.leaf||!b(r,l)?a?(s++,r=a.children[s],o=!1):r=null:(_.push(r),T.push(s),s=0,a=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,i){let n=r-t+1,a=this._maxEntries;if(n<=a){let i=new v(e.slice(t,r+1));return p(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(a)),a=Math.ceil(n/a**(i-1)));let s=new S([]);s.height=i;let o=Math.ceil(n/a),l=o*Math.ceil(Math.sqrt(a));M(e,t,r,l,this._compareMinX);for(let n=t;n<=r;n+=l){let t=Math.min(n+l-1,r);M(e,n,t,o,this._compareMinY);for(let r=n;r<=t;r+=o){let n=Math.min(r+o-1,t);s.children.push(this._build(e,r,n,i-1))}}return p(s,this._toBBox),s}_insert(e,t,r){let i=this._toBBox,n=r?e:i(e);_.clear();let a=function(e,t,r,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==r;){let r,i=1/0,n=1/0;for(let a=0,s=t.children.length;a<s;a++){let s=t.children[a],o=y(s),l=m(e,s)-o;l<n?(n=l,i=o<i?o:i,r=s):l===n&&o<i&&(i=o,r=s)}t=r||t.children[0]}return t}(n,this._data,t,_);for(a.children.push(e),d(a,n);t>=0&&_.data[t].children.length>this._maxEntries;)this._split(_,t),t--;!function(e,t,r){for(let i=r;i>=0;i--)d(t.data[i],e)}(n,_,t)}_split(e,t){let r=e.data[t],i=r.children.length,n=this._minEntries;this._chooseSplitAxis(r,n,i);let a=this._chooseSplitIndex(r,n,i);if(!a)return;let s=r.children.splice(a,r.children.length-a),o=r.leaf?new v(s):new S(s);o.height=r.height,p(r,this._toBBox),p(o,this._toBBox),t?e.data[t-1].children.push(o):this._splitRoot(r,o)}_splitRoot(e,t){this._data=new S([e,t]),this._data.height=e.height+1,p(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let i,n,a;i=n=1/0;for(let s=t;s<=r-t;s++){let t=u(e,0,s,this._toBBox),o=u(e,s,r,this._toBBox),l=g(t,o),p=y(t)+y(o);l<i?(i=l,a=s,n=p<n?p:n):l===i&&p<n&&(n=p,a=s)}return a}_chooseSplitAxis(e,t,r){let i=e.leaf?this._compareMinX:h,n=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,r,i)<this._allDistMargin(e,t,r,n)&&e.children.sort(i)}_allDistMargin(e,t,r,i){e.children.sort(i);let n=this._toBBox,a=u(e,0,t,n),s=u(e,r-t,r,n),o=f(a)+f(s);for(let i=t;i<r-t;i++){let t=e.children[i];d(a,e.leaf?n(t):t),o+=f(a)}for(let i=r-t-1;i>=t;i--){let t=e.children[i];d(s,e.leaf?n(t):t),o+=f(s)}return o}_condense(e){for(let t=e.length-1;t>=0;t--){let r=e.data[t];if(0===r.children.length)if(t>0){let n=e.data[t-1],a=n.children;a.splice((0,i.qh)(a,r,a.length,n.indexHint),1)}else this.clear();else p(r,this._toBBox)}}_initFormat(e){let t=["return a"," - b",";"];this._compareMinX=Function("a","b",t.join(e[0])),this._compareMinY=Function("a","b",t.join(e[1])),this._toBBox=Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let r=e;for(C.clear();r;){if(!0===r.leaf)for(let e of r.children)t((0,n.z)(e));else C.pushArray(r.children);r=C.pop()??null}}function p(e,t){u(e,0,e.children.length,t,e)}function u(e,t,r,i,n){n||=new v([]),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let a,s=t;s<r;s++)a=e.children[s],d(n,e.leaf?i(a):a);return n}function d(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 h(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function y(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(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 g(e,t){let r=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),a=Math.min(e.maxY,t.maxY);return Math.max(0,n-r)*Math.max(0,a-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 M(e,t,r,i,n){let a=[t,r];for(;a.length;){let t=a.pop(),r=a.pop();if(t-r<=i)continue;let o=r+Math.ceil((t-r)/i/2)*i;(0,s.q)(e,o,r,t,n),a.push(r,o,o,t)}}const I=new a.A,C=new a.A,_=new a.A,T=new a.A({deallocator:void 0});class A{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class E extends A{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class v extends E{constructor(e){super(),this.children=e,this.leaf=!0}}class S extends E{constructor(e){super(),this.children=e,this.leaf=!1}}},69397(e,t,r){r.d(t,{Qf:()=>o,Qh:()=>a,lM:()=>n});var i=r(34275);function n(e){if(!e)return 0;let t=p;for(let r in e)e.hasOwnProperty(r)&&(t+=s(e[r],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return o(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=u;for(let i=0;i<t;i++)r+=s(e[i]);return r}(e);let t=p;for(let r in e)e.hasOwnProperty(r)&&(t+=s(e[r]));return t}function s(e,t=!0){switch(typeof e){case"object":return t?a(e):p;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function o(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+d:Array.isArray(t)?l(t,16):0:0),0)}function l(e,t){return u+e.length*t}const p=32,u=16,d=145},15795(e,t,r){r.d(t,{A:()=>d});var i=r(32198),n=r(91429),a=r(58318),s=r(4146),o=r(63074),l=r(25036),p=r(98809),u=r(88625);let d=class extends((0,o.dM)((0,l.j)(s.A))){constructor(e){super(e),this.elevationInfo=null,this.graphics=new p.Y,this.screenSizePerspectiveEnabled=!0,this.type="graphics",this.internal=!1}destroy(){this.removeAll(),this.graphics.destroy()}get loaded(){return super.loaded}add(e){return this.graphics.add(e),this}addMany(e){return this.graphics.addMany(e),this}removeAll(){return this.graphics.removeAll(),this}remove(e){this.graphics.remove(e)}removeMany(e){this.graphics.removeMany(e)}graphicChanged(e){this.emit("graphic-update",e)}};(0,i.Cg)([(0,n.MZ)({type:u.A})],d.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,n.MZ)((0,a.C)(p.Y,"graphics"))],d.prototype,"graphics",void 0),(0,i.Cg)([(0,n.MZ)({type:["show","hide"]})],d.prototype,"listMode",void 0),(0,i.Cg)([(0,n.MZ)()],d.prototype,"screenSizePerspectiveEnabled",void 0),(0,i.Cg)([(0,n.MZ)({readOnly:!0})],d.prototype,"type",void 0),(0,i.Cg)([(0,n.MZ)({constructOnly:!0})],d.prototype,"internal",void 0),d=(0,i.Cg)([(0,n.$K)("esri.layers.GraphicsLayer")],d)},6518(e,t,r){r.d(t,{F:()=>o});var i=r(44208),n=r(75503),a=r(19419);const s={minX:0,minY:0,maxX:0,maxY:0};class o{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.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){let e=Array(this._idByBounds.size),t=0;this._idByBounds.forEach((r,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;let e=(0,a.Ie)();for(let 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){let 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,r){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,r)}(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){let 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()))}}},83221(e,t,r){r.d(t,{A:()=>y});var i=r(4576),n=r(49186),a=r(65529),s=r(53966),o=r(70328),l=r(19419),p=r(90708),u=r(6518),d=r(51441),h=r(37730);const c=(0,o.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new u.F,this._featuresById=new Map,this._usedMemory=0,this.events=new a.bk,this.featureAdapter=h.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;let[t,r,i,n]=this.fullBounds;return{xmin:t,ymin:r,xmax:i,ymax:n,spatialReference:(0,d.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(let t of e)this._add(t);this._emitChanged()}upsertMany(e){let 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){let t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(let t of e){let e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(let r of e){let e=this._boundsStore.get(r.objectId);e&&t((0,o.Jt)(c,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;let t=e.objectId;if(null==t)return void s.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));let r,i=this._featuresById.get(t);i?(e.displayId=i.displayId,r=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),e.geometry?.coords?.length?(r=(0,p.jQ)(r??(0,l.vt)(),e.geometry),null!=r&&this._boundsStore.set(t,r),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0):(this._boundsStore.set(t,null),this._featuresById.set(t,e))}_upsert(e){let t=e?.objectId;if(null==t)return s.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;let r=this._featuresById.get(t);if(!r)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(r)??0;let{geometry:i,attributes:a}=e;for(let e in a)r.attributes[e]=a[e];return i&&(r.geometry=i,this._boundsStore.set(t,(0,p.jQ)((0,l.vt)(),i)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(r)??0,r}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);let t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},37730(e,t,r){var i=r(43334);const n={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,r)=>new i.Om(t,e.attributes,null,e.objectId,e.displayId,e.distance,e.vertexCount),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)};r.d(t,["T",0,n])},64714(e,t,r){r.d(t,{F0:()=>o,Vx:()=>u,e2:()=>h,f:()=>c});var i=r(44208),n=r(4718),a=r(99352),s=r(93470);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.Cb:"esriGeometryPolyline"===e?s.yM:s.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function u(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let r="";t&&(r+=`this${d(t)} = null;`);for(let t in e)r+=`this${d(t)} = ${JSON.stringify(e[t])};`;let i=Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch{return()=>t?{[t]:null,...e}:{...e}}}function d(e){return l.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function h(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!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:a.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:a.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},24137(e,t,r){r.d(t,{P:()=>C});var i=r(32198),n=r(69622),a=r(49186),s=r(53966),o=r(91869),l=r(17676),p=r(39516),u=r(91429),d=r(5443),h=r(39829),c=r(99917),y=r(21325),f=r(15375);const m=(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`${m(e.left,t)} ${e.operator} ${m(e.right,t)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let r="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)r+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return t.unsupportedOperationFound=!0,"";r+=`lower(n.${e.left.column})`}if(r+=" 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)),r+=`'${t.toLowerCase()}')`}return r}return t.unsupportedOperationFound=!0,""};var g=r(69860),b=r(99916),w=r(53902),M=r(42538),I=r(97552);let C=class extends n.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;let t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach(r=>{r.name&&(t.set(r.name,"entity"),this._processingCacheUpdatesLookup.set(r.name,[]),(!e.inclusionModeDefinition||e.inclusionModeDefinition?.generateAllSublayers)&&this.entityTypeNames.add(r.name),r.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.knowledgeGraph.dataModel.relationshipTypes?.forEach(r=>{r.name&&(t.set(r.name,"relationship"),this._processingCacheUpdatesLookup.set(r.name,[]),(!e.inclusionModeDefinition||e.inclusionModeDefinition?.generateAllSublayers)&&this.relationshipTypeNames.add(r.name),r.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.inclusionModeDefinition?.namedTypeDefinitions.forEach((r,i)=>{if("entity"===t.get(i))this.entityTypeNames.add(i);else{if("relationship"!==t.get(i))return s.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)}let n=new Map;r.members?.forEach(e=>{(0,o.tE)(this.memberIdTypeLookup,e.id,()=>new Set).add(i)}),this.sublayerCaches.set(i,n)})}addToLayer(e){e.forEach(({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new a.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)){let r=this.inclusionModeDefinition.namedTypeDefinitions.get(e);r.members||=new Map,r.members.set(t,{id:t}),(0,o.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}}else{let r=new Map;r.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:r}),(0,o.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}})}getById(e){return g.A.getInstance().readFromStoreById(e)}async getData(e,t,r,i){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return{features:[],cypherTranslationApplied:!1};let n;if(n=e||new I.A({where:"1=1",outFields:["*"]}),"link-chart"===r.type){let e=r,i=this._processingCacheUpdatesLookup.get(t.objectType.name??""),a=n.outFields;a&&1===a.length&&a[0]===f.dr&&"1=1"===n.where||await Promise.all(i??[]);let s=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],o=[];return s.forEach(r=>{if(this.relationshipTypeNames.has(t.objectType.name)){r.geometry=e.relationshipLinkChartDiagramLookup.get(r.attributes[t.objectIdField]);let i=this.memberIdTypeLookup.get(r.attributes[f.Cz]),n=this.memberIdTypeLookup.get(r.attributes[f.KQ]),a=this._isEndEntitySpatial(i,r,f.Cz),s=this._isEndEntitySpatial(n,r,f.KQ);r.attributes[f.BL]=Number(a&&s)}else{r.geometry=e.entityLinkChartDiagramLookup.get(r.attributes[t.objectIdField]);let i=this.geographicLookup.get(t.objectType.name);i&&r.attributes[i.name]?r.attributes[f.BL]=1:r.attributes[f.BL]=0}r.attributes[f.T1]=r.geometry,o.push(r)}),{features:o,cypherTranslationApplied:!1}}return this.retrieveDataFromService(n,t,r,i)}async getConnectedRecordIds(e,t,r){let i=[],n="",a=this._getNamedTypeIdMapFromNodeIds(e);if(t&&0!==t?.length){for(let e of t)n=n+e+"|";n=n.slice(0,-1)}let s={},o=[];for(let[e,r]of a){let i=`${e}_ids`;s[i]=r,t&&0!==t?.length?o.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r:${n}]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`):o.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(!o.length)return i;let l=o.join(" UNION "),p=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new M.A({openCypherQuery:l,bindParameters:s}),{signal:r?.signal})).resultRowsStream.getReader();for(;;){let{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){let r=t[e];i.push({id:r[0],typeName:r[1]}),i.push({id:r[2],typeName:r[3]})}}return i}async getRelationshipsBetweenNodes(e,t,r){let i=this._getNamedTypeIdMapFromNodeIds(e);if(0===i.size)return[];let n={relationshipExclusionIds:t,possibleConnectionEntityIds:e},a=[];for(let[e,t]of i.entries()){let r=`${e}_ids`;n[r]=t,a.push(`MATCH (n:${e}) WHERE id(n) IN $${r} WITH n MATCH (n)-[r]->(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}let s=a.join(" UNION "),o=[],l=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new M.A({openCypherQuery:s,bindParameters:n}),{signal:r?.signal})).resultRowsStream.getReader();for(;;){let{done:e,value:t}=await l.read();if(e)break;for(let e=0;e<t.length;e++){let r=t[e];o.push({id:r[0],typeName:r[1]})}}return o}async getRelationshipsFromNodes(e,t,r,i){let n=this._getNamedTypeIdMapFromNodeIds(e);if(0===n.size||0===t.length)return[];let a={relationshipExclusionIds:r,possibleConnectionEntityIds:t},s=[];for(let[e,t]of n.entries()){let r=`${e}_ids`;a[r]=t,s.push(`MATCH (n:${e}) WHERE id(n) IN $${r} WITH n MATCH (n)-[r]-(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}let o=s.join(" UNION "),l=new Map,p=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new M.A({openCypherQuery:o,bindParameters:a}),{signal:i?.signal})).resultRowsStream.getReader();for(;;){let{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){let r=t[e],i=l.get(r[1]);i||(i=new Set,l.set(r[1],i)),i.add(r[0])}}let u=[];for(let[e,t]of l)for(let r of t)u.push({id:r,typeName:e});return u}async refreshCacheContent(e,t,r,i=!0,n){let s=g.A.getInstance(),p=[],u=new Map,d=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,e)}),this.knowledgeGraph.dataModel.relationshipTypes?.forEach(e=>{e.name&&d.set(e.name,e)}),e||this.inclusionModeDefinition?e?e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(let t of this.memberIdTypeLookup.get(e))u.has(t)?u.get(t)?.push(e):u.set(t,[e])}):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{e.useAllData?u.set(t,null):e.members&&e.members.forEach(e=>{u.has(t)&&null!==u.get(t)?u.get(t)?.push(e.id):u.set(t,[e.id])})}):(this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&u.set(e.name,null)}),this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&u.set(e.name,null)}));for(let[e,l]of u){let u=new Set(l),h=new Promise((p,h)=>{(async()=>{let p,h=new Set,c=[],y="",m=!1;if(t||d.get(e)?.properties?.forEach(e=>{e.name&&h.add(e.name)}),r&&this.geographicLookup.has(e)){let t=this.geographicLookup.get(e)?.name;t&&h.add(t)}if(this.entityTypeNames.has(e))y=`MATCH (n:${e}) ${l?"WHERE id(n) IN $ids ":""}return ID(n)`,h.forEach(e=>{y+=`, n.${e}`,c.push(e)});else{if(!this.relationshipTypeNames.has(e))throw new a.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))`,h.forEach(e=>{y+=`, n.${e}`,c.push(e)})}p=l?new M.A({openCypherQuery:y,bindParameters:{ids:l}}):new M.A({openCypherQuery:y});let g=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,p,{signal:n?.signal})).resultRowsStream.getReader();for(;;){let{done:t,value:r}=await g.read();if(t)break;let n=[];for(let e=0;e<r.length;e++){let t=r[e],i=0,a=0,s={properties:{}};for(s.id=t[i],i++,a++,m&&(s.originId=t[i],i++,a++,s.destinationId=t[i],i++,a++,(0,o.tE)(this.nodeConnectionsLookup,s.originId,()=>new Set).add(s.id),(0,o.tE)(this.nodeConnectionsLookup,s.destinationId,()=>new Set).add(s.id),(0,o.tE)(this.relationshipConnectionsLookup,s.id,()=>[s.originId,s.destinationId]));i<t.length;i++)s.properties[c[i-a]]=t[i];u.delete(s.id),n.push(s)}let a=s.writeToStore(n,f.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);let l=this.sublayerCaches.get(e);a.forEach(t=>{l?.set(t.attributes[f.dr],t),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[f.dr])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[f.dr],{id:t.attributes[f.dr]}),(0,o.tE)(this.memberIdTypeLookup,t.attributes[f.dr],()=>new Set).add(e))})}let b=this.inclusionModeDefinition?.namedTypeDefinitions.get(e);if(b)for(let e of u)b.members?.delete(e)})().then(()=>{p(null)}).catch(e=>{"AbortError"===e.name?p(null):h(e)})});p.push(h),this._processingCacheUpdatesLookup.get(e)?.push(h)}if(await Promise.all(p),n?.signal?.aborted)throw(0,l.NK)()}removeFromLayer(e){let t=new Set,r=new Set(e.map(e=>e.id));for(let r of e)t.add(r.typeName),1===this.memberIdTypeLookup.get(r.id)?.size?this.memberIdTypeLookup.delete(r.id):this.memberIdTypeLookup.get(r.id)?.delete(r.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach((e,t)=>{t===r.typeName&&e.members?.has(r.id)&&e.members.delete(r.id)});t.forEach(e=>{this.sublayerCaches.get(e)?.forEach((t,i)=>{r.has(i)&&this.sublayerCaches.get(e)?.delete(i)})})}async retrieveDataFromService(e,t,r,i){let n,o=g.A.getInstance(),l=new Set,u=[],I="",C=[],_=!1,T="relationship"===t.graphType,A=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,E=r.sublayerIdsCache.get(t.objectType.name),v=!A&&E?Array.from(E).sort():null,S={systemOidFieldName:f.dr,supportedSqlTypes:new Set(["column-reference","string","number","binary-expression"]),supportedSqlOperators:new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]),unsupportedOperationFound:!1};if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(v=e.objectIds);else if(null!=e.objectIds&&v&&v.length>0){let t=e.objectIds;e.objectIds=v.filter(e=>t.includes(e))}else if(null!=e.objectIds)v=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=[],{features:[],cypherTranslationApplied:_};e.objectIds=v}if(null!=e.outFields){let r=e.outFields;r.includes("*")?t.fields.forEach(e=>{l.add(e.name)}):r.forEach(e=>{e!==f.dr&&e!==t.geometryFieldName&&l.add(e)})}if(null!=e.geometry){let i,s=e.geometry,o=r.dataManager.knowledgeGraph.serviceDefinition,f=o?.spatialReference,m=o?.serviceCapabilities?.geometryCapabilities,g=m?.geometryMaxBoundingRectangleSizeX,w=m?.geometryMaxBoundingRectangleSizeY;if("point"===s.type){let e=s;e.spatialReference?.isWGS84||(await(0,c.initializeProjection)(e.spatialReference,y.KK),e=(0,c.project)(e,y.KK)),i=new d.A({spatialReference:y.KK,xmin:e.x-1e-4,ymin:e.y-1e-4,xmax:e.x+1e-4,ymax:e.y+1e-4})}else s?.extent?.spatialReference&&!s.spatialReference?.isWGS84?(await(0,c.initializeProjection)(s.extent.spatialReference,y.KK),i=(0,c.project)(s.extent,y.KK)):i=s.extent;if(g&&w&&f){if(4326!==f.wkid){let e=new d.A({spatialReference:f,xmax:g,ymax:w}),t=(0,c.project)(e,y.KK);g=t.xmax,w=t.ymax}if(i.xmax-i.xmin>g)throw new a.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${g}° latitude, limit exceeded`);if(i.ymax-i.ymin>w)throw new a.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${w}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){let r=await(0,p.GP)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach(e=>{r.fieldNames.includes(e.name)&&l.add(e.name)})}I=T?`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&&l.add(t.geometryFieldName),l.forEach(e=>{I+=`, n.${e}`,u.push(e)}),n=new M.A({openCypherQuery:I,bindParameters:{param_filter_geom:new h.A({rings:(0,b.Wq)(i)})}})}else{let r="";if(null!=e.where&&"1=1"!==e.where){let i=await(0,p.GP)(e.where,t.fieldsIndex);t.fields.forEach(e=>{i.fieldNames.includes(e.name)&&l.add(e.name)}),r=m(i.parseTree,S),S.unsupportedOperationFound&&(r="")}let i="";i=T?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let a=!1;v&&(a=!0,i+=" WHERE ID(n) IN $ids"),r&&(i+=a?" AND":" WHERE",i+=` ${r}`),i+=" return ID(n)",T&&(i+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&l.add(t.geometryFieldName),l.forEach(e=>{i+=`, n.${e}`,u.push(e)}),S.unsupportedOperationFound||(i=((e,t)=>{let r=e;return t.orderByFields?.length&&(r=function(e,t){let r=e.trimEnd();if(/\border\s+by\b/i.test(r))return s.A.getLogger("cypherUtils").warn("Query already contains an ORDER BY clause. Skipping addition of new ORDER BY."),e;let i=t.map(e=>e.trim()).filter(e=>!!e).map(e=>{let[t,r]=e.split(/\s+/);return t?`${t===f.dr?"ID(n)":`n.${t}`} ${"DESC"===r?.toUpperCase()?"DESC":"ASC"}`:null}).filter(e=>!!e);return i.length?`${r} ORDER BY ${i.join(", ")}`:e}(r,t.orderByFields)),null!=t.start&&(r=function(e,t){let r=e.trimEnd();return/\bskip\s+(\$\w+|\d+)\b/i.test(r)?(s.A.getLogger("cypherUtils").warn("Query already contains a SKIP clause. Skipping addition of new SKIP."),e):`${r} SKIP ${t}`}(r,t.start)),null!=t.num&&(r=function(e,t){let r=e.trimEnd();return/\blimit\s+(\$\w+|\d+)\b/i.test(r)?(s.A.getLogger("cypherUtils").warn("Query already contains a LIMIT clause. Skipping addition of new LIMIT."),e):`${r} LIMIT ${t}`}(r,t.num)),r})(i,e),_=!0),n=v?new M.A({openCypherQuery:i,bindParameters:{ids:v}}):new M.A({openCypherQuery:i})}let x=(await(0,w.executeQueryStreaming)(r.dataManager.knowledgeGraph,n,i)).resultRowsStream.getReader();for(;;){let{done:e,value:i}=await x.read();if(e)break;let n=[];for(let e=0;e<i.length;e++){let t=i[e],r=0,a=0,s={properties:{}};for(s.id=t[r],r++,a++,T&&(s.originId=t[r],r++,a++,s.destinationId=t[r],r++,a++);r<t.length;r++)s.properties[u[r-a]]=t[r];n.push(s)}C=C.concat(o.writeToStore(n,f.dr,r.dataManager.geographicLookup.get(t.objectType.name)?.name))}return{features:C,cypherTranslationApplied:_}}_isEndEntitySpatial(e,t,r){for(let i of e??[])if(this.entityTypeNames.has(i)){let e=this.geographicLookup.get(i),n=e&&this.sublayerCaches.get(i)?.get(t.attributes[r]);if(e&&n?.attributes[e.name])return!0}return!1}_getNamedTypeIdMapFromNodeIds(e){let t=new Map;return e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(let r of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(r))return;t.has(r)?t.get(r)?.push(e):t.set(r,[e])}}),t}};(0,i.Cg)([(0,u.MZ)()],C.prototype,"knowledgeGraph",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"inclusionModeDefinition",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"entityTypeNames",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"relationshipTypeNames",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"geographicLookup",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"sublayerCaches",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"nodeConnectionsLookup",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"relationshipConnectionsLookup",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"memberIdTypeLookup",void 0),C=(0,i.Cg)([(0,u.$K)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],C)},62796(e,t,r){r.d(t,{A:()=>me});var i=r(32198),n=r(37838),a=r(49186),s=r(4718),o=r(53966),l=r(25728),p=r(91429),u=(r(29953),r(78247)),d=r(5443),h=r(86738),c=r(39829),y=r(82799),f=r(99917),m=r(16930),g=r(21325),b=r(50498),w=r(41910),M=r(55156),I=r(60950),C=r(89808),_=r(99959);const T=Symbol("isKnowledgeGraphGraphicOriginSymbol");var A;class E extends _.A{get[(A=T,I.ym)](){return this.sublayer}get[M.e](){return this.sublayer}get[C.Q](){return this.sublayer}get[w.e7](){return this.sublayer}constructor(e,t){super(),this[A]=!0,this.type="knowledge-graph",this.layer=e,this.sublayer=t}get id(){return this.layer.id}}const v=Symbol("isLinkChartGraphicOriginSymbol");var S;class x extends _.A{get[(S=v,I.ym)](){return this.sublayer}get[M.e](){return this.sublayer}get[C.Q](){return this.sublayer}get[w.e7](){return this.sublayer}constructor(e,t){super(),this[S]=!0,this.type="link-chart",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var k=r(4146),L=r(83221),N=r(75752),R=r(64714),O=r(15375);const F=(0,r(17036).p)(),D=e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,i.Cg)([(0,p.MZ)(F.fields)],r.prototype,"fields",void 0),(0,i.Cg)([(0,p.MZ)(F.fieldsIndex)],r.prototype,"fieldsIndex",void 0),r=(0,i.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],r),r};var P=r(40736),j=r(63074),B=r(6455),G=r(87718),$=r(56658),Z=r(32756),U=r(54310),q=r(25036),Q=r(82935),z=r(10873),Y=r(20569),H=r(29005),W=r(20437),K=r(30524),X=r(46499),V=r(39383),J=r(96184),ee=r(96576),te=r(65494),re=r(41214),ie=r(53902),ne=r(22671),ae=r(97552),se=r(30291),oe=r(88625),le=r(37531),pe=r(61322),ue=r(43937);function de(e){if(!e.json)return e;e.json.write=he(e.json.write);let t,r=e.json.origins;if(!r)return e;for(t in r){let e=r[t];e&&(e.write=he(e.write))}return e}function he(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){let{target:t,writer:r,overridePolicy:i,...n}=e;return function(e,t){let r=ye.call(this,e,t);return r.enabled?{...n,...r}:r}}(e)),e):!0===e?ce():e}function ce(){return{overridePolicy:ye}}function ye(e,t){let r=!!this.geometryType,i={enabled:r};return r&&(i={...i,...fe.call(this,e,t)}),i}function fe(e,t){return{ignoreOrigin:this.originIdOf(t)>0}}let me=class extends(D((0,B.FJ)((0,$.J)((0,G.F)((0,j.dM)((0,Z.fY)((0,Q.e)((0,q.j)((0,U.J)((0,l.M)(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=O.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(()=>{let e=new MessageChannel;return new pe.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{let r=ae.A.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get capabilities(){return this.parent?this.parent.sublayerCapabilities:(0,P.hZ)(null)}get isTable(){return"link-chart"!==this.parentCompositeLayer?.type&&null==this.geometryFieldName}get defaultPopupTemplate(){return this.createPopupTemplate()}get editingEnabled(){return this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get effectiveCapabilities(){let e=(0,s.o8)(this.capabilities),{operations:t,editing:r}=e;return this.userHasUpdateItemPrivileges&&(t.supportsAdd=t.supportsDelete=t.supportsEditing=t.supportsQuery=t.supportsUpdate=r.supportsDeleteByOthers=r.supportsGeometryUpdate=r.supportsUpdateByOthers=!0),this.userHasFullEditingPrivileges&&t.supportsEditing&&(t.supportsAdd=t.supportsDelete=t.supportsUpdate=r.supportsGeometryUpdate=!0),e}get effectiveEditingEnabled(){return this.userHasUpdateItemPrivileges||this.editingEnabled}set featureReduction(e){let t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){let e=[],t=new Map;for(let e of this.parent?.knowledgeGraph.dataModel.domains??[])t.set(e.name,e);return this.objectType?.properties?.forEach(r=>{let i="esriFieldTypeOID"===r.fieldType?"esriFieldTypeInteger":r.fieldType,n=W.A.fromJSON({name:r.name,type:i,alias:r.alias,defaultValue:r.defaultValue,editable:r.editable,nullable:r.nullable,domain:r.domain&&t.has(r.domain)?t.get(r.domain).toJSON():void 0});e.push(n)}),e.push(W.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),W.A.fromJSON({name:O.M1,type:"esriFieldTypeInteger",alias:O.M1,editable:!1}),W.A.fromJSON({name:O.BL,type:"esriFieldTypeInteger",alias:O.BL,editable:!1})),e}get formTemplate(){return this._isOverridden("formTemplate")?this._get("formTemplate"):(0,P.dD)(this)}set formTemplate(e){this._overrideIfSome("formTemplate",e)}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";let e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name)?.geometryType;return e&&"esriGeometryNull"!==e?b.gy.fromJSON(e):null}get geometryFieldName(){return"link-chart"===this.parentCompositeLayer?.type?O.T1:this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name)?.name??null}get graphicOrigin(){if(!this.parent)return null;switch(this.parent.type){case"knowledge-graph":return new E(this.parent,this);case"link-chart":return new x(this.parent,this)}}get graphTypeName(){return this.objectType?.name}set graphTypeName(e){this._set("graphTypeName",e)}get hasM(){let e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name)?.name;return(e?this.objectType?.properties?.[e]:null)?.hasM??!1}get hasZ(){let e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name)?.name;return(e?this.objectType?.properties?.[e]:null)?.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;let e=this.objectType.properties?(0,P.MY)(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?(0,P.iW)(this.graphType,this.graphTypeName,e):(0,P.e$)(this.graphTypeName,this.geometryType,e)}set renderer(e){(0,K.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");let e=this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel,t=[...e?.entityTypes??[],...e?.relationshipTypes??[]].map(e=>e.name).indexOf(this.graphTypeName),r=(0,P.Td)(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new ee.A({type:"simple",symbol:(0,P.UT)(r)});let e=(0,te.r)((0,R.F0)(b.gy.toJSON("point")).renderer);return(0,le.dt)(e.symbol,r),e}let i=(0,te.r)((0,R.F0)(b.gy.toJSON(this.geometryType)).renderer);return(0,le.dt)(i.symbol,r),i}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??m.A.WGS84}get templates(){return this._isOverridden("templates")?this._get("templates"):(0,P.CP)(this)}set templates(e){this._overrideIfSome("templates",e)}set timeInfo(e){this._set("timeInfo",e)}get dateFieldsTimeZone(){return this.parentCompositeLayer?.dateFieldsTimeZone}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"}get userHasEditingPrivileges(){return!this.parent||this.parent.userHasEditingPrivileges}get userHasFullEditingPrivileges(){return!!this.parent&&this.parent.userHasFullEditingPrivileges}get userHasUpdateItemPrivileges(){return!!this.parent&&this.parent.userHasUpdateItemPrivileges}createPopupTemplate(e){return(0,se.tn)(this,e)}createQuery(){return new ae.A({where:"1=1",outFields:["*"]})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return this.fields.find(t=>t.name===e)?.domain||null}async queryFeatures(e,t){await this.load();let{resolvedQuery:r,queryEngine:i,cypherTranslationApplied:n}=await this._setupQueryObjects(e),a=this.graphicOrigin,s=ne.A.fromJSON(await i.executeQuery(this._createQueryEngineQueryJSON(r,n),t?.signal));return s.features.forEach(e=>{e.sourceLayer=this,e.origin=a}),s}async queryFeaturesJSON(e,t){await this.load();let{resolvedQuery:r,queryEngine:i,cypherTranslationApplied:n}=await this._setupQueryObjects(e);return await i.executeQuery(this._createQueryEngineQueryJSON(r,n),t?.signal)}async queryFeatureCount(e,t){await this.load();let{resolvedQuery:r,queryEngine:i,cypherTranslationApplied:n}=await this._setupQueryObjects(e);return i.executeQueryForCount(this._createQueryEngineQueryJSON(r,n),t?.signal)}async queryExtent(e={},t){await this.load();let r,i={...e,returnGeometry:!0},{resolvedQuery:n,queryEngine:a,cypherTranslationApplied:s}=await this._setupQueryObjects(i),o=await a.executeQueryForExtent(this._createQueryEngineQueryJSON(n,s),t?.signal);return r=null!=o.extent?.xmin&&null!=o.extent?.xmax&&null!=o.extent?.ymin&&null!=o.extent?.ymax?new d.A(o.extent):new d.A,{count:o.count,extent:r}}async queryObjectIds(e,t){await this.load();let r,i=ae.A.from(e);if(this.parentCompositeLayer){if("link-chart"!==this.parentCompositeLayer.type||!this._cachedQueryEngine){let{features:e,cypherTranslationApplied:n}=await this.parentCompositeLayer.dataManager.getData(i,this,this.parentCompositeLayer,t);return r=this.loadQueryEngine(e),await r.executeQueryForIds(this._createQueryEngineQueryJSON(i,n),t?.signal)}r=this._cachedQueryEngine}else o.A.getLogger(this).warn("Attempting to query for object IDs with no features failed because the parent composite layer is missing or not yet loaded."),r=this.loadQueryEngine([]);return await r.executeQueryForIds(this._createQueryEngineQueryJSON(i,!1),t?.signal)}async applyEdits(e){if(!this.parentCompositeLayer?.dataManager.knowledgeGraph)throw new a.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");let t=await(0,P.O9)(e,this,this.parentCompositeLayer);t.options={cascadeDelete:!0,cascadeProvenanceDelete:!!this.parent?.knowledgeGraph.serviceDefinition.supportsProvenance||void 0};let r=await(0,ie.executeApplyEdits)(this.parentCompositeLayer.dataManager.knowledgeGraph,t),i=(0,P.Gz)(r,this.graphTypeName),n={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",n),this.emit("apply-edits",{result:Promise.resolve(n)}),"link-chart"===this.parentCompositeLayer.type&&await this.parentCompositeLayer.refreshLinkChartCache([...n.addedFeatures.map(e=>e.globalId),...n.updatedFeatures.map(e=>e.globalId),...n.deletedFeatures.map(e=>e.globalId)]),i}loadQueryEngine(e){let t=new L.A({geometryType:b.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new N.do({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:b.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 r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){if(!this.parentCompositeLayer)return o.A.getLogger(this).warn("Attempting to refresh the cached query engine with no features failed because the parent composite layer is missing or not yet loaded."),void(this._cachedQueryEngine=this.loadQueryEngine([]));let{features:e}=await this.parentCompositeLayer.dataManager.getData(new ae.A({where:"1=1",outFields:[O.dr]}),this,this.parentCompositeLayer);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then(()=>(0,K.sv)(this.timeInfo,this.fieldsIndex))),Promise.resolve(this)}_createQueryEngineQueryJSON(e,t){let r=e.toJSON();return t&&delete r.resultOffset,r}async _setupQueryObjects(e,t){let r=ae.A.from(e),i=r.geometry;if(i&&!i.spatialReference?.isWGS84&&(await(0,f.initializeProjection)(i.spatialReference,g.KK),r.geometry=i instanceof c.A||i instanceof y.A||i instanceof h.A?(0,f.project)(i,g.KK):(0,f.project)(i.extent,g.KK)),!this.parentCompositeLayer)return o.A.getLogger(this).warn("Attempting to execute a query with no features failed because the parent composite layer is missing or not yet loaded."),{resolvedQuery:r,queryEngine:this.loadQueryEngine([]),cypherTranslationApplied:!1};if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:r,queryEngine:this._cachedQueryEngine,cypherTranslationApplied:!1};let{features:n,cypherTranslationApplied:a}=await this.parentCompositeLayer.dataManager.getData(r,this,this.parentCompositeLayer,t);return{resolvedQuery:r,queryEngine:this.loadQueryEngine(n),cypherTranslationApplied:a}}};(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(j.sU)))],me.prototype,"blendMode",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"capabilities",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"isTable",null),(0,i.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{write:!1}},write:ce()}})],me.prototype,"charts",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],me.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(B.Dp)))],me.prototype,"displayFilterEnabled",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(B.KV)))],me.prototype,"displayFilterInfo",void 0),(0,i.Cg)([(0,p.MZ)()],me.prototype,"editingEnabled",null),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(j.LF)))],me.prototype,"effect",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"effectiveCapabilities",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,p.MZ)({type:oe.A})],me.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(G.Y)))],me.prototype,"featureEffect",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(Y.d)))],me.prototype,"featureReduction",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"fields",null),(0,i.Cg)([(0,p.MZ)({type:u.A})],me.prototype,"formTemplate",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"geometryType",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"geometryFieldName",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"graphicOrigin",null),(0,i.Cg)([(0,p.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],me.prototype,"graphType",void 0),(0,i.Cg)([(0,p.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],me.prototype,"graphTypeName",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"hasM",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"hasZ",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],me.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}}}}})],me.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,p.MZ)({type:[X.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:function(e,t,r){let i=[["ESRI__AGGREGATION_COUNT",O.M1],["ESRI__ORIGIN_ID",O.Cz],["ESRI__DESTINATION_ID",O.KQ],["ESRI__LAYOUT_GEOMETRY",O.T1]];try{for(let t of e)for(let[e,r]of i)t.labelExpression=t.labelExpression?.replaceAll(e,r),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,r))}catch(e){o.A.getLogger(this).warn("Error updating labelingInfo",e)}return V.w.call(this,e,t,r)},write:ce()}})],me.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}}})],me.prototype,"layerType",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(z.fV)))],me.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(z.hG)))],me.prototype,"maxScale",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(z.hn)))],me.prototype,"minScale",void 0),(0,i.Cg)([(0,p.MZ)()],me.prototype,"objectIdField",void 0),(0,i.Cg)([(0,p.MZ)()],me.prototype,"objectType",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(z.ke)))],me.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(Z.ne)))],me.prototype,"orderBy",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1})],me.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)()],me.prototype,"parentCompositeLayer",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(z.M6)))],me.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:n.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],me.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,p.MZ)({type:Number,json:{write:{overridePolicy:fe}}})],me.prototype,"refreshInterval",void 0),(0,i.Cg)([(0,p.MZ)({types:re.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:ce()}})],me.prototype,"renderer",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"source",void 0),(0,i.Cg)([(0,p.MZ)()],me.prototype,"spatialReference",null),(0,i.Cg)([(0,p.MZ)({type:H.A})],me.prototype,"templates",null),(0,i.Cg)([(0,p.MZ)({type:J.A,json:{name:"layerDefinition.timeInfo",write:{overridePolicy:fe},origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:fe}},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:fe}}}}})],me.prototype,"timeInfo",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"dateFieldsTimeZone",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],me.prototype,"title",null),(0,i.Cg)([(0,ue.K)("title")],me.prototype,"writeTitle",null),(0,i.Cg)([(0,p.MZ)({json:{read:!1}})],me.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(Q.B)))],me.prototype,"useViewTime",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"userHasEditingPrivileges",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"userHasFullEditingPrivileges",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"userHasUpdateItemPrivileges",null),(0,i.Cg)([(0,p.MZ)({type:Boolean,json:{name:"visibility",write:ce()}})],me.prototype,"visible",void 0),me=(0,i.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],me)},69860(e,t,r){r.d(t,{A:()=>o});var i=r(65864),n=r(90708),a=r(43334),s=r(15375);class o{constructor(){this._featureLookup=new Map}static getInstance(){return o.instance||=new o,o.instance}static resetInstance(){o.instance&&=null}deleteFromStore(e){e.forEach(e=>{this._featureLookup.delete(e)})}readFromStoreByList(e){let t=[];return e.forEach(e=>{let r=this.readFromStoreById(e);r&&t.push(r)}),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,r){let o=[];return e.forEach(e=>{if(!e?.id)return;e.properties||=[];let l=null;r&&e.properties[r]&&(l=(0,n.Ux)(e.properties[r])),"originId"in e&&"destinationId"in e&&(e.properties[s.Cz]=e.originId,e.properties[s.KQ]=e.destinationId),e.properties[t]=e.id;let p=e.properties;if(e.id){let t=this._featureLookup.get(e.id);if(t?.attributes){p={...t.attributes,...p};let e=r&&p[r];null!=e&&(p[r]=(0,i.rS)(e)),l??=t.geometry}}let u=new a.Om(l?.clone(),p,null,e.id);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,u),o.push(u)}),o}}},15375(e,t,r){r.d(t,["BL",0,"LC.ESRI__IsSpatial","Cz",0,"ESRI__OriginID","KQ",0,"ESRI__DestID","M1",0,"ESRI__AggregationCount","T1",0,"ESRI__LayoutGeometry","dr",0,"ESRI__ID"])},40736(e,t,r){r.d(t,{Gz:()=>U,O9:()=>Z,hZ:()=>$,CP:()=>Q,dD:()=>q,UT:()=>F,MY:()=>D,Td:()=>O,iW:()=>P,e$:()=>j,$L:()=>z,N1:()=>B,qN:()=>N});var i=r(68197),n=r(92602),a=r(70333),s=(r(49186),r(91869)),o=r(17676),l=r(78247),p=r(89909),u=r(99917),d=r(16930),h=r(52039),c=r(99352),y=r(15375),f=r(29005),m=r(46499),g=r(73913),b=r(77548),w=r(80812),M=r(10407),I=r(53902),C=r(25927),_=r(32198),T=r(69622),A=r(91429);let E=class extends T.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,_.Cg)([(0,A.MZ)()],E.prototype,"entityAdds",void 0),(0,_.Cg)([(0,A.MZ)()],E.prototype,"entityUpdates",void 0),(0,_.Cg)([(0,A.MZ)()],E.prototype,"entityDeletes",void 0),(0,_.Cg)([(0,A.MZ)()],E.prototype,"relationshipAdds",void 0),(0,_.Cg)([(0,A.MZ)()],E.prototype,"relationshipUpdates",void 0),(0,_.Cg)([(0,A.MZ)()],E.prototype,"relationshipDeletes",void 0),(0,_.Cg)([(0,A.MZ)()],E.prototype,"options",void 0),E=(0,_.Cg)([(0,A.$K)("esri.rest.knowledgeGraph.GraphApplyEdits")],E);var v=r(23150),S=r(94128),x=r(40863),k=r(68249);const L=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function N(e,t,r){return(async(e,t,r)=>{if(t||=[...e.layers,...e.tables].map(e=>e.graphTypeName),0===t?.length)return;let i=new Map;for(let r of t)i.set(r,L(e,r));let n=await(0,I.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(i.values()),{requestOptions:{signal:r?.signal}});for(let t of[...e.layers,...e.tables]){let r=t.objectType.name;if(null==r)continue;let i=n.get(L(e,r));if(i){let e=JSON.parse(i);"object"==typeof e&&e&&!e.hasOwnProperty("showLabels")&&(e.showLabels=!1),t.read(e,{origin:"service"})}}})(e,t,r)}const R="#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".split(".");function O(e){return e<0||e>=R.length?new i.A("#8f8f82"):new i.A(R[e])}function F(e){let t=e.toArray();return new x.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",r=4;for(let i of e)if(i.name){if("name"===i.name.toLowerCase()){t=i.name;break}i.name.toLowerCase().includes("name")?(t=i.name,r=2):"esriFieldTypeString"===i.fieldType&&r>3&&(t=i.name,r=3)}return t}function P(e,t,r){let i={color:[80,80,80],haloColor:[255,255,255],haloSize:.7,font:{size:10,weight:"normal"}},n=new m.A({labelExpressionInfo:new g.A({expression:"ESRI__ID"===r?`${t}`:`$feature.${r}`}),labelPlacement:"above-center",symbol:new k.A(i)}),a=new m.A({labelExpressionInfo:new g.A({expression:`'${t}' + IIf($feature.ESRI__AggregationCount>1, ' (' + $feature.ESRI__AggregationCount + ')', '')`}),labelPlacement:"center-along",labelPosition:"parallel",repeatLabel:!1,symbol:new k.A({...i,yoffset:"12px"})});return"entity"===e?[n]:[a]}function j(e,t,r){let i={color:[255,255,255],haloColor:[0,0,0],haloSize:.7,font:{size:10,weight:"bold"}},n="ESRI__ID"===r?`${e}`:`$feature.${r}`;return"point"===t?[new m.A({labelExpressionInfo:new g.A({expression:n}),labelPlacement:"above-center",symbol:new k.A(i)})]:"polyline"===t?[new m.A({labelExpressionInfo:new g.A({expression:n}),labelPlacement:"center-along",repeatLabel:!0,symbol:new k.A(i)})]:"polygon"===t?[new m.A({labelExpressionInfo:new g.A({expression:n}),labelPlacement:"always-horizontal",symbol:new k.A(i)})]:null}async function B(e,t,r){return(async(e,t,r)=>{let i=!0,s=!1,o=!1;if(!n.A.userPrivilegesApplied)return{edit:i,fullEdit:s,updateItem:o};let l=await(0,b.wI)(t,r);if(!l||!a.id?.getCredential(`${l}/sharing`,{...r,prompt:!1}))return{edit:i,fullEdit:s,updateItem:o};let p=new w.default({id:e,portal:{url:l}});return await p.load(r),({features:{edit:i,fullEdit:s},content:{updateItem:o}}=(0,M.It)(p)),{edit:i,fullEdit:s,updateItem:o}})(e,t,r).catch(e=>((0,o.QP)(e),{edit:!0,fullEdit:!1,updateItem:!1}))}const G={capabilities:[],allowGeometryUpdates:!1,serviceCapabilities:{geometryCapabilities:{supportsZValues:!1,supportsMValues:!1}}};function $(e){let{capabilities:t,allowGeometryUpdates:r,serviceCapabilities:{geometryCapabilities:{supportsZValues:i,supportsMValues:n}}}=e?.serviceDefinition||G,a=e?.dataModel.arcgisManaged?t:t.filter(e=>"Query"===e),s=new Set(a);return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:n,supportsTrueCurve:!1,supportsZ:i},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:s.has("Create"),supportsDelete:s.has("Delete"),supportsEditing:s.has("Editing"),supportsChangeTracking:!1,supportsQuery:s.has("Query"),supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:s.has("Update"),supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:c.F,queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:c.P,editing:{supportsGeometryUpdate:!!e?.dataModel.arcgisManaged&&r,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:s.has("Delete"),supportsUpdateByAnonymous:!1,supportsUpdateByOthers:s.has("Update"),supportsAsyncApplyEdits:!1,zDefault:void 0}}}async function Z(e,t,r){let i=new E,n=t.graphTypeName,a=t.graphType,o="knowledge-graph"===r.type?t.geometryFieldName:null,l=!!t.fieldsIndex.get(o)?.editable,p=e=>{let r={...e};for(let e of t.fields)e.editable||delete r[e.name];for(let t of Object.keys(e))t.includes("ESRI__")&&delete r[t];return r},c=async e=>{await(0,u.initializeProjection)(e.spatialReference,d.A.WGS84);let t=(0,u.project)(e,d.A.WGS84);return"point"===t.type?t.normalize():(await(0,h.el)(t))[0]};for(let t of e.addFeatures??[]){let e=p(t.attributes);(0,b.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===n&&("entity"===a?(i.entityAdds||=[],o&&t.geometry&&(e[o]=await c(t.geometry)),i.entityAdds.push(new C.A({properties:e,typeName:n}))):(i.relationshipAdds||=[],i.relationshipAdds.push(new v.A({properties:e,typeName:n}))))}for(let t of e.updateFeatures??[]){let e=t.attributes[y.dr],r=p(t.attributes);(0,b.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===n&&("entity"===a?(i.entityUpdates||=[],o&&l&&t.geometry&&(r[o]=await c(t.geometry)),i.entityUpdates.push(new C.A({id:e,properties:r,typeName:n}))):(i.relationshipUpdates||=[],i.relationshipUpdates.push(new v.A({id:e,properties:r,typeName:n}))))}let f=new Map;for(let t of e.deleteFeatures??[])if((0,S.D)(t)){let e=t,r=(0,s.tE)(f,e.sourceLayer.graphTypeName,()=>({typeName:e.sourceLayer.graphTypeName,ids:[]}));e.sourceLayer.graphTypeName===n&&r.ids.push(e.attributes[y.dr])}else t.objectId&&"string"==typeof t.objectId&&(0,s.tE)(f,n,()=>({typeName:n,ids:[]})).ids.push(t.objectId);for(let e of f.values())e.ids.length>0&&("entity"===a?(i.entityDeletes||=[],i.entityDeletes.push({typeName:e.typeName,ids:e.ids})):(i.relationshipDeletes||=[],i.relationshipDeletes.push({typeName:e.typeName,ids:e.ids})));return i}function U(e,t){let r={addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]};for(let i of e.editResults)if(i.typeName===t){for(let e of i.adds)r.addFeatureResults.push({objectId:e.id,globalId:e.id});for(let e of i.updates)r.updateFeatureResults.push({objectId:e.id,globalId:e.id});for(let e of i.deletes)r.deleteFeatureResults.push({objectId:e.id,globalId:e.id})}return r}function q(e){if(!e.objectType)return null;let t=[];for(let r of e.fields)!r.name.includes("ESRI__")&&r.editable&&"geometry"!==r.type&&t.push(new p.A({fieldName:r.name}));return new l.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 f.A({name:e.graphTypeName,drawingTool:t,prototype:{}})]}const z=e=>{let t="",r=e.split("/"),i=r.lastIndexOf("KnowledgeGraphServer");return i>0&&(t=r[i-1]),t}},99916(e,t,r){r.d(t,{Wq:()=>l,aq:()=>o}),r(52106);var i=r(49186),n=(r(86738),r(39829),r(82799),r(15795),r(69860),r(8460),r(69647)),a=r(53902),s=r(42538);async function o(e,t,r){let i=[],n=function(e,t){let r=new Map;if(t.dataModel?.relationshipTypes)for(let e of t.dataModel.relationshipTypes)e.name&&r.set(e.name,[]);for(let t of e)r.has(t.typeName)&&r.get(t.typeName)?.push(t.id);return r}(e,t),o={},l=[];for(let[e,t]of n){if(t.length<1)continue;let r=`${e}_ids`;o[r]=t,l.push(`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $${r} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===l.length)return[];let p=l.join(" UNION "),u=new s.A({openCypherQuery:p,bindParameters:o}),d=(await(0,a.executeQueryStreaming)(t,u,r?.requestOptions)).resultRowsStream.getReader();for(;;){let{done:e,value:t}=await d.read();if(e)break;for(let e of t)i.push({id:e[0],typeName:e[1]}),i.push({id:e[2],typeName:e[3]})}return i}function l(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]])}r(40863),r(94985),r(68249),r.d(t,["k5",0,e=>n.P_.get(e)??"radial-root-centric"])},82935(e,t,r){var i=r(32198),n=r(91429),a=r(30524),s=r(96184),o=r(73133),l=r(79677),p=r(10184),u=r(36005);const d={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"}}};r.d(t,["B",0,d,"e",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){let r=t.timeInfo.exportOptions;if(!r)return null;let i=r.timeOffset,n=o.j.fromJSON(r.timeOffsetUnits);return i&&n?new p.A({value:i,unit:n}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,a.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,n.MZ)({type:l.A,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,i.Cg)([(0,n.MZ)({type:p.A})],r.prototype,"timeOffset",void 0),(0,i.Cg)([(0,u.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,i.Cg)([(0,n.MZ)({value:null,type:s.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,n.MZ)(d)],r.prototype,"useViewTime",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.TemporalLayer")],r),r}])},17036(e,t,r){r.d(t,{p:()=>l});var i=r(44208),n=r(53966),a=r(20437),s=r(95466),o=r(30524);function l(){return{fields:{type:[a.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){let t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){let e=t.map(e=>`'${e.name}'`).join(", ");n.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${2**53-1} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return s.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){let e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(let t of e)this.fieldsIndex?.has(t)||n.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e});return(0,o.DB)(this.fieldsIndex,e)}}}}},8460(e,t,r){r.d(t,{$C:()=>f,Hh:()=>s,Tu:()=>c,Wg:()=>y,Xq:()=>g,i6:()=>b,pM:()=>d,vJ:()=>m});var i=r(2741);let n,a=null;function s(){return n||(n=r.e(3666).then(()=>r(3666)).then(({default:e})=>e({locateFile:e=>(0,i.s)(`esri/libs/linkchartlayout/${e}`)})).then(e=>{!function(e){a=e}(e)}),n)}const o={right:0,left:1,top:2,bottom:3},l={none:0,"start-only":1,"start-and-end":2};function p(e){let 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:o[t.timeDirection]??o.right},eventsTicksVisualization:{value:l[t.eventsTicksVisualization]??l["start-and-end"]}}}function u(e,t,r,i,n,s){let o=r.length,l=n.length,p=Float64Array.BYTES_PER_ELEMENT,u=Uint32Array.BYTES_PER_ELEMENT,d=Uint8Array.BYTES_PER_ELEMENT,h=16+o*(d+2*p)+2*u*l,c=a._malloc(h);try{let d=c+16-c%16,h=d+o*p,y=h+o*p,f=y+l*u,m=f+l*u,g=()=>[a.HEAPF64.subarray(d>>3,(d>>3)+o),a.HEAPF64.subarray(h>>3,(h>>3)+o),a.HEAPU32.subarray(y>>2,(y>>2)+l),a.HEAPU32.subarray(f>>2,(f>>2)+l),a.HEAPU8.subarray(m,m+o)],[b,w,M,I,C]=g();b.set(r),w.set(i),M.set(n),I.set(s),C.set(t);let _=e(o,m,d,h,l,y,f),T=null,A=null;if(0===_.value){let e=a.getLayoutLinksTypes(),t=a.getLayoutLinksVerticesEndIndices(),r=a.getLayoutLinksVertices(),i=a.countLayoutLinksVertices();l&&(!e||!t)||i&&!r?_.value=1:(T={types:new Uint8Array(a.HEAPU8.subarray(e,e+l)),vertexEndIndex:new Uint32Array(a.HEAPU32.subarray(t>>2,(t>>2)+l)),vertices:new Float64Array(a.HEAPF64.subarray(r>>3,(r>>3)+2*i))},A=a.getAuxiliaryGraphicElements())}let[E,v,S,x,k]=g();return r.set(E),i.set(v),n.set(S),s.set(x),t.set(k),{status:_.value,links:T,graphics:A}}finally{a._free(c),a.cleanupLayout()}}var d,h,c,y,f,m,g,b;(h=d||={}).getMinIdealEdgeLength=function(){return a.getMinIdealEdgeLength()},h.apply=function(e,t,r,i,n,s,o=2,l=1,p=-1){return u((t,r,i,n,s,u,d)=>a.applyForceDirectedLayout(e,t,r,i,n,s,u,d,o,l,p),t,r,i,n,s)},function(e){e.apply=function(e,t,r,i,n,s,o=2,l=1,p=-1){return u((t,r,i,n,s,u,d)=>a.applyCommunityLayout(e,t,r,i,n,s,u,d,o,l,p),t,r,i,n,s)}}(c||={}),function(e){e.apply=function(e,t,r,i,n,s){return u((t,r,i,n,s,o,l)=>a.applySimpleLayout(e,t,r,i,n,s,o,l),t,r,i,n,s)}}(y||={}),function(e){e.apply=function(e,t,r,i,n,s){return u((t,r,i,n,s,o,l)=>a.applyHierarchicalLayout(e,t,r,i,n,s,o,l),t,r,i,n,s)}}(f||={}),function(e){e.apply=function(e,t,r,i,n,s){return u((t,r,i,n,s,o,l)=>a.applyRadialTreeLayout(e,t,r,i,n,s,o,l),t,r,i,n,s)}}(m||={}),function(e){e.apply=function(e,t,r,i,n,s){return u((t,r,i,n,s,o,l)=>a.applySmartTreeLayout(e,t,r,i,n,s,o,l),t,r,i,n,s)}}(g||={}),function(e){e.apply=function(e,t,r,i,n,s,o,l,d,h,c,y){return u((t,r,i,o,l,u,f)=>{if(n.length!==t||s.length!==t||d.length!==l||h.length!==l)return{value:1};let m=Float64Array.BYTES_PER_ELEMENT,g=a._malloc(16+t*m),b=a._malloc(16+t*m),w=a._malloc(16+l*m),M=a._malloc(16+l*m),I=g+16-g%16,C=b+16-b%16,_=w+16-w%16,T=M+16-M%16;try{return a.HEAPF64.subarray(I>>3,(I>>3)+t).set(n),a.HEAPF64.subarray(C>>3,(C>>3)+t).set(s),a.HEAPF64.subarray(_>>3,(_>>3)+l).set(d),a.HEAPF64.subarray(T>>3,(T>>3)+l).set(h),a.applyChronologicalLayout(e,t,r,i,o,I,C,l,u,f,_,T,c,p(y))}finally{a._free(g),a._free(b),a._free(w),a._free(M)}},t,r,i,o,l)}}(b||={})},69647(e,t,r){var i=r(66552);const n=(0,i.O)()({none:"none",startAndEnd:"start-and-end",startOnly:"start-only"}),a=(0,i.O)()({absoluteValue:"absolute-value",multiplier:"multiplier"}),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"]]);r.d(t,["P_",0,s,"SJ",0,n,"lg",0,a])},54628(e,t,r){r.d(t,{lV:()=>a,zI:()=>n});var i=r(56507);async function n(e,t,r){if(!e||!t||!e.includes("/resources"))return!1;let n=t+"/resources",a=e.includes("/resources/")?e.split("/resources/")[1]:e;if(!a)return!1;let s=1;for(;-1!==s;){let e=(await(0,i.A)(n,{query:{f:"json",start:s,num:100}})).data,t=e?.resources??[];for(let e of t)if(e.resource===a)return"number"==typeof r&&e.created===r;if(null==e.nextStart||!t.length)break;s=e.nextStart}return!1}async function a(e,t){if(!e.length||!t)return new Map;let r=t+"/resources",n=1,a=new Map;for(;-1!==n;){let e=(await(0,i.A)(r,{query:{f:"json",start:n,num:100}})).data,t=e?.resources??[];for(let e of t)"number"==typeof e.created&&a.set(e.resource,e.created);if(null==e.nextStart||!t.length)break;n=e.nextStart}let s=new Map;for(let t of e){let e=t.includes("/resources/")?t.split("/resources/")[1]:t,r=a.get(e);null!=r&&s.set(t,r)}return s}r(49186),r(53966),r(17676),r(86738),r(8460)},10407(e,t,r){r.d(t,{It:()=>c,LG:()=>s,OM:()=>p,Sm:()=>u,Y:()=>o,bK:()=>l,sQ:()=>d});var i=r(99917),n=r(16930),a=r(28735);function s(e,t){if(!o(e,t)){let r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function o(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return o(e,h.HOSTED_SERVICE)}function p(e,t){let r=e.typeKeywords;if(r){let e=r.indexOf(t);e>-1&&r.splice(e,1)}}function u(e,t,r){r?s(e,t):p(e,t)}async function d(e){let t,r=e.clone().normalize();if(r.length>1)for(let e of r)t?e.width>t.width&&(t=e):t=e;else t=r[0];return async function(e){let t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,a.ci)(e);let r=n.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(t)}const h={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function c(e){let{portal:t,isOrgItem:r,itemControl:i}=e,n=t.user?.privileges,a=!n||n.includes("features:user:edit"),s=!!r&&!!n?.includes("features:user:fullEdit"),o="update"===i||"admin"===i;return o?s=a=!0:s&&(a=!0),{features:{edit:a,fullEdit:s},content:{updateItem:o}}}r.d(t,["mm",0,h])},25927(e,t,r){r.d(t,{A:()=>o});var i=r(32198),n=r(91429),a=r(86738),s=r(54238);let o=class extends s.A{constructor(e){super(e),this.layoutGeometry=null}};(0,i.Cg)([(0,n.MZ)({type:a.A,json:{write:!0}})],o.prototype,"layoutGeometry",void 0),o=(0,i.Cg)([(0,n.$K)("esri.rest.knowledgeGraph.Entity")],o)},54238(e,t,r){r.d(t,{A:()=>s});var i=r(32198),n=r(91429),a=r(77901);let s=class extends a.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],s.prototype,"typeName",void 0),(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],s.prototype,"id",void 0),s=(0,i.Cg)([(0,n.$K)("esri.rest.knowledgeGraph.GraphNamedObject")],s)},77901(e,t,r){r.d(t,{A:()=>s});var i=r(32198),n=r(25482),a=r(91429);let s=class extends n.o{constructor(e){super(e),this.properties={}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],s.prototype,"properties",void 0),s=(0,i.Cg)([(0,a.$K)("esri.rest.knowledgeGraph.GraphObject")],s)},42538(e,t,r){r.d(t,{A:()=>l});var i=r(32198),n=r(91429),a=r(16930),s=r(69622);let o=class extends s.A{constructor(e){super(e),this.openCypherQuery=""}};(0,i.Cg)([(0,n.MZ)()],o.prototype,"openCypherQuery",void 0),o=(0,i.Cg)([(0,n.$K)("esri.rest.knowledgeGraph.GraphQuery")],o);let l=class extends o{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,i.Cg)([(0,n.MZ)()],l.prototype,"bindParameters",void 0),(0,i.Cg)([(0,n.MZ)()],l.prototype,"bindGeometryQuantizationParameters",void 0),(0,i.Cg)([(0,n.MZ)()],l.prototype,"outputQuantizationParameters",void 0),(0,i.Cg)([(0,n.MZ)({type:a.A})],l.prototype,"outputSpatialReference",void 0),(0,i.Cg)([(0,n.MZ)()],l.prototype,"provenanceBehavior",void 0),l=(0,i.Cg)([(0,n.$K)("esri.rest.knowledgeGraph.GraphQueryStreaming")],l)},40662(e,t,r){r.d(t,{A:()=>s});var i=r(32198),n=r(91429),a=r(77901);let s=class extends a.A{constructor(e){super(e)}};s=(0,i.Cg)([(0,n.$K)("esri.rest.knowledgeGraph.ObjectValue")],s)},42095(e,t,r){r.d(t,{A:()=>o});var i=r(32198),n=r(25482),a=r(91429),s=r(77901);let o=class extends n.o{constructor(e){super(e),this.path=[]}};(0,i.Cg)([(0,a.MZ)({type:[s.A],json:{write:!0}})],o.prototype,"path",void 0),o=(0,i.Cg)([(0,a.$K)("esri.rest.knowledgeGraph.Path")],o)},23150(e,t,r){r.d(t,{A:()=>o});var i=r(32198),n=r(91429),a=r(82799),s=r(54238);let o=class extends s.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],o.prototype,"originId",void 0),(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],o.prototype,"destinationId",void 0),(0,i.Cg)([(0,n.MZ)({type:a.A,json:{write:!0}})],o.prototype,"layoutGeometry",void 0),o=(0,i.Cg)([(0,n.$K)("esri.rest.knowledgeGraph.Relationship")],o)},2272(e,t,r){r.d(t,{Dl:()=>p,gf:()=>d,jV:()=>l,lF:()=>u});var i=r(92602),n=r(70333),a=r(4718),s=r(84952),o=r(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function p(e){return"string"==typeof e?(0,s.An)(e):(0,a.o8)(e)}function u(e,t,r){let i={};for(let n in e){if("declaredClass"===n)continue;let a=e[n];if(null!=a&&"function"!=typeof a)if(Array.isArray(a))i[n]=a.map(e=>u(e));else if("object"==typeof a)if(a.toJSON){let e=a.toJSON(r?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?a:JSON.stringify(a);else i[n]=a}return i}async function d(e,t,a){return function(e,t){return e?t&&(0,o.Qc)(e)?t:(0,o.getApiKey)(e)??n.id?.findCredential(e)?.token:null}(e,t)||(!n.id&&i.A.request.useIdentity&&await Promise.all([r.e(6361),r.e(7644),r.e(7715)]).then(()=>r(50148)),(await n.id.getCredential(e,a))?.token)}},62046(e,t,r){r.d(t,{Fe:()=>y,KU:()=>b,Nk:()=>p,X5:()=>a});var i=r(68197),n=r(93397);function a(e,t,r){if(!e)return;let i=(0,n.lW)(e),a=function(e){let t=(0,n.lW)(e);if("CIMTextSymbol"===t?.type)return t.height??0;let r=0;if(t?.symbolLayers)for(let e of t.symbolLayers)(0,n.MM)(e)&&null!=e.size&&e.size>r?r=e.size:(0,n.mA)(e)&&null!=e.width&&e.width>r?r=e.width:(0,n.jn)(e);return r}(e);0===a?function(e,t){if(e)if("CIMTextSymbol"===e.type)e.height=t;else if(e.symbolLayers)for(let r of e.symbolLayers)switch(r.type){case"CIMPictureMarker":case"CIMVectorMarker":r.size=t;break;case"CIMPictureStroke":case"CIMSolidStroke":case"CIMGradientStroke":r.width=t}}(i,t):s(i,t/a,!1,r)}function s(e,t,r,i){if(e)if("CIMTextSymbol"===e.type)null!=e.height&&(e.height*=t);else{if(r&&e.effects)for(let r of e.effects)l(r,t);if(e.symbolLayers)for(let r of e.symbolLayers){switch(r.type){case"CIMPictureMarker":case"CIMVectorMarker":o(r,t,i);break;case"CIMPictureStroke":case"CIMSolidStroke":case"CIMGradientStroke":!i?.preserveOutlineWidth&&r.width&&(r.width*=t);break;case"CIMPictureFill":r.height&&(r.height*=t),r.offsetX&&(r.offsetX*=t),r.offsetY&&(r.offsetY*=t);break;case"CIMHatchFill":s(r.lineSymbol,t,!0,{...i,preserveOutlineWidth:!1}),r.offsetX&&(r.offsetX*=t),r.offsetY&&(r.offsetY*=t),r.separation&&(r.separation*=t)}if(r.effects)for(let e of r.effects)l(e,t)}}}function o(e,t,r){if(e&&(e.markerPlacement&&function(e,t){switch((0,n.zr)(e)&&e.offset&&(e.offset*=t),e.type){case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAlongLineSameSize":e.customEndingOffset&&(e.customEndingOffset*=t),e.offsetAlongLine&&(e.offsetAlongLine*=t),e.placementTemplate&&e.placementTemplate.length&&(e.placementTemplate=e.placementTemplate.map(e=>e*t));break;case"CIMMarkerPlacementAlongLineVariableSize":e.maxRandomOffset&&(e.maxRandomOffset*=t),e.placementTemplate&&e.placementTemplate.length&&(e.placementTemplate=e.placementTemplate.map(e=>e*t));break;case"CIMMarkerPlacementOnLine":e.startPointOffset&&(e.startPointOffset*=t);break;case"CIMMarkerPlacementAtExtremities":e.offsetAlongLine&&(e.offsetAlongLine*=t);break;case"CIMMarkerPlacementAtMeasuredUnits":case"CIMMarkerPlacementOnVertices":break;case"CIMMarkerPlacementAtRatioPositions":e.beginPosition&&(e.beginPosition*=t),e.endPosition&&(e.endPosition*=t);break;case"CIMMarkerPlacementPolygonCenter":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t);break;case"CIMMarkerPlacementInsidePolygon":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t),e.stepX&&(e.stepX*=t),e.stepY&&(e.stepY*=t)}}(e.markerPlacement,t),e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t),e.anchorPoint&&"Absolute"===e.anchorPointUnits&&(e.anchorPoint={x:e.anchorPoint.x*t,y:e.anchorPoint.y*t}),e.size=null==e.size?0:e.size*t,"CIMVectorMarker"===e.type&&e.markerGraphics))for(let i of e.markerGraphics)e.scaleSymbolsProportionally||s(i.symbol,t,!0,r)}function l(e,t){if(!(0,n.Kq)(e))switch(e.type){case"CIMGeometricEffectArrow":case"CIMGeometricEffectDonut":e.width&&(e.width*=t);break;case"CIMGeometricEffectBuffer":e.size&&(e.size*=t);break;case"CIMGeometricEffectCut":e.beginCut&&(e.beginCut*=t),e.endCut&&(e.endCut*=t),e.middleCut&&(e.middleCut*=t);break;case"CIMGeometricEffectDashes":e.customEndingOffset&&(e.customEndingOffset*=t),e.offsetAlongLine&&(e.offsetAlongLine*=t),e.dashTemplate&&e.dashTemplate.length&&(e.dashTemplate=e.dashTemplate.map(e=>e*t));break;case"CIMGeometricEffectExtension":case"CIMGeometricEffectJog":case"CIMGeometricEffectRadial":e.length&&(e.length*=t);break;case"CIMGeometricEffectMove":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t);break;case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":e.offset&&(e.offset*=t);break;case"CIMGeometricEffectRegularPolygon":e.radius&&(e.radius*=t);break;case"CIMGeometricEffectTaperedPolygon":e.fromWidth&&(e.fromWidth*=t),e.length&&(e.length*=t),e.toWidth&&(e.toWidth*=t);break;case"CIMGeometricEffectWave":e.amplitude&&(e.amplitude*=t),e.period&&(e.period*=t)}}function p(e){let t=[];return u((0,n.lW)(e),t),t.length?new i.A((0,n.e6)(t[0])):null}function u(e,t){if(!e)return;let r;r="CIMTextSymbol"===e.type?e.symbol:e;let i="CIMPolygonSymbol"===e.type;if(r?.symbolLayers)for(let e of r.symbolLayers)if(!(e.colorLocked||i&&((0,n.mA)(e)||(0,n.MM)(e)&&e.markerPlacement&&(0,n.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&d(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{u(e.symbol,t)});break;case"CIMSolidStroke":case"CIMSolidFill":d(t,e.color);break;case"CIMGradientFill":h(t,e);break;case"CIMHatchFill":u(e.lineSymbol,t)}}function d(e,t){for(let r of e)if(r.join(".")===t.join("."))return;e.push(t)}function h(e,t){switch(t.colorRamp?.type){case"CIMMultipartColorRamp":t.colorRamp.colorRamps?.forEach(t=>{"CIMLinearContinuousColorRamp"===t.type&&c(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":c(e,t.colorRamp)}}function c(e,t){t&&(t.fromColor&&d(e,t.fromColor),t.toColor&&d(e,t.toColor))}function y(e,t,r){t instanceof i.A||(t=new i.A(t));let a=(0,n.lW)(e);a&&f(a,t,r)}function f(e,t,r){if(!e)return;let i;i="CIMTextSymbol"===e.type?e.symbol:e;let a="CIMPolygonSymbol"===i?.type;if(i?.symbolLayers)for(let e of i.symbolLayers){if(e.colorLocked)continue;if(a)if(r){let{layersToColor:t}=r;if(((0,n.mA)(e)||(0,n.MM)(e)&&e.markerPlacement&&(0,n.zr)(e.markerPlacement))&&"fill"===t||(0,n.jn)(e)&&"outline"===t)continue}else if((0,n.mA)(e)||(0,n.MM)(e)&&e.markerPlacement&&(0,n.zr)(e.markerPlacement))continue;let i=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=i;break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{f(e.symbol,t,r)});break;case"CIMSolidStroke":case"CIMSolidFill":e.color=i;break;case"CIMGradientFill":m(e,t);break;case"CIMHatchFill":f(e.lineSymbol,t,r)}}}function m(e,t){switch(e.colorRamp?.type){case"CIMMultipartColorRamp":e.colorRamp.colorRamps?.forEach(e=>{"CIMLinearContinuousColorRamp"===e.type&&g(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":g(e.colorRamp,t)}}function g(e,t){if(e&&(e.fromColor&&=t.toArray(),e.toColor)){let r=t.clone();r.a=0,e.toColor=r.toArray()}}function b(e,t,r=!1){let i=(0,n.lW)(e);if(r&&(t=360-t),"CIMTextSymbol"===i?.type)i.angle=t;else if("CIMPointSymbol"===i?.type&&i.symbolLayers){let e=t-(i.angle||0);for(let t of i.symbolLayers)if((0,n.MM)(t)){let r=t.rotation||0;t.rotateClockwise?r-=e:r+=e,t.rotation=r}i.angle=t}}},37531(e,t,r){r.d(t,{dt:()=>h,GG:()=>g,UQ:()=>m,Sx:()=>u});var i=r(68197),n=r(60999),a=(r(90629),r(51850)),s=(r(76369),r(62046)),o=(r(2741),r(56507),r(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 o.q(1e3),new i.A([128,128,128]);var l=r(28975),p=r(33910);function u(e,t){if(!e)return null;let r=null;return(0,p.wk)(e)?r=function(e){let t=e.symbolLayers;if(!t)return null;let r=null;return t.forEach(e=>{"object"===e.type&&e.resource?.href||(r="water"===e.type?e.color:e.material?e.material.color:null)}),r?new i.A(r):null}(e):(0,p.$y)(e)&&(r="cim"===e.type?(0,s.Nk)(e):e.color?new i.A(e.color):null),r?d(r,t):null}function d(e,t){if(null==t||null==e)return e;let r=e.toRgba();return r[3]*=t,new i.A(r)}function h(e,t,r){e&&(t||null!=r)&&(t&&=new i.A(t),(0,p.wk)(e)?function(e,t,r){let n=e.symbolLayers;if(!n)return;let a=(e,n=!1)=>{let a=t??e??null;return null!=r?.override&&(!a&&n&&(a=new i.A([255,255,255])),a&&(a.a=r.override)),d(a,r?.add)};n.forEach(e=>{if("water"===e.type)return void(e.color=d(e.color,r?.add));let t=null==e.material?null:e.material.color,i=a(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new l.A({color:i}):e.material.color=i,"outline"in e&&e.outline?.color&&null!=r?.add&&(e.outline.color=d(e.outline.color,r.add)),"marker"in e&&null!=e.marker&&(e.marker.color=a(e.marker.color))})}(e,t,r):(0,p.$y)(e)&&function(e,t,r){t??=e.color,null!=r?.override&&t&&(t.a=r.override),t&&(e.color=d(t,r?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=d(e.outline.color,r?.add))}(e,t,r))}function c(e){for(let t of e)if("number"==typeof t)return t;return null}function y(e,t,r){for(let i=0;i<3;i++){let n=e[i];switch(n){case"symbol-value":{let e=r[i];return null==e?1:e/t[i]}case"proportional":break;default:if(null!=n&&t[i])return n/t[i]}}return null}function f(e,t,r,i){switch(e){case"proportional":return r*i;case"symbol-value":return t??r;default:return e}}async function m(e,t){if(e&&t){if((0,p.wk)(e))return async function(e,t){let i=e.symbolLayers;i&&await(0,n.jJ)(i,async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){let r=t[2];"number"==typeof r&&(e.size=r)}(e,t);break;case"icon":case"line":case"text":!function(e,t){let r=c(t);null!=r&&(e.size=r)}(e,t);break;case"path":!function(e,t){let r=y(t,a.Un,[e.width,void 0,e.height]);null!=r&&(e.width=f(t[0],e.width,1,r),e.height=f(t[2],e.height,1,r))}(e,t);break;case"object":await async function(e,t){let{resourceSize:i,symbolSize:n}=await async function(e){let{computeObjectLayerResourceSize:t}=await r.e(5404).then(()=>r(95404)),i=await t(e,10),{width:n,height:a,depth:s}=e,o=[n,s,a],l=1;for(let e=0;e<3;e++){let t=o[e];if(null!=t){l=t/i[e];break}}for(let e=0;e<3;e++)o[e]??(o[e]=i[e]*l);return{resourceSize:i,symbolSize:o}}(e),a=y(t,i,n);null!=a&&(e.width=f(t[0],n[0],i[0],a),e.depth=f(t[1],n[1],i[1],a),e.height=f(t[2],n[2],i[2],a))}(e,t)}}(e,t))}(e,t);(0,p.$y)(e)&&function(e,t){let r=c(t);if(null!=r)switch(e.type){case"simple-marker":e.size=r;break;case"picture-marker":{let t=e.width/e.height;t>1?(e.width=r,e.height=r*t):(e.width=r*t,e.height=r);break}case"simple-line":e.width=r;break;case"text":e.font.size=r;break;case"simple-fill":case"picture-fill":break;case"cim":(0,s.X5)(e,r,{preserveOutlineWidth:!1})}}(e,t)}}function g(e,t,r){if(e&&null!=t)if((0,p.wk)(e)){let i=e.symbolLayers;i&&i.forEach(e=>{if("object"===e.type)switch(r){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,s.KU)(e,t,!0)}}}}]);