@arcgis/map-components 6.0.0-next.35 → 6.0.0-next.37

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.
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import b from"./HU57LQOA.js";import{a as f}from"./REB4CHAK.js";import{h as g}from"./Q7GF26CL.js";import"./U77WHUC6.js";import"./LXME6MU5.js";import{R as m,_ as d,a as u,b as a,p as n,x as h}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([k,{d:b}])=>{var N=u`:host{height:100%;flex-grow:1}.subnetwork-details{border-radius:var(--calcite-border-radius);border:solid 1px var(--calcite-color-border-3)}.key-value-pair{padding:var(--calcite-space-sm)}.key-value-pair__key{font-size:var(--calcite-font-size--2);color:var(--calcite-color-text-3)}.key-value-pair__value{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1)}calcite-label{--calcite-label-margin-bottom: 0}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block :is(calcite-combobox,calcite-input-text,calcite-label,calcite-notice){margin:0 var(--calcite-space-md)}calcite-block>:is(calcite-combobox,calcite-input-text,calcite-notice):not(:last-child){margin-bottom:var(--calcite-space-md)}calcite-notice{margin:var(--calcite-space-md)}#subnetwork-info-block{margin:var(--calcite-space-md) var(--calcite-space-md) 0}.inline-loader{--calcite-loader-spacing: var(--calcite-space-md)}`,C=20,p=new Set(["subnetwork","subnetwork-controller","upstream","downstream","isolation"]),c=class extends m{constructor(){super(...arguments),this._messages=f({blocking:!0}),this._subnetworkNamesState="ready",this._compatibleSubnetworkNames=[],this.traceConfigurations=[],this.hideSubnetworkInfo=!1,this.hideErrors=!1,this.state="ready",this.arcgisPropertyChange=g()("selectedNamedTraceConfiguration","traceConfiguration"),this.arcgisError=h()}static{this.properties={_subnetworksTable:16,_subnetworkNamesState:16,_compatibleSubnetworkNames:16,messageOverrides:0,selectedNamedTraceConfiguration:0,traceConfigurations:0,utilityNetwork:0,heading:1,traceConfiguration:0,isSubnetworkNameTraceSelected:32,hideSubnetworkInfo:5,hideErrors:5,error:1,state:1}}static{this.styles=N}get#e(){return this.traceConfiguration?.subnetworkName??void 0}set#e(e){this.traceConfiguration&&(this.traceConfiguration.subnetworkName=e)}get isSubnetworkNameTraceSelected(){let{selectedNamedTraceConfiguration:e}=this;return!!e?.traceConfiguration?.subnetworkName&&e?.traceType==="subnetwork"}willUpdate(e){e.has("traceConfigurations")&&this.#h(),e.has("utilityNetwork")&&(this.#u(),!e.has("selectedNamedTraceConfiguration")&&this.isSubnetworkNameTraceSelected&&this.traceConfiguration&&this.#o(this.traceConfiguration)),e.has("selectedNamedTraceConfiguration")&&this.#s()}async#s(){let{selectedNamedTraceConfiguration:e}=this;if(!e||!(e.traceConfiguration instanceof k)){this.#t(e?this._messages.errors.noTraceConfiguration:this._messages.errors.traceConfigurationNotFound),this.traceConfiguration=void 0,this.arcgisPropertyChange.emit({name:"traceConfiguration"});return}this.#i(),this.traceConfiguration=e.traceConfiguration.clone(),this.arcgisPropertyChange.emit({name:"selectedNamedTraceConfiguration"}),this.arcgisPropertyChange.emit({name:"traceConfiguration"}),this.isSubnetworkNameTraceSelected&&await this.#o(this.traceConfiguration)}async#o(e){this._subnetworkNamesState="loading",this.state="loading",await this.#n(),await this.#c(),e.subnetworkName&&!this._compatibleSubnetworkNames.some(t=>t===e.subnetworkName)&&(this.#e=this._compatibleSubnetworkNames.at(0)),this._subnetworkNamesState="ready",this.state="ready"}async#n(){this._subnetworksTable||(this._subnetworksTable=await this.utilityNetwork?.loadSubnetworksTable())}async#c(){let{_subnetworksTable:e}=this;if(!e)return;let t=e.fieldsIndex.get("SUBNETWORKNAME"),i=(s,l,w)=>l===0||s.getAttribute(t.name)!==w[l-1].getAttribute(t.name),r=e.createQuery();r.gdbVersion=this.utilityNetwork?.gdbVersion,r.where=this.#l(),r.outFields=[t.name],r.orderByFields=[t.name];let{features:o}=await b(e,r,void 0,!1);this._compatibleSubnetworkNames=o.filter(i).map(s=>s.getAttribute(t.name))}#l(){let e=this.traceConfiguration,t=`DOMAINNETWORKNAME = '${e.domainNetworkName}'`,i=`TIERNAME = '${e.tierName}'`;return[t,i].join(" AND ")}#u(){this.#e=void 0,this._subnetworksTable=void 0,this._compatibleSubnetworkNames=[]}#h(){let{selectedNamedTraceConfiguration:e}=this;this.traceConfigurations.length?(!e||!this.traceConfigurations.includes(e))&&(this.#i(),this.selectedNamedTraceConfiguration=this.traceConfigurations.find(t=>t.traceConfiguration instanceof k)??this.traceConfigurations.at(0)):(this.traceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0,this.#t(this._messages.errors.noTraceConfigurations))}#t(e){n("error",this,e),this.error=e,this.state="error",this.arcgisError.emit()}#i(){this.error=void 0,this.state="ready"}#a(e,t){return a`<div class="key-value-pair"><div class="key-value-pair__key">${e}</div><div class="key-value-pair__value">${t}</div></div>`}#r(e,t=!1,i="exclamation-mark-triangle"){return this.hideErrors?null:a`<calcite-notice .closable=${t} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${e}</div></calcite-notice>`}#m(){let e=this.selectedNamedTraceConfiguration?.title;return e?a`<calcite-label>${e}</calcite-label>`:null}#d(){let e=this.traceConfigurations.map(i=>a`<calcite-combobox-item .value=${i.globalId} .heading=${i.title} .selected=${i.globalId===this.selectedNamedTraceConfiguration?.globalId}></calcite-combobox-item>`),t=this._messages.labels.traceConfiguration;return a`<calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{let r=i.selectedItems[0]?.value;this.selectedNamedTraceConfiguration=this.traceConfigurations.find(o=>o.globalId===r)}}>${e}</calcite-combobox>`}#g(){let{_messages:e}=this;if(this.error===e.errors.noTraceConfigurations)return this.#r(e.errors.noTraceConfigurations);let t=this.error?this.#r(this.error):null,i=this.traceConfigurations.length>1?this.#d():this.#m(),r=this._messages.labels.traceConfiguration,o=this.heading??r;return a`<calcite-block .heading=${o} .label=${r} expanded>${i}${t}</calcite-block>`}#b(){if(this.hideSubnetworkInfo)return null;let{_messages:e,selectedNamedTraceConfiguration:t}=this;if(!t?.traceConfiguration)return this.traceConfiguration=void 0,this.#t(this._messages.errors.noTraceConfiguration),null;this.#i();let{domainNetworkName:i,tierName:r,targetTierName:o}=t.traceConfiguration;return!i&&!r&&!o?(n("warn",this,"`namedTraceConfig.traceConfiguration` has no `domainNetworkName`, `tierName`, or `targetTierName`."),null):a`<calcite-block id=subnetwork-info-block expanded .label=${this._messages.labels.subnetworkInfo}><div class="subnetwork-details">${i?this.#a(e.headings.domainNetwork,i):null}${r?this.#a(e.headings.tier,r):null}${o?this.#a(e.headings.targetTier,o):null}</div></calcite-block>`}#f(){let{_messages:e}=this,t=e.labels.subnetworkName;return this.isSubnetworkNameTraceSelected?this._subnetworkNamesState==="loading"?a`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>`:this._compatibleSubnetworkNames.length?a`<calcite-block .heading=${t} .label=${t} expanded>${this._compatibleSubnetworkNames.length>C?this.#k():this.#w()}</calcite-block>`:this.#r(e.errors.noCompatibleSubnetworks):null}#k(){let{_messages:e}=this;return a`<calcite-input-text clearable .label=${e.labels.subnetworkName} .placeholder=${e.instructions.enterSubnetworkName} max-length=64 .status=${this.#e?"valid":"invalid"} .value=${this.#e} @calciteInputTextInput=${t=>this.#e=t.target.value}></calcite-input-text>`}#w(){return a`<calcite-combobox .label=${this._messages.labels.subnetworkName} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:e})=>{let t=e.selectedItems[0]?.value;this.#e=t}}>${this._compatibleSubnetworkNames.map(e=>a`<calcite-combobox-item .value=${e} .heading=${e} .selected=${e===this.#e}></calcite-combobox-item>`)}</calcite-combobox>`}render(){let{selectedNamedTraceConfiguration:e}=this,t=e?.traceType&&p.has(e.traceType)?a`${this.#b()}${this.#f()}`:null;return a`${this.#g()}${t}`}};d("arcgis-utility-network-trace-configuration-picker",c);return c},"networks/support/UNTraceConfiguration",b)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import b from"./BOPNSNUT.js";import"./WJQUE4DR.js";import{a as w}from"./REB4CHAK.js";import{h as g}from"./Q7GF26CL.js";import"./U77WHUC6.js";import"./LXME6MU5.js";import{R as n,_ as m,a as h,b as r,p as a,x as d}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([y,{watch:b},{a:l}])=>{var u=h`:host{height:100%;flex-grow:1}calcite-label{--calcite-label-margin-bottom: 0}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block :is(calcite-combobox,calcite-label,calcite-notice){margin:0 var(--calcite-space-md) var(--calcite-space-md)}calcite-block :last-child{margin-bottom:0}calcite-notice{margin:var(--calcite-space-md)}`,c=class extends n{constructor(){super(...arguments),this._messages=w({blocking:!0}),this.hideErrors=!1,this.hideLoader=!1,this.state="loading",this.arcgisPropertyChange=g()("selectedUtilityNetwork","state"),this.arcgisError=d()}static{this.properties={_utilityNetworks:16,view:0,messageOverrides:0,hideErrors:5,hideLoader:5,state:1,error:1,selectedUtilityNetwork:0,heading:1}}static{this.styles=u}load(){this.#e(),this.manager.onLifecycle(()=>[b(()=>this.view?.map,()=>this.#e())])}willUpdate(t){t.has("_utilityNetworks")&&this.#r(),t.has("selectedUtilityNetwork")&&this.#o()}#t(t){this.error=t,this.state="error",this.arcgisError.emit()}#i(){this.error=void 0,this.state="ready"}#e(){if(this.error=void 0,this.state="loading",!this.view?.map){a("error",this,this._messages.errors.noView),this._utilityNetworks=void 0,this.#t(this._messages.errors.noView);return}let t=this.view.map;this.#s(t)}async#s(t){try{t.loaded||await t.load(),this._utilityNetworks=t.utilityNetworks||new y}catch(e){this.#t(this._messages.errors.mapLoadFailed),l(e,this,this._messages.errors.mapLoadFailed)}}#r(){let{selectedUtilityNetwork:t,_utilityNetworks:e}=this;e?.length?(!t||!e.includes(t))&&(this.selectedUtilityNetwork=e.at(0),this.arcgisPropertyChange.emit({name:"selectedUtilityNetwork"})):(this.#t(this._messages.errors.noUtilityNetwork),a("error",this,this._messages.errors.noUtilityNetwork),this.selectedUtilityNetwork=void 0)}async#o(){let{selectedUtilityNetwork:t}=this;try{t&&!t.loaded&&(this.state="loading",await t.load()),this.#i()}catch(e){l(e,this,this._messages.errors.utilityNetworkLoadFailed),this.#t(this._messages.errors.utilityNetworkLoadFailed)}}#a(){return this.hideLoader?null:r`<calcite-loader label=loading></calcite-loader>`}#l(t,e=!1,i){return this.hideErrors?null:r`<calcite-notice .closable=${e} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${t}</div></calcite-notice>`}#c(){let t=this._messages.labels.utilityNetwork,e=this._utilityNetworks?.map(i=>r`<calcite-combobox-item .value=${i.id} .heading=${i.title||i.id} .selected=${i.id===this.selectedUtilityNetwork?.id}></calcite-combobox-item>`);return r`<calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{let s=i.selectedItems[0]?.value;this.selectedUtilityNetwork?.id!==s&&(this.selectedUtilityNetwork=this._utilityNetworks?.find(o=>o.id===s))}}>${e}</calcite-combobox>`}#h(){let{selectedUtilityNetwork:t}=this;return r`<calcite-label>${t?.title}</calcite-label>`}#d(t){let e=this._messages.labels.utilityNetwork,i=this.heading||e,s=this._utilityNetworks?.length?this._utilityNetworks?.length===1?this.#h():this.#c():void 0;return r`<calcite-block .heading=${i} .label=${e} expanded>${s}${t}</calcite-block>`}render(){let{error:t,state:e,selectedUtilityNetwork:i,_messages:s}=this,o=e==="error"&&t?this.#l(t,!1,"exclamation-mark-triangle"):void 0;if(!o&&!i?.loaded&&!i?.loadError)return this.#a();let k=t===s.errors.mapLoadFailed||t===s.errors.noView||t===s.errors.noUtilityNetwork;return e==="error"&&o&&k?o:this.#d(o)}};m("arcgis-utility-network-picker",c);return c},"core/Collection","core/reactiveUtils",b)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import c from"./QBVHLHRR.js";import b from"./HU57LQOA.js";import a from"./BOPNSNUT.js";import"./WJQUE4DR.js";import{a as v}from"./REB4CHAK.js";import{h as w}from"./Q7GF26CL.js";import"./U77WHUC6.js";import"./LXME6MU5.js";import{Q as h,R as m,_ as f,a as p,b as r,x as l}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([o,{watch:k},{substitute:$},T,{a:u},{d:y,h:b},d])=>{var _=p`: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-space-md);background-color:var(--calcite-color-surface-2)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-space-md)}calcite-notice{margin:var(--calcite-space-md)}.subnetwork-info-block{margin:var(--calcite-space-md) var(--calcite-space-md) 0}.results-limited-message{margin:var(--calcite-space-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-space-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-space-md);margin:var(--calcite-space-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-space-md);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-medium)}`,g=class extends m{constructor(){super(...arguments),this._messages=v({blocking:!0}),this.#n=!0,this.#d=new Map,this.#t=new o,this.#i=new o,this.#e=new o,this.#a=null,this.#r=20,this._candidateFeatures=[],this._compatibleSubnetworkNames=[],this._namedTraceConfigurations=[],this._subnetworkNamesState="ready",this._exceedDisplayLimit=!1,this.autoDestroyDisabled=!1,this.hideActionBar=!1,this.includeDefaultActionsDisabled=!1,this.mode="default",this.arcgisPropertyChange=w()("mode","selectedNamedTraceConfiguration","selectedUtilityNetwork","traceLocations"),this.arcgisTraceLocationSelectEnd=l(),this.arcgisTraceLocationSelectStart=l(),this.arcgisTriggerAction=l()}static{this.properties={_selectedFeature:16,_candidateFeatures:16,_compatibleSubnetworkNames:16,_subnetworksTable:16,_namedTraceConfigurations:16,_traceConfiguration:16,_error:16,_subnetworkNamesState:16,_activeTraceLocationType:16,_exceedDisplayLimit:16,actions:0,beforeMapInteraction:0,view:0,selectedUtilityNetwork:0,selectedNamedTraceConfiguration:0,autoDestroyDisabled:5,hideActionBar:5,includeDefaultActionsDisabled:5,traceConfiguration:32,isSubnetworkNameTraceSelected:32,messageOverrides:0,referenceElement:1,mode:3,traceLocationDetails:32,traceLocations:32}}static{this.styles=_}#n;get#T(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}#l;#d;#t;#i;#e;#a;#s;#f;#w;#y;#r;get#h(){return!this.isSubnetworkNameTraceSelected}get#u(){let t=this.selectedNamedTraceConfiguration?.traceType;return t==="path"||t==="circuit"}get#b(){return this._namedTraceConfigurations.length>0&&!!this.traceConfiguration}get#_(){let t=this.selectedUtilityNetwork?.dataElement?.domainNetworks;return t?t.map(e=>e.subnetworkLayerId).filter(e=>e!=null&&e>-1):[]}get traceConfiguration(){return this._traceConfiguration}get isSubnetworkNameTraceSelected(){let{selectedNamedTraceConfiguration:t}=this;return!!t?.traceConfiguration?.subnetworkName&&t?.traceType==="subnetwork"}get traceLocationDetails(){return new o([...this.#t,...this.#i,...this.#e])}get traceLocations(){let t=[];return this.#h&&this.#t.forEach(e=>t.push(...this.#g(e))),this.#u&&this.#e.forEach(e=>t.push(...this.#g(e))),this.#i.forEach(e=>t.push(...this.#g(e))),t}async destroy(){this.#k(),d.getSketchViewModel(this.view)?.cancel(),d.removeSketchGraphicsLayer(this.view);let t=await Promise.allSettled([this.#s?.destroy(),this.#f?.destroy(),this.#w?.destroy(),this.#y?.destroy()]);for(let e of t)e.status==="rejected"&&u(e.reason,this,"Error while destroying trace inputs");await this.manager.destroy()}load(){this.#v(),this.manager.onLifecycle(()=>[k(()=>this.view?.map,()=>this.#v())])}willUpdate(t){t.has("selectedUtilityNetwork")&&this.#P()}disconnectedCallback(){super.disconnectedCallback(),this.#d.clear()}#N(t){t.stopPropagation(),this.arcgisTriggerAction.emit(t.detail)}#C({detail:t,target:e}){(t.name==="selectedDrillInFeature"||t.name==="selectedFeature")&&(this._selectedFeature=e.selectedDrillInFeature??e.selectedFeature??void 0)}#v(){if(this._error=void 0,!this.view?.map){this._error=this._messages.errors.noView;return}}#L(t){t&&(this.#f=t)}#S(t){t&&(this.#w=t)}#D(t){t&&(this.#y=t)}#F(t){t&&(this.#s=t)}#g(t){let e=t.flagProperties.selectedTerminals;return t.flagProperties.terminalConfiguration&&e?.size?Array.from(e,i=>new T({type:t.traceLocation.type,isFilterBarrier:t.traceLocation.isFilterBarrier,globalId:t.traceLocation.globalId,percentAlong:t.traceLocation.percentAlong,terminalId:i})):[t.traceLocation]}#k(){this.#o(new o([...this.#t,...this.#i,...this.#e])),this.#t.removeAll(),this.#i.removeAll(),this.#e.removeAll()}async#P(){let{selectedUtilityNetwork:t}=this;try{t&&!t.loaded&&await t.load()}catch(e){u(e,this,"Error while loading the selected utility network")}this.#U(),this.#E(),this.#k()}#A(){if(!this.#b){this.#o(new o([...this.#t,...this.#i,...this.#e]));return}this.#p(this.#i),this.#h?this.#p(this.#t):this.#o(this.#t),this.#u?this.#p(this.#e):this.#o(this.#e)}#U(){this._namedTraceConfigurations=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter(t=>t.traceType!=="circuit").sort((t,e)=>t.title.localeCompare(e.title))||[],(!this.selectedNamedTraceConfiguration||!this._namedTraceConfigurations.includes(this.selectedNamedTraceConfiguration))&&(this._traceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0)}#E(){let{selectedUtilityNetwork:t}=this;this.#l=new o(this.#T.filter(e=>t?.isUtilityLayer(e)&&!this.#_.includes(e.layerId)))}#I(t){if(t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented){t.preventDefault();return}this._activeTraceLocationType=t?.target?.traceLocationType,this.mode="add-spatial-instructions"}#x(t){if(t==null)return;let e=this.#d,i=this.#l,a=e.get(t);if(a)return a;if(!i)return;let s=i.find(c=>"layerId"in c&&c.layerId===t);return s&&e.set(t,s),s}async#M(t,e){let i=t.createQuery();i.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,i.objectIds=e.map(s=>s.getObjectId()),i.outFields=["*"];let{features:a}=await y(t,i);return a.forEach(s=>{if(!s.getEffectivePopupTemplate(this.#n)){let c=s.layer;s.popupTemplate=c.createPopupTemplate()}}),a}async#O(t){let e=new Map,i=[];return t.forEach(a=>{let s=b(a.layer)?a.layer.parent:a.layer;if(s){let c=this.#x(s.layerId);if(c){let n=e.get(c)||[];n.push(a),e.set(c,n)}}}),await Promise.all(Array.from(e.keys()).map(async a=>{let s=e.get(a)??[],c=await this.#M(a,s);i.push(...c)})),i}async#B(t){return this._exceedDisplayLimit=t.length>this.#r,this._candidateFeatures=await this.#O(t.slice(0,this.#r)),this._candidateFeatures.length===0?(this.#c(),await Promise.reject(Error("No features found"))):(this._candidateFeatures.length===1&&(this._selectedFeature=this._candidateFeatures.at(0)),this.mode="add-spatial-feature",this.#a?.reject(),this.#a=Promise.withResolvers(),await this.#a.promise)}#j(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit(),this._activeTraceLocationType=void 0,this.mode="default",this.#c()}#c(t){t?.stopPropagation(),this.#s?.clear(),this.#$(),(this.view?d.getSketchViewModel(this.view):null)?.cancel()}#$(){this.mode="default",this._candidateFeatures=[],this._selectedFeature=void 0,this.#a?.reject(),this.#a=null}#V(){let t=this.#a,e=this.#s,{_selectedFeature:i}=this;if(t&&e){if(!i)return;t.resolve(i),this.#a=null}}#p(t){let e=t.map(({spatialProperties:i})=>i.flagGraphic).filter(i=>i!==void 0&&!this.view?.graphics.includes(i));this.view?.graphics.addMany(e)}#o(t){let e=t.map(({spatialProperties:i})=>i.flagGraphic).filter(i=>i!==void 0);this.view?.graphics.removeMany(e)}#z(t,e=!1,i){return r`<calcite-notice .closable=${e} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${t}</div></calcite-notice>`}#G(){let{_namedTraceConfigurations:t,selectedUtilityNetwork:e}=this;return r`<arcgis-utility-network-trace-configuration-picker .messageOverrides=${this.messageOverrides} .selectedNamedTraceConfiguration=${this.selectedNamedTraceConfiguration} .traceConfigurations=${t} .utilityNetwork=${e} @arcgisPropertyChange=${i=>{i.stopPropagation(),i.detail.name==="selectedNamedTraceConfiguration"?(this.selectedNamedTraceConfiguration=i.target.selectedNamedTraceConfiguration,this.#A()):i.detail.name==="traceConfiguration"&&(this._traceConfiguration=i.target.traceConfiguration)}}></arcgis-utility-network-trace-configuration-picker>`}#q(){let{selectedUtilityNetwork:t,view:e}=this;return r`<arcgis-utility-network-picker .messageOverrides=${this.messageOverrides} .selectedUtilityNetwork=${t} .view=${e} @arcgisPropertyChange=${i=>{i.detail.name==="selectedUtilityNetwork"&&(this.selectedUtilityNetwork=i.target.selectedUtilityNetwork)}}></arcgis-utility-network-picker>`}#Q(){let{_error:t}=this,{noView:e}=this._messages.errors,i;return t===e?i=this.#z(t,!1,"exclamation-mark-triangle"):i=this.#W(),r`<calcite-flow-item .selected=${this.mode==="default"}>${i}</calcite-flow-item>`}#R(){let{_messages:t,mode:e}=this,i=this._activeTraceLocationType==="starting-point"?t.labels.addSpatial.startingPoint:this._activeTraceLocationType==="barrier"?t.labels.addSpatial.barrier:t.labels.addSpatial.stoppingPoint;return r`<calcite-flow-item .selected=${e==="add-spatial-instructions"} .heading=${i} @calciteFlowItemBack=${a=>this.#c(a)}><div class="add-spatial-mode"><div><h5 class="heading">${t.instructions.addSpatial.selectFeature.heading}</h5>${t.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${t.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${t.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`}#H(){let{_activeTraceLocationType:t,_candidateFeatures:e,_messages:i}=this;if(!e.length)return this.mode="default",null;let a=t==="starting-point"?i.labels.addSpatial.startingPoint:t==="barrier"?i.labels.addSpatial.barrier:i.labels.addSpatial.stoppingPoint,s=e.length===1?"feature":"list";return r`<arcgis-features-next .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#n} .features=${this._candidateFeatures} .featureMenuTitle=${a} .hideActionBar=${this.hideActionBar} hide-select-feature .includeDefaultActionsDisabled=${this.includeDefaultActionsDisabled} .initialDisplayMode=${s} .messageOverrides=${this.messageOverrides} @arcgisClose=${()=>this.#$()} @arcgisPropertyChange=${this.#C} @arcgisTriggerAction=${this.#N} open .referenceElement=${this.referenceElement} .view=${this.view} ${h(this.#F)}></arcgis-features-next>`}#J(){let{mode:t,_messages:e,_selectedFeature:i,selectedUtilityNetwork:a}=this,s=t==="add-spatial-feature"&&this._exceedDisplayLimit&&!i,c=$(e.warnings.exceededDisplayLimit,{limit:this.#r.toString()}),n=i?!(a?.isUtilityLayer(i.layer)??!0):!0;return r`${s&&r`<calcite-notice appearance=transparent class="results-limited-message" icon=information kind=info open scale=s><div slot=message>${c}</div></calcite-notice>`||""}<calcite-button appearance=outline width=full @click=${()=>this.#c()} slot=footer>${e.buttons.cancel}</calcite-button>${t==="add-spatial-feature"&&r`<calcite-button width=full slot=footer appearance=solid @click=${()=>this.#V()} .disabled=${n}>${e.buttons.add}</calcite-button>`||""}`}#m(t,e,i){return r`<arcgis-utility-network-trace-locations .messageOverrides=${this.messageOverrides} .view=${this.view} .traceLocationType=${t} .beforeMapInteraction=${this.beforeMapInteraction} @arcgisTraceLocationSelectStart=${this.#I} @arcgisTraceLocationSelectEnd=${this.#j} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#l} .traceLocations=${e} .afterMapInteraction=${this.#B.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(i)}></arcgis-utility-network-trace-locations>`}#W(){let{_messages:t}=this,e=this.#q(),i=this.#G(),a=this.#b?r`${this.#h?this.#m("starting-point",this.#t,this.#L):null}${this.#u?this.#m("stopping-point",this.#e,this.#D):null}${this.#m("barrier",this.#i,this.#S)}`:null,s=this.selectedUtilityNetwork?.loaded?r`${i}${a}`:null;return r`<calcite-block-group .label=${t.labels.traceInputs}>${e}${s}</calcite-block-group>`}render(){let{mode:t}=this;return r`<calcite-panel>${t==="add-spatial-feature"?this.#H():null}<calcite-flow .hidden=${t==="add-spatial-feature"}>${this.#Q()}${this.#R()}</calcite-flow>${t!=="default"?this.#J():null}</calcite-panel>`}};f("arcgis-utility-network-trace-inputs",g);return g},"core/Collection","core/reactiveUtils","intl","rest/networks/support/TraceLocation",a,b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"./EJVFK7JX.js";import{a as k}from"./REB4CHAK.js";import{a as T}from"./L5IRXOCJ.js";import d from"./7JPHMESH.js";import c from"./OLY5EME5.js";import{h as $}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as u}from"./LXME6MU5.js";import{P as p,Q as g,R as b,T as h,X as y,_,a as w,b as s,x as f}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{on:O,when:C,watch:H},P,{property:d,subclass:S},,,,D])=>{var L=Object.defineProperty,z=Object.getOwnPropertyDescriptor,l=(a,e,t,i)=>{for(var n=i>1?void 0:i?z(e,t):e,o=a.length-1,c;o>=0;o--)(c=a[o])&&(n=(i?c(e,t,n):c(n))||n);return i&&n&&L(e,t,n),n},E=new EventTarget;function B(a,e,t){let i=!1,n=H(a,(o,c)=>{i||e(o,c)},t);return{remove(){n.remove()},pause(){i=!0},resume(){i=!1}}}var r=class extends P{constructor(a){super(a),this._viewpointHandle=null,this.addHandles(O(()=>E,"expand",e=>{let{target:t}=e.detail;t!==this&&t.expanded&&t.group&&t.group===this.group&&this.expanded&&this._collapse()}))}destroy(){this._viewpointHandle=null,this.view=null}set autoCollapse(a){this._set("autoCollapse",a),this._watchViewpoint()}set expanded(a){this._set("expanded",a),this.group&&a&&E.dispatchEvent(new CustomEvent("expand",{detail:{target:this}})),this._viewpointHandleChange(a)}get state(){return this.view?.ready?"ready":"disabled"}set view(a){this._get("view")!==a&&(this._set("view",a),a&&C(()=>a.ready,()=>{this.view===a&&this._watchViewpoint()},{once:!0,initial:!0}))}_viewpointHandleChange(a){this._viewpointHandle&&(a?C(()=>this.view?.stationary,()=>this._viewpointHandle?.resume(),{once:!0,initial:!0}):this._viewpointHandle.pause())}_watchViewpoint(){let a="viewpoint";this.removeHandles(a),this._viewpointHandle=null;let{autoCollapse:e,view:t}=this;if(!t||!e)return;let i=B(()=>t.type==="3d"?t.camera:t.viewpoint,()=>this._collapse());this.addHandles(i,a),this._viewpointHandle=i}_collapse(){this.expanded=!1}};l([d({value:!1})],r.prototype,"autoCollapse",1);l([d({value:!1})],r.prototype,"expanded",1);l([d()],r.prototype,"group",2);l([d({readOnly:!0})],r.prototype,"state",1);l([d({value:null})],r.prototype,"view",1);r=l([S("map-components.expand.ExpandViewModel")],r);var j=w`:host{display:flex;pointer-events:auto;--arcgis-internal-expand-icon-number-spacing-left: none;--arcgis-internal-expand-icon-number-spacing-right: none;--arcgis-internal-expand-action-background-color: var( --calcite-action-background-color, var(--calcite-color-foreground-1) );--arcgis-internal-expand-action-background-color-hover: var( --calcite-action-background-color-hover, var(--calcite-color-surface-3) );--arcgis-internal-expand-action-background-color-press: var( --calcite-action-background-color-press, var(--calcite-color-foreground-3) )}arcgis-expand>.content-expanded{background-color:var(--calcite-color-background)}.root{--esri-widget-panel-max-height: 95svh;--calcite-sheet-max-height: var(--esri-widget-panel-max-height);--calcite-sheet-height: auto;--calcite-action-corner-radius: 0}.action{--calcite-action-background-color: var(--arcgis-internal-expand-action-background-color);--calcite-action-background-color-hover: var(--arcgis-internal-expand-action-background-color-hover);--calcite-action-background-color-press: var(--arcgis-internal-expand-action-background-color-press);cursor:pointer;text-align:center;color:var(--calcite-color-text-2);justify-content:center;align-items:center;margin:0;padding:0;font-size:var(--calcite-font-size);transition:background-color .125s ease-in-out;display:flex;flex-direction:column;overflow:hidden}.toggle{position:relative}.popover-content{flex-direction:column;display:flex;max-height:var(--arcgis-internal-expand-max-height, 95svh);::slotted(*){max-height:var(--arcgis-internal-expand-max-height, 95svh);overflow-y:auto}::slotted(arcgis-sketch){--arcgis-internal-sketch-gap: var(--calcite-spacing-none);max-inline-size:calc(min(100cqw,100vw) - 80px)}::slotted(:is(arcgis-area-measurement-2d,arcgis-area-measurement-3d,arcgis-basemap-gallery,arcgis-basemap-layer-list,arcgis-basemap-layer-list-next,arcgis-bookmarks,arcgis-building-explorer,arcgis-catalog-layer-list,arcgis-catalog-layer-list-next,arcgis-directions,arcgis-direct-line-measurement-3d,arcgis-distance-measurement-2d,arcgis-editor,arcgis-feature-form,arcgis-features,arcgis-layer-list,arcgis-layer-list-next,arcgis-legend,arcgis-line-of-sight,arcgis-print,arcgis-shadow-cast,arcgis-slice,arcgis-table-list,arcgis-table-list-next,arcgis-utility-network-trace,arcgis-grid-controls)){width:var(--arcgis-internal-panel-width);min-width:var(--calcite-spacing-xxxl);min-height:var(--calcite-spacing-xxxl);transition:max-height .25s ease-in-out}::slotted(arcgis-exploratory-analysis){width:var(--arcgis-internal-exploratory-analysis-width, fit-content);min-height:var(--calcite-spacing-xxxl);transition:max-height .25s ease-in-out}}.popover-content .esri-widget--panel{width:300px}.panel{max-height:var(--esri-widget-panel-max-height)}.panel-content{::slotted(*){width:100%}::slotted(:is(arcgis-area-measurement-2d,arcgis-area-measurement-3d,arcgis-basemap-gallery,arcgis-basemap-layer-list,arcgis-basemap-layer-list-next,arcgis-bookmarks,arcgis-building-explorer,arcgis-catalog-layer-list,arcgis-catalog-layer-list-next,arcgis-directions,arcgis-direct-line-measurement-3d,arcgis-distance-measurement-2d,arcgis-editor,arcgis-feature-form,arcgis-features,arcgis-layer-list,arcgis-layer-list-next,arcgis-legend,arcgis-line-of-sight,arcgis-print,arcgis-shadow-cast,arcgis-slice,arcgis-table-list,arcgis-table-list-next,arcgis-utility-network-trace,arcgis-grid-controls)){overflow-y:auto}}.panel-content .esri-widget{width:auto}.panel-content .esri-widget--panel{flex:auto}.arcgis-map-container-ui__element .popover-content .esri-widget,.arcgis-map-container-ui__element .popover-content .esri-widget.esri-component,.arcgis-map-container-ui__element .panel-content .esri-widget,.arcgis-map-container-ui__element .panel-content .esri-widget.esri-component,.popover-content .esri-widget,.popover-content .esri-widget.esri-component,.panel-content .esri-widget,.panel-content .esri-widget.esri-component{box-sizing:border-box;box-shadow:none;margin-bottom:0}.panel-content,.content-container{background-color:var(--calcite-color-foreground-1);flex-direction:column;flex:auto;justify-content:stretch;display:flex}.sheet .panel-content,.sheet .content-container{overflow:hidden}.panel-icon-number{align-self:center}.icon{display:flex}calcite-button:not(:hover) .icon:not(calcite-icon){color:var(--calcite-color-text-3)}.icon-flip{transform:var(--arcgis-internal-collapse-icon-flip)}.icon-number{transform-origin:50%;color:var(--calcite-color-text-inverse);pointer-events:none;background-color:var(--calcite-color-text-3);border-radius:var(--calcite-spacing-xl);justify-content:center;align-items:center;height:var(--calcite-space-lg);padding:.125em .333em;font-size:var(--calcite-font-size-sm);line-height:1em;display:flex;position:absolute;top:-6px;left:var(--arcgis-internal-expand-icon-number-spacing-left);right:var(--arcgis-internal-expand-icon-number-spacing-right)}`,I="chevrons-left",M="chevrons-right",N=D(r),m=class extends b{constructor(){super(...arguments),this.popoverEl=p(),this.messages=k({}),this.viewModel=N(this),this.toggleActionEl=p(),this.view=this.viewModel.view,this.state=this.viewModel.state,this.autoDestroyDisabled=!1,this.autoCollapse=this.viewModel.autoCollapse,this.closeOnEscDisabled=!1,this.content="",this.expanded=this.viewModel.expanded,this.expandTooltip="",this.collapseTooltip="",this.focusTrapDisabled=!1,this.focusTrapInitialFocusDisabled=!1,this.group=this.viewModel.group,this.iconNumber=0,this.mode="auto",this.topLayerDisabled=!1,this.modalDisabled=!1,this.visualScale="m",this.arcgisPropertyChange=$()("expanded"),this.arcgisReady=f()}static{this.properties={_slottedIcon:16,expandTitle:16,_displaySheet:16,view:0,state:32,icon:1,label:1,autoDestroyDisabled:5,referenceElement:1,autoCollapse:5,autoModeBreakpoint:9,closeOnEscDisabled:5,content:1,expanded:7,expandIcon:3,expandTooltip:1,collapseIcon:3,collapseTooltip:1,focusTrapDisabled:5,focusTrapInitialFocusDisabled:5,group:1,iconNumber:9,mode:1,placement:1,messageOverrides:0,topLayerDisabled:5,modalDisabled:5,visualScale:1}}static{this.styles=j}get expandTitle(){let{expanded:e,messages:t,collapseTooltip:i,expandTooltip:n}=this;return(e?i||t.collapse:n||t.expand)??""}get _displaySheet(){switch(this.mode){case"drawer":return!0;case"auto":return!!this.viewModel.view&&this.viewModel.view.width<=(this.autoModeBreakpoint??544);default:return!1}}get expandIcon(){if(this._expandIcon)return this._expandIcon;if(this._slottedIcon)return this._slottedIcon;let e=null;return this.content instanceof HTMLElement&&("widget"in this.content&&this.content.widget?.icon?e=this.content.widget.icon:"icon"in this.content?e=this.content.icon:e=this.content.getAttribute("icon")),e??I}set expandIcon(e){this._expandIcon=e}get collapseIcon(){return this._collapseIcon??M}set collapseIcon(e){this._collapseIcon=e}async collapse(){this.expanded=!1}async destroy(){await this.manager.destroy()}async expand(){this.expanded=!0}loaded(){this.manager.onLifecycle(()=>[H(()=>this.viewModel?.view?.size,()=>{this.popoverEl?.value?.reposition()},{initial:!0})])}toggle(){this.expanded=!this.expanded}getPopoverPlacement(){if(this.placement)return this.placement;switch(this.el.slot){case"bottom-start":case"bottom-left":return"right-end";case"bottom-right":case"bottom-end":return"left-end";case"top-start":case"top-left":return"right-start";case"top-right":case"top-end":return"left-start";default:return"auto"}}_isCloseOnEscapeDisabled(e){let{closeOnEscDisabled:t}=this;return typeof t=="function"?t(e):t}_handlePopoverClose(e){e.target===this.popoverEl.value&&this.collapse()}_handleKeyDown(e){this.expanded&&e.key==="Escape"&&this._isCloseOnEscapeDisabled(e)&&e.preventDefault()}_handleSlotChange({currentTarget:e}){let t=e.assignedElements().find(i=>"icon"in i);this._slottedIcon=t?.icon}render(){let{_displaySheet:e,toggleActionEl:t,expanded:i,focusTrapInitialFocusDisabled:n,label:o,modalDisabled:c,topLayerDisabled:v}=this,x=n?{initialFocus:!1}:void 0;return s`<div class=${h(u("root",T.widget))}>${this._renderToggle()}${e?s`<calcite-sheet class="sheet" .focusTrapDisabled=${this.focusTrapDisabled} .focusTrapOptions=${x} height=l .label=${o??""} .modalDisabled=${c} .topLayerDisabled=${v} @keydown=${this._handleKeyDown} .open=${i} position=block-end @calciteSheetClose=${this.collapse}><calcite-panel class="panel" closable .closed=${!i} .heading=${o} @keydown=${this._handleKeyDown} @calcitePanelClose=${this.collapse}><div class="panel-content">${this._renderContent()}</div></calcite-panel></calcite-sheet>`:t.value?s`<calcite-popover .focusTrapDisabled=${this.focusTrapDisabled} .focusTrapOptions=${x} .label=${o??""} @keydown=${this._handleKeyDown} trigger-disabled .open=${i} overlay-positioning=fixed .placement=${this.getPopoverPlacement()} .referenceElement=${t.value} .topLayerDisabled=${v} @calcitePopoverClose=${this._handlePopoverClose} ${g(this.popoverEl)}><div class="popover-content">${this._renderContent()}</div></calcite-popover>`:null}</div>`}_renderBadgeNumber(){let{expanded:e,iconNumber:t}=this;return t&&!e?s`<span class="icon-number">${t}</span>`:null}_renderToggleButton(){let{expanded:e,expandTitle:t,expandIcon:i,collapseIcon:n}=this,o=e?n:i;return s`<calcite-action class=${h(u("action","icon",{"icon-flip":o===I||o===M}))} @click=${this.toggle} .text=${t} title=${t??y} .aria=${{expanded:e}} .icon=${o} .scale=${this.visualScale} ${g(this.toggleActionEl)}></calcite-action>`}_renderToggle(){return s`<div class="toggle">${this._renderToggleButton()}${this._renderBadgeNumber()}</div>`}_renderContent(){return s`<div class="content-container"><slot @slotchange=${this._handleSlotChange}></slot></div>`}};_("arcgis-expand",m);return m},"core/reactiveUtils","core/Accessor","core/accessorSupport/decorators",a,c,d,e)
2
+ import e from"./EJVFK7JX.js";import{a as k}from"./REB4CHAK.js";import{a as T}from"./L5IRXOCJ.js";import d from"./7JPHMESH.js";import c from"./OLY5EME5.js";import{h as $}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as u}from"./LXME6MU5.js";import{P as p,Q as g,R as b,T as h,X as y,_,a as w,b as s,x as f}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{on:O,when:C,watch:H},P,{property:d,subclass:S},,,,D])=>{var L=Object.defineProperty,z=Object.getOwnPropertyDescriptor,l=(a,e,t,i)=>{for(var n=i>1?void 0:i?z(e,t):e,o=a.length-1,c;o>=0;o--)(c=a[o])&&(n=(i?c(e,t,n):c(n))||n);return i&&n&&L(e,t,n),n},E=new EventTarget;function B(a,e,t){let i=!1,n=H(a,(o,c)=>{i||e(o,c)},t);return{remove(){n.remove()},pause(){i=!0},resume(){i=!1}}}var r=class extends P{constructor(a){super(a),this._viewpointHandle=null,this.addHandles(O(()=>E,"expand",e=>{let{target:t}=e.detail;t!==this&&t.expanded&&t.group&&t.group===this.group&&this.expanded&&this._collapse()}))}destroy(){this._viewpointHandle=null,this.view=null}set autoCollapse(a){this._set("autoCollapse",a),this._watchViewpoint()}set expanded(a){this._set("expanded",a),this.group&&a&&E.dispatchEvent(new CustomEvent("expand",{detail:{target:this}})),this._viewpointHandleChange(a)}get state(){return this.view?.ready?"ready":"disabled"}set view(a){this._get("view")!==a&&(this._set("view",a),a&&C(()=>a.ready,()=>{this.view===a&&this._watchViewpoint()},{once:!0,initial:!0}))}_viewpointHandleChange(a){this._viewpointHandle&&(a?C(()=>this.view?.stationary,()=>this._viewpointHandle?.resume(),{once:!0,initial:!0}):this._viewpointHandle.pause())}_watchViewpoint(){let a="viewpoint";this.removeHandles(a),this._viewpointHandle=null;let{autoCollapse:e,view:t}=this;if(!t||!e)return;let i=B(()=>t.type==="3d"?t.camera:t.viewpoint,()=>this._collapse());this.addHandles(i,a),this._viewpointHandle=i}_collapse(){this.expanded=!1}};l([d({value:!1})],r.prototype,"autoCollapse",1);l([d({value:!1})],r.prototype,"expanded",1);l([d()],r.prototype,"group",2);l([d({readOnly:!0})],r.prototype,"state",1);l([d({value:null})],r.prototype,"view",1);r=l([S("map-components.expand.ExpandViewModel")],r);var j=w`:host{display:flex;pointer-events:auto;--arcgis-internal-expand-icon-number-spacing-left: none;--arcgis-internal-expand-icon-number-spacing-right: none;--arcgis-internal-expand-action-background-color: var( --calcite-action-background-color, var(--calcite-color-foreground-1) );--arcgis-internal-expand-action-background-color-hover: var( --calcite-action-background-color-hover, var(--calcite-color-surface-3) );--arcgis-internal-expand-action-background-color-press: var( --calcite-action-background-color-press, var(--calcite-color-foreground-3) )}arcgis-expand>.content-expanded{background-color:var(--calcite-color-background)}.root{--esri-widget-panel-max-height: 95svh;--calcite-sheet-max-height: var(--esri-widget-panel-max-height);--calcite-sheet-height: auto;--calcite-action-corner-radius: 0}.action{--calcite-action-background-color: var(--arcgis-internal-expand-action-background-color);--calcite-action-background-color-hover: var(--arcgis-internal-expand-action-background-color-hover);--calcite-action-background-color-press: var(--arcgis-internal-expand-action-background-color-press);cursor:pointer;text-align:center;color:var(--calcite-color-text-2);justify-content:center;align-items:center;margin:0;padding:0;font-size:var(--calcite-font-size);transition:background-color .125s ease-in-out;display:flex;flex-direction:column;overflow:hidden}.toggle{position:relative}.popover-content{flex-direction:column;display:flex;max-height:var(--arcgis-internal-expand-max-height, 95svh);::slotted(*){max-height:var(--arcgis-internal-expand-max-height, 95svh);overflow-y:auto}::slotted(arcgis-sketch){--arcgis-internal-sketch-gap: var(--calcite-spacing-none);max-inline-size:calc(min(100cqw,100vw) - 80px)}::slotted(:is(arcgis-area-measurement-2d,arcgis-area-measurement-3d,arcgis-basemap-gallery,arcgis-basemap-layer-list,arcgis-basemap-layer-list-next,arcgis-bookmarks,arcgis-building-explorer,arcgis-catalog-layer-list,arcgis-catalog-layer-list-next,arcgis-directions,arcgis-direct-line-measurement-3d,arcgis-distance-measurement-2d,arcgis-editor,arcgis-feature-form,arcgis-features,arcgis-layer-list,arcgis-layer-list-next,arcgis-legend,arcgis-line-of-sight,arcgis-print,arcgis-shadow-cast,arcgis-slice,arcgis-table-list,arcgis-table-list-next,arcgis-utility-network-trace,arcgis-grid-controls)){width:var(--arcgis-internal-panel-width);min-width:var(--calcite-spacing-xxxl);min-height:var(--calcite-spacing-xxxl);transition:max-height .25s ease-in-out}::slotted(arcgis-exploratory-analysis){width:var(--arcgis-internal-exploratory-analysis-width, fit-content);min-height:var(--calcite-spacing-xxxl);transition:max-height .25s ease-in-out}}.popover-content .esri-widget--panel{width:300px}.panel{max-height:var(--esri-widget-panel-max-height)}.panel-content{::slotted(*){width:100%}::slotted(:is(arcgis-area-measurement-2d,arcgis-area-measurement-3d,arcgis-basemap-gallery,arcgis-basemap-layer-list,arcgis-basemap-layer-list-next,arcgis-bookmarks,arcgis-building-explorer,arcgis-catalog-layer-list,arcgis-catalog-layer-list-next,arcgis-directions,arcgis-direct-line-measurement-3d,arcgis-distance-measurement-2d,arcgis-editor,arcgis-feature-form,arcgis-features,arcgis-layer-list,arcgis-layer-list-next,arcgis-legend,arcgis-line-of-sight,arcgis-print,arcgis-shadow-cast,arcgis-slice,arcgis-table-list,arcgis-table-list-next,arcgis-utility-network-trace,arcgis-grid-controls)){overflow-y:auto}}.panel-content .esri-widget{width:auto}.panel-content .esri-widget--panel{flex:auto}.arcgis-map-container-ui__element .popover-content .esri-widget,.arcgis-map-container-ui__element .popover-content .esri-widget.esri-component,.arcgis-map-container-ui__element .panel-content .esri-widget,.arcgis-map-container-ui__element .panel-content .esri-widget.esri-component,.popover-content .esri-widget,.popover-content .esri-widget.esri-component,.panel-content .esri-widget,.panel-content .esri-widget.esri-component{box-sizing:border-box;box-shadow:none;margin-bottom:0}.panel-content,.content-container{background-color:var(--calcite-color-foreground-1);flex-direction:column;flex:auto;justify-content:stretch;display:flex}.sheet .panel-content,.sheet .content-container{overflow:hidden}.panel-icon-number{align-self:center}.icon{display:flex}calcite-button:not(:hover) .icon:not(calcite-icon){color:var(--calcite-color-text-3)}.icon-flip{transform:var(--arcgis-internal-collapse-icon-flip)}.icon-number{transform-origin:50%;color:var(--calcite-color-text-inverse);pointer-events:none;background-color:var(--calcite-color-text-3);border-radius:var(--calcite-spacing-xl);justify-content:center;align-items:center;height:var(--calcite-space-lg);padding:.125em .333em;font-size:var(--calcite-font-size-sm);line-height:1em;display:flex;position:absolute;top:-6px;left:var(--arcgis-internal-expand-icon-number-spacing-left);right:var(--arcgis-internal-expand-icon-number-spacing-right)}`,I="chevrons-left",M="chevrons-right",N=D(r),m=class extends b{constructor(){super(...arguments),this.popoverEl=p(),this.messages=k({}),this.viewModel=N(this),this.toggleActionEl=p(),this.view=this.viewModel.view,this.state=this.viewModel.state,this.autoDestroyDisabled=!1,this.autoCollapse=this.viewModel.autoCollapse,this.closeOnEscDisabled=!1,this.content="",this.expanded=this.viewModel.expanded,this.expandTooltip="",this.collapseTooltip="",this.focusTrapDisabled=!1,this.focusTrapInitialFocusDisabled=!1,this.group=this.viewModel.group,this.iconNumber=0,this.mode="auto",this.topLayerDisabled=!1,this.modalDisabled=!1,this.visualScale="m",this.arcgisPropertyChange=$()("expanded"),this.arcgisReady=f()}static{this.properties={_slottedIcon:16,expandTitle:16,_displaySheet:16,view:0,state:32,icon:1,label:1,autoDestroyDisabled:5,referenceElement:1,autoCollapse:5,autoModeWidthBreakpoint:9,closeOnEscDisabled:5,content:1,expanded:7,expandIcon:3,expandTooltip:1,collapseIcon:3,collapseTooltip:1,focusTrapDisabled:5,focusTrapInitialFocusDisabled:5,group:1,iconNumber:9,mode:1,placement:1,messageOverrides:0,topLayerDisabled:5,modalDisabled:5,visualScale:1}}static{this.styles=j}get expandTitle(){let{expanded:e,messages:t,collapseTooltip:i,expandTooltip:n}=this;return(e?i||t.collapse:n||t.expand)??""}get _displaySheet(){switch(this.mode){case"drawer":return!0;case"auto":return!!this.viewModel.view&&this.viewModel.view.width<=(this.autoModeWidthBreakpoint??544);default:return!1}}get expandIcon(){if(this._expandIcon)return this._expandIcon;if(this._slottedIcon)return this._slottedIcon;let e=null;return this.content instanceof HTMLElement&&("widget"in this.content&&this.content.widget?.icon?e=this.content.widget.icon:"icon"in this.content?e=this.content.icon:e=this.content.getAttribute("icon")),e??I}set expandIcon(e){this._expandIcon=e}get collapseIcon(){return this._collapseIcon??M}set collapseIcon(e){this._collapseIcon=e}async collapse(){this.expanded=!1}async destroy(){await this.manager.destroy()}async expand(){this.expanded=!0}loaded(){this.manager.onLifecycle(()=>[H(()=>this.viewModel?.view?.size,()=>{this.popoverEl?.value?.reposition()},{initial:!0})])}toggle(){this.expanded=!this.expanded}getPopoverPlacement(){if(this.placement)return this.placement;switch(this.el.slot){case"bottom-start":case"bottom-left":return"right-end";case"bottom-right":case"bottom-end":return"left-end";case"top-start":case"top-left":return"right-start";case"top-right":case"top-end":return"left-start";default:return"auto"}}_isCloseOnEscapeDisabled(e){let{closeOnEscDisabled:t}=this;return typeof t=="function"?t(e):t}_handlePopoverClose(e){e.target===this.popoverEl.value&&this.collapse()}_handleKeyDown(e){this.expanded&&e.key==="Escape"&&this._isCloseOnEscapeDisabled(e)&&e.preventDefault()}_handleSlotChange({currentTarget:e}){let t=e.assignedElements().find(i=>"icon"in i);this._slottedIcon=t?.icon}render(){let{_displaySheet:e,toggleActionEl:t,expanded:i,focusTrapInitialFocusDisabled:n,label:o,modalDisabled:c,topLayerDisabled:v}=this,x=n?{initialFocus:!1}:void 0;return s`<div class=${h(u("root",T.widget))}>${this._renderToggle()}${e?s`<calcite-sheet class="sheet" .focusTrapDisabled=${this.focusTrapDisabled} .focusTrapOptions=${x} height=l .label=${o??""} .modalDisabled=${c} .topLayerDisabled=${v} @keydown=${this._handleKeyDown} .open=${i} position=block-end @calciteSheetClose=${this.collapse}><calcite-panel class="panel" closable .closed=${!i} .heading=${o} @keydown=${this._handleKeyDown} @calcitePanelClose=${this.collapse}><div class="panel-content">${this._renderContent()}</div></calcite-panel></calcite-sheet>`:t.value?s`<calcite-popover .focusTrapDisabled=${this.focusTrapDisabled} .focusTrapOptions=${x} .label=${o??""} @keydown=${this._handleKeyDown} trigger-disabled .open=${i} overlay-positioning=fixed .placement=${this.getPopoverPlacement()} .referenceElement=${t.value} .topLayerDisabled=${v} @calcitePopoverClose=${this._handlePopoverClose} ${g(this.popoverEl)}><div class="popover-content">${this._renderContent()}</div></calcite-popover>`:null}</div>`}_renderBadgeNumber(){let{expanded:e,iconNumber:t}=this;return t&&!e?s`<span class="icon-number">${t}</span>`:null}_renderToggleButton(){let{expanded:e,expandTitle:t,expandIcon:i,collapseIcon:n}=this,o=e?n:i;return s`<calcite-action class=${h(u("action","icon",{"icon-flip":o===I||o===M}))} @click=${this.toggle} .text=${t} title=${t??y} .aria=${{expanded:e}} .icon=${o} .scale=${this.visualScale} ${g(this.toggleActionEl)}></calcite-action>`}_renderToggle(){return s`<div class="toggle">${this._renderToggleButton()}${this._renderBadgeNumber()}</div>`}_renderContent(){return s`<div class="content-container"><slot @slotchange=${this._handleSlotChange}></slot></div>`}};_("arcgis-expand",m);return m},"core/reactiveUtils","core/Accessor","core/accessorSupport/decorators",a,c,d,e)