@arcgis/map-components 5.2.0-next.90 → 5.2.0-next.93

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 (125) hide show
  1. package/dist/cdn/2AKHVAG7.js +2 -0
  2. package/dist/cdn/2GM4O42V.js +2 -0
  3. package/dist/cdn/{2LDYIMCE.js → 2U6EB7BN.js} +1 -1
  4. package/dist/cdn/{HOUQ3XZ3.js → 34CXVCB3.js} +1 -1
  5. package/dist/cdn/{NWLNFKT6.js → 3TRAIJXM.js} +1 -1
  6. package/dist/cdn/{YLXNHUYF.js → 3VFBYBX4.js} +1 -1
  7. package/dist/cdn/{JGMSDKM3.js → 43XQKUF6.js} +1 -1
  8. package/dist/cdn/{AYRZUPV2.js → 5IXZDVTF.js} +1 -1
  9. package/dist/cdn/{RTUHTKTO.js → 5OQPTYP5.js} +1 -1
  10. package/dist/cdn/{SOOJLVZP.js → 73N362E5.js} +1 -1
  11. package/dist/cdn/{CEY5WBEU.js → 7BOYQGKF.js} +1 -1
  12. package/dist/cdn/{67ZLFQ5D.js → A5ZHWVI3.js} +1 -1
  13. package/dist/cdn/{HRX3VZC6.js → AF65YZXZ.js} +1 -1
  14. package/dist/cdn/{M7ARKSCG.js → AL52T6VH.js} +1 -1
  15. package/dist/cdn/{C32RBBXZ.js → B23TN7FG.js} +1 -1
  16. package/dist/cdn/{S474C2LJ.js → B2FQHBTX.js} +1 -1
  17. package/dist/cdn/{HXOGSZ3H.js → BSLVN2NW.js} +1 -1
  18. package/dist/cdn/{3RKXZISX.js → BXDUMWWE.js} +1 -1
  19. package/dist/cdn/{SD5FKQFO.js → CH6EWFKV.js} +1 -1
  20. package/dist/cdn/{ZFLMRC4G.js → CQ7HNSA2.js} +1 -1
  21. package/dist/cdn/{JK4KRK6P.js → CYWMBY4Y.js} +1 -1
  22. package/dist/cdn/{2VSQARQL.js → DDGANMOY.js} +1 -1
  23. package/dist/cdn/{BPB6FTQK.js → DMFYRFSD.js} +1 -1
  24. package/dist/cdn/{PUNT3Q36.js → EEVHASMU.js} +1 -1
  25. package/dist/cdn/{M6FA6DZH.js → EVKOQOVV.js} +1 -1
  26. package/dist/cdn/{II5MODDO.js → FR3EHEIV.js} +1 -1
  27. package/dist/cdn/{MJRXLGST.js → GC65JYR2.js} +1 -1
  28. package/dist/cdn/{IBOB5TYX.js → H32EDCZG.js} +1 -1
  29. package/dist/cdn/{5EOKOS52.js → H4FPSA53.js} +1 -1
  30. package/dist/cdn/{O6F37YLT.js → HAUHWMHN.js} +1 -1
  31. package/dist/cdn/{6HSLIZLD.js → I22IJPSN.js} +1 -1
  32. package/dist/cdn/{WQQVESNN.js → I5DFLVVJ.js} +1 -1
  33. package/dist/cdn/IGFJHWQN.js +2 -0
  34. package/dist/cdn/{L66K2IBM.js → IORWRMMG.js} +1 -1
  35. package/dist/cdn/{3VZGQUZE.js → IXS5O6G4.js} +1 -1
  36. package/dist/cdn/{MZ2KYVWD.js → J3743ZYD.js} +1 -1
  37. package/dist/cdn/{JTBVK3AS.js → JFHEHJOQ.js} +1 -1
  38. package/dist/cdn/{AACTDN7T.js → KGXZG3YI.js} +1 -1
  39. package/dist/cdn/{LKAMRNMI.js → KX3XJGXZ.js} +1 -1
  40. package/dist/cdn/{VRRD4HXH.js → LBYKVAQ2.js} +1 -1
  41. package/dist/cdn/MAPYP35W.js +2 -0
  42. package/dist/cdn/{CFANWKE6.js → NMQLILVV.js} +1 -1
  43. package/dist/cdn/{UBD7D3LO.js → NO6MFBNV.js} +1 -1
  44. package/dist/cdn/{B3W2SZIJ.js → NP5NJFWN.js} +1 -1
  45. package/dist/cdn/{FQTVI2JC.js → NQ5OGG4I.js} +1 -1
  46. package/dist/cdn/NUPOLDDX.js +2 -0
  47. package/dist/cdn/{4SV6HHMC.js → O7RSAJOS.js} +1 -1
  48. package/dist/cdn/{WE2GHP5E.js → Q6TYHAOA.js} +1 -1
  49. package/dist/cdn/{D325DZEQ.js → QVM6UFNB.js} +1 -1
  50. package/dist/cdn/{BBFLUSKF.js → QX7CIDD3.js} +1 -1
  51. package/dist/cdn/{OEGPO4V4.js → R6ZUE6GP.js} +1 -1
  52. package/dist/cdn/RJSJ53UD.js +2 -0
  53. package/dist/cdn/{OWT2YYBJ.js → RJZ424ZP.js} +1 -1
  54. package/dist/cdn/{CS5IVOG4.js → TTDOV3LD.js} +1 -1
  55. package/dist/cdn/{K43HEYQI.js → U2ZQWROE.js} +1 -1
  56. package/dist/cdn/UVD3M6B5.js +2 -0
  57. package/dist/cdn/VIHVSV4P.js +2 -0
  58. package/dist/cdn/{CJLQURQH.js → VLKHH2Y6.js} +1 -1
  59. package/dist/cdn/VNX2AHM5.js +2 -0
  60. package/dist/cdn/{5KXZQI7G.js → VY2FRIAX.js} +1 -1
  61. package/dist/cdn/{PPTHUNKC.js → W2HQAUUA.js} +1 -1
  62. package/dist/cdn/WTTWWX57.js +2 -0
  63. package/dist/cdn/{KEE5SJGE.js → ZTRUEI25.js} +1 -1
  64. package/dist/cdn/index.js +1 -1
  65. package/dist/chunks/GeolocationPositioning.js +45 -45
  66. package/dist/chunks/async-utils.js +18 -14
  67. package/dist/chunks/slots.js +1 -1
  68. package/dist/chunks/time-utils.js +2 -2
  69. package/dist/components/arcgis-building-phase-picker/customElement.js +13 -13
  70. package/dist/components/arcgis-color-select/customElement.js +6 -6
  71. package/dist/components/arcgis-coordinate-conversion/customElement.js +18 -17
  72. package/dist/components/arcgis-coordinate-conversion-next/customElement.js +11 -10
  73. package/dist/components/arcgis-daylight/customElement.d.ts +7 -0
  74. package/dist/components/arcgis-daylight/customElement.js +135 -135
  75. package/dist/components/arcgis-feature/customElement.d.ts +1 -1
  76. package/dist/components/arcgis-feature-expression/customElement.js +24 -24
  77. package/dist/components/arcgis-feature-next/customElement.d.ts +1 -1
  78. package/dist/components/arcgis-feature-relationship/customElement.js +42 -41
  79. package/dist/components/arcgis-feature-table/customElement.d.ts +1 -1
  80. package/dist/components/arcgis-feature-templates/customElement.js +15 -14
  81. package/dist/components/arcgis-feature-utility-network-associations/customElement.js +32 -31
  82. package/dist/components/arcgis-features/customElement.d.ts +1 -1
  83. package/dist/components/arcgis-features-next/customElement.d.ts +1 -1
  84. package/dist/components/arcgis-floor-filter/customElement.js +9 -8
  85. package/dist/components/arcgis-link-chart/customElement.d.ts +19 -7
  86. package/dist/components/arcgis-link-chart/customElement.js +16 -16
  87. package/dist/components/arcgis-map/customElement.d.ts +19 -7
  88. package/dist/components/arcgis-map/customElement.js +3 -3
  89. package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer/customElement.js +72 -72
  90. package/dist/components/arcgis-paste/customElement.d.ts +23 -3
  91. package/dist/components/arcgis-paste/customElement.js +102 -101
  92. package/dist/components/arcgis-presentation/customElement.js +43 -40
  93. package/dist/components/arcgis-scene/customElement.d.ts +42 -7
  94. package/dist/components/arcgis-scene/customElement.js +5 -5
  95. package/dist/components/arcgis-shadow-cast/customElement.d.ts +8 -3
  96. package/dist/components/arcgis-time-bar/customElement.d.ts +14 -5
  97. package/dist/components/arcgis-time-bar/customElement.js +29 -29
  98. package/dist/components/arcgis-time-bar/types.d.ts +3 -1
  99. package/dist/components/arcgis-time-bar-slider/customElement.d.ts +2 -2
  100. package/dist/components/arcgis-time-slider/customElement.d.ts +1 -1
  101. package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +3 -3
  102. package/dist/components/arcgis-utility-network-trace-inputs-next/customElement.js +3 -3
  103. package/dist/components/arcgis-video/customElement.d.ts +19 -7
  104. package/dist/components/arcgis-volume-measurement/customElement.js +5 -5
  105. package/dist/docs/api.json +1 -1
  106. package/dist/docs/docs.json +1 -1
  107. package/dist/docs/vscode.css-custom-data.json +1 -1
  108. package/dist/docs/vscode.html-custom-data.json +1 -1
  109. package/dist/docs/web-types.json +1 -1
  110. package/dist/loader.js +2 -2
  111. package/dist/types/lumina.d.ts +2 -2
  112. package/dist/types/preact.d.ts +2 -2
  113. package/dist/types/react.d.ts +2 -2
  114. package/dist/types/stencil.d.ts +2 -2
  115. package/package.json +5 -5
  116. package/dist/cdn/2FTL6T53.js +0 -2
  117. package/dist/cdn/2XHGISYY.js +0 -2
  118. package/dist/cdn/4CJBWGTY.js +0 -2
  119. package/dist/cdn/5GIJFUEJ.js +0 -2
  120. package/dist/cdn/HASESZDN.js +0 -2
  121. package/dist/cdn/LMBTPOT3.js +0 -2
  122. package/dist/cdn/OU7XFISZ.js +0 -2
  123. package/dist/cdn/UU4FSZYG.js +0 -2
  124. package/dist/cdn/YVZI2KY2.js +0 -2
  125. package/dist/cdn/Z3XLCKLP.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import b from"./Q2GU7GDS.js";import a from"./O6F37YLT.js";import"./VJVKFKSG.js";import{a as P}from"./WVGSH2QD.js";import"./5DI7RMZ6.js";import"./Q7SMGP5R.js";import"./QUZTFUWM.js";import"./NCYBFT2Y.js";import{L as R,M as E,N as x,T as V,a as f,b as g,o as w}from"./WTBRS6C4.js";import"./H6RQVSYM.js";export default $arcgis.t(([{property:d,subclass:L},F,S,H,{watch:p},{rotateDimensions:I,registerPanConstraint:O},T,{b:l},b])=>{var G=f`:host{height:100%;--arcgis-view-color-focus: none}`,z={xmin:-150,ymin:1,xmax:20,ymax:80,spatialReference:{wkid:4326}},_=1e-6;function N(i,e){if(!e)return null;let t=i.width/2,a=i.height/2,r=e.xmin+t,s=e.xmax-t,o=e.ymin+a,c=e.ymax-a;return r>=s||o>=c?null:new S({xmin:r,xmax:s,ymin:o,ymax:c,spatialReference:i.spatialReference})}var $=Object.defineProperty,k=Object.getOwnPropertyDescriptor,h=(i,e,t,a)=>{for(var r=a>1?void 0:a?k(e,t):e,s=i.length-1,o;s>=0;s--)(o=i[s])&&(r=(a?o(e,t,r):o(r))||r);return a&&r&&$(e,t,r),r},n=class extends F{constructor(i){super(i),this.autoplay=!1,this.loop=!1,this.type="image",this.autoLoad=!1}static isNonPanoramicMedia(i){return!!i&&typeof i=="object"&&"declaredClass"in i&&typeof i.declaredClass=="string"&&i.declaredClass==="components.oriented-imagery-viewer.support.NonPanoramicMedia"}destroy(){this._cache?.destroy(),this._cache=void 0,this._videoElement=void 0}get layer(){return this._cache}get videoElement(){return this._videoElement}get size(){if(!this._cache||this._cache.destroyed||this._cache.loadError)return;let{type:i}=this._cache;if(i==="imagery-tile"){let{serviceRasterInfo:e}=this._cache;return e?[e.width,e.height]:void 0}if(i==="media"){let e=this._videoElement??this._getVideoElementFromLayer(this._cache);return!e||e.videoWidth<=0||e.videoHeight<=0?void 0:[e.videoWidth,e.videoHeight]}}async load(i){return this.type==="video"?await this._loadVideo(i):await this._loadImage(i)}async _loadVideo(i){if(this._cache&&!this._cache.destroyed&&this._cache.type==="media")return await this._cache.load(i),this._videoElement=this._getVideoElementFromLayer(this._cache)??this._videoElement,this._applyVideoPlaybackOptions(),{layer:this._cache,size:this.size};let{title:e,url:t}=this;if(!t)throw new Error("URL is required to load NonPanoramicMedia.");let a=(await $arcgis.t(m=>m[0],"geometry/Extent")).default,r=(await $arcgis.t(m=>m[0],"layers/support/ExtentAndRotationGeoreference")).default,s=(await $arcgis.t(m=>m[0],"layers/support/VideoElement")).default,o=(await $arcgis.t(m=>m[0],"layers/MediaLayer")).default;l(i);let c=new s({video:t,georeference:new r({extent:new a(z)})});await c.load(i),l(i),this._videoElement=c.content??void 0,this._applyVideoPlaybackOptions();let m=new o({source:c,title:e});return await m.load(i),l(i),this._cache=m,{layer:this._cache,size:this.size}}_getVideoElementFromLayer(i){let e=i.source;if(!e||!("content"in e))return;let{content:t}=e;if(t instanceof HTMLVideoElement)return t}_applyVideoPlaybackOptions(){let i=this._videoElement;i&&(i.autoplay=this.autoplay,i.loop=this.loop,this.autoplay||i.pause())}async _loadImage(i){if(this._cache&&!this._cache.destroyed&&this._cache.type==="imagery-tile")return await this._cache.load(i),this._videoElement=void 0,{layer:this._cache,size:this.size};let{url:e,customParameters:t}=this,a=this.datasetFormat;if(!e)throw new Error("URL is required to load NonPanoramicMedia.");if(!a){let o=await import("./DBA7NSTP.js").then(m=>m.default);if(l(i),a=o.guessExtensionFromURI(e),!a){try{a=await o.getDatasetFormat(e)}catch{w("warn",this,"Failed to determine dataset format from URL or response headers."),a="UNKNOWN FORMAT"}l(i)}}this.datasetFormat=a;let r=(await $arcgis.t(m=>m[0],"layers/ImageryTileLayer")).default;l(i);let s=new r({url:e,ioConfig:{skipExtensions:["aux.xml","jgw"],skipMapInfo:!0,datasetFormat:a},customParameters:t??void 0});return await s.load(i),l(i),this._videoElement=void 0,this._cache=s,{layer:this._cache,size:this.size}}};h([d()],n.prototype,"_cache",2);h([d()],n.prototype,"_videoElement",2);h([d()],n.prototype,"autoplay",2);h([d()],n.prototype,"loop",2);h([d()],n.prototype,"title",2);h([d()],n.prototype,"type",2);h([d()],n.prototype,"layer",1);h([d()],n.prototype,"videoElement",1);h([d()],n.prototype,"size",1);h([d()],n.prototype,"autoLoad",2);h([d()],n.prototype,"customParameters",2);h([d()],n.prototype,"datasetFormat",2);h([d()],n.prototype,"url",2);n=h([L("components.oriented-imagery-viewer.support.NonPanoramicMedia")],n);function W(i,e,t,a,r){let{width:s,height:o}=I(i,e,r);return Math.max(s/t,o/a)}var A=96,U=39.37,M=U*A;function C(i){let e=M*.25,t=M*i,a=[],r=t;for(;r>e;)a.push(r),r*=.5;a.push(e);let{lods:s}=T.create({scales:a});return{minScale:t,lods:s}}var y=class extends x{constructor(){super(...arguments),this._messages=P(),this.#t=new b(this),this._imageChanged=!1,this._internalMap=R(),this._loading=!1,this.hideHeader=!1,this.hideLoader=!1,this.hideZoomControls=!1,this.hideVideoControls=!1,this.rotation=0}static{this.properties={_imageChanged:16,_internalMap:16,_layer:16,_videoTargetExtent:16,_videoRef:16,_loading:16,_media:16,hideHeader:5,hideLoader:5,hideZoomControls:5,hideVideoControls:5,messageOverrides:0,media:0,rotation:9}}static{this.styles=[G]}#t;#i;#a;#e;#s;#r;get imageRenderer(){return this._internalMap?.value?.view}get map(){return this.imageRenderer?.map}get media(){return this._media}set media(e){if(!e){this.#i?.abort(),this._media=void 0,this._clearMedia();return}this._media=e instanceof n?e:new n(e)}addGraphic(e){this.#t.addGraphic(e)}addGraphics(e){this.#t.addGraphics(e)}clearGraphics(){this.#t.clearGraphics()}async mediaOnLoad(){return this.#a&&await this.#a,this._media}removeGraphic(e){this.#t.removeGraphic(e)}removeGraphics(e){this.#t.removeGraphics(e)}loaded(){this.manager.onLifecycle(()=>[this._createResizeConstraint(),this._createRotationHandler(),this._createPanConstraint(),this._createVideoInteractionWatcher(),{remove:()=>{this._removeVideoPanHandles()}},p(()=>this._media,e=>{this.#i?.abort(),e&&(this.#i=new AbortController,this.#a=this._loadMediaInternal(e,this.#i),this.#a.catch(()=>{}))},{initial:!0,sync:!0})])}_createPanConstraint(){return p(()=>({layer:this._layer,imageRenderer:this.imageRenderer}),({layer:e,imageRenderer:t})=>{this._media?.type!=="video"&&(e?.type!=="imagery-tile"||!t?.ready||O(t,e))},{sync:!0,initial:!0})}_createResizeConstraint(){return p(()=>{if(!this.imageRenderer?.ready||!this._layer)return;if(this._layer.type==="imagery-tile"){let{width:t,height:a}=this._layer.serviceRasterInfo,{width:r,height:s,rotation:o}=this.imageRenderer;return W(t,a,r,s,o)}let e=this._videoTargetExtent;if(!(!e||this.imageRenderer.width<=0||this.imageRenderer.height<=0))return Math.max(e.width/this.imageRenderer.width,e.height/this.imageRenderer.height)},e=>{if(!e||!this.imageRenderer)return;if(this._media?.type==="video"){this._updateVideoScaleForResize(e);return}let{constraints:t,scale:a}=this.imageRenderer,r=t.minScale,{lods:s,minScale:o}=C(e);t.set({minScale:o,lods:s}),this.imageRenderer.scale=this._imageChanged||Math.abs(a-r)<=1e-6?o:a,this._imageChanged=!1},{sync:!0,initial:!0})}_createVideoInteractionWatcher(){return p(()=>[this.imageRenderer?.interacting,this.imageRenderer?.navigating,this.imageRenderer?.scale],()=>{this._media?.type==="video"&&this._updateVideoInteraction()},{initial:!0})}_createRotationHandler(){return p(()=>this.rotation,e=>{this._media?.type!=="video"&&this.imageRenderer&&(this.imageRenderer.constraints.rotationEnabled=!0,this.imageRenderer.rotation=e,this.imageRenderer.constraints.rotationEnabled=!1)},{sync:!0,initial:!0})}_clearMedia(){this._removeVideoPanHandles(),this._restoreConstraints(),this.#e=void 0,this._videoTargetExtent=void 0,this._videoRef?.pause(),this._videoRef=void 0,this._layer&&this.map?.layers.includes(this._layer)&&this.map.layers.remove(this._layer),this._layer?.destroy(),this._layer=void 0}async _loadMediaInternal(e,t){if(this._loading=!0,this._clearMedia(),!e)throw new Error("No media provided");let{layer:a}=await e.load(t).finally(()=>{this._loading=!1});l(t),this._imageChanged=!0,this._layer=a,this.imageRenderer?.map?.layers.add(this._layer),e.type==="video"&&await this._loadVideoMedia(e)}async _loadVideoMedia(e){let t=this.imageRenderer,a=new S(z),r=e.videoElement;this._videoRef=r instanceof HTMLVideoElement?r:void 0,t&&(await t.when(),this._snapshotConstraints(),t.constraints.set({rotationEnabled:!1}),await t.goTo(a.clone(),{animate:!1}),this._videoTargetExtent=t.extent?.clone(),this.#e=t.extent?.clone(),this._videoTargetExtent&&t.width>0&&t.height>0&&this._updateVideoScaleForResize(Math.max(this._videoTargetExtent.width/t.width,this._videoTargetExtent.height/t.height))),this._updateVideoInteraction()}_snapshotConstraints(){let e=this.imageRenderer?.constraints;!e||this.#r||(this.#r={geometry:e.geometry?.clone()??null,lods:e.lods,maxScale:e.maxScale,minScale:e.minScale,rotationEnabled:e.rotationEnabled})}_restoreConstraints(){let e=this.imageRenderer?.constraints,t=this.#r;!e||!t||(e.set({geometry:t.geometry,lods:t.lods,maxScale:t.maxScale,minScale:t.minScale,rotationEnabled:t.rotationEnabled}),this.#r=void 0)}_disablePan(){let e=this.imageRenderer;if(this._removeVideoPanHandles(),!e)return;let t=e.on("drag",r=>r.stopPropagation()),a=e.on("key-down",r=>{r.key.startsWith("Arrow")&&r.stopPropagation()});this.#s=[t,a]}_enablePan(){this._removeVideoPanHandles()}_removeVideoPanHandles(){this.#s?.forEach(e=>e.remove()),this.#s=void 0}_updateVideoInteraction(){let e=this.imageRenderer,t=e?.extent;if(!e||!t||this._layer?.type!=="media")return;this.#e??=t.clone();let{minScale:a}=e.constraints;if(!a)return;let r=e.scale<a-_,s=N(t,this._videoTargetExtent);if(r&&s){this._enablePan(),e.constraints.geometry=s;return}if(r){this._disablePan(),e.constraints.geometry=null;return}this.#e&&!t.equals(this.#e)&&(e.extent=this.#e.clone()),this._disablePan(),e.constraints.geometry=null}_updateVideoScaleForResize(e){if(!this.imageRenderer)return;let{constraints:t,scale:a}=this.imageRenderer,r=t.minScale,s=r!=null&&Math.abs(a-r)<=_,{lods:o,minScale:c}=C(e);t.set({lods:o,minScale:c,rotationEnabled:!1}),this.imageRenderer.scale=this._imageChanged||s?c:a,this._imageChanged=!1,s&&requestAnimationFrame(()=>{let{extent:m,scale:u,constraints:v}=this.imageRenderer??{};m&&u&&v?.minScale!=null&&Math.abs(u-v.minScale)<=_&&(this.#e=m.clone())})}render(){return g`<calcite-panel .loading=${this.hideLoader?void 0:this._loading} .heading=${this.hideHeader?void 0:this._messages.title}><arcgis-map hide-attribution .spatialReference=${H.WebMercator} ${E(this._internalMap)}><arcgis-zoom .hidden=${this.hideZoomControls} .messageOverrides=${this.messageOverrides} slot=top-left></arcgis-zoom></arcgis-map>${this.hideVideoControls||this._media?.type!=="video"||!this._videoRef?void 0:g`<arcgis-oriented-imagery-viewer-video-controls .videoRef=${this._videoRef}></arcgis-oriented-imagery-viewer-video-controls>`}</calcite-panel>`}};V("arcgis-oriented-imagery-viewer-non-panoramic-viewer",y);return y},"core/accessorSupport/decorators","core/Accessor","geometry/Extent","geometry/SpatialReference","core/reactiveUtils","applications/Components/OrientedImageryViewer/ImageViewer/utils","layers/support/TileInfo",a,b)
2
+ import b from"./Q2GU7GDS.js";import a from"./HAUHWMHN.js";import"./VJVKFKSG.js";import{a as P}from"./WVGSH2QD.js";import"./5DI7RMZ6.js";import"./Q7SMGP5R.js";import"./QUZTFUWM.js";import"./NCYBFT2Y.js";import{L as R,M as E,N as x,T as V,a as f,b as g,o as w}from"./WTBRS6C4.js";import"./H6RQVSYM.js";export default $arcgis.t(([{property:d,subclass:L},F,S,H,{watch:p},{rotateDimensions:I,registerPanConstraint:O},T,{b:l},b])=>{var G=f`:host{height:100%;--arcgis-view-color-focus: none}`,z={xmin:-150,ymin:1,xmax:20,ymax:80,spatialReference:{wkid:4326}},_=1e-6;function N(i,e){if(!e)return null;let t=i.width/2,a=i.height/2,r=e.xmin+t,s=e.xmax-t,o=e.ymin+a,c=e.ymax-a;return r>=s||o>=c?null:new S({xmin:r,xmax:s,ymin:o,ymax:c,spatialReference:i.spatialReference})}var $=Object.defineProperty,k=Object.getOwnPropertyDescriptor,h=(i,e,t,a)=>{for(var r=a>1?void 0:a?k(e,t):e,s=i.length-1,o;s>=0;s--)(o=i[s])&&(r=(a?o(e,t,r):o(r))||r);return a&&r&&$(e,t,r),r},n=class extends F{constructor(i){super(i),this.autoplay=!1,this.loop=!1,this.type="image",this.autoLoad=!1}static isNonPanoramicMedia(i){return!!i&&typeof i=="object"&&"declaredClass"in i&&typeof i.declaredClass=="string"&&i.declaredClass==="components.oriented-imagery-viewer.support.NonPanoramicMedia"}destroy(){this._cache?.destroy(),this._cache=void 0,this._videoElement=void 0}get layer(){return this._cache}get videoElement(){return this._videoElement}get size(){if(!this._cache||this._cache.destroyed||this._cache.loadError)return;let{type:i}=this._cache;if(i==="imagery-tile"){let{serviceRasterInfo:e}=this._cache;return e?[e.width,e.height]:void 0}if(i==="media"){let e=this._videoElement??this._getVideoElementFromLayer(this._cache);return!e||e.videoWidth<=0||e.videoHeight<=0?void 0:[e.videoWidth,e.videoHeight]}}async load(i){return this.type==="video"?await this._loadVideo(i):await this._loadImage(i)}async _loadVideo(i){if(this._cache&&!this._cache.destroyed&&this._cache.type==="media")return await this._cache.load(i),this._videoElement=this._getVideoElementFromLayer(this._cache)??this._videoElement,this._applyVideoPlaybackOptions(),{layer:this._cache,size:this.size};let{title:e,url:t}=this;if(!t)throw new Error("URL is required to load NonPanoramicMedia.");let a=(await $arcgis.t(m=>m[0],"geometry/Extent")).default,r=(await $arcgis.t(m=>m[0],"layers/support/ExtentAndRotationGeoreference")).default,s=(await $arcgis.t(m=>m[0],"layers/support/VideoElement")).default,o=(await $arcgis.t(m=>m[0],"layers/MediaLayer")).default;l(i);let c=new s({video:t,georeference:new r({extent:new a(z)})});await c.load(i),l(i),this._videoElement=c.content??void 0,this._applyVideoPlaybackOptions();let m=new o({source:c,title:e});return await m.load(i),l(i),this._cache=m,{layer:this._cache,size:this.size}}_getVideoElementFromLayer(i){let e=i.source;if(!e||!("content"in e))return;let{content:t}=e;if(t instanceof HTMLVideoElement)return t}_applyVideoPlaybackOptions(){let i=this._videoElement;i&&(i.autoplay=this.autoplay,i.loop=this.loop,this.autoplay||i.pause())}async _loadImage(i){if(this._cache&&!this._cache.destroyed&&this._cache.type==="imagery-tile")return await this._cache.load(i),this._videoElement=void 0,{layer:this._cache,size:this.size};let{url:e,customParameters:t}=this,a=this.datasetFormat;if(!e)throw new Error("URL is required to load NonPanoramicMedia.");if(!a){let o=await import("./DBA7NSTP.js").then(m=>m.default);if(l(i),a=o.guessExtensionFromURI(e),!a){try{a=await o.getDatasetFormat(e)}catch{w("warn",this,"Failed to determine dataset format from URL or response headers."),a="UNKNOWN FORMAT"}l(i)}}this.datasetFormat=a;let r=(await $arcgis.t(m=>m[0],"layers/ImageryTileLayer")).default;l(i);let s=new r({url:e,ioConfig:{skipExtensions:["aux.xml","jgw"],skipMapInfo:!0,datasetFormat:a},customParameters:t??void 0});return await s.load(i),l(i),this._videoElement=void 0,this._cache=s,{layer:this._cache,size:this.size}}};h([d()],n.prototype,"_cache",2);h([d()],n.prototype,"_videoElement",2);h([d()],n.prototype,"autoplay",2);h([d()],n.prototype,"loop",2);h([d()],n.prototype,"title",2);h([d()],n.prototype,"type",2);h([d()],n.prototype,"layer",1);h([d()],n.prototype,"videoElement",1);h([d()],n.prototype,"size",1);h([d()],n.prototype,"autoLoad",2);h([d()],n.prototype,"customParameters",2);h([d()],n.prototype,"datasetFormat",2);h([d()],n.prototype,"url",2);n=h([L("components.oriented-imagery-viewer.support.NonPanoramicMedia")],n);function W(i,e,t,a,r){let{width:s,height:o}=I(i,e,r);return Math.max(s/t,o/a)}var A=96,U=39.37,M=U*A;function C(i){let e=M*.25,t=M*i,a=[],r=t;for(;r>e;)a.push(r),r*=.5;a.push(e);let{lods:s}=T.create({scales:a});return{minScale:t,lods:s}}var y=class extends x{constructor(){super(...arguments),this._messages=P(),this.#t=new b(this),this._imageChanged=!1,this._internalMap=R(),this._loading=!1,this.hideHeader=!1,this.hideLoader=!1,this.hideZoomControls=!1,this.hideVideoControls=!1,this.rotation=0}static{this.properties={_imageChanged:16,_internalMap:16,_layer:16,_videoTargetExtent:16,_videoRef:16,_loading:16,_media:16,hideHeader:5,hideLoader:5,hideZoomControls:5,hideVideoControls:5,messageOverrides:0,media:0,rotation:9}}static{this.styles=[G]}#t;#i;#a;#e;#s;#r;get imageRenderer(){return this._internalMap?.value?.view}get map(){return this.imageRenderer?.map}get media(){return this._media}set media(e){if(!e){this.#i?.abort(),this._media=void 0,this._clearMedia();return}this._media=e instanceof n?e:new n(e)}addGraphic(e){this.#t.addGraphic(e)}addGraphics(e){this.#t.addGraphics(e)}clearGraphics(){this.#t.clearGraphics()}async mediaOnLoad(){return this.#a&&await this.#a,this._media}removeGraphic(e){this.#t.removeGraphic(e)}removeGraphics(e){this.#t.removeGraphics(e)}loaded(){this.manager.onLifecycle(()=>[this._createResizeConstraint(),this._createRotationHandler(),this._createPanConstraint(),this._createVideoInteractionWatcher(),{remove:()=>{this._removeVideoPanHandles()}},p(()=>this._media,e=>{this.#i?.abort(),e&&(this.#i=new AbortController,this.#a=this._loadMediaInternal(e,this.#i),this.#a.catch(()=>{}))},{initial:!0,sync:!0})])}_createPanConstraint(){return p(()=>({layer:this._layer,imageRenderer:this.imageRenderer}),({layer:e,imageRenderer:t})=>{this._media?.type!=="video"&&(e?.type!=="imagery-tile"||!t?.ready||O(t,e))},{sync:!0,initial:!0})}_createResizeConstraint(){return p(()=>{if(!this.imageRenderer?.ready||!this._layer)return;if(this._layer.type==="imagery-tile"){let{width:t,height:a}=this._layer.serviceRasterInfo,{width:r,height:s,rotation:o}=this.imageRenderer;return W(t,a,r,s,o)}let e=this._videoTargetExtent;if(!(!e||this.imageRenderer.width<=0||this.imageRenderer.height<=0))return Math.max(e.width/this.imageRenderer.width,e.height/this.imageRenderer.height)},e=>{if(!e||!this.imageRenderer)return;if(this._media?.type==="video"){this._updateVideoScaleForResize(e);return}let{constraints:t,scale:a}=this.imageRenderer,r=t.minScale,{lods:s,minScale:o}=C(e);t.set({minScale:o,lods:s}),this.imageRenderer.scale=this._imageChanged||Math.abs(a-r)<=1e-6?o:a,this._imageChanged=!1},{sync:!0,initial:!0})}_createVideoInteractionWatcher(){return p(()=>[this.imageRenderer?.interacting,this.imageRenderer?.navigating,this.imageRenderer?.scale],()=>{this._media?.type==="video"&&this._updateVideoInteraction()},{initial:!0})}_createRotationHandler(){return p(()=>this.rotation,e=>{this._media?.type!=="video"&&this.imageRenderer&&(this.imageRenderer.constraints.rotationEnabled=!0,this.imageRenderer.rotation=e,this.imageRenderer.constraints.rotationEnabled=!1)},{sync:!0,initial:!0})}_clearMedia(){this._removeVideoPanHandles(),this._restoreConstraints(),this.#e=void 0,this._videoTargetExtent=void 0,this._videoRef?.pause(),this._videoRef=void 0,this._layer&&this.map?.layers.includes(this._layer)&&this.map.layers.remove(this._layer),this._layer?.destroy(),this._layer=void 0}async _loadMediaInternal(e,t){if(this._loading=!0,this._clearMedia(),!e)throw new Error("No media provided");let{layer:a}=await e.load(t).finally(()=>{this._loading=!1});l(t),this._imageChanged=!0,this._layer=a,this.imageRenderer?.map?.layers.add(this._layer),e.type==="video"&&await this._loadVideoMedia(e)}async _loadVideoMedia(e){let t=this.imageRenderer,a=new S(z),r=e.videoElement;this._videoRef=r instanceof HTMLVideoElement?r:void 0,t&&(await t.when(),this._snapshotConstraints(),t.constraints.set({rotationEnabled:!1}),await t.goTo(a.clone(),{animate:!1}),this._videoTargetExtent=t.extent?.clone(),this.#e=t.extent?.clone(),this._videoTargetExtent&&t.width>0&&t.height>0&&this._updateVideoScaleForResize(Math.max(this._videoTargetExtent.width/t.width,this._videoTargetExtent.height/t.height))),this._updateVideoInteraction()}_snapshotConstraints(){let e=this.imageRenderer?.constraints;!e||this.#r||(this.#r={geometry:e.geometry?.clone()??null,lods:e.lods,maxScale:e.maxScale,minScale:e.minScale,rotationEnabled:e.rotationEnabled})}_restoreConstraints(){let e=this.imageRenderer?.constraints,t=this.#r;!e||!t||(e.set({geometry:t.geometry,lods:t.lods,maxScale:t.maxScale,minScale:t.minScale,rotationEnabled:t.rotationEnabled}),this.#r=void 0)}_disablePan(){let e=this.imageRenderer;if(this._removeVideoPanHandles(),!e)return;let t=e.on("drag",r=>r.stopPropagation()),a=e.on("key-down",r=>{r.key.startsWith("Arrow")&&r.stopPropagation()});this.#s=[t,a]}_enablePan(){this._removeVideoPanHandles()}_removeVideoPanHandles(){this.#s?.forEach(e=>e.remove()),this.#s=void 0}_updateVideoInteraction(){let e=this.imageRenderer,t=e?.extent;if(!e||!t||this._layer?.type!=="media")return;this.#e??=t.clone();let{minScale:a}=e.constraints;if(!a)return;let r=e.scale<a-_,s=N(t,this._videoTargetExtent);if(r&&s){this._enablePan(),e.constraints.geometry=s;return}if(r){this._disablePan(),e.constraints.geometry=null;return}this.#e&&!t.equals(this.#e)&&(e.extent=this.#e.clone()),this._disablePan(),e.constraints.geometry=null}_updateVideoScaleForResize(e){if(!this.imageRenderer)return;let{constraints:t,scale:a}=this.imageRenderer,r=t.minScale,s=r!=null&&Math.abs(a-r)<=_,{lods:o,minScale:c}=C(e);t.set({lods:o,minScale:c,rotationEnabled:!1}),this.imageRenderer.scale=this._imageChanged||s?c:a,this._imageChanged=!1,s&&requestAnimationFrame(()=>{let{extent:m,scale:u,constraints:v}=this.imageRenderer??{};m&&u&&v?.minScale!=null&&Math.abs(u-v.minScale)<=_&&(this.#e=m.clone())})}render(){return g`<calcite-panel .loading=${this.hideLoader?void 0:this._loading} .heading=${this.hideHeader?void 0:this._messages.title}><arcgis-map hide-attribution .spatialReference=${H.WebMercator} ${E(this._internalMap)}><arcgis-zoom .hidden=${this.hideZoomControls} .messageOverrides=${this.messageOverrides} slot=top-left></arcgis-zoom></arcgis-map>${this.hideVideoControls||this._media?.type!=="video"||!this._videoRef?void 0:g`<arcgis-oriented-imagery-viewer-video-controls .videoRef=${this._videoRef}></arcgis-oriented-imagery-viewer-video-controls>`}</calcite-panel>`}};V("arcgis-oriented-imagery-viewer-non-panoramic-viewer",y);return y},"core/accessorSupport/decorators","core/Accessor","geometry/Extent","geometry/SpatialReference","core/reactiveUtils","applications/Components/OrientedImageryViewer/ImageViewer/utils","layers/support/TileInfo",a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as g}from"./56KR4KYO.js";import i from"./O6F37YLT.js";import"./VJVKFKSG.js";import f from"./AZYY5BTK.js";import{a as v}from"./WVGSH2QD.js";import e from"./ANSNQBZW.js";import c from"./XXA7VSON.js";import"./5DI7RMZ6.js";import"./Q7SMGP5R.js";import b from"./SYDGAFU5.js";import"./QUZTFUWM.js";import"./NCYBFT2Y.js";import{M as h,N as m,T as y,a as p,b as a,o as d,w as n}from"./WTBRS6C4.js";import"./H6RQVSYM.js";export default $arcgis.t(([w,{when:_},T,,,,f,{a:b}])=>{var x=p`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;height:var(--arcgis-internal-panel-height, 100%)}arcgis-utility-network-trace-inputs[mode=default]{height:auto}calcite-tabs{display:flex;flex-direction:column;height:100%}calcite-tab{--calcite-tab-content-space-y: 0;min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-tab:not([selected]){flex:0}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1)}calcite-notice{margin:var(--calcite-spacing-md)}.inputs-tab-container{display:flex;flex-direction:column;height:100%}.trace-inputs-warning{flex:none;height:fit-content;calcite-notice{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}}`,R=f(T),u=class extends m{constructor(){super(...arguments),this._messages=v({blocking:!0}),this.#t=R(this),this.#s=[],this._activeTab="input",this._showMissingTerminalWarning=!1,this._showNoStartingPointsWarning=!1,this._mode="default",this.autoDestroyDisabled=!1,this.aggregatedGeometryGraphicsColor=new w([255,255,0,.6]),this.disableHighlightFeatureResults=!1,this.hideActionBar=!1,this.hideFeatureResults=!1,this.state=this.#t.state,this.view=this.#t.view,this.arcgisHideGraphicsChange=n(),this.arcgisReady=n(),this.arcgisTraceLocationSelectEnd=n(),this.arcgisTraceLocationSelectStart=n(),this.arcgisTraceResultClear=n(),this.arcgisTraceResultFeaturesReady=n()}static{this.properties={_activeTab:16,_traceError:16,_traceResult:16,_showMissingTerminalWarning:16,_showNoStartingPointsWarning:16,_mode:16,autoDestroyDisabled:5,beforeTraceLocationSelectStart:0,aggregatedGeometryGraphicsColor:0,disableHighlightFeatureResults:5,hideActionBar:5,hideFeatureResults:5,label:3,messageOverrides:0,traceResultFeatures:32,referenceElement:1,state:32,view:0}}static{this.styles=x}#t;#e;#i;get#c(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}#o;#s;get traceResultFeatures(){return this.#i?.traceResultFeatures??[]}async destroy(){this.#n(),this.#i?.destroy(),this.#e?.destroy(),await this.manager.destroy()}load(){this.manager.onLifecycle(()=>[_(()=>!this.#t.utilityNetwork,()=>this.#a("input"))])}#r(){this._traceResult=void 0,this.#n(),this.#g()}#l(){if(!this.#e)return;let{traceLocations:t,traceLocationFlagInfos:e,traceConfiguration:s,isSubnetworkNameTraceSelected:i}=this.#e,c=!!s?.subnetworkName,o=t?.some(r=>r.type==="starting-point"),l=e?.some(r=>!!r.flagProperties.terminalConfiguration&&!r.flagProperties.selectedTerminals?.size)??!1;this._traceError=void 0,this._showNoStartingPointsWarning=!i&&!o||i&&!c,this._showMissingTerminalWarning=l}#a(t){this._activeTab=t}#h(t){let{_messages:e}=this;switch(t){case"no-user-type-extension":return e.errors.loadErrors.noUserTypeExtension;case"no-utility-network":return e.errors.loadErrors.noUtilityNetwork;case"no-view":return e.errors.loadErrors.noView;case"sceneView-not-supported":return e.errors.loadErrors.sceneViewNotSupported;default:return t}}#n(){this.#s.forEach(t=>t.remove()),this.#s=[]}#g(){this.#i?.clearAggregatedGeometryGraphics()}#u(){let{_traceResult:t,view:e}=this,s=this.#t.utilityNetwork;!s||!t?.elements||!e||s.getObjectIdsFromElements(t.elements).forEach(i=>{let c=e.allLayerViews.find(l=>{let r=l.layer;if(s.isUtilityLayer(r)){let $=Number(i.layerUrl.split("/").pop());return r.layerId===$}return!1});if(!c)return;let o=c.highlight(i.objectIds);this.#s.push(o)})}async#p(){let t=this.#e?.selectedNamedTraceConfiguration,e=this.#e?.traceConfiguration;if(!(t?.traceType&&e)){d("error",this,"Trace configuration not found");return}let s=this.#e?.traceLocations;try{this._traceResult=await this.#t.executeTraceConfiguration({traceType:t.traceType,traceConfiguration:e,traceLocations:s??[],resultTypes:t.resultTypes,outSpatialReference:this.view?.spatialReference}),this.disableHighlightFeatureResults||this.#u()}catch(i){b(i,this,"Error while running trace"),this._traceError=i,this._traceResult=void 0}}#d(){this.#l(),!(this._showNoStartingPointsWarning||this._showMissingTerminalWarning)&&(this._showNoStartingPointsWarning=!1,this._showMissingTerminalWarning=!1,this.#r(),this.#a("results"),this.#p())}#m(t){t&&(this.#e=t)}#y(t){t&&(this.#i=t)}#b(t){t.stopPropagation(),this.arcgisHideGraphicsChange.emit(t.detail)}#v(t){t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented&&t.preventDefault()}#f(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit()}#w(t){t.stopPropagation(),this.arcgisTraceResultFeaturesReady.emit()}#$(t){let e=t.detail;this.aggregatedGeometryGraphicsColor=new w(e)}#_(){this._showNoStartingPointsWarning=!1,this._showMissingTerminalWarning=!1}#T(){this.#t.utilityNetwork=this.#e?.selectedUtilityNetwork}#x(){let{_messages:t}=this;return a`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${()=>this._showMissingTerminalWarning=!1}><div slot=title>${t.errors.missingTerminalTitle}</div><div slot=message>${t.errors.missingTerminalBody}</div></calcite-notice></calcite-panel>`}#R(){let{_messages:t}=this;return a`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${()=>this._showNoStartingPointsWarning=!1}><div slot=title>${t.errors.noStartingPointsTitle}</div><div slot=message>${t.errors.noStartingPointsBody}</div></calcite-notice></calcite-panel>`}#k(){return g(`${this.el.id}__results-tab-item`,a`<calcite-tab .selected=${this._activeTab==="results"}>${this.state==="executing"?a`<calcite-panel><calcite-loader .label=${this._messages.runningTrace} .text=${this._messages.runningTrace}></calcite-loader></calcite-panel>`:a`<arcgis-utility-network-trace-results .autoDestroyDisabled=${this.autoDestroyDisabled} .aggregatedGeometryGraphicsColor=${this.aggregatedGeometryGraphicsColor} .hideActionBar=${this.hideActionBar} .hideFeatureResults=${this.hideFeatureResults} .layers=${this.#c} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .traceConfigTitle=${this.#o?.title} .traceError=${this._traceError} .traceResult=${this._traceResult} .utilityNetwork=${this.#t.utilityNetwork??void 0} .view=${this.view??void 0} @arcgisAggregatedGeometryGraphicsColorChange=${this.#$} @arcgisHideGraphicsChange=${this.#b} @arcgisTraceResultFeaturesReady=${this.#w} ${h(this.#y)}></arcgis-utility-network-trace-results>`}</calcite-tab>`)}#S(){let{_messages:t,_traceResult:e}=this,s=!!(e?.elements.length||e?.globalFunctionResults.length||e?.aggregatedGeometry)&&this.#i?.state==="ready",i=this.#i?.numResults??0;return a`<calcite-button appearance=outline width=full @click=${()=>{this.#a("input"),this.#r(),this.arcgisTraceResultClear.emit()}} .disabled=${!s} slot=footer>${i>0&&!this.hideFeatureResults&&this.state!=="executing"?t.buttons.clearResultsCustom.replace("{number}",i.toString()):t.buttons.clearResultsGeneric}</calcite-button>`}#C(){let{_mode:t}=this,{loadError:e}=this.#t,s=(e==="no-user-type-extension"||e==="sceneView-not-supported"?a`<calcite-notice kind=danger open scale=s slot=content-top width=auto><div slot=message>${this.#h(e)}</div></calcite-notice>`:void 0)??a`${this._showNoStartingPointsWarning&&t==="default"&&this.#R()||""}${this._showMissingTerminalWarning&&t==="default"&&this.#x()||""}<arcgis-utility-network-trace-inputs .autoDestroyDisabled=${this.autoDestroyDisabled} .hideActionBar=${this.hideActionBar} .referenceElement=${this.referenceElement} .view=${this.view??void 0} .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisPropertyChange=${i=>{i.stopPropagation(),i.detail.name==="mode"&&(this._mode=i.target.mode)}} @arcgisSelectedNamedTraceConfigurationChange=${this.#_} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationSelectStart=${this.#v} @arcgisUtilityNetworkChange=${this.#T} ${h(this.#m)}></arcgis-utility-network-trace-inputs>`;return g(`${this.el.id}__inputs-tab-item`,a`<calcite-tab .selected=${this._activeTab==="input"}><div class="inputs-tab-container">${s}</div></calcite-tab>`)}#N(){let{state:t}=this;if(this._mode!=="default")return null;let e=t==="disabled"||t==="loading"||!this.#e?.traceConfiguration;return a`<calcite-button appearance=solid width=full @click=${this.#d} slot=footer .disabled=${e}>${this._messages.buttons.getResults}</calcite-button>`}render(){let{_activeTab:t,state:e}=this;return a`<calcite-panel><calcite-tabs layout=center position=top><calcite-tab-nav slot=title-group><calcite-tab-title @click=${()=>this.#a("input")} .selected=${t==="input"}>${this._messages.tabs.inputTab}</calcite-tab-title><calcite-tab-title @click=${()=>this.#a("results")} .selected=${t==="results"} .disabled=${e==="disabled"||e==="loading"}>${this._messages.tabs.resultsTab}</calcite-tab-title></calcite-tab-nav>${this.#C()}${this.#k()}</calcite-tabs>${t==="input"?this.#N():null}${t==="results"?this.#S():null}</calcite-panel>`}};y("arcgis-utility-network-trace-analysis",u);return u},"Color","core/reactiveUtils","networks/UtilityNetworkTraceAnalysis",b,c,e,f,i)
2
+ import{a as g}from"./56KR4KYO.js";import i from"./HAUHWMHN.js";import"./VJVKFKSG.js";import f from"./AZYY5BTK.js";import{a as v}from"./WVGSH2QD.js";import e from"./ANSNQBZW.js";import c from"./XXA7VSON.js";import"./5DI7RMZ6.js";import"./Q7SMGP5R.js";import b from"./SYDGAFU5.js";import"./QUZTFUWM.js";import"./NCYBFT2Y.js";import{M as h,N as m,T as y,a as p,b as a,o as d,w as n}from"./WTBRS6C4.js";import"./H6RQVSYM.js";export default $arcgis.t(([w,{when:_},T,,,,f,{a:b}])=>{var x=p`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;height:var(--arcgis-internal-panel-height, 100%)}arcgis-utility-network-trace-inputs[mode=default]{height:auto}calcite-tabs{display:flex;flex-direction:column;height:100%}calcite-tab{--calcite-tab-content-space-y: 0;min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-tab:not([selected]){flex:0}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1)}calcite-notice{margin:var(--calcite-spacing-md)}.inputs-tab-container{display:flex;flex-direction:column;height:100%}.trace-inputs-warning{flex:none;height:fit-content;calcite-notice{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}}`,R=f(T),u=class extends m{constructor(){super(...arguments),this._messages=v({blocking:!0}),this.#t=R(this),this.#s=[],this._activeTab="input",this._showMissingTerminalWarning=!1,this._showNoStartingPointsWarning=!1,this._mode="default",this.autoDestroyDisabled=!1,this.aggregatedGeometryGraphicsColor=new w([255,255,0,.6]),this.disableHighlightFeatureResults=!1,this.hideActionBar=!1,this.hideFeatureResults=!1,this.state=this.#t.state,this.view=this.#t.view,this.arcgisHideGraphicsChange=n(),this.arcgisReady=n(),this.arcgisTraceLocationSelectEnd=n(),this.arcgisTraceLocationSelectStart=n(),this.arcgisTraceResultClear=n(),this.arcgisTraceResultFeaturesReady=n()}static{this.properties={_activeTab:16,_traceError:16,_traceResult:16,_showMissingTerminalWarning:16,_showNoStartingPointsWarning:16,_mode:16,autoDestroyDisabled:5,beforeTraceLocationSelectStart:0,aggregatedGeometryGraphicsColor:0,disableHighlightFeatureResults:5,hideActionBar:5,hideFeatureResults:5,label:3,messageOverrides:0,traceResultFeatures:32,referenceElement:1,state:32,view:0}}static{this.styles=x}#t;#e;#i;get#c(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}#o;#s;get traceResultFeatures(){return this.#i?.traceResultFeatures??[]}async destroy(){this.#n(),this.#i?.destroy(),this.#e?.destroy(),await this.manager.destroy()}load(){this.manager.onLifecycle(()=>[_(()=>!this.#t.utilityNetwork,()=>this.#a("input"))])}#r(){this._traceResult=void 0,this.#n(),this.#g()}#l(){if(!this.#e)return;let{traceLocations:t,traceLocationFlagInfos:e,traceConfiguration:s,isSubnetworkNameTraceSelected:i}=this.#e,c=!!s?.subnetworkName,o=t?.some(r=>r.type==="starting-point"),l=e?.some(r=>!!r.flagProperties.terminalConfiguration&&!r.flagProperties.selectedTerminals?.size)??!1;this._traceError=void 0,this._showNoStartingPointsWarning=!i&&!o||i&&!c,this._showMissingTerminalWarning=l}#a(t){this._activeTab=t}#h(t){let{_messages:e}=this;switch(t){case"no-user-type-extension":return e.errors.loadErrors.noUserTypeExtension;case"no-utility-network":return e.errors.loadErrors.noUtilityNetwork;case"no-view":return e.errors.loadErrors.noView;case"sceneView-not-supported":return e.errors.loadErrors.sceneViewNotSupported;default:return t}}#n(){this.#s.forEach(t=>t.remove()),this.#s=[]}#g(){this.#i?.clearAggregatedGeometryGraphics()}#u(){let{_traceResult:t,view:e}=this,s=this.#t.utilityNetwork;!s||!t?.elements||!e||s.getObjectIdsFromElements(t.elements).forEach(i=>{let c=e.allLayerViews.find(l=>{let r=l.layer;if(s.isUtilityLayer(r)){let $=Number(i.layerUrl.split("/").pop());return r.layerId===$}return!1});if(!c)return;let o=c.highlight(i.objectIds);this.#s.push(o)})}async#p(){let t=this.#e?.selectedNamedTraceConfiguration,e=this.#e?.traceConfiguration;if(!(t?.traceType&&e)){d("error",this,"Trace configuration not found");return}let s=this.#e?.traceLocations;try{this._traceResult=await this.#t.executeTraceConfiguration({traceType:t.traceType,traceConfiguration:e,traceLocations:s??[],resultTypes:t.resultTypes,outSpatialReference:this.view?.spatialReference}),this.disableHighlightFeatureResults||this.#u()}catch(i){b(i,this,"Error while running trace"),this._traceError=i,this._traceResult=void 0}}#d(){this.#l(),!(this._showNoStartingPointsWarning||this._showMissingTerminalWarning)&&(this._showNoStartingPointsWarning=!1,this._showMissingTerminalWarning=!1,this.#r(),this.#a("results"),this.#p())}#m(t){t&&(this.#e=t)}#y(t){t&&(this.#i=t)}#b(t){t.stopPropagation(),this.arcgisHideGraphicsChange.emit(t.detail)}#v(t){t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented&&t.preventDefault()}#f(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit()}#w(t){t.stopPropagation(),this.arcgisTraceResultFeaturesReady.emit()}#$(t){let e=t.detail;this.aggregatedGeometryGraphicsColor=new w(e)}#_(){this._showNoStartingPointsWarning=!1,this._showMissingTerminalWarning=!1}#T(){this.#t.utilityNetwork=this.#e?.selectedUtilityNetwork}#x(){let{_messages:t}=this;return a`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${()=>this._showMissingTerminalWarning=!1}><div slot=title>${t.errors.missingTerminalTitle}</div><div slot=message>${t.errors.missingTerminalBody}</div></calcite-notice></calcite-panel>`}#R(){let{_messages:t}=this;return a`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${()=>this._showNoStartingPointsWarning=!1}><div slot=title>${t.errors.noStartingPointsTitle}</div><div slot=message>${t.errors.noStartingPointsBody}</div></calcite-notice></calcite-panel>`}#k(){return g(`${this.el.id}__results-tab-item`,a`<calcite-tab .selected=${this._activeTab==="results"}>${this.state==="executing"?a`<calcite-panel><calcite-loader .label=${this._messages.runningTrace} .text=${this._messages.runningTrace}></calcite-loader></calcite-panel>`:a`<arcgis-utility-network-trace-results .autoDestroyDisabled=${this.autoDestroyDisabled} .aggregatedGeometryGraphicsColor=${this.aggregatedGeometryGraphicsColor} .hideActionBar=${this.hideActionBar} .hideFeatureResults=${this.hideFeatureResults} .layers=${this.#c} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .traceConfigTitle=${this.#o?.title} .traceError=${this._traceError} .traceResult=${this._traceResult} .utilityNetwork=${this.#t.utilityNetwork??void 0} .view=${this.view??void 0} @arcgisAggregatedGeometryGraphicsColorChange=${this.#$} @arcgisHideGraphicsChange=${this.#b} @arcgisTraceResultFeaturesReady=${this.#w} ${h(this.#y)}></arcgis-utility-network-trace-results>`}</calcite-tab>`)}#S(){let{_messages:t,_traceResult:e}=this,s=!!(e?.elements.length||e?.globalFunctionResults.length||e?.aggregatedGeometry)&&this.#i?.state==="ready",i=this.#i?.numResults??0;return a`<calcite-button appearance=outline width=full @click=${()=>{this.#a("input"),this.#r(),this.arcgisTraceResultClear.emit()}} .disabled=${!s} slot=footer>${i>0&&!this.hideFeatureResults&&this.state!=="executing"?t.buttons.clearResultsCustom.replace("{number}",i.toString()):t.buttons.clearResultsGeneric}</calcite-button>`}#C(){let{_mode:t}=this,{loadError:e}=this.#t,s=(e==="no-user-type-extension"||e==="sceneView-not-supported"?a`<calcite-notice kind=danger open scale=s slot=content-top width=auto><div slot=message>${this.#h(e)}</div></calcite-notice>`:void 0)??a`${this._showNoStartingPointsWarning&&t==="default"&&this.#R()||""}${this._showMissingTerminalWarning&&t==="default"&&this.#x()||""}<arcgis-utility-network-trace-inputs .autoDestroyDisabled=${this.autoDestroyDisabled} .hideActionBar=${this.hideActionBar} .referenceElement=${this.referenceElement} .view=${this.view??void 0} .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisPropertyChange=${i=>{i.stopPropagation(),i.detail.name==="mode"&&(this._mode=i.target.mode)}} @arcgisSelectedNamedTraceConfigurationChange=${this.#_} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationSelectStart=${this.#v} @arcgisUtilityNetworkChange=${this.#T} ${h(this.#m)}></arcgis-utility-network-trace-inputs>`;return g(`${this.el.id}__inputs-tab-item`,a`<calcite-tab .selected=${this._activeTab==="input"}><div class="inputs-tab-container">${s}</div></calcite-tab>`)}#N(){let{state:t}=this;if(this._mode!=="default")return null;let e=t==="disabled"||t==="loading"||!this.#e?.traceConfiguration;return a`<calcite-button appearance=solid width=full @click=${this.#d} slot=footer .disabled=${e}>${this._messages.buttons.getResults}</calcite-button>`}render(){let{_activeTab:t,state:e}=this;return a`<calcite-panel><calcite-tabs layout=center position=top><calcite-tab-nav slot=title-group><calcite-tab-title @click=${()=>this.#a("input")} .selected=${t==="input"}>${this._messages.tabs.inputTab}</calcite-tab-title><calcite-tab-title @click=${()=>this.#a("results")} .selected=${t==="results"} .disabled=${e==="disabled"||e==="loading"}>${this._messages.tabs.resultsTab}</calcite-tab-title></calcite-tab-nav>${this.#C()}${this.#k()}</calcite-tabs>${t==="input"?this.#N():null}${t==="results"?this.#S():null}</calcite-panel>`}};y("arcgis-utility-network-trace-analysis",u);return u},"Color","core/reactiveUtils","networks/UtilityNetworkTraceAnalysis",b,c,e,f,i)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"./B3W2SZIJ.js";import{a as E}from"./OU7XFISZ.js";import{a as g}from"./TN5C3MSL.js";import{a as A}from"./UEBDFBOK.js";import d from"./O6F37YLT.js";import"./VJVKFKSG.js";import b from"./ANSNQBZW.js";import"./5DI7RMZ6.js";import"./Q7SMGP5R.js";import a from"./SYDGAFU5.js";import"./QUZTFUWM.js";import"./NCYBFT2Y.js";import{L as w,M as v,N as _,O as m,T as f,b as p,w as c}from"./WTBRS6C4.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:n},P,U,{fetchKnowledgeGraph:x},Q,{isAbortError:R},z,{d:V,e:I},{a:i,b:d,f:C},{b:u},{a:L,b:M,c:k,d:D}])=>{var Z=d(U,{}),F=d(P,{}),y=class extends _{constructor(){super(),this._attributionMode=null,this._containerRef=w(),this._mapRef=w(),this._uiController=new L(this),this._activeLoadAbortController=null,this.arcgisLoadError=k(this),this.arcgisViewReadyError=D(this),this._map=Z(this),this._baseCypherQuery="",this._serviceUrl="",this._propItemId="",this.view=F(this),this.animationsDisabled=this.view.animationsEnabled,this.allLayerViews=this.view.allLayerViews,this.analyses=this.view.analyses,this.autoDestroyDisabled=!1,this.background=this.view.background,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.fatalError=this.view.fatalError,this.graphics=this.view.graphics,this.highlights=this.view.highlights,this.layerViews=this.view.layerViews,this.magnifier=this.view.magnifier,this.map=this.view.map,this.navigation=this.view.navigation,this.padding=this.view.padding,this.popup=this.view.popup,this.popupDisabled=this.view.popupEnabled,this.popupComponentEnabled=!1,this.ready=this.view.ready,this.resizeAlign=this.view.resizeAlign,this.resolution=this.view.resolution,this.rotation=this.view.rotation,this.selectionManager=this.view.selectionManager,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.timeZone=this.view.timeZone,this.updating=this.view.updating,this.arcgisViewAnalysisViewCreate=i(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=i(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=i(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=c(),this.arcgisViewClick=i(()=>this.view,"click"),this.arcgisViewDoubleClick=i(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=i(()=>this.view,"double-tap-drag"),this.arcgisViewDrag=i(()=>this.view,"drag"),this.arcgisViewHold=i(()=>this.view,"hold"),this.arcgisViewImmediateClick=i(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=i(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=i(()=>this.view,"key-down"),this.arcgisViewKeyUp=i(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=i(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=i(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=i(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=i(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=i(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=i(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=i(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=i(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=i(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=c(),this.arcgisViewVerticalTwoFingerDrag=i(()=>this.view,"vertical-two-finger-drag"),M(this),this.view.ui={components:[]}}static{this.properties={_map:16,_baseCypherQuery:16,_serviceUrl:16,_propItemId:16,view:32,animationsDisabled:5,aria:0,allLayerViews:32,analyses:0,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,background:0,basemap:1,basemapView:0,canZoomIn:36,canZoomOut:36,center:1,constraints:0,displayFilterDisabled:5,extent:0,fatalError:0,focusAreas:0,graphics:0,hideAttribution:5,highlights:0,interacting:32,itemId:3,baseCypherQuery:3,serviceUrl:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,padding:0,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,ready:36,resizeAlign:1,resolution:40,rotation:9,selectionManager:32,scale:9,slotGroupRefs:32,spatialReference:0,stationary:32,suspended:39,theme:0,timeExtent:0,timeZone:1,updating:36,viewpoint:0,zoom:9,loadErrorSources:0}}static{this.styles=[A,E]}get aria(){return this.view?.aria}set aria(e){this.view&&(this.view.aria=e)}get attributionItems(){return this.view?.attributionItems??[]}get attributionMode(){return this._attributionMode}set attributionMode(e){this._attributionMode=e,e!=="auto"&&(this.view.attributionMode=e)}get center(){return this.view.center}set center(e){let t=I(e,this.view);t&&(this.view.center=t)}get extent(){return this.view.extent}set extent(e){this.extent?.equals(e)||(this.view.extent=e)}get focusAreas(){return this.map?this.map?.focusAreas:{areas:[],style:"bright"}}set focusAreas(e){this.map&&(this.map.focusAreas=e)}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(e){this.view.attributionVisible=!e}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(e){this._propItemId=e}get baseCypherQuery(){return this._baseCypherQuery}set baseCypherQuery(e){this._baseCypherQuery=e}get serviceUrl(){return this._serviceUrl}set serviceUrl(e){this._serviceUrl=e}get navigating(){return this.view.navigating}get popupElement(){return this._uiController.popupElement||null}get scale(){return this.view.scale}set scale(e){this.view.scale=e}get stationary(){return this.view.stationary}get viewpoint(){return this.view.viewpoint}set viewpoint(e){V(this.viewpoint,e)&&(this.view.viewpoint=e)}get zoom(){return this.view.zoom}set zoom(e){this.view.zoom=e}async closePopup(){this._uiController.closePopup()}async fetchPopupFeatures(e,t){return this.view.fetchPopupFeatures(e,t)}async destroy(){await this.manager.destroy()}async goTo(e,t){return await this.view.goTo(e,t)}async openPopup(e){this._uiController.openPopup(e)}toMap(e){return this.view.toMap(e)}toScreen(e,t){return this.view.toScreen(e,t)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(e,t){return await this.componentOnReady(),await this.view.whenReady().then(()=>e?.()).catch(t)}async whenAnalysisView(e){return await this.view.whenAnalysisView(e)}async whenLayerView(e){return await this.view.whenLayerView(e)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}loaded(){let e=this;e.el.childElem=this._mapRef.value,this.view.container??=e.el.childElem,s.setLocalPublicMap(this,this._map),this.manager.onLifecycle(()=>[n(()=>this.map,t=>{t&&s.setLocalPrivateMap(this,t)},{initial:!0,sync:!0}),n(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),n(()=>this.view.ready,()=>this.arcgisViewReadyChange.emit(),{initial:this.view.ready}),n(()=>this.view.attributionHeight,t=>{this._uiController.handleAttributionHeightChange(t)},{initial:!0})])}willUpdate(e){let t=()=>{this._activeLoadAbortController?.abort();let a=new AbortController;return this._activeLoadAbortController=a,a};if(e.has("_propItemId")||e.has("_serviceUrl")||e.has("_baseCypherQuery")){if(e.has("_propItemId")&&this._propItemId||e.has("_propItemId")&&!this._serviceUrl)t(),s.reCreateAccessor(this._map,this),s.setPortalItem(this._map,this._propItemId),s.setMap(this.view,this._map);else if(!this._propItemId)if(this._serviceUrl&&!this._baseCypherQuery){let a=t();s.fetchKnowledgeGraph(this._serviceUrl).then(l=>{let h=new s.WebLinkChart,o=new s.LinkChartLayer({url:l.url});o.load({signal:a?.signal});try{u(a.signal),h.add(o),this._setLinkChartAndZoom(h)}catch(b){if(!R(b))throw b}})}else if(this._baseCypherQuery&&this._serviceUrl){let a=t();s.fetchKnowledgeGraph(this._serviceUrl).then(l=>{s.WebLinkChart.fromCypherQuery(l,new Q({openCypherQuery:this._baseCypherQuery}),void 0,{signal:a?.signal}).then(async h=>{try{u(a.signal),this._setLinkChartAndZoom(h)}catch(o){if(!R(o))throw o}})})}else!this._serviceUrl&&e.has("_serviceUrl")&&(t(),s.setMap(this.view,null))}}_setLinkChartAndZoom(e){s.reCreateAccessor(this._map,this),s.setLocalPrivateMap(this,e),s.setMap(this.view,e),this._map&&this.view.when(()=>{e.diagramNodesExtent&&this.view.goTo(e.diagramNodesExtent)})}renderMain(){return p`<div class=${m(g.base)} ${v(this._mapRef)}></div>`}render(){return p`${this.renderMain()}<section class=${m(g.containerUI)} ${v(this._containerRef)}>${this._uiController.render()}</section>`}},s={fetchKnowledgeGraph:async r=>await x(r),WebLinkChart:U,LinkChartLayer:z,setMap:(r,e)=>{r.map=e},setLocalPrivateMap:(r,e)=>{r._map=e},setLocalPublicMap:(r,e)=>{r.map||=e},setPortalItem(r,e){r.portalItem={id:e}},reCreateAccessor:C};f("arcgis-link-chart",y);return{ArcgisLinkChart:y,exportsForTests:s}},"core/reactiveUtils","views/LinkChartView","WebLinkChart","rest/knowledgeGraphService","rest/knowledgeGraph/GraphQueryStreaming","core/promiseUtils","layers/LinkChartLayer",a,b,d,e)
2
+ import e from"./NP5NJFWN.js";import{a as E}from"./2GM4O42V.js";import{a as g}from"./TN5C3MSL.js";import{a as A}from"./UEBDFBOK.js";import d from"./HAUHWMHN.js";import"./VJVKFKSG.js";import b from"./ANSNQBZW.js";import"./5DI7RMZ6.js";import"./Q7SMGP5R.js";import a from"./SYDGAFU5.js";import"./QUZTFUWM.js";import"./NCYBFT2Y.js";import{L as w,M as v,N as _,O as m,T as f,b as p,w as c}from"./WTBRS6C4.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:n},P,U,{fetchKnowledgeGraph:x},Q,{isAbortError:R},z,{d:V,e:I},{a:i,b:d,f:C},{b:u},{a:L,b:M,c:k,d:D}])=>{var Z=d(U,{}),F=d(P,{}),y=class extends _{constructor(){super(),this._attributionMode=null,this._containerRef=w(),this._mapRef=w(),this._uiController=new L(this),this._activeLoadAbortController=null,this.arcgisLoadError=k(this),this.arcgisViewReadyError=D(this),this._map=Z(this),this._baseCypherQuery="",this._serviceUrl="",this._propItemId="",this.view=F(this),this.animationsDisabled=this.view.animationsEnabled,this.allLayerViews=this.view.allLayerViews,this.analyses=this.view.analyses,this.autoDestroyDisabled=!1,this.background=this.view.background,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.fatalError=this.view.fatalError,this.graphics=this.view.graphics,this.highlights=this.view.highlights,this.layerViews=this.view.layerViews,this.magnifier=this.view.magnifier,this.map=this.view.map,this.navigation=this.view.navigation,this.padding=this.view.padding,this.popup=this.view.popup,this.popupDisabled=this.view.popupEnabled,this.popupComponentEnabled=!1,this.ready=this.view.ready,this.resizeAlign=this.view.resizeAlign,this.resolution=this.view.resolution,this.rotation=this.view.rotation,this.selectionManager=this.view.selectionManager,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.timeZone=this.view.timeZone,this.updating=this.view.updating,this.arcgisViewAnalysisViewCreate=i(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=i(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=i(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=c(),this.arcgisViewClick=i(()=>this.view,"click"),this.arcgisViewDoubleClick=i(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=i(()=>this.view,"double-tap-drag"),this.arcgisViewDrag=i(()=>this.view,"drag"),this.arcgisViewHold=i(()=>this.view,"hold"),this.arcgisViewImmediateClick=i(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=i(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=i(()=>this.view,"key-down"),this.arcgisViewKeyUp=i(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=i(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=i(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=i(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=i(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=i(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=i(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=i(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=i(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=i(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=c(),this.arcgisViewVerticalTwoFingerDrag=i(()=>this.view,"vertical-two-finger-drag"),M(this),this.view.ui={components:[]}}static{this.properties={_map:16,_baseCypherQuery:16,_serviceUrl:16,_propItemId:16,view:32,animationsDisabled:5,aria:0,allLayerViews:32,analyses:0,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,background:0,basemap:1,basemapView:0,canZoomIn:36,canZoomOut:36,center:1,constraints:0,displayFilterDisabled:5,extent:0,fatalError:0,focusAreas:0,graphics:0,hideAttribution:5,highlights:0,interacting:32,itemId:3,baseCypherQuery:3,serviceUrl:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,padding:0,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,ready:36,resizeAlign:1,resolution:40,rotation:9,selectionManager:32,scale:9,slotGroupRefs:32,spatialReference:0,stationary:32,suspended:39,theme:0,timeExtent:0,timeZone:1,updating:36,viewpoint:0,zoom:9,loadErrorSources:0}}static{this.styles=[A,E]}get aria(){return this.view?.aria}set aria(e){this.view&&(this.view.aria=e)}get attributionItems(){return this.view?.attributionItems??[]}get attributionMode(){return this._attributionMode}set attributionMode(e){this._attributionMode=e,e!=="auto"&&(this.view.attributionMode=e)}get center(){return this.view.center}set center(e){let t=I(e,this.view);t&&(this.view.center=t)}get extent(){return this.view.extent}set extent(e){this.extent?.equals(e)||(this.view.extent=e)}get focusAreas(){return this.map?this.map?.focusAreas:{areas:[],style:"bright"}}set focusAreas(e){this.map&&(this.map.focusAreas=e)}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(e){this.view.attributionVisible=!e}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(e){this._propItemId=e}get baseCypherQuery(){return this._baseCypherQuery}set baseCypherQuery(e){this._baseCypherQuery=e}get serviceUrl(){return this._serviceUrl}set serviceUrl(e){this._serviceUrl=e}get navigating(){return this.view.navigating}get popupElement(){return this._uiController.popupElement||null}get scale(){return this.view.scale}set scale(e){this.view.scale=e}get stationary(){return this.view.stationary}get viewpoint(){return this.view.viewpoint}set viewpoint(e){V(this.viewpoint,e)&&(this.view.viewpoint=e)}get zoom(){return this.view.zoom}set zoom(e){this.view.zoom=e}async closePopup(){this._uiController.closePopup()}async destroy(){await this.manager.destroy()}async fetchPopupFeatures(e,t){return this.view.fetchPopupFeatures(e,t)}async goTo(e,t){return await this.view.goTo(e,t)}async openPopup(e){this._uiController.openPopup(e)}toMap(e){return this.view.toMap(e)}toScreen(e,t){return this.view.toScreen(e,t)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(e,t){return await this.componentOnReady(),await this.view.whenReady().then(()=>e?.()).catch(t)}async whenAnalysisView(e){return await this.view.whenAnalysisView(e)}async whenLayerView(e){return await this.view.whenLayerView(e)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}willUpdate(e){let t=()=>{this._activeLoadAbortController?.abort();let a=new AbortController;return this._activeLoadAbortController=a,a};if(e.has("_propItemId")||e.has("_serviceUrl")||e.has("_baseCypherQuery")){if(e.has("_propItemId")&&this._propItemId||e.has("_propItemId")&&!this._serviceUrl)t(),s.reCreateAccessor(this._map,this),s.setPortalItem(this._map,this._propItemId),s.setMap(this.view,this._map);else if(!this._propItemId)if(this._serviceUrl&&!this._baseCypherQuery){let a=t();s.fetchKnowledgeGraph(this._serviceUrl).then(l=>{let h=new s.WebLinkChart,o=new s.LinkChartLayer({url:l.url});o.load({signal:a?.signal});try{u(a.signal),h.add(o),this._setLinkChartAndZoom(h)}catch(b){if(!R(b))throw b}})}else if(this._baseCypherQuery&&this._serviceUrl){let a=t();s.fetchKnowledgeGraph(this._serviceUrl).then(l=>{s.WebLinkChart.fromCypherQuery(l,new Q({openCypherQuery:this._baseCypherQuery}),void 0,{signal:a?.signal}).then(async h=>{try{u(a.signal),this._setLinkChartAndZoom(h)}catch(o){if(!R(o))throw o}})})}else!this._serviceUrl&&e.has("_serviceUrl")&&(t(),s.setMap(this.view,null))}}loaded(){let e=this;e.el.childElem=this._mapRef.value,this.view.container??=e.el.childElem,s.setLocalPublicMap(this,this._map),this.manager.onLifecycle(()=>[n(()=>this.map,t=>{t&&s.setLocalPrivateMap(this,t)},{initial:!0,sync:!0}),n(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),n(()=>this.view.ready,()=>this.arcgisViewReadyChange.emit(),{initial:this.view.ready}),n(()=>this.view.attributionHeight,t=>{this._uiController.handleAttributionHeightChange(t)},{initial:!0})])}_setLinkChartAndZoom(e){s.reCreateAccessor(this._map,this),s.setLocalPrivateMap(this,e),s.setMap(this.view,e),this._map&&this.view.when(()=>{e.diagramNodesExtent&&this.view.goTo(e.diagramNodesExtent)})}renderMain(){return p`<div class=${m(g.base)} ${v(this._mapRef)}></div>`}render(){return p`${this.renderMain()}<section class=${m(g.containerUI)} ${v(this._containerRef)}>${this._uiController.render()}</section>`}},s={fetchKnowledgeGraph:async r=>await x(r),WebLinkChart:U,LinkChartLayer:z,setMap:(r,e)=>{r.map=e},setLocalPrivateMap:(r,e)=>{r._map=e},setLocalPublicMap:(r,e)=>{r.map||=e},setPortalItem(r,e){r.portalItem={id:e}},reCreateAccessor:C};f("arcgis-link-chart",y);return{ArcgisLinkChart:y,exportsForTests:s}},"core/reactiveUtils","views/LinkChartView","WebLinkChart","rest/knowledgeGraphService","rest/knowledgeGraph/GraphQueryStreaming","core/promiseUtils","layers/LinkChartLayer",a,b,d,e)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import g from"./NP5NJFWN.js";import{a as b}from"./2GM4O42V.js";import{a as c}from"./TN5C3MSL.js";import{a as f}from"./UEBDFBOK.js";import e from"./ANSNQBZW.js";import"./5DI7RMZ6.js";import"./Q7SMGP5R.js";import d from"./SYDGAFU5.js";import"./QUZTFUWM.js";import"./NCYBFT2Y.js";import{L as n,M as o,N as l,O as h,T as p,b as a,w as r}from"./WTBRS6C4.js";import"./H6RQVSYM.js";export default $arcgis.t(([A,{watch:s},D,M,R,{c:u,d:g,e:d,f:y},{a:t,b:w,f:v},{a:V,b:_,c:C,d:E}])=>{var I=w(R,{}),k=w(M,{}),m=class extends l{constructor(){super(),this._attributionMode=null,this._containerRef=n(),this._mapRef=n(),this._uiController=new V(this),this._cameraProperties={},this.arcgisLoadError=C(this),this.arcgisViewReadyError=E(this),this._map=I(this),this.view=k(this),this.allLayerViews=this.view.allLayerViews,this.alphaCompositingEnabled=this.view.alphaCompositingEnabled,this.analyses=this.view.analyses,this.animationsDisabled=this.view.animationsEnabled,this.autoDestroyDisabled=!1,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.clippingArea=this.view.clippingArea,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.environment=this.view.environment,this.fatalError=this.view.fatalError,this.floors=this.view.floors,this.graphics=this.view.graphics,this.ground=this._map.ground,this.groundView=this.view.groundView,this.highlights=this.view.highlights,this.layerViews=this.view.layerViews,this.magnifier=this.view.magnifier,this.map=this.view.map,this.navigation=this.view.navigation,this.padding=this.view.padding,this.popup=this.view.popup,this.popupDisabled=this.view.popupEnabled,this.popupComponentEnabled=!1,this.qualityProfile=this.view.qualityProfile,this.ready=this.view.ready,this.selectionManager=this.view.selectionManager,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.timeZone=this.view.timeZone,this.updating=this.view.updating,this.viewingMode=this.view.viewingMode,this.visibleArea=this.view.visibleArea,this.arcgisViewAnalysisViewCreate=t(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=t(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=t(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=r(),this.arcgisViewClick=t(()=>this.view,"click"),this.arcgisViewDoubleClick=t(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=t(()=>this.view,"double-tap-drag"),this.arcgisViewDrag=t(()=>this.view,"drag"),this.arcgisViewHold=t(()=>this.view,"hold"),this.arcgisViewImmediateClick=t(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=t(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=t(()=>this.view,"key-down"),this.arcgisViewKeyUp=t(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=t(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=t(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=t(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=t(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=t(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=t(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=t(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=t(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=t(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=r(),this.arcgisViewVerticalTwoFingerDrag=t(()=>this.view,"vertical-two-finger-drag"),_(this),this.view.ui={components:[]}}static{this.properties={_map:16,aria:0,view:32,allLayerViews:32,alphaCompositingEnabled:5,analyses:0,animationsDisabled:5,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,basemap:1,basemapView:0,camera:0,cameraFov:9,cameraHeading:9,cameraPosition:1,cameraTilt:9,canZoomIn:36,canZoomOut:36,center:1,clippingArea:0,constraints:0,displayFilterDisabled:5,environment:0,extent:0,fatalError:0,floors:0,focusAreas:0,gamepad:32,graphics:0,ground:1,groundView:32,hideAttribution:5,highlights:0,interacting:32,itemId:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,padding:0,performanceInfo:32,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,qualityProfile:1,ready:36,resolution:32,selectionManager:32,scale:9,slotGroupRefs:32,spatialReference:0,stationary:32,suspended:39,theme:0,timeExtent:0,timeZone:1,updating:36,viewingMode:1,viewpoint:0,visibleArea:32,zoom:9,loadErrorSources:0}}static{this.styles=[f,b]}get aria(){return this.view?.aria??null}set aria(i){this.view&&(this.view.aria=i)}get attributionItems(){return this.view?.attributionItems??[]}get attributionMode(){return this._attributionMode}set attributionMode(i){this._attributionMode=i,i!=="auto"&&(this.view.attributionMode=i)}get camera(){return this.view.camera}set camera(i){u(this.camera,i)||(this.view.camera=i)}get cameraFov(){let{view:i}=this;return i.ready?this.view.camera?.fov:this._cameraProperties.fov}set cameraFov(i){i!=null&&this._mutateCamera(e=>{e.fov=i})}get cameraHeading(){let{view:i}=this;return i.ready?i.camera?.heading:this._cameraProperties.heading}set cameraHeading(i){i!=null&&this._mutateCamera(e=>{e.heading=i})}get cameraPosition(){let{view:i}=this;if(i.ready)return i.camera?.position;let{position:e}=this._cameraProperties;return e?new D(e):void 0}set cameraPosition(i){let e=y(this.view.camera?.position,i);e&&this._mutateCamera(P=>{P.position=e})}get cameraTilt(){let{view:i}=this;return i.ready?i.camera?.tilt:this._cameraProperties.tilt}set cameraTilt(i){i!=null&&this._mutateCamera(e=>{e.tilt=i})}get center(){return this.view.center}set center(i){let e=d(i,this.view);e&&(this.view.center=e)}get extent(){return this.view.extent}set extent(i){i&&!this.extent.equals(i)&&(this.view.extent=i)}get focusAreas(){return this.map?this.map?.focusAreas:{areas:[],style:"bright"}}set focusAreas(i){this.map&&(this.map.focusAreas=i)}get gamepad(){return this.view.input.gamepad}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(i){this.view.attributionVisible=!i}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(i){v(this._map,this),this._map.portalItem={id:i},this.view.map=this._map}get navigating(){return this.view.navigating}get performanceInfo(){return this.view.performanceInfo}get popupElement(){return this._uiController.popupElement||null}get resolution(){return this.view.resolution}get scale(){return this.view.scale}set scale(i){this.view.scale=i}get stationary(){return this.view.stationary}get viewpoint(){return this.view.viewpoint}set viewpoint(i){g(this.viewpoint,i)&&(this.view.viewpoint=i)}get zoom(){return this.view.zoom}set zoom(i){this.view.zoom=i}async closePopup(){this._uiController.closePopup()}async destroy(){await this.manager.destroy()}async fetchPopupFeatures(i,e){return this.view.fetchPopupFeatures(i,e)}async goTo(i,e){return await this.view.goTo(i,e)}async hitTest(i,e){return await this.view.hitTest(i,e)}async openPopup(i){this._uiController.openPopup(i)}async takeScreenshot(i){return await this.view.takeScreenshot(i)}toMap(i,e){return this.view.toMap(i,e)}toScreen(i){return this.view.toScreen(i)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(i,e){return await this.componentOnReady(),await this.view.whenReady().then(()=>i?.()).catch(e)}async whenAnalysisView(i){return await this.view.whenAnalysisView(i)}async whenLayerView(i){return await this.view.whenLayerView(i)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}loaded(){let i=this;i.el.childElem=this._mapRef.value,this.view.container??=i.el.childElem,this.map||=this._map,this.manager.onLifecycle(()=>[s(()=>this.map,e=>{e&&(this._map=e)},{initial:!0,sync:!0}),s(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),s(()=>this.view.ready,e=>{e&&(this.camera=this.view.camera.clone().set(this._cameraProperties),this._cameraProperties={}),this.arcgisViewReadyChange.emit()},{initial:this.view.ready}),s(()=>this.view.attributionHeight,e=>{this._uiController.handleAttributionHeightChange(e)},{initial:!0})])}_mutateCamera(i){if(!this.view.ready){i(this._cameraProperties);return}let e=this.view.camera?.clone()??new A;i(e),this.camera=e}renderMain(){return a`<div class=${h(c.base)} ${o(this._mapRef)}></div>`}render(){return a`${this.renderMain()}<section class=${h(c.containerUI)} ${o(this._containerRef)}>${this._uiController.render()}</section>`}};p("arcgis-scene",m);return m},"Camera","core/reactiveUtils","geometry/Point","views/SceneView","WebScene",d,e,g)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import b from"./MZWO5JYA.js";import a from"./O6F37YLT.js";import"./VJVKFKSG.js";import{a as S}from"./WVGSH2QD.js";import{g as T}from"./5DI7RMZ6.js";import"./Q7SMGP5R.js";import"./QUZTFUWM.js";import"./NCYBFT2Y.js";import{M as d,N as $,T as N,a as w,b as r,o as h,q as y,r as k,w as l}from"./WTBRS6C4.js";import"./H6RQVSYM.js";export default $arcgis.t(([n,{watch:x},{substitute:I},E,D,F,L,U,{a:p},{a:_,b:m,d:g,e:v,f:C}])=>{var P=w`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0}calcite-notice{margin:var(--calcite-spacing-md)}#subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}#results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-medium)}`,b=`utility-network-trace-inputs-sketch-${Date.now()}`,A=20,f=class extends ${constructor(){super(...arguments),this._messages=S({blocking:!0}),this.#d=!0,this.#u=new Map,this.#s=new n,this.#r=new n,this.#o=new n,this.#f=new Set(["subnetwork","subnetwork-controller","upstream","downstream","isolation"]),this.#i=null,this.#l=20,this._candidateFeatures=[],this._compatibleSubnetworkNames=[],this._namedTraceConfigurations=[],this._subnetworkNamesState="ready",this._exceedDisplayLimit=!1,this.autoDestroyDisabled=!1,this.hideActionBar=!1,this.mode="default",this.arcgisPropertyChange=T()("mode"),this.arcgisSelectedNamedTraceConfigurationChange=l(),this.arcgisTraceInputsChange=l(),this.arcgisTraceLocationSelectEnd=l(),this.arcgisTraceLocationSelectStart=l(),this.arcgisUtilityNetworkChange=l()}static{this.properties={_selectedFeature:16,_candidateFeatures:16,_compatibleSubnetworkNames:16,_subnetworksTable:16,_namedTraceConfigurations:16,_utilityNetworks:16,_traceConfiguration:16,_error:16,_subnetworkNamesState:16,_activeTraceLocationType:16,_exceedDisplayLimit:16,beforeTraceLocationSelectStart:0,view:0,selectedUtilityNetwork:0,selectedNamedTraceConfiguration:0,autoDestroyDisabled:5,hideActionBar:5,traceConfiguration:32,isSubnetworkNameTraceSelected:32,referenceElement:1,mode:3,traceLocationFlagInfos:32,traceLocations:32}}static{this.styles=P}get#t(){return this._traceConfiguration?.subnetworkName??void 0}set#t(t){this._traceConfiguration&&(this._traceConfiguration.subnetworkName=t)}#d;get#S(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}#e;#a;#u;#s;#r;#o;#f;#i;#n;#w;#y;#k;#l;get#$(){return!this.isSubnetworkNameTraceSelected}get#N(){let t=this.selectedNamedTraceConfiguration?.traceType;return t==="path"||t==="circuit"}get#L(){let t=this.selectedUtilityNetwork?.dataElement?.domainNetworks;return t?t.map(e=>e.subnetworkLayerId).filter(e=>e!=null&&e>-1):[]}#x({detail:t,target:e}){(t.name==="selectedDrillInFeature"||t.name==="selectedFeature")&&(this._selectedFeature=e.selectedDrillInFeature??e.selectedFeature??void 0)}get traceConfiguration(){return this._traceConfiguration}get isSubnetworkNameTraceSelected(){let{selectedNamedTraceConfiguration:t}=this;return!!t?.traceConfiguration?.subnetworkName&&t?.traceType==="subnetwork"}get traceLocationFlagInfos(){return new n([...this.#s,...this.#r,...this.#o])}get traceLocations(){let t=[];return this.#$&&this.#s.forEach(e=>t.push(...this.#m(e))),this.#N&&this.#o.forEach(e=>t.push(...this.#m(e))),this.#r.forEach(e=>t.push(...this.#m(e))),t}async destroy(){this.#A(b),this.#_(),this.#e?.cancel(),this.#n?.destroy(),this.#w?.destroy(),this.#y?.destroy(),this.#k?.destroy(),await this.manager.destroy()}load(){this.#T(),this.manager.onLifecycle(()=>[x(()=>this.view?.map,()=>this.#T())])}willUpdate(t){t.has("_utilityNetworks")&&this.#q(),t.has("selectedUtilityNetwork")&&(this.arcgisUtilityNetworkChange.emit(),this.#K()),t.has("selectedNamedTraceConfiguration")&&(this.arcgisTraceInputsChange.emit(),this.arcgisSelectedNamedTraceConfigurationChange.emit(),this.#H())}disconnectedCallback(){super.disconnectedCallback(),this.#u.clear()}#T(){if(this._error=void 0,!this.view?.map){this._error=this._messages.errors.noView,this._utilityNetworks=void 0;return}let t=this.view.map;this.#J(t),this.#B(t)}#I(t){t&&(this.#w=t)}#E(t){t&&(this.#y=t)}#D(t){t&&(this.#k=t)}#F(t){t&&(this.#n=t)}#m(t){let e=t.flagProperties.selectedTerminals;return t.flagProperties.terminalConfiguration&&e?.size?Array.from(e,i=>new F({type:t.traceLocation.type,isFilterBarrier:t.traceLocation.isFilterBarrier,globalId:t.traceLocation.globalId,percentAlong:t.traceLocation.percentAlong,terminalId:i})):[t.traceLocation]}#_(){let{view:t}=this;this.#s.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#s.removeAll(),this.#r.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#r.removeAll(),this.#o.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#o.removeAll()}#U(t,e){if(!t.findLayerById(e)){let i=new E({id:e,listMode:"hide",title:e});_(this.view,i)}}#P(t,e){let i=t.findLayerById(e);return g(i)?(t.reorder(i,t.layers.length-1),i):null}#A(t){if(!this.view?.map)return;let{map:e}=this.view,i=e?.findLayerById(t);i&&g(i)&&e?.remove(i)}#v(){if(!this.#e)return;let t=new n;this.#a?.forEach(e=>{v(e)?e.sublayers.forEach(i=>{t.add(new L({layer:i,enabled:!0}))}):t.add(new L({layer:e,enabled:!0}))}),this.#e.snappingOptions={enabled:!1,featureSources:t}}#M(t){let{view:e}=this,i=this.#P(t,b);return new U({layer:i,view:e})}#B(t){this.#U(t,b),this.#e=this.#M(t),this.#v()}#V(){this.#t=void 0,this._subnetworksTable=void 0,this._compatibleSubnetworkNames=[]}async#j(){this._subnetworksTable||(this._subnetworksTable=await this.selectedUtilityNetwork?.loadSubnetworksTable())}async#G(){let{_subnetworksTable:t}=this;if(!t)return;let e=t.fieldsIndex.get("SUBNETWORKNAME"),i=(o,c,u)=>c===0||o.getAttribute(e.name)!==u[c-1].getAttribute(e.name),a=t.createQuery();a.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,a.where=this.#O(),a.outFields=[e.name],a.orderByFields=[e.name];let{features:s}=await m(t,a,void 0,!1);this._compatibleSubnetworkNames=s.filter(i).map(o=>o.getAttribute(e.name))}#O(){let t=this._traceConfiguration,e=`DOMAINNETWORKNAME = '${t.domainNetworkName}'`,i=`TIERNAME = '${t.tierName}'`;return[e,i].join(" AND ")}async#R(t){await this.#j(),await this.#G(),t.subnetworkName&&!this._compatibleSubnetworkNames.some(e=>e===t.subnetworkName)&&(this.#t=this._compatibleSubnetworkNames.at(0))}#z(t){let e=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.find(i=>i.globalId===t);if(!e){h("error",this,"`traceConfig` not found in `selectedUtilityNetwork.sharedNamedTraceConfigurations`");return}this.selectedNamedTraceConfiguration=e}async#H(){let{selectedNamedTraceConfiguration:t}=this;if(!(t?.traceConfiguration instanceof D)){h("error",this,y("selectedNamedTraceConfiguration.traceConfiguration")),this._traceConfiguration=void 0;return}this._traceConfiguration=t.traceConfiguration.clone(),this.isSubnetworkNameTraceSelected&&(this._subnetworkNamesState="loading",await this.#R(this._traceConfiguration),this._subnetworkNamesState="ready")}async#K(){let{selectedUtilityNetwork:t}=this;try{t&&!t.loaded&&await t.load()}catch(e){p(e,this,"Error while loading the selected utility network")}this.#V(),this.#Q(),this.#W(),this.#_()}#Q(){this._traceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0,this._namedTraceConfigurations=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter(t=>t.traceType!=="circuit").sort((t,e)=>t.title.localeCompare(e.title))||[],this._namedTraceConfigurations.length?this.selectedNamedTraceConfiguration=this._namedTraceConfigurations.at(0):h("error",this,"The selected utility network has no compatible named trace configurations.")}#W(){let{selectedUtilityNetwork:t}=this;this.#a=new n(this.#S.filter(e=>t?.isUtilityLayer(e)&&!this.#L.includes(e.layerId))),this.#v()}#q(){let{_utilityNetworks:t,selectedUtilityNetwork:e}=this;t?.length?(!e||!t.includes(e))&&(this.selectedUtilityNetwork=t.at(0)):(h("error",this,k("_utilityNetworks")),this.selectedUtilityNetwork=void 0,this._error=this._messages.errors.noUtilityNetwork)}async#J(t){try{t.loaded||await t.load()}catch(e){p(e,this,"Error while loading `view.map`")}finally{this._utilityNetworks=t.utilityNetworks||new n}}#g(t){if(t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented){t.preventDefault();return}this._activeTraceLocationType=t?.target?.traceLocationType,this.mode="add-spatial-instructions"}#X(t){if(t==null)return;let e=this.#u,i=this.#a,a=e.get(t);if(a)return a;if(!i)return;let s=i.find(o=>"layerId"in o&&o.layerId===t);return s&&e.set(t,s),s}async#Y(t,e){let i=t.createQuery();i.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,i.objectIds=e.map(s=>s.getObjectId()),i.outFields=["*"];let{features:a}=await m(t,i);return a.forEach(s=>{if(!s.getEffectivePopupTemplate(this.#d)){let o=s.layer;s.popupTemplate=o.createPopupTemplate()}}),a}async#Z(t){let e=new Map,i=[];return t.forEach(a=>{let s=C(a.layer)?a.layer.parent:a.layer;if(s){let o=this.#X(s.layerId);if(o){let c=e.get(o)||[];c.push(a),e.set(o,c)}}}),await Promise.all(Array.from(e.keys()).map(async a=>{let s=e.get(a)??[],o=await this.#Y(a,s);i.push(...o)})),i}async#p(t){return this._exceedDisplayLimit=t.length>this.#l,this._candidateFeatures=await this.#Z(t.slice(0,this.#l)),this._candidateFeatures.length===0?(this.#h(),await Promise.reject(Error("No features found"))):(this._candidateFeatures.length===1&&(this._selectedFeature=this._candidateFeatures.at(0)),this.mode="add-spatial-feature",this.#i?.reject(),this.#i=Promise.withResolvers(),await this.#i.promise)}#b(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit(),this._activeTraceLocationType=void 0,this.mode="default",this.#h()}#h(t){t?.stopPropagation(),this.#n?.clear(),this.#C(),this.#e?.cancel()}#C(){this.mode="default",this._candidateFeatures=[],this._selectedFeature=void 0,this.#i?.reject(),this.#i=null}#tt(){let t=this.#i,e=this.#n,{_selectedFeature:i}=this;if(t&&e){if(!i)return;t.resolve(i),this.#i=null}}#c(t,e=!1,i){return r`<calcite-notice .closable=${e} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${t}</div></calcite-notice>`}#et(){return r`<calcite-loader label=loading></calcite-loader>`}#it(){let t=this._namedTraceConfigurations.map(i=>r`<calcite-combobox-item .value=${i.globalId} .heading=${i.title} .selected=${i.globalId===this.selectedNamedTraceConfiguration?.globalId}></calcite-combobox-item>`),e=this._messages.labels.traceConfiguration;return r`<calcite-block .heading=${e} .label=${e} expanded><calcite-combobox .label=${e} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{let a=i.selectedItems[0]?.value;this.#z(a)}}>${t}</calcite-combobox></calcite-block>`}#at(){let t=this._messages.labels.utilityNetwork,e=this._utilityNetworks?.map(i=>r`<calcite-combobox-item .value=${i.id} .heading=${i.title||i.id} .selected=${i.id===this.selectedUtilityNetwork?.id}></calcite-combobox-item>`);return r`<calcite-block .heading=${t} .label=${t} expanded><calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{let a=i.selectedItems[0]?.value;this.selectedUtilityNetwork?.id!==a&&(this.selectedUtilityNetwork=this._utilityNetworks?.find(s=>s.id===a))}}>${e}</calcite-combobox></calcite-block>`}#st(){let{_error:t,selectedUtilityNetwork:e}=this,{noView:i,noUtilityNetwork:a}=this._messages.errors,s;return t===i||t===a?s=this.#c(t,!1,"exclamation-mark-triangle"):!e?.loaded&&!e?.loadError?s=this.#et():s=this.#pt(),r`<calcite-flow-item .selected=${this.mode==="default"}>${s}</calcite-flow-item>`}#rt(){let{_messages:t,mode:e}=this,i=this._activeTraceLocationType==="starting-point"?t.labels.addSpatial.startingPoint:this._activeTraceLocationType==="barrier"?t.labels.addSpatial.barrier:t.labels.addSpatial.stoppingPoint;return r`<calcite-flow-item .selected=${e==="add-spatial-instructions"} .heading=${i} @calciteFlowItemBack=${a=>this.#h(a)}><div class="add-spatial-mode"><div><h5 class="heading">${t.instructions.addSpatial.selectFeature.heading}</h5>${t.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${t.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${t.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`}#ot(){let{_activeTraceLocationType:t,_candidateFeatures:e,_messages:i}=this;if(!e.length)return this.mode="default",null;let a=t==="starting-point"?i.labels.addSpatial.startingPoint:t==="barrier"?i.labels.addSpatial.barrier:i.labels.addSpatial.stoppingPoint,s=e.length===1?"feature":"list";return r`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#d} .features=${this._candidateFeatures} .featureMenuTitle=${a} .hideActionBar=${this.hideActionBar} hide-select-feature .initialDisplayMode=${s} @arcgisClose=${()=>this.#C()} @arcgisPropertyChange=${this.#x} open .referenceElement=${this.referenceElement} .view=${this.view} ${d(this.#F)}></arcgis-features-next>`}#ct(){let{mode:t,_messages:e,_selectedFeature:i,selectedUtilityNetwork:a}=this,s=t==="add-spatial-feature"&&this._exceedDisplayLimit&&!i,o=I(e.warnings.exceededDisplayLimit,{limit:this.#l.toString()}),c=i?!(a?.isUtilityLayer(i.layer)??!0):!0;return r`${s&&r`<calcite-input-message id=results-limited-message icon=exclamation-mark-circle status=idle>${o}</calcite-input-message>`||""}<calcite-button appearance=outline width=full @click=${()=>this.#h()} slot=footer>${e.buttons.cancel}</calcite-button>${t==="add-spatial-feature"&&r`<calcite-button width=full slot=footer appearance=solid @click=${()=>this.#tt()} .disabled=${c}>${e.buttons.add}</calcite-button>`||""}`}#nt(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=starting-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#g} @arcgisTraceLocationSelectEnd=${this.#b} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#e} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#s} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#I)}></arcgis-utility-network-trace-location>`}#lt(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=stopping-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#g} @arcgisTraceLocationSelectEnd=${this.#b} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#e} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#o} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#D)}></arcgis-utility-network-trace-location>`}#ht(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#g} @arcgisTraceLocationSelectEnd=${this.#b} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#e} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#r} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#E)}></arcgis-utility-network-trace-location>`}#dt(){let{_messages:t}=this;return r`<calcite-input clearable type=text .placeholder=${t.instructions.enterSubnetworkName} max-length=64 .status=${this.#t?"valid":"invalid"} .value=${this.#t} @calciteInputInput=${e=>this.#t=e.target.value}></calcite-input><calcite-input-message icon=exclamation-mark-triangle status=idle>${t.labels.tooManySubnetworks}</calcite-input-message>`}#ut(){return r`<calcite-combobox .label=${this._messages.labels.subnetworkName} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:t})=>{let e=t.selectedItems[0]?.value;this.#t=e}}>${this._compatibleSubnetworkNames.map(t=>r`<calcite-combobox-item .value=${t} .heading=${t} .selected=${t===this.#t}></calcite-combobox-item>`)}</calcite-combobox>`}#mt(){let{_messages:t}=this,e=t.labels.subnetworkName;return this.isSubnetworkNameTraceSelected?this._subnetworkNamesState==="loading"?r`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>`:this._compatibleSubnetworkNames.length?r`<calcite-block .heading=${e} .label=${e} expanded>${this._compatibleSubnetworkNames.length>A?this.#dt():this.#ut()}</calcite-block>`:this.#c(t.errors.noCompatibleSubnetworks,!1,"exclamation-mark-triangle"):null}#gt(){let{selectedNamedTraceConfiguration:t}=this;return this._traceConfiguration&&t?.traceType&&this.#f.has(t.traceType)?r`<calcite-block id=subnetwork-info-block expanded .label=${this._messages.labels.subnetworkInfo}><arcgis-utility-network-subnetwork-info .namedTraceConfiguration=${t}></arcgis-utility-network-subnetwork-info></calcite-block>`:null}#pt(){let{_messages:t}=this,{noTraceConfiguration:e,noNamedTraceConfigurations:i,utilityNetworkLoadFailed:a}=t.errors,s=this._utilityNetworks&&this._utilityNetworks.length>1?this.#at():null,o;this.selectedUtilityNetwork?.loadError?o=this.#c(a,!1,"exclamation-mark-triangle"):this._namedTraceConfigurations.length||(o=this.#c(i,!1,"exclamation-mark-triangle"));let c=r`${this.#it()}${this.#gt()}${this.#mt()}`,u=this.traceConfiguration?r`${this.#$?this.#nt():null}${this.#N?this.#lt():null}${this.#ht()}`:this.#c(e,!1,"exclamation-mark-triangle");return r`<calcite-block-group .label=${t.labels.traceInputs}>${s}${o??r`${c}${u}`}</calcite-block-group>`}render(){let{mode:t}=this;return r`<calcite-panel>${t==="add-spatial-feature"?this.#ot():null}<calcite-flow .hidden=${t==="add-spatial-feature"}>${this.#st()}${this.#rt()}</calcite-flow>${t!=="default"?this.#ct():null}</calcite-panel>`}};N("arcgis-utility-network-trace-inputs",f);return f},"core/Collection","core/reactiveUtils","intl","layers/GraphicsLayer","networks/support/UNTraceConfiguration","rest/networks/support/TraceLocation","views/interactive/snapping/FeatureSnappingLayerSource","widgets/Sketch/SketchViewModel",a,b)
2
+ import b from"./MZWO5JYA.js";import a from"./HAUHWMHN.js";import"./VJVKFKSG.js";import{a as S}from"./WVGSH2QD.js";import{g as T}from"./5DI7RMZ6.js";import"./Q7SMGP5R.js";import"./QUZTFUWM.js";import"./NCYBFT2Y.js";import{M as d,N as $,T as N,a as w,b as r,o as h,q as y,r as k,w as l}from"./WTBRS6C4.js";import"./H6RQVSYM.js";export default $arcgis.t(([n,{watch:x},{substitute:I},E,D,F,L,U,{a:p},{a:_,b:m,d:g,e:v,f:C}])=>{var P=w`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0}calcite-notice{margin:var(--calcite-spacing-md)}#subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}#results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-medium)}`,b=`utility-network-trace-inputs-sketch-${Date.now()}`,A=20,f=class extends ${constructor(){super(...arguments),this._messages=S({blocking:!0}),this.#d=!0,this.#u=new Map,this.#s=new n,this.#r=new n,this.#o=new n,this.#f=new Set(["subnetwork","subnetwork-controller","upstream","downstream","isolation"]),this.#i=null,this.#l=20,this._candidateFeatures=[],this._compatibleSubnetworkNames=[],this._namedTraceConfigurations=[],this._subnetworkNamesState="ready",this._exceedDisplayLimit=!1,this.autoDestroyDisabled=!1,this.hideActionBar=!1,this.mode="default",this.arcgisPropertyChange=T()("mode"),this.arcgisSelectedNamedTraceConfigurationChange=l(),this.arcgisTraceInputsChange=l(),this.arcgisTraceLocationSelectEnd=l(),this.arcgisTraceLocationSelectStart=l(),this.arcgisUtilityNetworkChange=l()}static{this.properties={_selectedFeature:16,_candidateFeatures:16,_compatibleSubnetworkNames:16,_subnetworksTable:16,_namedTraceConfigurations:16,_utilityNetworks:16,_traceConfiguration:16,_error:16,_subnetworkNamesState:16,_activeTraceLocationType:16,_exceedDisplayLimit:16,beforeTraceLocationSelectStart:0,view:0,selectedUtilityNetwork:0,selectedNamedTraceConfiguration:0,autoDestroyDisabled:5,hideActionBar:5,traceConfiguration:32,isSubnetworkNameTraceSelected:32,referenceElement:1,mode:3,traceLocationFlagInfos:32,traceLocations:32}}static{this.styles=P}get#t(){return this._traceConfiguration?.subnetworkName??void 0}set#t(t){this._traceConfiguration&&(this._traceConfiguration.subnetworkName=t)}#d;get#S(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}#e;#a;#u;#s;#r;#o;#f;#i;#n;#w;#y;#k;#l;get#$(){return!this.isSubnetworkNameTraceSelected}get#N(){let t=this.selectedNamedTraceConfiguration?.traceType;return t==="path"||t==="circuit"}get#L(){let t=this.selectedUtilityNetwork?.dataElement?.domainNetworks;return t?t.map(e=>e.subnetworkLayerId).filter(e=>e!=null&&e>-1):[]}get traceConfiguration(){return this._traceConfiguration}get isSubnetworkNameTraceSelected(){let{selectedNamedTraceConfiguration:t}=this;return!!t?.traceConfiguration?.subnetworkName&&t?.traceType==="subnetwork"}get traceLocationFlagInfos(){return new n([...this.#s,...this.#r,...this.#o])}get traceLocations(){let t=[];return this.#$&&this.#s.forEach(e=>t.push(...this.#m(e))),this.#N&&this.#o.forEach(e=>t.push(...this.#m(e))),this.#r.forEach(e=>t.push(...this.#m(e))),t}async destroy(){this.#A(b),this.#_(),this.#e?.cancel(),this.#n?.destroy(),this.#w?.destroy(),this.#y?.destroy(),this.#k?.destroy(),await this.manager.destroy()}load(){this.#T(),this.manager.onLifecycle(()=>[x(()=>this.view?.map,()=>this.#T())])}willUpdate(t){t.has("_utilityNetworks")&&this.#q(),t.has("selectedUtilityNetwork")&&(this.arcgisUtilityNetworkChange.emit(),this.#K()),t.has("selectedNamedTraceConfiguration")&&(this.arcgisTraceInputsChange.emit(),this.arcgisSelectedNamedTraceConfigurationChange.emit(),this.#H())}disconnectedCallback(){super.disconnectedCallback(),this.#u.clear()}#x({detail:t,target:e}){(t.name==="selectedDrillInFeature"||t.name==="selectedFeature")&&(this._selectedFeature=e.selectedDrillInFeature??e.selectedFeature??void 0)}#T(){if(this._error=void 0,!this.view?.map){this._error=this._messages.errors.noView,this._utilityNetworks=void 0;return}let t=this.view.map;this.#J(t),this.#B(t)}#I(t){t&&(this.#w=t)}#E(t){t&&(this.#y=t)}#D(t){t&&(this.#k=t)}#F(t){t&&(this.#n=t)}#m(t){let e=t.flagProperties.selectedTerminals;return t.flagProperties.terminalConfiguration&&e?.size?Array.from(e,i=>new F({type:t.traceLocation.type,isFilterBarrier:t.traceLocation.isFilterBarrier,globalId:t.traceLocation.globalId,percentAlong:t.traceLocation.percentAlong,terminalId:i})):[t.traceLocation]}#_(){let{view:t}=this;this.#s.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#s.removeAll(),this.#r.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#r.removeAll(),this.#o.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#o.removeAll()}#U(t,e){if(!t.findLayerById(e)){let i=new E({id:e,listMode:"hide",title:e});_(this.view,i)}}#P(t,e){let i=t.findLayerById(e);return g(i)?(t.reorder(i,t.layers.length-1),i):null}#A(t){if(!this.view?.map)return;let{map:e}=this.view,i=e?.findLayerById(t);i&&g(i)&&e?.remove(i)}#v(){if(!this.#e)return;let t=new n;this.#a?.forEach(e=>{v(e)?e.sublayers.forEach(i=>{t.add(new L({layer:i,enabled:!0}))}):t.add(new L({layer:e,enabled:!0}))}),this.#e.snappingOptions={enabled:!1,featureSources:t}}#M(t){let{view:e}=this,i=this.#P(t,b);return new U({layer:i,view:e})}#B(t){this.#U(t,b),this.#e=this.#M(t),this.#v()}#V(){this.#t=void 0,this._subnetworksTable=void 0,this._compatibleSubnetworkNames=[]}async#j(){this._subnetworksTable||(this._subnetworksTable=await this.selectedUtilityNetwork?.loadSubnetworksTable())}async#G(){let{_subnetworksTable:t}=this;if(!t)return;let e=t.fieldsIndex.get("SUBNETWORKNAME"),i=(o,c,u)=>c===0||o.getAttribute(e.name)!==u[c-1].getAttribute(e.name),a=t.createQuery();a.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,a.where=this.#O(),a.outFields=[e.name],a.orderByFields=[e.name];let{features:s}=await m(t,a,void 0,!1);this._compatibleSubnetworkNames=s.filter(i).map(o=>o.getAttribute(e.name))}#O(){let t=this._traceConfiguration,e=`DOMAINNETWORKNAME = '${t.domainNetworkName}'`,i=`TIERNAME = '${t.tierName}'`;return[e,i].join(" AND ")}async#R(t){await this.#j(),await this.#G(),t.subnetworkName&&!this._compatibleSubnetworkNames.some(e=>e===t.subnetworkName)&&(this.#t=this._compatibleSubnetworkNames.at(0))}#z(t){let e=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.find(i=>i.globalId===t);if(!e){h("error",this,"`traceConfig` not found in `selectedUtilityNetwork.sharedNamedTraceConfigurations`");return}this.selectedNamedTraceConfiguration=e}async#H(){let{selectedNamedTraceConfiguration:t}=this;if(!(t?.traceConfiguration instanceof D)){h("error",this,y("selectedNamedTraceConfiguration.traceConfiguration")),this._traceConfiguration=void 0;return}this._traceConfiguration=t.traceConfiguration.clone(),this.isSubnetworkNameTraceSelected&&(this._subnetworkNamesState="loading",await this.#R(this._traceConfiguration),this._subnetworkNamesState="ready")}async#K(){let{selectedUtilityNetwork:t}=this;try{t&&!t.loaded&&await t.load()}catch(e){p(e,this,"Error while loading the selected utility network")}this.#V(),this.#Q(),this.#W(),this.#_()}#Q(){this._traceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0,this._namedTraceConfigurations=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter(t=>t.traceType!=="circuit").sort((t,e)=>t.title.localeCompare(e.title))||[],this._namedTraceConfigurations.length?this.selectedNamedTraceConfiguration=this._namedTraceConfigurations.at(0):h("error",this,"The selected utility network has no compatible named trace configurations.")}#W(){let{selectedUtilityNetwork:t}=this;this.#a=new n(this.#S.filter(e=>t?.isUtilityLayer(e)&&!this.#L.includes(e.layerId))),this.#v()}#q(){let{_utilityNetworks:t,selectedUtilityNetwork:e}=this;t?.length?(!e||!t.includes(e))&&(this.selectedUtilityNetwork=t.at(0)):(h("error",this,k("_utilityNetworks")),this.selectedUtilityNetwork=void 0,this._error=this._messages.errors.noUtilityNetwork)}async#J(t){try{t.loaded||await t.load()}catch(e){p(e,this,"Error while loading `view.map`")}finally{this._utilityNetworks=t.utilityNetworks||new n}}#g(t){if(t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented){t.preventDefault();return}this._activeTraceLocationType=t?.target?.traceLocationType,this.mode="add-spatial-instructions"}#X(t){if(t==null)return;let e=this.#u,i=this.#a,a=e.get(t);if(a)return a;if(!i)return;let s=i.find(o=>"layerId"in o&&o.layerId===t);return s&&e.set(t,s),s}async#Y(t,e){let i=t.createQuery();i.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,i.objectIds=e.map(s=>s.getObjectId()),i.outFields=["*"];let{features:a}=await m(t,i);return a.forEach(s=>{if(!s.getEffectivePopupTemplate(this.#d)){let o=s.layer;s.popupTemplate=o.createPopupTemplate()}}),a}async#Z(t){let e=new Map,i=[];return t.forEach(a=>{let s=C(a.layer)?a.layer.parent:a.layer;if(s){let o=this.#X(s.layerId);if(o){let c=e.get(o)||[];c.push(a),e.set(o,c)}}}),await Promise.all(Array.from(e.keys()).map(async a=>{let s=e.get(a)??[],o=await this.#Y(a,s);i.push(...o)})),i}async#p(t){return this._exceedDisplayLimit=t.length>this.#l,this._candidateFeatures=await this.#Z(t.slice(0,this.#l)),this._candidateFeatures.length===0?(this.#h(),await Promise.reject(Error("No features found"))):(this._candidateFeatures.length===1&&(this._selectedFeature=this._candidateFeatures.at(0)),this.mode="add-spatial-feature",this.#i?.reject(),this.#i=Promise.withResolvers(),await this.#i.promise)}#b(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit(),this._activeTraceLocationType=void 0,this.mode="default",this.#h()}#h(t){t?.stopPropagation(),this.#n?.clear(),this.#C(),this.#e?.cancel()}#C(){this.mode="default",this._candidateFeatures=[],this._selectedFeature=void 0,this.#i?.reject(),this.#i=null}#tt(){let t=this.#i,e=this.#n,{_selectedFeature:i}=this;if(t&&e){if(!i)return;t.resolve(i),this.#i=null}}#c(t,e=!1,i){return r`<calcite-notice .closable=${e} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${t}</div></calcite-notice>`}#et(){return r`<calcite-loader label=loading></calcite-loader>`}#it(){let t=this._namedTraceConfigurations.map(i=>r`<calcite-combobox-item .value=${i.globalId} .heading=${i.title} .selected=${i.globalId===this.selectedNamedTraceConfiguration?.globalId}></calcite-combobox-item>`),e=this._messages.labels.traceConfiguration;return r`<calcite-block .heading=${e} .label=${e} expanded><calcite-combobox .label=${e} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{let a=i.selectedItems[0]?.value;this.#z(a)}}>${t}</calcite-combobox></calcite-block>`}#at(){let t=this._messages.labels.utilityNetwork,e=this._utilityNetworks?.map(i=>r`<calcite-combobox-item .value=${i.id} .heading=${i.title||i.id} .selected=${i.id===this.selectedUtilityNetwork?.id}></calcite-combobox-item>`);return r`<calcite-block .heading=${t} .label=${t} expanded><calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{let a=i.selectedItems[0]?.value;this.selectedUtilityNetwork?.id!==a&&(this.selectedUtilityNetwork=this._utilityNetworks?.find(s=>s.id===a))}}>${e}</calcite-combobox></calcite-block>`}#st(){let{_error:t,selectedUtilityNetwork:e}=this,{noView:i,noUtilityNetwork:a}=this._messages.errors,s;return t===i||t===a?s=this.#c(t,!1,"exclamation-mark-triangle"):!e?.loaded&&!e?.loadError?s=this.#et():s=this.#pt(),r`<calcite-flow-item .selected=${this.mode==="default"}>${s}</calcite-flow-item>`}#rt(){let{_messages:t,mode:e}=this,i=this._activeTraceLocationType==="starting-point"?t.labels.addSpatial.startingPoint:this._activeTraceLocationType==="barrier"?t.labels.addSpatial.barrier:t.labels.addSpatial.stoppingPoint;return r`<calcite-flow-item .selected=${e==="add-spatial-instructions"} .heading=${i} @calciteFlowItemBack=${a=>this.#h(a)}><div class="add-spatial-mode"><div><h5 class="heading">${t.instructions.addSpatial.selectFeature.heading}</h5>${t.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${t.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${t.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`}#ot(){let{_activeTraceLocationType:t,_candidateFeatures:e,_messages:i}=this;if(!e.length)return this.mode="default",null;let a=t==="starting-point"?i.labels.addSpatial.startingPoint:t==="barrier"?i.labels.addSpatial.barrier:i.labels.addSpatial.stoppingPoint,s=e.length===1?"feature":"list";return r`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#d} .features=${this._candidateFeatures} .featureMenuTitle=${a} .hideActionBar=${this.hideActionBar} hide-select-feature .initialDisplayMode=${s} @arcgisClose=${()=>this.#C()} @arcgisPropertyChange=${this.#x} open .referenceElement=${this.referenceElement} .view=${this.view} ${d(this.#F)}></arcgis-features-next>`}#ct(){let{mode:t,_messages:e,_selectedFeature:i,selectedUtilityNetwork:a}=this,s=t==="add-spatial-feature"&&this._exceedDisplayLimit&&!i,o=I(e.warnings.exceededDisplayLimit,{limit:this.#l.toString()}),c=i?!(a?.isUtilityLayer(i.layer)??!0):!0;return r`${s&&r`<calcite-input-message id=results-limited-message icon=exclamation-mark-circle status=idle>${o}</calcite-input-message>`||""}<calcite-button appearance=outline width=full @click=${()=>this.#h()} slot=footer>${e.buttons.cancel}</calcite-button>${t==="add-spatial-feature"&&r`<calcite-button width=full slot=footer appearance=solid @click=${()=>this.#tt()} .disabled=${c}>${e.buttons.add}</calcite-button>`||""}`}#nt(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=starting-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#g} @arcgisTraceLocationSelectEnd=${this.#b} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#e} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#s} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#I)}></arcgis-utility-network-trace-location>`}#lt(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=stopping-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#g} @arcgisTraceLocationSelectEnd=${this.#b} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#e} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#o} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#D)}></arcgis-utility-network-trace-location>`}#ht(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#g} @arcgisTraceLocationSelectEnd=${this.#b} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#e} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#r} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${d(this.#E)}></arcgis-utility-network-trace-location>`}#dt(){let{_messages:t}=this;return r`<calcite-input clearable type=text .placeholder=${t.instructions.enterSubnetworkName} max-length=64 .status=${this.#t?"valid":"invalid"} .value=${this.#t} @calciteInputInput=${e=>this.#t=e.target.value}></calcite-input><calcite-input-message icon=exclamation-mark-triangle status=idle>${t.labels.tooManySubnetworks}</calcite-input-message>`}#ut(){return r`<calcite-combobox .label=${this._messages.labels.subnetworkName} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:t})=>{let e=t.selectedItems[0]?.value;this.#t=e}}>${this._compatibleSubnetworkNames.map(t=>r`<calcite-combobox-item .value=${t} .heading=${t} .selected=${t===this.#t}></calcite-combobox-item>`)}</calcite-combobox>`}#mt(){let{_messages:t}=this,e=t.labels.subnetworkName;return this.isSubnetworkNameTraceSelected?this._subnetworkNamesState==="loading"?r`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>`:this._compatibleSubnetworkNames.length?r`<calcite-block .heading=${e} .label=${e} expanded>${this._compatibleSubnetworkNames.length>A?this.#dt():this.#ut()}</calcite-block>`:this.#c(t.errors.noCompatibleSubnetworks,!1,"exclamation-mark-triangle"):null}#gt(){let{selectedNamedTraceConfiguration:t}=this;return this._traceConfiguration&&t?.traceType&&this.#f.has(t.traceType)?r`<calcite-block id=subnetwork-info-block expanded .label=${this._messages.labels.subnetworkInfo}><arcgis-utility-network-subnetwork-info .namedTraceConfiguration=${t}></arcgis-utility-network-subnetwork-info></calcite-block>`:null}#pt(){let{_messages:t}=this,{noTraceConfiguration:e,noNamedTraceConfigurations:i,utilityNetworkLoadFailed:a}=t.errors,s=this._utilityNetworks&&this._utilityNetworks.length>1?this.#at():null,o;this.selectedUtilityNetwork?.loadError?o=this.#c(a,!1,"exclamation-mark-triangle"):this._namedTraceConfigurations.length||(o=this.#c(i,!1,"exclamation-mark-triangle"));let c=r`${this.#it()}${this.#gt()}${this.#mt()}`,u=this.traceConfiguration?r`${this.#$?this.#nt():null}${this.#N?this.#lt():null}${this.#ht()}`:this.#c(e,!1,"exclamation-mark-triangle");return r`<calcite-block-group .label=${t.labels.traceInputs}>${s}${o??r`${c}${u}`}</calcite-block-group>`}render(){let{mode:t}=this;return r`<calcite-panel>${t==="add-spatial-feature"?this.#ot():null}<calcite-flow .hidden=${t==="add-spatial-feature"}>${this.#st()}${this.#rt()}</calcite-flow>${t!=="default"?this.#ct():null}</calcite-panel>`}};N("arcgis-utility-network-trace-inputs",f);return f},"core/Collection","core/reactiveUtils","intl","layers/GraphicsLayer","networks/support/UNTraceConfiguration","rest/networks/support/TraceLocation","views/interactive/snapping/FeatureSnappingLayerSource","widgets/Sketch/SketchViewModel",a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{d as i}from"./4SV6HHMC.js";import{a as z}from"./56KR4KYO.js";import{a as f}from"./WVGSH2QD.js";import{e as v}from"./5DI7RMZ6.js";import"./Q7SMGP5R.js";import"./QUZTFUWM.js";import"./NCYBFT2Y.js";import{N as u,O as p,T as k,a as b,b as d,w as g}from"./WTBRS6C4.js";import"./H6RQVSYM.js";export default $arcgis.t(([{substitute:$}])=>{var w="compact",x=new Map([["fr","full"],["he","full"],["ja","full"],["ko","compact-wrap"],["zh-CN","full"],["zh-HK","full-wrap"],["zh-TW","full-wrap"]]),F=new Set(["compact-wrap","full-wrap"]),m={hour:"numeric",minute:"numeric",timeZone:"UTC"},y={hour:"numeric",timeZone:"UTC"},T=a=>"";function C(a){let e=new Intl.DateTimeFormat(a,m),t=new Intl.DateTimeFormat(a,{...m,hourCycle:"h24"}),l=e.resolvedOptions().hour12===!1;return n=>{let r=i(n,"minutes","milliseconds"),s=new Date(r);return r!==0&&s.getUTCHours()===0&&s.getUTCMinutes()===0&&l?t.format(s):e.format(s)}}function D(a){let e=new Intl.DateTimeFormat(a,m),t=new Intl.DateTimeFormat(a,y),l=x.get(a)??w;return n=>{let r=Math.round(i(n,"minutes","hours")),s=i(r,"hours","milliseconds"),o=new Date(s);switch(l){case"full":case"full-wrap":return e.format(o);case"compact-wrap":return _(t.format(o)," ");default:return _(t.format(o),"\xA0")}}}function S(a){return F.has(x.get(a)??w)}function _(a,e){return a.replace(/\S+/gu,I).replace(/\s+/gu,e)}function I(a){return Array.from(a).join("\u2060")}var W=b`:host{display:block}arcgis-slider{--arcgis-slider-handle-size: var(--calcite-size-2xs);--slider-default-handle-size: var(--calcite-size-2xs);--slider-thumb-label-height: var(--calcite-input-number-height, 1.5rem);--tick-label-gap: var(--calcite-space-lg);--tick-label-font-size: var(--calcite-font-size--3);--tick-label-extra-line-count: 0;--range-label-font-size: var(--calcite-font-size--2);--range-label-padding-block-start: calc(var(--calcite-space-xs) / 2);--tick-label-padding-block-end-scale-adjustment: max( 0rem, calc(var(--slider-default-handle-size) - var(--arcgis-slider-handle-size)) );--tick-label-padding-block-end-base: calc(var(--tick-label-gap) - (var(--tick-label-font-size) / 2));--tick-label-padding-block-end-wrap: calc(var(--tick-label-font-size) * var(--tick-label-extra-line-count));--tick-label-padding-block-end: calc( var(--tick-label-padding-block-end-base) + var(--tick-label-padding-block-end-scale-adjustment) + var(--tick-label-padding-block-end-wrap) );--range-label-padding-block-end-base: calc(var(--slider-thumb-label-height) + (var(--arcgis-slider-handle-size) / 2));--range-label-padding-block-end-offset: calc(var(--range-label-padding-block-start) + var(--range-label-font-size));--range-label-padding-block-end: calc( var(--range-label-padding-block-end-base) - var(--range-label-padding-block-end-offset) );--calcite-font-size-sm: var(--range-label-font-size);display:block;margin-block-start:calc((var(--arcgis-slider-handle-size) / 2 + var(--range-label-padding-block-start)) * -1);padding-block-end:var(--tick-label-padding-block-end);&.wrap-labels{--tick-label-extra-line-count: 1}}:host([visual-scale="s"]) arcgis-slider{--arcgis-slider-handle-size: var(--calcite-size-4xs);--tick-label-font-size: var(--calcite-font-size--3);--range-label-font-size: var(--calcite-font-size--3);--tick-label-gap: var(--calcite-space-md)}:host([visual-scale="l"]) arcgis-slider{--arcgis-slider-handle-size: var(--calcite-size-xs);--tick-label-font-size: var(--calcite-font-size--2);--range-label-font-size: var(--calcite-font-size--1);--tick-label-gap: var(--calcite-space-xl)}.ticks-container{position:relative;width:100%}.time-range-label{position:relative;width:100%;font-size:var(--range-label-font-size);font-variant-numeric:tabular-nums;line-height:1em;padding-block-start:var(--range-label-padding-block-start);padding-block-end:var(--range-label-padding-block-end);text-align:center}.main-ticks,.secondary-ticks{position:absolute;inset:0;--arcgis-ticks-gap: var(--tick-label-gap);--arcgis-ticks-outline-color: var(--calcite-color-foreground-1)}.main-ticks{--arcgis-ticks-tick-length: calc(var(--calcite-size-fixed-xxxs) * 2);--arcgis-ticks-font-size: var(--tick-label-font-size);--arcgis-ticks-label-width: min-content;--arcgis-ticks-label-text-align: center;white-space:nowrap;word-break:auto-phrase;font-variant-numeric:tabular-nums}.wrap-labels .main-ticks{white-space:normal}.secondary-ticks{--arcgis-ticks-tick-length: var(--calcite-size-fixed-xxxs)}`,h=class extends u{constructor(){super(...arguments),this.messages=f({blocking:!0}),this._direction=v(),this._shouldWrapLabels=!1,this._sliderLabelFormatter=T,this._tickLabelFormatter=T,this.disabled=!1,this.mode="range",this.startTime=0,this.endTime=0,this.visualScale="m",this.arcgisTimeChange=g()}static{this.properties={_shouldWrapLabels:16,_values:16,_sliderLabelFormatter:16,_tickLabelFormatter:16,disabled:7,mode:3,startTime:9,endTime:9,label:1,steps:9,visualScale:3}}static{this.styles=W}willUpdate(e){(e.has("mode")||e.has("startTime")||e.has("endTime"))&&(this._values=this.mode==="single"?[this.startTime]:[this.startTime,this.endTime]),e.has("messages")&&this._updateLabelFormatters()}_setStartTime(e){this.startTime=e,this.arcgisTimeChange.emit()}_setRange(e,t){this.startTime=e,this.endTime=t,this.arcgisTimeChange.emit()}_updateLabelFormatters(){let e=this.messages._lang;this._sliderLabelFormatter=C(e),this._tickLabelFormatter=D(e),this._shouldWrapLabels=S(e)}_isolateTimeLabel(e){return this._direction==="rtl"?`\u2068${e}\u2069`:e}render(){let e=this.mode==="single"&&!this.disabled;return z(this.messages._lang,d`<arcgis-slider .ariaLabel=${this.label} class=${p({"wrap-labels":this._shouldWrapLabels})} .disabled=${this.disabled} .fillPlacement=${this.mode==="range"?"between":"none"} .labelFormatter=${this._sliderLabelFormatter} layout=horizontal min=0 .max=${c} .steps=${this.steps??1} .valueLabelsDisplay=${this.mode==="range"?"hidden":"always"} value-labels-placement=start .values=${this._values} @arcgisInput=${({currentTarget:{values:t}})=>{this.mode==="single"?this._setStartTime(t[0]):this._setRange(t[0],t[1])}}>${this.mode==="range"?this._renderTimeRange():void 0}<div class="ticks-container" slot=content-end><arcgis-ticks class="main-ticks" .interactive=${e} .labelFormatter=${this._tickLabelFormatter} layout=horizontal min=0 .max=${c} mode=value show-labels .values=${L} @arcgisTickClick=${t=>this._setStartTime(t.detail.value)}></arcgis-ticks><arcgis-ticks class="secondary-ticks" layout=horizontal min=0 .max=${c} mode=value .values=${R} @arcgisTickClick=${t=>this._setStartTime(t.detail.value)}></arcgis-ticks></div></arcgis-slider>`)}_renderTimeRange(){let e=this._isolateTimeLabel(this._sliderLabelFormatter(this.startTime)),t=this._isolateTimeLabel(this._sliderLabelFormatter(this.endTime)),l=this.messages?.timeRange;return d`<div class="time-range-label" aria-live=polite slot=content-start>${$(l??"{start} \u2014 {end}",{start:e,end:t})}</div>`}},c=i(24,"hours","minutes")-1,L=[0,6,12,18].map(a=>i(a,"hours","minutes"));L.push(c);var R=[2,4,8,10,14,16,20,22].map(a=>i(a,"hours","minutes"));k("arcgis-time-of-day-slider",h);return h},"intl")
2
+ import{d as i}from"./O7RSAJOS.js";import{a as z}from"./56KR4KYO.js";import{a as f}from"./WVGSH2QD.js";import{e as v}from"./5DI7RMZ6.js";import"./Q7SMGP5R.js";import"./QUZTFUWM.js";import"./NCYBFT2Y.js";import{N as u,O as p,T as k,a as b,b as d,w as g}from"./WTBRS6C4.js";import"./H6RQVSYM.js";export default $arcgis.t(([{substitute:$}])=>{var w="compact",x=new Map([["fr","full"],["he","full"],["ja","full"],["ko","compact-wrap"],["zh-CN","full"],["zh-HK","full-wrap"],["zh-TW","full-wrap"]]),F=new Set(["compact-wrap","full-wrap"]),m={hour:"numeric",minute:"numeric",timeZone:"UTC"},y={hour:"numeric",timeZone:"UTC"},T=a=>"";function C(a){let e=new Intl.DateTimeFormat(a,m),t=new Intl.DateTimeFormat(a,{...m,hourCycle:"h24"}),l=e.resolvedOptions().hour12===!1;return n=>{let r=i(n,"minutes","milliseconds"),s=new Date(r);return r!==0&&s.getUTCHours()===0&&s.getUTCMinutes()===0&&l?t.format(s):e.format(s)}}function D(a){let e=new Intl.DateTimeFormat(a,m),t=new Intl.DateTimeFormat(a,y),l=x.get(a)??w;return n=>{let r=Math.round(i(n,"minutes","hours")),s=i(r,"hours","milliseconds"),o=new Date(s);switch(l){case"full":case"full-wrap":return e.format(o);case"compact-wrap":return _(t.format(o)," ");default:return _(t.format(o),"\xA0")}}}function S(a){return F.has(x.get(a)??w)}function _(a,e){return a.replace(/\S+/gu,I).replace(/\s+/gu,e)}function I(a){return Array.from(a).join("\u2060")}var W=b`:host{display:block}arcgis-slider{--arcgis-slider-handle-size: var(--calcite-size-2xs);--slider-default-handle-size: var(--calcite-size-2xs);--slider-thumb-label-height: var(--calcite-input-number-height, 1.5rem);--tick-label-gap: var(--calcite-space-lg);--tick-label-font-size: var(--calcite-font-size--3);--tick-label-extra-line-count: 0;--range-label-font-size: var(--calcite-font-size--2);--range-label-padding-block-start: calc(var(--calcite-space-xs) / 2);--tick-label-padding-block-end-scale-adjustment: max( 0rem, calc(var(--slider-default-handle-size) - var(--arcgis-slider-handle-size)) );--tick-label-padding-block-end-base: calc(var(--tick-label-gap) - (var(--tick-label-font-size) / 2));--tick-label-padding-block-end-wrap: calc(var(--tick-label-font-size) * var(--tick-label-extra-line-count));--tick-label-padding-block-end: calc( var(--tick-label-padding-block-end-base) + var(--tick-label-padding-block-end-scale-adjustment) + var(--tick-label-padding-block-end-wrap) );--range-label-padding-block-end-base: calc(var(--slider-thumb-label-height) + (var(--arcgis-slider-handle-size) / 2));--range-label-padding-block-end-offset: calc(var(--range-label-padding-block-start) + var(--range-label-font-size));--range-label-padding-block-end: calc( var(--range-label-padding-block-end-base) - var(--range-label-padding-block-end-offset) );--calcite-font-size-sm: var(--range-label-font-size);display:block;margin-block-start:calc((var(--arcgis-slider-handle-size) / 2 + var(--range-label-padding-block-start)) * -1);padding-block-end:var(--tick-label-padding-block-end);&.wrap-labels{--tick-label-extra-line-count: 1}}:host([visual-scale="s"]) arcgis-slider{--arcgis-slider-handle-size: var(--calcite-size-4xs);--tick-label-font-size: var(--calcite-font-size--3);--range-label-font-size: var(--calcite-font-size--3);--tick-label-gap: var(--calcite-space-md)}:host([visual-scale="l"]) arcgis-slider{--arcgis-slider-handle-size: var(--calcite-size-xs);--tick-label-font-size: var(--calcite-font-size--2);--range-label-font-size: var(--calcite-font-size--1);--tick-label-gap: var(--calcite-space-xl)}.ticks-container{position:relative;width:100%}.time-range-label{position:relative;width:100%;font-size:var(--range-label-font-size);font-variant-numeric:tabular-nums;line-height:1em;padding-block-start:var(--range-label-padding-block-start);padding-block-end:var(--range-label-padding-block-end);text-align:center}.main-ticks,.secondary-ticks{position:absolute;inset:0;--arcgis-ticks-gap: var(--tick-label-gap);--arcgis-ticks-outline-color: var(--calcite-color-foreground-1)}.main-ticks{--arcgis-ticks-tick-length: calc(var(--calcite-size-fixed-xxxs) * 2);--arcgis-ticks-font-size: var(--tick-label-font-size);--arcgis-ticks-label-width: min-content;--arcgis-ticks-label-text-align: center;white-space:nowrap;word-break:auto-phrase;font-variant-numeric:tabular-nums}.wrap-labels .main-ticks{white-space:normal}.secondary-ticks{--arcgis-ticks-tick-length: var(--calcite-size-fixed-xxxs)}`,h=class extends u{constructor(){super(...arguments),this.messages=f({blocking:!0}),this._direction=v(),this._shouldWrapLabels=!1,this._sliderLabelFormatter=T,this._tickLabelFormatter=T,this.disabled=!1,this.mode="range",this.startTime=0,this.endTime=0,this.visualScale="m",this.arcgisTimeChange=g()}static{this.properties={_shouldWrapLabels:16,_values:16,_sliderLabelFormatter:16,_tickLabelFormatter:16,disabled:7,mode:3,startTime:9,endTime:9,label:1,steps:9,visualScale:3}}static{this.styles=W}willUpdate(e){(e.has("mode")||e.has("startTime")||e.has("endTime"))&&(this._values=this.mode==="single"?[this.startTime]:[this.startTime,this.endTime]),e.has("messages")&&this._updateLabelFormatters()}_setStartTime(e){this.startTime=e,this.arcgisTimeChange.emit()}_setRange(e,t){this.startTime=e,this.endTime=t,this.arcgisTimeChange.emit()}_updateLabelFormatters(){let e=this.messages._lang;this._sliderLabelFormatter=C(e),this._tickLabelFormatter=D(e),this._shouldWrapLabels=S(e)}_isolateTimeLabel(e){return this._direction==="rtl"?`\u2068${e}\u2069`:e}render(){let e=this.mode==="single"&&!this.disabled;return z(this.messages._lang,d`<arcgis-slider .ariaLabel=${this.label} class=${p({"wrap-labels":this._shouldWrapLabels})} .disabled=${this.disabled} .fillPlacement=${this.mode==="range"?"between":"none"} .labelFormatter=${this._sliderLabelFormatter} layout=horizontal min=0 .max=${c} .steps=${this.steps??1} .valueLabelsDisplay=${this.mode==="range"?"hidden":"always"} value-labels-placement=start .values=${this._values} @arcgisInput=${({currentTarget:{values:t}})=>{this.mode==="single"?this._setStartTime(t[0]):this._setRange(t[0],t[1])}}>${this.mode==="range"?this._renderTimeRange():void 0}<div class="ticks-container" slot=content-end><arcgis-ticks class="main-ticks" .interactive=${e} .labelFormatter=${this._tickLabelFormatter} layout=horizontal min=0 .max=${c} mode=value show-labels .values=${L} @arcgisTickClick=${t=>this._setStartTime(t.detail.value)}></arcgis-ticks><arcgis-ticks class="secondary-ticks" layout=horizontal min=0 .max=${c} mode=value .values=${R} @arcgisTickClick=${t=>this._setStartTime(t.detail.value)}></arcgis-ticks></div></arcgis-slider>`)}_renderTimeRange(){let e=this._isolateTimeLabel(this._sliderLabelFormatter(this.startTime)),t=this._isolateTimeLabel(this._sliderLabelFormatter(this.endTime)),l=this.messages?.timeRange;return d`<div class="time-range-label" aria-live=polite slot=content-start>${$(l??"{start} \u2014 {end}",{start:e,end:t})}</div>`}},c=i(24,"hours","minutes")-1,L=[0,6,12,18].map(a=>i(a,"hours","minutes"));L.push(c);var R=[2,4,8,10,14,16,20,22].map(a=>i(a,"hours","minutes"));k("arcgis-time-of-day-slider",h);return h},"intl")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import j from"./JTBVK3AS.js";import{a as P}from"./BIU6VS3K.js";import i from"./O6F37YLT.js";import"./VJVKFKSG.js";import g from"./AZYY5BTK.js";import{a as C}from"./WVGSH2QD.js";import{a as u}from"./JD74LG7K.js";import e from"./ANSNQBZW.js";import c from"./XXA7VSON.js";import{g as M}from"./5DI7RMZ6.js";import"./Q7SMGP5R.js";import a from"./SYDGAFU5.js";import"./QUZTFUWM.js";import{d as _}from"./NCYBFT2Y.js";import{L as v,M as b,N as w,O as d,Q as y,T as E,a as f,b as p,w as h}from"./WTBRS6C4.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:$},{property:c,subclass:k},D,{onLocaleChange:G},z,B,,,,T,{d:O},{a:S,b:L}])=>{var I=f`.arcgis-button{--calcite-icon-color: var(--calcite-color-text-3);--calcite-button-background-color: var(--calcite-color-foreground-1);color:var(--calcite-color-text-3);line-height:var(--calcite-font-line-height-relative-tight);calcite-button{--calcite-offset-invert-focus: 1}display:flex;flex-flow:column;cursor:pointer;background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);:hover{--calcite-icon-color: var(--calcite-color-text-1);--calcite-button-background-color: var(--calcite-color-transparent-hover)}}:host{width:fit-content;height:fit-content}`,A=Object.defineProperty,R=Object.getOwnPropertyDescriptor,s=(e,t,i,a)=>{for(var o=a>1?void 0:a?R(t,i):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(o=(a?n(t,i,o):n(o))||o);return a&&o&&A(t,i,o),o},U=new B({icon:"trash",id:"remove-selected-feature",title:"{messages.remove}"})._internalSetClassName("esri-icon-trash");function j(e){return new z({title:e.currentLocation,fieldInfos:[{fieldName:"timestamp",label:e.timestamp,format:{dateFormat:"short-date-short-time"}},{fieldName:"latitude",label:e.latitude,format:{places:4,digitSeparator:!0}},{fieldName:"longitude",label:e.longitude,format:{places:4,digitSeparator:!0}},{fieldName:"accuracy",label:e.accuracy,format:{places:0,digitSeparator:!0}},{fieldName:"altitude",label:e.altitude,format:{places:0,digitSeparator:!0}},{fieldName:"altitudeAccuracy",label:e.altitudeAccuracy,format:{places:0,digitSeparator:!0}},{fieldName:"heading",label:e.heading,format:{places:0,digitSeparator:!0}},{fieldName:"speed",label:e.speed,format:{places:0,digitSeparator:!0}}],actions:[U.clone()],content:[{type:"fields"}]})}var r=class extends L{constructor(e){super(e),this._getCurrentPosition=S,this.popupEnabled=!0,this.locate=this.locate.bind(this)}initialize(){this.addHandles([G(()=>{let{graphic:e,view:t}=this;e&&t?.graphics?.includes(e)&&this._updatePopupTemplate(e)})])}destroy(){this.cancelLocate()}get state(){return this._geolocationUsable?this.view?.ready?this._locateController?"locating":this.error!=null?"error":"ready":"disabled":"feature-unsupported"}async locate(){if(this.cancelLocate(),this.state==="disabled")throw new D("locate:disabled-state","Cannot locate when disabled.");if(this.state==="feature-unsupported")throw new D("locate:feature-unsupported-state","Cannot locate in unsecure domain.");let e=new AbortController;this._locateController=e,this.error=void 0;try{let t=await this._getCurrentPosition(this.geolocationOptions);if(await this.updatePosition(t,e),this._locateController!==e)return null;let{graphic:i}=this;return i&&this._updatePopupTemplate(i),this._addGraphic(),this.currentPosition=t,this._locateController=void 0,t}catch(t){if(O(t))return null;throw e===this._locateController&&(this._locateController=void 0),this.error=t,t}}cancelLocate(){this._clearGraphic(),this._locateController&&this._locateController.abort(),this._locateController=void 0}_updatePopupTemplate(e){if(!this.popupEnabled)return;let t=j(this.messages),i=e!==this.graphic;this.destroyed||i||(e.popupTemplate=t)}};s([c()],r.prototype,"_locateController",2);s([c()],r.prototype,"currentPosition",2);s([c()],r.prototype,"error",2);s([c()],r.prototype,"messages",2);s([c()],r.prototype,"popupEnabled",2);s([c({readOnly:!0})],r.prototype,"state",1);r=s([k("map-components.locate.LocateViewModel")],r);var V=r,N="gps-off",H=T(V),m=class extends w{constructor(){super(),this.locateButtonElement=v(),this.messages=C(),this.viewModel=H(this),this.hideErrorTooltip=()=>{this.isErrorTooltipOpen=!1},this.isErrorTooltipOpen=!1,this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.geolocationOptions=this.viewModel.geolocationOptions,this.goToLocationDisabled=this.viewModel.goToLocationEnabled,this.goToOverride=this.viewModel.goToOverride,this.graphic=this.viewModel.graphic,this.icon=N,this.popupDisabled=this.viewModel.popupEnabled,this.scale=this.viewModel.scale,this.state=this.viewModel.state,this.visualScale="m",this.arcgisError=h(),this.arcgisPropertyChange=M()("state"),this.arcgisReady=h(),this.arcgisSuccess=h(),this.listenOn(document,"click",this.hideErrorTooltip)}static{this.properties={isErrorTooltipOpen:16,view:0,autoDestroyDisabled:5,geolocationOptions:0,goToLocationDisabled:7,goToOverride:0,graphic:0,icon:1,label:1,messageOverrides:0,popupDisabled:5,referenceElement:1,scale:9,state:32,visualScale:1}}static{this.styles=I}async cancelLocate(){this.viewModel.cancelLocate()}async destroy(){await this.manager.destroy()}async locate(){return await this.viewModel.locate()}loaded(){this.viewModel.messages={...this.messages,...this.messageOverrides},this.manager.onLifecycle(()=>[$(()=>this.viewModel.error,t=>{this.isErrorTooltipOpen=!!t,this.arcgisError.emit({error:t})}),$(()=>this.viewModel.currentPosition,t=>{this.arcgisSuccess.emit({position:t})})])}_localizeError(t){if(t instanceof GeolocationPositionError)return t.code===GeolocationPositionError.PERMISSION_DENIED?this.messages?.permissionError:t.code===GeolocationPositionError.TIMEOUT?this.messages?.timeoutError:this.messages?.positionUnavailable;if(t instanceof Error)return t.message}_locate(){let{viewModel:t}=this;t.state==="locating"?t.cancelLocate():t.locate().catch(()=>{})}render(){let{viewModel:t,icon:i}=this,{state:a}=t,o=a==="locating",l=o?this.messages.cancel:this.messages.title,n=a==="feature-unsupported",x=P===void 0?N:void 0,g=this._localizeError(this.viewModel?.error);return p`<div class=${d(_("root",u.arcgisButton))}>${!n&&p`<calcite-button class=${d(u.widgetButton)} .disabled=${a==="disabled"} .loading=${o} .iconStart=${o?void 0:i??x} kind=neutral .label=${l} @click=${this._locate} .scale=${this.visualScale} title=${l??y} ${b(this.locateButtonElement)}></calcite-button>`||""}${g?p`<calcite-tooltip .open=${this.isErrorTooltipOpen} overlay-positioning=fixed .referenceElement=${this.locateButtonElement.value}>${g}</calcite-tooltip>`:null}</div>`}};E("arcgis-locate",m);return m},"core/reactiveUtils","core/accessorSupport/decorators","core/Error","intl","PopupTemplate","support/actions/ActionButton",a,c,e,g,i,j)
2
+ import j from"./JFHEHJOQ.js";import{a as P}from"./BIU6VS3K.js";import i from"./HAUHWMHN.js";import"./VJVKFKSG.js";import g from"./AZYY5BTK.js";import{a as C}from"./WVGSH2QD.js";import{a as u}from"./JD74LG7K.js";import e from"./ANSNQBZW.js";import c from"./XXA7VSON.js";import{g as M}from"./5DI7RMZ6.js";import"./Q7SMGP5R.js";import a from"./SYDGAFU5.js";import"./QUZTFUWM.js";import{d as _}from"./NCYBFT2Y.js";import{L as v,M as b,N as w,O as d,Q as y,T as E,a as f,b as p,w as h}from"./WTBRS6C4.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:$},{property:c,subclass:k},D,{onLocaleChange:G},z,B,,,,T,{d:O},{a:S,b:L}])=>{var I=f`.arcgis-button{--calcite-icon-color: var(--calcite-color-text-3);--calcite-button-background-color: var(--calcite-color-foreground-1);color:var(--calcite-color-text-3);line-height:var(--calcite-font-line-height-relative-tight);calcite-button{--calcite-offset-invert-focus: 1}display:flex;flex-flow:column;cursor:pointer;background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);:hover{--calcite-icon-color: var(--calcite-color-text-1);--calcite-button-background-color: var(--calcite-color-transparent-hover)}}:host{width:fit-content;height:fit-content}`,A=Object.defineProperty,R=Object.getOwnPropertyDescriptor,s=(e,t,i,a)=>{for(var o=a>1?void 0:a?R(t,i):t,l=e.length-1,n;l>=0;l--)(n=e[l])&&(o=(a?n(t,i,o):n(o))||o);return a&&o&&A(t,i,o),o},U=new B({icon:"trash",id:"remove-selected-feature",title:"{messages.remove}"})._internalSetClassName("esri-icon-trash");function j(e){return new z({title:e.currentLocation,fieldInfos:[{fieldName:"timestamp",label:e.timestamp,format:{dateFormat:"short-date-short-time"}},{fieldName:"latitude",label:e.latitude,format:{places:4,digitSeparator:!0}},{fieldName:"longitude",label:e.longitude,format:{places:4,digitSeparator:!0}},{fieldName:"accuracy",label:e.accuracy,format:{places:0,digitSeparator:!0}},{fieldName:"altitude",label:e.altitude,format:{places:0,digitSeparator:!0}},{fieldName:"altitudeAccuracy",label:e.altitudeAccuracy,format:{places:0,digitSeparator:!0}},{fieldName:"heading",label:e.heading,format:{places:0,digitSeparator:!0}},{fieldName:"speed",label:e.speed,format:{places:0,digitSeparator:!0}}],actions:[U.clone()],content:[{type:"fields"}]})}var r=class extends L{constructor(e){super(e),this._getCurrentPosition=S,this.popupEnabled=!0,this.locate=this.locate.bind(this)}initialize(){this.addHandles([G(()=>{let{graphic:e,view:t}=this;e&&t?.graphics?.includes(e)&&this._updatePopupTemplate(e)})])}destroy(){this.cancelLocate()}get state(){return this._geolocationUsable?this.view?.ready?this._locateController?"locating":this.error!=null?"error":"ready":"disabled":"feature-unsupported"}async locate(){if(this.cancelLocate(),this.state==="disabled")throw new D("locate:disabled-state","Cannot locate when disabled.");if(this.state==="feature-unsupported")throw new D("locate:feature-unsupported-state","Cannot locate in unsecure domain.");let e=new AbortController;this._locateController=e,this.error=void 0;try{let t=await this._getCurrentPosition(this.geolocationOptions);if(await this.updatePosition(t,e),this._locateController!==e)return null;let{graphic:i}=this;return i&&this._updatePopupTemplate(i),this._addGraphic(),this.currentPosition=t,this._locateController=void 0,t}catch(t){if(O(t))return null;throw e===this._locateController&&(this._locateController=void 0),this.error=t,t}}cancelLocate(){this._clearGraphic(),this._locateController&&this._locateController.abort(),this._locateController=void 0}_updatePopupTemplate(e){if(!this.popupEnabled)return;let t=j(this.messages),i=e!==this.graphic;this.destroyed||i||(e.popupTemplate=t)}};s([c()],r.prototype,"_locateController",2);s([c()],r.prototype,"currentPosition",2);s([c()],r.prototype,"error",2);s([c()],r.prototype,"messages",2);s([c()],r.prototype,"popupEnabled",2);s([c({readOnly:!0})],r.prototype,"state",1);r=s([k("map-components.locate.LocateViewModel")],r);var V=r,N="gps-off",H=T(V),m=class extends w{constructor(){super(),this.locateButtonElement=v(),this.messages=C(),this.viewModel=H(this),this.hideErrorTooltip=()=>{this.isErrorTooltipOpen=!1},this.isErrorTooltipOpen=!1,this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.geolocationOptions=this.viewModel.geolocationOptions,this.goToLocationDisabled=this.viewModel.goToLocationEnabled,this.goToOverride=this.viewModel.goToOverride,this.graphic=this.viewModel.graphic,this.icon=N,this.popupDisabled=this.viewModel.popupEnabled,this.scale=this.viewModel.scale,this.state=this.viewModel.state,this.visualScale="m",this.arcgisError=h(),this.arcgisPropertyChange=M()("state"),this.arcgisReady=h(),this.arcgisSuccess=h(),this.listenOn(document,"click",this.hideErrorTooltip)}static{this.properties={isErrorTooltipOpen:16,view:0,autoDestroyDisabled:5,geolocationOptions:0,goToLocationDisabled:7,goToOverride:0,graphic:0,icon:1,label:1,messageOverrides:0,popupDisabled:5,referenceElement:1,scale:9,state:32,visualScale:1}}static{this.styles=I}async cancelLocate(){this.viewModel.cancelLocate()}async destroy(){await this.manager.destroy()}async locate(){return await this.viewModel.locate()}loaded(){this.viewModel.messages={...this.messages,...this.messageOverrides},this.manager.onLifecycle(()=>[$(()=>this.viewModel.error,t=>{this.isErrorTooltipOpen=!!t,this.arcgisError.emit({error:t})}),$(()=>this.viewModel.currentPosition,t=>{this.arcgisSuccess.emit({position:t})})])}_localizeError(t){if(t instanceof GeolocationPositionError)return t.code===GeolocationPositionError.PERMISSION_DENIED?this.messages?.permissionError:t.code===GeolocationPositionError.TIMEOUT?this.messages?.timeoutError:this.messages?.positionUnavailable;if(t instanceof Error)return t.message}_locate(){let{viewModel:t}=this;t.state==="locating"?t.cancelLocate():t.locate().catch(()=>{})}render(){let{viewModel:t,icon:i}=this,{state:a}=t,o=a==="locating",l=o?this.messages.cancel:this.messages.title,n=a==="feature-unsupported",x=P===void 0?N:void 0,g=this._localizeError(this.viewModel?.error);return p`<div class=${d(_("root",u.arcgisButton))}>${!n&&p`<calcite-button class=${d(u.widgetButton)} .disabled=${a==="disabled"} .loading=${o} .iconStart=${o?void 0:i??x} kind=neutral .label=${l} @click=${this._locate} .scale=${this.visualScale} title=${l??y} ${b(this.locateButtonElement)}></calcite-button>`||""}${g?p`<calcite-tooltip .open=${this.isErrorTooltipOpen} overlay-positioning=fixed .referenceElement=${this.locateButtonElement.value}>${g}</calcite-tooltip>`:null}</div>`}};E("arcgis-locate",m);return m},"core/reactiveUtils","core/accessorSupport/decorators","core/Error","intl","PopupTemplate","support/actions/ActionButton",a,c,e,g,i,j)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as C}from"./XEK22IDA.js";import{a as I}from"./56KR4KYO.js";import b from"./MZWO5JYA.js";import a from"./HAUHWMHN.js";import"./VJVKFKSG.js";import{N as $,R as F,T as L,a as q,b as p}from"./WTBRS6C4.js";import"./H6RQVSYM.js";export default $arcgis.t(([{createReactiveMap:k,findUtilityNetwork:U,getOrCreateMapValue:P},{stripHTML:E},f,{ignoreAbortErrors:S},{watch:v},V,x,Q,B,,{b:N,f:A}])=>{var G=q`.list-container{min-height:var(--calcite-spacing-xxxl)}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.sticky-loading-container{display:flex;position:sticky;bottom:var(--calcite-spacing-sm);align-items:center;justify-content:center;z-index:2;margin:0;padding:0;height:var(--calcite-spacing-xxxl);pointer-events:none;height:500px}`,M=100,D={assetGroup:"assetgroup",assetType:"assettype"},j="{00000000-0000-0000-0000-000000000000}",T=class extends ${constructor(){super(...arguments),this._addFlowItem=t=>{t&&this.flowItems?.push(t)},this._attachmentAssociations=new f,this._attachmentFeatureCount=0,this._cancelQuery=()=>{let{_queryAbortController:t}=this;t&&t.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{let{_queryFeatureCountAbortController:t}=this;t&&t.abort(),this._queryFeatureCountAbortController=null},this._connectivityAssociations=new f,this._connectivityFeatureCount=0,this._containerAssociations=new f,this._containerFeatureCount=0,this._contentAssociations=new f,this._contentFeatureCount=0,this._networkSourceIdsInUse=new Set,this._query=async t=>{if(!t)return;await this._loadUtiltyNetworks();let{_queryAbortController:e}=this;this._destroyAssociatedFeatureViewModels(),this._clearFeatures(),this._featureCount&&await this._queryAssociatedFeatures(t,{signal:e?.signal})},this._queryController=async t=>{this._cancelQuery();let e=new AbortController;this._queryAbortController=e,await S(this._query(t)),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();let t=new AbortController;this._queryFeatureCountAbortController=t,await S(this._queryFeatureCount()),this._queryFeatureCountAbortController===t&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryDebounced=C(this._queryController,M),this._queryFeatureCountDebounced=C(this._queryFeatureCountController,M),this._structureAssociations=new f,this._structureFeatureCount=0,this._queryAssociationType=async()=>{this._activeAssociationType&&this._queryDebounced(this._activeAssociationType)},this._associationFeatures=k(),this._associationViewModels=k(),this._featureCount=0,this._loaded=!1,this._queryAbortController=null,this._queryFeatureCountAbortController=null,this._queryPageAbortController=null,this.associationTypes=null,this.autoDestroyDisabled=!1,this.useFeatureNextFlowItem=!1,this.flowType="feature-utility-network-associations",this.headingLevel=2,this.source="popup"}static{this.properties={_activeAssociationType:16,_associationFeatures:16,_associationViewModels:16,_canLoad:16,_canQuery:16,_featureCount:16,_loaded:16,_queryAbortController:16,_queryFeatureCountAbortController:16,_queryPageAbortController:16,_state:16,associationTypes:0,autoDestroyDisabled:5,description:1,flowItems:0,useFeatureNextFlowItem:5,flowType:1,graphic:0,heading:1,headingLevel:9,layer:0,map:0,messages:0,parentFeatureViewModel:0,referenceElement:1,source:1,spatialReference:0,timeZone:1,view:0}}static{this.styles=G}get _globalId(){return(this._globalIdField&&this.graphic?.attributes?.[this._globalIdField])??null}get _globalIdField(){return this.layer?.globalIdField}get _objectId(){return(this._objectIdField&&this.graphic?.attributes?.[this._objectIdField])??null}get _objectIdField(){return this.layer?.objectIdField}get _supportsCacheHint(){return!!this.layer?.capabilities?.queryRelated?.supportsCacheHint}get _utilityNetwork(){let{layer:t,map:e}=this;if(!t?.loaded||!e)return null;let s=A(t)?t.parent:t;return U(e,s)}get _canLoad(){return!!this.map}get _canQuery(){return!!this.layer?.capabilities?.query?.supportsPagination}get _state(){let{_canLoad:t,_canQuery:e,_featureCount:s,_loaded:a,_queryAbortController:i,_queryFeatureCountAbortController:r,_queryPageAbortController:o,associationTypes:l}=this;return r||t&&!a?"loading":i||o?"querying":!this._globalId||!l||!e||!s?"disabled":"ready"}get heading(){return this._heading}set heading(t){this._heading=t}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[v(()=>[this.graphic,this.layer,this.map,this.associationTypes,this._canQuery,this._objectId,this._globalId],()=>{this._queryFeatureCountDebounced(),this._queryAssociationType()},{initial:!0}),v(()=>this._activeAssociationType,t=>{this._queryDebounced(t)}),v(()=>this._associationFeatures.values(),()=>{this._setUpUtilityNetworkAssociationsViewModels()})]),this.manager.onDestroy(()=>{this._cancelQuery(),this._cancelQueryFeatureCount()})}_addAssociationTypeFlowItem(t){let e=this.useFeatureNextFlowItem?F(p`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this._getParentFeatureDescription()} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(t)} .messages=${this.messages} .map=${this.map} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .state=${this._state} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} use-feature-next-flow-item .view=${this.view}></arcgis-feature-utility-network-association-list>`):F(p`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this._getParentFeatureDescription()} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(t)} .messages=${this.messages} .map=${this.map} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .state=${this._state} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature-utility-network-association-list>`);this._addFlowItem(e)}_clearAssociations(){this._attachmentAssociations.removeAll(),this._connectivityAssociations.removeAll(),this._containerAssociations.removeAll(),this._contentAssociations.removeAll(),this._structureAssociations.removeAll()}_clearFeatures(){this._associationFeatures.forEach(t=>t.removeAll()),this._associationFeatures.clear()}_compareByFeatureTitle(t,e){return t.title.localeCompare(e.title,void 0,{numeric:!0})}async _countAssociatedFeatureCount(t,e,s,a,i){let r=this._getFeatureQueryWhereClause(t,e,s,a),o=t.createQuery();return o.where=r,o.outFields=["*"],o.returnGeometry=!1,await t.queryFeatureCount(o,{signal:i?.signal})}async _countAssociatedFeatures(t,e,s,a,i){if(!e.length)return 0;let r=await this._findLayersBySourceId(t);await this._loadLayers(r);let o=r.map(l=>this._countAssociatedFeatureCount(l,e,s,a,i));return(await Promise.all(o)).reduce((l,c)=>l+c,0)}async _createAssociationFeatureObjects(t,e,s,a,i){if(!t.length)return[];let r=new Map,o=Array.from(e.entries()).map(async([c,d])=>{let u=await this._findLayersBySourceId(c);await this._loadLayers(u);let h=u.map(m=>this._queryLayer(m,d,s,a,i));(await Promise.all(h)).forEach(m=>{m.forEach(n=>{if(this.source==="popup"?n.sourceLayer&&n.getEffectivePopupTemplate():n.sourceLayer){let _=n.layer.globalIdField??"",y=n.getAttribute(_),w=r.get(y)??[];w.push(n),r.set(y,w)}})})});await Promise.all(o);let l=[];return await Promise.all(t.toArray().map(async c=>{let{fromNetworkElement:d,toNetworkElement:u}=c,h=d.globalId===this._globalId?u:d,m=r.get(h.globalId)??[];await Promise.all(m.map(async n=>{let _=this._utilityNetwork?.getTerminalById(h?.terminalId??void 0)?.name,y=await n.sourceLayer.getFeatureTitle(n)||this._getFeatureTitle(n);l.push({title:y,feature:n,association:c,terminalName:_})}))})),l}_destroyAssociatedFeatureViewModels(){this._associationViewModels.forEach(t=>t.destroyAll())}_equals(t,e){if(t.globalId===j&&e.globalId===j){let s=function(d,u){return d.networkSourceId===u.networkSourceId&&d.globalId===u.globalId&&d.terminalId===u.terminalId&&d.firstUnit===u.firstUnit&&d.numUnits===u.numUnits},a=t.fromNetworkElement,i=t.toNetworkElement,r=e.fromNetworkElement,o=e.toNetworkElement,l=s(a,r),c=s(i,o);return l&&c&&t.associationType===e.associationType}return t.globalId!=null&&e.globalId!=null&&t.globalId===e.globalId}async _findLayersBySourceId(t){let{_utilityNetwork:e,map:s}=this;e?.loaded||await e?.load();let a=e.getLayerIdBySourceId(t),i=s.allLayers.filter(o=>!!e?.isUtilityLayer(o)&&o.layerId===a),r=s.allTables.filter(o=>!!e?.isUtilityLayer(o)&&o.layerId===a);return i.concat(r).toArray()}_getAssociationsByType(t){switch(t){case"attachment":return this._attachmentAssociations;case"structure":return this._structureAssociations;case"connectivity":return this._connectivityAssociations;case"container":return this._containerAssociations;case"content":return this._contentAssociations}}_getAssociationTypeTitle(t){let{messages:e}=this;if(t.title)return t.title;switch(t.type){case"attachment":return e?.associationsAttachments??this.messages?.noTitle??"";case"connectivity":return e?.associationsConnectivity??this.messages?.noTitle??"";case"structure":return e?.associationsStructure??this.messages?.noTitle??"";case"content":return e?.associationsContents??this.messages?.noTitle??"";case"container":return e?.associationsContainer??this.messages?.noTitle??""}}_getFeatureCountForAssociationType(t){switch(t){case"attachment":return this._attachmentFeatureCount;case"structure":return this._structureFeatureCount;case"content":return this._contentFeatureCount;case"container":return this._containerFeatureCount;case"connectivity":return this._connectivityFeatureCount}}_getFeatureQueryWhereClause(t,e,s,a){let i=t.globalIdField,r=t.fieldsIndex.get(D.assetGroup),o=t.fieldsIndex.get(D.assetType),l=s!=null,c=a!=null,d=i?V.sqlIn(i,e):null,u=l?`(${r?.name} = ${s})`:null,h=l&&c?`(${o?.name} = ${a})`:null;return[d,u,h].filter(Boolean).join(" AND ")}_getFeatureTitle(t){let e=t.attributes,s=t.sourceLayer;if(!e||!s)return"";let a="displayField"in s?s.displayField:null,i=a!=null?e[a.toString()]:null,r=i!=null?i.toString():null,o=t.getObjectId()?.toString();return r||o||""}_getParentFeatureDescription(){let{parentFeatureViewModel:t}=this;if(t){if("heading"in t)return t.heading;if("title"in t)return t.title}}async _loadUtiltyNetworks(){let t=this.map;if(!t)return;t.utilityNetworks&&await Promise.allSettled(t.utilityNetworks.map(s=>s.load()));let e=this._utilityNetwork;if(e){let s=a=>{if("layerId"in a&&e.isUtilityLayer(a)){let i=a.layerId!=null?e.getSourceIdByLayerId(a.layerId):null;i!=null&&this._networkSourceIdsInUse.add(i)}};this._networkSourceIdsInUse=new Set,t.allLayers.forEach(s),t.allTables.forEach(s)}}async _loadLayers(t){let e=t.filter(s=>!s.loaded).map(s=>s.load());e.length&&await Promise.allSettled(e)}_matchesGlobalFeature(t,e){return this._equals(t.association,e.association)}async _queryAssociatedFeatures(t,e){let{layer:s,_globalId:a,associationTypes:i,_utilityNetwork:r,_canQuery:o,_associationFeatures:l}=this;if(await Promise.allSettled([s?.load(),r?.load()]),!o||!s||!i||!r)return;let c=this._getAssociationsByType(t.type),{associatedAssetGroup:d,associatedAssetType:u}=t,h=new Map;c.forEach(n=>{let{fromNetworkElement:_,toNetworkElement:y}=n,{networkSourceId:w,elementGlobalId:b}=_.globalId===a?{networkSourceId:y.networkSourceId,elementGlobalId:y.globalId}:{networkSourceId:_.networkSourceId,elementGlobalId:_.globalId},g=h.get(w)||[];g.push(b),h.set(w,g)});let m=await this._createAssociationFeatureObjects(c,h,d,u,e);this._parseFeatureObjects(m,l)}async _queryAssociations(t){let{layer:e,_globalId:s,associationTypes:a,_utilityNetwork:i,_canQuery:r}=this;if(await Promise.allSettled([e?.load(),i?.load()]),this._clearAssociations(),!r||!e||!a||!i||!s)return;let o=A(e)?e.parent:e,l=new x({globalId:s,networkSourceId:i.getSourceIdByLayerId(o.layerId)}),c=new Set;a.forEach(n=>{switch(n.type){case"attachment":case"structure":c.add("attachment");break;case"container":case"content":c.add("containment");break;case"connectivity":c.add("connectivity"),c.add("junction-junction-connectivity"),c.add("junction-edge-from-connectivity"),c.add("junction-edge-midspan-connectivity"),c.add("junction-edge-to-connectivity");break}});let d=await i?.queryAssociations(new Q({elements:[l],types:Array.from(c)}),{signal:t?.signal}),u=new Map,h=new Map;a.forEach(n=>{h.set(n.type,n),u.set(n.type,[])}),d.forEach(n=>{let{toNetworkElement:_,fromNetworkElement:y}=n;switch(n.associationType){case"attachment":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"attachment",h))break;u.get("attachment")?.push(_.globalId),this._attachmentAssociations.add(n)}else{if(this._shouldDiscardNetworkElement(y,"structure",h))break;u.get("structure")?.push(y.globalId),this._structureAssociations.add(n)}break;case"connectivity":case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":case"junction-junction-connectivity":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"connectivity",h))break;u.get("connectivity")?.push(_.globalId)}else{if(this._shouldDiscardNetworkElement(y,"connectivity",h))break;u.get("connectivity")?.push(y.globalId)}this._connectivityAssociations.add(n);break;case"containment":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"content",h))break;u.get("content")?.push(_.globalId),this._contentAssociations.add(n)}else{if(this._shouldDiscardNetworkElement(y,"container",h))break;u.get("container")?.push(y.globalId),this._containerAssociations.add(n)}break}});let m=a.map(async n=>{let{associatedNetworkSourceId:_,associatedAssetGroup:y,associatedAssetType:w}=n,b=u.get(n.type),g=y!=null?await this._countAssociatedFeatures(_,b,y,w,t):b.length;switch(n.type){case"attachment":this._attachmentFeatureCount=g;break;case"connectivity":this._connectivityFeatureCount=g;break;case"container":this._containerFeatureCount=g;break;case"content":this._contentFeatureCount=g;break;case"structure":this._structureFeatureCount=g;break}});await Promise.allSettled(m)}async _queryFeatureCount(){await this._loadUtiltyNetworks();let{_queryFeatureCountAbortController:t,_canQuery:e}=this;if(!e){this._featureCount=0;return}await this._queryAssociations(t),this._featureCount=this._attachmentFeatureCount+this._connectivityFeatureCount+this._containerFeatureCount+this._contentFeatureCount+this._structureFeatureCount}async _queryLayer(t,e,s,a,i){let r=this._getFeatureQueryWhereClause(t,e,s,a),o=t.createQuery();o.where=r,o.outFields=["*"],o.returnGeometry=!1,o.cacheHint=this._supportsCacheHint;let{features:l}=await N(t,o,i);return l}_parseFeatureObjects(t,e){let s=k();t.forEach(a=>{let i=(a?.feature).sourceLayer;P(s,i,()=>new f).add(a)});for(let[a,i]of s)this._sortFeatureObjectsByTitle(i),e.set(a,i)}_selectAssociationType(t){let{flowItems:e}=this;e&&(this._activeAssociationType=t,this._setUpUtilityNetworkAssociationsViewModels(),this._addAssociationTypeFlowItem(t))}_setUpUtilityNetworkAssociationsViewModels(){this._associationViewModels.forEach((i,r)=>{let o=this._associationFeatures.get(r);o?i.forEach(l=>{o.find(c=>this._matchesGlobalFeature(l,c))||(i.remove(l),i.length||this._associationViewModels.delete(r))}):(i.removeAll(),this._associationViewModels.delete(r))});let{map:t,view:e,spatialReference:s,timeZone:a}=this;this._associationFeatures.forEach((i,r)=>{let o=this._associationViewModels.get(r)||new f;i?.filter(Boolean).forEach((l,c)=>{if(!o.some(d=>this._matchesGlobalFeature(d,l))){let{association:d,feature:u,terminalName:h,title:m}=l;o.add({title:m,association:d,featureViewModel:new B({abilities:{utilityNetworkAssociationsContent:!1},map:t,view:e,spatialReference:s,timeZone:a,graphic:u}),terminalName:h},c)}}),this._associationViewModels.set(r,o)})}_shouldDiscardNetworkElement(t,e,s){if(!t)return!1;let{networkSourceId:a}=t,i=s.get(e)?.associatedNetworkSourceId,r=this._networkSourceIdsInUse.has(a);return i!=null&&i!==a||!r}_sortFeatureObjectsByTitle(t){t.sort(this._compareByFeatureTitle)}render(){let{_state:t}=this;return p`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .headingLevel=${this.headingLevel} .description=${this.description}></arcgis-feature-element-info>${t==="loading"?this._renderLoading():t==="disabled"?this._renderAssociationNotFound():this._renderContent()}</div>`}_renderAssociationNotFound(){return p`<calcite-notice icon=information kind=info open scale=s width=full><div slot=message>${this.messages?.noAssociations}</div></calcite-notice>`}_renderAssociationTypeList(t){return this._getFeatureCountForAssociationType(t.type)>0?this._renderAssociationTypeListItem(t):null}_renderAssociationTypeListItem(t){let e=this._getAssociationTypeTitle(t);return I(`association-type-${t.type}`,p`<calcite-list-item .description=${E(t.description)} .label=${E(e)} .value=${t.type} @calciteListItemSelect=${()=>this._selectAssociationType(t)}><calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`)}_renderContent(){let{_state:t,associationTypes:e,messages:s}=this,a=s?.associationsList??s?.noTitle??"";return I("list-container",p`<div class="list-container">${t==="ready"?p`<div><calcite-list display-mode=flat .label=${a}>${e.map(i=>this._renderAssociationTypeList(i))}</calcite-list></div>`:null}${this._renderStickyLoading()}</div>`)}_renderLoading(){return p`<div class="loading-container">${this._renderLoadingIcon()}${this._renderStickyLoading()}</div>`}_renderLoadingIcon(){return p`<calcite-loader inline label></calcite-loader>`}_renderStickyLoading(){return this._state==="querying"?p`<div class="sticky-loading-container">${this._renderLoadingIcon()}</div>`:null}};L("arcgis-feature-utility-network-associations",T);return T},"applications/Components/featureUtils","applications/Components/stringUtils","core/Collection","core/promiseUtils","core/reactiveUtils","core/sql","rest/networks/support/NetworkElement","rest/networks/support/QueryAssociationsParameters","popup/FeatureContent",a,b)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as k}from"./5L5UYV3H.js";import{c as S}from"./TN5C3MSL.js";import f from"./HAUHWMHN.js";import"./VJVKFKSG.js";import e from"./AZYY5BTK.js";import{a as O}from"./WVGSH2QD.js";import d from"./ANSNQBZW.js";import c from"./XXA7VSON.js";import{a as R,e as B}from"./5DI7RMZ6.js";import"./Q7SMGP5R.js";import a from"./SYDGAFU5.js";import"./QUZTFUWM.js";import"./NCYBFT2Y.js";import{N as F,Q as b,T as E,a as C,b as u,w as v,y as x}from"./WTBRS6C4.js";import"./H6RQVSYM.js";export default $arcgis.t(([{property:c,subclass:H},j,_,{ignoreAbortErrors:V},{watch:g,on:M,whenOnce:I},W,U,K,Q,q,J,X,Y,{fetchPopupFeaturesFromGraphics:T},,,,G])=>{var Z=C`:host{width:100%;height:100%;padding:var(--calcite-space-none);margin:var(--calcite-space-none);display:flex;--internal-attribution-height: 16px;--arcgis-internal-presentation-padding-start: unset;--arcgis-internal-presentation-padding-end: unset;--arcgis-internal-presentation-cover-padding-top: unset;--arcgis-internal-presentation-cover-padding-bottom: unset;--arcgis-internal-presentation-cover-padding-start: unset;--arcgis-internal-presentation-cover-padding-end: unset}p{padding:0;margin:0}.root{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%}.presentation-content{display:flex;width:100%;justify-content:flex-end;padding-top:var(--calcite-space-lg);padding-inline-start:calc(var(--calcite-space-lg) + var(--arcgis-internal-presentation-padding-start));padding-inline-end:calc(var(--calcite-space-lg) + var(--arcgis-internal-presentation-padding-end))}.navigation-container{display:flex;flex-direction:column;margin-inline-start:var(--calcite-space-lg);margin-block:auto calc(var(--calcite-space-lg) + var(--arcgis-internal-attribution-space-top));width:fit-content;height:100%}.navigation{width:fit-content;display:flex;align-items:center;background-color:var(--calcite-color-surface-2);box-shadow:var(--arcgis-internal-box-shadow);pointer-events:auto}.navigation-slide-list-container{position:relative;height:100%;min-height:0;margin-block-start:var(--calcite-space-lg)}.slide-list-action-container{height:100%;align-content:center;border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.slide-list-action{padding-inline:var(--calcite-space-sm)}.slide-counter-text{display:flex;align-items:center;justify-content:center;gap:var(--calcite-space-base);font-size:var(--calcite-font-size-md)}.slide-counter-text-element{box-sizing:border-box;max-width:28px;margin:0;padding:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-variant-numeric:tabular-nums;min-width:var(--calcite-spacing-md);text-align:center}.legend-container{pointer-events:all;box-shadow:var(--calcite-shadow-sm);max-width:300px;height:auto;max-height:calc(100vh - 136px);overflow:hidden auto}.legend{padding:var(--esri-widget-padding);background-color:var(--calcite-color-surface-2)}`,ee=Object.defineProperty,te=Object.getOwnPropertyDescriptor,d=(i,e,t,s)=>{for(var n=s>1?void 0:s?te(e,t):e,a=i.length-1,r;a>=0;a--)(r=i[a])&&(n=(s?r(e,t,n):r(n))||n);return s&&n&&ee(e,t,n),n},l=class extends j{constructor(i){super(i),this.transitionActive=!1,this.showLegend=!1,this.keyboardNavigationEnabled=!1,this._subscribeToSlideEvents=e=>{this._unsubscribeToSlideEvents(e),e.forEach(t=>{let s=t.on("apply-slide-start",()=>this._onApplySlideStart(t)),n=t.on("apply-slide-complete",()=>this._onApplySlideComplete(t)),a=t.on("apply-slide-cancel",()=>this._onApplySlideCancel(t));this.addHandles(s,t.id),this.addHandles(n,t.id),this.addHandles(a,t.id)})},this._unsubscribeToSlideEvents=e=>{e.forEach(t=>{this.hasHandles(t.id)&&this.removeHandles(t.id)})}}initialize(){this.addHandles(g(()=>this.view?.map,(i,e)=>{if(this.hasHandles("sceneLoaded")&&this.removeHandles("sceneLoaded"),e){let t=e.presentation?.slides;t&&t.length>0&&this._unsubscribeToSlideEvents(t)}i&&this.addHandles(g(()=>i.loaded,t=>{t&&(this.removeHandles("sceneLoaded"),this._startWatchSlides(),this._slideId&&this._applySlideById(this._slideId))},{initial:!0}),"sceneLoaded")},{initial:!0}))}destroy(){this._unsubscribeToSlideEvents(this.slides)}get slideId(){return this._slideId}set slideId(i){i===void 0||!this.view?.map?.loaded?this._slideId=i:this._applySlideById(i)}get visibleSlides(){return this.view?.map?.presentation?.slides?.filter(i=>!i.hidden)??new _}get slides(){return this.view?.map?.presentation?.slides??new _}get lastSlideSelected(){return this.getSlideIndexBySlideId(this.slideId)===this.visibleSlides.length-1}get firstSlideSelected(){return this.getSlideIndexBySlideId(this.slideId)===0}get slideSelected(){return this.getSlideIndexBySlideId(this.slideId)>-1}get hasOnlyOneSlide(){return this.visibleSlides.length===1}get slideIndex(){return this.getSlideIndexBySlideId(this.slideId)}getSlideIndexBySlideId(i){let e=-1;return i&&(e=this.visibleSlides.findIndex(t=>t.id===i)),e}navigateInPresentation(i){let e=this.slideIndex+i,t=this._getSlideBySlideIndex(e);t??=this._getSlideBySlideIndex(0),t&&this.applySlide(t)}captureArrowKeysForNavigation(i,e){let t=["ArrowLeft","ArrowRight","PageUp","PageDown"];if(document.activeElement?.nodeName.toLowerCase()==="arcgis-scene"||!t.includes(i.code))return;let s=e==="rtl"?"ArrowRight":"ArrowLeft",n=i.code===s||i.code==="PageUp"?-1:1;this.navigateInPresentation(n)}async setSliceAnalysisInteractive(i){if(!this.view?.analyses?.length)return;let e=this.view.analyses.find(s=>s.type==="slice"&&s.origin?.type==="web-scene");if(!e)return;let t=await this.view.whenAnalysisView(e);t&&(t.interactive=i)}getSlideBySlideId(i){return this.visibleSlides.find(e=>e.id===i)}async applySlide(i,e,t){if(this.view){let s=t?{signal:t?.signal}:{};await V(i.applyTo(this.view,{...s,animate:!e}))}}_getSlideBySlideIndex(i){if(i!=null&&i>=0&&i<this.visibleSlides.length)return this.visibleSlides.getItemAt(i)}async _applySlideById(i){let e=i?this.getSlideBySlideId(i):void 0;e&&await this.applySlide(e)}_startWatchSlides(){this._subscribeToSlideEvents(this.slides),this.addHandles(M(()=>this.slides,"change",i=>{this._subscribeToSlideEvents(new _(i.added)),this._unsubscribeToSlideEvents(new _(i.removed))},{onListenerAdd:this._subscribeToSlideEvents,onListenerRemove:this._unsubscribeToSlideEvents}))}_onApplySlideStart(i){this._slideId=i.id,this.transitionActive=!0,this.showLegend=!1,this.onApplySlideStart?.(i)}_onApplySlideComplete(i){this.transitionActive=!1,this.showLegend=!!i.elements.legendInfo?.visible,this.onApplySlideComplete?.(i)}_onApplySlideCancel(i){this.transitionActive=!1,this.showLegend=!!i.elements.legendInfo?.visible,this.onApplySlideCancel?.(i)}};d([c()],l.prototype,"_slideId",2);d([c()],l.prototype,"view",2);d([c()],l.prototype,"slideId",1);d([c()],l.prototype,"transitionActive",2);d([c()],l.prototype,"showLegend",2);d([c()],l.prototype,"keyboardNavigationEnabled",2);d([c()],l.prototype,"visibleSlides",1);d([c()],l.prototype,"slides",1);d([c()],l.prototype,"lastSlideSelected",1);d([c()],l.prototype,"firstSlideSelected",1);d([c()],l.prototype,"slideSelected",1);d([c()],l.prototype,"hasOnlyOneSlide",1);d([c()],l.prototype,"onApplySlideStart",2);d([c()],l.prototype,"onApplySlideComplete",2);d([c()],l.prototype,"onApplySlideCancel",2);d([c()],l.prototype,"getSlideIndexBySlideId",1);l=d([H("components.presentation.PresentationViewModel")],l);var A=class extends x{constructor(e){super(e)}hostLoaded(){this.component.manager.onLifecycle(()=>{let e=this.component;I(()=>e.referenceElement).then(t=>{this._isArcgisScene(t)&&(this._sceneRef=t)})})}openPopup(e){this.component.view&&this.component.slideId===e.id&&e.elements.popupInfo!=null&&this._preparePopupFeature(this.component.view,e.elements.popupInfo).then(({success:t,features:s,popupInfo:n})=>{this.component.slideId===e.id&&(t?this._handlePopupFeatureFound(e,s,n):this.component.arcgisPopupFeatureNotFound.emit({slide:e}))})}_isArcgisScene(e){return e===void 0||typeof e=="string"?!1:"tagName"in e&&e.tagName==="ARCGIS-SCENE"}closePopup(e){(!this.component.slidePopupDisabled||e)&&this._sceneRef?.closePopup()}async _handlePopupFeatureFound(e,t,s){let n=s?.location??void 0;this.component.arcgisPopupFeaturesRetrieved.emit({slide:e,features:t,location:n}),this.component.slidePopupDisabled||await this._sceneRef?.openPopup({features:t,location:n})}async _preparePopupFeature(e,t){let s=[];if(!t.features?.length||t.features.length===0)return{success:!1,features:s};let n=t.features?.getItemAt(t.selectedFeatureIndex)?.layerReference;if(n?.layerId==null)return{success:!1,features:s};let{layer:a,sublayer:r}=this._getLayersFromView(e,n.layerId,n?.sublayerId);if(!a)return{success:!1,features:s};let p=r??a;if(!p||!this._layerTypeSupportsCapturePopup(p))return{success:!1,features:s};if(s=await this._fetchFeaturesFromQueryable(e,t,a,r,p),s&&this._featureHasBeenFilledWithAttributes(s)){let o=s[0];return this._setFallbackPopupTemplate(o,r,a),this._setFallbackGeometry(o,t?.location),{success:!0,features:s,popupInfo:t}}return{success:!1,features:s}}_getLayersFromView(e,t,s){let n=e.map?.findLayerById(t)??void 0,a=this._getBuildingSceneLayerSublayer(n,s);return{layer:n,sublayer:a}}_getBuildingSceneLayerSublayer(e,t){let s;return e&&this._isLayer(e)&&this._isBuildingSceneLayer(e)&&t!=null&&(s=e.allSublayers.find(n=>n.id===t&&n.type==="building-component")),s}_featureHasBeenFilledWithAttributes(e){return e&&e.length>0&&e[0].attributes&&Object.entries(e[0].attributes)?.length>1}async _fetchFeaturesFromQueryable(e,t,s,n,a){let r=t.features?.getItemAt(t.selectedFeatureIndex);if(r?.id==null)return await Promise.resolve([]);let p=await e.whenLayerView(s);await I(()=>!p.updating);let o=this._tryGetBuildingComponentSublayerView(s,n,p)??p;await I(()=>!o.updating);let h=this._createFeatureGraphic(s,n,a,r.id),y=await T(o,[h]);return this._featureHasBeenFilledWithAttributes(y)||(await I(()=>!e.updating),y=await T(o,[h])),y}_tryGetBuildingComponentSublayerView(e,t,s){let n;return this._isLayer(e)&&this._isBuildingSceneLayer(e)&&t!=null&&(n=s.sublayerViews.find(a=>a.sublayer.id===t.id)),n}_setFallbackPopupTemplate(e,t,s){e.popupTemplate==null&&(e.popupTemplate=t?.popupTemplate?t.popupTemplate:s.popupTemplate)}_setFallbackGeometry(e,t){e.geometry==null&&t&&(e.geometry=t.clone())}_createFeatureGraphic(e,t,s,n){let a=this._getGlobalIdFieldNameFromLayer(s),r=n.type==="global-id"&&a?a:s.objectIdField,p=this._getGraphicOrigin(e,t),o=new W({attributes:{},layer:e,origin:p});return o.attributes[r]=n.value,o}_getGraphicOrigin(e,t){switch(e.type){case"csv":return new K(e);case"feature":return new Y(e);case"geojson":return new Q(e);case"scene":return new q(e);case"wfs":return new J(e);case"building-scene":return t?new X(t):void 0;default:return}}_layerTypeSupportsCapturePopup(e){return e!=null&&["csv","feature","geojson","wfs","scene","building-component"].includes(e.type)}_isLayer(e){return!!e&&e instanceof U}_isBuildingSceneLayer(e){return e?.type==="building-scene"}_getGlobalIdFieldNameFromLayer(e){return e.fields?.find(t=>t.type==="global-id")?.name}},ie=i=>new A(i),m=Object.freeze({width:0,height:0}),w=new WeakMap,f=()=>({topCenter:{...m},topLeft:{...m},topRight:{...m},bottomCenter:{...m},bottomLeft:{...m},bottomRight:{...m}}),D=i=>({topCenter:{...i.topCenter},topLeft:{...i.topLeft},topRight:{...i.topRight},bottomCenter:{...i.bottomCenter},bottomLeft:{...i.bottomLeft},bottomRight:{...i.bottomRight}}),N=i=>{let e=w.get(i);return e||(e={observedGroups:new Map,observedSizes:f(),subscribers:new Set},w.set(i,e)),e},se=i=>{let e=i?.topCenter.value,t=i?.topLeft.value,s=i?.topRight.value,n=i?.bottomCenter.value,a=i?.bottomLeft.value,r=i?.bottomRight.value;return e&&t&&s&&n&&a&&r?{topCenter:e,topLeft:t,topRight:s,bottomCenter:n,bottomLeft:a,bottomRight:r}:null},ne=(i,e)=>S.every(t=>i.get(t)===e[t]),ae=i=>{let e=D(i.observedSizes);i.subscribers.forEach(t=>t(e))},re=(i,e)=>{let t=w.get(i);if(!t)return;let s=!1;e.forEach(n=>{let a=S.find(y=>t.observedGroups.get(y)===n.target);if(!a)return;let{width:r,height:p}=n.contentRect,o={width:r,height:p},h=t.observedSizes[a];h.width===o.width&&h.height===o.height||(t.observedSizes[a]=o,s=!0)}),s&&ae(t)},L=(i,e)=>{let t=N(i);t.resizeObserver||(t.resizeObserver=new ResizeObserver(n=>{re(i,n)}));let s=se(e);if(!s){t.observedGroups.size>0&&(t.resizeObserver.disconnect(),t.observedGroups.clear());return}ne(t.observedGroups,s)||(t.resizeObserver.disconnect(),t.observedGroups.clear(),S.forEach(n=>{let a=s[n];t.observedGroups.set(n,a),t.resizeObserver?.observe(a)}))},le=(i,e)=>{let t=N(i);return t.subscribers.add(e),e(D(t.observedSizes)),()=>{let s=w.get(i);s&&(s.subscribers.delete(e),s.subscribers.size===0&&(s.resizeObserver?.disconnect(),s.observedGroups.clear(),w.delete(i)))}},P=class extends x{#e;#t;#i;constructor(e){super(e),this.exports=f()}hostDisconnected(){this.#i?.(),this.#i=void 0,this.#t=void 0,this.#e=void 0,this.exports=f()}hostLifecycle(){return[g(()=>this.#s(),e=>{if(this.#t!==e){if(this.#i?.(),this.#i=void 0,this.#t=e,this.#e=e?.slotGroupRefs,!e){this.exports=f();return}this.#i=le(e,t=>{this.#n(t)||(this.exports=t)}),L(e,this.#e)}},{sync:!0,initial:!0}),g(()=>this.#s()?.slotGroupRefs,e=>{this.#e=e,this.#t&&e&&L(this.#t,e)},{sync:!0,initial:!0})]}#s(){let{referenceElement:e}=this.component;return e&&typeof e!="string"?e:void 0}hostUpdated(){!this.#t||!this.#e||L(this.#t,this.#e)}#n(e){let t=this.exports??f();return S.every(s=>{let n=t[s],a=e[s];return n.width===a.width&&n.height===a.height})}},oe=R(P),de=G(l),$=class extends F{constructor(){super(...arguments),this._messages=O(),this._direction=B(),this.#e=de(this),this.#i=e=>{this.#e.captureArrowKeysForNavigation(e,this._direction)},this.#s=ie(this),this.#a=null,this.#l=e=>{this.#s.closePopup(),this.arcgisSlideApplyStart.emit({slide:e})},this.#o=e=>{this.#s.openPopup(e),this.sliceAnalysisInteractive&&this.#e.setSliceAnalysisInteractive(!0),this.arcgisSlideApplyComplete.emit({slide:e})},this.#d=e=>{this.sliceAnalysisInteractive&&this.#e.setSliceAnalysisInteractive(!0),this.arcgisSlideApplyCancel.emit({slide:e})},this.#c=e=>{let t=e.detail?.selectedSlide;if(!t)return;this.#n?.abort();let s=new AbortController;this.#n=s;let n=Date.now(),a=this.#a!==null&&n-this.#a<300;if(this.#a=n,this.#e.applySlide(t,a,s),a){this._showSlideList=!1;return}setTimeout(()=>{s.signal.aborted||(this._showSlideList=!1,this.#e.applySlide(t,!1,s))},300)},this.#r=()=>{this._showSlideList=!1},this._showSlideList=!1,this.autoDestroyDisabled=!1,this.view=this.#e.view,this.visualScale="m",this.keyboardNavigationEnabled=!1,this.slidePopupDisabled=!1,this.slideCaptionsDisabled=!1,this.slideLegendDisabled=!1,this.sliceAnalysisInteractive=!1,this.navigationHidden=!1,this.arcgisPopupFeatureNotFound=v(),this.arcgisPopupFeaturesRetrieved=v(),this.arcgisReady=v(),this.arcgisSlideApplyCancel=v(),this.arcgisSlideApplyComplete=v(),this.arcgisSlideApplyStart=v()}static{this.properties={_slotSizesController:16,_showSlideList:16,slideId:1,autoDestroyDisabled:5,view:0,visualScale:1,keyboardNavigationEnabled:5,slidePopupDisabled:5,slideCaptionsDisabled:5,slideLegendDisabled:5,sliceAnalysisInteractive:5,navigationHidden:5}}static{this.styles=Z}#e;#t;#i;#s;#n;#a;#l;#o;#d;#c;#r;#h;#p;get slideId(){return this.#e.slideId}set slideId(e){this.#e.slideId=e}async destroy(){await this.manager.destroy()}loaded(){this.#e.onApplySlideStart=this.#l,this.#e.onApplySlideComplete=this.#o,this.#e.onApplySlideCancel=this.#d,this.#m();let e=this;this.manager.onLifecycle(()=>[g(()=>this.slidePopupDisabled,t=>{if(this.slideId&&!t){let s=this.#e.getSlideBySlideId(this.slideId);s&&this.#s?.openPopup(s)}else t&&this.#s?.closePopup(!0)}),g(()=>this.sliceAnalysisInteractive,t=>{this.#e.setSliceAnalysisInteractive(t)},{initial:!0}),g(()=>e.referenceElement,t=>{this.#u(t)&&(this._slotSizesController=oe(this),this.#p=this.#g())},{once:!0,initial:!0}),{remove:()=>{document.removeEventListener("keydown",this.#i),this.#h?.removeEventListener("arcgisSlideListClose",this.#r),this.#t?.remove(),this.#p?.remove(),this.#n?.abort()}}])}#u(e){return e===void 0||typeof e=="string"?!1:"tagName"in e&&e.tagName==="ARCGIS-SCENE"}#g(){return g(()=>this._slotSizesController,e=>this.#v(e?.topLeft,e?.topRight,e?.bottomLeft,e?.bottomRight),{initial:!0})}#v(e,t,s,n){let a=this._direction==="ltr"?e?.width??0:t?.width??0,r=this._direction==="ltr"?t?.width??0:e?.width??0,p=Math.max(e?.height??0,t?.height??0),o=Math.max(s?.height??0,n?.height??0);a>0?this.el.style.setProperty("--arcgis-internal-presentation-padding-start",`calc(var(--calcite-space-lg) + ${a.toString()}px)`):this.el.style.setProperty("--arcgis-internal-presentation-padding-start","0px"),r>0?this.el.style.setProperty("--arcgis-internal-presentation-padding-end",`calc(var(--calcite-space-lg) + ${r.toString()}px)`):this.el.style.setProperty("--arcgis-internal-presentation-padding-end","0px");let h=a<=Math.max(p,o)&&r<=Math.max(p,o);this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-top",h?"0":`${p}px`),this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-bottom",h?"0":`${o}px`),this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-start",h?`${a}px`:"0"),this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-end",h?`${r}px`:"0")}#m(){this.#t=g(()=>this.keyboardNavigationEnabled,e=>{document.removeEventListener("keydown",this.#i),e&&document.addEventListener("keydown",this.#i)},{initial:!0})}render(){if(this.#e?.visibleSlides?.length===0)return u`<div></div>`;let e=this.#e.visibleSlides.find(a=>a.id===this.slideId),t=this.#y(),s=this.#S(e),n=this.#f();return u`<div class="root"><div class="presentation-content">${s}${n}</div>${t}</div>`}#y(){if(this.navigationHidden)return null;let e=this.#e.lastSlideSelected&&!this.#e.hasOnlyOneSlide,t=this.#w();return u`<div class="navigation-container"><div class="navigation-slide-list-container">${t}</div><div class="navigation"><div class="slide-list-action-container"><calcite-action id=${k} class="slide-list-action" .text=${this._messages.slideList??""} selection-appearance=highlight icon=list .scale=${this.visualScale==="l"?"m":"s"} .label=${this._messages.slideList} title=${this._messages.slideList??b} .active=${this._showSlideList} @click=${()=>this._showSlideList=!this._showSlideList}></calcite-action></div><calcite-button appearance=transparent icon-start=chevron-left icon-flip-rtl=start kind=neutral .scale=${this.visualScale} .disabled=${this.#e.firstSlideSelected||!this.#e.slideSelected} .label=${this._messages.previous} title=${this._messages.previous??b} @click=${()=>this.#e.navigateInPresentation(-1)}></calcite-button><div class="slide-counter-text">${this.#b()}</div><calcite-button appearance=transparent icon-start=${e?"reset":"chevron-right"} icon-flip-rtl=start kind=neutral .scale=${this.visualScale} .label=${e?this._messages.restart:this._messages.next} title=${(e?this._messages.restart:this._messages.next)??b} @click=${()=>this.#e.navigateInPresentation(1)}></calcite-button></div></div>`}#b(){let e=this.#e.slideIndex+1,t=this._messages?.slideNavAriaText?.replace("${index}",e.toString()).replace("${numberOfSlides}",this.#e.visibleSlides.length.toString());return this.#e.slideSelected?u`<p role=banner aria-label=${t??b} aria-live=polite><div class="slide-counter-text-element" data-testId=arcgis-map-presentation-slideIndex>${e}</div><div>/</div><p class="slide-counter-text-element" data-testId=arcgis-map-presentation-numberOfSlides>${this.#e.visibleSlides.length}</p></p>`:u`<p role=banner data-testId=arcgis-map-presentation-numberOfSlides>${this.#e.visibleSlides?.length} ${this._messages?.slides}</p>`}#S(e){return this.slideCaptionsDisabled?null:u`<arcgis-presentation-captions .slide=${e} .transitionActive=${this.#e.transitionActive}></arcgis-presentation-captions>`}#f(){return this.slideLegendDisabled||!this.#e.showLegend?null:u`<calcite-panel data-testid=presentation-legend class="legend-container" .heading=${this._messages.legend} closable @calcitePanelClose=${()=>this.#e.showLegend=!1}><arcgis-legend class="legend" .view=${this.view} @arcgisReady=${e=>e.stopPropagation()}></arcgis-legend></calcite-panel>`}#w(){return this._showSlideList?u`<arcgis-presentation-slide-list .slides=${this.#e.visibleSlides} .slideId=${this.#e.slideId} .label=${this._messages.slideList} .visualScale=${this.visualScale} @arcgisSlideListItemSelected=${this.#c} @arcgisSlideListOutsideClick=${this.#r}></arcgis-presentation-slide-list>`:null}};E("arcgis-presentation",$);return $},"core/accessorSupport/decorators","core/Accessor","core/Collection","core/promiseUtils","core/reactiveUtils","Graphic","layers/Layer","graphic/CSVGraphicOrigin","graphic/GeoJSONGraphicOrigin","graphic/SceneGraphicOrigin","graphic/WFSGraphicOrigin","graphic/BuildingGraphicOrigin","graphic/FeatureGraphicOrigin","applications/SceneViewer/sceneViewerUtils",a,c,d,e,f)