@arcgis/map-components 5.1.0-next.45 → 5.1.0-next.47

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 (114) hide show
  1. package/dist/cdn/{IULGMTSK.js → 3GY55TR6.js} +1 -1
  2. package/dist/cdn/{JJTM5KZ2.js → 5EGS3PEJ.js} +1 -1
  3. package/dist/cdn/{GO5BD6QL.js → 5FJIKNID.js} +1 -1
  4. package/dist/cdn/{UVHZXCAN.js → 6E7H5LPA.js} +2 -2
  5. package/dist/cdn/{HKNVYHER.js → 6XPVHLWQ.js} +1 -1
  6. package/dist/cdn/6ZLSCYL5.js +2 -0
  7. package/dist/cdn/{G7SRL7WF.js → 76RS6RKB.js} +1 -1
  8. package/dist/cdn/{5C33IP7B.js → A2QPYUE5.js} +1 -1
  9. package/dist/cdn/{FHVFIK44.js → CC77IOI3.js} +1 -1
  10. package/dist/cdn/CYSDIJ4L.js +2 -0
  11. package/dist/cdn/EHPHVZAX.js +2 -0
  12. package/dist/cdn/{YGC6EPZT.js → EJ3K6UKQ.js} +1 -1
  13. package/dist/cdn/{PFQ5U7SF.js → ET2U2ZGP.js} +1 -1
  14. package/dist/cdn/{DCRCFVBU.js → F2SNWNAZ.js} +1 -1
  15. package/dist/cdn/FF5VMKLK.js +2 -0
  16. package/dist/cdn/{IPIYZVAJ.js → FWXI6DGS.js} +1 -1
  17. package/dist/cdn/{SSMJJQ7K.js → HRPEPALP.js} +1 -1
  18. package/dist/cdn/I6PZUSTS.js +2 -0
  19. package/dist/cdn/{2IFKJHFD.js → JFNCIZRD.js} +1 -1
  20. package/dist/cdn/{QEDQOBD7.js → JVFREF7G.js} +2 -2
  21. package/dist/cdn/{SZSOX5MA.js → KWZTLNUH.js} +1 -1
  22. package/dist/cdn/{YQWTCTTH.js → LY77GAJT.js} +1 -1
  23. package/dist/cdn/LYUX5DD5.js +2 -0
  24. package/dist/cdn/{UNDBLG66.js → OCGWSO54.js} +1 -1
  25. package/dist/cdn/ODQ4JQEF.js +2 -0
  26. package/dist/cdn/{NBBZRGXH.js → OH3I63ZU.js} +1 -1
  27. package/dist/cdn/{JWJHIBYW.js → P2ABZVPJ.js} +1 -1
  28. package/dist/cdn/PNGKWZJQ.js +2 -0
  29. package/dist/cdn/{XSEIJTVD.js → R42WEZRB.js} +1 -1
  30. package/dist/cdn/{KFG6ZJAZ.js → REQFNQZY.js} +1 -1
  31. package/dist/cdn/{WG4E5DBM.js → RH62B2NE.js} +1 -1
  32. package/dist/cdn/{L3AVJM22.js → T5MRUYOH.js} +1 -1
  33. package/dist/cdn/TBWM3VXL.js +2 -0
  34. package/dist/cdn/{6OLWNBTA.js → UMPYIYP6.js} +1 -1
  35. package/dist/cdn/{ANRWXBWL.js → VEYOGGAN.js} +1 -1
  36. package/dist/cdn/{Q5Y3DHAC.js → W27U4A3P.js} +1 -1
  37. package/dist/cdn/XPZYTUFI.js +2 -0
  38. package/dist/cdn/{DLB6EEQE.js → YET5HTLQ.js} +1 -1
  39. package/dist/cdn/{3SNOI43K.js → YSJ2M36J.js} +1 -1
  40. package/dist/cdn/YXUK3MCB.js +2 -0
  41. package/dist/cdn/index.js +1 -1
  42. package/dist/chunks/layer-utils.js +17 -13
  43. package/dist/chunks/useArcgisViewReadyError.js +6 -6
  44. package/dist/components/arcgis-editor/customElement.d.ts +36 -2
  45. package/dist/components/arcgis-editor/customElement.js +22 -13
  46. package/dist/components/arcgis-feature-table/customElement.js +1 -1
  47. package/dist/components/arcgis-feature-utility-network-association-list/customElement.js +14 -13
  48. package/dist/components/arcgis-feature-utility-network-associations/customElement.js +80 -86
  49. package/dist/components/arcgis-utility-network-aggregated-geometry/customElement.js +1 -1
  50. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +37 -28
  51. package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +37 -37
  52. package/dist/components/arcgis-utility-network-trace-location/customElement.js +1 -1
  53. package/dist/components/arcgis-utility-network-trace-results/customElement.js +26 -25
  54. package/dist/components/arcgis-version-management-version-list/customElement.js +1 -1
  55. package/dist/docs/api.json +1 -1
  56. package/dist/docs/docs.json +1 -1
  57. package/dist/docs/vscode.html-custom-data.json +1 -1
  58. package/dist/docs/web-types.json +1 -1
  59. package/dist/loader.js +1 -1
  60. package/package.json +5 -5
  61. package/dist/cdn/2EXP26TA.js +0 -2
  62. package/dist/cdn/6JYHNX2S.js +0 -2
  63. package/dist/cdn/AHCYJUL7.js +0 -2
  64. package/dist/cdn/BE4GRNQV.js +0 -2
  65. package/dist/cdn/CAXI6CJY.js +0 -2
  66. package/dist/cdn/ELTHY6FL.js +0 -2
  67. package/dist/cdn/MFIMBD2E.js +0 -2
  68. package/dist/cdn/NXQA6DOA.js +0 -2
  69. package/dist/cdn/OGE4JCW6.js +0 -2
  70. package/dist/cdn/R4FIN5ZR.js +0 -2
  71. package/dist/cdn/T34SPRV3.js +0 -2
  72. /package/dist/cdn/{BILSW27K.js → 2HXYJZSB.js} +0 -0
  73. /package/dist/cdn/{5VWD7SPW.js → 37GJW6KT.js} +0 -0
  74. /package/dist/cdn/{VIEEGP7G.js → 4IM2FY5W.js} +0 -0
  75. /package/dist/cdn/{OIJPQ63Z.js → 4MDRPZTG.js} +0 -0
  76. /package/dist/cdn/{ZYZA5VUV.js → 4STAROOM.js} +0 -0
  77. /package/dist/cdn/{YJPCWIX2.js → 5IMWXYL2.js} +0 -0
  78. /package/dist/cdn/{O5S54F3U.js → 5TXE67XV.js} +0 -0
  79. /package/dist/cdn/{E6GYGJ2B.js → BBQPUWRO.js} +0 -0
  80. /package/dist/cdn/{EG3W3ADI.js → BND2TJBO.js} +0 -0
  81. /package/dist/cdn/{WRS3F55Q.js → CJOHGWK6.js} +0 -0
  82. /package/dist/cdn/{6TB2XH3T.js → D5WXOOS3.js} +0 -0
  83. /package/dist/cdn/{UX5YG5TO.js → DMDCKD5U.js} +0 -0
  84. /package/dist/cdn/{PILEMW25.js → DQH27QCF.js} +0 -0
  85. /package/dist/cdn/{HX6XVMJE.js → EP252O27.js} +0 -0
  86. /package/dist/cdn/{H4WIQKA4.js → EVHNFE5I.js} +0 -0
  87. /package/dist/cdn/{T3ZFKRCS.js → EW6V3NZI.js} +0 -0
  88. /package/dist/cdn/{6PWTVRJ6.js → F6BQWE5I.js} +0 -0
  89. /package/dist/cdn/{ULYGZ4D2.js → FLLSBLLE.js} +0 -0
  90. /package/dist/cdn/{PWPTFBHS.js → FQZXILRT.js} +0 -0
  91. /package/dist/cdn/{6ZCH5OTT.js → GHY23IXW.js} +0 -0
  92. /package/dist/cdn/{QY7A4VMP.js → GIGQIUF5.js} +0 -0
  93. /package/dist/cdn/{GPESYF4D.js → GS75FRUR.js} +0 -0
  94. /package/dist/cdn/{6W3OENEK.js → HGAJ2IEN.js} +0 -0
  95. /package/dist/cdn/{YGVSJT3E.js → JKVKP7AW.js} +0 -0
  96. /package/dist/cdn/{7C22TPME.js → JU3BLGXG.js} +0 -0
  97. /package/dist/cdn/{MR5AEEII.js → L4TA63M6.js} +0 -0
  98. /package/dist/cdn/{BUILQQ6S.js → LQVZVGY4.js} +0 -0
  99. /package/dist/cdn/{SPSJMCAO.js → MM4KQLRF.js} +0 -0
  100. /package/dist/cdn/{4S2JKX63.js → Q3GALNWS.js} +0 -0
  101. /package/dist/cdn/{BLSJEYOH.js → QM34BSKE.js} +0 -0
  102. /package/dist/cdn/{QSOU6NQA.js → QTWRDNXX.js} +0 -0
  103. /package/dist/cdn/{FVTX4GNH.js → TC3Q2QUA.js} +0 -0
  104. /package/dist/cdn/{WTUUS552.js → TEFALOII.js} +0 -0
  105. /package/dist/cdn/{2HJ7EGEB.js → TP5VEU3D.js} +0 -0
  106. /package/dist/cdn/{3LKCMCHN.js → U35ISUWJ.js} +0 -0
  107. /package/dist/cdn/{FWV2SQE2.js → UUC3DBCQ.js} +0 -0
  108. /package/dist/cdn/{ZLOQIB7A.js → UVMLKDJA.js} +0 -0
  109. /package/dist/cdn/{BEDLAEXK.js → V7DG2KF6.js} +0 -0
  110. /package/dist/cdn/{TKVE7ETK.js → WHDMC5HB.js} +0 -0
  111. /package/dist/cdn/{GPGC63RW.js → XEXCDGSR.js} +0 -0
  112. /package/dist/cdn/{BVFH7ZG4.js → XJXQC6HM.js} +0 -0
  113. /package/dist/cdn/{GT5SWKXT.js → YZSLMAVX.js} +0 -0
  114. /package/dist/cdn/{ZX5YTFYB.js → ZUPEVR3P.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{c as S}from"./CAXI6CJY.js";import{a as v}from"./SVVJHTPA.js";import"./55IJQTCC.js";import"./7DOI3267.js";import"./EHZW6UXL.js";import{O as L,U as T,a as _,b as f,p as c,x as y}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([A,m,p,x,P,C,b,w])=>{var N=_`calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}.add-location-button{--calcite-button-border-color: var(--calcite-color-border-1);--calcite-button-icon-color: var(--calcite-color-text-1);--calcite-button-text-color: var(--calcite-color-text-1)}.button-container{justify-content:center;display:grid}.clear-button{--calcite-button-border-color: transparent}`,k=class extends L{constructor(){super(...arguments),this.messages=v({blocking:!0}),this.isSelectWaiting=!1,this.traceLocationType="starting-point",this.spatialTolerance=.05,this.autoDestroyDisabled=!1,this.arcgisTraceLocationChange=y(),this.arcgisTraceLocationSelectEnd=y(),this.arcgisTraceLocationSelectStart=y()}static{this.properties={isSelectWaiting:16,beforeTraceLocationSelectStart:0,afterHitTest:0,view:0,traceLocationType:1,traceLocations:0,filterLayers:0,sketchViewModel:0,flagLayer:0,spatialTolerance:9,autoDestroyDisabled:5,utilityNetwork:0}}static{this.styles=N}async destroy(){this._resetAfterSketch(!1),await this.manager.destroy()}async load(){p.isLoaded()||await p.load()}_createPolyline(t,e){return new x({hasZ:!1,hasM:!0,paths:t,spatialReference:new P({wkid:e})})}_calculatePercentAlong(t,e){let r=t.spatialReference,i=this._createPolyline(t.paths,r.wkid),n=e.x-.5,o=e.x+.5,s=e.y-.5,a=e.y+.5,l=[[[n,s],[o,a]]],h=this._createPolyline(l,e.spatialReference.wkid),u=p.execute(h,r);if(!u)return c("error",this,"Unable to project flag geometry to source geometry spatial reference."),.5;let d=A.execute(i,u);if(d.length>0){let I=m.execute(i,{unit:"feet"}),g;return d[0].paths[0][0][0]===i.paths[0][0][0]?g=m.execute(d[0],{unit:"feet"}):d.length>1?g=m.execute(d[1],{unit:"feet"}):g=0,g/I}return c("warn",this,"Unable to cut the source geometry with the flag geometry."),.5}get _edgeSourceLayerIds(){let t=this.utilityNetwork?.dataElement?.domainNetworks;return t?t.flatMap(e=>e.edgeSources).map(e=>e.layerId).filter(Boolean):[]}async _ensureNecessaryAttributes(t){let e=(t.layer?.type,t.layer),r=e.fieldsIndex?.get("assetgroup")??!1,i=e.fieldsIndex?.get("assetgroup")?.name??"assetgroup",n=e.fieldsIndex?.get("assettype")??!1,o=e.fieldsIndex?.get("assettype")?.name??"assettype",s=t.getGlobalId(),a=t.getObjectId(),l=r?!!t.getAttribute(i):!0,h=n?!!t.getAttribute(o):!0;if(s&&a&&l&&h)return t;let u=e.createQuery();return u.objectIds=[a],(await e.queryFeatures(u))?.features[0]||null}async _ensureNecessaryAttributesAndGenerateTraceLocation(t,e){let{view:r}=this;if(!r||t.length===0){c("error",this,"`view` is unavailable or there are no results to process.");return}let i=t[0],n=t.map(a=>{let l=a,h=l.graphic;return h.origin=l.layer,h}),o=this.afterHitTest?await this.afterHitTest(n).catch(()=>(this._resetAfterSketch(!0),null)):i.graphic;if(!o){c("error",this,"No graphic available from hit test results.");return}let s=await this._ensureNecessaryAttributes(o);if(!s){c("error",this,"Unable to ensure necessary attributes on the selected graphic.");return}await this._generateTraceLocation(s,e)}_createFlagSymbol(){let{traceLocationType:t}=this,e=[244,21,21,.6],r=[21,244,21,.6];return t==="stopping-point"?new w({color:e,style:"x",size:12,outline:{color:e,width:2}}):t==="barrier"?new w({color:e,style:"square",size:12,outline:{color:e,width:0}}):new w({color:r,style:"circle",size:12,outline:{color:r,width:0}})}_addFlagGraphic(t,e,r){let{flagLayer:i,view:n}=this;if(!i||!n)return c("error",this,"The properties `flagLayer` and `view` are required but either one or both are missing."),null;let o=e.geometry?.type;if(this.traceLocations?.some(l=>l.traceLocation.globalId===t)&&o!=="polyline")return c("warn",this,"A flag with the same globalId already exists."),null;let s=this._createFlagSymbol(),a=new C({geometry:r,symbol:s,attributes:e.attributes});return i.add(a),a}async _generateItemTitle(t){let{messages:e}=this,r=(t.layer?.type,t.layer);return("getFeatureTitle"in r?await r.getFeatureTitle(t):null)||t?.getObjectId()?.toString()||e.labels.unknown}async _generateFlagInfo(t,e){let{traceLocationType:r,utilityNetwork:i}=this,n=t.getGlobalId()??"",o=t.geometry?.type,s=await this._generateItemTitle(t);if(o==="point"||o==="polygon"){let a=i?.getTerminalConfiguration(t),l=a?a.terminals[0].id:1;return{traceLocation:new b({type:r,isFilterBarrier:!1,globalId:n,terminalId:l}),flagProperties:{title:s,expanded:!1,terminalConfiguration:a??void 0,selectedTerminals:a?new Set([l]):void 0},spatialProperties:{mapPoint:e,mapGraphic:t}}}else if(o==="polyline"){let a=this._calculatePercentAlong(t.geometry,e);return{traceLocation:new b({type:r,isFilterBarrier:!1,globalId:n,percentAlong:a}),flagProperties:{title:s,expanded:!1},spatialProperties:{mapPoint:e,mapGraphic:t}}}else if(!o){let a=S(t.layer)?t.layer.parent:t.layer,l=a&&this._edgeSourceLayerIds.includes(a.layerId),h=i?.getTerminalConfiguration(t),u=h?h.terminals[0].id:l?-1:1,d=l?.5:-1;return{traceLocation:new b({type:r,isFilterBarrier:!1,globalId:n,terminalId:u,percentAlong:d}),flagProperties:{title:s,expanded:!1,terminalConfiguration:h??void 0,selectedTerminals:h?new Set([u]):void 0},spatialProperties:{mapPoint:e}}}return null}async _generateTraceLocation(t,e){let{traceLocations:r}=this,i=t.getGlobalId()??"",n=t.geometry?.type,o=await this._generateFlagInfo(t,e);if(!o){c("error",this,"Unable to generate flag info for trace location.");return}let s=r?.filter(a=>a.spatialProperties.mapGraphic?.getGlobalId()===i)??[];if(s.length===0||n==="polyline"){if(n==="polyline"&&s.length>0&&s.some(l=>Math.abs(l.traceLocation.percentAlong-o.traceLocation.percentAlong)<=this.spatialTolerance)){c("warn",this,"A flag with the same globalId already exists within tolerance.");return}let a=this._addFlagGraphic(i,t,e);if(!a){c("warn",this,"Unable to add flag graphic.");return}o.spatialProperties.flagGraphic=a,r?.add(o);return}c("warn",this,"A flag with the same globalId already exists.")}async _hitTest(t){let{view:e,utilityNetwork:r}=this;if(!e||!r)return c("error",this,"Either `utilityNetwork` or `view` is unavailable for hit test."),!0;let i=t.graphic?.geometry,n=this.view?.toScreen(i);if(!n)return c("warn",this,"No screen point available for hit test."),!1;let o=(await e.hitTest(n,{include:this.filterLayers})).results.filter(s=>s.type==="graphic"&&s?.layer&&s.graphic);return o.length===0?(c("info",this,"No usable hit test results found."),!1):(this._resetAfterSketch(!1),await this._ensureNecessaryAttributesAndGenerateTraceLocation(o,i),this._resetAfterSketch(!0),!0)}_resetAfterSketch(t=!1){let{view:e}=this;if(!e){c("error",this,"View is not available to reset after sketch.");return}this._clickHandler?.remove(),this._clickHandler=void 0,"acquireCursor"in e&&e.acquireCursor("default"),t&&this.arcgisTraceLocationSelectEnd.emit()}_handleSketchComplete(t){let{sketchViewModel:e,view:r}=this;if(!e||!r){c("error",this,"Either `sketchViewModel` or `view` is not available in sketch complete handler.");return}if(t.state==="complete"&&t.graphic){e.layer.remove(t.graphic),this._hitTest(t).then(i=>{i?this._resetAfterSketch():this._initiateHitTest()});return}t.state==="cancel"&&this._resetAfterSketch(!0)}async _initiateHitTest(){let{view:t,sketchViewModel:e}=this;if(!t||!e){c("error",this,"Cannot initiate hit test; either `view` or `sketchViewModel` not found.");return}this._clickHandler?.remove(),this._clickHandler=e.on("create",this._handleSketchComplete.bind(this)),"acquireCursor"in t&&t.acquireCursor("crosshair"),this.sketchViewModel?.create("point")}async _handleAddButtonClick(){let{view:t,sketchViewModel:e}=this;if(!(t&&e)){c("error",this,"Cannot add trace location; `view` not found.");return}if(this.beforeTraceLocationSelectStart){this.isSelectWaiting=!0;try{await this.beforeTraceLocationSelectStart()}finally{this.isSelectWaiting=!1}}this.arcgisTraceLocationSelectStart.emit({cancelSelect:()=>e.cancel()}).defaultPrevented||await this._initiateHitTest()}_handleClearButtonClick(){let{flagLayer:t,traceLocations:e}=this;e?.forEach(r=>{r.spatialProperties.flagGraphic&&t&&t.remove(r.spatialProperties.flagGraphic)}),e?.removeAll()}renderAddLocationBlock(){let{traceLocationType:t,messages:e,traceLocations:r}=this,i=t==="starting-point"?e.types.startingPoint:t==="barrier"?e.types.barrier:e.types.stoppingPoint,n=i.heading,o=i.description,s=i.buttonText;return f`<calcite-block .heading=${n} .label=${n} expanded .description=${o}>${r?.length?f`<calcite-button class="clear-button" slot=actions-end appearance=transparent .label=${e.buttons.clear} @click=${()=>this._handleClearButtonClick()}>${e.buttons.clear}</calcite-button>`:null}<arcgis-utility-network-trace-location-list .traceLocations=${r} .traceLocationType=${t}></arcgis-utility-network-trace-location-list><div class="button-container"><calcite-button .loading=${this.isSelectWaiting} class="add-location-button" icon-start=select appearance=outline .label=${s} @click=${()=>this._handleAddButtonClick()}>${s}</calcite-button></div></calcite-block>`}render(){return f`<div class="root">${this.renderAddLocationBlock()}</div>`}};T("arcgis-utility-network-trace-location",k);return k},"geometry/operators/cutOperator","geometry/operators/lengthOperator","geometry/operators/projectOperator","geometry/Polyline","geometry/SpatialReference","Graphic","rest/networks/support/TraceLocation","symbols/SimpleMarkerSymbol")
