@esri/solutions-components 5.0.2-next.6 → 5.0.2-next.8
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.
- package/dist/cdn/{3WKRKVN4.js → 2642PFUF.js} +1 -1
- package/dist/cdn/{XOO4MQ4X.js → 2DAM5BYX.js} +1 -1
- package/dist/cdn/{ULDNFSZC.js → 2UMRDDIV.js} +1 -1
- package/dist/cdn/{4XMWC6IV.js → 3B4FA5CV.js} +1 -1
- package/dist/cdn/{UJSTWEYZ.js → 3ELXQUHH.js} +1 -1
- package/dist/cdn/{Y7OWLSUL.js → 3LEJ44U2.js} +1 -1
- package/dist/cdn/{H4AQ3NOB.js → 3M6AYSM7.js} +1 -1
- package/dist/cdn/4CMHNL7Z.js +2 -0
- package/dist/cdn/{CDTD573U.js → 4OZQG5MW.js} +1 -1
- package/dist/cdn/{CO37Q2G7.js → 5UEEUPL5.js} +1 -1
- package/dist/cdn/{HFSCLHH3.js → 5VP4DXWE.js} +1 -1
- package/dist/cdn/{Q7XZ2WSI.js → 5W3ANKBB.js} +1 -1
- package/dist/cdn/{ET27C34M.js → 5Z32YRHM.js} +1 -1
- package/dist/cdn/{K7HI6WU5.js → 6BEDO5MX.js} +1 -1
- package/dist/cdn/{V5DYUI5A.js → 6CJGNF3Y.js} +1 -1
- package/dist/cdn/{JCIUAWOV.js → 6EFUV7CH.js} +1 -1
- package/dist/cdn/{QKVN24LI.js → 6LPOLFT7.js} +1 -1
- package/dist/cdn/{EAP3T73G.js → 6RXHEPPS.js} +1 -1
- package/dist/cdn/{BN2OKCTV.js → 73LVZIP7.js} +1 -1
- package/dist/cdn/{VPQWJHDX.js → 7UXCJXCE.js} +1 -1
- package/dist/cdn/{NUVM3TEI.js → ALDUB3A4.js} +1 -1
- package/dist/cdn/{3XA5R24U.js → BF65YN5N.js} +1 -1
- package/dist/cdn/{6QDXYJ2A.js → BNQ63VOG.js} +1 -1
- package/dist/cdn/{BN7W4V6O.js → BVWFZPY7.js} +1 -1
- package/dist/cdn/{N7QXUPEE.js → CK7LURBK.js} +1 -1
- package/dist/cdn/{653SJFXP.js → CTRHHRDP.js} +1 -1
- package/dist/cdn/{UCJQY6QB.js → D2QNPQWY.js} +1 -1
- package/dist/cdn/{2RABE6MU.js → D37HOE6T.js} +1 -1
- package/dist/cdn/{FGR7TVGE.js → DUEAJUQG.js} +1 -1
- package/dist/cdn/{M63QPB4V.js → DZUVI4S3.js} +1 -1
- package/dist/cdn/{I3SA63N4.js → E4L5GTBZ.js} +1 -1
- package/dist/cdn/{TOPWR24E.js → E74QDAYN.js} +1 -1
- package/dist/cdn/{DLMYZ6ZN.js → EH43P34B.js} +1 -1
- package/dist/cdn/{2P5ILJMU.js → EL4G77RV.js} +1 -1
- package/dist/cdn/{ETMW3Z3K.js → ERFCQNCV.js} +1 -1
- package/dist/cdn/{X3XKJE25.js → EUZCYCCK.js} +1 -1
- package/dist/cdn/{YQYUGVWA.js → EVFB6G4J.js} +1 -1
- package/dist/cdn/{IYTHORN5.js → FJSRWM5L.js} +1 -1
- package/dist/cdn/{BBLQ4DLJ.js → FL74XITX.js} +1 -1
- package/dist/cdn/{UGXAX5D3.js → GJJOB4RR.js} +1 -1
- package/dist/cdn/{ZE5JXFPR.js → GXXXAGCI.js} +1 -1
- package/dist/cdn/{GYKTRMNC.js → H5ZE4RIC.js} +1 -1
- package/dist/cdn/{YU5HCUEF.js → HAAFUV3J.js} +1 -1
- package/dist/cdn/{I2RB3ZK5.js → HNRZHAOD.js} +1 -1
- package/dist/cdn/{2M7N6LPR.js → HPBIBS4W.js} +1 -1
- package/dist/cdn/{X5T425K7.js → I2FILQIE.js} +1 -1
- package/dist/cdn/{OHXRTGLZ.js → I3OLKEFJ.js} +1 -1
- package/dist/cdn/{5F66HK4S.js → IDEWFRKI.js} +1 -1
- package/dist/cdn/{DD3JC2L3.js → JE7L7M3J.js} +1 -1
- package/dist/cdn/{6VTGA46N.js → JHOXJY5O.js} +1 -1
- package/dist/cdn/{5UAKLHDN.js → JN4HYWSX.js} +1 -1
- package/dist/cdn/{WVAU657C.js → JQFNYWZI.js} +1 -1
- package/dist/cdn/{SKTW2DTJ.js → JQO5U72D.js} +1 -1
- package/dist/cdn/{P3NBQIFK.js → JQU7O6FD.js} +1 -1
- package/dist/cdn/{6YDPEFML.js → JVMVZ2RC.js} +1 -1
- package/dist/cdn/{7VEBBW3O.js → KVR3XE7B.js} +1 -1
- package/dist/cdn/{TAAFNJJG.js → LGUC7DRT.js} +1 -1
- package/dist/cdn/{ACCRMKQI.js → LTBO6VJF.js} +1 -1
- package/dist/cdn/N5PYWRMD.js +2 -0
- package/dist/cdn/{PF7VCNOY.js → N5YBX6NM.js} +1 -1
- package/dist/cdn/{4FHS5SYC.js → N7RLYKQG.js} +1 -1
- package/dist/cdn/{PH6E5VEX.js → NLNE5H6M.js} +1 -1
- package/dist/cdn/{QAZVEVP5.js → O2OYKALV.js} +1 -1
- package/dist/cdn/{Y6QXO4MV.js → OAWQFVGG.js} +1 -1
- package/dist/cdn/{XV34GT2B.js → OJLSK25V.js} +1 -1
- package/dist/cdn/{ECIJI2EF.js → P6ETLC5A.js} +1 -1
- package/dist/cdn/{TUBYR7DR.js → PNBTKFO6.js} +1 -1
- package/dist/cdn/{KJSSBTJF.js → QKGOQ7EC.js} +1 -1
- package/dist/cdn/{Y6GYY3TH.js → RDWJHF5P.js} +1 -1
- package/dist/cdn/{C5NTEEMX.js → RIWLHWBH.js} +1 -1
- package/dist/cdn/{ZL6A7VRS.js → RTSKNY33.js} +1 -1
- package/dist/cdn/{BHP43GOA.js → SETNDPAB.js} +1 -1
- package/dist/cdn/{VY4VI4VX.js → T5ZR5RSW.js} +1 -1
- package/dist/cdn/{ZE5JOQG7.js → TAXUQXTN.js} +1 -1
- package/dist/cdn/{PF3DUV4R.js → TP6FTOYI.js} +1 -1
- package/dist/cdn/{N4KU3YV3.js → TPRPYUVX.js} +1 -1
- package/dist/cdn/{Z22WUH5B.js → U75PDOJF.js} +1 -1
- package/dist/cdn/{SA34OEYY.js → UGKLBL7D.js} +1 -1
- package/dist/cdn/{I5FU5F72.js → UR6OMPID.js} +1 -1
- package/dist/cdn/{QMDTLWB6.js → USIESVTZ.js} +1 -1
- package/dist/cdn/{VS7Q2BDJ.js → V65IKENN.js} +1 -1
- package/dist/cdn/{S5XSLTYG.js → VCH6XDEH.js} +1 -1
- package/dist/cdn/{WCKVYL7Q.js → VQFRDGSZ.js} +1 -1
- package/dist/cdn/{YUCIOMKU.js → XFEOA56B.js} +1 -1
- package/dist/cdn/{H4SMK2IM.js → XJWEK5VT.js} +1 -1
- package/dist/cdn/{TXGCOPR2.js → XUFPQNGT.js} +1 -1
- package/dist/cdn/{GRUGONVG.js → Y3FTYVXY.js} +1 -1
- package/dist/cdn/{64I67VMK.js → Y4TNT6PF.js} +1 -1
- package/dist/cdn/{PLCLZYNU.js → YT2QG2ST.js} +1 -1
- package/dist/cdn/{NTFCCIR6.js → ZVJIHRYK.js} +1 -1
- package/dist/cdn/{43NWVIMB.js → ZZ3AVDZU.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/components/solution-details-panel/customElement.js +11 -11
- package/dist/components/solutions-filter-panel/customElement.js +31 -28
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/solutions-components_commit.txt +7 -7
- package/package.json +1 -1
- package/dist/cdn/KBXJXULA.js +0 -2
- package/dist/cdn/YRN6NQC6.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import c from"./P5ERFKR2.js";import a from"./GPP5RTWG.js";import{a as b}from"./4T7P5RXF.js";import{a as C}from"./
|
|
2
|
+
import c from"./P5ERFKR2.js";import a from"./GPP5RTWG.js";import{a as b}from"./4T7P5RXF.js";import{a as C}from"./TPRPYUVX.js";import{b as _}from"./3LEJ44U2.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{F as v,G as S,H as x,J as f,h as E,i as s,u as T}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([D,L,P,u,h,F,M,p])=>{var{state:t,onChange:k}=M({timeInfoConfigItems:[],filterMode:{type:"filter"},view:null,timeSlider:null,timeInfoItems:[],selectedTimeInfoItem:null,loading:!0,timeSliderConfig:{},autoPlay:!1}),g="time-slider-watch",I=class{constructor(){this.initializeModules()}async initializeModules(){try{this.handles=new D}catch{}}async init(e){if(!e)return;e&&(e.innerHTML=""),t?.timeSlider?.viewModel?.state==="playing"&&t.timeSlider.stop();let{view:i,timeInfoConfigItems:n}=t;if(i)try{if(await i.when(),n.length===1&&n[0]?.type==="map")this.initTimeSlider(e,n[0]);else{let r=await this.getTimeLayerViews(i,n);t.timeInfoItems=this.generateTimeInfoItems(r,n),this.initTimeSlider(e)}}catch{}finally{this.setupFilterModeWatcher()}}destroy(){this.handles?.removeAll(),this.handles=null,t.timeSlider?.destroy()}async getTimeLayerViews(e,i){let n=e.map?.allLayers,r=l=>n?.find(({id:c})=>l===c),a=i.map(({id:l})=>r(l)).map(async l=>await e.whenLayerView(l));return await Promise.all(a)}generateTimeInfoItems(e,i){return[...i].map(n=>{let r=e.find(({layer:a})=>a.id===n.id);return this.generateTimeInfoItem(r,n)})}generateTimeInfoItem(e,{increments:i,rangeStart:n,rangeEnd:r,timeIntervalValue:a}){let l=e?.layer?.timeInfo?.fullTimeExtent;return{layerView:e,unit:i,timeIntervalValue:a??1,rangeStart:new Date(n),rangeEnd:new Date(r),timeExtent:l,previousTimeExtent:null}}initTimeSlider(e,i){let n=r=>{t.timeSlider=new F(r),t.autoPlay&&t.timeSlider.play()};if(i){let r=this.getTimeSliderConfig(e,i);n(r)}else{let r=t?.timeInfoItems?.[0];if(!r)return;t.selectedTimeInfoItem=r;let a=this.getTimeSliderConfig(e);n(a)}t.view?.type==="2d"&&this.initialize2DView()}setupFilterModeWatcher(){k("filterMode",e=>{e&&t.timeInfoItems.forEach(i=>{let n=i.layerView;this.applyTimeExtent(n,n?.featureEffect?.filter?.timeExtent||n.filter?.timeExtent,e)})})}getTimeSliderConfig(e,i){let n={container:e,mode:"time-window",view:t.view?.type==="3d"?t.view:null,...t.timeSliderConfig};if(i){let o=t.view?.map?.widgets?.timeSlider,w={...n,fullTimeExtent:o?.fullTimeExtent,timeExtent:o?.currentTimeExtent};return o?.stopInterval?.unit&&o?.stopInterval?.value&&(w.stops={interval:new h({unit:o?.stopInterval?.unit,value:o?.stopInterval?.value})}),w}let[{timeExtent:r,rangeStart:a,rangeEnd:l,unit:c,timeIntervalValue:V}]=t.timeInfoItems;return{...n,fullTimeExtent:r,timeExtent:new u({start:a,end:l}),stops:{interval:new h({unit:c,value:V})}}}initialize2DView(){t.timeInfoItems.forEach(e=>this.applyTimeExtent(e.layerView,new u({start:e.rangeStart,end:e.rangeEnd}))),this.setupTimeExtentWatcher()}applyTimeExtent(e,i,n){t.filterMode?.type==="effect"?this.applyFeatureEffect(e,i,n):this.applyFeatureFilter(e,i)}applyFeatureEffect(e,i,n){if(e){if(e.filter&&e.set("filter",null),!e?.featureEffect?.filter||n){this.handleUpdatedFeatureEffect(e,i);return}e.featureEffect.filter.timeExtent=i}}async handleUpdatedFeatureEffect(e,i){e.featureEffect=new L({filter:{timeExtent:i},includedEffect:await p(t.filterMode?.effect?.includedEffect??"",e,"includedEffect"),excludedEffect:await p(t.filterMode?.effect?.excludedEffect??"",e,"excludedEffect")})}async applyFeatureFilter(e,i){if(e.featureEffect&&e.set("featureEffect",null),!e.filter){e.filter=new P({timeExtent:i});return}e.filter.timeExtent=i}setupTimeExtentWatcher(){this.handles?.has(g)&&this.handles?.remove(g),t?.timeSlider&&this.handles?.add(t.timeSlider.watch("timeExtent",e=>this.applyTimeExtent(t.selectedTimeInfoItem?.layerView,e)),g)}updateSelectedTimeInfoItem(e){t.timeSlider&&(t.selectedTimeInfoItem&&(t.selectedTimeInfoItem.previousTimeExtent=t.timeSlider.timeExtent),t.selectedTimeInfoItem=e,this.reconfigureTimeSlider(e),this.applyTimeExtent(e.layerView,t.timeSlider.timeExtent),this.setupTimeExtentWatcher())}async reconfigureTimeSlider(e){t.timeSlider&&(t.timeSlider.fullTimeExtent=e.timeExtent,t.timeSlider.timeExtent=this.getTimeExtent(e),t.timeSlider.stops={interval:this.getTimeInterval(e)})}getTimeExtent({rangeStart:e,rangeEnd:i,previousTimeExtent:n}){return n??new u({start:e,end:i})}getTimeInterval(e){let i=e.unit??e.layerView?.layer?.timeInfo?.interval?.unit;return new h({unit:i,value:1})}getLabel(e){return e?.layerView?.layer?.title||""}},m=new I,R=E`@layer{.instant-apps-time-filter{position:relative;display:block;min-width:375px;min-height:200px}.instant-apps-time-filter__background{background-color:var(--calcite-color-background);position:absolute;top:0;left:0;width:100%;height:100%;z-index:0}.instant-apps-time-filter calcite-dropdown{width:100%}.instant-apps-time-filter calcite-dropdown calcite-button{--calcite-color-brand: var(--calcite-color-text-1)}.instant-apps-time-filter__layer-title{font-weight:550;display:inline-block;padding:10px}.instant-apps-time-filter__loading-container{display:flex;justify-content:center;align-items:center;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.instant-apps-time-filter--3d{min-height:160px}}`,d={base:"instant-apps-time-filter",layerTitle:"instant-apps-time-filter__layer-title",loadingContainer:"instant-apps-time-filter__loading-container",background:"instant-apps-time-filter__background",threeD:" instant-apps-time-filter--3d"},y=class extends x{constructor(){super(...arguments),this._messages=C({name:"instant-apps-time-filter"}),this.timeSliderRef=v(),this.timeInfoConfigItems=[],this.autoPlay=!1}static{this.properties={timeInfoConfigItems:0,filterMode:0,view:0,timeSliderConfig:0,autoPlay:5}}static{this.styles=R}static{this.shadowRootOptions=T}async load(){t.view=this.view,t.timeInfoConfigItems=this.timeInfoConfigItems,t.autoPlay=!!this.autoPlay,this.timeSliderConfig&&(t.timeSliderConfig=this.timeSliderConfig),this.filterMode&&(t.filterMode=this.filterMode)}willUpdate(e){e.has("timeInfoConfigItems")&&(this.hasUpdated||this.timeInfoConfigItems?.length>0)&&(t.timeInfoConfigItems=this.timeInfoConfigItems,m.init(this.timeSliderRef.value)),e.has("filterMode")&&(t.filterMode=this.filterMode),e.has("timeSliderConfig")&&(t.timeSliderConfig=this.timeSliderConfig,m.init(this.timeSliderRef.value)),e.has("autoPlay")&&(this.hasUpdated||this.autoPlay)&&(t.autoPlay=this.autoPlay,t.timeSlider&&(t.autoPlay?t.timeSlider.play():t.timeSlider.stop()))}async loaded(){try{await m.init(this.timeSliderRef.value)}catch{}finally{t.loading=!1}}render(){return s`<div class=${`${d.base}${this.view.type!=="2d"?d.threeD:""}`}>${this._renderLoader()}${this.view.type==="2d"&&this._renderTopEl()||""}${b("time-slider",s`<div ${S(this.timeSliderRef)}></div>`)}</div>`}_renderLoader(){return t.loading?s`<div><div class=${f(d.background)}></div><div class=${f(d.loadingContainer)}><calcite-loader scale=m .label=${this._messages.loading??""} .text=${this._messages.loading}></calcite-loader></div></div>`:null}_renderTopEl(){return this.timeInfoConfigItems.length>1?this._renderDropdown():this._renderLayerTitle()}_renderLayerTitle(){let e=t.selectedTimeInfoItem?.layerView?.layer?.title;return s`<span class=${f(d.layerTitle)}>${e}</span>`}_renderDropdown(){return t.selectedTimeInfoItem?s`<calcite-dropdown>${this._renderDropdownButton()}${this._renderDropdownItems()}</calcite-dropdown>`:null}_renderDropdownButton(){return s`<calcite-button slot=trigger appearance=transparent icon-end=chevron-down width=full alignment=space-between>${m.getLabel(t.selectedTimeInfoItem)}</calcite-button>`}_renderDropdownItems(){return t.timeInfoItems.map(e=>this._renderDropdownItem(e))}_renderDropdownItem(e){let i=t.selectedTimeInfoItem?.layerView?.layer?.id,n=e?.layerView?.layer?.id;return s`<calcite-dropdown-item @calciteDropdownItemSelect=${()=>m.updateSelectedTimeInfoItem(e)} .selected=${i===n}>${m.getLabel(e)}</calcite-dropdown-item>`}};_("instant-apps-time-filter",y);return y},"core/Handles","layers/support/FeatureEffect","layers/support/FeatureFilter","time/TimeExtent","time/TimeInterval","widgets/TimeSlider",a,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import a from"./
|
|
2
|
+
import a from"./RTSKNY33.js";export default $arcgis.t(([{n:i}])=>{function w(e,t){let r=[];return e.forEach(n=>{t.has(n.id)&&r.push(n)}),r}function m(e,t,r){if(t<1||e.length<t)return{cards:[],paging:{start:t,num:0,nextStart:-1,total:e.length}};let n=Math.min(t+r,e.length+1),s=n<e.length?n:-1;return{cards:e.slice(t-1,n-1),paging:{start:t,num:n-t,nextStart:s,total:e.length}}}function g(e,t){let r=d(e);return l(r,t)}function l(e,t){let r=[];return t.forEach(n=>{let s=c(n);s&&e.indexOf(s)>=0&&n.relatedSolutions&&(r=r.concat(n.relatedSolutions))}),new Set(r)}function c(e){let t="solutionid-",r=e.typeKeywords.filter(s=>s.startsWith(t)),n=null;return Array.isArray(r)&&r.length>0&&(n=r[0].substring(t.length)),n}function d(e){let t=[];return e?(e.forEach(r=>{let n=c(r);n&&t.push(n)}),t=Array.from(new Set(t)),t):[]}function p(e){let t="solutionversion-",r=(e.typeKeywords||[]).reduce((n,s)=>(s.startsWith(t)&&(n=Number(s.replace(t,""))),n),-1);return isNaN(r)?-1:r}function y(e,t,r){let n,s=r==="asc"?1:-1;switch(t){case"created":n=(a,o)=>s*(a.createdMs<o.createdMs?-1:a.createdMs>o.createdMs?1:0);break;case"numviews":n=(a,o)=>s*(a.numViews<o.numViews?-1:a.numViews>o.numViews?1:0);break;case"title":n=(a,o)=>s*(a.title.toLowerCase()<o.title.toLowerCase()?-1:a.title.toLowerCase()>o.title.toLowerCase()?1:0);break;default:n=()=>0;break}return e.sort(n),e}function u(e){return e.toLowerCase().replace(/\s+/g,"-")}function b(e,t){return e.find(r=>u(r.title)===t||t===r.id)}function S(e,t){let r="solutionid-";return e.find(n=>i(n.typeKeywords,r)===t)}function C(e,t){let r=e.find(n=>t===n.deployCommonId);return u(r.title)}return{a:w,b:m,c:g,d:p,e:y,f:u,g:b,h:S,i:C}},a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import"./KSKNVJAL.js";import b from"./
|
|
2
|
+
import"./KSKNVJAL.js";import b from"./BVWFZPY7.js";import a from"./RTSKNY33.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import{a as p}from"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as g}from"./VU3OQQKP.js";import{F as c,G as l,H as h,h as r,i as s,r as d}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([])=>{var u={heading:"Get Started",card1:{heading:"What's new in the app"},card2:{heading:"Deploy a solution"},card3:{heading:"Manage a deployment"},card4:{heading:"AI Assistant"}},m={heading:"Documentation",card1:{heading:"Help"},card2:{heading:"What's new"},card3:{heading:"FAQ"},card4:{heading:"ArcGIS Blog"}},b={heading:"Support",card1:{heading:"Esri Community"},card2:{heading:"ArcGIS Ideas"},card3:{heading:"Esri Video"},card4:{heading:"Technical support"}},i={getStarted:u,documentation:m,support:b},v=r`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.position-relative{position:relative}.background-override{--calcite-shell-panel-background-color: var(--calcite-color-foreground-2);--calcite-panel-background-color: var(--calcite-color-foreground-2)}.width-350{--calcite-shell-panel-width: 350px}.height-full{height:100%}.padding-end-1-2{padding-inline-end:var(--calcite-spacing-sm)}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1)}calcite-shell{background-color:unset}.padding-end-1{padding-inline-end:var(--calcite-spacing-lg)}.padding-start-1{padding-inline-start:var(--calcite-spacing-lg)}.margin-end-md{margin-inline-end:var(--calcite-spacing-md)}.resources-container{width:100%;box-sizing:border-box}.hero-banner{background-color:var(--calcite-color-foreground-2);padding:4.25rem var(--calcite-spacing-md);text-align:center;width:100%;box-sizing:border-box;margin-bottom:3rem}.hero-heading{font-size:var(--calcite-font-size-5);font-weight:var(--calcite-font-weight-medium);margin:0 0 var(--calcite-spacing-xxl) 0;color:var(--calcite-color-text-1)}.hero-subheading{font-size:var(--calcite-font-size-0);color:var(--calcite-color-text-2);max-width:600px;margin:0 auto}`,o=class extends h{constructor(){super(),this._translations=p({name:"solutions-resources-shell",blocking:!0}),this._mainPanelRef=c(),this._panelFixed=!1,this.sortTypeChanged=d(),this.listenOn(window,"deployAppTabSelected",this._handleDeployAppTabSelected)}static{this.properties={_translations:16}}static{this.styles=v}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let n=e.shadowRoot.querySelector(".content-wrapper");n&&(n.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(n=>{n.forEach(a=>{if(a.type==="attributes"&&a.attributeName==="tabindex"){let t=a.target;t.classList.contains("content-wrapper")&&t.tabIndex===0&&(t.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let n=e.shadowRoot.querySelector(".content-wrapper");n&&this._panelObserver.observe(n,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){let e=this._translations;return s`<calcite-shell><calcite-panel ${l(this._mainPanelRef)}><div class="resources-container"><div class="hero-banner"><h1 class="hero-heading" tabindex=0>${e.hero.heading}</h1><p class="hero-subheading" tabindex=0>${e.hero.subheading}</p></div><solutions-resources-section .heading=${e.getStarted.heading} .subheading=${e.getStarted.subheading} .cards=${[{meridianIcon:"value",heading:e.getStarted.card1.heading,description:e.getStarted.card1.description,url:"https://links.esri.com/solutions/whats-new-in-the-app",headingEn:i.getStarted.card1.heading,sectionHeadingEn:i.getStarted.heading},{meridianIcon:"install",heading:e.getStarted.card2.heading,description:e.getStarted.card2.description,url:"https://links.esri.com/solutions/deploy-a-solution",headingEn:i.getStarted.card2.heading,sectionHeadingEn:i.getStarted.heading},{meridianIcon:"keys",heading:e.getStarted.card3.heading,description:e.getStarted.card3.description,url:"https://links.esri.com/solutions/manage-a-deployment",headingEn:i.getStarted.card3.heading,sectionHeadingEn:i.getStarted.heading},{meridianIcon:"speech-bubbles",heading:e.getStarted.card4.heading,description:e.getStarted.card4.description,url:"https://links.esri.com/solutions/ai-assistant",headingEn:i.getStarted.card4.heading,sectionHeadingEn:i.getStarted.heading}]}></solutions-resources-section><solutions-resources-section .heading=${e.documentation.heading} .subheading=${e.documentation.subheading} .cards=${[{meridianIcon:"search-files",heading:e.documentation.card1.heading,description:e.documentation.card1.description,url:"https://links.esri.com/solutions/help",headingEn:i.documentation.card1.heading,sectionHeadingEn:i.documentation.heading},{meridianIcon:"value",heading:e.documentation.card2.heading,description:e.documentation.card2.description,url:"https://links.esri.com/solutions/whats-new",headingEn:i.documentation.card2.heading,sectionHeadingEn:i.documentation.heading},{meridianIcon:"faq",heading:e.documentation.card3.heading,description:e.documentation.card3.description,url:"https://links.esri.com/solutions/faq",headingEn:i.documentation.card3.heading,sectionHeadingEn:i.documentation.heading},{meridianIcon:"arcmap-blog",heading:e.documentation.card4.heading,description:e.documentation.card4.description,url:"https://links.esri.com/solutions/arcgis-blogs",headingEn:i.documentation.card4.heading,sectionHeadingEn:i.documentation.heading}]}></solutions-resources-section><solutions-resources-section .heading=${e.support.heading} .subheading=${e.support.subheading} .cards=${[{meridianIcon:"esri-community",heading:e.support.card1.heading,description:e.support.card1.description,url:"https://links.esri.com/solutions/esri-community",headingEn:i.support.card1.heading,sectionHeadingEn:i.support.heading},{meridianIcon:"idea",heading:e.support.card2.heading,description:e.support.card2.description,url:"https://links.esri.com/solutions/arcgis-ideas",headingEn:i.support.card2.heading,sectionHeadingEn:i.support.heading},{meridianIcon:"video",heading:e.support.card3.heading,description:e.support.card3.description,url:"https://links.esri.com/solutions/esri-video",headingEn:i.support.card3.heading,sectionHeadingEn:i.support.heading},{meridianIcon:"support",heading:e.support.card4.heading,description:e.support.card4.description,url:"https://links.esri.com/solutions/technical-support",headingEn:i.support.card4.heading,sectionHeadingEn:i.support.heading}]}></solutions-resources-section></div></calcite-panel></calcite-shell>`}_handleDeployAppTabSelected(e){e.detail==="resources"&&this.sortTypeChanged.emit("")}};g("solutions-resources-shell",o);return o},a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import d from"./ZL6A7VRS.js";import{b}from"./PZ4L77M5.js";import"./DD3JC2L3.js";import{a as m}from"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as g}from"./VU3OQQKP.js";import{F as a,G as n,H as f,K as i,L as c,h as v,i as e,j as h}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([k,R,{K:y,b:x,p:w}])=>{var L=v`:host{display:block;--solutions-social-share-action-width: initial;--solutions-social-share-width--s: 200px;--solutions-social-share-width--m: 280px;--solutions-social-share-width--l: 320px;--solutions-social-share-width-horizontal--s: 300px;--solutions-social-share-width-horizontal--m: 380px;--solutions-social-share-width-horizontal--l: 420px;--solutions-social-share-background-color: var(--calcite-color-foreground-1);--solutions-social-share-popover-button-background-color: transparent;--solutions-social-share-popover-button-icon-color: var(--calcite-ui-icon-color);--solutions-social-share-border: 1px solid var(--calcite-color-border-1);position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-flow:column;align-items:stretch}.solutions-social-share__popover-button{background-color:var(--solutions-social-share-popover-button-background-color);--calcite-color-focus: initial}.solutions-social-share__popover-button calcite-icon{color:var(--solutions-social-share-popover-button-icon-color)}.solutions-social-share__dialog{background-color:var(--solutions-social-share-background-color);border:var(--solutions-social-share-border);box-sizing:border-box;height:auto;padding:10px 0;border-radius:5px;color:var(--calcite-color-text-1)}.solutions-social-share__options{margin:0;padding:1% 0 0;list-style-type:none}.solutions-social-share__options li{box-sizing:border-box;display:flex;align-items:center;width:100%;padding:5%;transition:background-color .15s ease-out 0s}.solutions-social-share__options li .solutions-social-share__icon,.solutions-social-share__options li .solutions-social-share__option-text{display:inline-block}.solutions-social-share__options li .solutions-social-share__icon{display:flex;align-items:center}.solutions-social-share__options li .solutions-social-share__option-text{width:85%;margin-left:10px;word-break:break-word}.solutions-social-share__options li .solutions-social-share__option-text--rtl{margin-left:0;margin-right:10px}.solutions-social-share__options li:hover{cursor:pointer;background-color:var(--calcite-color-foreground-2)}.solutions-social-share__options li:focus{outline:2px solid var(--calcite-color-brand);outline-offset:-2px}.solutions-social-share__x-logo{color:var(--calcite-color-text-1)}.solutions-social-share__success{display:flex;flex-direction:column;padding:15px}.solutions-social-share__success-header{display:flex;align-items:center;font-weight:700;margin-bottom:10px}.solutions-social-share__success-icon{display:flex;align-items:center;margin-right:5px}.solutions-social-share__success-icon calcite-icon{color:var(--calcite-color-status-success)}.solutions-social-share__success-message{line-height:16px}.solutions-social-share__layout--horizontal .solutions-social-share__options{display:flex;justify-content:space-around;margin-bottom:8%}.solutions-social-share__layout--horizontal .solutions-social-share__options li{flex-direction:column;padding:0}.solutions-social-share__layout--horizontal .solutions-social-share__options li .solutions-social-share__option-text{word-break:break-word;margin-left:0;margin-top:10px;text-align:center}.solutions-social-share__layout--horizontal .solutions-social-share__options li:hover{background-color:unset}.solutions-social-share__icon-container{display:flex;align-items:center}calcite-action{width:var(--solutions-social-share-action-width)}:host([scale=s]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--s)}:host([scale=s]) .solutions-social-share__icon{width:16px;height:16px}:host([scale=s]) .solutions-social-share__option-text{font-size:var(--calcite-font-size--1)}:host([scale=s]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--s)}:host([scale=m]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--m)}:host([scale=m]) .solutions-social-share__icon{width:24px;height:24px}:host([scale=m]) .solutions-social-share__option-text{font-size:var(--calcite-font-size-0)}:host([scale=m]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--m)}:host([scale=l]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--l)}:host([scale=l]) .solutions-social-share__icon{width:32px;height:32px}:host([scale=l]) .solutions-social-share__option-text{font-size:var(--calcite-font-size-1)}:host([scale=l]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--l)}`,S=".calcite-mode-dark",P={facebook:"https://www.facebook.com/sharer/sharer.php?u={url}",x:"https://x.com/intent/post?url={url}",linkedIn:"https://www.linkedin.com/sharing/share-offsite/?url={url}",bluesky:"https://bsky.app/intent/compose?text={url}"},C="https://arcg.is/prod/shorten",u=class extends f{constructor(){super(...arguments),this.actionApperance="transparent",this.autoUpdateShareUrl=!0,this.buttonAppearance="transparent",this.inlineSuccessPopoverPlacement="trailing",this.mode="popover",this.popoverButtonIconScale="m",this.popoverPositioning="absolute",this.removePopoverOffset=!1,this.scale="s",this.shareButtonKind="neutral",this.shareButtonScale="m",this.shareButtonText="",this.shareButtonType="button",this.shareIconsLayout="vertical",this.shareText="",this.shareUrl=window.location.href,this.shortenShareUrl=!0,this.socialMedia=!0,this.solutionId="",this.solutionTitle="",this.solutionVersion="",this.successMessage="",this._copied=!1,this._inlineCopyLinkOpened=!1,this._opened=!1,this._translations=m({name:"solution-social-share",blocking:!0}),this._configContextConsumer=b({context:x,subscribe:!0}),this._copyLinkPopoverRef=a(),this._dialogContentRef=a(),this._popoverActionRef=a(),this._popoverButtonRef=a(),this._popoverRef=a(),this._shareListRef=a()}static{this.properties={actionApperance:1,autoUpdateShareUrl:5,buttonAppearance:1,inlineSuccessPopoverPlacement:3,mode:3,popoverButtonIconScale:3,popoverPositioning:3,removePopoverOffset:7,scale:3,shareButtonKind:3,shareButtonScale:3,shareButtonText:1,shareButtonType:3,shareIconsLayout:3,shareText:3,shareUrl:1,shortenShareUrl:7,socialMedia:7,solutionId:1,solutionTitle:1,solutionVersion:1,successMessage:3,_copied:16,_inlineCopyLinkOpened:16,_opened:16,_translations:16}}static{this.styles=L}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}loaded(){this._setupAutoCloseListeners(),this.mode==="popover"&&this._popoverRef.value&&(this._opened&&(this._popoverRef.value.open=!0),this.listenOn(this._popoverRef.value,"calcitePopoverOpen",()=>{this._shareListRef.value&&this._shareListRef.value.children[0].focus()}),this.listenOn(this._popoverRef.value,"keydown",this._handlePopoverRefKeyDown))}render(){let o=this._copied&&this.mode==="popover"?this._renderSuccess():e`<div class=solutions-social-share__dialog-content>${this._renderOptions()}</div>`,s=this.shareIconsLayout==="vertical"?" solutions-social-share__layout--vertical":" solutions-social-share__layout--horizontal",t=` calcite-mode-${this.el.closest(S)?"dark":"light"}`,l=e`<div class=${`solutions-social-share__dialog${s}${t}`} ${n(this._dialogContentRef)}>${o}</div>`,r=this.removePopoverOffset?0:6;return this.mode==="popover"?[e`<calcite-popover .label=${this._translations.share?.label??""} reference-element=shareButton placement=bottom-start .scale=${this.scale} overlay-positioning=${this.popoverPositioning??c} offset-distance=${r??c} pointer-disabled=${this.removePopoverOffset??c} ${n(this._popoverRef)}>${l}</calcite-popover>`,this._renderButton()]:[l,e`<calcite-popover .label=${this._translations.share?.label??""} reference-element=copyToClipboard .placement=${this.inlineSuccessPopoverPlacement} .scale=${this.scale} overlay-positioning=fixed ${n(this._copyLinkPopoverRef)}>${this._renderSuccess()}</calcite-popover>`]}_setupAutoCloseListeners(){this.listenOn(document.documentElement,"click",this._autoCloseCallback),this.mode==="popover"&&this._popoverRef.value?(this.listenOn(this._popoverRef.value,"click",this._stopPropagationCallback),this.listenOn(this._popoverRef.value,"calcitePopoverClose",this._resetPopoverCopyState)):this._dialogContentRef.value&&this.listenOn(this._dialogContentRef.value,"click",this._stopPropagationCallback)}_handlePopoverRefKeyDown(o){if(o.code==="Tab"){if(!this._shareListRef.value)return;let s=o.target,t=this._shareListRef.value.children[0],l=this._shareListRef.value.children[this._shareListRef.value.children.length-1];o.shiftKey&&s===t?(o.preventDefault(),l.focus()):!o.shiftKey&&s===l&&(o.preventDefault(),t.focus())}else o.code==="Escape"&&(this._closePopover(),this.shareButtonType==="button"?this._popoverButtonRef.value?.setFocus():this._popoverActionRef.value?.setFocus())}_autoCloseCallback(){this.mode==="popover"?(this._opened=!1,this._popoverRef.value.open=this._opened):(this._copyLinkPopoverRef.value&&(this._copyLinkPopoverRef.value.open=!1),this._inlineCopyLinkOpened=!1)}_stopPropagationCallback(o){o.stopPropagation()}_resetPopoverCopyState(){this.shareButtonType==="button"?this._popoverButtonRef.value?.setFocus():this._popoverActionRef.value?.setFocus(),setTimeout(()=>{this._copied=!1},200)}_renderButton(){let o=this.shareButtonScale!=null?this.shareButtonScale:this.scale;return this.shareButtonType==="button"?e`<calcite-button .appearance=${this.buttonAppearance} class=solutions-social-share__popover-button id=shareButton .kind=${this.shareButtonKind} .label=${this._translations.share?.label} @click=${this._togglePopover.bind(this)} .scale=${o} title=${this._translations.share?.label??c} ${n(this._popoverButtonRef)}>${this.shareButtonText}</calcite-button>`:e`<calcite-action alignment=center .appearance=${this.actionApperance} class=solutions-social-share__popover-button id=shareButton .label=${this._translations.share?.label} @click=${this._togglePopover.bind(this)} .scale=${o} text title=${this._translations.share?.label??c} ${n(this._popoverActionRef)}><div class=solutions-social-share__icon-container><calcite-icon icon=share .scale=${this.popoverButtonIconScale}></calcite-icon></div></calcite-action>`}_renderSuccess(){let o=this._translations.success;return e`<div class=solutions-social-share__success><span class=solutions-social-share__success-header><span class=solutions-social-share__success-icon><calcite-icon icon=check-circle-f .scale=${this.scale}></calcite-icon></span>${o?.label}</span><span class=solutions-social-share__success-message>${this.successMessage||o?.url}</span></div>`}_renderOptions(){let o=this._translations.options,s=document.dir==="rtl"?" solutions-social-share__option-text--rtl":"";return e`<ul class=solutions-social-share__options role=menu ${n(this._shareListRef)}><li id=copyToClipboard @click=${this._handleShareItem.bind(this,"link")} @keydown=${this._handleOptionKeyDown("link")} role=menuitem tabindex=0><span class=solutions-social-share__icon><calcite-icon icon=link .scale=${this.scale}></calcite-icon></span><span class=${`solutions-social-share__option-text${s}`}>${o?.link?.label}</span></li>${this.socialMedia?[e`<li @click=${this._handleShareItem.bind(this,"facebook")} @keydown=${this._handleOptionKeyDown("facebook")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderFacebookIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.facebook?.label}</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"x")} @keydown=${this._handleOptionKeyDown("x")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderXIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>\r\n X</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"linkedIn")} @keydown=${this._handleOptionKeyDown("linkedIn")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderLinkedInIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.linkedIn?.label}</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"bluesky")} @keydown=${this._handleOptionKeyDown("bluesky")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderBlueSkyIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.blueSky?.label}</span></li>`]:null}</ul>`}_handleOptionKeyDown(o){return s=>{let t=s.code;(t==="Space"||t==="Enter"||t==="NumpadEnter")&&this._handleShareItem(o)}}_renderFacebookIcon(){return e`<svg height=100% style=${i({fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2"})} version=1.1 viewBox="0 0 512 512" width=100% xmlns=http://www.w3.org/2000/svg>${h`<g><path d="M512,256c0,-141.385 -114.615,-256 -256,-256c-141.385,0 -256,114.615 -256,256c0,127.777 93.616,233.685 216,252.89l0,-178.89l-65,0l0,-74l65,0l0,-56.4c0,-64.16 38.219,-99.6 96.695,-99.6c28.009,0 57.305,5 57.305,5l0,63l-32.281,0c-31.801,0 -41.719,19.733 -41.719,39.978l0,48.022l71,0l-11.35,74l-59.65,0l0,178.89c122.385,-19.205 216,-125.113 216,-252.89Z" style=${i({fill:"#1877f2",fillRule:"nonzero"})} /><path d="M355.65,330l11.35,-74l-71,0l0,-48.022c0,-20.245 9.917,-39.978 41.719,-39.978l32.281,0l0,-63c0,0 -29.297,-5 -57.305,-5c-58.476,0 -96.695,35.44 -96.695,99.6l0,56.4l-65,0l0,74l65,0l0,178.89c13.033,2.045 26.392,3.11 40,3.11c13.608,0 26.966,-1.065 40,-3.11l0,-178.89l59.65,0Z" style=${i({fill:"#fff",fillRule:"nonzero"})} /></g>`}</svg>`}_renderXIcon(){return e`<svg height=100% width=100% class="solutions-social-share__x-logo" viewBox="0 0 1200 1227" fill=none xmlns=http://www.w3.org/2000/svg>${h`<rect height=400 style=${i({fill:"none"})} width=400 x=56 y=56 /><path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z" fill=currentColor />`}</svg>`}_renderBlueSkyIcon(){return e`<svg height=100% width=100% fill=#0f85fe xmlns=http://www.w3.org/2000/svg viewBox="0 0 512 512">${h`<path d="M111.8 62.2C170.2 105.9 233 194.7 256 242.4c23-47.6 85.8-136.4 144.2-180.2c42.1-31.6 110.3-56 110.3 21.8c0 15.5-8.9 130.5-14.1 149.2C478.2 298 412 314.6 353.1 304.5c102.9 17.5 129.1 75.5 72.5 133.5c-107.4 110.2-154.3-27.6-166.3-62.9l0 0c-1.7-4.9-2.6-7.8-3.3-7.8s-1.6 3-3.3 7.8l0 0c-12 35.3-59 173.1-166.3 62.9c-56.5-58-30.4-116 72.5-133.5C100 314.6 33.8 298 15.7 233.1C10.4 214.4 1.5 99.4 1.5 83.9c0-77.8 68.2-53.4 110.3-21.8z" />`}</svg>`}_renderLinkedInIcon(){return e`<svg height=100% style=${i({fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2"})} version=1.1 viewBox="0 0 512 512" width=100% xmlns=http://www.w3.org/2000/svg>${h`<g id=g5891><path d="M512,64c0,-35.323 -28.677,-64 -64,-64l-384,0c-35.323,0 -64,28.677 -64,64l0,384c0,35.323 28.677,64 64,64l384,0c35.323,0 64,-28.677 64,-64l0,-384Z" id=background style=${i({fill:"#2867b2"})} /><g id=shapes><rect height=257.962 id=rect11 style=${i({fill:"#fff"})} width=85.76 x=61.053 y=178.667 /><path d="M104.512,54.28c-29.341,0 -48.512,19.29 -48.512,44.573c0,24.752 18.588,44.574 47.377,44.574l0.554,0c29.903,0 48.516,-19.822 48.516,-44.574c-0.555,-25.283 -18.611,-44.573 -47.935,-44.573Z" id=path13-0 style=${i({fill:"#fff",fillRule:"nonzero"})} /><path d="M357.278,172.601c-45.49,0 -65.866,25.017 -77.276,42.589l0,-36.523l-85.738,0c1.137,24.197 0,257.961 0,257.961l85.737,0l0,-144.064c0,-7.711 0.554,-15.42 2.827,-20.931c6.188,-15.4 20.305,-31.352 43.993,-31.352c31.012,0 43.436,23.664 43.436,58.327l0,138.02l85.741,0l0,-147.93c0,-79.237 -42.305,-116.097 -98.72,-116.097Z" id=path15 style=${i({fill:"#fff",fillRule:"nonzero"})} /></g></g>`}</svg>`}_togglePopover(o){o.stopPropagation(),this._opened=!this._opened,this._popoverRef.value.open=this._opened}_closePopover(){this._opened=!1,this._popoverRef.value.open=this._opened}async _handleShareItem(o){this._telemetry?.logEvent({category:y.SOLUTION_DETAILS,action:"Share",dimensions:[this.solutionTitle,this.solutionId,this.solutionVersion,w(o)]}),this.shareUrl=await this._generateShareUrl();let s=null,t=navigator?.userAgent?.includes("Chrome")??!1,l=(navigator?.userAgent?.includes("Safari")??!1)&&!t;!l&&this.shortenShareUrl&&(s=await this._shortenUrl(this.shareUrl));let r=s||this.shareUrl;switch(o){case"link":navigator.clipboard.writeText(r),this.mode==="inline"&&(this._copyLinkPopoverRef.value.open=!0,setTimeout(()=>this._copyLinkPopoverRef.value.open=!1,3e3)),this._inlineCopyLinkOpened=!0,this._copied=!0,this.mode==="popover"&&setTimeout(()=>this._closePopover(),2e3);return;case"facebook":case"bluesky":case"x":case"linkedIn":{let p;l&&(p=window.open("","_blank"),this.shortenShareUrl&&(r=await this._shortenUrl(this.shareUrl)||r));let _={url:encodeURI(r)},$=o==="x"?{..._,text:this.shareText}:_,d=k.substitute(P[o],$);this.mode==="popover"&&this._closePopover(),l&&p?(p.location=d,p.focus()):window.open(encodeURI(d),"_blank")}return}}async _shortenUrl(o){let s=(await R(C,{query:{longUrl:o,f:"json"}}))?.data?.data?.url;if(s)return s.replace("http://","https://")}_generateShareUrl(){return this.autoUpdateShareUrl&&(this.shareUrl=window.location.href),this.shareUrl}};g("solution-social-share",u);return u},"intl","request",d)
|
|
2
|
+
import d from"./RTSKNY33.js";import{b}from"./PZ4L77M5.js";import"./JE7L7M3J.js";import{a as m}from"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as g}from"./VU3OQQKP.js";import{F as a,G as n,H as f,K as i,L as c,h as v,i as e,j as h}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([k,R,{K:y,b:x,p:w}])=>{var L=v`:host{display:block;--solutions-social-share-action-width: initial;--solutions-social-share-width--s: 200px;--solutions-social-share-width--m: 280px;--solutions-social-share-width--l: 320px;--solutions-social-share-width-horizontal--s: 300px;--solutions-social-share-width-horizontal--m: 380px;--solutions-social-share-width-horizontal--l: 420px;--solutions-social-share-background-color: var(--calcite-color-foreground-1);--solutions-social-share-popover-button-background-color: transparent;--solutions-social-share-popover-button-icon-color: var(--calcite-ui-icon-color);--solutions-social-share-border: 1px solid var(--calcite-color-border-1);position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-flow:column;align-items:stretch}.solutions-social-share__popover-button{background-color:var(--solutions-social-share-popover-button-background-color);--calcite-color-focus: initial}.solutions-social-share__popover-button calcite-icon{color:var(--solutions-social-share-popover-button-icon-color)}.solutions-social-share__dialog{background-color:var(--solutions-social-share-background-color);border:var(--solutions-social-share-border);box-sizing:border-box;height:auto;padding:10px 0;border-radius:5px;color:var(--calcite-color-text-1)}.solutions-social-share__options{margin:0;padding:1% 0 0;list-style-type:none}.solutions-social-share__options li{box-sizing:border-box;display:flex;align-items:center;width:100%;padding:5%;transition:background-color .15s ease-out 0s}.solutions-social-share__options li .solutions-social-share__icon,.solutions-social-share__options li .solutions-social-share__option-text{display:inline-block}.solutions-social-share__options li .solutions-social-share__icon{display:flex;align-items:center}.solutions-social-share__options li .solutions-social-share__option-text{width:85%;margin-left:10px;word-break:break-word}.solutions-social-share__options li .solutions-social-share__option-text--rtl{margin-left:0;margin-right:10px}.solutions-social-share__options li:hover{cursor:pointer;background-color:var(--calcite-color-foreground-2)}.solutions-social-share__options li:focus{outline:2px solid var(--calcite-color-brand);outline-offset:-2px}.solutions-social-share__x-logo{color:var(--calcite-color-text-1)}.solutions-social-share__success{display:flex;flex-direction:column;padding:15px}.solutions-social-share__success-header{display:flex;align-items:center;font-weight:700;margin-bottom:10px}.solutions-social-share__success-icon{display:flex;align-items:center;margin-right:5px}.solutions-social-share__success-icon calcite-icon{color:var(--calcite-color-status-success)}.solutions-social-share__success-message{line-height:16px}.solutions-social-share__layout--horizontal .solutions-social-share__options{display:flex;justify-content:space-around;margin-bottom:8%}.solutions-social-share__layout--horizontal .solutions-social-share__options li{flex-direction:column;padding:0}.solutions-social-share__layout--horizontal .solutions-social-share__options li .solutions-social-share__option-text{word-break:break-word;margin-left:0;margin-top:10px;text-align:center}.solutions-social-share__layout--horizontal .solutions-social-share__options li:hover{background-color:unset}.solutions-social-share__icon-container{display:flex;align-items:center}calcite-action{width:var(--solutions-social-share-action-width)}:host([scale=s]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--s)}:host([scale=s]) .solutions-social-share__icon{width:16px;height:16px}:host([scale=s]) .solutions-social-share__option-text{font-size:var(--calcite-font-size--1)}:host([scale=s]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--s)}:host([scale=m]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--m)}:host([scale=m]) .solutions-social-share__icon{width:24px;height:24px}:host([scale=m]) .solutions-social-share__option-text{font-size:var(--calcite-font-size-0)}:host([scale=m]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--m)}:host([scale=l]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--l)}:host([scale=l]) .solutions-social-share__icon{width:32px;height:32px}:host([scale=l]) .solutions-social-share__option-text{font-size:var(--calcite-font-size-1)}:host([scale=l]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--l)}`,S=".calcite-mode-dark",P={facebook:"https://www.facebook.com/sharer/sharer.php?u={url}",x:"https://x.com/intent/post?url={url}",linkedIn:"https://www.linkedin.com/sharing/share-offsite/?url={url}",bluesky:"https://bsky.app/intent/compose?text={url}"},C="https://arcg.is/prod/shorten",u=class extends f{constructor(){super(...arguments),this.actionApperance="transparent",this.autoUpdateShareUrl=!0,this.buttonAppearance="transparent",this.inlineSuccessPopoverPlacement="trailing",this.mode="popover",this.popoverButtonIconScale="m",this.popoverPositioning="absolute",this.removePopoverOffset=!1,this.scale="s",this.shareButtonKind="neutral",this.shareButtonScale="m",this.shareButtonText="",this.shareButtonType="button",this.shareIconsLayout="vertical",this.shareText="",this.shareUrl=window.location.href,this.shortenShareUrl=!0,this.socialMedia=!0,this.solutionId="",this.solutionTitle="",this.solutionVersion="",this.successMessage="",this._copied=!1,this._inlineCopyLinkOpened=!1,this._opened=!1,this._translations=m({name:"solution-social-share",blocking:!0}),this._configContextConsumer=b({context:x,subscribe:!0}),this._copyLinkPopoverRef=a(),this._dialogContentRef=a(),this._popoverActionRef=a(),this._popoverButtonRef=a(),this._popoverRef=a(),this._shareListRef=a()}static{this.properties={actionApperance:1,autoUpdateShareUrl:5,buttonAppearance:1,inlineSuccessPopoverPlacement:3,mode:3,popoverButtonIconScale:3,popoverPositioning:3,removePopoverOffset:7,scale:3,shareButtonKind:3,shareButtonScale:3,shareButtonText:1,shareButtonType:3,shareIconsLayout:3,shareText:3,shareUrl:1,shortenShareUrl:7,socialMedia:7,solutionId:1,solutionTitle:1,solutionVersion:1,successMessage:3,_copied:16,_inlineCopyLinkOpened:16,_opened:16,_translations:16}}static{this.styles=L}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}loaded(){this._setupAutoCloseListeners(),this.mode==="popover"&&this._popoverRef.value&&(this._opened&&(this._popoverRef.value.open=!0),this.listenOn(this._popoverRef.value,"calcitePopoverOpen",()=>{this._shareListRef.value&&this._shareListRef.value.children[0].focus()}),this.listenOn(this._popoverRef.value,"keydown",this._handlePopoverRefKeyDown))}render(){let o=this._copied&&this.mode==="popover"?this._renderSuccess():e`<div class=solutions-social-share__dialog-content>${this._renderOptions()}</div>`,s=this.shareIconsLayout==="vertical"?" solutions-social-share__layout--vertical":" solutions-social-share__layout--horizontal",t=` calcite-mode-${this.el.closest(S)?"dark":"light"}`,l=e`<div class=${`solutions-social-share__dialog${s}${t}`} ${n(this._dialogContentRef)}>${o}</div>`,r=this.removePopoverOffset?0:6;return this.mode==="popover"?[e`<calcite-popover .label=${this._translations.share?.label??""} reference-element=shareButton placement=bottom-start .scale=${this.scale} overlay-positioning=${this.popoverPositioning??c} offset-distance=${r??c} pointer-disabled=${this.removePopoverOffset??c} ${n(this._popoverRef)}>${l}</calcite-popover>`,this._renderButton()]:[l,e`<calcite-popover .label=${this._translations.share?.label??""} reference-element=copyToClipboard .placement=${this.inlineSuccessPopoverPlacement} .scale=${this.scale} overlay-positioning=fixed ${n(this._copyLinkPopoverRef)}>${this._renderSuccess()}</calcite-popover>`]}_setupAutoCloseListeners(){this.listenOn(document.documentElement,"click",this._autoCloseCallback),this.mode==="popover"&&this._popoverRef.value?(this.listenOn(this._popoverRef.value,"click",this._stopPropagationCallback),this.listenOn(this._popoverRef.value,"calcitePopoverClose",this._resetPopoverCopyState)):this._dialogContentRef.value&&this.listenOn(this._dialogContentRef.value,"click",this._stopPropagationCallback)}_handlePopoverRefKeyDown(o){if(o.code==="Tab"){if(!this._shareListRef.value)return;let s=o.target,t=this._shareListRef.value.children[0],l=this._shareListRef.value.children[this._shareListRef.value.children.length-1];o.shiftKey&&s===t?(o.preventDefault(),l.focus()):!o.shiftKey&&s===l&&(o.preventDefault(),t.focus())}else o.code==="Escape"&&(this._closePopover(),this.shareButtonType==="button"?this._popoverButtonRef.value?.setFocus():this._popoverActionRef.value?.setFocus())}_autoCloseCallback(){this.mode==="popover"?(this._opened=!1,this._popoverRef.value.open=this._opened):(this._copyLinkPopoverRef.value&&(this._copyLinkPopoverRef.value.open=!1),this._inlineCopyLinkOpened=!1)}_stopPropagationCallback(o){o.stopPropagation()}_resetPopoverCopyState(){this.shareButtonType==="button"?this._popoverButtonRef.value?.setFocus():this._popoverActionRef.value?.setFocus(),setTimeout(()=>{this._copied=!1},200)}_renderButton(){let o=this.shareButtonScale!=null?this.shareButtonScale:this.scale;return this.shareButtonType==="button"?e`<calcite-button .appearance=${this.buttonAppearance} class=solutions-social-share__popover-button id=shareButton .kind=${this.shareButtonKind} .label=${this._translations.share?.label} @click=${this._togglePopover.bind(this)} .scale=${o} title=${this._translations.share?.label??c} ${n(this._popoverButtonRef)}>${this.shareButtonText}</calcite-button>`:e`<calcite-action alignment=center .appearance=${this.actionApperance} class=solutions-social-share__popover-button id=shareButton .label=${this._translations.share?.label} @click=${this._togglePopover.bind(this)} .scale=${o} text title=${this._translations.share?.label??c} ${n(this._popoverActionRef)}><div class=solutions-social-share__icon-container><calcite-icon icon=share .scale=${this.popoverButtonIconScale}></calcite-icon></div></calcite-action>`}_renderSuccess(){let o=this._translations.success;return e`<div class=solutions-social-share__success><span class=solutions-social-share__success-header><span class=solutions-social-share__success-icon><calcite-icon icon=check-circle-f .scale=${this.scale}></calcite-icon></span>${o?.label}</span><span class=solutions-social-share__success-message>${this.successMessage||o?.url}</span></div>`}_renderOptions(){let o=this._translations.options,s=document.dir==="rtl"?" solutions-social-share__option-text--rtl":"";return e`<ul class=solutions-social-share__options role=menu ${n(this._shareListRef)}><li id=copyToClipboard @click=${this._handleShareItem.bind(this,"link")} @keydown=${this._handleOptionKeyDown("link")} role=menuitem tabindex=0><span class=solutions-social-share__icon><calcite-icon icon=link .scale=${this.scale}></calcite-icon></span><span class=${`solutions-social-share__option-text${s}`}>${o?.link?.label}</span></li>${this.socialMedia?[e`<li @click=${this._handleShareItem.bind(this,"facebook")} @keydown=${this._handleOptionKeyDown("facebook")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderFacebookIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.facebook?.label}</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"x")} @keydown=${this._handleOptionKeyDown("x")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderXIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>\r\n X</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"linkedIn")} @keydown=${this._handleOptionKeyDown("linkedIn")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderLinkedInIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.linkedIn?.label}</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"bluesky")} @keydown=${this._handleOptionKeyDown("bluesky")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderBlueSkyIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.blueSky?.label}</span></li>`]:null}</ul>`}_handleOptionKeyDown(o){return s=>{let t=s.code;(t==="Space"||t==="Enter"||t==="NumpadEnter")&&this._handleShareItem(o)}}_renderFacebookIcon(){return e`<svg height=100% style=${i({fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2"})} version=1.1 viewBox="0 0 512 512" width=100% xmlns=http://www.w3.org/2000/svg>${h`<g><path d="M512,256c0,-141.385 -114.615,-256 -256,-256c-141.385,0 -256,114.615 -256,256c0,127.777 93.616,233.685 216,252.89l0,-178.89l-65,0l0,-74l65,0l0,-56.4c0,-64.16 38.219,-99.6 96.695,-99.6c28.009,0 57.305,5 57.305,5l0,63l-32.281,0c-31.801,0 -41.719,19.733 -41.719,39.978l0,48.022l71,0l-11.35,74l-59.65,0l0,178.89c122.385,-19.205 216,-125.113 216,-252.89Z" style=${i({fill:"#1877f2",fillRule:"nonzero"})} /><path d="M355.65,330l11.35,-74l-71,0l0,-48.022c0,-20.245 9.917,-39.978 41.719,-39.978l32.281,0l0,-63c0,0 -29.297,-5 -57.305,-5c-58.476,0 -96.695,35.44 -96.695,99.6l0,56.4l-65,0l0,74l65,0l0,178.89c13.033,2.045 26.392,3.11 40,3.11c13.608,0 26.966,-1.065 40,-3.11l0,-178.89l59.65,0Z" style=${i({fill:"#fff",fillRule:"nonzero"})} /></g>`}</svg>`}_renderXIcon(){return e`<svg height=100% width=100% class="solutions-social-share__x-logo" viewBox="0 0 1200 1227" fill=none xmlns=http://www.w3.org/2000/svg>${h`<rect height=400 style=${i({fill:"none"})} width=400 x=56 y=56 /><path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z" fill=currentColor />`}</svg>`}_renderBlueSkyIcon(){return e`<svg height=100% width=100% fill=#0f85fe xmlns=http://www.w3.org/2000/svg viewBox="0 0 512 512">${h`<path d="M111.8 62.2C170.2 105.9 233 194.7 256 242.4c23-47.6 85.8-136.4 144.2-180.2c42.1-31.6 110.3-56 110.3 21.8c0 15.5-8.9 130.5-14.1 149.2C478.2 298 412 314.6 353.1 304.5c102.9 17.5 129.1 75.5 72.5 133.5c-107.4 110.2-154.3-27.6-166.3-62.9l0 0c-1.7-4.9-2.6-7.8-3.3-7.8s-1.6 3-3.3 7.8l0 0c-12 35.3-59 173.1-166.3 62.9c-56.5-58-30.4-116 72.5-133.5C100 314.6 33.8 298 15.7 233.1C10.4 214.4 1.5 99.4 1.5 83.9c0-77.8 68.2-53.4 110.3-21.8z" />`}</svg>`}_renderLinkedInIcon(){return e`<svg height=100% style=${i({fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2"})} version=1.1 viewBox="0 0 512 512" width=100% xmlns=http://www.w3.org/2000/svg>${h`<g id=g5891><path d="M512,64c0,-35.323 -28.677,-64 -64,-64l-384,0c-35.323,0 -64,28.677 -64,64l0,384c0,35.323 28.677,64 64,64l384,0c35.323,0 64,-28.677 64,-64l0,-384Z" id=background style=${i({fill:"#2867b2"})} /><g id=shapes><rect height=257.962 id=rect11 style=${i({fill:"#fff"})} width=85.76 x=61.053 y=178.667 /><path d="M104.512,54.28c-29.341,0 -48.512,19.29 -48.512,44.573c0,24.752 18.588,44.574 47.377,44.574l0.554,0c29.903,0 48.516,-19.822 48.516,-44.574c-0.555,-25.283 -18.611,-44.573 -47.935,-44.573Z" id=path13-0 style=${i({fill:"#fff",fillRule:"nonzero"})} /><path d="M357.278,172.601c-45.49,0 -65.866,25.017 -77.276,42.589l0,-36.523l-85.738,0c1.137,24.197 0,257.961 0,257.961l85.737,0l0,-144.064c0,-7.711 0.554,-15.42 2.827,-20.931c6.188,-15.4 20.305,-31.352 43.993,-31.352c31.012,0 43.436,23.664 43.436,58.327l0,138.02l85.741,0l0,-147.93c0,-79.237 -42.305,-116.097 -98.72,-116.097Z" id=path15 style=${i({fill:"#fff",fillRule:"nonzero"})} /></g></g>`}</svg>`}_togglePopover(o){o.stopPropagation(),this._opened=!this._opened,this._popoverRef.value.open=this._opened}_closePopover(){this._opened=!1,this._popoverRef.value.open=this._opened}async _handleShareItem(o){this._telemetry?.logEvent({category:y.SOLUTION_DETAILS,action:"Share",dimensions:[this.solutionTitle,this.solutionId,this.solutionVersion,w(o)]}),this.shareUrl=await this._generateShareUrl();let s=null,t=navigator?.userAgent?.includes("Chrome")??!1,l=(navigator?.userAgent?.includes("Safari")??!1)&&!t;!l&&this.shortenShareUrl&&(s=await this._shortenUrl(this.shareUrl));let r=s||this.shareUrl;switch(o){case"link":navigator.clipboard.writeText(r),this.mode==="inline"&&(this._copyLinkPopoverRef.value.open=!0,setTimeout(()=>this._copyLinkPopoverRef.value.open=!1,3e3)),this._inlineCopyLinkOpened=!0,this._copied=!0,this.mode==="popover"&&setTimeout(()=>this._closePopover(),2e3);return;case"facebook":case"bluesky":case"x":case"linkedIn":{let p;l&&(p=window.open("","_blank"),this.shortenShareUrl&&(r=await this._shortenUrl(this.shareUrl)||r));let _={url:encodeURI(r)},$=o==="x"?{..._,text:this.shareText}:_,d=k.substitute(P[o],$);this.mode==="popover"&&this._closePopover(),l&&p?(p.location=d,p.focus()):window.open(encodeURI(d),"_blank")}return}}async _shortenUrl(o){let s=(await R(C,{query:{longUrl:o,f:"json"}}))?.data?.data?.url;if(s)return s.replace("http://","https://")}_generateShareUrl(){return this.autoUpdateShareUrl&&(this.shareUrl=window.location.href),this.shareUrl}};g("solution-social-share",u);return u},"intl","request",d)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import f from"./EAV7DUA3.js";import e from"./S6EMQP4I.js";import b from"./P5ERFKR2.js";import a from"./GPP5RTWG.js";import{a as p}from"./
|
|
2
|
+
import f from"./EAV7DUA3.js";import e from"./S6EMQP4I.js";import b from"./P5ERFKR2.js";import a from"./GPP5RTWG.js";import{a as p}from"./TPRPYUVX.js";import{b as l}from"./3LEJ44U2.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{H as o,J as d,L as c,h as s,i as t,r}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,,{b:h},{i:g,t:v}])=>{var x=s`:host{display:block;--instant-apps-interactive-legend-heading-font-size: 1rem;--instant-apps-interactive-legend-heading-font-weight: 500;--instant-apps-interactive-legend-secondary-color: var( --calcite-color-text-1 );--instant-apps-interactive-legend-ui-padding: 15px 10px}:host .instant-apps-interactive-legend__header--compact .esri-widget__heading{font-size:.9rem}:host .esri-widget__heading{overflow:hidden;margin:0;display:inline-block;font-size:var(--calcite-font-size-1);font-weight:var(--instant-apps-interactive-legend-heading-font-weight)}:host header{display:flex;text-align:left;padding:var(--instant-apps-interactive-legend-ui-padding);background-color:var(--instant-apps-interactive-legend-secondary-background-color);color:var(--instant-apps-interactive-legend-secondary-color)}:host header h3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;line-height:normal;color:var(--instant-apps-interactive-legend-secondary-color);margin-bottom:5px}:host header .instant-apps-interactive-legend__heading-text--group-item{-webkit-line-clamp:2;line-clamp:2}:host header span{width:100%;font-size:var(--instant-apps-interactive-legend-total-feature-count-font-size);color:var(--instant-apps-interactive-legend-secondary-color)}:host header .instant-apps-interactive-legend__header-action-container{display:flex;align-items:center}:host .esri-widget__heading header{padding:var(--instant-apps-interactive-legend-ui-padding)}:host .esri-widget--panel{margin:0}:host(.calcite-mode-dark) .instant-apps-interactive-legend__header{background-color:#242424;color:var(--calcite-color-text-1)}:host(.calcite-mode-light) .instant-apps-interactive-legend__header{background-color:#fff;color:var(--calcite-color-text-1)}`,e={label:"esri-legend__service-label",header:"esri-widget__heading",interacitveLegendHeader:"instant-apps-interactive-legend__header",headerActionContainer:"instant-apps-interactive-legend__header-action-container",compact:"instant-apps-interactive-legend__header--compact"},a=class extends o{constructor(){super(...arguments),this._messages=p({name:"instant-apps-interactive-legend"}),this.isChild=!1,this.expanded=!0,this.layerCaptionElementExpandUpdated=r()}static{this.properties={legendvm:0,featureCount:5,activeLayerInfo:0,isChild:5,expanded:5}}static{this.styles=x}toggleExpanded(){return()=>{this.expanded=!this.expanded,this.layerCaptionElementExpandUpdated.emit(this.expanded)}}render(){let m=g(this.activeLayerInfo),{expanded:n}=this,i=n?this._messages?.collapse:this._messages?.expand,f=this.isChild?" instant-apps-interactive-legend__heading-text--group-item":"",_=h.get("compact")?` ${e.compact}`:"";return t`<header class=${`${e.interacitveLegendHeader} ${v(this.el)}${_}`}><calcite-action @click=${this.toggleExpanded()} .icon=${n?"chevron-down":"chevron-up"} appearance=transparent .text=${i??""} .label=${i} scale=s></calcite-action><span><span class=${d(e.headerActionContainer)}><h3 class=${`${e.header} ${e.label}${f}`} title=${this.activeLayerInfo?.title??""??c}>${this.activeLayerInfo?.title}</h3></span>${this.featureCount&&m?t`<instant-apps-interactive-legend-count .activeLayerInfo=${this.activeLayerInfo} show-total .legendvm=${this.legendvm}></instant-apps-interactive-legend-count>`:null}</span></header>`}};l("instant-apps-interactive-legend-layer-element-caption",a);return a},a,b,e,f)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import{b as y}from"./PZ4L77M5.js";import{ka as C,nb as R,nc as M,oa as x,qa as N,sa as $}from"./DD3JC2L3.js";import{a as I}from"./LFIJXE3U.js";import{u as k}from"./2IHQU2FX.js";import{b as O}from"./VU3OQQKP.js";import{F as b,G as w,H as S,J as A,L as h,h as T,i as r,j as _,r as D}from"./46DQNAMV.js";export default $arcgis.t(([])=>{var V="isMobile";var K="config",H=T`calcite-card{height:100%;padding-bottom:var(--calcite-spacing-base)}@media(max-width:400px){calcite-card{width:100%}}calcite-card:hover img{-webkit-filter:brightness(30%);filter:brightness(30%);-webkit-transition:all .1s ease;-moz-transition:all .1s ease;-o-transition:all .1s ease;-ms-transition:all .1s ease;transition:all .1s ease}calcite-card:hover .hover-text{opacity:1;color:#fff}calcite-card:hover{outline:var(--calcite-spacing-base) solid var(--calcite-color-brand);box-sizing:content-box;cursor:pointer}.hover-text{transition:.1s ease;opacity:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);text-align:center;display:flex;flex-direction:row;align-items:center;height:100%;font-size:var(--calcite-spacing-xl)}.card-image-wrap{flex:0 0 auto}.card-image-wrap{width:100%;position:relative;margin-bottom:0;-webkit-box-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.card-image{width:100%;display:block}video,img{max-width:100%;height:auto}img{overflow-clip-margin:content-box;overflow:clip}.width-full{width:100%}.deployed-label-override{--calcite-label-text-color: var(--calcite-color-text-3);--calcite-label-margin-bottom: var(--calcite-spacing-none)}.svg-color{fill:var(--calcite-color-text-3)}.padding-end-1-2{padding-inline-end:var(--calcite-spacing-sm)}.padding-bottom-1-2{padding-bottom:var(--calcite-spacing-sm)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.align-items-center{align-items:center}.font-weight-400,.font-weight-normal{font-weight:400}.font-color-text-2{--calcite-label-text-color: var(--calcite-color-text-2)}.font-line-height{line-height:1.4}.font-size-size--1{font-size:var(--calcite-font-size--1)}.icon-brand-color{--calcite-icon-color: var(--calcite-color-brand)}.header-line-height{--calcite-label-margin-bottom: 0;margin-top:var(--calcite-spacing-sm);margin-bottom:.7rem}.dialog-y-size{--calcite-dialog-size-y: 90% }.dialog-x-size{--calcite-dialog-size-x: 90% }.justify-content-space-between{justify-content:space-between}.panel-bg-color{--calcite-panel-header-background-color: var(--calcite-color-foreground-1);--calcite-panel-background-color: var(--calcite-color-foreground-1)}.cursor-default{cursor:default}`;function z(e){let t="",i="?";return e.forEach(a=>{a.k&&a.v&&(t+=i+a.k+"="+a.v,i="&")}),t}function $e(e){return e?M(e,{}).then(t=>Promise.resolve(!!t)):Promise.resolve(!1)}async function Y(e,t){let i=t,a=await i.getUsername(),s={q:new k().match(e).in("title").and().match(a).in("owner"),filter:"type:Solution",authentication:i},n=(await R(s)).results.map(p=>p.title),{folders:o}=await C(i),d=o.map(p=>p.title),u=[...n,...d].map(p=>p.trim().toLowerCase()),c=e.toLowerCase(),f=u.filter(p=>p===c),F=u.filter(p=>p.startsWith(c));return{conflictingNames:f,similiarNames:F}}async function Re(e,t){return q(e)?{status:!1,type:"empty"}:j(e)?{status:!1,type:"exceed length"}:J(e,"folder")?{status:!1,type:"special character"}:(await Y(e.trim(),t)).conflictingNames.length>0?{status:!1,type:"not unique"}:{status:!0,type:""}}function q(e){return e.length<=0}function j(e){return e.length>ye}function J(e,t){return(t==="item"?/[><~`$^+=|]/u:/[/<>]/u).test(e)}function Me(e){if(e){let t=e.trim();return t?"<div>"+t+"</div>":""}else return""}function Q(e){let t="",i="?";return e.forEach(a=>{a.k&&a.v&&(t+=i+a.k+"="+a.v,i="&")}),t}function Pe(e,t,i,a){let s="";return t?s=a+"/sharing/rest/content/items/"+e+"/info/"+t+Q([{k:"w",v:"400"}]):s=i,s}function Le(e){let t=e?e.replace("https://","").replace("www.",""):"";return t.endsWith("devext.arcgis.com")||t.endsWith("mapsqa.arcgis.com")||t.endsWith("qaext.arcgis.com")?e??"https://www.arcgis.com":"https://www.arcgis.com"}function Ue(e,t,i){return t.some(a=>a.wkid===e?(i=a.defaultExtent,!0):!1),i}function Ge(e,t){return X(t||e)}function Be(e,t="en"){return new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric"}).format(e)}function We(e,t){let i="";return e.some(a=>a.startsWith(t)?(i=a.substring(t.length),!0):!1),i}function X(e){let t=e.replace("www.","");return t.endsWith("devext.arcgis.com")?"dev":t.endsWith("mapsqa.arcgis.com")||t.endsWith("qaext.arcgis.com")?"qa":t==="arcgis.com"||t.endsWith(".arcgis.com")?"prod":"dev"}function Fe(e,t){let i=e?.reduce((a,s)=>(a.indexOf(s.id)<0&&a.push(s.id),a),[])||[];return t?i.sort((a,s)=>t.indexOf(a)-t.indexOf(s)):i}function Ve(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ke(e){return{relevance:"Relevance",title:"Title",new:"New",created:"Date deployed",updated:"Updated",suggested:"Suggested for you"}[e]||e}function He(e){if(!e)return"Unknown error";if(e.message)return e.message;try{let t=JSON.stringify(e);return t&&t!=="{}"?t:e.toString()}catch{return e.toString()}}function ze(e){return e?parseFloat(((Date.now()-e)/1e3).toFixed(2)):0}function m(e,t){(e.key==="Enter"||e.code==="NumpadEnter"||e.key===" ")&&(e.preventDefault(),e.stopPropagation(),t())}async function Z(e,t){let i=await $(e,t);if(!i)throw new Error(`Solution ${e} was not found`);let a=t?.portal.replace("/sharing/rest","")??"https://www.arcgis.com",s=[];if(i.templates[0].item)s=i.templates.map(n=>({id:n.itemId,title:n.item.title,type:n.item.type,typeKeywords:n.item.typeKeywords,dependencies:n.dependencies,snippet:n.item.snippet}));else{let n=i.templates.map(o=>o.type==="Group"?x(o.itemId,t):N(o.itemId,t));s=(await Promise.allSettled(n)).filter(o=>o.status==="fulfilled").map(o=>o.value).map((o,d)=>{let u=typeof o.type>"u"?"group":"item";return{id:o.id,title:o.title,type:o.type??"Group",typeKeywords:o.typeKeywords,dependencies:i.templates[d].dependencies,snippet:o.snippet,url:`${a}/home/${u}.html?id=${o.id}`}})}return s}function Ye(e,t,i){let a=e.templates.map(c=>c.type),s=[];s.push(re),a.indexOf("Group")>=0&&(s.push(P),s.push(U)),a.indexOf("Feature Service")>=0&&s.push(L);let n=a.indexOf("Feed")>-1;n&&s.push(ce);let o=a.indexOf("Big Data Analytic")>-1;o&&s.push(le);let d=a.indexOf("Real Time Analytic")>-1;d&&s.push(ue),(n||o||d)&&s.push(be),a.indexOf("Workflow")>-1&&(s.push(P),s.push(L),s.push(U),s.push(we)),a.indexOf("Geoprocessing Service")>-1&&(s.push(de),i.IsEnterprisePortal&&s.push(he));let u=e.templates.reduce((c,f)=>c.concat(f.item.typeKeywords||[]),[]);return te(s,u,i),ie(s,t),ee(s,e),s}function ee(e,t){t.templates.some(i=>i.type==="Group"&&i.item?.membershipAccess==="collaboration")&&e.push(ne)}function te(e,t,i){let a=G(i),s=ae(i);["Location Tracking View"].some(n=>t.indexOf(n)>-1)&&(!a&&!s?e.push(me):a&&!s?e.push(ge):!a&&s&&e.push(fe))}function ie(e,t){["HubPremium"].some(i=>t.indexOf(i)>-1)&&e.push(pe)}function G(e){return e.PortalUserSubset?.role==="org_admin"&&!e.PortalUserSubset?.roleId}function ae(e){return e.PortalSubset?.locationTrackingEnabled||!1}function qe(e,t){let i={leadingMessages:[],bulletedMessages:[],trailingMessages:[]},a=[l.NOTEBOOK,l.VELOCITY,l.HUBPREMIUM,l.WORKFLOW,l.TRACKINGBASE],s=g(e,t,l.VELOCITY);s&&i.leadingMessages.push(s);let n=g(e,t,l.NOTEBOOK);n&&i.leadingMessages.push(n);let o=g(e,t,l.HUBPREMIUM);o&&i.leadingMessages.push(o);let d=g(e,t,l.WORKFLOW);d&&i.leadingMessages.push(d),t=t.filter(c=>a.indexOf(c)<0),t.forEach(c=>{i.bulletedMessages.push(B(e,c))});let u=g(e,t,l.TRACKINGBASE);return u&&i.trailingMessages.push(u),(i.leadingMessages.length>0||i.trailingMessages.length>0||i.bulletedMessages.length>0)&&i.trailingMessages.push(e.missingPrivilegesPopup.suggestedProblemRemedyMessage),i}function g(e,t,i){return t.filter(a=>a.includes(i)).length>0?B(e,i):""}function B(e,t){let i=e.missingPrivilegesPopup.requiredPrivilegesList,a="";switch(t){case"portal:user:createItem":a=i.createItem;break;case"portal:publisher:publishFeatures":a=i.publishFeatures;break;case"portal:user:createGroup":a=i.createGroup;break;case"portal:user:shareToGroup":a=i.shareToGroup;break;case"portal:user:addExternalMembersToGroup":a=i.addMembers;break;case"portal:publisher:publishFeeds":a=i.publishFeeds;break;case"portal:publisher:publishBigDataAnalytics":a=i.publishBigDataAnalytics;break;case"portal:publisher:publishRealTimeAnalytics":a=i.publishRealTimeAnalytics;break;case"solutions:locationtracking:admin:tracking":a=i.requiresLocationTrackingAndAdmin;break;case"solutions:locationtracking:tracking":a=i.requiresLocationTracking;break;case"solutions:locationtracking:admin":a=i.requiresAdmin;break;case"solutions:hubPremium":a=i.hubPremium;break;case"solutions:workflowManager":a=i.workflowManager;break;case"solutions:velocity":a=i.velocity;break;case"solutions:notebook":a=i.requiresNotebookServer;break;case"portal:publisher:publishServerGPServices":a=i.publishGPServices;break;case"writable:Enterprise":a=i.writableEnterprise;break;case"writable:Online":a=i.writableOnline.replace("{{url}}","https://status.arcgis.com");break}return a}function je(e,t){let i=W(t),a=z([{k:"id",v:e}])||"";return i?`${i}/home/item.html${a}`:""}function Je(e,t,i,a){let s=a||W(i);return s?`${s}/sharing/rest/content/items/${e}/resources/${t}`:""}function W(e){return e?.PortalSubset?.orgUrl||e?.PortalUrl||""}function se(e,t){let i=new URL(e);return i.searchParams.set("token",t),i.toString()}var v=class extends S{constructor(){super(),this.deployedDate="",this.description="",this.diagramKey="",this.heading="",this.itemId="",this.owner="",this.thumbnail="",this.updateAvailable=!1,this.templateInfos=[],this._isDeleteOpen=!1,this._isDiagramOpen=!1,this.isMobile=!1,this.templateInfoGraph=[],this._configureTitlesOpen=!1,this._thumbnailUrl="",this._translations=I({name:"solution-deployed-card",blocking:!0}),this._configContextConsumer=y({context:K,subscribe:!0,callback:async t=>{t&&(this._isOrgAdmin=G(t.authentication),this._thumbnailUrl=`${this.thumbnail}&token=${t.userSession?.token}`)}}),this._deleteDialogRef=b(),this._diagramDialogRef=b(),this._isOrgAdmin=!1,this._isMobileContextConsumer=y({context:V,subscribe:!0,callback:t=>this.isMobile=t}),this.deployedCardSelected=D(),this.listenOn(window,"sessionRefreshed",t=>{this._updateThumbnailToken(t.detail)})}static{this.properties={card:0,deployedDate:1,description:1,diagramKey:1,heading:1,itemId:1,owner:1,thumbnail:1,updateAvailable:5,templateInfos:0,_isDeleteOpen:16,_isDiagramOpen:16,isMobile:16,templateInfoGraph:16,_configureTitlesOpen:16,_thumbnailUrl:16,_translations:16}}static{this.styles=H}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async renderDeleteDialog(){return this._isDeleteOpen=!0,this._renderDeleteDialog(),this._deleteDialogRef.value}async renderDiagramDialog(t){return await this._viewDiagram(t),await this._renderDiagramDialog(),this._diagramDialogRef.value}async getTemplates(){return this._processTemplates(this.card)}async load(){this._isMobileContextConsumer.value&&(this.isMobile=this._isMobileContextConsumer.value)}render(){return r`<calcite-card .label=${this.description} @click=${this._cardSelected} @keydown=${t=>m(t,()=>this._cardSelected())}>${this._getImage()}${this._getHeader()}<p class="font-color-text-2 font-line-height font-size-size--1" slot=description>${this.description}</p><div class="width-full display-flex flex-direction-column" slot=footer-start><div class="padding-bottom-1-2">${this.owner!==""&&this._getOwnerLabel()||""}${this._getDeployedDate()}</div>${this._getConfigureButton()}</div></calcite-card>${this._renderDeleteDialog()}${this._renderDiagramDialog()}${this._renderConfigureTitlesDialog()}`}_getImage(){return r`<div class="card-image-wrap" slot=thumbnail><img alt=${this.heading??h} class="thumbnail card-image" src=${this._thumbnailUrl??h}><div class="hover-text">${this._translations.openSolution}</div></div>`}_getHeader(){return r`<div class="display-flex justify-content-space-between header-line-height" slot=heading><calcite-label layout=inline-space-between scale=l>${this.heading}</calcite-label></div>`}_getOwnerLabel(){return r`<calcite-label class="font-weight-400 padding-end-1-2" layout=inline scale=s>${`${this._translations.owner}:`}<calcite-link class="font-weight-normal" @click=${this._openUserProfile} @keydown=${t=>m(t,()=>this._openUserProfile(t))}>${this.owner}</calcite-link></calcite-label>`}_getDeployedDate(){return r`<div class="display-flex align-items-center"><div class="padding-end-1-2"><svg height=16px viewBox="0 0 32 32" width=16px xmlns=http://www.w3.org/2000/svg>${_`<path class="svg-color" d="M29.963 7.672a1.586 1.586 0 0 0-1.584-1.585h-5.274a.187.187 0 0 1-.188-.187V3.977A2 2 0 0 0 20.825 2h-9.672A2.095 2.095 0 0 0 9.06 4.093V5.9a.187.187 0 0 1-.187.187H3.598a1.586 1.586 0 0 0-1.584 1.585v4.016a.281.281 0 0 0 .281.28H4.9l.014-.013V9.153a.177.177 0 0 1 .177-.177h21.46a.456.456 0 0 1 .449.45v13.742A1.832 1.832 0 0 1 25.168 25h-8.892a.568.568 0 0 1-.534-.373 3.98 3.98 0 0 0-7.6.373H5.657a.757.757 0 0 1-.757-.757v-3.055A.188.188 0 0 0 4.714 21H2.028l-.014.014v4.58a2.35 2.35 0 0 0 2.347 2.346h4.161a3.963 3.963 0 0 0 6.8.256.569.569 0 0 1 .475-.256h12.065a2.102 2.102 0 0 0 2.101-2.101zM21 5.625a.375.375 0 0 1-.375.375h-9.25A.375.375 0 0 1 11 5.625V4.45a.456.456 0 0 1 .45-.45h9.1a.456.456 0 0 1 .45.45zM12 28a2 2 0 1 1 2-2 2 2 0 0 1-2 2z" /><path class="svg-color" d="M13.273 17.994a.57.57 0 0 1 .479.262A3.73 3.73 0 0 0 17 20a3.74 3.74 0 0 0 3.403-2.006h3.41a.188.188 0 0 0 .187-.188v-2.589a.187.187 0 0 0-.188-.188H20.8A3.8 3.8 0 0 0 17 12a4.058 4.058 0 0 0-3.69 2.647.568.568 0 0 1-.537.383H1.093a.094.094 0 0 0-.093.093V17.9a.094.094 0 0 0 .094.094zM17 13.9a2.1 2.1 0 1 1-2.1 2.1 2.1 2.1 0 0 1 2.1-2.1z" />`}</svg></div><calcite-label class="deployed-label-override" scale=s>${this._translations.deployedDate.replace("{{date}}",this.deployedDate)}</calcite-label></div>`}_getConfigureButton(){let t=this._configContextConsumer.value?.userSession?.username,i=this._configContextConsumer.value?.authentication?.CanUpdateSolution,a=this.card?.owner===t||this._isOrgAdmin||i,s=this.card?.owner===t||this._isOrgAdmin,n=a?"display-none":"";return r`<calcite-split-button appearance=outline aria-label=${this._translations.openSolution??h} dropdown-label=${this._translations.moreActions??h} kind=neutral @calciteSplitButtonPrimaryClick=${this._cardSelected} @click=${o=>o.stopPropagation()} @keydown=${o=>o.stopPropagation()} overlay-positioning=fixed primary-text=${this._translations.openSolution??h} width=full><calcite-dropdown-group selection-mode=none>${!this.isMobile&&r`<calcite-dropdown-item icon-start=model @click=${this._viewDiagram} @keydown=${o=>m(o,()=>this._viewDiagram(o))}>${this._translations.viewDiagram}</calcite-dropdown-item>`||""}<calcite-dropdown-item icon-start=file-text @click=${this._viewDocumentation} @keydown=${o=>m(o,()=>this._viewDocumentation(o))}>${this._translations.documentation}</calcite-dropdown-item><calcite-dropdown-item icon-start=information @click=${this._viewItemDetails} @keydown=${o=>m(o,()=>this._viewItemDetails(o))}>${this._translations.viewItemDetails}</calcite-dropdown-item>${!this.isMobile&&a&&r`<calcite-dropdown-item icon-start=edit-attributes id=solution-configure-titles-dropdown @click=${async()=>{this.templateInfos=await this._processTemplates(this.card),this._configureTitlesOpen=!0}} @keydown=${o=>m(o,async()=>{this.templateInfos=await this._processTemplates(this.card),this._configureTitlesOpen=!0})}>${this._translations.renameItems}</calcite-dropdown-item>`||""}${!this.isMobile&&s&&r`<calcite-dropdown-item icon-start=trash @click=${this._deleteSolution} @keydown=${o=>m(o,()=>this._deleteSolution(o))}>${this._translations.deleteSolution}</calcite-dropdown-item>`||""}</calcite-dropdown-group><calcite-tooltip class=${A(n)} overlay-positioning=fixed reference-element=solution-configure-titles-dropdown><span>${this._translations.mustOwnSolution}</span></calcite-tooltip></calcite-split-button>`}_renderDeleteDialog(){return this._isDeleteOpen?r`<solution-delete-dialog .card=${this.card} @solutionDeleteDialogOpen=${t=>{this._isDeleteOpen=t.detail}} .open=${this._isDeleteOpen} source="Card Dropdown" ${w(this._deleteDialogRef)}></solution-delete-dialog>`:""}_renderDiagramDialog(){return this._isDiagramOpen?r`<calcite-dialog class="dialog-y-size dialog-x-size panel-bg-color" .heading=${this._translations.diagramTitle.replace("{{solution}}",this.card?.title??"")} id=${this._translations.diagramTitle.replace("{{solution}}",this.card?.title??"")??h} modal .open=${this._isDiagramOpen} @calciteDialogClose=${()=>{this._isDiagramOpen=!1}} outside-close-disabled scale=m width=l ${w(this._diagramDialogRef)}><solution-item-diagram .diagramKey=${this.diagramKey} .templateInfoGraph=${this.templateInfoGraph} .typeKeywords=${this.card?.typeKeywords}></solution-item-diagram></calcite-dialog>`:""}_renderConfigureTitlesDialog(){return this._configureTitlesOpen?r`<solution-configure-titles .card=${this.card} @solutionConfigureTitlesBeforeClose=${async()=>{this._processTemplates(this.card).then(t=>{this.templateInfos=t}),this._configureTitlesOpen=!1}} @solutionItemsTitlesChanged=${async()=>{this._processTemplates(this.card).then(t=>{this.templateInfos=t})}} .open=${this._configureTitlesOpen} source="Card Dropdown" .templateInfos=${this.templateInfos}></solution-configure-titles>`:""}_cardSelected(){this.deployedCardSelected.emit({card:this.card,cardRef:this.el})}async _viewDiagram(t){t.stopPropagation(),this.card&&(this._telemetry?.logEvent({category:E.DEPLOYMENTS,action:"View Diagram",dimensions:[this.card.title||"",this.card.deployCommonId||"",this.card.deployVersion||"","Card Dropdown"]}),this.templateInfoGraph=await this._processTemplates(this.card),this._isDiagramOpen=!0)}_viewDocumentation(t){t.stopPropagation(),this._telemetry?.logEvent({category:E.DEPLOYMENTS,action:"Open Help",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Card Dropdown"]}),window.open(this.card.learnMoreUrl,"_blank")}_viewItemDetails(t){t.stopPropagation(),this._telemetry?.logEvent({category:E.DEPLOYMENTS,action:"Open Item Details",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Card Dropdown"]}),window.open(this.card.itemUrl,"_blank")}_deleteSolution(t){t.stopPropagation(),this._isDeleteOpen=!0}_openUserProfile(t){t.stopPropagation();let i=this._configContextConsumer.value?.authentication?.PortalSubset?.orgUrl;i&&window.open(`${i}/home/user.html?user=${this.owner}`,"_blank")}async _processTemplates(t){return await Z(t.id,this._configContextConsumer.value.userSession)}_updateThumbnailToken(t){this._thumbnailUrl!==""&&(this._thumbnailUrl=se(this._thumbnailUrl,t))}};O("solution-deployed-card",v);var Qe=500,Xe={AEC:"Architecture, Engineering, and Construction (AEC)",AIRPORTPORTRAIL:"Airports, Ports, and Rails",BUSINESS:"Business",CONSERVATION:"Conservation",DEFENSE:"Defense",FACILITIES:"Facilities",HEALTHANDHUMANSERVICES:"Health and Human Services",PIPELINE:"Pipeline",PUBLICSAFETY:"Public Safety",RENEWABLES:"Renewables",STATEANDLOCALGOVERNMENT:"State and Local Government",TELECOMMUNICATIONS:"Telecommunications",UTILITIES:"Utilities"},Ze={AIRPORT:"Airports",AGRICULTURE:"Agriculture",ASSESSMENTANDTAXATION:"Assessment and Taxation",DISTRICTENERGY:"District Energy",ELECTIONS:"Elections",ELECTRIC:"Electric",EMERGENCYMANAGEMENT:"Emergency Management",ENVIRONMENTANDNATURALRESOURCES:"Environment and Natural Resources",FIRESERVICE:"Fire Service",FISHANDWILDLIFE:"Fish and Wildlife",GAS:"Gas",HEALTHANDHUMANSERVICES:"Health and Human Services",LAWENFORCEMENT:"Law Enforcement",NATURALRESOURCES:"Natural Resources",PARKS:"Parks",PLANNINGANDDEVELOPMENT:"Planning and Development",PROTECTEDAREAS:"Protected Areas",PUBLICWORKS:"Public Works",SEWER:"Sewer",STORMWATER:"Stormwater",TELECOMMUNICATIONS:"Telecommunications",TRANSPORTATION:"Transportation",WATER:"Water Distribution"},l=(e=>(e.HUBPREMIUM="solutions:hubPremium",e.NOTEBOOK="solutions:notebook",e.TRACKINGBASE="solutions:locationtracking",e.TRACKING="solutions:locationtracking:tracking",e.TRACKINGADMIN="solutions:locationtracking:admin",e.TRACKINGADMINANDTRACKING="solutions:locationtracking:admin:tracking",e.VELOCITY="solutions:velocity",e.WORKFLOW="solutions:workflowManager",e))(l||{}),oe=(e=>(e.VELOCITYBIGDATA="portal:publisher:publishBigDataAnalytics",e.VELOCITYFEEDS="portal:publisher:publishFeeds",e.VELOCITYREALTIME="portal:publisher:publishRealTimeAnalytics",e))(oe||{}),et='((typekeywords:Solution,Deployed,"ArcGIS Solution") OR ((typekeywords:Solution,Deployed) AND (created:[1577862000000 TO 1622576880000])))',tt="(typekeywords:Solution,Template)",ne="portal:user:addExternalMembersToGroup",re="portal:user:createItem",P="portal:user:createGroup",le="portal:publisher:publishBigDataAnalytics",L="portal:publisher:publishFeatures",ce="portal:publisher:publishFeeds",de="portal:publisher:publishServerGPServices",ue="portal:publisher:publishRealTimeAnalytics",U="portal:user:shareToGroup",pe="solutions:hubPremium",he="solutions:notebook",me="solutions:locationtracking:admin:tracking",ge="solutions:locationtracking:tracking",fe="solutions:locationtracking:admin",be="solutions:velocity",we="solutions:workflowManager",ye=250,E={SOLUTION_DETAILS:"Solution Details",GLOBAL_NAVIGATION:"Global Nav",ALL_SOLUTIONS:"Solutions",DEPLOYMENTS:"Deployments",ASSISTANT:"Assistant",RESOURCES:"Resources"},it={MINE:"My deployments",ORG:"Organization"};return{a:V,b:K,c:$e,d:Y,e:Re,f:J,g:Me,h:Q,i:Pe,j:Le,k:Ue,l:Ge,m:Be,n:We,o:Fe,p:Ve,q:Ke,r:He,s:ze,t:m,u:Z,v:Ye,w:G,x:qe,y:je,z:Je,A:se,B:v,C:Qe,D:Xe,E:Ze,F:l,G:oe,H:et,I:tt,J:ye,K:E,L:it}},"identity/IdentityManager","identity/OAuthInfo","portal/Portal","intl")
|
|
2
|
+
import{b as y}from"./PZ4L77M5.js";import{ka as C,nb as R,nc as M,oa as x,qa as N,sa as $}from"./JE7L7M3J.js";import{a as I}from"./LFIJXE3U.js";import{u as k}from"./2IHQU2FX.js";import{b as O}from"./VU3OQQKP.js";import{F as b,G as w,H as S,J as A,L as h,h as T,i as r,j as _,r as D}from"./46DQNAMV.js";export default $arcgis.t(([])=>{var V="isMobile";var K="config",H=T`calcite-card{height:100%;padding-bottom:var(--calcite-spacing-base)}@media(max-width:400px){calcite-card{width:100%}}calcite-card:hover img{-webkit-filter:brightness(30%);filter:brightness(30%);-webkit-transition:all .1s ease;-moz-transition:all .1s ease;-o-transition:all .1s ease;-ms-transition:all .1s ease;transition:all .1s ease}calcite-card:hover .hover-text{opacity:1;color:#fff}calcite-card:hover{outline:var(--calcite-spacing-base) solid var(--calcite-color-brand);box-sizing:content-box;cursor:pointer}.hover-text{transition:.1s ease;opacity:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);text-align:center;display:flex;flex-direction:row;align-items:center;height:100%;font-size:var(--calcite-spacing-xl)}.card-image-wrap{flex:0 0 auto}.card-image-wrap{width:100%;position:relative;margin-bottom:0;-webkit-box-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.card-image{width:100%;display:block}video,img{max-width:100%;height:auto}img{overflow-clip-margin:content-box;overflow:clip}.width-full{width:100%}.deployed-label-override{--calcite-label-text-color: var(--calcite-color-text-3);--calcite-label-margin-bottom: var(--calcite-spacing-none)}.svg-color{fill:var(--calcite-color-text-3)}.padding-end-1-2{padding-inline-end:var(--calcite-spacing-sm)}.padding-bottom-1-2{padding-bottom:var(--calcite-spacing-sm)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.align-items-center{align-items:center}.font-weight-400,.font-weight-normal{font-weight:400}.font-color-text-2{--calcite-label-text-color: var(--calcite-color-text-2)}.font-line-height{line-height:1.4}.font-size-size--1{font-size:var(--calcite-font-size--1)}.icon-brand-color{--calcite-icon-color: var(--calcite-color-brand)}.header-line-height{--calcite-label-margin-bottom: 0;margin-top:var(--calcite-spacing-sm);margin-bottom:.7rem}.dialog-y-size{--calcite-dialog-size-y: 90% }.dialog-x-size{--calcite-dialog-size-x: 90% }.justify-content-space-between{justify-content:space-between}.panel-bg-color{--calcite-panel-header-background-color: var(--calcite-color-foreground-1);--calcite-panel-background-color: var(--calcite-color-foreground-1)}.cursor-default{cursor:default}`;function z(e){let t="",i="?";return e.forEach(a=>{a.k&&a.v&&(t+=i+a.k+"="+a.v,i="&")}),t}function $e(e){return e?M(e,{}).then(t=>Promise.resolve(!!t)):Promise.resolve(!1)}async function Y(e,t){let i=t,a=await i.getUsername(),s={q:new k().match(e).in("title").and().match(a).in("owner"),filter:"type:Solution",authentication:i},n=(await R(s)).results.map(p=>p.title),{folders:o}=await C(i),d=o.map(p=>p.title),u=[...n,...d].map(p=>p.trim().toLowerCase()),c=e.toLowerCase(),f=u.filter(p=>p===c),F=u.filter(p=>p.startsWith(c));return{conflictingNames:f,similiarNames:F}}async function Re(e,t){return q(e)?{status:!1,type:"empty"}:j(e)?{status:!1,type:"exceed length"}:J(e,"folder")?{status:!1,type:"special character"}:(await Y(e.trim(),t)).conflictingNames.length>0?{status:!1,type:"not unique"}:{status:!0,type:""}}function q(e){return e.length<=0}function j(e){return e.length>ye}function J(e,t){return(t==="item"?/[><~`$^+=|]/u:/[/<>]/u).test(e)}function Me(e){if(e){let t=e.trim();return t?"<div>"+t+"</div>":""}else return""}function Q(e){let t="",i="?";return e.forEach(a=>{a.k&&a.v&&(t+=i+a.k+"="+a.v,i="&")}),t}function Pe(e,t,i,a){let s="";return t?s=a+"/sharing/rest/content/items/"+e+"/info/"+t+Q([{k:"w",v:"400"}]):s=i,s}function Le(e){let t=e?e.replace("https://","").replace("www.",""):"";return t.endsWith("devext.arcgis.com")||t.endsWith("mapsqa.arcgis.com")||t.endsWith("qaext.arcgis.com")?e??"https://www.arcgis.com":"https://www.arcgis.com"}function Ue(e,t,i){return t.some(a=>a.wkid===e?(i=a.defaultExtent,!0):!1),i}function Ge(e,t){return X(t||e)}function Be(e,t="en"){return new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric"}).format(e)}function We(e,t){let i="";return e.some(a=>a.startsWith(t)?(i=a.substring(t.length),!0):!1),i}function X(e){let t=e.replace("www.","");return t.endsWith("devext.arcgis.com")?"dev":t.endsWith("mapsqa.arcgis.com")||t.endsWith("qaext.arcgis.com")?"qa":t==="arcgis.com"||t.endsWith(".arcgis.com")?"prod":"dev"}function Fe(e,t){let i=e?.reduce((a,s)=>(a.indexOf(s.id)<0&&a.push(s.id),a),[])||[];return t?i.sort((a,s)=>t.indexOf(a)-t.indexOf(s)):i}function Ve(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ke(e){return{relevance:"Relevance",title:"Title",new:"New",created:"Date deployed",updated:"Updated",suggested:"Suggested for you"}[e]||e}function He(e){if(!e)return"Unknown error";if(e.message)return e.message;try{let t=JSON.stringify(e);return t&&t!=="{}"?t:e.toString()}catch{return e.toString()}}function ze(e){return e?parseFloat(((Date.now()-e)/1e3).toFixed(2)):0}function m(e,t){(e.key==="Enter"||e.code==="NumpadEnter"||e.key===" ")&&(e.preventDefault(),e.stopPropagation(),t())}async function Z(e,t){let i=await $(e,t);if(!i)throw new Error(`Solution ${e} was not found`);let a=t?.portal.replace("/sharing/rest","")??"https://www.arcgis.com",s=[];if(i.templates[0].item)s=i.templates.map(n=>({id:n.itemId,title:n.item.title,type:n.item.type,typeKeywords:n.item.typeKeywords,dependencies:n.dependencies,snippet:n.item.snippet}));else{let n=i.templates.map(o=>o.type==="Group"?x(o.itemId,t):N(o.itemId,t));s=(await Promise.allSettled(n)).filter(o=>o.status==="fulfilled").map(o=>o.value).map((o,d)=>{let u=typeof o.type>"u"?"group":"item";return{id:o.id,title:o.title,type:o.type??"Group",typeKeywords:o.typeKeywords,dependencies:i.templates[d].dependencies,snippet:o.snippet,url:`${a}/home/${u}.html?id=${o.id}`}})}return s}function Ye(e,t,i){let a=e.templates.map(c=>c.type),s=[];s.push(re),a.indexOf("Group")>=0&&(s.push(P),s.push(U)),a.indexOf("Feature Service")>=0&&s.push(L);let n=a.indexOf("Feed")>-1;n&&s.push(ce);let o=a.indexOf("Big Data Analytic")>-1;o&&s.push(le);let d=a.indexOf("Real Time Analytic")>-1;d&&s.push(ue),(n||o||d)&&s.push(be),a.indexOf("Workflow")>-1&&(s.push(P),s.push(L),s.push(U),s.push(we)),a.indexOf("Geoprocessing Service")>-1&&(s.push(de),i.IsEnterprisePortal&&s.push(he));let u=e.templates.reduce((c,f)=>c.concat(f.item.typeKeywords||[]),[]);return te(s,u,i),ie(s,t),ee(s,e),s}function ee(e,t){t.templates.some(i=>i.type==="Group"&&i.item?.membershipAccess==="collaboration")&&e.push(ne)}function te(e,t,i){let a=G(i),s=ae(i);["Location Tracking View"].some(n=>t.indexOf(n)>-1)&&(!a&&!s?e.push(me):a&&!s?e.push(ge):!a&&s&&e.push(fe))}function ie(e,t){["HubPremium"].some(i=>t.indexOf(i)>-1)&&e.push(pe)}function G(e){return e.PortalUserSubset?.role==="org_admin"&&!e.PortalUserSubset?.roleId}function ae(e){return e.PortalSubset?.locationTrackingEnabled||!1}function qe(e,t){let i={leadingMessages:[],bulletedMessages:[],trailingMessages:[]},a=[l.NOTEBOOK,l.VELOCITY,l.HUBPREMIUM,l.WORKFLOW,l.TRACKINGBASE],s=g(e,t,l.VELOCITY);s&&i.leadingMessages.push(s);let n=g(e,t,l.NOTEBOOK);n&&i.leadingMessages.push(n);let o=g(e,t,l.HUBPREMIUM);o&&i.leadingMessages.push(o);let d=g(e,t,l.WORKFLOW);d&&i.leadingMessages.push(d),t=t.filter(c=>a.indexOf(c)<0),t.forEach(c=>{i.bulletedMessages.push(B(e,c))});let u=g(e,t,l.TRACKINGBASE);return u&&i.trailingMessages.push(u),(i.leadingMessages.length>0||i.trailingMessages.length>0||i.bulletedMessages.length>0)&&i.trailingMessages.push(e.missingPrivilegesPopup.suggestedProblemRemedyMessage),i}function g(e,t,i){return t.filter(a=>a.includes(i)).length>0?B(e,i):""}function B(e,t){let i=e.missingPrivilegesPopup.requiredPrivilegesList,a="";switch(t){case"portal:user:createItem":a=i.createItem;break;case"portal:publisher:publishFeatures":a=i.publishFeatures;break;case"portal:user:createGroup":a=i.createGroup;break;case"portal:user:shareToGroup":a=i.shareToGroup;break;case"portal:user:addExternalMembersToGroup":a=i.addMembers;break;case"portal:publisher:publishFeeds":a=i.publishFeeds;break;case"portal:publisher:publishBigDataAnalytics":a=i.publishBigDataAnalytics;break;case"portal:publisher:publishRealTimeAnalytics":a=i.publishRealTimeAnalytics;break;case"solutions:locationtracking:admin:tracking":a=i.requiresLocationTrackingAndAdmin;break;case"solutions:locationtracking:tracking":a=i.requiresLocationTracking;break;case"solutions:locationtracking:admin":a=i.requiresAdmin;break;case"solutions:hubPremium":a=i.hubPremium;break;case"solutions:workflowManager":a=i.workflowManager;break;case"solutions:velocity":a=i.velocity;break;case"solutions:notebook":a=i.requiresNotebookServer;break;case"portal:publisher:publishServerGPServices":a=i.publishGPServices;break;case"writable:Enterprise":a=i.writableEnterprise;break;case"writable:Online":a=i.writableOnline.replace("{{url}}","https://status.arcgis.com");break}return a}function je(e,t){let i=W(t),a=z([{k:"id",v:e}])||"";return i?`${i}/home/item.html${a}`:""}function Je(e,t,i,a){let s=a||W(i);return s?`${s}/sharing/rest/content/items/${e}/resources/${t}`:""}function W(e){return e?.PortalSubset?.orgUrl||e?.PortalUrl||""}function se(e,t){let i=new URL(e);return i.searchParams.set("token",t),i.toString()}var v=class extends S{constructor(){super(),this.deployedDate="",this.description="",this.diagramKey="",this.heading="",this.itemId="",this.owner="",this.thumbnail="",this.updateAvailable=!1,this.templateInfos=[],this._isDeleteOpen=!1,this._isDiagramOpen=!1,this.isMobile=!1,this.templateInfoGraph=[],this._configureTitlesOpen=!1,this._thumbnailUrl="",this._translations=I({name:"solution-deployed-card",blocking:!0}),this._configContextConsumer=y({context:K,subscribe:!0,callback:async t=>{t&&(this._isOrgAdmin=G(t.authentication),this._thumbnailUrl=`${this.thumbnail}&token=${t.userSession?.token}`)}}),this._deleteDialogRef=b(),this._diagramDialogRef=b(),this._isOrgAdmin=!1,this._isMobileContextConsumer=y({context:V,subscribe:!0,callback:t=>this.isMobile=t}),this.deployedCardSelected=D(),this.listenOn(window,"sessionRefreshed",t=>{this._updateThumbnailToken(t.detail)})}static{this.properties={card:0,deployedDate:1,description:1,diagramKey:1,heading:1,itemId:1,owner:1,thumbnail:1,updateAvailable:5,templateInfos:0,_isDeleteOpen:16,_isDiagramOpen:16,isMobile:16,templateInfoGraph:16,_configureTitlesOpen:16,_thumbnailUrl:16,_translations:16}}static{this.styles=H}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async renderDeleteDialog(){return this._isDeleteOpen=!0,this._renderDeleteDialog(),this._deleteDialogRef.value}async renderDiagramDialog(t){return await this._viewDiagram(t),await this._renderDiagramDialog(),this._diagramDialogRef.value}async getTemplates(){return this._processTemplates(this.card)}async load(){this._isMobileContextConsumer.value&&(this.isMobile=this._isMobileContextConsumer.value)}render(){return r`<calcite-card .label=${this.description} @click=${this._cardSelected} @keydown=${t=>m(t,()=>this._cardSelected())}>${this._getImage()}${this._getHeader()}<p class="font-color-text-2 font-line-height font-size-size--1" slot=description>${this.description}</p><div class="width-full display-flex flex-direction-column" slot=footer-start><div class="padding-bottom-1-2">${this.owner!==""&&this._getOwnerLabel()||""}${this._getDeployedDate()}</div>${this._getConfigureButton()}</div></calcite-card>${this._renderDeleteDialog()}${this._renderDiagramDialog()}${this._renderConfigureTitlesDialog()}`}_getImage(){return r`<div class="card-image-wrap" slot=thumbnail><img alt=${this.heading??h} class="thumbnail card-image" src=${this._thumbnailUrl??h}><div class="hover-text">${this._translations.openSolution}</div></div>`}_getHeader(){return r`<div class="display-flex justify-content-space-between header-line-height" slot=heading><calcite-label layout=inline-space-between scale=l>${this.heading}</calcite-label></div>`}_getOwnerLabel(){return r`<calcite-label class="font-weight-400 padding-end-1-2" layout=inline scale=s>${`${this._translations.owner}:`}<calcite-link class="font-weight-normal" @click=${this._openUserProfile} @keydown=${t=>m(t,()=>this._openUserProfile(t))}>${this.owner}</calcite-link></calcite-label>`}_getDeployedDate(){return r`<div class="display-flex align-items-center"><div class="padding-end-1-2"><svg height=16px viewBox="0 0 32 32" width=16px xmlns=http://www.w3.org/2000/svg>${_`<path class="svg-color" d="M29.963 7.672a1.586 1.586 0 0 0-1.584-1.585h-5.274a.187.187 0 0 1-.188-.187V3.977A2 2 0 0 0 20.825 2h-9.672A2.095 2.095 0 0 0 9.06 4.093V5.9a.187.187 0 0 1-.187.187H3.598a1.586 1.586 0 0 0-1.584 1.585v4.016a.281.281 0 0 0 .281.28H4.9l.014-.013V9.153a.177.177 0 0 1 .177-.177h21.46a.456.456 0 0 1 .449.45v13.742A1.832 1.832 0 0 1 25.168 25h-8.892a.568.568 0 0 1-.534-.373 3.98 3.98 0 0 0-7.6.373H5.657a.757.757 0 0 1-.757-.757v-3.055A.188.188 0 0 0 4.714 21H2.028l-.014.014v4.58a2.35 2.35 0 0 0 2.347 2.346h4.161a3.963 3.963 0 0 0 6.8.256.569.569 0 0 1 .475-.256h12.065a2.102 2.102 0 0 0 2.101-2.101zM21 5.625a.375.375 0 0 1-.375.375h-9.25A.375.375 0 0 1 11 5.625V4.45a.456.456 0 0 1 .45-.45h9.1a.456.456 0 0 1 .45.45zM12 28a2 2 0 1 1 2-2 2 2 0 0 1-2 2z" /><path class="svg-color" d="M13.273 17.994a.57.57 0 0 1 .479.262A3.73 3.73 0 0 0 17 20a3.74 3.74 0 0 0 3.403-2.006h3.41a.188.188 0 0 0 .187-.188v-2.589a.187.187 0 0 0-.188-.188H20.8A3.8 3.8 0 0 0 17 12a4.058 4.058 0 0 0-3.69 2.647.568.568 0 0 1-.537.383H1.093a.094.094 0 0 0-.093.093V17.9a.094.094 0 0 0 .094.094zM17 13.9a2.1 2.1 0 1 1-2.1 2.1 2.1 2.1 0 0 1 2.1-2.1z" />`}</svg></div><calcite-label class="deployed-label-override" scale=s>${this._translations.deployedDate.replace("{{date}}",this.deployedDate)}</calcite-label></div>`}_getConfigureButton(){let t=this._configContextConsumer.value?.userSession?.username,i=this._configContextConsumer.value?.authentication?.CanUpdateSolution,a=this.card?.owner===t||this._isOrgAdmin||i,s=this.card?.owner===t||this._isOrgAdmin,n=a?"display-none":"";return r`<calcite-split-button appearance=outline aria-label=${this._translations.openSolution??h} dropdown-label=${this._translations.moreActions??h} kind=neutral @calciteSplitButtonPrimaryClick=${this._cardSelected} @click=${o=>o.stopPropagation()} @keydown=${o=>o.stopPropagation()} overlay-positioning=fixed primary-text=${this._translations.openSolution??h} width=full><calcite-dropdown-group selection-mode=none>${!this.isMobile&&r`<calcite-dropdown-item icon-start=model @click=${this._viewDiagram} @keydown=${o=>m(o,()=>this._viewDiagram(o))}>${this._translations.viewDiagram}</calcite-dropdown-item>`||""}<calcite-dropdown-item icon-start=file-text @click=${this._viewDocumentation} @keydown=${o=>m(o,()=>this._viewDocumentation(o))}>${this._translations.documentation}</calcite-dropdown-item><calcite-dropdown-item icon-start=information @click=${this._viewItemDetails} @keydown=${o=>m(o,()=>this._viewItemDetails(o))}>${this._translations.viewItemDetails}</calcite-dropdown-item>${!this.isMobile&&a&&r`<calcite-dropdown-item icon-start=edit-attributes id=solution-configure-titles-dropdown @click=${async()=>{this.templateInfos=await this._processTemplates(this.card),this._configureTitlesOpen=!0}} @keydown=${o=>m(o,async()=>{this.templateInfos=await this._processTemplates(this.card),this._configureTitlesOpen=!0})}>${this._translations.renameItems}</calcite-dropdown-item>`||""}${!this.isMobile&&s&&r`<calcite-dropdown-item icon-start=trash @click=${this._deleteSolution} @keydown=${o=>m(o,()=>this._deleteSolution(o))}>${this._translations.deleteSolution}</calcite-dropdown-item>`||""}</calcite-dropdown-group><calcite-tooltip class=${A(n)} overlay-positioning=fixed reference-element=solution-configure-titles-dropdown><span>${this._translations.mustOwnSolution}</span></calcite-tooltip></calcite-split-button>`}_renderDeleteDialog(){return this._isDeleteOpen?r`<solution-delete-dialog .card=${this.card} @solutionDeleteDialogOpen=${t=>{this._isDeleteOpen=t.detail}} .open=${this._isDeleteOpen} source="Card Dropdown" ${w(this._deleteDialogRef)}></solution-delete-dialog>`:""}_renderDiagramDialog(){return this._isDiagramOpen?r`<calcite-dialog class="dialog-y-size dialog-x-size panel-bg-color" .heading=${this._translations.diagramTitle.replace("{{solution}}",this.card?.title??"")} id=${this._translations.diagramTitle.replace("{{solution}}",this.card?.title??"")??h} modal .open=${this._isDiagramOpen} @calciteDialogClose=${()=>{this._isDiagramOpen=!1}} outside-close-disabled scale=m width=l ${w(this._diagramDialogRef)}><solution-item-diagram .diagramKey=${this.diagramKey} .templateInfoGraph=${this.templateInfoGraph} .typeKeywords=${this.card?.typeKeywords}></solution-item-diagram></calcite-dialog>`:""}_renderConfigureTitlesDialog(){return this._configureTitlesOpen?r`<solution-configure-titles .card=${this.card} @solutionConfigureTitlesBeforeClose=${async()=>{this._processTemplates(this.card).then(t=>{this.templateInfos=t}),this._configureTitlesOpen=!1}} @solutionItemsTitlesChanged=${async()=>{this._processTemplates(this.card).then(t=>{this.templateInfos=t})}} .open=${this._configureTitlesOpen} source="Card Dropdown" .templateInfos=${this.templateInfos}></solution-configure-titles>`:""}_cardSelected(){this.deployedCardSelected.emit({card:this.card,cardRef:this.el})}async _viewDiagram(t){t.stopPropagation(),this.card&&(this._telemetry?.logEvent({category:E.DEPLOYMENTS,action:"View Diagram",dimensions:[this.card.title||"",this.card.deployCommonId||"",this.card.deployVersion||"","Card Dropdown"]}),this.templateInfoGraph=await this._processTemplates(this.card),this._isDiagramOpen=!0)}_viewDocumentation(t){t.stopPropagation(),this._telemetry?.logEvent({category:E.DEPLOYMENTS,action:"Open Help",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Card Dropdown"]}),window.open(this.card.learnMoreUrl,"_blank")}_viewItemDetails(t){t.stopPropagation(),this._telemetry?.logEvent({category:E.DEPLOYMENTS,action:"Open Item Details",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Card Dropdown"]}),window.open(this.card.itemUrl,"_blank")}_deleteSolution(t){t.stopPropagation(),this._isDeleteOpen=!0}_openUserProfile(t){t.stopPropagation();let i=this._configContextConsumer.value?.authentication?.PortalSubset?.orgUrl;i&&window.open(`${i}/home/user.html?user=${this.owner}`,"_blank")}async _processTemplates(t){return await Z(t.id,this._configContextConsumer.value.userSession)}_updateThumbnailToken(t){this._thumbnailUrl!==""&&(this._thumbnailUrl=se(this._thumbnailUrl,t))}};O("solution-deployed-card",v);var Qe=500,Xe={AEC:"Architecture, Engineering, and Construction (AEC)",AIRPORTPORTRAIL:"Airports, Ports, and Rails",BUSINESS:"Business",CONSERVATION:"Conservation",DEFENSE:"Defense",FACILITIES:"Facilities",HEALTHANDHUMANSERVICES:"Health and Human Services",PIPELINE:"Pipeline",PUBLICSAFETY:"Public Safety",RENEWABLES:"Renewables",STATEANDLOCALGOVERNMENT:"State and Local Government",TELECOMMUNICATIONS:"Telecommunications",UTILITIES:"Utilities"},Ze={AIRPORT:"Airports",AGRICULTURE:"Agriculture",ASSESSMENTANDTAXATION:"Assessment and Taxation",DISTRICTENERGY:"District Energy",ELECTIONS:"Elections",ELECTRIC:"Electric",EMERGENCYMANAGEMENT:"Emergency Management",ENVIRONMENTANDNATURALRESOURCES:"Environment and Natural Resources",FIRESERVICE:"Fire Service",FISHANDWILDLIFE:"Fish and Wildlife",GAS:"Gas",HEALTHANDHUMANSERVICES:"Health and Human Services",LAWENFORCEMENT:"Law Enforcement",NATURALRESOURCES:"Natural Resources",PARKS:"Parks",PLANNINGANDDEVELOPMENT:"Planning and Development",PROTECTEDAREAS:"Protected Areas",PUBLICWORKS:"Public Works",SEWER:"Sewer",STORMWATER:"Stormwater",TELECOMMUNICATIONS:"Telecommunications",TRANSPORTATION:"Transportation",WATER:"Water Distribution"},l=(e=>(e.HUBPREMIUM="solutions:hubPremium",e.NOTEBOOK="solutions:notebook",e.TRACKINGBASE="solutions:locationtracking",e.TRACKING="solutions:locationtracking:tracking",e.TRACKINGADMIN="solutions:locationtracking:admin",e.TRACKINGADMINANDTRACKING="solutions:locationtracking:admin:tracking",e.VELOCITY="solutions:velocity",e.WORKFLOW="solutions:workflowManager",e))(l||{}),oe=(e=>(e.VELOCITYBIGDATA="portal:publisher:publishBigDataAnalytics",e.VELOCITYFEEDS="portal:publisher:publishFeeds",e.VELOCITYREALTIME="portal:publisher:publishRealTimeAnalytics",e))(oe||{}),et='((typekeywords:Solution,Deployed,"ArcGIS Solution") OR ((typekeywords:Solution,Deployed) AND (created:[1577862000000 TO 1622576880000])))',tt="(typekeywords:Solution,Template)",ne="portal:user:addExternalMembersToGroup",re="portal:user:createItem",P="portal:user:createGroup",le="portal:publisher:publishBigDataAnalytics",L="portal:publisher:publishFeatures",ce="portal:publisher:publishFeeds",de="portal:publisher:publishServerGPServices",ue="portal:publisher:publishRealTimeAnalytics",U="portal:user:shareToGroup",pe="solutions:hubPremium",he="solutions:notebook",me="solutions:locationtracking:admin:tracking",ge="solutions:locationtracking:tracking",fe="solutions:locationtracking:admin",be="solutions:velocity",we="solutions:workflowManager",ye=250,E={SOLUTION_DETAILS:"Solution Details",GLOBAL_NAVIGATION:"Global Nav",ALL_SOLUTIONS:"Solutions",DEPLOYMENTS:"Deployments",ASSISTANT:"Assistant",RESOURCES:"Resources"},it={MINE:"My deployments",ORG:"Organization"};return{a:V,b:K,c:$e,d:Y,e:Re,f:J,g:Me,h:Q,i:Pe,j:Le,k:Ue,l:Ge,m:Be,n:We,o:Fe,p:Ve,q:Ke,r:He,s:ze,t:m,u:Z,v:Ye,w:G,x:qe,y:je,z:Je,A:se,B:v,C:Qe,D:Xe,E:Ze,F:l,G:oe,H:et,I:tt,J:ye,K:E,L:it}},"identity/IdentityManager","identity/OAuthInfo","portal/Portal","intl")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import d from"./EAV7DUA3.js";import c from"./S6EMQP4I.js";import b from"./P5ERFKR2.js";import a from"./GPP5RTWG.js";import{a as K}from"./4T7P5RXF.js";import{b as Se}from"./Y7OWLSUL.js";import"./GDPFKW75.js";import{G as Ee,H as ze,J as _,K as E,h as ke,i as L,j as ue,l as fe,u as Re}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([Ge,D,ce,it,,,{a:B,b:W},{a:Ie,b:ve,d:Pe,e:Te,f:he,g:Fe,i:Me,o:pe,s:He,t:Z,u:me,v:Ue,w:Be}])=>{(function($,e){typeof exports=="object"&&typeof module<"u"?e(exports):typeof define=="function"&&define.amd?define(["exports"],e):($=typeof globalThis<"u"?globalThis:$||self,e($.maquette={}))})(void 0,(function($){"use strict";var e=function(){var t,i;return{invalidate:function(){i=void 0,t=void 0},result:function(a,l){if(t)for(var p=0;p<a.length;p++)t[p]!==a[p]&&(i=void 0);return i||(i=l(),t=a),i}}},s="http://www.w3.org/",c="".concat(s,"2000/svg"),n="".concat(s,"1999/xlink"),r=[],u=function(t,i){var a={};return Object.keys(t).forEach(function(l){a[l]=t[l]}),i&&Object.keys(i).forEach(function(l){a[l]=i[l]}),a},h=function(t,i){return t.vnodeSelector!==i.vnodeSelector?!1:t.properties&&i.properties?t.properties.key!==i.properties.key?!1:t.properties.bind===i.properties.bind:!t.properties&&!i.properties},w=function(t){if(typeof t!="string")throw new Error("Style values must be strings")},b=function(t,i,a){if(i.vnodeSelector!==""){for(var l=a;l<t.length;l++)if(h(t[l],i))return l}return-1},z=function(t,i,a,l){var p=t[i];if(p.vnodeSelector!==""){var o=p.properties,A=o?o.key===void 0?o.bind:o.key:void 0;if(!A){for(var v=0;v<t.length;v++)if(v!==i){var d=t[v];if(h(d,p))throw Object.assign(new Error("".concat(a.vnodeSelector," had a ").concat(p.vnodeSelector," child ").concat(l==="added"?l:"removed",", but there is now more than one. You must add unique key properties to make them distinguishable.")),{parentNode:a,childNode:p})}}}},k=function(t){if(t.properties){var i=t.properties.enterAnimation;i&&i(t.domNode,t.properties)}},x=[],S=!1,I=function(t){(t.children||[]).forEach(I),t.properties&&t.properties.afterRemoved&&t.properties.afterRemoved.apply(t.properties.bind||t.properties,[t.domNode])},P=function(){S=!1,x.forEach(I),x.length=0},R=function(t){x.push(t),S||(S=!0,typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(P,{timeout:16}):setTimeout(P,16))},F=function(t){var i=t.domNode;if(t.properties){var a=t.properties.exitAnimation;if(a){i.style.pointerEvents="none";var l=function(){i.parentNode&&(i.parentNode.removeChild(i),R(t))};a(i,l,t.properties);return}}i.parentNode&&(i.parentNode.removeChild(i),R(t))},G=["on","afterCreate","afterUpdate","afterRemoved","enterAnimation","exitAnimation","updateAnimation"];function O(t){return!G.includes(t)}var j=function(t,i,a){if(i){for(var l=a.eventHandlerInterceptor,p=Object.keys(i).filter(O),o=p.length,A=0;A<o;A++){var v=p[A],d=i[v];if(v==="className")throw new Error('Property "className" is not supported, use "class".');if(v==="class")re(t,d,!0);else if(v==="classes")for(var f=Object.keys(d),C=f.length,y=0;y<C;y++){var m=f[y];d[m]&&t.classList.add(m)}else if(v==="styles")for(var M=Object.keys(d),T=M.length,y=0;y<T;y++){var J=M[y],ee=d[J];ee&&(w(ee),a.styleApplyer(t,J,ee))}else if(v!=="key"&&d!==null&&d!==void 0){var oe=typeof d;oe==="function"?(v.lastIndexOf("on",0)===0&&l&&(d=l(v,d,t,i)),t[v]=d):a.namespace===c?v==="href"?t.setAttributeNS(n,v,d):t.setAttribute(v,d):oe==="string"&&v!=="value"&&v!=="innerHTML"?t.setAttribute(v,d):t[v]=d}}if(i.on)for(var te=0,de=Object.entries(i.on);te<de.length;te++){var X=de[te],Y=X[0],Q=X[1],ie=typeof Q=="function"?Q:Q.listener;l&&(ie=l(Y,ie,t,i)),ie&&t.addEventListener(Y,ie,typeof Q=="function"?void 0:Q.options)}}},H=function(t,i,a){if(i)for(var l=0,p=i;l<p.length;l++){var o=p[l];q(o,t,void 0,a)}},U=function(t,i,a){H(t,i.children,a),i.text&&(t.textContent=i.text),j(t,i.properties,a),i.properties&&i.properties.afterCreate&&i.properties.afterCreate.apply(i.properties.bind||i.properties,[t,a,i.vnodeSelector,i.properties,i.children])},q=function(t,i,a,l){var p,o,A=0,v=t.vnodeSelector,d=i.ownerDocument;if(v==="")t.domNode?t.domNode.nodeValue=t.text:(o=t.domNode=d.createTextNode(t.text),a!==void 0?i.insertBefore(o,a):i.appendChild(o));else{for(var f=0;f<=v.length;++f){var C=v.charAt(f);if(f===v.length||C==="."||C==="#"){var y=v.charAt(A-1),m=v.slice(A,f);y==="."?o.classList.add(m):y==="#"?o.id=m:(m==="svg"&&(l=u(l,{namespace:c})),l.namespace!==void 0?o=t.domNode=d.createElementNS(l.namespace,m):(o=t.domNode=t.domNode||(!((p=t.properties)===null||p===void 0)&&p.is?d.createElement(m,{is:t.properties.is}):d.createElement(m)),m==="input"&&t.properties&&t.properties.type!==void 0&&o.setAttribute("type",t.properties.type)),a!==void 0?i.insertBefore(o,a):o.parentNode!==i&&i.appendChild(o)),A=f+1}}U(o,t,l)}},N,re=function(t,i,a){i&&i.split(" ").forEach(function(l){l&&t.classList.toggle(l,a)})},Xe=function(t,i,a,l){if(a){for(var p=!1,o=Object.keys(a).filter(O),A=o.length,v=0;v<A;v++){var d=o[v],f=a[d],C=i[d];if(d==="class")C!==f&&(re(t,C,!1),re(t,f,!0));else if(d==="classes")for(var y=t.classList,m=Object.keys(f),M=m.length,T=0;T<M;T++){var J=m[T],ee=!!f[J],oe=!!C[J];ee!==oe&&(p=!0,ee?y.add(J):y.remove(J))}else if(d==="styles")for(var te=Object.keys(f),de=te.length,T=0;T<de;T++){var X=te[T],Y=f[X],Q=C[X];Y!==Q&&(p=!0,Y?(w(Y),l.styleApplyer(t,X,Y)):l.styleApplyer(t,X,""))}else if(!f&&typeof C=="string"&&(f=""),d==="value"){var ie=t[d];ie!==f&&f!==C&&(t[d]=f),f!==C&&(p=!0)}else if(f!==C){var Ce=typeof f;(Ce!=="function"||!l.eventHandlerInterceptor)&&(l.namespace===c?d==="href"?t.setAttributeNS(n,d,f):t.setAttribute(d,f):Ce==="string"&&d!=="innerHTML"?d==="role"&&f===""?t.removeAttribute(d):t.setAttribute(d,f):t[d]!==f&&(t[d]=f),p=!0)}}return p}},Ye=function(t,i,a,l,p){if(a===l)return!1;a=a||r,l=l||r;for(var o=a.length,A=l.length,v=0,d=0,f,C=!1;d<A;){var y=v<o?a[v]:void 0,m=l[d];if(y!==void 0&&h(y,m))C=N(y,m,p,i,a)||C,v++;else{var M=b(a,m,v+1);if(M>=0){for(f=v;f<M;f++)F(a[f]),z(a,f,t,"removed");C=N(a[M],m,p,i,a)||C,v=M+1}else q(m,i,v<o?a[v].domNode:void 0,p),k(m),z(l,d,t,"added")}d++}if(o>v)for(f=v;f<o;f++)F(a[f]),z(a,f,t,"removed");return C};N=function(t,i,a,l,p){var o=t.domNode,A=!1;if(t===i)return!1;var v=!1;if(i.vnodeSelector===""){if(i.text!==t.text){var d=o.ownerDocument.createTextNode(i.text);try{l.replaceChild(d,o)}catch{l.replaceChild(d,l.childNodes[p.indexOf(t)])}return i.domNode=d,A=!0,A}i.domNode=o}else i.vnodeSelector.lastIndexOf("svg",0)===0&&(a=u(a,{namespace:c})),t.text!==i.text&&(v=!0,i.text===void 0?o.removeChild(o.firstChild):o.textContent=i.text),i.domNode=o,v=Ye(i,o,t.children,i.children,a)||v,v=Xe(o,t.properties,i.properties,a)||v,i.properties&&i.properties.afterUpdate&&i.properties.afterUpdate.apply(i.properties.bind||i.properties,[o,a,i.vnodeSelector,i.properties,i.children]);return v&&i.properties&&i.properties.updateAnimation&&i.properties.updateAnimation(o,i.properties,t.properties),A};var se=function(t,i){return{getLastRender:function(){return t},update:function(a){if(t.vnodeSelector!==a.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");var l=t;t=a,N(l,a,i,l.domNode.parentNode,[l])},domNode:t.domNode}},Qe={namespace:void 0,performanceLogger:function(){},eventHandlerInterceptor:void 0,styleApplyer:function(t,i,a){i.charAt(0)==="-"?t.style.setProperty(i,a):t.style[i]=a}},V=function(t){return u(Qe,t)},le={create:function(t,i){return i=V(i),q(t,document.createElement("div"),void 0,i),se(t,i)},append:function(t,i,a){return a=V(a),q(i,t,void 0,a),se(i,a)},insertBefore:function(t,i,a){return a=V(a),q(i,t.parentNode,t,a),se(i,a)},merge:function(t,i,a){return a=V(a),i.domNode=t,U(t,i,a),se(i,a)},replace:function(t,i,a){return a=V(a),q(i,t.parentNode,t,a),t.parentNode.removeChild(t),se(i,a)}},Ze=function(t){return{vnodeSelector:"",properties:void 0,children:void 0,text:t.toString(),domNode:null}},xe=function(t,i,a){for(var l=0,p=i.length;l<p;l++){var o=i[l];Array.isArray(o)?xe(t,o,a):o!=null&&o!==!1&&(typeof o=="string"&&(o=Ze(o)),a.push(o))}};function Oe(t,i,a){if(Array.isArray(i))a=i,i=void 0;else if(i&&(typeof i=="string"||i.vnodeSelector)||a&&(typeof a=="string"||a.vnodeSelector))throw new Error("h called with invalid arguments");var l,p;return a&&a.length===1&&typeof a[0]=="string"?l=a[0]:a&&(p=[],xe(t,a,p),p.length===0&&(p=void 0)),{vnodeSelector:t,properties:i,children:p,text:l===""?void 0:l,domNode:null}}var je=function(t,i,a){var l=[],p=[];return{results:p,map:function(o){for(var A=o.map(t),v=p.slice(),d=0,f=0;f<o.length;f++){var C=o[f],y=A[f];if(y===l[d])p[f]=v[d],a(C,v[d],f),d++;else{for(var m=!1,M=1;M<l.length+1;M++){var T=(d+M)%l.length;if(l[T]===y){p[f]=v[T],a(o[f],v[T],f),d=T+1,m=!0;break}}m||(p[f]=i(C,f))}}p.length=o.length,l=A}}},Ne=function(t,i){for(var a=[];t&&t!==i;)a.push(t),t=t.parentNode;return a},Ve=function(t,i){var a=t;return i.forEach(function(l){a=a&&a.children?a.children.find(function(p){return p.domNode===l}):void 0}),a},et=function(t,i,a){return function(p,o,A,v){return l};function l(p){var o,A;a("domEvent",p);var v=i(),d=Ne(p.currentTarget,v.domNode);d.reverse();var f=Ve(v.getLastRender(),d);t.scheduleRender();var C;if(f){var y=(A=(o=f.properties["on".concat(p.type)])!==null&&o!==void 0?o:f.properties.on[p.type].listener)!==null&&A!==void 0?A:f.properties.on[p.type];C=y.apply(f.properties.bind||this,arguments)}return a("domEventProcessed",p),C}},tt=function(t){var i,a=V(t),l=a.performanceLogger,p=!0,o,A=!1,v=[],d=[],f=function(y,m,M){var T,J=function(){return T};a.eventHandlerInterceptor=et(i,J,l),T=y(m,M(),a),v.push(T),d.push(M)},C=function(){if(o=void 0,!!p){p=!1,l("renderStart",void 0);for(var y=0;y<v.length;y++){var m=d[y]();l("rendered",void 0),v[y].update(m),l("patched",void 0)}l("renderDone",void 0),p=!0}};return i={renderNow:C,scheduleRender:function(){!o&&!A&&(o=requestAnimationFrame(C))},stop:function(){o&&(cancelAnimationFrame(o),o=void 0),A=!0},resume:function(){A=!1,p=!0,i.scheduleRender()},append:function(y,m){f(le.append,y,m)},insertBefore:function(y,m){f(le.insertBefore,y,m)},merge:function(y,m){f(le.merge,y,m)},replace:function(y,m){f(le.replace,y,m)},detach:function(y){for(var m=0;m<d.length;m++)if(d[m]===y)return d.splice(m,1),v.splice(m,1)[0];throw new Error("renderFunction was not found")}},i};$.createCache=e,$.createMapping=je,$.createProjector=tt,$.dom=le,$.h=Oe}));var at=96;function ne($){return $?$/72*at:0}var nt=(void 0)(),Je=10,_e=20,ge=10,Le=20,Ae={univariateAboveAndBelowSymbol:"esri-univariate-above-and-below-ramp__symbol",colorRamp:"esri-legend__color-ramp"};function rt($="vertical"){let e={stroke:"rgb(200, 200, 200)",strokeWidth:"1"};return $==="vertical"?L`<svg height=4 width=10>${ue`<line x1=0 y1=2 x2=10 y2=2 style=${E(e)} />`}</svg>`:L`<svg height=10 width=10>${ue`<line x1=5 y1=0 x2=5 y2=10 style=${E(e)} />`}</svg>`}function st($,e="vertical"){let s=document.createElement("div");return s.style.height=`${_e}px`,s.className=Ae.univariateAboveAndBelowSymbol,$!=null&&(s.style.opacity=$.toString()),nt.append(s,rt.bind(null,e)),s}function Ke($,e,s="vertical",c){$.infos.forEach((n,r)=>{if(c&&r===2)n.preview=st(e,s);else{let{size:u}=n,h=ne(u)+(s==="horizontal"?Le:ge),w=n.preview.tagName.toLowerCase()==="div",b=w?n.preview:document.createElement("div");b&&(b.className=Ae.univariateAboveAndBelowSymbol),s==="horizontal"?b&&(b.style.width=`${h}px`):b&&(b.style.height=`${h}px`),w||b&&b.appendChild(n.preview),n.preview=b}})}function De($,e="classic"){let s=$.infos,c=s[0].size,n=s[s.length-1].size;return e==="classic"?(ne(c)+ge)/2:(ne(c)-ne(n))/2}function ye($,e){if(!$)return null;let s=$.infos.map(n=>n.color),c=Ge.renderColorRampPreviewHTML(e.type==="full"?s:e.type==="above"?s.slice(0,3):s.slice(2,5),{width:e.width,height:e.height,align:e.rampAlignment,effectList:e.effectList});return c.className=Ae.colorRamp,e.opacity!=null&&(c.style.opacity=e.opacity.toString()),c}function lt($,e,s,c="vertical"){let n=0,r=$.infos,u=Math.floor(r.length/2),h=e==="full"||e==="above"?0:u,w=e==="full"||e==="below"?r.length-1:u;for(let b=h;b<=w;b++)if(s&&b===u)n+=c==="horizontal"?Je:_e;else{let z=r[b].size,k=ne(z)+(c==="horizontal"?Le:ge);n+=k}return Math.round(n)}function $e($,e,s,c="vertical"){let n=lt($,e,s,c),r=$.infos,u=Math.floor(r.length/2),h=e==="full"||e==="above"?0:u,w=e==="full"||e==="below"?r.length-1:u,b=e==="full"?r[h].size+r[w].size:e==="above"?r[h].size:r[w].size,z=s?c==="vertical"?_e:Je:0,k=c==="vertical"?ge*(e==="full"?2:1):Le*(e==="full"?2:1);return Math.round(n-(ne(b)/2+z/2+k/2))}function ct($,e,s="vertical"){let c=$.infos,n=c.find(({type:u})=>u==="size-ramp"),r=c.find(({type:u})=>u==="color-ramp");return n&&(n={...n},n.infos=[...n.infos],Ke(n,e,s,!0)),r&&(r={...r},r.infos=[...r.infos]),s==="horizontal"&&(n?.infos.reverse(),r?.infos.reverse()),{sizeRampElement:n,colorRampElement:r}}function ot($,e="vertical"){let s=$.infos,c=s.find(({type:r})=>r==="size-ramp"),n=s.find(({type:r})=>r==="color-ramp");return c&&(c={...c},c.infos=[...c.infos],Ke(c,null,e,!1)),n&&(n={...n},n.infos=[...n.infos]),e==="horizontal"&&(c?.infos.reverse(),n?.infos.reverse()),{sizeRampElement:c,colorRampElement:n}}function dt($,e){return!0}var ft=ke`@layer{instant-apps-interactive-legend-classic{display:block;--instant-apps-interactive-legend-heading-font-size: 1rem;--instant-apps-interactive-legend-heading-font-weight: normal;--instant-apps-interactive-legend-caption-font-weight: normal;--instant-apps-interactive-legend-secondary-color: var( --calcite-color-text-1 );--instant-apps-interactive-legend-field-name-font-size: 1rem;--instant-apps-interactive-legend-total-feature-count-font-size: .875rem;--instant-apps-interactive-legend-info-font-size: .875rem;--instant-apps-interactive-legend-info-item-background--selected: #c7ebff;--instant-apps-interactive-legend-info-item-background--selected--dark: #009af2;--instant-apps-interactive-legend-info-item-background--hover: #e9e9e9;--instant-apps-interactive-legend-info-item-background--hover--dark: #4a4a4a;--instant-apps-interactive-legend-info-item-color--selected: var( --calcite-color-text-2 );--instant-apps-interactive-legend-secondary-background-color: var( --calcite-color-background );--instant-apps-interactive-legend-ui-margin: 20px 15px;--instant-apps-interactive-legend-ui-padding: 20px 15px}instant-apps-interactive-legend-classic .esri-legend__service{padding:0}instant-apps-interactive-legend-classic .esri-legend__layer-body,instant-apps-interactive-legend-classic .esri-legend__layer,instant-apps-interactive-legend-classic .esri-legend__layer-table,instant-apps-interactive-legend-classic .esri-legend__group-layer-child,instant-apps-interactive-legend-classic .esri-legend__layer-child-table{margin:0;overflow:hidden}instant-apps-interactive-legend-classic .esri-legend__layer-caption calcite-action{margin-right:5px}instant-apps-interactive-legend-classic .esri-legend__layer-caption{display:flex;align-items:center;font-size:var(--instant-apps-interactive-legend-field-name-font-size);background-color:var(--instant-apps-interactive-legend-secondary-background-color);color:var(--instant-apps-interactive-legend-secondary-color)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-caption-btn-container{white-space:nowrap}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-caption-btn-container calcite-button{margin:2px}instant-apps-interactive-legend-classic .esri-legend__layer-caption{font-weight:var(--instant-apps-interactive-legend-caption-font-weight)}instant-apps-interactive-legend-classic .esri-legend__layer-cell.esri-legend__layer-cell--info{font-size:var(--instant-apps-interactive-legend-info-font-size);text-align:left}instant-apps-interactive-legend-classic .esri-legend__layer-cell,instant-apps-interactive-legend-classic .esri-legend__layer-row{display:flex;align-items:center}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-body{display:block;margin:var(--instant-apps-interactive-legend-ui-margin)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive.instant-apps-interactive-legend__nested-unique-symbol>.esri-legend__layer-body{margin:0}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-row{display:table-row}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-cell{display:table-cell}instant-apps-interactive-legend-classic .esri-legend__layer-cell--symbols{justify-content:center;width:20%}instant-apps-interactive-legend-classic .esri-legend__layer-cell--info{width:65%}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{margin:1px;background:transparent;border:none;width:100%}instant-apps-interactive-legend-classic .esri-legend__layer-cell--info{color:var(--instant-apps-interactive-legend-secondary-color)}instant-apps-interactive-legend-classic .esri-legend__layer-row,instant-apps-interactive-legend-classic .esri-legend__layer-caption{padding:var(--instant-apps-interactive-legend-ui-padding)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{position:relative}instant-apps-interactive-legend-classic .instant-apps-interactive-legend-element-info--selected{background-color:var(--instant-apps-interactive-legend-info-item-background--selected)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend-element-info--selected{cursor:pointer;background-color:var(--instant-apps-interactive-legend-info-item-background--selected--dark)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend-element-info--selected .esri-legend__layer-cell--info{color:var(--calcite-color-text-inverse)}instant-apps-interactive-legend-classic .hide{display:none}.instant-apps-interactive-legend__compact .esri-legend__layer-row{--instant-apps-interactive-legend-ui-padding: 10px 5px}.instant-apps-interactive-legend__compact .esri-legend__layer-row .esri-legend__layer-cell--info{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;line-clamp:2;line-height:1.3125rem;max-height:2.625rem}@media(min-width:992px){instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{cursor:pointer}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive:hover{background-color:var(--instant-apps-interactive-legend-info-item-background--hover)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive:hover.instant-apps-interactive-legend-element-info--selected{background-color:#e2f2fe}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend__layer-row--interactive:hover{background-color:var(--instant-apps-interactive-legend-info-item-background--hover--dark)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend__layer-row--interactive:hover.instant-apps-interactive-legend-element-info--selected{background-color:#26a9f4}}}`,g={layer:"esri-legend__layer",layerBody:"esri-legend__layer-body",layerRow:"esri-legend__layer-row",layerInfo:"esri-legend__layer-cell esri-legend__layer-cell--info",imageryLayerStretchedImage:"esri-legend__imagery-layer-image--stretched",symbolContainer:"esri-legend__layer-cell esri-legend__layer-cell--symbols",symbol:"esri-legend__symbol",rampContainer:"esri-legend__ramps",sizeRamp:"esri-legend__size-ramp",colorRamp:"esri-legend__color-ramp",opacityRamp:"esri-legend__opacity-ramp",rampLabelsContainer:"esri-legend__ramp-labels",rampLabel:"esri-legend__ramp-label",univariateAboveAndBelowLabel:"esri-univariate-above-and-below-ramp__label",message:"esri-legend__message",interactiveLayerRow:"instant-apps-interactive-legend__layer-row--interactive",infoSelected:"instant-apps-interactive-legend-element-info--selected",compact:"instant-apps-interactive-legend__compact"},vt=24,qe={display:"flex",alignItems:"flex-start"},be={marginLeft:"3px"},ae={display:"table-cell",verticalAlign:"middle"},we=class extends ze{constructor(){super(...arguments),this.calculatingFeatureCount=!1,this.isLoading=!0,this.zoomTo=!1,this.featureCount=!1,this.filterMode={type:"filter"}}static{this.properties={isLoading:16,legendvm:0,zoomTo:5,featureCount:5,filterMode:0,messages:0}}static{this.styles=ft}static{this.shadowRootOptions=Re}connectedCallback(){super.connectedCallback(),!this.handles&&(this.handles=new it)}async load(){new MutationObserver(()=>{this.requestUpdate()}).observe(this.el,{attributes:!0}),W.onChange("data",()=>this.requestUpdate())}willUpdate(e){e.has("filterMode")&&this.legendvm?.view&&(this.hasUpdated||this.filterMode.type!=="filter")&&Ue(this.filterMode,this.legendvm.view)}async loaded(){await this.initLegend()}disconnectedCallback(){super.disconnectedCallback(),this.handles?.removeAll(),this.handles?.destroy(),this.handles=null}async initLegend(){try{await D.whenOnce(()=>this.legendvm?.view);let e=async()=>{try{let s=this.legendvm?.view?.map;await s?.load(),await s?.basemap?.load();let c=s?.allLayers?.map(async h=>await h.load()),n=(await Promise.allSettled(c)).map(h=>h?.status==="fulfilled"&&h?.value?h.value:null).filter(h=>!!h),r=[];n.forEach(h=>{this.legendvm?.view&&r.push(this.legendvm.view.whenLayerView(h))}),await Promise.allSettled(r);let u=await ve(this.legendvm);W.set("data",{...B.data,...u}),this.isLoading=!1,await this.setupWatchersAndListeners()}catch(s){console.error(s),this.isLoading=!1}};this.legendvm?.view?.when(e),this.legendvm?.view?.map?.layers?.on("after-changes",e)}catch{this.isLoading=!1}}getStretchStopLabel(e){let s=this.messages[e.label];return e.label?`${s}: ${typeof e.value=="string"?e.value:ce.formatNumber(e.value,{style:"decimal",notation:e.value.toString().includes("e")?"scientific":"standard"})}`:""}getTitle(e,s){if(!e)return;if(typeof e=="string"||typeof e=="number")return e;if("value"in e||"unit"in e){let r=typeof this.messages?.dotValue=="string"?this.messages.dotValue:"";return ce.substitute(r,e)}if("colorName"in e||"bandName"in e){let{colorName:r,bandName:u}=e,h=this.messages[r],w=typeof this.messages[u]=="string"?this.messages[u]:u;return`${h}: ${w}`}if("showCount"in e)return e.showCount?this.messages.clusterCountTitle:null;let c=null;if(s){let r=e;c=r.ratioPercentTotal?"showRatioPercentTotal":r.ratioPercent?"showRatioPercent":r.ratio?"showRatio":e.normField?"showNormField":e.field?"showField":null}else if(this.isRendererTitle(s)){let r=e;c=r.normField?"showNormField":r.normByPct?"showNormPct":r.field?"showField":null}let n=c==="showField"?"{field}":typeof c=="string"?this.messages[c]:"";return c?ce.substitute(n,{field:e.field,normField:e.normField}):""}isRendererTitle(e){return!e}async setupWatchersAndListeners(){let e=this.legendvm?.view?.map?.allLayers?.filter(n=>n?.type==="feature"),s=[];for(let n of e)this.legendvm?.view&&s.push(this.legendvm?.view?.whenLayerView(n));let c=[];try{c=await Promise.all(s)}catch(n){console.error(n)}for(let n of c){let r=`fLayerViewScale-${n.layer.id}`;!this.handles?.has(r)&&n&&this.handles?.add(n.watch("visibleAtCurrentScale",()=>{this.createDataForLayer(n.layer).catch(u=>{console.error(u)})}),r)}e?.forEach(n=>{let r=`fLayer-${n?.id}`;this.handles?.has(r)||this.handles?.add(D?.watch(()=>n?.visible,()=>{this.createDataForLayer(n).catch(u=>{console.error(u)})}),r)}),this.handles?.add(D.when(()=>this.legendvm,()=>{D.watch(()=>this.legendvm?.view?.updating,()=>{this.calculatingFeatureCount||this.legendvm?.view?.updating&&(this.calculatingFeatureCount=!0,D.when(()=>!this.legendvm?.view?.updating,()=>{pe(this.legendvm,B.data).then(n=>{W.set("data",{...B.data,...n}),this.calculatingFeatureCount=!1}).catch(n=>{console.error(n)})},{once:!0,initial:!0}))},{initial:!0})},{initial:!0,once:!0})),this.handles?.add(D.on(()=>this.legendvm?.activeLayerInfos,"change",n=>{ve(this.legendvm).then(r=>{W.set("data",{...B.data,...r}),this.requestUpdate()}).then(()=>{this.handles?.add(D.on(()=>n.children,"change",()=>{ve(this.legendvm).then(r=>{W.set("data",{...B.data,...r}),this.requestUpdate()}).catch(r=>{console.error(r)})}))}).catch(r=>{console.error(r)})})),this.handles?.add(D.on(()=>this.legendvm?.view?.map?.layers,"after-changes",()=>{pe(this.legendvm,B.data).then(n=>{W.set("data",{...B.data,...n}),this.calculatingFeatureCount=!1}).catch(n=>{console.error(n)})}))}async createDataForLayer(e){let s=W.get("data")?.[e?.id],c=Be(this.legendvm?.activeLayerInfos)?.find(n=>n?.layer?.id===e?.id);if(!s&&c){let n=await Ie(this.legendvm,c);if(me({intLegendLayerData:n,layerId:e?.id}),this.featureCount){let r=await pe(this.legendvm,B.data);W.set("data",{...B.data,...r})}}}applyFilter(e,s,c,n){return async()=>{let r={...B.data?.[s?.id]};n?await he(r,e,c,this.filterMode,n):await he(r,e,c,this.filterMode),me({intLegendLayerData:r,layerId:s?.id})}}render(){let e=this.renderFilteredLayers(),s=W.get("compact")?` ${g.compact}`:"";return this.isLoading?K("interactive-legend-loader",L`<calcite-loader scale=m .label=${this.messages?.loading} .text=${this.messages?.loading}></calcite-loader>`):K("interactive-legend-classic-container",L`<div class=${`${Z(this.el)}${s}`}>${e?.length>0?e:L`<div class=${_(g.message)}>${this.messages?.noLegend}</div>`}</div>`)}renderFilteredLayers(){return(this.legendvm?.activeLayerInfos?.toArray()).map(e=>this.renderLegendForLayer(e)).filter(e=>!!e)}renderLegendForLayer(e,s){if(!e.ready)return null;if(e.children.length){let r=e.children.map(u=>this.renderLegendForLayer(u,!0)).toArray();return L`<instant-apps-interactive-legend-group-legend-element class=${_(Z(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${e} .isChild=${s}><div style=${E({paddingLeft:"20px"})} .id=${`${e?.layer?.id}-legend-layer`} slot=content>${r}</div></instant-apps-interactive-legend-group-legend-element>`}let c=e.legendElements;if(c&&!c.length)return null;let n=c.map((r,u)=>this.renderLegendForElement(r,e.layer,e.effectList,e,u)).filter(r=>!!r);return n.length?L`<instant-apps-interactive-legend-layer-element class=${_(Z(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${e} .isChild=${!!s}><div slot=content .id=${`${e?.layer?.id}-legend-layer`} class=${_(g.layer)}>${n}</div></instant-apps-interactive-legend-layer-element>`:null}renderLegendForElement(e,s,c,n,r,u,h){let w=e.type==="color-ramp",b=e.type==="opacity-ramp",z=e.type==="size-ramp",k=null,x=Me(n,e,r),S=e?.type==="relationship-ramp";if(e.type==="symbol-table"||z){let R=e.infos.map((F,G)=>this.renderLegendForElementInfo(F,s,c,z,e,n,r,G,x,h)).filter(F=>!!F);R.length&&(k=L`<div class=${_(g.layerBody)}>${R}</div>`)}else if(e.type==="color-ramp"||e.type==="opacity-ramp"||e.type==="heatmap-ramp"||e.type==="stretch-ramp"){let R=e;k=this.renderLegendForRamp(R,s.opacity)}else if(S)k=K("relationship-ramp",L`<instant-apps-interactive-legend-relationship class=${_(Z(this.el))} .filterMode=${this.filterMode} .activeLayerInfo=${n} .legendElement=${e}></instant-apps-interactive-legend-relationship>`);else if(e.type==="pie-chart-ramp"){let R=e;k=this.renderPieChartRamp(R)}else if(e.type==="univariate-above-and-below-ramp"){let R=e;k=this.renderUnivariateAboveAndBelowRamp(R,s.opacity,c)}else if(e.type==="univariate-color-size-ramp"){let R=e;k=this.renderUnivariateColorSizeRamp(R,s.opacity,c)}if(!k)return null;let I=e.title,P=null;if(typeof I=="string")P=I;else if(I){let R=I,F=this.getTitle(R,w||b);this.isRendererTitle(w||b)?"title"in I&&(P=`${I.title} (${F})`):P=F}return L`<instant-apps-interactive-legend-legend-element class=${_(Z(this.el))} .activeLayerInfo=${n} .isSizeRamp=${z} .isChild=${!!u} .isColorRamp=${w} .isRelationshipRamp=${S} .isInteractive=${x} .zoomTo=${this.zoomTo} .legendElement=${e} .titleText=${P} .legendvm=${this.legendvm} .legendElementIndex=${r}><div slot=content>${k}</div></instant-apps-interactive-legend-legend-element>`}renderPieChartRamp(e){return L`<div .innerHTML=${`${e.preview?.outerHTML}`}></div>`}renderUnivariateAboveAndBelowRamp(e,s,c){let{sizeRampElement:n,colorRampElement:r}=ct(e,s);if(!n)return null;let u=$e(n,"above",!0),h=$e(n,"below",!0),w=12,b=ye(r,{width:w,height:u,rampAlignment:"vertical",opacity:s,type:"above",effectList:c}),z=ye(r,{width:w,height:h,rampAlignment:"vertical",opacity:s,type:"below",effectList:c}),k=De(n),x=n.infos.map(H=>H.label),S=x.map((H,U)=>U===0?L`<div class=${_(H?b?g.univariateAboveAndBelowLabel:g.rampLabel:"")}>${H}</div>`:U===2?L`<div></div>`:null),I=x.length-1,P=Math.floor(x.length/2),R=x.map((H,U)=>U===P||U===I?L`<div class=${_(H?b?g.univariateAboveAndBelowLabel:g.rampLabel:"")}>${H}</div>`:null),F={display:"table-cell",verticalAlign:"middle"},G={marginTop:`${k}px`},O={height:`${u}px`},j={height:`${h}px`};return K("univariate-above-and-below-ramp-preview",L`<div style=${E(qe)}><div class=${_(g.layerBody)}>${n.infos.map((H,U)=>L`<div class=${`${g.layerRow} ${g.sizeRamp}`}><div class=${_(g.symbol)} style=${E(F)} .innerHTML=${H?.preview?.outerHTML??""??""}></div>${!b&&U%2===0?L`<div class=${_(g.layerInfo)}>${x[U]}</div>`:null}</div>`)}</div>${b?K("color-ramp-preview",L`<div style=${E(G)}><div style=${E(be)}><div style=${E(ae)}><div class=${_(g.rampContainer)}>${b}</div></div><div style=${E(ae)}><div class=${_(g.rampLabelsContainer)} style=${E(O)}>${S}</div></div></div><div style=${E(be)}><div style=${E(ae)}><div class=${_(g.rampContainer)}>${z}</div></div><div style=${E(ae)}><div class=${_(g.rampLabelsContainer)} style=${E(j)}>${R}</div></div></div></div>`):null}</div>`)}renderUnivariateColorSizeRamp(e,s,c){let{sizeRampElement:n,colorRampElement:r}=ot(e);if(!n)return null;let u=De(n),h=12,w=$e(n,"full",!1),b=ye(r,{width:h,height:w,rampAlignment:"vertical",opacity:s,type:"full",effectList:c}),z=n.infos.length-1,k=n.infos.map((P,R)=>R===0||R===z?L`<div class=${_(P.label?r?g.univariateAboveAndBelowLabel:g.rampLabel:"")}>${P.label}</div>`:null),x={display:"table-cell",verticalAlign:"middle"},S={marginTop:`${u}px`},I={height:`${w}px`};return K("univariate-above-and-below-ramp-preview",L`<div style=${E(qe)}><div class=${_(g.layerBody)}>${n.infos.map(P=>L`<div class=${`${g.layerRow} ${g.sizeRamp}`}><div class=${_(g.symbol)} style=${E(x)} .innerHTML=${P?.preview?.outerHTML??""??""}></div></div>`)}</div>${K("color-ramp-preview",L`<div style=${E(S)}><div style=${E(be)}><div style=${E(ae)}><div class=${_(g.rampContainer)}>${b}</div></div><div style=${E(ae)}><div class=${_(g.rampLabelsContainer)} style=${E(I)}>${k}</div></div></div></div>`)}</div>`)}renderLegendForRamp(e,s){let c=e.infos,n=e.type==="opacity-ramp",r=e.type==="heatmap-ramp",u=e.type==="stretch-ramp",h=e.preview,w=n?g.opacityRamp:"";h&&(h.classList.add(g.colorRamp),w&&h.classList.add(w)),s!=null&&h&&(h.style.opacity=s.toString());let b=c.map(x=>{let S;if(r){let I=this.messages[x.label];S=typeof I=="string"?I:x.label}else u?S="value"in x?this.getStretchStopLabel(x):x.label:S=x.label;return L`<div class=${_(x.label?g.rampLabel:"")}>${S}</div>`}),z={width:`${vt}px`},k={height:h?.style?.height};return L`<div class=${_(g.layerRow)}><div class=${_(g.symbolContainer)} style=${E({...z})}><div class=${_(g.rampContainer)} ${Ee(x=>{x?.firstChild&&x?.firstChild?.remove(),x?.appendChild(h)})}></div></div><div class=${_(g.layerInfo)}><div class=${_(g.rampLabelsContainer)} style=${E({...k})}>${b}</div></div></div>`}renderLegendForElementInfo(e,s,c,n,r,u,h,w,b,z){if("infos"in e)return this.renderLegendForElement(e,s,c,u,h,!0,e);let k=null,x=!dt(s,r.type);if("preview"in e){let{outerHTML:q}=e.preview;k=L`<div class=${_(g.symbol)} .innerHTML=${q??""}></div>`}else"src"in e&&(k=this.renderImage(e,s,x));if(!k)return null;let S="",I=n?` ${g.sizeRamp}`:"",P,R=Te(s),F=He(R,z);if(B.data){let q=Pe(R,s,e,F,w),N=F?F?.nestedInfos:R,re=Fe(N);P=R?.categories?.size===1?!q?.selected:re||q?.selected}let G="label"in e?e.label:null,O=F&&!("value"in e)?!1:b,j=W.get("compact"),H=this.getTitle(G,!1)||"",U=F?r.title:G??s?.id;return O?L`<button @click=${this.applyFilter(e,s,w,z)} class=${`${g.layerRow} ${g.interactiveLayerRow}${P?` ${g.infoSelected}`:""}`} title=${(j?`${H}`:void 0)??fe} .ariaPressed=${P?"true":"false"}><div class=${`${g.symbolContainer}${S}${I}`}>${k}</div><div class=${`${g.layerInfo}${S}`}>${this.getTitle(G,!1)||""}</div>${this.featureCount&&!j?L`<instant-apps-interactive-legend-count class=${_(Z(this.el))} .categoryId=${U} .activeLayerInfo=${u} .legendvm=${this.legendvm} .selected=${!!P} .legendElement=${r} .infoIndex=${w}></instant-apps-interactive-legend-count>`:null}</button>`:L`<div class=${_(g.layerRow)}><div class=${`${g.symbolContainer}${S}${I}`}>${k}</div><div class=${`${g.layerInfo}${S}`}>${H}</div></div>`}renderImage(e,s,c){let{label:n,src:r,opacity:u}=e,h=c?` ${g.imageryLayerStretchedImage}`:"",w=c?"":` ${g.symbol}`,b={opacity:`${u??s.opacity}`};return L`<img alt=${this.getTitle(n,!1)??fe} src=${r??fe} width=${e.width} height=${e.height} class=${`$${h}${w}`} style=${E(b)}>`}};Se("instant-apps-interactive-legend-classic",we);return we},"symbols/support/symbolUtils","core/reactiveUtils","intl","core/Handles",a,b,c,d)
|
|
2
|
+
import d from"./EAV7DUA3.js";import c from"./S6EMQP4I.js";import b from"./P5ERFKR2.js";import a from"./GPP5RTWG.js";import{a as K}from"./4T7P5RXF.js";import{b as Se}from"./3LEJ44U2.js";import"./GDPFKW75.js";import{G as Ee,H as ze,J as _,K as E,h as ke,i as L,j as ue,l as fe,u as Re}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([Ge,D,ce,it,,,{a:B,b:W},{a:Ie,b:ve,d:Pe,e:Te,f:he,g:Fe,i:Me,o:pe,s:He,t:Z,u:me,v:Ue,w:Be}])=>{(function($,e){typeof exports=="object"&&typeof module<"u"?e(exports):typeof define=="function"&&define.amd?define(["exports"],e):($=typeof globalThis<"u"?globalThis:$||self,e($.maquette={}))})(void 0,(function($){"use strict";var e=function(){var t,i;return{invalidate:function(){i=void 0,t=void 0},result:function(a,l){if(t)for(var p=0;p<a.length;p++)t[p]!==a[p]&&(i=void 0);return i||(i=l(),t=a),i}}},s="http://www.w3.org/",c="".concat(s,"2000/svg"),n="".concat(s,"1999/xlink"),r=[],u=function(t,i){var a={};return Object.keys(t).forEach(function(l){a[l]=t[l]}),i&&Object.keys(i).forEach(function(l){a[l]=i[l]}),a},h=function(t,i){return t.vnodeSelector!==i.vnodeSelector?!1:t.properties&&i.properties?t.properties.key!==i.properties.key?!1:t.properties.bind===i.properties.bind:!t.properties&&!i.properties},w=function(t){if(typeof t!="string")throw new Error("Style values must be strings")},b=function(t,i,a){if(i.vnodeSelector!==""){for(var l=a;l<t.length;l++)if(h(t[l],i))return l}return-1},z=function(t,i,a,l){var p=t[i];if(p.vnodeSelector!==""){var o=p.properties,A=o?o.key===void 0?o.bind:o.key:void 0;if(!A){for(var v=0;v<t.length;v++)if(v!==i){var d=t[v];if(h(d,p))throw Object.assign(new Error("".concat(a.vnodeSelector," had a ").concat(p.vnodeSelector," child ").concat(l==="added"?l:"removed",", but there is now more than one. You must add unique key properties to make them distinguishable.")),{parentNode:a,childNode:p})}}}},k=function(t){if(t.properties){var i=t.properties.enterAnimation;i&&i(t.domNode,t.properties)}},x=[],S=!1,I=function(t){(t.children||[]).forEach(I),t.properties&&t.properties.afterRemoved&&t.properties.afterRemoved.apply(t.properties.bind||t.properties,[t.domNode])},P=function(){S=!1,x.forEach(I),x.length=0},R=function(t){x.push(t),S||(S=!0,typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(P,{timeout:16}):setTimeout(P,16))},F=function(t){var i=t.domNode;if(t.properties){var a=t.properties.exitAnimation;if(a){i.style.pointerEvents="none";var l=function(){i.parentNode&&(i.parentNode.removeChild(i),R(t))};a(i,l,t.properties);return}}i.parentNode&&(i.parentNode.removeChild(i),R(t))},G=["on","afterCreate","afterUpdate","afterRemoved","enterAnimation","exitAnimation","updateAnimation"];function O(t){return!G.includes(t)}var j=function(t,i,a){if(i){for(var l=a.eventHandlerInterceptor,p=Object.keys(i).filter(O),o=p.length,A=0;A<o;A++){var v=p[A],d=i[v];if(v==="className")throw new Error('Property "className" is not supported, use "class".');if(v==="class")re(t,d,!0);else if(v==="classes")for(var f=Object.keys(d),C=f.length,y=0;y<C;y++){var m=f[y];d[m]&&t.classList.add(m)}else if(v==="styles")for(var M=Object.keys(d),T=M.length,y=0;y<T;y++){var J=M[y],ee=d[J];ee&&(w(ee),a.styleApplyer(t,J,ee))}else if(v!=="key"&&d!==null&&d!==void 0){var oe=typeof d;oe==="function"?(v.lastIndexOf("on",0)===0&&l&&(d=l(v,d,t,i)),t[v]=d):a.namespace===c?v==="href"?t.setAttributeNS(n,v,d):t.setAttribute(v,d):oe==="string"&&v!=="value"&&v!=="innerHTML"?t.setAttribute(v,d):t[v]=d}}if(i.on)for(var te=0,de=Object.entries(i.on);te<de.length;te++){var X=de[te],Y=X[0],Q=X[1],ie=typeof Q=="function"?Q:Q.listener;l&&(ie=l(Y,ie,t,i)),ie&&t.addEventListener(Y,ie,typeof Q=="function"?void 0:Q.options)}}},H=function(t,i,a){if(i)for(var l=0,p=i;l<p.length;l++){var o=p[l];q(o,t,void 0,a)}},U=function(t,i,a){H(t,i.children,a),i.text&&(t.textContent=i.text),j(t,i.properties,a),i.properties&&i.properties.afterCreate&&i.properties.afterCreate.apply(i.properties.bind||i.properties,[t,a,i.vnodeSelector,i.properties,i.children])},q=function(t,i,a,l){var p,o,A=0,v=t.vnodeSelector,d=i.ownerDocument;if(v==="")t.domNode?t.domNode.nodeValue=t.text:(o=t.domNode=d.createTextNode(t.text),a!==void 0?i.insertBefore(o,a):i.appendChild(o));else{for(var f=0;f<=v.length;++f){var C=v.charAt(f);if(f===v.length||C==="."||C==="#"){var y=v.charAt(A-1),m=v.slice(A,f);y==="."?o.classList.add(m):y==="#"?o.id=m:(m==="svg"&&(l=u(l,{namespace:c})),l.namespace!==void 0?o=t.domNode=d.createElementNS(l.namespace,m):(o=t.domNode=t.domNode||(!((p=t.properties)===null||p===void 0)&&p.is?d.createElement(m,{is:t.properties.is}):d.createElement(m)),m==="input"&&t.properties&&t.properties.type!==void 0&&o.setAttribute("type",t.properties.type)),a!==void 0?i.insertBefore(o,a):o.parentNode!==i&&i.appendChild(o)),A=f+1}}U(o,t,l)}},N,re=function(t,i,a){i&&i.split(" ").forEach(function(l){l&&t.classList.toggle(l,a)})},Xe=function(t,i,a,l){if(a){for(var p=!1,o=Object.keys(a).filter(O),A=o.length,v=0;v<A;v++){var d=o[v],f=a[d],C=i[d];if(d==="class")C!==f&&(re(t,C,!1),re(t,f,!0));else if(d==="classes")for(var y=t.classList,m=Object.keys(f),M=m.length,T=0;T<M;T++){var J=m[T],ee=!!f[J],oe=!!C[J];ee!==oe&&(p=!0,ee?y.add(J):y.remove(J))}else if(d==="styles")for(var te=Object.keys(f),de=te.length,T=0;T<de;T++){var X=te[T],Y=f[X],Q=C[X];Y!==Q&&(p=!0,Y?(w(Y),l.styleApplyer(t,X,Y)):l.styleApplyer(t,X,""))}else if(!f&&typeof C=="string"&&(f=""),d==="value"){var ie=t[d];ie!==f&&f!==C&&(t[d]=f),f!==C&&(p=!0)}else if(f!==C){var Ce=typeof f;(Ce!=="function"||!l.eventHandlerInterceptor)&&(l.namespace===c?d==="href"?t.setAttributeNS(n,d,f):t.setAttribute(d,f):Ce==="string"&&d!=="innerHTML"?d==="role"&&f===""?t.removeAttribute(d):t.setAttribute(d,f):t[d]!==f&&(t[d]=f),p=!0)}}return p}},Ye=function(t,i,a,l,p){if(a===l)return!1;a=a||r,l=l||r;for(var o=a.length,A=l.length,v=0,d=0,f,C=!1;d<A;){var y=v<o?a[v]:void 0,m=l[d];if(y!==void 0&&h(y,m))C=N(y,m,p,i,a)||C,v++;else{var M=b(a,m,v+1);if(M>=0){for(f=v;f<M;f++)F(a[f]),z(a,f,t,"removed");C=N(a[M],m,p,i,a)||C,v=M+1}else q(m,i,v<o?a[v].domNode:void 0,p),k(m),z(l,d,t,"added")}d++}if(o>v)for(f=v;f<o;f++)F(a[f]),z(a,f,t,"removed");return C};N=function(t,i,a,l,p){var o=t.domNode,A=!1;if(t===i)return!1;var v=!1;if(i.vnodeSelector===""){if(i.text!==t.text){var d=o.ownerDocument.createTextNode(i.text);try{l.replaceChild(d,o)}catch{l.replaceChild(d,l.childNodes[p.indexOf(t)])}return i.domNode=d,A=!0,A}i.domNode=o}else i.vnodeSelector.lastIndexOf("svg",0)===0&&(a=u(a,{namespace:c})),t.text!==i.text&&(v=!0,i.text===void 0?o.removeChild(o.firstChild):o.textContent=i.text),i.domNode=o,v=Ye(i,o,t.children,i.children,a)||v,v=Xe(o,t.properties,i.properties,a)||v,i.properties&&i.properties.afterUpdate&&i.properties.afterUpdate.apply(i.properties.bind||i.properties,[o,a,i.vnodeSelector,i.properties,i.children]);return v&&i.properties&&i.properties.updateAnimation&&i.properties.updateAnimation(o,i.properties,t.properties),A};var se=function(t,i){return{getLastRender:function(){return t},update:function(a){if(t.vnodeSelector!==a.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");var l=t;t=a,N(l,a,i,l.domNode.parentNode,[l])},domNode:t.domNode}},Qe={namespace:void 0,performanceLogger:function(){},eventHandlerInterceptor:void 0,styleApplyer:function(t,i,a){i.charAt(0)==="-"?t.style.setProperty(i,a):t.style[i]=a}},V=function(t){return u(Qe,t)},le={create:function(t,i){return i=V(i),q(t,document.createElement("div"),void 0,i),se(t,i)},append:function(t,i,a){return a=V(a),q(i,t,void 0,a),se(i,a)},insertBefore:function(t,i,a){return a=V(a),q(i,t.parentNode,t,a),se(i,a)},merge:function(t,i,a){return a=V(a),i.domNode=t,U(t,i,a),se(i,a)},replace:function(t,i,a){return a=V(a),q(i,t.parentNode,t,a),t.parentNode.removeChild(t),se(i,a)}},Ze=function(t){return{vnodeSelector:"",properties:void 0,children:void 0,text:t.toString(),domNode:null}},xe=function(t,i,a){for(var l=0,p=i.length;l<p;l++){var o=i[l];Array.isArray(o)?xe(t,o,a):o!=null&&o!==!1&&(typeof o=="string"&&(o=Ze(o)),a.push(o))}};function Oe(t,i,a){if(Array.isArray(i))a=i,i=void 0;else if(i&&(typeof i=="string"||i.vnodeSelector)||a&&(typeof a=="string"||a.vnodeSelector))throw new Error("h called with invalid arguments");var l,p;return a&&a.length===1&&typeof a[0]=="string"?l=a[0]:a&&(p=[],xe(t,a,p),p.length===0&&(p=void 0)),{vnodeSelector:t,properties:i,children:p,text:l===""?void 0:l,domNode:null}}var je=function(t,i,a){var l=[],p=[];return{results:p,map:function(o){for(var A=o.map(t),v=p.slice(),d=0,f=0;f<o.length;f++){var C=o[f],y=A[f];if(y===l[d])p[f]=v[d],a(C,v[d],f),d++;else{for(var m=!1,M=1;M<l.length+1;M++){var T=(d+M)%l.length;if(l[T]===y){p[f]=v[T],a(o[f],v[T],f),d=T+1,m=!0;break}}m||(p[f]=i(C,f))}}p.length=o.length,l=A}}},Ne=function(t,i){for(var a=[];t&&t!==i;)a.push(t),t=t.parentNode;return a},Ve=function(t,i){var a=t;return i.forEach(function(l){a=a&&a.children?a.children.find(function(p){return p.domNode===l}):void 0}),a},et=function(t,i,a){return function(p,o,A,v){return l};function l(p){var o,A;a("domEvent",p);var v=i(),d=Ne(p.currentTarget,v.domNode);d.reverse();var f=Ve(v.getLastRender(),d);t.scheduleRender();var C;if(f){var y=(A=(o=f.properties["on".concat(p.type)])!==null&&o!==void 0?o:f.properties.on[p.type].listener)!==null&&A!==void 0?A:f.properties.on[p.type];C=y.apply(f.properties.bind||this,arguments)}return a("domEventProcessed",p),C}},tt=function(t){var i,a=V(t),l=a.performanceLogger,p=!0,o,A=!1,v=[],d=[],f=function(y,m,M){var T,J=function(){return T};a.eventHandlerInterceptor=et(i,J,l),T=y(m,M(),a),v.push(T),d.push(M)},C=function(){if(o=void 0,!!p){p=!1,l("renderStart",void 0);for(var y=0;y<v.length;y++){var m=d[y]();l("rendered",void 0),v[y].update(m),l("patched",void 0)}l("renderDone",void 0),p=!0}};return i={renderNow:C,scheduleRender:function(){!o&&!A&&(o=requestAnimationFrame(C))},stop:function(){o&&(cancelAnimationFrame(o),o=void 0),A=!0},resume:function(){A=!1,p=!0,i.scheduleRender()},append:function(y,m){f(le.append,y,m)},insertBefore:function(y,m){f(le.insertBefore,y,m)},merge:function(y,m){f(le.merge,y,m)},replace:function(y,m){f(le.replace,y,m)},detach:function(y){for(var m=0;m<d.length;m++)if(d[m]===y)return d.splice(m,1),v.splice(m,1)[0];throw new Error("renderFunction was not found")}},i};$.createCache=e,$.createMapping=je,$.createProjector=tt,$.dom=le,$.h=Oe}));var at=96;function ne($){return $?$/72*at:0}var nt=(void 0)(),Je=10,_e=20,ge=10,Le=20,Ae={univariateAboveAndBelowSymbol:"esri-univariate-above-and-below-ramp__symbol",colorRamp:"esri-legend__color-ramp"};function rt($="vertical"){let e={stroke:"rgb(200, 200, 200)",strokeWidth:"1"};return $==="vertical"?L`<svg height=4 width=10>${ue`<line x1=0 y1=2 x2=10 y2=2 style=${E(e)} />`}</svg>`:L`<svg height=10 width=10>${ue`<line x1=5 y1=0 x2=5 y2=10 style=${E(e)} />`}</svg>`}function st($,e="vertical"){let s=document.createElement("div");return s.style.height=`${_e}px`,s.className=Ae.univariateAboveAndBelowSymbol,$!=null&&(s.style.opacity=$.toString()),nt.append(s,rt.bind(null,e)),s}function Ke($,e,s="vertical",c){$.infos.forEach((n,r)=>{if(c&&r===2)n.preview=st(e,s);else{let{size:u}=n,h=ne(u)+(s==="horizontal"?Le:ge),w=n.preview.tagName.toLowerCase()==="div",b=w?n.preview:document.createElement("div");b&&(b.className=Ae.univariateAboveAndBelowSymbol),s==="horizontal"?b&&(b.style.width=`${h}px`):b&&(b.style.height=`${h}px`),w||b&&b.appendChild(n.preview),n.preview=b}})}function De($,e="classic"){let s=$.infos,c=s[0].size,n=s[s.length-1].size;return e==="classic"?(ne(c)+ge)/2:(ne(c)-ne(n))/2}function ye($,e){if(!$)return null;let s=$.infos.map(n=>n.color),c=Ge.renderColorRampPreviewHTML(e.type==="full"?s:e.type==="above"?s.slice(0,3):s.slice(2,5),{width:e.width,height:e.height,align:e.rampAlignment,effectList:e.effectList});return c.className=Ae.colorRamp,e.opacity!=null&&(c.style.opacity=e.opacity.toString()),c}function lt($,e,s,c="vertical"){let n=0,r=$.infos,u=Math.floor(r.length/2),h=e==="full"||e==="above"?0:u,w=e==="full"||e==="below"?r.length-1:u;for(let b=h;b<=w;b++)if(s&&b===u)n+=c==="horizontal"?Je:_e;else{let z=r[b].size,k=ne(z)+(c==="horizontal"?Le:ge);n+=k}return Math.round(n)}function $e($,e,s,c="vertical"){let n=lt($,e,s,c),r=$.infos,u=Math.floor(r.length/2),h=e==="full"||e==="above"?0:u,w=e==="full"||e==="below"?r.length-1:u,b=e==="full"?r[h].size+r[w].size:e==="above"?r[h].size:r[w].size,z=s?c==="vertical"?_e:Je:0,k=c==="vertical"?ge*(e==="full"?2:1):Le*(e==="full"?2:1);return Math.round(n-(ne(b)/2+z/2+k/2))}function ct($,e,s="vertical"){let c=$.infos,n=c.find(({type:u})=>u==="size-ramp"),r=c.find(({type:u})=>u==="color-ramp");return n&&(n={...n},n.infos=[...n.infos],Ke(n,e,s,!0)),r&&(r={...r},r.infos=[...r.infos]),s==="horizontal"&&(n?.infos.reverse(),r?.infos.reverse()),{sizeRampElement:n,colorRampElement:r}}function ot($,e="vertical"){let s=$.infos,c=s.find(({type:r})=>r==="size-ramp"),n=s.find(({type:r})=>r==="color-ramp");return c&&(c={...c},c.infos=[...c.infos],Ke(c,null,e,!1)),n&&(n={...n},n.infos=[...n.infos]),e==="horizontal"&&(c?.infos.reverse(),n?.infos.reverse()),{sizeRampElement:c,colorRampElement:n}}function dt($,e){return!0}var ft=ke`@layer{instant-apps-interactive-legend-classic{display:block;--instant-apps-interactive-legend-heading-font-size: 1rem;--instant-apps-interactive-legend-heading-font-weight: normal;--instant-apps-interactive-legend-caption-font-weight: normal;--instant-apps-interactive-legend-secondary-color: var( --calcite-color-text-1 );--instant-apps-interactive-legend-field-name-font-size: 1rem;--instant-apps-interactive-legend-total-feature-count-font-size: .875rem;--instant-apps-interactive-legend-info-font-size: .875rem;--instant-apps-interactive-legend-info-item-background--selected: #c7ebff;--instant-apps-interactive-legend-info-item-background--selected--dark: #009af2;--instant-apps-interactive-legend-info-item-background--hover: #e9e9e9;--instant-apps-interactive-legend-info-item-background--hover--dark: #4a4a4a;--instant-apps-interactive-legend-info-item-color--selected: var( --calcite-color-text-2 );--instant-apps-interactive-legend-secondary-background-color: var( --calcite-color-background );--instant-apps-interactive-legend-ui-margin: 20px 15px;--instant-apps-interactive-legend-ui-padding: 20px 15px}instant-apps-interactive-legend-classic .esri-legend__service{padding:0}instant-apps-interactive-legend-classic .esri-legend__layer-body,instant-apps-interactive-legend-classic .esri-legend__layer,instant-apps-interactive-legend-classic .esri-legend__layer-table,instant-apps-interactive-legend-classic .esri-legend__group-layer-child,instant-apps-interactive-legend-classic .esri-legend__layer-child-table{margin:0;overflow:hidden}instant-apps-interactive-legend-classic .esri-legend__layer-caption calcite-action{margin-right:5px}instant-apps-interactive-legend-classic .esri-legend__layer-caption{display:flex;align-items:center;font-size:var(--instant-apps-interactive-legend-field-name-font-size);background-color:var(--instant-apps-interactive-legend-secondary-background-color);color:var(--instant-apps-interactive-legend-secondary-color)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-caption-btn-container{white-space:nowrap}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-caption-btn-container calcite-button{margin:2px}instant-apps-interactive-legend-classic .esri-legend__layer-caption{font-weight:var(--instant-apps-interactive-legend-caption-font-weight)}instant-apps-interactive-legend-classic .esri-legend__layer-cell.esri-legend__layer-cell--info{font-size:var(--instant-apps-interactive-legend-info-font-size);text-align:left}instant-apps-interactive-legend-classic .esri-legend__layer-cell,instant-apps-interactive-legend-classic .esri-legend__layer-row{display:flex;align-items:center}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-body{display:block;margin:var(--instant-apps-interactive-legend-ui-margin)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive.instant-apps-interactive-legend__nested-unique-symbol>.esri-legend__layer-body{margin:0}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-row{display:table-row}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-cell{display:table-cell}instant-apps-interactive-legend-classic .esri-legend__layer-cell--symbols{justify-content:center;width:20%}instant-apps-interactive-legend-classic .esri-legend__layer-cell--info{width:65%}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{margin:1px;background:transparent;border:none;width:100%}instant-apps-interactive-legend-classic .esri-legend__layer-cell--info{color:var(--instant-apps-interactive-legend-secondary-color)}instant-apps-interactive-legend-classic .esri-legend__layer-row,instant-apps-interactive-legend-classic .esri-legend__layer-caption{padding:var(--instant-apps-interactive-legend-ui-padding)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{position:relative}instant-apps-interactive-legend-classic .instant-apps-interactive-legend-element-info--selected{background-color:var(--instant-apps-interactive-legend-info-item-background--selected)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend-element-info--selected{cursor:pointer;background-color:var(--instant-apps-interactive-legend-info-item-background--selected--dark)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend-element-info--selected .esri-legend__layer-cell--info{color:var(--calcite-color-text-inverse)}instant-apps-interactive-legend-classic .hide{display:none}.instant-apps-interactive-legend__compact .esri-legend__layer-row{--instant-apps-interactive-legend-ui-padding: 10px 5px}.instant-apps-interactive-legend__compact .esri-legend__layer-row .esri-legend__layer-cell--info{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;line-clamp:2;line-height:1.3125rem;max-height:2.625rem}@media(min-width:992px){instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{cursor:pointer}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive:hover{background-color:var(--instant-apps-interactive-legend-info-item-background--hover)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive:hover.instant-apps-interactive-legend-element-info--selected{background-color:#e2f2fe}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend__layer-row--interactive:hover{background-color:var(--instant-apps-interactive-legend-info-item-background--hover--dark)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend__layer-row--interactive:hover.instant-apps-interactive-legend-element-info--selected{background-color:#26a9f4}}}`,g={layer:"esri-legend__layer",layerBody:"esri-legend__layer-body",layerRow:"esri-legend__layer-row",layerInfo:"esri-legend__layer-cell esri-legend__layer-cell--info",imageryLayerStretchedImage:"esri-legend__imagery-layer-image--stretched",symbolContainer:"esri-legend__layer-cell esri-legend__layer-cell--symbols",symbol:"esri-legend__symbol",rampContainer:"esri-legend__ramps",sizeRamp:"esri-legend__size-ramp",colorRamp:"esri-legend__color-ramp",opacityRamp:"esri-legend__opacity-ramp",rampLabelsContainer:"esri-legend__ramp-labels",rampLabel:"esri-legend__ramp-label",univariateAboveAndBelowLabel:"esri-univariate-above-and-below-ramp__label",message:"esri-legend__message",interactiveLayerRow:"instant-apps-interactive-legend__layer-row--interactive",infoSelected:"instant-apps-interactive-legend-element-info--selected",compact:"instant-apps-interactive-legend__compact"},vt=24,qe={display:"flex",alignItems:"flex-start"},be={marginLeft:"3px"},ae={display:"table-cell",verticalAlign:"middle"},we=class extends ze{constructor(){super(...arguments),this.calculatingFeatureCount=!1,this.isLoading=!0,this.zoomTo=!1,this.featureCount=!1,this.filterMode={type:"filter"}}static{this.properties={isLoading:16,legendvm:0,zoomTo:5,featureCount:5,filterMode:0,messages:0}}static{this.styles=ft}static{this.shadowRootOptions=Re}connectedCallback(){super.connectedCallback(),!this.handles&&(this.handles=new it)}async load(){new MutationObserver(()=>{this.requestUpdate()}).observe(this.el,{attributes:!0}),W.onChange("data",()=>this.requestUpdate())}willUpdate(e){e.has("filterMode")&&this.legendvm?.view&&(this.hasUpdated||this.filterMode.type!=="filter")&&Ue(this.filterMode,this.legendvm.view)}async loaded(){await this.initLegend()}disconnectedCallback(){super.disconnectedCallback(),this.handles?.removeAll(),this.handles?.destroy(),this.handles=null}async initLegend(){try{await D.whenOnce(()=>this.legendvm?.view);let e=async()=>{try{let s=this.legendvm?.view?.map;await s?.load(),await s?.basemap?.load();let c=s?.allLayers?.map(async h=>await h.load()),n=(await Promise.allSettled(c)).map(h=>h?.status==="fulfilled"&&h?.value?h.value:null).filter(h=>!!h),r=[];n.forEach(h=>{this.legendvm?.view&&r.push(this.legendvm.view.whenLayerView(h))}),await Promise.allSettled(r);let u=await ve(this.legendvm);W.set("data",{...B.data,...u}),this.isLoading=!1,await this.setupWatchersAndListeners()}catch(s){console.error(s),this.isLoading=!1}};this.legendvm?.view?.when(e),this.legendvm?.view?.map?.layers?.on("after-changes",e)}catch{this.isLoading=!1}}getStretchStopLabel(e){let s=this.messages[e.label];return e.label?`${s}: ${typeof e.value=="string"?e.value:ce.formatNumber(e.value,{style:"decimal",notation:e.value.toString().includes("e")?"scientific":"standard"})}`:""}getTitle(e,s){if(!e)return;if(typeof e=="string"||typeof e=="number")return e;if("value"in e||"unit"in e){let r=typeof this.messages?.dotValue=="string"?this.messages.dotValue:"";return ce.substitute(r,e)}if("colorName"in e||"bandName"in e){let{colorName:r,bandName:u}=e,h=this.messages[r],w=typeof this.messages[u]=="string"?this.messages[u]:u;return`${h}: ${w}`}if("showCount"in e)return e.showCount?this.messages.clusterCountTitle:null;let c=null;if(s){let r=e;c=r.ratioPercentTotal?"showRatioPercentTotal":r.ratioPercent?"showRatioPercent":r.ratio?"showRatio":e.normField?"showNormField":e.field?"showField":null}else if(this.isRendererTitle(s)){let r=e;c=r.normField?"showNormField":r.normByPct?"showNormPct":r.field?"showField":null}let n=c==="showField"?"{field}":typeof c=="string"?this.messages[c]:"";return c?ce.substitute(n,{field:e.field,normField:e.normField}):""}isRendererTitle(e){return!e}async setupWatchersAndListeners(){let e=this.legendvm?.view?.map?.allLayers?.filter(n=>n?.type==="feature"),s=[];for(let n of e)this.legendvm?.view&&s.push(this.legendvm?.view?.whenLayerView(n));let c=[];try{c=await Promise.all(s)}catch(n){console.error(n)}for(let n of c){let r=`fLayerViewScale-${n.layer.id}`;!this.handles?.has(r)&&n&&this.handles?.add(n.watch("visibleAtCurrentScale",()=>{this.createDataForLayer(n.layer).catch(u=>{console.error(u)})}),r)}e?.forEach(n=>{let r=`fLayer-${n?.id}`;this.handles?.has(r)||this.handles?.add(D?.watch(()=>n?.visible,()=>{this.createDataForLayer(n).catch(u=>{console.error(u)})}),r)}),this.handles?.add(D.when(()=>this.legendvm,()=>{D.watch(()=>this.legendvm?.view?.updating,()=>{this.calculatingFeatureCount||this.legendvm?.view?.updating&&(this.calculatingFeatureCount=!0,D.when(()=>!this.legendvm?.view?.updating,()=>{pe(this.legendvm,B.data).then(n=>{W.set("data",{...B.data,...n}),this.calculatingFeatureCount=!1}).catch(n=>{console.error(n)})},{once:!0,initial:!0}))},{initial:!0})},{initial:!0,once:!0})),this.handles?.add(D.on(()=>this.legendvm?.activeLayerInfos,"change",n=>{ve(this.legendvm).then(r=>{W.set("data",{...B.data,...r}),this.requestUpdate()}).then(()=>{this.handles?.add(D.on(()=>n.children,"change",()=>{ve(this.legendvm).then(r=>{W.set("data",{...B.data,...r}),this.requestUpdate()}).catch(r=>{console.error(r)})}))}).catch(r=>{console.error(r)})})),this.handles?.add(D.on(()=>this.legendvm?.view?.map?.layers,"after-changes",()=>{pe(this.legendvm,B.data).then(n=>{W.set("data",{...B.data,...n}),this.calculatingFeatureCount=!1}).catch(n=>{console.error(n)})}))}async createDataForLayer(e){let s=W.get("data")?.[e?.id],c=Be(this.legendvm?.activeLayerInfos)?.find(n=>n?.layer?.id===e?.id);if(!s&&c){let n=await Ie(this.legendvm,c);if(me({intLegendLayerData:n,layerId:e?.id}),this.featureCount){let r=await pe(this.legendvm,B.data);W.set("data",{...B.data,...r})}}}applyFilter(e,s,c,n){return async()=>{let r={...B.data?.[s?.id]};n?await he(r,e,c,this.filterMode,n):await he(r,e,c,this.filterMode),me({intLegendLayerData:r,layerId:s?.id})}}render(){let e=this.renderFilteredLayers(),s=W.get("compact")?` ${g.compact}`:"";return this.isLoading?K("interactive-legend-loader",L`<calcite-loader scale=m .label=${this.messages?.loading} .text=${this.messages?.loading}></calcite-loader>`):K("interactive-legend-classic-container",L`<div class=${`${Z(this.el)}${s}`}>${e?.length>0?e:L`<div class=${_(g.message)}>${this.messages?.noLegend}</div>`}</div>`)}renderFilteredLayers(){return(this.legendvm?.activeLayerInfos?.toArray()).map(e=>this.renderLegendForLayer(e)).filter(e=>!!e)}renderLegendForLayer(e,s){if(!e.ready)return null;if(e.children.length){let r=e.children.map(u=>this.renderLegendForLayer(u,!0)).toArray();return L`<instant-apps-interactive-legend-group-legend-element class=${_(Z(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${e} .isChild=${s}><div style=${E({paddingLeft:"20px"})} .id=${`${e?.layer?.id}-legend-layer`} slot=content>${r}</div></instant-apps-interactive-legend-group-legend-element>`}let c=e.legendElements;if(c&&!c.length)return null;let n=c.map((r,u)=>this.renderLegendForElement(r,e.layer,e.effectList,e,u)).filter(r=>!!r);return n.length?L`<instant-apps-interactive-legend-layer-element class=${_(Z(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${e} .isChild=${!!s}><div slot=content .id=${`${e?.layer?.id}-legend-layer`} class=${_(g.layer)}>${n}</div></instant-apps-interactive-legend-layer-element>`:null}renderLegendForElement(e,s,c,n,r,u,h){let w=e.type==="color-ramp",b=e.type==="opacity-ramp",z=e.type==="size-ramp",k=null,x=Me(n,e,r),S=e?.type==="relationship-ramp";if(e.type==="symbol-table"||z){let R=e.infos.map((F,G)=>this.renderLegendForElementInfo(F,s,c,z,e,n,r,G,x,h)).filter(F=>!!F);R.length&&(k=L`<div class=${_(g.layerBody)}>${R}</div>`)}else if(e.type==="color-ramp"||e.type==="opacity-ramp"||e.type==="heatmap-ramp"||e.type==="stretch-ramp"){let R=e;k=this.renderLegendForRamp(R,s.opacity)}else if(S)k=K("relationship-ramp",L`<instant-apps-interactive-legend-relationship class=${_(Z(this.el))} .filterMode=${this.filterMode} .activeLayerInfo=${n} .legendElement=${e}></instant-apps-interactive-legend-relationship>`);else if(e.type==="pie-chart-ramp"){let R=e;k=this.renderPieChartRamp(R)}else if(e.type==="univariate-above-and-below-ramp"){let R=e;k=this.renderUnivariateAboveAndBelowRamp(R,s.opacity,c)}else if(e.type==="univariate-color-size-ramp"){let R=e;k=this.renderUnivariateColorSizeRamp(R,s.opacity,c)}if(!k)return null;let I=e.title,P=null;if(typeof I=="string")P=I;else if(I){let R=I,F=this.getTitle(R,w||b);this.isRendererTitle(w||b)?"title"in I&&(P=`${I.title} (${F})`):P=F}return L`<instant-apps-interactive-legend-legend-element class=${_(Z(this.el))} .activeLayerInfo=${n} .isSizeRamp=${z} .isChild=${!!u} .isColorRamp=${w} .isRelationshipRamp=${S} .isInteractive=${x} .zoomTo=${this.zoomTo} .legendElement=${e} .titleText=${P} .legendvm=${this.legendvm} .legendElementIndex=${r}><div slot=content>${k}</div></instant-apps-interactive-legend-legend-element>`}renderPieChartRamp(e){return L`<div .innerHTML=${`${e.preview?.outerHTML}`}></div>`}renderUnivariateAboveAndBelowRamp(e,s,c){let{sizeRampElement:n,colorRampElement:r}=ct(e,s);if(!n)return null;let u=$e(n,"above",!0),h=$e(n,"below",!0),w=12,b=ye(r,{width:w,height:u,rampAlignment:"vertical",opacity:s,type:"above",effectList:c}),z=ye(r,{width:w,height:h,rampAlignment:"vertical",opacity:s,type:"below",effectList:c}),k=De(n),x=n.infos.map(H=>H.label),S=x.map((H,U)=>U===0?L`<div class=${_(H?b?g.univariateAboveAndBelowLabel:g.rampLabel:"")}>${H}</div>`:U===2?L`<div></div>`:null),I=x.length-1,P=Math.floor(x.length/2),R=x.map((H,U)=>U===P||U===I?L`<div class=${_(H?b?g.univariateAboveAndBelowLabel:g.rampLabel:"")}>${H}</div>`:null),F={display:"table-cell",verticalAlign:"middle"},G={marginTop:`${k}px`},O={height:`${u}px`},j={height:`${h}px`};return K("univariate-above-and-below-ramp-preview",L`<div style=${E(qe)}><div class=${_(g.layerBody)}>${n.infos.map((H,U)=>L`<div class=${`${g.layerRow} ${g.sizeRamp}`}><div class=${_(g.symbol)} style=${E(F)} .innerHTML=${H?.preview?.outerHTML??""??""}></div>${!b&&U%2===0?L`<div class=${_(g.layerInfo)}>${x[U]}</div>`:null}</div>`)}</div>${b?K("color-ramp-preview",L`<div style=${E(G)}><div style=${E(be)}><div style=${E(ae)}><div class=${_(g.rampContainer)}>${b}</div></div><div style=${E(ae)}><div class=${_(g.rampLabelsContainer)} style=${E(O)}>${S}</div></div></div><div style=${E(be)}><div style=${E(ae)}><div class=${_(g.rampContainer)}>${z}</div></div><div style=${E(ae)}><div class=${_(g.rampLabelsContainer)} style=${E(j)}>${R}</div></div></div></div>`):null}</div>`)}renderUnivariateColorSizeRamp(e,s,c){let{sizeRampElement:n,colorRampElement:r}=ot(e);if(!n)return null;let u=De(n),h=12,w=$e(n,"full",!1),b=ye(r,{width:h,height:w,rampAlignment:"vertical",opacity:s,type:"full",effectList:c}),z=n.infos.length-1,k=n.infos.map((P,R)=>R===0||R===z?L`<div class=${_(P.label?r?g.univariateAboveAndBelowLabel:g.rampLabel:"")}>${P.label}</div>`:null),x={display:"table-cell",verticalAlign:"middle"},S={marginTop:`${u}px`},I={height:`${w}px`};return K("univariate-above-and-below-ramp-preview",L`<div style=${E(qe)}><div class=${_(g.layerBody)}>${n.infos.map(P=>L`<div class=${`${g.layerRow} ${g.sizeRamp}`}><div class=${_(g.symbol)} style=${E(x)} .innerHTML=${P?.preview?.outerHTML??""??""}></div></div>`)}</div>${K("color-ramp-preview",L`<div style=${E(S)}><div style=${E(be)}><div style=${E(ae)}><div class=${_(g.rampContainer)}>${b}</div></div><div style=${E(ae)}><div class=${_(g.rampLabelsContainer)} style=${E(I)}>${k}</div></div></div></div>`)}</div>`)}renderLegendForRamp(e,s){let c=e.infos,n=e.type==="opacity-ramp",r=e.type==="heatmap-ramp",u=e.type==="stretch-ramp",h=e.preview,w=n?g.opacityRamp:"";h&&(h.classList.add(g.colorRamp),w&&h.classList.add(w)),s!=null&&h&&(h.style.opacity=s.toString());let b=c.map(x=>{let S;if(r){let I=this.messages[x.label];S=typeof I=="string"?I:x.label}else u?S="value"in x?this.getStretchStopLabel(x):x.label:S=x.label;return L`<div class=${_(x.label?g.rampLabel:"")}>${S}</div>`}),z={width:`${vt}px`},k={height:h?.style?.height};return L`<div class=${_(g.layerRow)}><div class=${_(g.symbolContainer)} style=${E({...z})}><div class=${_(g.rampContainer)} ${Ee(x=>{x?.firstChild&&x?.firstChild?.remove(),x?.appendChild(h)})}></div></div><div class=${_(g.layerInfo)}><div class=${_(g.rampLabelsContainer)} style=${E({...k})}>${b}</div></div></div>`}renderLegendForElementInfo(e,s,c,n,r,u,h,w,b,z){if("infos"in e)return this.renderLegendForElement(e,s,c,u,h,!0,e);let k=null,x=!dt(s,r.type);if("preview"in e){let{outerHTML:q}=e.preview;k=L`<div class=${_(g.symbol)} .innerHTML=${q??""}></div>`}else"src"in e&&(k=this.renderImage(e,s,x));if(!k)return null;let S="",I=n?` ${g.sizeRamp}`:"",P,R=Te(s),F=He(R,z);if(B.data){let q=Pe(R,s,e,F,w),N=F?F?.nestedInfos:R,re=Fe(N);P=R?.categories?.size===1?!q?.selected:re||q?.selected}let G="label"in e?e.label:null,O=F&&!("value"in e)?!1:b,j=W.get("compact"),H=this.getTitle(G,!1)||"",U=F?r.title:G??s?.id;return O?L`<button @click=${this.applyFilter(e,s,w,z)} class=${`${g.layerRow} ${g.interactiveLayerRow}${P?` ${g.infoSelected}`:""}`} title=${(j?`${H}`:void 0)??fe} .ariaPressed=${P?"true":"false"}><div class=${`${g.symbolContainer}${S}${I}`}>${k}</div><div class=${`${g.layerInfo}${S}`}>${this.getTitle(G,!1)||""}</div>${this.featureCount&&!j?L`<instant-apps-interactive-legend-count class=${_(Z(this.el))} .categoryId=${U} .activeLayerInfo=${u} .legendvm=${this.legendvm} .selected=${!!P} .legendElement=${r} .infoIndex=${w}></instant-apps-interactive-legend-count>`:null}</button>`:L`<div class=${_(g.layerRow)}><div class=${`${g.symbolContainer}${S}${I}`}>${k}</div><div class=${`${g.layerInfo}${S}`}>${H}</div></div>`}renderImage(e,s,c){let{label:n,src:r,opacity:u}=e,h=c?` ${g.imageryLayerStretchedImage}`:"",w=c?"":` ${g.symbol}`,b={opacity:`${u??s.opacity}`};return L`<img alt=${this.getTitle(n,!1)??fe} src=${r??fe} width=${e.width} height=${e.height} class=${`$${h}${w}`} style=${E(b)}>`}};Se("instant-apps-interactive-legend-classic",we);return we},"symbols/support/symbolUtils","core/reactiveUtils","intl","core/Handles",a,b,c,d)
|