2
+ import{d as S}from"./FF5VMKLK.js";import{a as v}from"./SVVJHTPA.js";import"./55IJQTCC.js";import"./7DOI3267.js";import"./EHZW6UXL.js";import{O as L,U as T,a as _,b as f,p as c,x as y}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([A,m,p,x,P,C,b,w])=>{var N=_`calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}.add-location-button{--calcite-button-border-color: var(--calcite-color-border-1);--calcite-button-icon-color: var(--calcite-color-text-1);--calcite-button-text-color: var(--calcite-color-text-1)}.button-container{justify-content:center;display:grid}.clear-button{--calcite-button-border-color: transparent}`,k=class extends L{constructor(){super(...arguments),this.messages=v({blocking:!0}),this.isSelectWaiting=!1,this.traceLocationType="starting-point",this.spatialTolerance=.05,this.autoDestroyDisabled=!1,this.arcgisTraceLocationChange=y(),this.arcgisTraceLocationSelectEnd=y(),this.arcgisTraceLocationSelectStart=y()}static{this.properties={isSelectWaiting:16,beforeTraceLocationSelectStart:0,afterHitTest:0,view:0,traceLocationType:1,traceLocations:0,filterLayers:0,sketchViewModel:0,flagLayer:0,spatialTolerance:9,autoDestroyDisabled:5,utilityNetwork:0}}static{this.styles=N}async destroy(){this._resetAfterSketch(!1),await this.manager.destroy()}async load(){p.isLoaded()||await p.load()}_createPolyline(t,e){return new x({hasZ:!1,hasM:!0,paths:t,spatialReference:new P({wkid:e})})}_calculatePercentAlong(t,e){let r=t.spatialReference,i=this._createPolyline(t.paths,r.wkid),n=e.x-.5,o=e.x+.5,s=e.y-.5,a=e.y+.5,l=[[[n,s],[o,a]]],h=this._createPolyline(l,e.spatialReference.wkid),u=p.execute(h,r);if(!u)return c("error",this,"Unable to project flag geometry to source geometry spatial reference."),.5;let d=A.execute(i,u);if(d.length>0){let I=m.execute(i,{unit:"feet"}),g;return d[0].paths[0][0][0]===i.paths[0][0][0]?g=m.execute(d[0],{unit:"feet"}):d.length>1?g=m.execute(d[1],{unit:"feet"}):g=0,g/I}return c("warn",this,"Unable to cut the source geometry with the flag geometry."),.5}get _edgeSourceLayerIds(){let t=this.utilityNetwork?.dataElement?.domainNetworks;return t?t.flatMap(e=>e.edgeSources).map(e=>e.layerId).filter(Boolean):[]}async _ensureNecessaryAttributes(t){let e=(t.layer?.type,t.layer),r=e.fieldsIndex?.get("assetgroup")??!1,i=e.fieldsIndex?.get("assetgroup")?.name??"assetgroup",n=e.fieldsIndex?.get("assettype")??!1,o=e.fieldsIndex?.get("assettype")?.name??"assettype",s=t.getGlobalId(),a=t.getObjectId(),l=r?!!t.getAttribute(i):!0,h=n?!!t.getAttribute(o):!0;if(s&&a&&l&&h)return t;let u=e.createQuery();return u.objectIds=[a],(await e.queryFeatures(u))?.features[0]||null}async _ensureNecessaryAttributesAndGenerateTraceLocation(t,e){let{view:r}=this;if(!r||t.length===0){c("error",this,"`view` is unavailable or there are no results to process.");return}let i=t[0],n=t.map(a=>{let l=a,h=l.graphic;return h.origin=l.layer,h}),o=this.afterHitTest?await this.afterHitTest(n).catch(()=>(this._resetAfterSketch(!0),null)):i.graphic;if(!o){c("error",this,"No graphic available from hit test results.");return}let s=await this._ensureNecessaryAttributes(o);if(!s){c("error",this,"Unable to ensure necessary attributes on the selected graphic.");return}await this._generateTraceLocation(s,e)}_createFlagSymbol(){let{traceLocationType:t}=this,e=[244,21,21,.6],r=[21,244,21,.6];return t==="stopping-point"?new w({color:e,style:"x",size:12,outline:{color:e,width:2}}):t==="barrier"?new w({color:e,style:"square",size:12,outline:{color:e,width:0}}):new w({color:r,style:"circle",size:12,outline:{color:r,width:0}})}_addFlagGraphic(t,e,r){let{flagLayer:i,view:n}=this;if(!i||!n)return c("error",this,"The properties `flagLayer` and `view` are required but either one or both are missing."),null;let o=e.geometry?.type;if(this.traceLocations?.some(l=>l.traceLocation.globalId===t)&&o!=="polyline")return c("warn",this,"A flag with the same globalId already exists."),null;let s=this._createFlagSymbol(),a=new C({geometry:r,symbol:s,attributes:e.attributes});return i.add(a),a}async _generateItemTitle(t){let{messages:e}=this,r=(t.layer?.type,t.layer);return("getFeatureTitle"in r?await r.getFeatureTitle(t):null)||t?.getObjectId()?.toString()||e.labels.unknown}async _generateFlagInfo(t,e){let{traceLocationType:r,utilityNetwork:i}=this,n=t.getGlobalId()??"",o=t.geometry?.type,s=await this._generateItemTitle(t);if(o==="point"||o==="polygon"){let a=i?.getTerminalConfiguration(t),l=a?a.terminals[0].id:1;return{traceLocation:new b({type:r,isFilterBarrier:!1,globalId:n,terminalId:l}),flagProperties:{title:s,expanded:!1,terminalConfiguration:a??void 0,selectedTerminals:a?new Set([l]):void 0},spatialProperties:{mapPoint:e,mapGraphic:t}}}else if(o==="polyline"){let a=this._calculatePercentAlong(t.geometry,e);return{traceLocation:new b({type:r,isFilterBarrier:!1,globalId:n,percentAlong:a}),flagProperties:{title:s,expanded:!1},spatialProperties:{mapPoint:e,mapGraphic:t}}}else if(!o){let a=S(t.layer)?t.layer.parent:t.layer,l=a&&this._edgeSourceLayerIds.includes(a.layerId),h=i?.getTerminalConfiguration(t),u=h?h.terminals[0].id:l?-1:1,d=l?.5:-1;return{traceLocation:new b({type:r,isFilterBarrier:!1,globalId:n,terminalId:u,percentAlong:d}),flagProperties:{title:s,expanded:!1,terminalConfiguration:h??void 0,selectedTerminals:h?new Set([u]):void 0},spatialProperties:{mapPoint:e}}}return null}async _generateTraceLocation(t,e){let{traceLocations:r}=this,i=t.getGlobalId()??"",n=t.geometry?.type,o=await this._generateFlagInfo(t,e);if(!o){c("error",this,"Unable to generate flag info for trace location.");return}let s=r?.filter(a=>a.spatialProperties.mapGraphic?.getGlobalId()===i)??[];if(s.length===0||n==="polyline"){if(n==="polyline"&&s.length>0&&s.some(l=>Math.abs(l.traceLocation.percentAlong-o.traceLocation.percentAlong)<=this.spatialTolerance)){c("warn",this,"A flag with the same globalId already exists within tolerance.");return}let a=this._addFlagGraphic(i,t,e);if(!a){c("warn",this,"Unable to add flag graphic.");return}o.spatialProperties.flagGraphic=a,r?.add(o);return}c("warn",this,"A flag with the same globalId already exists.")}async _hitTest(t){let{view:e,utilityNetwork:r}=this;if(!e||!r)return c("error",this,"Either `utilityNetwork` or `view` is unavailable for hit test."),!0;let i=t.graphic?.geometry,n=this.view?.toScreen(i);if(!n)return c("warn",this,"No screen point available for hit test."),!1;let o=(await e.hitTest(n,{include:this.filterLayers})).results.filter(s=>s.type==="graphic"&&s?.layer&&s.graphic);return o.length===0?(c("info",this,"No usable hit test results found."),!1):(this._resetAfterSketch(!1),await this._ensureNecessaryAttributesAndGenerateTraceLocation(o,i),this._resetAfterSketch(!0),!0)}_resetAfterSketch(t=!1){let{view:e}=this;if(!e){c("error",this,"View is not available to reset after sketch.");return}this._clickHandler?.remove(),this._clickHandler=void 0,"acquireCursor"in e&&e.acquireCursor("default"),t&&this.arcgisTraceLocationSelectEnd.emit()}_handleSketchComplete(t){let{sketchViewModel:e,view:r}=this;if(!e||!r){c("error",this,"Either `sketchViewModel` or `view` is not available in sketch complete handler.");return}if(t.state==="complete"&&t.graphic){e.layer.remove(t.graphic),this._hitTest(t).then(i=>{i?this._resetAfterSketch():this._initiateHitTest()});return}t.state==="cancel"&&this._resetAfterSketch(!0)}async _initiateHitTest(){let{view:t,sketchViewModel:e}=this;if(!t||!e){c("error",this,"Cannot initiate hit test; either `view` or `sketchViewModel` not found.");return}this._clickHandler?.remove(),this._clickHandler=e.on("create",this._handleSketchComplete.bind(this)),"acquireCursor"in t&&t.acquireCursor("crosshair"),this.sketchViewModel?.create("point")}async _handleAddButtonClick(){let{view:t,sketchViewModel:e}=this;if(!(t&&e)){c("error",this,"Cannot add trace location; `view` not found.");return}if(this.beforeTraceLocationSelectStart){this.isSelectWaiting=!0;try{await this.beforeTraceLocationSelectStart()}finally{this.isSelectWaiting=!1}}this.arcgisTraceLocationSelectStart.emit({cancelSelect:()=>e.cancel()}).defaultPrevented||await this._initiateHitTest()}_handleClearButtonClick(){let{flagLayer:t,traceLocations:e}=this;e?.forEach(r=>{r.spatialProperties.flagGraphic&&t&&t.remove(r.spatialProperties.flagGraphic)}),e?.removeAll()}renderAddLocationBlock(){let{traceLocationType:t,messages:e,traceLocations:r}=this,i=t==="starting-point"?e.types.startingPoint:t==="barrier"?e.types.barrier:e.types.stoppingPoint,n=i.heading,o=i.description,s=i.buttonText;return f`<calcite-block .heading=${n} .label=${n} expanded .description=${o}>${r?.length?f`<calcite-button class="clear-button" slot=actions-end appearance=transparent .label=${e.buttons.clear} @click=${()=>this._handleClearButtonClick()}>${e.buttons.clear}</calcite-button>`:null}<arcgis-utility-network-trace-location-list .traceLocations=${r} .traceLocationType=${t}></arcgis-utility-network-trace-location-list><div class="button-container"><calcite-button .loading=${this.isSelectWaiting} class="add-location-button" icon-start=select appearance=outline .label=${s} @click=${()=>this._handleAddButtonClick()}>${s}</calcite-button></div></calcite-block>`}render(){return f`<div class="root">${this.renderAddLocationBlock()}</div>`}};T("arcgis-utility-network-trace-location",k);return k},"geometry/operators/cutOperator","geometry/operators/lengthOperator","geometry/operators/projectOperator","geometry/Polyline","geometry/SpatialReference","Graphic","rest/networks/support/TraceLocation","symbols/SimpleMarkerSymbol")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{E as g,d as l,ha as f,i as R,k as m}from"./IPIYZVAJ.js";import{a as o}from"./GPGC63RW.js";import{g as u}from"./PILEMW25.js";var n=class extends g{constructor(){super(...arguments),this.ix=0,this.iy=0,this._generator=f()}_getTooltipPoint(){let s=this.get("tooltipX"),t=this.get("tooltipY"),r=0,a=0;u(s)&&(r=s),u(t)&&(a=t);let e=this.get("radius",0),i=this.get("innerRadius",0),d=this.get("dRadius",0),h=this.get("dInnerRadius",0);return e+=d,i+=h,i<0&&(i=e+i),s instanceof o&&(r=this.ix*(i+(e-i)*s.value)),t instanceof o&&(a=this.iy*(i+(e-i)*t.value)),this.get("arc")>=360&&i==0&&(r=0,a=0),{x:r,y:a}}_beforeChanged(){super._beforeChanged(),(this.isDirty("radius")||this.isDirty("arc")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("dRadius")||this.isDirty("dInnerRadius")||this.isDirty("cornerRadius")||this.isDirty("shiftRadius"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){let s=this.get("startAngle",0),t=this.get("arc",0),r=this._generator;t<0&&(s=s+t,t=t*-1),t>.1&&r.cornerRadius(this.get("cornerRadius",0)),r.context(this._display);let a=this.get("radius",0),e=this.get("innerRadius",0),i=this.get("dRadius",0),d=this.get("dInnerRadius",0);a+=i,e+=d,e<0&&(e=a+e),r({innerRadius:e,outerRadius:a,startAngle:(s+90)*l,endAngle:(s+t+90)*l});let h=s+t/2;this.ix=m(h),this.iy=R(h);let c=this.get("shiftRadius",0);this.setRaw("dx",this.ix*c),this.setRaw("dy",this.iy*c),this.markDirtyPosition()}}};n.className="Slice";n.classNames=g.classNames.concat([n.className]);export{n as a};
2
+ import{E as g,d as l,i as R,k as m,ka as f}from"./FWXI6DGS.js";import{a as o}from"./XEXCDGSR.js";import{g as u}from"./DQH27QCF.js";var n=class extends g{constructor(){super(...arguments),this.ix=0,this.iy=0,this._generator=f()}_getTooltipPoint(){let s=this.get("tooltipX"),t=this.get("tooltipY"),r=0,a=0;u(s)&&(r=s),u(t)&&(a=t);let e=this.get("radius",0),i=this.get("innerRadius",0),d=this.get("dRadius",0),h=this.get("dInnerRadius",0);return e+=d,i+=h,i<0&&(i=e+i),s instanceof o&&(r=this.ix*(i+(e-i)*s.value)),t instanceof o&&(a=this.iy*(i+(e-i)*t.value)),this.get("arc")>=360&&i==0&&(r=0,a=0),{x:r,y:a}}_beforeChanged(){super._beforeChanged(),(this.isDirty("radius")||this.isDirty("arc")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("dRadius")||this.isDirty("dInnerRadius")||this.isDirty("cornerRadius")||this.isDirty("shiftRadius"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){let s=this.get("startAngle",0),t=this.get("arc",0),r=this._generator;t<0&&(s=s+t,t=t*-1),t>.1&&r.cornerRadius(this.get("cornerRadius",0)),r.context(this._display);let a=this.get("radius",0),e=this.get("innerRadius",0),i=this.get("dRadius",0),d=this.get("dInnerRadius",0);a+=i,e+=d,e<0&&(e=a+e),r({innerRadius:e,outerRadius:a,startAngle:(s+90)*l,endAngle:(s+t+90)*l});let h=s+t/2;this.ix=m(h),this.iy=R(h);let c=this.get("shiftRadius",0);this.setRaw("dx",this.ix*c),this.setRaw("dy",this.iy*c),this.markDirtyPosition()}}};n.className="Slice";n.classNames=g.classNames.concat([n.className]);export{n as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import f from"./DLB6EEQE.js";import"./CAXI6CJY.js";import e from"./5CJ44XUV.js";import{a as F}from"./SVVJHTPA.js";import d from"./3JMJAUSY.js";import c from"./RO4TU5R3.js";import{g as _}from"./55IJQTCC.js";import"./7DOI3267.js";import a from"./O5TDDX7K.js";import{b as x}from"./EHZW6UXL.js";import{N as y,O as I,P as M,R as b,U as C,a as $,b as n,x as w}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([k,{substitute:B},N,{watch:Z},{stripHTML:H},,,,L,{a:T,b:E,c:A,d:D,e:V,i:R,p:d}])=>{var P=$`:host{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1);--calcite-color-background: var(--calcite-color-foreground-1)}.root{flex:1 1 auto}.root calcite-icon{box-sizing:content-box}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.content-element{margin-bottom:var(--calcite-spacing-lg);padding:0 var(--calcite-spacing-sm);display:flex;flex-direction:column}.content-element:only-child,.content-element:last-child{margin-bottom:var(--calcite-spacing-xxs)}.last-edited-info{padding-top:var(--calcite-spacing-xs);font-size:var(--calcite-font-size-sm)}`,U=L(k),v=class extends I{constructor(){super(...arguments),this.messages=F(),this._rootFlowNode=null,this.flowType="feature",this.internalFlowItems=new N,this.viewModel=U(this),this.view=this.viewModel.view,this.icon="icon",this.isFeatureFromTable=this.viewModel.isFeatureFromTable,this.graphic=this.viewModel.graphic,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.headingLevel=2,this.spatialReference=this.viewModel.spatialReference,this.timeZone=this.viewModel.timeZone,this.heading=this.viewModel.title,this.map=this.viewModel.map,this.chartAnimationDisabled=this.viewModel.abilities.chartAnimation,this.hideHeading=!1,this.hideContent=!1,this.hideAttachmentsContent=!1,this.hideCustomContent=!1,this.hideExpressionContent=!1,this.hideFieldsContent=!1,this.hideMediaContent=!1,this.showRelationshipContent=!1,this.hideTextContent=!1,this.showUtilityNetworkContent=!1,this.hideLastEditedInfo=!1,this.autoDestroyDisabled=!1,this.location=this.viewModel.location,this.state=this.viewModel.state,this.arcgisPropertyChange=_()("flowItems","state"),this.arcgisReady=w()}static{this.properties={flowType:16,popupTemplate:16,sourceLayer:16,fieldInfoMap:16,values:16,globalValues:16,internalFlowItems:16,viewModel:0,view:0,flowItems:0,referenceElement:1,icon:1,isFeatureFromTable:36,graphic:0,defaultPopupTemplateEnabled:5,headingLevel:9,spatialReference:0,timeZone:1,heading:0,map:0,chartAnimationDisabled:5,hideHeading:5,hideContent:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,showRelationshipContent:5,hideTextContent:5,showUtilityNetworkContent:5,hideLastEditedInfo:5,autoDestroyDisabled:5,messageOverrides:0,label:1,location:0,state:32}}static{this.styles=P}get popupTemplate(){return A(this.graphic,this.defaultPopupTemplateEnabled)??void 0}get sourceLayer(){return D(this.graphic)}get fieldInfoMap(){return T(E(this.popupTemplate),this.sourceLayer)}get values(){return this.graphic?.attributes??{}}get globalValues(){return this.viewModel.formattedAttributes?.global??{}}async destroy(){this._removeFlowItems(),await this.manager.destroy()}async nextMedia(e){return this.viewModel.nextMedia(e)}async previousMedia(e){return this.viewModel.previousMedia(e)}async setActiveMedia(e,t){return this.viewModel.setActiveMedia(e,t)}async updateGeometry(){return await this.viewModel.updateGeometry()}loaded(){this.manager.onLifecycle(()=>[Z(()=>[this.internalFlowItems?.length],()=>this._setFocus())])}_removeFlowItems(){this.internalFlowItems?.destroyAll()}_storeRootFlowNode(e){this._rootFlowNode=e}_setFocus(){this._rootFlowNode?.setFocus()}_handleDrillInBackClick(){this.internalFlowItems?.pop()?.destroy()}render(){let{state:e}=this.viewModel,t=n`<div class="container">${e==="error"?this._renderError():e==="loading"?this._renderLoading():this._renderContentContainer()}</div>`;return n`<div class="root">${t}</div>`}_renderError(){let{messages:e,hideHeading:t}=this;return n`<calcite-notice icon=exclamation-mark-circle kind=danger open scale=s>${t?null:n`<div slot=title>${e.error}</div>`}<div slot=message>${e.loadingError}</div></calcite-notice>`}_renderLoading(){return n`<div class="loading-container"><calcite-loader inline label></calcite-loader></div>`}_renderAttachments(e){let{values:t,fieldInfoMap:i,sourceLayer:o,globalValues:a}=this,s=d({values:t,fieldInfoMap:i,globalValues:a,layer:o,text:e.title}),r=d({values:t,fieldInfoMap:i,globalValues:a,layer:o,text:e.description});return n`<arcgis-feature-attachments .headingLevel=${this.headingLevel} .heading=${s} class="content-element" .displayType=${e.displayType} .attachmentKeywords=${e.attachmentKeywords??void 0} .attachmentTypes=${e.attachmentTypes??void 0} .orderByFields=${e.orderByFields??void 0} .graphic=${this.graphic??void 0} .description=${r} .messages=${this.messages}></arcgis-feature-attachments>`}_renderCustom(e){return n`<arcgis-feature-content .creator=${e.creator} .destroyer=${e.destroyer??void 0} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderFields(e,t){let i=this.viewModel.formattedAttributes,{values:o,fieldInfoMap:a,sourceLayer:s,popupTemplate:r,globalValues:l,graphic:c}=this,h=!!e?.fieldInfos,p=(e.fieldInfos??r?.fieldInfos??[])?.filter(({fieldName:u})=>!!u&&(R(u)||V(u)||u in o)),m=r?.expressionInfos,f=d({values:o,fieldInfoMap:a,globalValues:l,layer:s,text:e.title}),g=d({values:o,fieldInfoMap:a,globalValues:l,layer:s,text:e.description});return n`<arcgis-feature-fields .headingLevel=${this.headingLevel} .heading=${f} class="content-element" .messages=${this.messages} .graphic=${c??void 0} .isContentFieldInfos=${h} .layer=${s} .description=${g} .values=${{...i?.global,...i?.content?.[t]}} .fieldInfos=${p} .expressionInfos=${m??void 0}></arcgis-feature-fields>`}_renderMedia(e,t){let{values:i,graphic:o,fieldInfoMap:a,sourceLayer:s,popupTemplate:r,globalValues:l}=this,{formattedAttributes:c,relatedInfos:h}=this.viewModel,p={...c?.global,...c?.content?.[t]},m=d({values:i,fieldInfoMap:a,globalValues:l,layer:s,text:e.title}),f=d({values:i,fieldInfoMap:a,globalValues:l,layer:s,text:e.description});return n`<arcgis-feature-media .activeMediaInfoIndex=${e.activeMediaInfoIndex??0} .chartAnimationDisabled=${this.chartAnimationDisabled} .headingLevel=${this.headingLevel} .heading=${m} class="content-element" .description=${f} .values=${i} .layer=${s} .graphic=${o??void 0} .messages=${this.messages} .fieldInfoMap=${a} .mediaInfos=${e.mediaInfos??[]} .popupTemplate=${r??void 0} .relatedInfos=${h} .formattedValues=${p}></arcgis-feature-media>`}_renderText(e){return n`<arcgis-feature-content .creator=${e.text} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderExpression(e,t){let i=this.viewModel.formattedAttributes,{fieldInfoMap:o}=this;return n`<arcgis-feature-expression .expressionInfo=${e.expressionInfo} .map=${this.map??void 0} .spatialReference=${this.spatialReference??void 0} .view=${this.viewModel.view??void 0} .graphic=${this.graphic??void 0} .location=${this.location??void 0} .headingLevel=${this.headingLevel} class="content-element" .interceptor=${this.viewModel.interceptor} .messages=${this.messages} .fieldInfoMap=${o} .values=${{...i?.global,...i?.content?.[t]}}></arcgis-feature-expression>`}_renderRelationship(e,t){let{values:i,graphic:o,fieldInfoMap:a,sourceLayer:s,globalValues:r}=this,{displayCount:l,orderByFields:c,relationshipId:h}=e,{formattedAttributes:p,view:m}=this.viewModel,f={...p?.global,...p?.content?.[t]},g=d({values:i,fieldInfoMap:a,globalValues:r,layer:s,text:e.title}),u=d({values:i,fieldInfoMap:a,globalValues:r,layer:s,text:e.description});return n`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} class="content-element" .flowItems=${this.flowItems??this.internalFlowItems} .description=${u} .layer=${s} .map=${this.map??void 0} .displayCount=${l} .graphic=${o??void 0} .heading=${g} .headingLevel=${this.headingLevel} .messages=${this.messages} .orderByFields=${c??void 0} .relationshipId=${h??void 0} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .values=${f} .view=${m??void 0}></arcgis-feature-relationship>`}_renderAssociation(e){let{fieldInfoMap:t,globalValues:i,graphic:o,messages:a,sourceLayer:s,values:r}=this,l=d({values:r,fieldInfoMap:t,globalValues:i,layer:s,text:e.title}),c=d({values:r,fieldInfoMap:t,globalValues:i,layer:s,text:e.description});return n`<arcgis-feature-utility-network-associations .autoDestroyDisabled=${this.autoDestroyDisabled} .associationTypes=${e.associationTypes} class="content-element" .description=${c} .flowItems=${this.flowItems??this.internalFlowItems} .graphic=${o??void 0} .heading=${l} .headingLevel=${this.headingLevel} .layer=${s} .map=${this.map??void 0} .messages=${a} .parentFeatureViewModel=${this.viewModel} .referenceElement=${this.referenceElement} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .view=${this.viewModel.view??void 0}></arcgis-feature-utility-network-associations>`}_renderContentElement(e,t){switch(e.type){case"attachments":return this.hideAttachmentsContent?null:this._renderAttachments(e);case"custom":return this.hideCustomContent?null:this._renderCustom(e);case"fields":return this.hideFieldsContent?null:this._renderFields(e,t);case"media":return this.hideMediaContent?null:this._renderMedia(e,t);case"text":return this.hideTextContent?null:this._renderText(e);case"expression":return this.hideExpressionContent?null:this._renderExpression(e,t);case"relationship":return this.showRelationshipContent?this._renderRelationship(e,t):null;case"utility-network-associations":return this.showUtilityNetworkContent?this._renderAssociation(e):null;default:return null}}_renderContent(){let{content:e,graphic:t}=this.viewModel;return e?Array.isArray(e)&&e.length?e.length?e.map(this._renderContentElement,this):null:typeof e=="string"?n`<arcgis-feature-content .creator=${e} .graphic=${t??void 0} class="content-element"></arcgis-feature-content>`:e instanceof HTMLElement?e:null:null}_renderContentContainer(){let{hideContent:e,internalFlowItems:t,headingLevel:i,state:o,messages:a}=this;if(e)return null;let s=n`<div class="main">${[this._renderContent(),this._renderLastEditInfo()]}</div>`,r=a.returnToInitialFeature??"";return this.flowItems?s:n`<calcite-flow ${y(this._storeRootFlowNode)}><calcite-flow-item .loading=${o==="loading"} .headingLevel=${i} .heading=${this.hideHeading?void 0:H(this.heading)} .selected=${!t.length}>${s}</calcite-flow-item>${t.toArray().map((l,c)=>n`<calcite-flow-item @calciteFlowItemBack=${h=>{h.preventDefault(),this._handleDrillInBackClick()}} .loading=${o==="loading"} .headingLevel=${i} .selected=${c===t.length-1}><calcite-action icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${r} title=${r??b}></calcite-action>${l}</calcite-flow-item>`)}</calcite-flow>`}_renderLastEditInfo(){let{hideLastEditedInfo:e,messages:t}=this,{lastEditInfo:i}=this.viewModel;if(!i||e)return null;let{date:o,user:a}=i,s=i.type==="edit"?a?t.lastEditedByUser:t.lastEdited:a?t.lastCreatedByUser:t.lastCreated,r=B(s??"",{date:o,user:a});return n`<div class=${M(x("last-edited-info","content-element"))}>${r}</div>`}};C("arcgis-feature",v);return v},"widgets/Feature/FeatureViewModel","intl","core/Collection","core/reactiveUtils","applications/Components/stringUtils",a,c,d,e,f)
2
+ import f from"./YET5HTLQ.js";import"./FF5VMKLK.js";import e from"./5CJ44XUV.js";import{a as F}from"./SVVJHTPA.js";import d from"./3JMJAUSY.js";import c from"./RO4TU5R3.js";import{g as _}from"./55IJQTCC.js";import"./7DOI3267.js";import a from"./O5TDDX7K.js";import{b as x}from"./EHZW6UXL.js";import{N as y,O as I,P as M,R as b,U as C,a as $,b as n,x as w}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([k,{substitute:B},N,{watch:Z},{stripHTML:H},,,,L,{a:T,b:E,c:A,d:D,e:V,i:R,p:d}])=>{var P=$`:host{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1);--calcite-color-background: var(--calcite-color-foreground-1)}.root{flex:1 1 auto}.root calcite-icon{box-sizing:content-box}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.content-element{margin-bottom:var(--calcite-spacing-lg);padding:0 var(--calcite-spacing-sm);display:flex;flex-direction:column}.content-element:only-child,.content-element:last-child{margin-bottom:var(--calcite-spacing-xxs)}.last-edited-info{padding-top:var(--calcite-spacing-xs);font-size:var(--calcite-font-size-sm)}`,U=L(k),v=class extends I{constructor(){super(...arguments),this.messages=F(),this._rootFlowNode=null,this.flowType="feature",this.internalFlowItems=new N,this.viewModel=U(this),this.view=this.viewModel.view,this.icon="icon",this.isFeatureFromTable=this.viewModel.isFeatureFromTable,this.graphic=this.viewModel.graphic,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.headingLevel=2,this.spatialReference=this.viewModel.spatialReference,this.timeZone=this.viewModel.timeZone,this.heading=this.viewModel.title,this.map=this.viewModel.map,this.chartAnimationDisabled=this.viewModel.abilities.chartAnimation,this.hideHeading=!1,this.hideContent=!1,this.hideAttachmentsContent=!1,this.hideCustomContent=!1,this.hideExpressionContent=!1,this.hideFieldsContent=!1,this.hideMediaContent=!1,this.showRelationshipContent=!1,this.hideTextContent=!1,this.showUtilityNetworkContent=!1,this.hideLastEditedInfo=!1,this.autoDestroyDisabled=!1,this.location=this.viewModel.location,this.state=this.viewModel.state,this.arcgisPropertyChange=_()("flowItems","state"),this.arcgisReady=w()}static{this.properties={flowType:16,popupTemplate:16,sourceLayer:16,fieldInfoMap:16,values:16,globalValues:16,internalFlowItems:16,viewModel:0,view:0,flowItems:0,referenceElement:1,icon:1,isFeatureFromTable:36,graphic:0,defaultPopupTemplateEnabled:5,headingLevel:9,spatialReference:0,timeZone:1,heading:0,map:0,chartAnimationDisabled:5,hideHeading:5,hideContent:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,showRelationshipContent:5,hideTextContent:5,showUtilityNetworkContent:5,hideLastEditedInfo:5,autoDestroyDisabled:5,messageOverrides:0,label:1,location:0,state:32}}static{this.styles=P}get popupTemplate(){return A(this.graphic,this.defaultPopupTemplateEnabled)??void 0}get sourceLayer(){return D(this.graphic)}get fieldInfoMap(){return T(E(this.popupTemplate),this.sourceLayer)}get values(){return this.graphic?.attributes??{}}get globalValues(){return this.viewModel.formattedAttributes?.global??{}}async destroy(){this._removeFlowItems(),await this.manager.destroy()}async nextMedia(e){return this.viewModel.nextMedia(e)}async previousMedia(e){return this.viewModel.previousMedia(e)}async setActiveMedia(e,t){return this.viewModel.setActiveMedia(e,t)}async updateGeometry(){return await this.viewModel.updateGeometry()}loaded(){this.manager.onLifecycle(()=>[Z(()=>[this.internalFlowItems?.length],()=>this._setFocus())])}_removeFlowItems(){this.internalFlowItems?.destroyAll()}_storeRootFlowNode(e){this._rootFlowNode=e}_setFocus(){this._rootFlowNode?.setFocus()}_handleDrillInBackClick(){this.internalFlowItems?.pop()?.destroy()}render(){let{state:e}=this.viewModel,t=n`<div class="container">${e==="error"?this._renderError():e==="loading"?this._renderLoading():this._renderContentContainer()}</div>`;return n`<div class="root">${t}</div>`}_renderError(){let{messages:e,hideHeading:t}=this;return n`<calcite-notice icon=exclamation-mark-circle kind=danger open scale=s>${t?null:n`<div slot=title>${e.error}</div>`}<div slot=message>${e.loadingError}</div></calcite-notice>`}_renderLoading(){return n`<div class="loading-container"><calcite-loader inline label></calcite-loader></div>`}_renderAttachments(e){let{values:t,fieldInfoMap:i,sourceLayer:o,globalValues:a}=this,s=d({values:t,fieldInfoMap:i,globalValues:a,layer:o,text:e.title}),r=d({values:t,fieldInfoMap:i,globalValues:a,layer:o,text:e.description});return n`<arcgis-feature-attachments .headingLevel=${this.headingLevel} .heading=${s} class="content-element" .displayType=${e.displayType} .attachmentKeywords=${e.attachmentKeywords??void 0} .attachmentTypes=${e.attachmentTypes??void 0} .orderByFields=${e.orderByFields??void 0} .graphic=${this.graphic??void 0} .description=${r} .messages=${this.messages}></arcgis-feature-attachments>`}_renderCustom(e){return n`<arcgis-feature-content .creator=${e.creator} .destroyer=${e.destroyer??void 0} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderFields(e,t){let i=this.viewModel.formattedAttributes,{values:o,fieldInfoMap:a,sourceLayer:s,popupTemplate:r,globalValues:l,graphic:c}=this,h=!!e?.fieldInfos,p=(e.fieldInfos??r?.fieldInfos??[])?.filter(({fieldName:u})=>!!u&&(R(u)||V(u)||u in o)),m=r?.expressionInfos,f=d({values:o,fieldInfoMap:a,globalValues:l,layer:s,text:e.title}),g=d({values:o,fieldInfoMap:a,globalValues:l,layer:s,text:e.description});return n`<arcgis-feature-fields .headingLevel=${this.headingLevel} .heading=${f} class="content-element" .messages=${this.messages} .graphic=${c??void 0} .isContentFieldInfos=${h} .layer=${s} .description=${g} .values=${{...i?.global,...i?.content?.[t]}} .fieldInfos=${p} .expressionInfos=${m??void 0}></arcgis-feature-fields>`}_renderMedia(e,t){let{values:i,graphic:o,fieldInfoMap:a,sourceLayer:s,popupTemplate:r,globalValues:l}=this,{formattedAttributes:c,relatedInfos:h}=this.viewModel,p={...c?.global,...c?.content?.[t]},m=d({values:i,fieldInfoMap:a,globalValues:l,layer:s,text:e.title}),f=d({values:i,fieldInfoMap:a,globalValues:l,layer:s,text:e.description});return n`<arcgis-feature-media .activeMediaInfoIndex=${e.activeMediaInfoIndex??0} .chartAnimationDisabled=${this.chartAnimationDisabled} .headingLevel=${this.headingLevel} .heading=${m} class="content-element" .description=${f} .values=${i} .layer=${s} .graphic=${o??void 0} .messages=${this.messages} .fieldInfoMap=${a} .mediaInfos=${e.mediaInfos??[]} .popupTemplate=${r??void 0} .relatedInfos=${h} .formattedValues=${p}></arcgis-feature-media>`}_renderText(e){return n`<arcgis-feature-content .creator=${e.text} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderExpression(e,t){let i=this.viewModel.formattedAttributes,{fieldInfoMap:o}=this;return n`<arcgis-feature-expression .expressionInfo=${e.expressionInfo} .map=${this.map??void 0} .spatialReference=${this.spatialReference??void 0} .view=${this.viewModel.view??void 0} .graphic=${this.graphic??void 0} .location=${this.location??void 0} .headingLevel=${this.headingLevel} class="content-element" .interceptor=${this.viewModel.interceptor} .messages=${this.messages} .fieldInfoMap=${o} .values=${{...i?.global,...i?.content?.[t]}}></arcgis-feature-expression>`}_renderRelationship(e,t){let{values:i,graphic:o,fieldInfoMap:a,sourceLayer:s,globalValues:r}=this,{displayCount:l,orderByFields:c,relationshipId:h}=e,{formattedAttributes:p,view:m}=this.viewModel,f={...p?.global,...p?.content?.[t]},g=d({values:i,fieldInfoMap:a,globalValues:r,layer:s,text:e.title}),u=d({values:i,fieldInfoMap:a,globalValues:r,layer:s,text:e.description});return n`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} class="content-element" .flowItems=${this.flowItems??this.internalFlowItems} .description=${u} .layer=${s} .map=${this.map??void 0} .displayCount=${l} .graphic=${o??void 0} .heading=${g} .headingLevel=${this.headingLevel} .messages=${this.messages} .orderByFields=${c??void 0} .relationshipId=${h??void 0} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .values=${f} .view=${m??void 0}></arcgis-feature-relationship>`}_renderAssociation(e){let{fieldInfoMap:t,globalValues:i,graphic:o,messages:a,sourceLayer:s,values:r}=this,l=d({values:r,fieldInfoMap:t,globalValues:i,layer:s,text:e.title}),c=d({values:r,fieldInfoMap:t,globalValues:i,layer:s,text:e.description});return n`<arcgis-feature-utility-network-associations .autoDestroyDisabled=${this.autoDestroyDisabled} .associationTypes=${e.associationTypes} class="content-element" .description=${c} .flowItems=${this.flowItems??this.internalFlowItems} .graphic=${o??void 0} .heading=${l} .headingLevel=${this.headingLevel} .layer=${s} .map=${this.map??void 0} .messages=${a} .parentFeatureViewModel=${this.viewModel} .referenceElement=${this.referenceElement} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .view=${this.viewModel.view??void 0}></arcgis-feature-utility-network-associations>`}_renderContentElement(e,t){switch(e.type){case"attachments":return this.hideAttachmentsContent?null:this._renderAttachments(e);case"custom":return this.hideCustomContent?null:this._renderCustom(e);case"fields":return this.hideFieldsContent?null:this._renderFields(e,t);case"media":return this.hideMediaContent?null:this._renderMedia(e,t);case"text":return this.hideTextContent?null:this._renderText(e);case"expression":return this.hideExpressionContent?null:this._renderExpression(e,t);case"relationship":return this.showRelationshipContent?this._renderRelationship(e,t):null;case"utility-network-associations":return this.showUtilityNetworkContent?this._renderAssociation(e):null;default:return null}}_renderContent(){let{content:e,graphic:t}=this.viewModel;return e?Array.isArray(e)&&e.length?e.length?e.map(this._renderContentElement,this):null:typeof e=="string"?n`<arcgis-feature-content .creator=${e} .graphic=${t??void 0} class="content-element"></arcgis-feature-content>`:e instanceof HTMLElement?e:null:null}_renderContentContainer(){let{hideContent:e,internalFlowItems:t,headingLevel:i,state:o,messages:a}=this;if(e)return null;let s=n`<div class="main">${[this._renderContent(),this._renderLastEditInfo()]}</div>`,r=a.returnToInitialFeature??"";return this.flowItems?s:n`<calcite-flow ${y(this._storeRootFlowNode)}><calcite-flow-item .loading=${o==="loading"} .headingLevel=${i} .heading=${this.hideHeading?void 0:H(this.heading)} .selected=${!t.length}>${s}</calcite-flow-item>${t.toArray().map((l,c)=>n`<calcite-flow-item @calciteFlowItemBack=${h=>{h.preventDefault(),this._handleDrillInBackClick()}} .loading=${o==="loading"} .headingLevel=${i} .selected=${c===t.length-1}><calcite-action icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${r} title=${r??b}></calcite-action>${l}</calcite-flow-item>`)}</calcite-flow>`}_renderLastEditInfo(){let{hideLastEditedInfo:e,messages:t}=this,{lastEditInfo:i}=this.viewModel;if(!i||e)return null;let{date:o,user:a}=i,s=i.type==="edit"?a?t.lastEditedByUser:t.lastEdited:a?t.lastCreatedByUser:t.lastCreated,r=B(s??"",{date:o,user:a});return n`<div class=${M(x("last-edited-info","content-element"))}>${r}</div>`}};C("arcgis-feature",v);return v},"widgets/Feature/FeatureViewModel","intl","core/Collection","core/reactiveUtils","applications/Components/stringUtils",a,c,d,e,f)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import a from"./YET5HTLQ.js";import{c as m,d as L}from"./FF5VMKLK.js";import{a as F}from"./SVVJHTPA.js";import"./55IJQTCC.js";import"./7DOI3267.js";import"./EHZW6UXL.js";import{M as v,N as h,O as $,U as w,a as f,b as r,p as o,r as g,s as b,x as n}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([{queryAllJSON:T},E,,,G,{r:p}])=>{var k=f`:host{min-height:var(--arcgis-internal-panel-height-sm, 240px);height:100%}arcgis-features{height:100%}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px);height:100%}calcite-table{--calcite-table-border-color: none}calcite-table-row{--calcite-table-row-border-color: var(--calcite-color-border-3)}.white-panel-background{--calcite-panel-background-color: var(--calcite-color-foreground-1)}.aggregated-geometry-container{display:flex;justify-content:space-between;padding:0 var(--calcite-spacing-md) var(--calcite-spacing-md) var(--calcite-spacing-md)}#elements-list-item{border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);margin:0 var(--calcite-spacing-sm)}.no-selectable-results{padding:0 var(--calcite-spacing-md);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size)}.results-heading{display:flex;flex-direction:column;margin:var(--calcite-spacing-md);gap:var(--calcite-spacing-xs)}.results-heading .results-heading-title{font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.results-heading .results-heading-subtitle{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-3)}.functions-heading{padding:var(--calcite-spacing-md) var(--calcite-spacing-md) var(--calcite-spacing-xxs) var(--calcite-spacing-md);font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.no-results-landing{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;margin:var(--calcite-spacing-sm) var(--calcite-spacing-xl) var(--calcite-spacing-xl) var(--calcite-spacing-xl);gap:var(--calcite-spacing-md)}.no-results-landing calcite-icon{margin-bottom:var(--calcite-spacing-sm);--calcite-icon-color: var(--calcite-color-text-3)}.no-results-landing .no-results-heading{font-size:var(--calcite-font-size-2)}.no-results-landing .no-results-description{color:var(--calcite-color-text-3)}`,R={dirtyAreasDiscovered:-2147208511,noValidControllers:-2147208935},y=class extends ${constructor(){super(...arguments),this._defaultPopupTemplateEnabled=!0,this._messages=F({blocking:!0}),this._elementsWithoutLayer=[],this._popoverRef=v(),this._featuresFromSelectedLayer=[],this._layerIdToFeatures=new Map,this._layerIdToLayer=new Map,this._subtypeCodeToFeatures=new Map,this._sourceIdToElements=new Map,this._unLayers=[],this._compareByFeatureTitle=(e,t)=>e.label.localeCompare(t.label,void 0,{numeric:!0}),this._compareByLayerTitle=([,e],[,t])=>{let s=e[0].feature.layer,a=t[0].feature.layer,l=s?.title??"",c=a?.title??"";return l.localeCompare(c,void 0,{numeric:!0})},this._queryFeaturesOnLayer=async([e,t])=>{let s=this.utilityNetwork?.getLayerIdBySourceId(e),a=this._getLayerByLayerId(s),l=this._getElementsUniqueByGlobalId(t);if(s==null||!a){this._elementsWithoutLayer.push(...l);return}let c=a.createQuery();c.gdbVersion=this.utilityNetwork?.gdbVersion,c.objectIds=l.map(i=>i.objectId),c.outFields=["*"];let{features:u}=G.fromJSON(await T(a,c)),_=await Promise.all(u.map(async i=>{i.layer=m(a)?a.findSublayerForFeature(i):a,i.origin=i.layer;let d=i.layer;if(i.getEffectivePopupTemplate(this._defaultPopupTemplateEnabled)||(i.popupTemplate=d.createPopupTemplate()),d&&"getFeatureTitle"in d){let C=await d.getFeatureTitle(i)||p(i);return{feature:i,label:C}}return{feature:i,label:p(i)}}));m(a)?_.forEach(i=>this._addOrCreateMapValue(this._subtypeCodeToFeatures,i.feature.layer.subtypeCode,i)):this._layerIdToFeatures.set(s,_)},this._aggregateGeometryRefChange=e=>{e&&(this._aggregatedGeometryComponentElement=e)},this._featuresRefChange=e=>{e&&(this._featuresComponentElement=e)},this._aggregatedGeometryDisabled=!1,this.aggregatedGeometryGraphicsColor=new E([255,255,0,.6]),this.hideActionBar=!1,this.hideFeatureResults=!1,this.isElementsSelected=!1,this.layers=[],this.state="ready",this.traceResultFeatures=[],this.autoDestroyDisabled=!1,this.arcgisAggregatedGeometryGraphicsColorChange=n(),this.arcgisHideGraphicsChange=n(),this.arcgisSelectedLayerChange=n(),this.arcgisSelectedResultTypeChange=n(),this.arcgisTraceResultFeaturesReady=n(),this._renderLayerListItem=([,e])=>{if(!e.length)return null;let t=e[0].feature.layer,s=t?.title||this._messages.unknown;return r`<calcite-list-item .label=${s} @calciteListItemSelect=${()=>this._setSelectedLayerAndFeatures(t)}><calcite-chip .label=${this._messages.labels.numElements} slot=content-end scale=s>${e.length}</calcite-chip><calcite-icon icon=chevron-right slot=content-end></calcite-icon></calcite-list-item>`},this._renderFeatureListItem=e=>{let{feature:t,label:s}=e;return r`<calcite-list-item .label=${s} @calciteListItemSelect=${()=>this.selectedFeature=t}><calcite-icon icon=chevron-right slot=content-end></calcite-icon></calcite-list-item>`}}static{this.properties={_aggregatedGeometryDisabled:16,aggregatedGeometryGraphicsColor:0,hideActionBar:5,hideFeatureResults:5,featuresFromSelectedLayer:32,isElementsSelected:5,layers:0,messageOverrides:0,numResults:32,referenceElement:1,selectedFeature:0,selectedLayer:0,state:1,traceConfigTitle:1,traceError:0,traceResult:0,traceResultFeatures:0,utilityNetwork:0,view:0,autoDestroyDisabled:5}}static{this.styles=k}get featuresFromSelectedLayer(){return this._featuresFromSelectedLayer.map(({feature:e})=>e)}get numResults(){return this.traceResultFeatures.length+this._elementsWithoutLayer.length}clearAggregatedGeometryGraphics(){this._aggregatedGeometryComponentElement?.destroy()}async destroy(){this._layerIdToFeatures.clear(),this._subtypeCodeToFeatures.clear(),this._sourceIdToElements.clear(),this._aggregatedGeometryComponentElement?.destroy(),this._featuresComponentElement?.destroy(),await this.manager.destroy()}load(){this.traceResult&&(this._setSourceIdToElements(),this._loadDependencies().then(()=>this._queryTraceResultsFeatures()).finally(()=>{this.arcgisTraceResultFeaturesReady.emit(),this.state="ready"}))}willUpdate(e){e.has("isElementsSelected")&&this.arcgisSelectedResultTypeChange.emit(),e.has("selectedLayer")&&this.arcgisSelectedLayerChange.emit(),e.has("traceResult")&&(this.isElementsSelected=!1,this.traceResult||(this.traceResultFeatures=[],this._elementsWithoutLayer=[])),(e.has("layers")||e.has("utilityNetwork"))&&this._loadDependencies()}loaded(){this.utilityNetwork||o("warn",this,g("utilityNetwork")),this.layers.length===0&&o("warn",this,b("layers")),this.view||o("warn",this,g("view"))}disconnectedCallback(){super.disconnectedCallback(),this._layerIdToLayer.clear()}_addOrCreateMapValue(e,t,s){let a=e.get(t);a==null?e.set(t,[s]):a.push(s)}_getLayerByLayerId(e){if(e==null)return;let{_layerIdToLayer:t,_unLayers:s}=this;if(t.get(e))return t.get(e);let a=s.find(l=>"layerId"in l&&l.layerId===e);return a&&t.set(e,a),a}_getElementsUniqueByGlobalId(e){return Array.from(new Map(e.map(t=>[t.globalId,t])).values())}_handleHideGraphicsChange(e){e.stopPropagation();let t=e.detail;this.arcgisHideGraphicsChange.emit(t),this._aggregatedGeometryDisabled=t,t&&this._popoverRef.value?.open&&(this._popoverRef.value.open=!1)}async _loadDependencies(){let{layers:e,utilityNetwork:t}=this;if(!t)return;t.loaded||(this.state="loading",await t.load()),this._unLayers=e.filter(a=>t.isUtilityLayer(a));let s=this._unLayers.filter(a=>!a.loaded).map(a=>a.load());s.length>0&&(this.state="loading",await Promise.allSettled(s))}async _queryTraceResultsFeatures(){let e=Array.from(this._sourceIdToElements.entries());if(!e.length)return;this.state="loading";let t=e.map(this._queryFeaturesOnLayer);(await Promise.allSettled(t)).forEach((l,c)=>{if(l.status==="rejected"){let[u]=e[c];o("error",this,`Failed to query features for source ${u}. Reason: ${l.reason}`)}});let s=Array.from(this._layerIdToFeatures.values()),a=Array.from(this._subtypeCodeToFeatures.values());this.traceResultFeatures=s.concat(a).flat().map(({feature:l})=>l)}_setSelectedLayerAndFeatures(e){let t;if(!e)t=[];else if(L(e)){let{subtypeCode:s}=e;t=this._subtypeCodeToFeatures.get(s)??[]}else{let{layerId:s}=e;t=this._layerIdToFeatures.get(s)??[]}this._featuresFromSelectedLayer=t.sort(this._compareByFeatureTitle),this.selectedLayer=e}_setSourceIdToElements(){this.traceResult.elements?.forEach(e=>this._addOrCreateMapValue(this._sourceIdToElements,e.networkSourceId,e))}render(){let{traceError:e,traceResult:t}=this;if(e)return this._renderErrorLanding(e);if(!t)return this._renderNoTraceLanding();let{elements:s,globalFunctionResults:a,aggregatedGeometry:l}=t;if(!s.length&&!a.length&&!l)return this._renderNoResultsLanding();if(this.state==="loading")return this._renderGettingResults();if(this.selectedFeature)return r`<arcgis-features .referenceElement=${this.referenceElement} .features=${[this.selectedFeature]} .view=${this.view} open .defaultPopupTemplateEnabled=${this._defaultPopupTemplateEnabled} .hideActionBar=${this.hideActionBar} @arcgisClose=${()=>this.selectedFeature=void 0} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._featuresRefChange)}></arcgis-features>`;let c=s.length>0&&!a.length&&!l;return this.hideFeatureResults&&c?this._renderFeaturesAreHiddenLanding():r`<calcite-flow>${c?null:r`<calcite-flow-item .selected=${!this.isElementsSelected}>${this._renderLanding(t)}</calcite-flow-item>`}<calcite-flow-item .heading=${this._messages.headings.features} .description=${this._messages.headings.totalFeatures.replace("{number}",this.numResults.toString())} .selected=${(c||this.isElementsSelected)&&!this.selectedLayer} @calciteFlowItemBack=${()=>this.isElementsSelected=!1}>${this._renderLayerList()}</calcite-flow-item><calcite-flow-item .heading=${this.selectedLayer?.title??void 0} .description=${this._messages.headings.totalFeatures.replace("{number}",this._featuresFromSelectedLayer.length.toString())} .selected=${!!this.selectedLayer} @calciteFlowItemBack=${()=>this.selectedLayer=void 0}>${this._renderFeaturesList()}</calcite-flow-item></calcite-flow>`}_renderGettingResults(){return r`<calcite-panel class="white-panel-background"><calcite-loader .label=${this._messages.gettingResults} .text=${this._messages.gettingResults}></calcite-loader></calcite-panel>`}_renderLanding(e){let{elements:t,globalFunctionResults:s,aggregatedGeometry:a}=e;return r`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}${a!=null?this._renderAggregatedGeometry(a):null}${a!=null&&!t.length?this._renderNoSelectableResults():null}${t.length>0?this.hideFeatureResults?this._renderFeaturesAreHidden():this._renderElementsResults():null}${s.length>0?this._renderFunctionsResults(s):null}</calcite-panel>`}_renderAggregatedGeometry(e){return r`<div class="aggregated-geometry-container"><arcgis-utility-network-aggregated-geometry .graphicsColor=${this.aggregatedGeometryGraphicsColor} .geometry=${e} .view=${this.view} @arcgisHideGraphicsChange=${this._handleHideGraphicsChange} auto-destroy-disabled ${h(this._aggregateGeometryRefChange)}></arcgis-utility-network-aggregated-geometry><calcite-swatch id=geometry-color-swatch .label=${this._messages.labels.aggregatedGeometryGraphicsColor} .color=${this.aggregatedGeometryGraphicsColor.toCss()} .disabled=${this._aggregatedGeometryDisabled}></calcite-swatch><calcite-popover .heading=${this._messages.headings.setColor} .label=${this._messages.headings.setColor} reference-element=geometry-color-swatch closable ${h(this._popoverRef)}><calcite-color-picker alpha-channel channels-disabled clearable hex-disabled saved-disabled .value=${this.aggregatedGeometryGraphicsColor} @calciteColorPickerChange=${t=>{let s=t.target.value;this.arcgisAggregatedGeometryGraphicsColorChange.emit(s)}} .disabled=${this._aggregatedGeometryDisabled}></calcite-color-picker></calcite-popover></div>`}_renderFeaturesAreHiddenLanding(){return r`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}${this._renderFeaturesAreHidden()}</calcite-panel>`}_renderFeaturesAreHidden(){return r`<div class="no-selectable-results">${this._messages.resultFeaturesAreHidden}</div>`}_renderNoSelectableResults(){return r`<div class="no-selectable-results">${this._messages.noSelectableFeatures}</div>`}_renderElementsResults(){return r`<calcite-list .label=${this._messages.headings.traceResultsGeneric}><calcite-list-item id=elements-list-item .label=${this._messages.headings.features} @calciteListItemSelect=${()=>this.isElementsSelected=!0}><calcite-chip .label=${this._messages.labels.numFeatures} scale=s slot=content-end>${this.numResults}</calcite-chip><calcite-icon icon=chevron-right slot=content-end></calcite-icon></calcite-list-item></calcite-list>`}_renderFunctionsResults(e){return r`<div class="functions-heading">${this._messages.headings.functions}</div><calcite-table .caption=${this._messages.labels.functionResults}>${e.filter(t=>t.networkAttributeName!=null&&t.result!=null&&t.functionType!=null).map(t=>r`<calcite-table-row><calcite-table-cell>${`${t.networkAttributeName} ${t.functionType}`}</calcite-table-cell><calcite-table-cell>${t.result}</calcite-table-cell></calcite-table-row>`)}</calcite-table>`}_renderLayerList(){let e=Array.from(this._layerIdToFeatures.entries()),t=Array.from(this._subtypeCodeToFeatures.entries()),s=e.concat(t).sort(this._compareByLayerTitle).map(this._renderLayerListItem);return this._elementsWithoutLayer.length>0&&s.push(this._renderUnknownListItem()),r`<calcite-list .label=${this._messages.labels.traceResultElementsByLayer} .loading=${this.state==="loading"}>${s}</calcite-list>`}_renderUnknownListItem(){return r`<calcite-list-item .label=${this._messages.unknown} disabled><calcite-chip .label=${this._messages.labels.numElements} slot=content-end scale=s>${this._elementsWithoutLayer.length}</calcite-chip></calcite-list-item>`}_renderFeaturesList(){return r`<calcite-list .label=${this._messages.headings.traceResultsGeneric}>${this._featuresFromSelectedLayer.map(this._renderFeatureListItem)}</calcite-list>`}_renderTraceResultsHeading(){return r`<div class="results-heading"><div class="results-heading-title">${this._messages.headings.traceResultsGeneric}</div>${this.traceConfigTitle?r`<div class="results-heading-subtitle">${this.traceConfigTitle}</div>`:null}</div>`}_renderErrorLanding(e){let t=e.message;switch(e.details?.raw?.extendedCode){case R.dirtyAreasDiscovered:t=this._messages.traceErrors.dirtyAreasDiscovered;break;case R.noValidControllers:t=this._messages.traceErrors.noValidControllers;break}return r`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${this._messages.traceFailedHeading}</div><div class="no-results-description">${this._messages.traceFailedDescription}</div><div class="no-results-description">${t}</div></div></calcite-panel>`}_renderNoResultsLanding(){return r`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${this._messages.noResultsHeading}</div><div class="no-results-description">${this._messages.noResultsDescription}</div></div></calcite-panel>`}_renderNoTraceLanding(){return r`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}<div class="no-results-landing"><calcite-icon icon=utility-network-trace scale=l></calcite-icon><div class="no-results-heading">${this._messages.noTraceConfigHeading}</div><div class="no-results-description">${this._messages.noTraceConfigDescription}</div></div></calcite-panel>`}};w("arcgis-utility-network-trace-results",y);return y},"applications/Components/featureUtils","Color","core/Error","Graphic","rest/support/FeatureSet",a)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import a from"./YET5HTLQ.js";import{a as N,b as g,c as p,d as v}from"./FF5VMKLK.js";import{a as $}from"./MPXHOG6M.js";import{a as L}from"./SVVJHTPA.js";import{g as C}from"./55IJQTCC.js";import"./7DOI3267.js";import"./EHZW6UXL.js";import{N as h,O as S,U as T,a as b,b as s,p as d,r as _,s as k,x as n}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([{queryAllJSON:E},u,{watch:F},{substitute:U},A,D,M,P,I,B,{r:m}])=>{var x=b`: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-select,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 var(--calcite-spacing-md)}calcite-block calcite-label:last-child{--calcite-label-margin-bottom: 0}calcite-notice{margin:var(--calcite-spacing-md)}#subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}#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) 0;font-size:var(--calcite-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium)}`,f=`utility-network-trace-inputs-sketch-${Date.now()}`,c=`utility-network-trace-inputs-flags-${Date.now()}`,R=20,w=class extends S{constructor(){super(...arguments),this._defaultPopupTemplateEnabled=!0,this._messages=L({blocking:!0}),this._layerIdToLayer=new Map,this._startingPoints=new u,this._barriers=new u,this._stoppingPoints=new u,this._subnetworkTraceTypes=new Set(["subnetwork","subnetwork-controller","upstream","downstream","isolation"]),this._removeDuplicateSubnetworkNames=(e,t,i)=>t===0||e.getAttribute("SUBNETWORKNAME")!==i[t-1].getAttribute("SUBNETWORKNAME"),this._hitTestPromise=null,this._featuresFromHitTest=[],this._displayLimit=20,this._traceLocationStartingRefChange=e=>{e&&(this._traceLocationStartingElement=e)},this._traceLocationBarrierRefChange=e=>{e&&(this._traceLocationBarrierElement=e)},this._traceLocationStoppingRefChange=e=>{e&&(this._traceLocationStoppingElement=e)},this._featuresComponentRefChange=e=>{e&&(this._featuresComponentElement=e)},this.compatibleSubnetworkNames=[],this.traceConfigurations=[],this._state="ready",this._exceedDisplayLimit=!1,this.autoDestroyDisabled=!1,this.hideActionBar=!1,this.mode="default",this.arcgisPropertyChange=C()("mode"),this.arcgisSelectedNamedTraceConfigurationChange=n(),this.arcgisTraceInputsChange=n(),this.arcgisTraceLocationSelectEnd=n(),this.arcgisTraceLocationSelectStart=n(),this.arcgisUtilityNetworkChange=n(),this.renderFeatureListItem=e=>{let{feature:t,label:i}=e;return s`<calcite-list-item .label=${i} @calciteListItemSelect=${()=>this._handleFeatureSelectChange(t)}><calcite-icon icon=chevron-right slot=content-end></calcite-icon></calcite-list-item>`}}static{this.properties={compatibleSubnetworkNames:16,subnetworksTable:16,traceConfigurations:16,utilityNetworks:16,_unTraceConfiguration:16,_state:16,_activeTraceLocationType:16,_selectedFeature:16,_exceedDisplayLimit:16,beforeTraceLocationSelectStart:0,view:0,selectedUtilityNetwork:0,selectedNamedTraceConfiguration:0,autoDestroyDisabled:5,hideActionBar:5,unTraceConfiguration:32,referenceElement:1,mode:3,traceLocations:32}}static{this.styles=x}get isSubnetworkNameTraceSelected(){let e=this.selectedNamedTraceConfiguration?.traceType;return!!this.selectedNamedTraceConfiguration?.traceConfiguration?.subnetworkName&&e==="subnetwork"}get selectedSubnetworkName(){return this._unTraceConfiguration?.subnetworkName??void 0}set selectedSubnetworkName(e){this._unTraceConfiguration&&(this._unTraceConfiguration.subnetworkName=e)}get _allLayers(){let{view:e}=this;return e?.map?e.map.allLayers.toArray().concat(e.map.allTables.toArray()):[]}get showStartingPoints(){return!this.isSubnetworkNameTraceSelected}get showStoppingPoints(){let e=this.selectedNamedTraceConfiguration?.traceType;return e==="path"||e==="circuit"}get _subnetworkLayerIds(){let e=this.selectedUtilityNetwork?.dataElement?.domainNetworks;return e?e.map(t=>t.subnetworkLayerId).filter(t=>t!=null&&t>-1):[]}get unTraceConfiguration(){return this._unTraceConfiguration}get traceLocations(){let e=[],t=i=>{i.flagProperties.terminalConfiguration&&i.flagProperties.selectedTerminals?i.flagProperties.selectedTerminals.forEach(a=>{e.push(new M({type:i.traceLocation.type,isFilterBarrier:i.traceLocation.isFilterBarrier,globalId:i.traceLocation.globalId,percentAlong:i.traceLocation.percentAlong,terminalId:a}))}):e.push(i.traceLocation)};return this.showStartingPoints&&this._startingPoints.forEach(i=>t(i)),this._barriers.forEach(i=>t(i)),this.showStoppingPoints&&this._stoppingPoints.forEach(i=>t(i)),e}async destroy(){this._removeGraphicLayer(f),this._removeGraphicLayer(c),this._sketchViewModel?.cancel(),this._featuresComponentElement?.destroy(),this._traceLocationStartingElement?.destroy(),this._traceLocationBarrierElement?.destroy(),this._traceLocationStoppingElement?.destroy(),await this.manager.destroy()}load(){this.manager.onLifecycle(()=>[F(()=>this.view?.map,()=>{this._setupUtilityNetwork(),this._setupSketchViewModel()},{initial:!0})])}willUpdate(e){let{utilityNetworks:t,selectedUtilityNetwork:i}=this;(e.has("utilityNetworks")||!t||t.length===0||!i||!t?.includes(i))&&this._handleUtilityNetworksChange(),e.has("selectedUtilityNetwork")&&(this.arcgisUtilityNetworkChange.emit(),this._handleSelectedUtilityNetworkChange()),e.has("selectedNamedTraceConfiguration")&&(this.arcgisTraceInputsChange.emit(),this.arcgisSelectedNamedTraceConfigurationChange.emit(),this._handleTraceConfigChange()),e.has("selectedSubnetworkName")&&this.arcgisTraceInputsChange.emit()}disconnectedCallback(){super.disconnectedCallback(),this._layerIdToLayer.clear()}_clearTraceLocations(){this._getGraphicLayer(c)?.removeAll(),this._startingPoints.removeAll(),this._barriers.removeAll(),this._stoppingPoints.removeAll()}_createGraphicLayer(e){let{map:t}=this.view;if(!t?.findLayerById(e)){let i=new A({id:e,listMode:"hide",title:e});N(this.view,i)}}_getGraphicLayer(e){let{map:t}=this.view;if(t){let i=t.findLayerById(e);if(g(i))return t.reorder(i,t.layers.length-1),i}return null}_removeGraphicLayer(e){let{map:t}=this.view,i=t?.findLayerById(e);i&&g(i)&&t?.remove(i)}_setSnappingOption(){let{_sketchViewModel:e,_unLayers:t}=this;if(e&&t&&t.length>0){let i=new u;t.forEach(a=>{p(a)?a.sublayers.forEach(r=>{i.add(new I({layer:r,enabled:!0}))}):i.add(new I({layer:a,enabled:!0}))}),e.snappingOptions={enabled:!0,featureEnabled:!0,featureSources:i}}}_initializeSketchViewModel(){let{view:e}=this,t=this._getGraphicLayer(f);return new B({layer:t,view:e})}_setupSketchViewModel(){this._createGraphicLayer(f),this._createGraphicLayer(c),this._sketchViewModel=this._initializeSketchViewModel(),this._setSnappingOption()}_clearSubnetworks(){this.selectedSubnetworkName=void 0,this.subnetworksTable=void 0,this.compatibleSubnetworkNames=[]}async _loadSubnetworksTable(){this.subnetworksTable||(this.subnetworksTable=await this.selectedUtilityNetwork?.loadSubnetworksTable())}async _querySubnetworks(){let{subnetworksTable:e}=this;if(!e)return;let t=e.createQuery();t.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,t.where=this._getSubnetworkQueryWhereClause(),t.outFields=["SUBNETWORKNAME"],t.orderByFields=["SUBNETWORKNAME"];let i=P.fromJSON(await E(e,t));this.compatibleSubnetworkNames=i.features.filter(this._removeDuplicateSubnetworkNames).map(a=>a.getAttribute("SUBNETWORKNAME"))}_getSubnetworkQueryWhereClause(){let e=this._unTraceConfiguration,t=`DOMAINNETWORKNAME = '${e.domainNetworkName}'`,i=`TIERNAME = '${e.tierName}'`;return[t,i].join(" AND ")}async _handleSubnetworkTraceConfigChange(e){await this._loadSubnetworksTable(),await this._querySubnetworks();let{compatibleSubnetworkNames:t}=this;e.subnetworkName&&!t.some(i=>i===e.subnetworkName)&&(this.selectedSubnetworkName=t.at(0))}_selectTraceConfigurationByGuid(e){let t=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.find(i=>i.globalId===e);if(!t){d("error",this,"`traceConfig` not found in `selectedUtilityNetwork.sharedNamedTraceConfigurations`");return}this.selectedNamedTraceConfiguration=t}_handleTraceConfigChange(){let{selectedNamedTraceConfiguration:e}=this;if(!(e?.traceConfiguration instanceof D)){d("error",this,_("selectedNamedTraceConfiguration.traceConfiguration")),this._unTraceConfiguration=void 0;return}switch(this._unTraceConfiguration=e.traceConfiguration.clone(),e.traceType){case"subnetwork":this._state="loading",this._handleSubnetworkTraceConfigChange(this._unTraceConfiguration).finally(()=>this._state="ready");break}}async _handleSelectedUtilityNetworkChange(){await this.selectedUtilityNetwork?.load(),this._clearSubnetworks(),this._setupTraceConfigurations(),this._filterUnLayers(),this._clearTraceLocations()}_setupTraceConfigurations(){this._unTraceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0,this.traceConfigurations=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter(e=>e.traceType!=="path"&&e.traceType!=="circuit").sort((e,t)=>e.title.localeCompare(t.title))||[],this.selectedNamedTraceConfiguration=this.traceConfigurations.at(0)}_filterUnLayers(){let{selectedUtilityNetwork:e}=this;this._unLayers=new u(this._allLayers.filter(t=>e?.isUtilityLayer(t)&&!this._subnetworkLayerIds.includes(t.layerId))),this._setSnappingOption()}_handleUtilityNetworksChange(){let{utilityNetworks:e}=this;if(!e||e.length===0){this.selectedUtilityNetwork=void 0,this._state="error",d("error",this,k("utilityNetworks"));return}(!this.selectedUtilityNetwork||!e.includes(this.selectedUtilityNetwork))&&(this.selectedUtilityNetwork=e.at(0))}async _setupUtilityNetwork(){if(this.view?.map){let e=this.view.map;await e.load(),this.utilityNetworks=e.utilityNetworks||void 0}else this._state="disabled",d("error",this,"The property `view.map` is required to load utility networks but is missing.")}_handleTraceLocationSelectStart(e){if(e.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(e.detail).defaultPrevented){e.preventDefault();return}this._activeTraceLocationType=e?.target?.traceLocationType,this.mode="add-spatial-instructions"}_getLayerByLayerId(e){if(e==null)return;let{_layerIdToLayer:t,_unLayers:i}=this;if(t.get(e))return t.get(e);if(!i)return;let a=i.find(r=>"layerId"in r&&r.layerId===e);return a&&t.set(e,a),a}async _queryFeatures(e,t){let i=e.createQuery();i.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,i.objectIds=t.map(r=>r.getObjectId()),i.outFields=["*"];let{features:a}=P.fromJSON(await E(e,i));return a.forEach(r=>{r.layer=p(e)?e.findSublayerForFeature(r):e,r.origin=r.layer;let o=r.layer;r.getEffectivePopupTemplate(this._defaultPopupTemplateEnabled)||(r.popupTemplate=o.createPopupTemplate())}),a}async _populateFeaturesWithLabel(e){let t=new Map;e.forEach(a=>{let r=v(a.layer)?a.layer.parent:a.layer;if(r){let o=r.layerId,l=this._getLayerByLayerId(o);if(l){let y=t.get(l)||[];y.push(a),t.set(l,y)}}});let i=[];return await Promise.all(Array.from(t.keys()).map(async a=>{let r=t.get(a)??[],o=await this._queryFeatures(a,r);i.push(...o)})),await Promise.all(i.map(async a=>{let r=a.layer;if(r&&"getFeatureTitle"in r){let o=await r.getFeatureTitle(a)||m(a);return{feature:a,label:o}}return{feature:a,label:m(a)}}))}async _handleHitTestComplete(e){if(this._exceedDisplayLimit=e.length>this._displayLimit,this._featuresFromHitTest=await this._populateFeaturesWithLabel(e.slice(0,this._displayLimit)),this._featuresFromHitTest.length===0)return this._handleAddSpatialCancelClick(),await Promise.reject(Error("No features found"));if(this._featuresFromHitTest.length===1){let[{feature:t}]=this._featuresFromHitTest;this._selectedFeature=t,this.mode="add-spatial-feature"}else this.mode="add-spatial-feature-list";return this._hitTestPromise?.reject(),this._hitTestPromise=Promise.withResolvers(),await this._hitTestPromise.promise}_handleTraceLocationSelectEnd(e){e.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit(),this._activeTraceLocationType=void 0,this.mode="default",this._handleAddSpatialCancelClick()}_handleAddSpatialCancelClick(e){e?.stopPropagation();let t=this._featuresComponentElement;t&&t.clear(),this._selectedFeature=void 0,this.mode="default",this._sketchViewModel?.cancel(),this._hitTestPromise?.reject(),this._hitTestPromise=null}_handleFeaturesClose(){this.mode="add-spatial-feature-list",this._selectedFeature=void 0}_handleAddSpatialAddClick(){let{_hitTestPromise:e,_featuresComponentElement:t}=this;if(e&&t){let i=t,a=i.selectedDrillInFeature??i.selectedFeature;if(!a)return;e.resolve(a),this._hitTestPromise=null}}_handleFeatureSelectChange(e){this._selectedFeature=e,this.mode="add-spatial-feature"}renderError(e,t=!1,i){return s`<calcite-notice .closable=${t} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${e}</div></calcite-notice>`}renderLoader(){return s`<calcite-loader label=loading></calcite-loader>`}renderTraceSelection(){let{_messages:e,traceConfigurations:t}=this,i=e.labels.traceConfiguration;if(t.length===0)return this.renderError(e.errors.noTraceConfigurationError);let a=$(t,r=>r.globalId,r=>s`<calcite-option .value=${r.globalId}>${r.title}</calcite-option>`);return s`<calcite-block .heading=${i} .label=${i} expanded><calcite-select .label=${i} .value=${this.selectedNamedTraceConfiguration?.globalId||void 0} @calciteSelectChange=${r=>{this._selectTraceConfigurationByGuid(r.target.value)}}>${a}</calcite-select></calcite-block>`}renderUtilityNetworkSelection(){let{_messages:e}=this,t=e.labels.utilityNetwork,i=this.utilityNetworks?.map(a=>s`<calcite-option .value=${a.id}>${a.title}</calcite-option>`);return s`<calcite-block .heading=${t} .label=${t} expanded><calcite-select .label=${t} .value=${this.selectedUtilityNetwork?.id} @calciteSelectChange=${a=>{this.selectedUtilityNetwork?.id!==a.target.value&&(this.selectedUtilityNetwork=this.utilityNetworks?.find(r=>r.id===a.target.value))}}>${i}</calcite-select></calcite-block>`}renderDefaultMode(){let{_messages:e,_state:t,mode:i}=this;return s`<calcite-flow-item .selected=${i==="default"}>${t==="disabled"?this.renderError(e.errors.noMapError):this.renderContent()}</calcite-flow-item>`}renderSpatialSelectInstructions(){let{_messages:e,_activeTraceLocationType:t,mode:i}=this,a=t==="starting-point"?e.labels.addSpatial.startingPoint:t==="barrier"?e.labels.addSpatial.barrier:e.labels.addSpatial.stoppingPoint;return s`<calcite-flow-item .selected=${i==="add-spatial-instructions"} .heading=${a} @calciteFlowItemBack=${r=>this._handleAddSpatialCancelClick(r)}><div class="add-spatial-mode"><div><h5 class="heading">${e.instructions.addSpatial.selectFeature.heading}</h5>${e.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${e.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${e.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`}renderFeaturesList(e){return s`<calcite-list label="Feature list">${e.map(this.renderFeatureListItem)}</calcite-list>`}renderHitTestResults(){let{_messages:e,_activeTraceLocationType:t,_featuresFromHitTest:i,mode:a}=this,r=t==="starting-point"?e.labels.addSpatial.startingPoint:t==="barrier"?e.labels.addSpatial.barrier:e.labels.addSpatial.stoppingPoint;return s`<calcite-flow-item .selected=${a==="add-spatial-feature-list"} .heading=${r} @calciteFlowItemBack=${o=>this._handleAddSpatialCancelClick(o)}>${this.renderFeaturesList(i)}</calcite-flow-item>`}renderSelectedFeature(){let{_selectedFeature:e}=this;return e?s`<arcgis-features .referenceElement=${this.referenceElement} .features=${[e]} .view=${this.view} .defaultPopupTemplateEnabled=${this._defaultPopupTemplateEnabled} .hideActionBar=${this.hideActionBar} open @arcgisClose=${()=>this._handleFeaturesClose()} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._featuresComponentRefChange)}></arcgis-features>`:(this.mode="default",null)}renderAddSpatialFooter(){let{mode:e,_messages:t,selectedUtilityNetwork:i,_selectedFeature:a}=this,r=U(t.warnings.exceededDisplayLimit,{limit:this._displayLimit.toString()}),o=e==="add-spatial-feature-list"&&this._exceedDisplayLimit,l=a?!(i?.isUtilityLayer(a.layer)??!0):!0;return s`${o&&s`<calcite-input-message id=results-limited-message icon=exclamation-mark-circle status=idle>${r}</calcite-input-message>`||""}<calcite-button appearance=outline width=full @click=${()=>{this._handleAddSpatialCancelClick()}} slot=footer>${t.buttons.cancel}</calcite-button>${e==="add-spatial-feature"&&s`<calcite-button width=full slot=footer appearance=solid @click=${()=>{this._handleAddSpatialAddClick()}} .disabled=${l}>${t.buttons.add}</calcite-button>`||""}`}renderStartingPointSelection(){return s`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=starting-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._unLayers} .flagLayer=${this._getGraphicLayer(c)} .traceLocations=${this._startingPoints} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._traceLocationStartingRefChange)}></arcgis-utility-network-trace-location>`}renderStoppingPointSelection(){return s`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=stopping-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._unLayers} .flagLayer=${this._getGraphicLayer(c)} .traceLocations=${this._stoppingPoints} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._traceLocationStoppingRefChange)}></arcgis-utility-network-trace-location>`}renderBarrierSelection(){return s`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._unLayers} .flagLayer=${this._getGraphicLayer(c)} .traceLocations=${this._barriers} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._traceLocationBarrierRefChange)}></arcgis-utility-network-trace-location>`}renderSubnetworkNameInput(){return s`<calcite-input clearable type=text .placeholder=${this._messages.instructions.enterSubnetworkName} max-length=64 .value=${this.selectedSubnetworkName} @calciteInputInput=${e=>this.selectedSubnetworkName=e.target.value}></calcite-input><calcite-input-message icon=exclamation-mark-triangle status=idle>${this._messages.labels.tooManySubnetworks}</calcite-input-message>`}renderSubnetworkSelectList(){return s`<calcite-select .label=${this._messages.labels.subnetworkName} .value=${this.selectedSubnetworkName} @calciteSelectChange=${e=>this.selectedSubnetworkName=e.target.value}>${this.compatibleSubnetworkNames.map(e=>s`<calcite-option .value=${e}>${e}</calcite-option>`)}</calcite-select>`}renderSubnetworkSelection(){let{compatibleSubnetworkNames:e}=this,t=this._messages.labels.subnetworkName;return this.isSubnetworkNameTraceSelected?this._state==="loading"?s`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>`:e.length?s`<calcite-block .heading=${t} .label=${t} expanded>${e.length>R?this.renderSubnetworkNameInput():this.renderSubnetworkSelectList()}</calcite-block>`:this.renderError(this._messages.errors.noCompatibleSubnetworks,!1,"exclamation-mark-triangle"):null}renderSubnetworkInfo(){let{_messages:e,selectedNamedTraceConfiguration:t,_unTraceConfiguration:i}=this;return i&&t?.traceType&&this._subnetworkTraceTypes.has(t.traceType)?s`<calcite-block id=subnetwork-info-block expanded .label=${e.labels.subnetworkInfo}><arcgis-utility-network-subnetwork-info .namedTraceConfig=${t}></arcgis-utility-network-subnetwork-info></calcite-block>`:null}renderContent(){let{utilityNetworks:e}=this,t=this.selectedNamedTraceConfiguration?.traceConfiguration;if(!e||e.length===0)return this.renderError(this._messages.errors.noUtilityNetworkError);let i=s`${this.renderTraceSelection()}${this.renderSubnetworkInfo()}${this.renderSubnetworkSelection()}`,a=s`${this.showStartingPoints?this.renderStartingPointSelection():null}${this.showStoppingPoints?this.renderStoppingPointSelection():null}${this.renderBarrierSelection()}`;return s`<calcite-block-group .label=${this._messages.labels.traceInputs}>${e.length>1?this.renderUtilityNetworkSelection():null}${this.selectedUtilityNetwork?.loaded?i:this.renderLoader()}${t?a:null}</calcite-block-group>`}render(){let{mode:e}=this;return s`<calcite-panel>${e==="add-spatial-feature"?this.renderSelectedFeature():s`<calcite-flow>${this.renderDefaultMode()}${this.renderSpatialSelectInstructions()}${this.renderHitTestResults()}</calcite-flow>`}${e!=="default"?this.renderAddSpatialFooter():null}</calcite-panel>`}};T("arcgis-utility-network-trace-inputs",w);return w},"applications/Components/featureUtils","core/Collection","core/reactiveUtils","intl","layers/GraphicsLayer","networks/support/UNTraceConfiguration","rest/networks/support/TraceLocation","rest/support/FeatureSet","views/interactive/snapping/FeatureSnappingLayerSource","widgets/Sketch/SketchViewModel",a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import g from"./UNDBLG66.js";import{a as b,b as c}from"./MSYERWRZ.js";import{a as f}from"./FIG6WRQB.js";import e from"./3JMJAUSY.js";import"./55IJQTCC.js";import"./7DOI3267.js";import d from"./O5TDDX7K.js";import"./EHZW6UXL.js";import{M as n,N as o,O as l,P as h,U as p,b as a,x as r}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([A,{watch:s},P,D,I,{c:g,d:u,e:d,f:y},{a:t,b:w,f:v},{a:V,b:_,c:C}])=>{var R=w(I,{}),M=w(D,{}),m=class extends l{constructor(){super(),this._containerRef=n(),this._mapRef=n(),this._uiController=new V(this),this._cameraProperties={},this.arcgisLoadError=_(this),this.arcgisViewReadyError=C(this),this._map=R(this),this.view=M(this),this.allLayerViews=this.view.allLayerViews,this.alphaCompositingEnabled=this.view.alphaCompositingEnabled,this.analyses=this.view.analyses,this.animationsDisabled=this.view.animationsEnabled,this.attributionMode=this.view.attributionMode,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.spatialReference=this.view.spatialReference,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,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.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,spatialReference:0,stationary:32,suspended:39,theme:0,timeExtent:0,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 camera(){return this.view.camera}set camera(i){g(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 P(e):void 0}set cameraPosition(i){let e=y(this.view.camera?.position,i);e&&this._mutateCamera(E=>{E.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){u(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 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)
2
+ import g from"./OCGWSO54.js";import{a as b,b as c}from"./MSYERWRZ.js";import{a as f}from"./FIG6WRQB.js";import e from"./3JMJAUSY.js";import"./55IJQTCC.js";import"./7DOI3267.js";import d from"./O5TDDX7K.js";import"./EHZW6UXL.js";import{M as n,N as o,O as l,P as h,U as p,b as a,x as r}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([A,{watch:s},P,D,I,{c:g,d:u,e:d,f:y},{a:t,b:w,f:v},{a:V,b:_,c:C}])=>{var R=w(I,{}),M=w(D,{}),m=class extends l{constructor(){super(),this._containerRef=n(),this._mapRef=n(),this._uiController=new V(this),this._cameraProperties={},this.arcgisLoadError=_(this),this.arcgisViewReadyError=C(this),this._map=R(this),this.view=M(this),this.allLayerViews=this.view.allLayerViews,this.alphaCompositingEnabled=this.view.alphaCompositingEnabled,this.analyses=this.view.analyses,this.animationsDisabled=this.view.animationsEnabled,this.attributionMode=this.view.attributionMode,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.spatialReference=this.view.spatialReference,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,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.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,spatialReference:0,stationary:32,suspended:39,theme:0,timeExtent:0,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 camera(){return this.view.camera}set camera(i){g(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 P(e):void 0}set cameraPosition(i){let e=y(this.view.camera?.position,i);e&&this._mutateCamera(E=>{E.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){u(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 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.1/LICENSE.txt */
2
- import{a as E}from"./VQLAZAPA.js";import d from"./2IFKJHFD.js";import c from"./DLB6EEQE.js";import"./CAXI6CJY.js";import b from"./5MHPKAFK.js";import"./PC4PAQXQ.js";import"./TFUFDVQ6.js";import{a as S}from"./SVVJHTPA.js";import"./55IJQTCC.js";import"./7DOI3267.js";import a from"./O5TDDX7K.js";import{b as y}from"./EHZW6UXL.js";import{M as v,N as f,O as T,P as h,Q as A,R as o,U as M,b as r}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([{isLayerFromCatalog:O},{h:w},,,{b:I,c:L}])=>{var D={hideChildren:"hide-children"};function R({exclusive:a,visible:e,visibilityAppearance:t}){let i=t==="checkbox";return e?a?"circle-f":i?"check-square-f":"view-visible":a?"circle":i?"square":"view-hide"}function P({connectionStatus:a,publishing:e}){return a?a==="connected"?"beacon":"offline":e?"square":"bullet-point"}function k(a){return a?.listMode===D.hideChildren}function U(a){let e=(a?.layer&&F(a.layer)?a.layer.layer:void 0)??a?.layer;return e?e.type==="catalog"?!1:B(e)??!0:!1}function F(a){return a!=null&&"layer"in a&&a.layer!=null}function B(a){let e=V(a);return e!=null&&"supportsDynamicLayers"in e?e.supportsDynamicLayers:void 0}function V(a){return a&&"capabilities"in a&&a.capabilities!=null&&"exportMap"in a.capabilities?a.capabilities.exportMap:void 0}function G(a){return a?.getAttribute("data-item")}function N(a){let{children:e,error:t}=a,i="incompatible"in a?a.incompatible:!1;return!!e?.filter(n=>!n.hidden).length&&!t&&!i}function q(a){for(let e of a)for(let t of e)if(t.type==="button"||t.type==="toggle")return t}function x(a,e){let t=a.parent,i=a.layer;if(i?.type!=="map-image"||!i.sourceJSON||!t)return!1;let n=i.sourceJSON.layers;if(!n)return!1;let s=n.find(l=>a.id===l.id),c=e==="footprints"?"Feature Layer":"Catalog Dynamic Group Layer";return s?.type!==c?!1:n.find(l=>l.id===t.id)?.type==="Catalog Layer"}var C=class extends T{constructor(){super(...arguments),this._itemRef=v(),this._noticeRef=v(),this.messages=S(),this.hideCatalogLayerList=!1,this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.showFilter=!1,this.showHeading=!1,this.hideStatusIndicators=!1,this.showTemporaryLayerIndicators=!1,this.showTemporaryTableIndicators=!1,this.dragEnabled=!1,this.listModeDisabled=!1,this.autoDestroyDisabled=!1}static{this.properties={_title:16,_renderedItemStatus:16,_renderedItemTemporaryIcon:16,_renderedItemToggle:16,_renderedPanel:16,_renderedPanelAction:16,_renderedActions:16,_renderedActionMenu:16,_renderedActionMenuContent:16,_renderedCatalogFootprintIcon:16,_renderedCatalogDynamicIcon:16,_renderedCatalogSelectNode:16,_renderedChildList:16,_hasTables:16,_renderedTablesItem:16,_renderedItemMessage:16,_singleAction:16,_filteredSections:16,_actionsCount:16,activeItem:0,canMove:0,css:0,displayMode:1,hideCatalogLayerList:5,showCloseButton:5,showCollapseButton:5,showErrors:5,showFilter:5,showHeading:5,hideStatusIndicators:5,showTemporaryLayerIndicators:5,showTemporaryTableIndicators:5,dragEnabled:5,item:0,layerTablesEnabled:0,listModeDisabled:5,handleAction:0,handlePanelOpen:0,handleCatalogOpen:0,handleTablesOpen:0,handleSelectedDragItemLayerUidChange:0,handleTooltipReferenceChange:0,parent:0,parentTitles:0,rootGroupUid:1,selectionMode:1,selectedItems:0,selectedDragItemLayerUid:1,visibilityAppearance:1,autoDestroyDisabled:5}}static{this.styles=E}get _title(){let{messages:e}=this;return this.item.title||("untitledTable"in e?e.untitledTable:e.untitledLayer)}get _renderedItemStatus(){let{item:e,parent:t,hideStatusIndicators:i,css:n}=this;if(!i)return null;let{publishing:s}=e,c="updating"in e&&e.updating&&!t,l="connectionStatus"in e?e.connectionStatus:void 0,u=!!l;return r`<calcite-icon class=${h(y(n.statusIndicator,{[n.publishing]:s},"updating"in n&&{[n.updating]:c},"connectionStatus"in n&&{[n.connectionStatus]:u},"connectionStatusConnected"in n&&{[n.connectionStatusConnected]:u&&l==="connected"}))} .icon=${P({connectionStatus:l,publishing:s})} scale=s slot=content-end></calcite-icon>`}get _renderedItemTemporaryIcon(){let{item:e,showTemporaryLayerIndicators:t,showTemporaryTableIndicators:i,css:n}=this,{layer:s}=e,c=s&&"persistenceEnabled"in s&&(O(s)||!s.persistenceEnabled);return(t||i)&&c?r`<calcite-icon class=${h(n.itemTemporaryIcon)} icon=temporary scale=s slot=content-start title=${this.messages.temporary??o}></calcite-icon>`:null}get _renderedItemToggle(){let{item:e,parent:t,messages:i,visibilityAppearance:n,css:s}=this;if(!("visible"in e)||!("layerVisibility"in i)||!("visibleToggle"in s)||!n)return null;let{visible:c}=e,l=this._getParentVisibilityMode(t);if(l==="inherited")return null;let u=R({visible:c,exclusive:l==="exclusive",visibilityAppearance:n}),d=n==="checkbox",g=i.layerVisibility;return r`<calcite-action class=${h(s.visibleToggle)} .icon=${d?u:void 0} @click=${()=>this._toggleVisibility(e,t)} scale=s .slot=${d?"actions-start":"actions-end"} .text=${g??""} title=${g??o}>${d?null:r`<calcite-icon class=${h(y({[s.visibleIcon]:l!=="exclusive"&&c}))} .icon=${u} scale=s></calcite-icon>`}</calcite-action>`}get _renderedPanel(){let{panel:e}=this.item;return e?.open&&!e.disabled&&!e.flowEnabled?r`<div class=${h(this.css.itemContentBottom)} slot=content-bottom>${e.render()}</div>`:null}get _renderedPanelAction(){let{panel:e}=this.item;if(!e?.visible)return null;let{open:t,title:i,disabled:n}=e,s={icon:e.icon,image:e.image,indicator:!1};return r`<calcite-action .active=${t} .disabled=${n} .icon=${I(s)} @click=${()=>this._togglePanel(e)} scale=s slot=actions-end .text=${i??""} title=${i??void 0??o}>${this._renderFallbackIcon(e)}</calcite-action>`}get _renderedActions(){switch(this._actionsCount){case 0:return null;case 1:return this._singleAction;default:return this._renderedActionMenu}}get _renderedActionMenu(){let{item:e,messages:t}=this,i=t.options;return r`<calcite-action-menu appearance=transparent .label=${t.menu??""} .open=${e.actionsOpen} overlay-positioning=fixed placement=bottom-end scale=s slot=actions-end @calciteActionMenuOpen=${this._onActionMenuOpen}><calcite-action icon=ellipsis scale=s slot=trigger .text=${i??""} title=${i??o}></calcite-action>${this._renderedActionMenuContent}</calcite-action-menu>`}get _renderedActionMenuContent(){return this._filteredSections.toArray().map(e=>r`<calcite-action-group>${e.toArray().map(t=>this._renderAction({action:t,textEnabled:!0}))}</calcite-action-group>`)}get _renderedCatalogFootprintIcon(){let{css:e}=this,t=this.item.layer,i=t?.type==="catalog-footprint",n=t?.type==="sublayer"&&x(t,"footprints");return"itemCatalogIcon"in e&&(i||n)?r`<calcite-icon class=${h(e.itemCatalogIcon)} icon=footprint scale=s slot=content-start></calcite-icon>`:null}get _renderedCatalogDynamicIcon(){let{css:e}=this,t=this.item.layer,i=t?.type==="catalog-dynamic-group",n=t?.type==="sublayer"&&x(t,"layers-in-view");return"itemCatalogIcon"in e&&(i||n)?r`<calcite-icon class=${h(e.itemCatalogIcon)} icon=catalog-dataset scale=s slot=content-start></calcite-icon>`:null}get _renderedCatalogSelectNode(){let{_title:e,item:t,hideCatalogLayerList:i}=this;if(!("visible"in t))return;let{layer:n}=t,s=n?.type==="catalog-dynamic-group";return i&&s?r`<calcite-action .disabled=${!n.visible} icon=chevron-right icon-flip-rtl @click=${()=>this._triggerOnCatalogOpen(t)} scale=s slot=actions-end .text=${e}></calcite-action>`:null}get _renderedChildList(){let{dragEnabled:e,item:t,rootGroupUid:i,listModeDisabled:n,selectionMode:s,displayMode:c}=this;if(!("children"in t))return;let l=[...this.parentTitles??[],t.title],{children:u,layer:d}=t,g=d?.type!=="catalog-dynamic-group"&&N(t),$=n?!1:k(d),m=d?.type==="group",_=!$&&!g&&e&&m,b=e?"childrenSortable"in t&&t.childrenSortable&&U(t):!1;return g||_?r`<calcite-list .canPull=${p=>this.canMove?this.canMove(p,"pull"):!1} .canPut=${p=>this.canMove?this.canMove(p,"put"):!1} data-item=${t??o} data-layer-type=${i??o} .displayMode=${c} .dragEnabled=${b} .group=${m?i:`${i}-${d?.uid}`} .label=${t.title} selection-appearance=border .selectionMode=${s}>${u?.filter(p=>!p.hidden&&(this.showErrors||!p.error)).toArray().map(p=>this._renderItem(p,t,l))}${this._renderedTablesItem}</calcite-list>`:null}get _hasTables(){let{layerTablesEnabled:e}=this,t=this.item.layer;if(!e||!t)return!1;switch(t.type){case"knowledge-graph":return e.includes(t.type)&&"tables"in t&&!!t.tables?.length;case"map-image":case"tile":return e.includes(t.type)&&"subtables"in t&&!!t.subtables?.length;default:return!1}}get _renderedTablesItem(){let{item:e,messages:t,css:i}=this,{layer:n}=e;return"itemTableIcon"in i&&"visible"in e&&"tables"in t&&this._hasTables?r`<calcite-list-item class=${h(i.item)} data-layer-id=${n?.id??o} drag-disabled .label=${t.tables} title=${t.tables??o} @calciteListItemSelect=${()=>this._triggerOnTablesOpen(e)}><calcite-icon class=${h(i.itemTableIcon)} icon=table scale=s slot=content-start></calcite-icon><calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`:null}get _renderedItemMessage(){let{item:e,messages:t,css:i}=this;return e.error?r`<div class=${h(i.itemMessage)} slot=content-bottom><calcite-notice icon=exclamation-mark-triangle kind=warning open scale=s width=full><div slot=message>${"tableError"in t?t.tableError:t.layerError}</div></calcite-notice></div>`:"incompatible"in e&&e.incompatible&&"layerIncompatible"in t?r`<div class=${h(i.itemMessage)} slot=content-bottom><calcite-notice icon=exclamation-mark-triangle kind=warning open scale=s tabindex=0 width=full ${f(this._noticeRef)}><div slot=message>${t.layerIncompatible}</div></calcite-notice></div>`:null}get _singleAction(){return this._renderAction({action:q(this._filteredSections),textEnabled:!1})}get _filteredSections(){return this.item.actionsSections.map(e=>e.filter(t=>t.visible))}get _actionsCount(){return this.item.actionsSections.reduce((e,t)=>e+t.length,0)}async destroy(){await this.manager.destroy()}willUpdate(){this._itemRef.value&&this._focusSelectedDragEl(this._itemRef.value,this.item),this._noticeRef.value&&this._setTooltipReference(this._noticeRef.value)}updated(){this._itemRef.value&&this._focusSelectedDragEl(this._itemRef.value,this.item),this._noticeRef.value&&this._removeTooltipReference()}_onActionMenuOpen(e){this.item.actionsOpen=e.currentTarget.open}_setTooltipReference(e){this.handleTooltipReferenceChange?.(this.item.layer?.uid,e)}_removeTooltipReference(){this.handleTooltipReferenceChange?.(this.item.layer?.uid,null)}_triggerAction(e,t){!t||!e||(t.type==="toggle"&&(t.value=!t.value),this.handleAction(t,e))}_triggerOnTablesOpen(e){!e||!this.handleTablesOpen||this.handleTablesOpen(e)}_triggerOnCatalogOpen(e){e&&this.handleCatalogOpen?.(e)}_focusSelectedDragEl(e,t){this.selectedDragItemLayerUid===t.layer?.uid&&(w(e),this.handleSelectedDragItemLayerUidChange?.(null))}_handleCalciteListItemToggle(e,t){e.stopPropagation(),t.open=e.target.expanded}_getParentVisibilityMode(e){return e&&"visibilityMode"in e?e.visibilityMode:null}_handleCalciteListItemSelect(e,t,i){if(G(e.target)!==t)return;let n=this._getParentVisibilityMode(i);this.selectionMode!=="none"||n==="inherited"||this._toggleVisibility(t,i)}_togglePanel(e){e.open=!e.open,e.open&&this.handlePanelOpen()}_toggleVisibility(e,t){!e||!("visible"in e)||this._getParentVisibilityMode(t)==="exclusive"&&e.visible||(e.visible=!e.visible)}render(){let e=this.parentTitles??[],{_title:t,item:i,activeItem:n,selectionMode:s,selectedItems:c,messages:l,parent:u,css:d}=this,g="visibleAtCurrentTimeExtent"in i&&"layerInvisibleAtTime"in l&&!i.visibleAtCurrentTimeExtent?`${t} (${l.layerInvisibleAtTime})`:"visibleAtCurrentScale"in i&&"layerInvisibleAtScale"in l&&!i.visibleAtCurrentScale?`${t} (${l.layerInvisibleAtScale})`:t,$="parent"in i&&i.parent?.layer?.type==="catalog",{layer:m}=i,_="visibleAtCurrentScale"in i&&!i.visibleAtCurrentScale||"visibleAtCurrentTimeExtent"in i&&!i.visibleAtCurrentTimeExtent;return r`<calcite-list-item class=${h(y(d.item,"itemActive"in d&&{[d.itemActive]:n===i}))} data-item=${i??o} data-layer-id=${m?.id??o} .dragDisabled=${!("sortable"in i&&i.sortable)||$} id=${m?.uid??o} .label=${t} .metadata=${{parentTitles:e,_title:t}} .expanded=${"open"in i&&i.open} .selected=${s!=="none"?c.includes(i):!1} title=${g??o} .unavailable=${_} .value=${m?.uid} @calciteListItemSelect=${b=>"visible"in i&&this._handleCalciteListItemSelect(b,i,u)} @calciteListItemToggle=${b=>"open"in i&&this._handleCalciteListItemToggle(b,i)} ${f(this._itemRef)}>${this._renderedCatalogFootprintIcon}${this._renderedCatalogDynamicIcon}${this._renderedItemStatus}${this._renderedItemToggle}${this._renderedCatalogSelectNode}${this._renderedItemTemporaryIcon}${this._renderedChildList}${this._renderedItemMessage}${this._renderedPanel}${this._renderedPanelAction}${this._renderedActions}</calcite-list-item>`}_renderAction(e){let{item:t}=this,{action:i,textEnabled:n}=e;if(!i)return null;let{active:s,disabled:c,title:l,type:u,indicator:d}=i;return r`<calcite-action .active=${u==="toggle"?i.value:!1} data-action-id=${i.id??o} .disabled=${c} .icon=${I(i)} .indicator=${d} .loading=${s} @click=${()=>this._triggerAction(t,i)} scale=s slot=${(n?void 0:"actions-end")??o} .text=${l??""} .textEnabled=${n} title=${l??void 0??o}>${this._renderFallbackIcon(i)}</calcite-action>`}_renderFallbackIcon(e){let{css:t}=this,{icon:i}=e;if(i)return null;let n="image"in e?e.image:void 0,s={[t.itemActionImage]:!!n};return n?r`<span aria-hidden=true class=${h(y(t.itemActionIcon,s))} style=${A(L(n))}></span>`:null}_renderItem(e,t,i=[]){return r`<arcgis-layer-list-item .activeItem=${this.activeItem} .canMove=${this.canMove} .css=${this.css} .displayMode=${this.displayMode} .dragEnabled=${this.dragEnabled} .item=${e} .layerTablesEnabled=${this.layerTablesEnabled} .listModeDisabled=${this.listModeDisabled} .parent=${t} .parentTitles=${i} .rootGroupUid=${this.rootGroupUid} .selectedDragItemLayerUid=${this.selectedDragItemLayerUid} .selectedItems=${this.selectedItems} .selectionMode=${this.selectionMode} .visibilityAppearance=${this.visibilityAppearance} .handleAction=${this.handleAction} .handleCatalogOpen=${this.handleCatalogOpen} .handlePanelOpen=${this.handlePanelOpen} .handleSelectedDragItemLayerUidChange=${this.handleSelectedDragItemLayerUidChange} .handleTablesOpen=${this.handleTablesOpen} .handleTooltipReferenceChange=${this.handleTooltipReferenceChange} .hideCatalogLayerList=${this.hideCatalogLayerList} .showCloseButton=${this.showCloseButton} .showCollapseButton=${this.showCollapseButton} .showErrors=${this.showErrors} .showFilter=${this.showFilter} .showHeading=${this.showHeading} .hideStatusIndicators=${this.hideStatusIndicators} .showTemporaryLayerIndicators=${this.showTemporaryLayerIndicators} .showTemporaryTableIndicators=${this.showTemporaryTableIndicators}></arcgis-layer-list-item>`}};M("arcgis-layer-list-item",C);return C},"layers/catalog/catalogUtils",a,b,c,d)
2
+ import{a as E}from"./VQLAZAPA.js";import d from"./JFNCIZRD.js";import c from"./YET5HTLQ.js";import"./FF5VMKLK.js";import b from"./5MHPKAFK.js";import"./PC4PAQXQ.js";import"./TFUFDVQ6.js";import{a as S}from"./SVVJHTPA.js";import"./55IJQTCC.js";import"./7DOI3267.js";import a from"./O5TDDX7K.js";import{b as y}from"./EHZW6UXL.js";import{M as v,N as f,O as T,P as h,Q as A,R as o,U as M,b as r}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([{isLayerFromCatalog:O},{h:w},,,{b:I,c:L}])=>{var D={hideChildren:"hide-children"};function R({exclusive:a,visible:e,visibilityAppearance:t}){let i=t==="checkbox";return e?a?"circle-f":i?"check-square-f":"view-visible":a?"circle":i?"square":"view-hide"}function P({connectionStatus:a,publishing:e}){return a?a==="connected"?"beacon":"offline":e?"square":"bullet-point"}function k(a){return a?.listMode===D.hideChildren}function U(a){let e=(a?.layer&&F(a.layer)?a.layer.layer:void 0)??a?.layer;return e?e.type==="catalog"?!1:B(e)??!0:!1}function F(a){return a!=null&&"layer"in a&&a.layer!=null}function B(a){let e=V(a);return e!=null&&"supportsDynamicLayers"in e?e.supportsDynamicLayers:void 0}function V(a){return a&&"capabilities"in a&&a.capabilities!=null&&"exportMap"in a.capabilities?a.capabilities.exportMap:void 0}function G(a){return a?.getAttribute("data-item")}function N(a){let{children:e,error:t}=a,i="incompatible"in a?a.incompatible:!1;return!!e?.filter(n=>!n.hidden).length&&!t&&!i}function q(a){for(let e of a)for(let t of e)if(t.type==="button"||t.type==="toggle")return t}function x(a,e){let t=a.parent,i=a.layer;if(i?.type!=="map-image"||!i.sourceJSON||!t)return!1;let n=i.sourceJSON.layers;if(!n)return!1;let s=n.find(l=>a.id===l.id),c=e==="footprints"?"Feature Layer":"Catalog Dynamic Group Layer";return s?.type!==c?!1:n.find(l=>l.id===t.id)?.type==="Catalog Layer"}var C=class extends T{constructor(){super(...arguments),this._itemRef=v(),this._noticeRef=v(),this.messages=S(),this.hideCatalogLayerList=!1,this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.showFilter=!1,this.showHeading=!1,this.hideStatusIndicators=!1,this.showTemporaryLayerIndicators=!1,this.showTemporaryTableIndicators=!1,this.dragEnabled=!1,this.listModeDisabled=!1,this.autoDestroyDisabled=!1}static{this.properties={_title:16,_renderedItemStatus:16,_renderedItemTemporaryIcon:16,_renderedItemToggle:16,_renderedPanel:16,_renderedPanelAction:16,_renderedActions:16,_renderedActionMenu:16,_renderedActionMenuContent:16,_renderedCatalogFootprintIcon:16,_renderedCatalogDynamicIcon:16,_renderedCatalogSelectNode:16,_renderedChildList:16,_hasTables:16,_renderedTablesItem:16,_renderedItemMessage:16,_singleAction:16,_filteredSections:16,_actionsCount:16,activeItem:0,canMove:0,css:0,displayMode:1,hideCatalogLayerList:5,showCloseButton:5,showCollapseButton:5,showErrors:5,showFilter:5,showHeading:5,hideStatusIndicators:5,showTemporaryLayerIndicators:5,showTemporaryTableIndicators:5,dragEnabled:5,item:0,layerTablesEnabled:0,listModeDisabled:5,handleAction:0,handlePanelOpen:0,handleCatalogOpen:0,handleTablesOpen:0,handleSelectedDragItemLayerUidChange:0,handleTooltipReferenceChange:0,parent:0,parentTitles:0,rootGroupUid:1,selectionMode:1,selectedItems:0,selectedDragItemLayerUid:1,visibilityAppearance:1,autoDestroyDisabled:5}}static{this.styles=E}get _title(){let{messages:e}=this;return this.item.title||("untitledTable"in e?e.untitledTable:e.untitledLayer)}get _renderedItemStatus(){let{item:e,parent:t,hideStatusIndicators:i,css:n}=this;if(!i)return null;let{publishing:s}=e,c="updating"in e&&e.updating&&!t,l="connectionStatus"in e?e.connectionStatus:void 0,u=!!l;return r`<calcite-icon class=${h(y(n.statusIndicator,{[n.publishing]:s},"updating"in n&&{[n.updating]:c},"connectionStatus"in n&&{[n.connectionStatus]:u},"connectionStatusConnected"in n&&{[n.connectionStatusConnected]:u&&l==="connected"}))} .icon=${P({connectionStatus:l,publishing:s})} scale=s slot=content-end></calcite-icon>`}get _renderedItemTemporaryIcon(){let{item:e,showTemporaryLayerIndicators:t,showTemporaryTableIndicators:i,css:n}=this,{layer:s}=e,c=s&&"persistenceEnabled"in s&&(O(s)||!s.persistenceEnabled);return(t||i)&&c?r`<calcite-icon class=${h(n.itemTemporaryIcon)} icon=temporary scale=s slot=content-start title=${this.messages.temporary??o}></calcite-icon>`:null}get _renderedItemToggle(){let{item:e,parent:t,messages:i,visibilityAppearance:n,css:s}=this;if(!("visible"in e)||!("layerVisibility"in i)||!("visibleToggle"in s)||!n)return null;let{visible:c}=e,l=this._getParentVisibilityMode(t);if(l==="inherited")return null;let u=R({visible:c,exclusive:l==="exclusive",visibilityAppearance:n}),d=n==="checkbox",g=i.layerVisibility;return r`<calcite-action class=${h(s.visibleToggle)} .icon=${d?u:void 0} @click=${()=>this._toggleVisibility(e,t)} scale=s .slot=${d?"actions-start":"actions-end"} .text=${g??""} title=${g??o}>${d?null:r`<calcite-icon class=${h(y({[s.visibleIcon]:l!=="exclusive"&&c}))} .icon=${u} scale=s></calcite-icon>`}</calcite-action>`}get _renderedPanel(){let{panel:e}=this.item;return e?.open&&!e.disabled&&!e.flowEnabled?r`<div class=${h(this.css.itemContentBottom)} slot=content-bottom>${e.render()}</div>`:null}get _renderedPanelAction(){let{panel:e}=this.item;if(!e?.visible)return null;let{open:t,title:i,disabled:n}=e,s={icon:e.icon,image:e.image,indicator:!1};return r`<calcite-action .active=${t} .disabled=${n} .icon=${I(s)} @click=${()=>this._togglePanel(e)} scale=s slot=actions-end .text=${i??""} title=${i??void 0??o}>${this._renderFallbackIcon(e)}</calcite-action>`}get _renderedActions(){switch(this._actionsCount){case 0:return null;case 1:return this._singleAction;default:return this._renderedActionMenu}}get _renderedActionMenu(){let{item:e,messages:t}=this,i=t.options;return r`<calcite-action-menu appearance=transparent .label=${t.menu??""} .open=${e.actionsOpen} overlay-positioning=fixed placement=bottom-end scale=s slot=actions-end @calciteActionMenuOpen=${this._onActionMenuOpen}><calcite-action icon=ellipsis scale=s slot=trigger .text=${i??""} title=${i??o}></calcite-action>${this._renderedActionMenuContent}</calcite-action-menu>`}get _renderedActionMenuContent(){return this._filteredSections.toArray().map(e=>r`<calcite-action-group>${e.toArray().map(t=>this._renderAction({action:t,textEnabled:!0}))}</calcite-action-group>`)}get _renderedCatalogFootprintIcon(){let{css:e}=this,t=this.item.layer,i=t?.type==="catalog-footprint",n=t?.type==="sublayer"&&x(t,"footprints");return"itemCatalogIcon"in e&&(i||n)?r`<calcite-icon class=${h(e.itemCatalogIcon)} icon=footprint scale=s slot=content-start></calcite-icon>`:null}get _renderedCatalogDynamicIcon(){let{css:e}=this,t=this.item.layer,i=t?.type==="catalog-dynamic-group",n=t?.type==="sublayer"&&x(t,"layers-in-view");return"itemCatalogIcon"in e&&(i||n)?r`<calcite-icon class=${h(e.itemCatalogIcon)} icon=catalog-dataset scale=s slot=content-start></calcite-icon>`:null}get _renderedCatalogSelectNode(){let{_title:e,item:t,hideCatalogLayerList:i}=this;if(!("visible"in t))return;let{layer:n}=t,s=n?.type==="catalog-dynamic-group";return i&&s?r`<calcite-action .disabled=${!n.visible} icon=chevron-right icon-flip-rtl @click=${()=>this._triggerOnCatalogOpen(t)} scale=s slot=actions-end .text=${e}></calcite-action>`:null}get _renderedChildList(){let{dragEnabled:e,item:t,rootGroupUid:i,listModeDisabled:n,selectionMode:s,displayMode:c}=this;if(!("children"in t))return;let l=[...this.parentTitles??[],t.title],{children:u,layer:d}=t,g=d?.type!=="catalog-dynamic-group"&&N(t),$=n?!1:k(d),m=d?.type==="group",_=!$&&!g&&e&&m,b=e?"childrenSortable"in t&&t.childrenSortable&&U(t):!1;return g||_?r`<calcite-list .canPull=${p=>this.canMove?this.canMove(p,"pull"):!1} .canPut=${p=>this.canMove?this.canMove(p,"put"):!1} data-item=${t??o} data-layer-type=${i??o} .displayMode=${c} .dragEnabled=${b} .group=${m?i:`${i}-${d?.uid}`} .label=${t.title} selection-appearance=border .selectionMode=${s}>${u?.filter(p=>!p.hidden&&(this.showErrors||!p.error)).toArray().map(p=>this._renderItem(p,t,l))}${this._renderedTablesItem}</calcite-list>`:null}get _hasTables(){let{layerTablesEnabled:e}=this,t=this.item.layer;if(!e||!t)return!1;switch(t.type){case"knowledge-graph":return e.includes(t.type)&&"tables"in t&&!!t.tables?.length;case"map-image":case"tile":return e.includes(t.type)&&"subtables"in t&&!!t.subtables?.length;default:return!1}}get _renderedTablesItem(){let{item:e,messages:t,css:i}=this,{layer:n}=e;return"itemTableIcon"in i&&"visible"in e&&"tables"in t&&this._hasTables?r`<calcite-list-item class=${h(i.item)} data-layer-id=${n?.id??o} drag-disabled .label=${t.tables} title=${t.tables??o} @calciteListItemSelect=${()=>this._triggerOnTablesOpen(e)}><calcite-icon class=${h(i.itemTableIcon)} icon=table scale=s slot=content-start></calcite-icon><calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`:null}get _renderedItemMessage(){let{item:e,messages:t,css:i}=this;return e.error?r`<div class=${h(i.itemMessage)} slot=content-bottom><calcite-notice icon=exclamation-mark-triangle kind=warning open scale=s width=full><div slot=message>${"tableError"in t?t.tableError:t.layerError}</div></calcite-notice></div>`:"incompatible"in e&&e.incompatible&&"layerIncompatible"in t?r`<div class=${h(i.itemMessage)} slot=content-bottom><calcite-notice icon=exclamation-mark-triangle kind=warning open scale=s tabindex=0 width=full ${f(this._noticeRef)}><div slot=message>${t.layerIncompatible}</div></calcite-notice></div>`:null}get _singleAction(){return this._renderAction({action:q(this._filteredSections),textEnabled:!1})}get _filteredSections(){return this.item.actionsSections.map(e=>e.filter(t=>t.visible))}get _actionsCount(){return this.item.actionsSections.reduce((e,t)=>e+t.length,0)}async destroy(){await this.manager.destroy()}willUpdate(){this._itemRef.value&&this._focusSelectedDragEl(this._itemRef.value,this.item),this._noticeRef.value&&this._setTooltipReference(this._noticeRef.value)}updated(){this._itemRef.value&&this._focusSelectedDragEl(this._itemRef.value,this.item),this._noticeRef.value&&this._removeTooltipReference()}_onActionMenuOpen(e){this.item.actionsOpen=e.currentTarget.open}_setTooltipReference(e){this.handleTooltipReferenceChange?.(this.item.layer?.uid,e)}_removeTooltipReference(){this.handleTooltipReferenceChange?.(this.item.layer?.uid,null)}_triggerAction(e,t){!t||!e||(t.type==="toggle"&&(t.value=!t.value),this.handleAction(t,e))}_triggerOnTablesOpen(e){!e||!this.handleTablesOpen||this.handleTablesOpen(e)}_triggerOnCatalogOpen(e){e&&this.handleCatalogOpen?.(e)}_focusSelectedDragEl(e,t){this.selectedDragItemLayerUid===t.layer?.uid&&(w(e),this.handleSelectedDragItemLayerUidChange?.(null))}_handleCalciteListItemToggle(e,t){e.stopPropagation(),t.open=e.target.expanded}_getParentVisibilityMode(e){return e&&"visibilityMode"in e?e.visibilityMode:null}_handleCalciteListItemSelect(e,t,i){if(G(e.target)!==t)return;let n=this._getParentVisibilityMode(i);this.selectionMode!=="none"||n==="inherited"||this._toggleVisibility(t,i)}_togglePanel(e){e.open=!e.open,e.open&&this.handlePanelOpen()}_toggleVisibility(e,t){!e||!("visible"in e)||this._getParentVisibilityMode(t)==="exclusive"&&e.visible||(e.visible=!e.visible)}render(){let e=this.parentTitles??[],{_title:t,item:i,activeItem:n,selectionMode:s,selectedItems:c,messages:l,parent:u,css:d}=this,g="visibleAtCurrentTimeExtent"in i&&"layerInvisibleAtTime"in l&&!i.visibleAtCurrentTimeExtent?`${t} (${l.layerInvisibleAtTime})`:"visibleAtCurrentScale"in i&&"layerInvisibleAtScale"in l&&!i.visibleAtCurrentScale?`${t} (${l.layerInvisibleAtScale})`:t,$="parent"in i&&i.parent?.layer?.type==="catalog",{layer:m}=i,_="visibleAtCurrentScale"in i&&!i.visibleAtCurrentScale||"visibleAtCurrentTimeExtent"in i&&!i.visibleAtCurrentTimeExtent;return r`<calcite-list-item class=${h(y(d.item,"itemActive"in d&&{[d.itemActive]:n===i}))} data-item=${i??o} data-layer-id=${m?.id??o} .dragDisabled=${!("sortable"in i&&i.sortable)||$} id=${m?.uid??o} .label=${t} .metadata=${{parentTitles:e,_title:t}} .expanded=${"open"in i&&i.open} .selected=${s!=="none"?c.includes(i):!1} title=${g??o} .unavailable=${_} .value=${m?.uid} @calciteListItemSelect=${b=>"visible"in i&&this._handleCalciteListItemSelect(b,i,u)} @calciteListItemToggle=${b=>"open"in i&&this._handleCalciteListItemToggle(b,i)} ${f(this._itemRef)}>${this._renderedCatalogFootprintIcon}${this._renderedCatalogDynamicIcon}${this._renderedItemStatus}${this._renderedItemToggle}${this._renderedCatalogSelectNode}${this._renderedItemTemporaryIcon}${this._renderedChildList}${this._renderedItemMessage}${this._renderedPanel}${this._renderedPanelAction}${this._renderedActions}</calcite-list-item>`}_renderAction(e){let{item:t}=this,{action:i,textEnabled:n}=e;if(!i)return null;let{active:s,disabled:c,title:l,type:u,indicator:d}=i;return r`<calcite-action .active=${u==="toggle"?i.value:!1} data-action-id=${i.id??o} .disabled=${c} .icon=${I(i)} .indicator=${d} .loading=${s} @click=${()=>this._triggerAction(t,i)} scale=s slot=${(n?void 0:"actions-end")??o} .text=${l??""} .textEnabled=${n} title=${l??void 0??o}>${this._renderFallbackIcon(i)}</calcite-action>`}_renderFallbackIcon(e){let{css:t}=this,{icon:i}=e;if(i)return null;let n="image"in e?e.image:void 0,s={[t.itemActionImage]:!!n};return n?r`<span aria-hidden=true class=${h(y(t.itemActionIcon,s))} style=${A(L(n))}></span>`:null}_renderItem(e,t,i=[]){return r`<arcgis-layer-list-item .activeItem=${this.activeItem} .canMove=${this.canMove} .css=${this.css} .displayMode=${this.displayMode} .dragEnabled=${this.dragEnabled} .item=${e} .layerTablesEnabled=${this.layerTablesEnabled} .listModeDisabled=${this.listModeDisabled} .parent=${t} .parentTitles=${i} .rootGroupUid=${this.rootGroupUid} .selectedDragItemLayerUid=${this.selectedDragItemLayerUid} .selectedItems=${this.selectedItems} .selectionMode=${this.selectionMode} .visibilityAppearance=${this.visibilityAppearance} .handleAction=${this.handleAction} .handleCatalogOpen=${this.handleCatalogOpen} .handlePanelOpen=${this.handlePanelOpen} .handleSelectedDragItemLayerUidChange=${this.handleSelectedDragItemLayerUidChange} .handleTablesOpen=${this.handleTablesOpen} .handleTooltipReferenceChange=${this.handleTooltipReferenceChange} .hideCatalogLayerList=${this.hideCatalogLayerList} .showCloseButton=${this.showCloseButton} .showCollapseButton=${this.showCollapseButton} .showErrors=${this.showErrors} .showFilter=${this.showFilter} .showHeading=${this.showHeading} .hideStatusIndicators=${this.hideStatusIndicators} .showTemporaryLayerIndicators=${this.showTemporaryLayerIndicators} .showTemporaryTableIndicators=${this.showTemporaryTableIndicators}></arcgis-layer-list-item>`}};M("arcgis-layer-list-item",C);return C},"layers/catalog/catalogUtils",a,b,c,d)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import a from"./DLB6EEQE.js";import"./CAXI6CJY.js";import{N as c,O as s,U as l,a as n,b as o}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([{watch:g},{renderingSanitizer:m},{f:h,q:r}])=>{var f=n`.loader-container{display:flex;align-items:center;justify-content:center;padding:0;height:150px}.root{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-normal)}.root h1,.root h2,.root h3,.root h4,.root h5,.root h6{margin:var(--calcite-spacing-sm) 0;line-height:var(--calcite-font-line-height-relative-tight);letter-spacing:0;color:var(--calcite-color-text-1);font-weight:var(--calcite-font-weight-semibold)}.root h1{font-size:var(--calcite-font-size-xxl)}.root h2{font-size:var(--calcite-font-size-xl)}.root h3{font-size:var(--calcite-font-size-lg)}.root h4,.root h5,.root h6{font-size:var(--calcite-font-size)}.description{margin-bottom:var(--calcite-spacing-xs)}.root p{margin:0 0 var(--calcite-spacing-xs);font-size:var(--calcite-font-size)}.root p:last-child{margin-block-end:0}.root img{max-width:100%;max-height:100%;image-orientation:from-image}.root video{max-width:100%;max-height:100%}.root figure{margin:0;padding:0}.root figcaption{display:block;margin:var(--calcite-spacing-xs) 0 0;padding:0;font-size:var(--calcite-font-size-sm);font-style:italic}.root ul,.root ol{margin-block:var(--calcite-spacing-sm)}.root ul:first-child,.root ol:first-child{margin-block-start:0}.root a,.root a:hover,.root a:focus{color:var(--calcite-color-text-link)}`,a=class extends s{static{this.properties={_loadingPromise:16,_created:16,creator:1,destroyer:0,graphic:0}}static{this.styles=f}loaded(){this.manager.onLifecycle(()=>g(()=>this.creator,t=>{this._destroyContent(),this._createContent(t)},{initial:!0}))}async _createContent(t){let{graphic:e}=this;if(!e||!t)return;let i=r({type:"content",value:t,event:{graphic:e}});this._loadingPromise=i;let d=await i;i===this._loadingPromise&&(this._loadingPromise=void 0,this._created=d)}_destroyContent(){let{_created:t,graphic:e,destroyer:i}=this;t&&e&&(r({type:"content",value:i,event:{graphic:e}}),this._created=null)}_addTargetToAnchors(t){t&&Array.from(t.querySelectorAll("a")).forEach(e=>{h(e.href)&&!e.hasAttribute("target")&&e.setAttribute("target","_blank")})}render(){return o`<div class="root">${this._loadingPromise?this._renderLoading():this._renderCreated()}</div>`}_renderLoading(){return o`<div class="loader-container"><calcite-loader inline label></calcite-loader></div>`}_renderCreated(){let{_created:t}=this;return t instanceof HTMLElement?t:typeof t=="string"?o`<div .innerHTML=${m.sanitize(t)??""} ${c(this._addTargetToAnchors)}></div>`:null}};l("arcgis-feature-content",a);return a},"core/reactiveUtils","applications/Components/sanitizerUtils",a)
2
+ import a from"./YET5HTLQ.js";import"./FF5VMKLK.js";import{N as c,O as s,U as l,a as n,b as o}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([{watch:g},{renderingSanitizer:m},{f:h,q:r}])=>{var f=n`.loader-container{display:flex;align-items:center;justify-content:center;padding:0;height:150px}.root{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-normal)}.root h1,.root h2,.root h3,.root h4,.root h5,.root h6{margin:var(--calcite-spacing-sm) 0;line-height:var(--calcite-font-line-height-relative-tight);letter-spacing:0;color:var(--calcite-color-text-1);font-weight:var(--calcite-font-weight-semibold)}.root h1{font-size:var(--calcite-font-size-xxl)}.root h2{font-size:var(--calcite-font-size-xl)}.root h3{font-size:var(--calcite-font-size-lg)}.root h4,.root h5,.root h6{font-size:var(--calcite-font-size)}.description{margin-bottom:var(--calcite-spacing-xs)}.root p{margin:0 0 var(--calcite-spacing-xs);font-size:var(--calcite-font-size)}.root p:last-child{margin-block-end:0}.root img{max-width:100%;max-height:100%;image-orientation:from-image}.root video{max-width:100%;max-height:100%}.root figure{margin:0;padding:0}.root figcaption{display:block;margin:var(--calcite-spacing-xs) 0 0;padding:0;font-size:var(--calcite-font-size-sm);font-style:italic}.root ul,.root ol{margin-block:var(--calcite-spacing-sm)}.root ul:first-child,.root ol:first-child{margin-block-start:0}.root a,.root a:hover,.root a:focus{color:var(--calcite-color-text-link)}`,a=class extends s{static{this.properties={_loadingPromise:16,_created:16,creator:1,destroyer:0,graphic:0}}static{this.styles=f}loaded(){this.manager.onLifecycle(()=>g(()=>this.creator,t=>{this._destroyContent(),this._createContent(t)},{initial:!0}))}async _createContent(t){let{graphic:e}=this;if(!e||!t)return;let i=r({type:"content",value:t,event:{graphic:e}});this._loadingPromise=i;let d=await i;i===this._loadingPromise&&(this._loadingPromise=void 0,this._created=d)}_destroyContent(){let{_created:t,graphic:e,destroyer:i}=this;t&&e&&(r({type:"content",value:i,event:{graphic:e}}),this._created=null)}_addTargetToAnchors(t){t&&Array.from(t.querySelectorAll("a")).forEach(e=>{h(e.href)&&!e.hasAttribute("target")&&e.setAttribute("target","_blank")})}render(){return o`<div class="root">${this._loadingPromise?this._renderLoading():this._renderCreated()}</div>`}_renderLoading(){return o`<div class="loader-container"><calcite-loader inline label></calcite-loader></div>`}_renderCreated(){let{_created:t}=this;return t instanceof HTMLElement?t:typeof t=="string"?o`<div .innerHTML=${m.sanitize(t)??""} ${c(this._addTargetToAnchors)}></div>`:null}};l("arcgis-feature-content",a);return a},"core/reactiveUtils","applications/Components/sanitizerUtils",a)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ function a(n,r){if(!n.map)return;let{map:t}=n;t.layers.includes(r)||(t.add(r),t.reorder(r,t.layers.length-1))}function s(n){return n!=null&&typeof n=="object"&&"type"in n&&n.type==="feature"}function o(n){return s(n)&&n?.type==="feature"&&n.source?.type==="feature-layer"}function y(n){return n!=null&&typeof n=="object"&&"type"in n&&n.type==="graphics"}function l(n){return n!=null&&typeof n=="object"&&"type"in n&&n.type==="subtype-group"&&"sublayers"in n}function f(n){return n?.type==="subtype-sublayer"}function c(n){return s(n)&&o(n)}function p(n,r){let t=r?.type==="subtype-sublayer"?r.parent:r;return n.allLayerViews.find(e=>{let u=e.layer;return u===t||"sublayers"in u&&u.sublayers!=null&&u.sublayers.includes(t)})}function i(n){let r=n?.type;return r==="binning"||r==="cluster"}function b(n,r){if(!c(n))return;let t=r?.graphic,e=n.featureReduction;if(t){if(t.isAggregate){let u=t.origin;return u&&"featureReductionProvider"in u&&e?i(e)?e:null:void 0}return n}return r?.checkFeatureReduction&&e?i(e)?e:null:n}export{a,y as b,l as c,f as d,p as e,b as f};