@arcgis/map-components 5.1.0-next.46 → 5.1.0-next.48
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/{IULGMTSK.js → 3GY55TR6.js} +1 -1
- package/dist/cdn/{ERCTSHRH.js → 3KOWS73L.js} +1 -1
- package/dist/cdn/{JJTM5KZ2.js → 5EGS3PEJ.js} +1 -1
- package/dist/cdn/{GO5BD6QL.js → 5FJIKNID.js} +1 -1
- package/dist/cdn/{UVHZXCAN.js → 6E7H5LPA.js} +2 -2
- package/dist/cdn/{HKNVYHER.js → 6XPVHLWQ.js} +1 -1
- package/dist/cdn/{G7SRL7WF.js → 76RS6RKB.js} +1 -1
- package/dist/cdn/{5C33IP7B.js → A2QPYUE5.js} +1 -1
- package/dist/cdn/{FHVFIK44.js → CC77IOI3.js} +1 -1
- package/dist/cdn/CYSDIJ4L.js +2 -0
- package/dist/cdn/{BDA4BCEB.js → DQJMLG55.js} +1 -1
- package/dist/cdn/EHPHVZAX.js +2 -0
- package/dist/cdn/{PFQ5U7SF.js → ET2U2ZGP.js} +1 -1
- package/dist/cdn/{DCRCFVBU.js → F2SNWNAZ.js} +1 -1
- package/dist/cdn/FF5VMKLK.js +2 -0
- package/dist/cdn/{IPIYZVAJ.js → FWXI6DGS.js} +1 -1
- package/dist/cdn/I6PZUSTS.js +2 -0
- package/dist/cdn/{2IFKJHFD.js → JFNCIZRD.js} +1 -1
- package/dist/cdn/{QEDQOBD7.js → JVFREF7G.js} +2 -2
- package/dist/cdn/{SZSOX5MA.js → KWZTLNUH.js} +1 -1
- package/dist/cdn/{YQWTCTTH.js → LY77GAJT.js} +1 -1
- package/dist/cdn/{XOARVKET.js → MN6VPZBF.js} +1 -1
- package/dist/cdn/ODQ4JQEF.js +2 -0
- package/dist/cdn/{NBBZRGXH.js → OH3I63ZU.js} +1 -1
- package/dist/cdn/{JWJHIBYW.js → P2ABZVPJ.js} +1 -1
- package/dist/cdn/PNGKWZJQ.js +2 -0
- package/dist/cdn/{XSEIJTVD.js → R42WEZRB.js} +1 -1
- package/dist/cdn/{KFG6ZJAZ.js → REQFNQZY.js} +1 -1
- package/dist/cdn/{WG4E5DBM.js → RH62B2NE.js} +1 -1
- package/dist/cdn/{L3AVJM22.js → T5MRUYOH.js} +1 -1
- package/dist/cdn/TBWM3VXL.js +2 -0
- package/dist/cdn/{ANRWXBWL.js → VEYOGGAN.js} +1 -1
- package/dist/cdn/{Q5Y3DHAC.js → W27U4A3P.js} +1 -1
- package/dist/cdn/WH7FEIAX.js +2 -0
- package/dist/cdn/XPZYTUFI.js +2 -0
- package/dist/cdn/{DLB6EEQE.js → YET5HTLQ.js} +1 -1
- package/dist/cdn/YXUK3MCB.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/layer-utils.js +17 -13
- package/dist/components/arcgis-building-explorer/customElement.js +14 -9
- package/dist/components/arcgis-daylight/customElement.js +148 -144
- package/dist/components/arcgis-feature-utility-network-association-list/customElement.js +14 -13
- package/dist/components/arcgis-feature-utility-network-associations/customElement.js +80 -86
- package/dist/components/arcgis-swipe/customElement.d.ts +5 -6
- package/dist/components/arcgis-swipe/customElement.js +55 -43
- package/dist/components/arcgis-utility-network-aggregated-geometry/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +35 -35
- package/dist/components/arcgis-utility-network-trace-location/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-trace-results/customElement.js +26 -25
- package/dist/components/arcgis-version-management-version-list/customElement.js +1 -1
- package/dist/components/arcgis-volume-measurement/customElement.js +4 -4
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +5 -5
- package/dist/cdn/6JYHNX2S.js +0 -2
- package/dist/cdn/BE4GRNQV.js +0 -2
- package/dist/cdn/CAXI6CJY.js +0 -2
- package/dist/cdn/ELTHY6FL.js +0 -2
- package/dist/cdn/MFIMBD2E.js +0 -2
- package/dist/cdn/NXQA6DOA.js +0 -2
- package/dist/cdn/OGE4JCW6.js +0 -2
- package/dist/cdn/T34SPRV3.js +0 -2
- package/dist/cdn/UKU22VTN.js +0 -2
- package/dist/cdn/WFCOTNQQ.js +0 -2
- /package/dist/cdn/{BILSW27K.js → 2HXYJZSB.js} +0 -0
- /package/dist/cdn/{5VWD7SPW.js → 37GJW6KT.js} +0 -0
- /package/dist/cdn/{VIEEGP7G.js → 4IM2FY5W.js} +0 -0
- /package/dist/cdn/{OIJPQ63Z.js → 4MDRPZTG.js} +0 -0
- /package/dist/cdn/{ZYZA5VUV.js → 4STAROOM.js} +0 -0
- /package/dist/cdn/{YJPCWIX2.js → 5IMWXYL2.js} +0 -0
- /package/dist/cdn/{O5S54F3U.js → 5TXE67XV.js} +0 -0
- /package/dist/cdn/{E6GYGJ2B.js → BBQPUWRO.js} +0 -0
- /package/dist/cdn/{EG3W3ADI.js → BND2TJBO.js} +0 -0
- /package/dist/cdn/{WRS3F55Q.js → CJOHGWK6.js} +0 -0
- /package/dist/cdn/{6TB2XH3T.js → D5WXOOS3.js} +0 -0
- /package/dist/cdn/{UX5YG5TO.js → DMDCKD5U.js} +0 -0
- /package/dist/cdn/{PILEMW25.js → DQH27QCF.js} +0 -0
- /package/dist/cdn/{HX6XVMJE.js → EP252O27.js} +0 -0
- /package/dist/cdn/{H4WIQKA4.js → EVHNFE5I.js} +0 -0
- /package/dist/cdn/{T3ZFKRCS.js → EW6V3NZI.js} +0 -0
- /package/dist/cdn/{6PWTVRJ6.js → F6BQWE5I.js} +0 -0
- /package/dist/cdn/{ULYGZ4D2.js → FLLSBLLE.js} +0 -0
- /package/dist/cdn/{PWPTFBHS.js → FQZXILRT.js} +0 -0
- /package/dist/cdn/{6ZCH5OTT.js → GHY23IXW.js} +0 -0
- /package/dist/cdn/{QY7A4VMP.js → GIGQIUF5.js} +0 -0
- /package/dist/cdn/{GPESYF4D.js → GS75FRUR.js} +0 -0
- /package/dist/cdn/{6W3OENEK.js → HGAJ2IEN.js} +0 -0
- /package/dist/cdn/{YGVSJT3E.js → JKVKP7AW.js} +0 -0
- /package/dist/cdn/{7C22TPME.js → JU3BLGXG.js} +0 -0
- /package/dist/cdn/{MR5AEEII.js → L4TA63M6.js} +0 -0
- /package/dist/cdn/{BUILQQ6S.js → LQVZVGY4.js} +0 -0
- /package/dist/cdn/{SPSJMCAO.js → MM4KQLRF.js} +0 -0
- /package/dist/cdn/{4S2JKX63.js → Q3GALNWS.js} +0 -0
- /package/dist/cdn/{BLSJEYOH.js → QM34BSKE.js} +0 -0
- /package/dist/cdn/{QSOU6NQA.js → QTWRDNXX.js} +0 -0
- /package/dist/cdn/{FVTX4GNH.js → TC3Q2QUA.js} +0 -0
- /package/dist/cdn/{WTUUS552.js → TEFALOII.js} +0 -0
- /package/dist/cdn/{2HJ7EGEB.js → TP5VEU3D.js} +0 -0
- /package/dist/cdn/{3LKCMCHN.js → U35ISUWJ.js} +0 -0
- /package/dist/cdn/{FWV2SQE2.js → UUC3DBCQ.js} +0 -0
- /package/dist/cdn/{ZLOQIB7A.js → UVMLKDJA.js} +0 -0
- /package/dist/cdn/{BEDLAEXK.js → V7DG2KF6.js} +0 -0
- /package/dist/cdn/{TKVE7ETK.js → WHDMC5HB.js} +0 -0
- /package/dist/cdn/{GPGC63RW.js → XEXCDGSR.js} +0 -0
- /package/dist/cdn/{BVFH7ZG4.js → XJXQC6HM.js} +0 -0
- /package/dist/cdn/{GT5SWKXT.js → YZSLMAVX.js} +0 -0
- /package/dist/cdn/{ZX5YTFYB.js → ZUPEVR3P.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import i from"./2IFKJHFD.js";import h from"./DLB6EEQE.js";import"./CAXI6CJY.js";import{a as C}from"./J6UG5EF7.js";import g from"./5MHPKAFK.js";import"./PC4PAQXQ.js";import"./TFUFDVQ6.js";import f from"./5CJ44XUV.js";import{a as D}from"./SVVJHTPA.js";import e from"./3JMJAUSY.js";import d from"./RO4TU5R3.js";import{g as V}from"./55IJQTCC.js";import"./7DOI3267.js";import a from"./O5TDDX7K.js";import{b}from"./EHZW6UXL.js";import{M as w,N as v,O as I,P as F,R as c,S as T,U as k,a as x,b as n,x as _}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([j,{substitute:h,formatNumber:$},{watch:u},{stripHTML:A},L,{renderingSanitizer:P},{initializeProjection:K},,,,N,,{d:E},{a:O,d:B,e:R}])=>{var G=x`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-item-header-border-block-end: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty){padding:var(--arcgis-internal-padding-md, var(--calcite-spacing-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-spacing-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-spacing-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-spacing-xxs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-spacing-lg);width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.action-image{flex:0 0 var(--calcite-spacing-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.header{border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.content-feature{--calcite-flow-item-footer-padding: 0}.feature-menu-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.action-exit{transform:scaleX(-1)}`;function W(d){switch(d?.type){case"point":return d;case"extent":return d.center;case"polygon":return d.centroid;case"multipoint":case"polyline":return d.extent?.center;default:return null}}var M=O.clone();function X(d){return d?.declaredClass.startsWith("esri.layers.")??!1}var J=N(j),y=class extends I{constructor(){super(...arguments),this._fetchFeaturesController=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this.viewModel.featurePage!=null&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._featureMenuIntersectionObserverNode=null,this._rootFlowItemNode=w(),this._featureMenuViewportNode=w(),this._actionBarMenuNode=w(),this._flowContainerNode=w(),this.messages=D(),this._selectedFeatureComponent=w(),this._cancelOpenRelatedFeature=()=>{let{_openRelatedFeatureAbortController:e}=this;e&&e.abort(),this._openRelatedFeatureAbortController=null},this._openRelatedFeatureAbortController=null,this.flowItems=new L,this.viewModel=J(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.autoDestroyDisabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=this.viewModel.featureMenuOpen,this.featureMenuTitle=this.viewModel.featureMenuTitle,this.featureNavigationTop=!1,this.features=this.viewModel.features,this.featuresPerPage=this.viewModel.featuresPerPage,this.featureViewModelAbilities=this.viewModel.featureViewModelAbilities,this.goToOverride=this.viewModel.goToOverride,this.headerActions=new L,this.heading=this.viewModel.title,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSpinner=!1,this.hideContent=!1,this.hideExpressionContent=!1,this.hideLastEditedInfo=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.map=this.viewModel.map,this.open=this.viewModel.visible,this.promises=this.viewModel.promises,this.responsiveActionsEnabled=!1,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.showCollapseButton=!1,this.spatialReference=this.viewModel.spatialReference,this.state=this.viewModel.state,this.timeZone=this.viewModel.timeZone,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=V()("active","collapsed","featureCount","featureMenuOpen","features","promises","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=_(),this.arcgisClose=_(),this.arcgisTriggerAction=_()}static{this.properties={_openRelatedFeatureAbortController:16,flowItems:16,_hideActionText:16,_featureNavigationVisible:16,_isCollapsed:16,_collapseEnabled:16,viewModel:0,actions:0,active:0,autoDestroyDisabled:5,collapsed:5,content:1,defaultPopupTemplateEnabled:5,featureCount:9,featureMenuOpen:5,featureMenuTitle:1,featureNavigationTop:5,features:0,featuresPerPage:9,featureViewModelAbilities:0,goToOverride:0,headerActions:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSpinner:5,hideContent:5,chartAnimationDisabled:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,hideRelationshipContent:5,hideTextContent:5,hideUtilityNetworkContent:5,hideLastEditedInfo:5,highlightDisabled:5,icon:1,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,map:0,messageOverrides:0,open:5,referenceElement:1,promises:0,responsiveActionsEnabled:5,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,showCollapseButton:5,spatialReference:0,state:32,timeZone:1,updateLocationEnabled:5,view:0}}static{this.styles=G}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;let e=this.viewModel.view?.widthBreakpoint;return e==="xsmall"||e==="small"||e==="medium"}get _featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.viewModel.selectedFeature&&!this.hideFeatureNavigation}get _isCollapsed(){return this._collapseEnabled&&this.collapsed}get _collapseEnabled(){return this.showCollapseButton&&(this.initialDisplayMode==="list"||!!(this.heading||this.viewModel.selectedFeatureViewModel?.title)&&!!(this.content||this.viewModel.selectedFeatureViewModel?.content))}get chartAnimationDisabled(){return!(this.viewModel.featureViewModelAbilities?.chartAnimation??!0)}set chartAnimationDisabled(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.chartAnimation=!e}get hideAttachmentsContent(){return!(this.viewModel.featureViewModelAbilities?.attachmentsContent??!0)}set hideAttachmentsContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.attachmentsContent=!e}get hideCustomContent(){return!(this.viewModel.featureViewModelAbilities?.customContent??!0)}set hideCustomContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.customContent=!e}get hideFieldsContent(){return!(this.viewModel.featureViewModelAbilities?.fieldsContent??!0)}set hideFieldsContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.fieldsContent=!e}get hideMediaContent(){return!(this.viewModel.featureViewModelAbilities?.mediaContent??!0)}set hideMediaContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.mediaContent=!e}get hideRelationshipContent(){return!(this.viewModel.featureViewModelAbilities?.relationshipContent??!0)}set hideRelationshipContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.relationshipContent=!e}get hideTextContent(){return!(this.viewModel.featureViewModelAbilities?.textContent??!0)}set hideTextContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.textContent=!e}get hideUtilityNetworkContent(){return!(this.viewModel.featureViewModelAbilities?.utilityNetworkAssociationsContent??!0)}set hideUtilityNetworkContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.utilityNetworkAssociationsContent=!e}get selectedDrillInFeature(){let e=Array.from(this.flowItems).at(-1);return e&&"graphic"in e?e.graphic??null:null}get selectedFeatureComponent(){return this._selectedFeatureComponent.value??null}async clear(){return this.viewModel.clear()}async close(){this.open=!1}async destroy(){await this.manager.destroy(),await this._destroySpinner(this.referenceElement),this._cancelOpenRelatedFeature(),this._removeFlowItems(),this._unobserveFeatureMenuObserver(),this._cancelFetchingFeatures(),this._featureMenuIntersectionObserver?.disconnect()}async fetchFeatures(e,t){this._cancelFetchingFeatures();let i=new AbortController,{signal:a}=i;if(this._fetchFeaturesController=i,!e&&this.view&&this.location&&(await K(this.location.spatialReference,this.view.spatialReference,null,{signal:a}),e=this.view.toScreen(this.location)??void 0),!e)return;let s=await this.viewModel.fetchFeatures(e,{signal:a,...t});this.location=s.location,this.promises=s.pendingFeatures}async next(){return this.viewModel.next()}async previous(){return this.viewModel.previous()}async setFocus(){this._flowContainerNode.value?.setFocus()}async triggerAction(e){if(!e.disabled)return e?.type==="toggle"&&(e.value=!e.value),await R(e,this.viewModel)}loaded(){this.manager.onLifecycle(()=>[u(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),u(()=>this.viewModel?.view,()=>this._viewChange()),u(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),u(()=>this.selectedFeatureComponent?.viewModel,()=>this._removeFlowItems()),u(()=>this.viewModel?.featureViewModels,()=>this._featureMenuViewportScrollTop()),u(()=>[this.flowItems?.length,this.featureMenuOpen],()=>{this.setFocus()}),u(()=>this.referenceElement,(e,t)=>{this._destroySpinner(t),this._createSpinner()},{initial:!0}),u(()=>[this.hideSpinner,this.viewModel?.view,this.viewModel?.location,this.viewModel?.waitingForResult,this.viewModel?.view],()=>void this._createSpinner(),{initial:!0})])}_cancelFetchingFeatures(){this._fetchFeaturesController?.abort(),this._fetchFeaturesController=null}_handleClose(){this.close(),this.arcgisClose.emit()}_groupResultsByLayer(){let{featureViewModels:e}=this.viewModel,t=new Map;return e.forEach(i=>{let a=i?.graphic;if(!a)return;let s=E(a),o=X(s)?s:null,l=t.get(o)??[];t.set(o,[...l,i])}),t}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(e){this._cancelOpenRelatedFeature();let t=new AbortController;this._openRelatedFeatureAbortController=t,await e.updateGeometry();let i=e.graphic,a=i?.geometry;if(a==null||i==null)return;this._removeFlowItems(),await this.viewModel.zoomTo({target:a});let s=W(a);s!=null&&(this.location=s),this.features=[i],this.open=!0,await this.setFocus(),this._openRelatedFeatureAbortController===t&&(this._openRelatedFeatureAbortController=null)}_handlePaginationMenuButton(){this._updateFeatureMenu()}_openFeatureMenu(){this._updateFeatureMenu(!0)}_closeFeatureMenu(){this._updateFeatureMenu(!1)}_updateFeatureMenu(e=!this.featureMenuOpen){this.featureMenuOpen=e}_previousFeature(){this.viewModel.previous()}_nextFeature(){this.viewModel.next()}_handleFeatureBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this.featureMenuOpen&&this._closeFeatureMenu()}_setActiveFeature(e){let{viewModel:t}=this;t.activeFeature=t.features?.[e]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_selectFeature(e){this.viewModel.selectedFeatureIndex=e,this.initialDisplayMode==="feature"?this._handleFeatureMenuBack():this.setFocus()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),e&&this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_getActionTitle(e){let{messages:t,selectedFeature:i}=this,{id:a}=e,s=i?.attributes,o=e.title??"",l=a==="zoom-to-feature"?h(o,{messages:t}):a==="remove-selected-feature"?h(o,{messages:t}):a==="zoom-to-clustered-features"?h(o,{messages:t}):a==="browse-clustered-features"?h(o,{messages:t}):e.title;return l&&s?h(l,s):l??""}_onMainKeydown(e){let{key:t}=e;t==="ArrowLeft"&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.previous(),this.setFocus()),t==="ArrowRight"&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.next(),this.setFocus())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode&&this._featureMenuViewportNode.value?.scrollContentTo({top:0})}_selectedFeatureIndexUpdated(e,t){let{featureCount:i,waitingForResult:a}=this.viewModel;a||!i||e===t||e===-1||(this._removeFlowItems(),this._rootFlowItemNode.value?.scrollContentTo({top:0}))}_triggerAction(e){this.triggerAction(e),this.arcgisTriggerAction.emit({action:e})}_viewChange(){this.viewModel.clear(),this.open=!1}_closeOpenActionMenu(){let{_actionBarMenuNode:e}=this;e.value&&(e.value.menuOpen=!1)}_removeFlowItems(){this.flowItems?.destroyAll()}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":case"feature-utility-network-association-type":return e.description;case"feature-relationship":return e.allItemsDescription}}_handleDrillInBackClick(){this.flowItems?.pop()?.destroy()}_getHeading(){let{hideHeading:e}=this,{title:t,selectedFeatureViewModel:i}=this.viewModel;return i&&!e?i?.state==="error"?this.messages?.errorMessage??"":i?.title||"":!e&&t?t:""}async _destroySpinner(e){e?.manager?.component?.extraContent?.remove(this._spinnerEl)}async _createSpinner(){let e=this.referenceElement;e&&(await this._destroySpinner(e),this._spinnerEl=T(n`<arcgis-spinner auto-destroy-disabled .label=${this.messages.loading??""} .trackLocation=${!this.hideSpinner&&this.viewModel?.waitingForResult} .location=${this.viewModel?.location??void 0} .view=${this.viewModel?.view??void 0}></arcgis-spinner>`),e.manager?.component?.extraContent?.add(this._spinnerEl))}render(){return n`<div class="root" @keydown=${this._onMainKeydown}>${this._renderHeader()}${this._renderContentContainer()}</div>`}_renderFeatureNavigation(){return[this._renderPagination(),this.initialDisplayMode==="list"?this._renderFeaturePaginationText():this._renderFeatureMenuButton()]}_renderHeader(){return this.featureNavigationTop&&this._featureNavigationVisible?n`<div class="header">${this._renderFeatureNavigation()}</div>`:null}_renderFooter(){return!this.featureNavigationTop&&this._featureNavigationVisible?n`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>`:null}_renderFeaturePaginationText(){let{messages:e,viewModel:t}=this,{featureCount:i,selectedFeatureIndex:a}=t;return n`<div class="pagination-text">${h(e.pageText??"",{index:$(a+1),total:$(i)})}</div>`}_renderFeatureMenuButton(){let{messages:e,viewModel:t}=this,{featureCount:i,selectedFeatureIndex:a,pendingPromisesCount:s}=t;return n`<calcite-action class="pagination-menu-button" icon=list .label=${e.selectFeature} .loading=${s>0} @click=${this._handlePaginationMenuButton} .text=${h(e.pageText??"",{index:$(a+1),total:$(i)})} text-enabled title=${e.selectFeature??c}></calcite-action>`}_renderPagination(){let{previous:e,next:t}=this.messages;return n`<calcite-action-bar class="pagination-action-bar" expand-disabled layout=horizontal overflow-actions-disabled scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${e??""} @click=${this._previousFeature} .text=${e??""} title=${e??""??c}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${t??""} @click=${this._nextFeature} .text=${t??""} title=${t??""??c}></calcite-action></calcite-action-group></calcite-action-bar>`}_renderFeatureMenuItem(e){let{initialDisplayMode:t}=this,{selectedFeatureViewModel:i,featureViewModels:a}=this.viewModel,s=e===i,o=a.indexOf(e);return n`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${()=>this._setActiveFeature(o)} @mouseleave=${this._removeActiveFeature} @mouseover=${()=>this._setActiveFeature(o)} .selected=${s} @calciteListItemSelect=${()=>this._selectFeature(o)}><span .innerHTML=${(P.sanitize(e.title)||this.messages.untitled)??""} slot=content></span>${t==="list"?n`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`:null}</calcite-list-item>`}_renderFeatureMenu(){let{messages:e,viewModel:t}=this,i=this._groupResultsByLayer(),a=this.initialDisplayMode==="list"?"none":"single";return t.featureViewModels.length?n`<calcite-list display-mode=flat .label=${e?.featuresList??""} selection-appearance=icon .selectionMode=${a}>${Array.from(i.keys(),s=>{let o=i.get(s)?.map(r=>this._renderFeatureMenuItem(r)),l=s?s.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&l!==null?C(s??"map-graphics",n`<calcite-list-item-group .heading=${l}>${o}</calcite-list-item-group>`):o})}</calcite-list>`:null}_renderHeaderAction(e){let t=e.title||"";return e.visible?n`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .indicator=${e.active} .loading=${e.active} @click=${()=>this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t??c}></calcite-action>`:null}_renderHeaderActions(){return this.headerActions.map(e=>this._renderHeaderAction(e)).toArray()}_renderContentFeature(){let{headingLevel:e,hideCloseButton:t,_isCollapsed:i,_collapseEnabled:a,featureNavigationTop:s,flowItems:o,initialDisplayMode:l,selectedFeature:r,featureMenuOpen:p}=this,{active:g}=this.viewModel,f=this._getHeading();if(l==="list"&&!r)return null;let m=o.length===0&&(l==="list"?!!r:!p);return n`<calcite-flow-item class=${F(b({"content-feature":!0,"flow-item-collapsed":i}))} .closable=${!t} .closed=${!g} .collapsed=${i} .collapseDirection=${s?"down":"up"} .collapsible=${a} .headingLevel=${e} .selected=${m} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} .heading=${A(f)} ${v(this._rootFlowItemNode)}>${this._renderHeaderActions()}${this._renderActionBar()}<div class=${F(b("container","content-container"))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`}_renderFeatureMenuContainer(){let{viewModel:e,hideCloseButton:t,featureMenuTitle:i,messages:a,initialDisplayMode:s,featureMenuOpen:o,selectedFeature:l,_collapseEnabled:r,_isCollapsed:p,featureNavigationTop:g,headingLevel:f}=this,{active:m,featureViewModels:H,pendingPromisesCount:S}=e,z=i??a.selectFeature;if(s==="feature"&&!o)return null;let U=s==="list"?!l:o;return n`<calcite-flow-item class=${F(b({"flow-item-collapsed":p}))} .closable=${s==="list"&&!t} .closed=${!m} .collapsed=${s==="list"&&p} .collapseDirection=${g?"down":"up"} .collapsible=${s==="list"&&r} .description=${this.hideFeatureMenuHeading?void 0:h(a.total??"",{total:H.length})} .heading=${this.hideFeatureMenuHeading?void 0:z} .headingLevel=${f} .loading=${e.waitingForContents} .selected=${U} @calciteFlowItemBack=${Z=>{Z.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${v(this._featureMenuViewportNode)}>${s==="list"?this._renderHeaderActions():null}${S>0?n`<calcite-loader class="loader" inline .label=${a.loading??""} slot=header-actions-end></calcite-loader>`:null}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" ${v(this._featureMenuIntersectionObserverCreated)}></div>${s==="feature"?n`<calcite-button appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full>${a.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{messages:i,hideCloseButton:a,active:s}=this,o="graphic"in e&&"isFeatureFromTable"in e&&!e.isFeatureFromTable,l=e.flowType==="feature-association",r=i.returnToInitialFeature??"",p=i?.selectFeature,g=this._getActionTitle(M),f=!this.hideActionBar&&l&&o;return n`<calcite-flow-item .closable=${!a} .closed=${!s} .description=${A(this._getDrillInFlowItemDescription(e)??"")} .heading=${this.hideHeading?void 0:A(e.heading??"")} .selected=${t} @calciteFlowItemBack=${m=>{m.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${r??""} title=${r??""??c}></calcite-action>${o?n`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${p??""} title=${p??c}></calcite-action>`:null}${f?n`<calcite-action-bar expand-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${M.disabled} .icon=${M.icon??void 0} .loading=${M.active} scale=s text-enabled .text=${g} title=${g??c} @click=${()=>B(this.viewModel,e)}></calcite-action></calcite-action-group></calcite-action-bar>`:null}<div class="container">${e}</div></calcite-flow-item>`}_renderContentContainer(){let e=this.flowItems?.toArray(),t=e?.map((a,s)=>this._renderFlowItem(a,this.initialDisplayMode==="list"||!this.featureMenuOpen&&s===e.length-1)),i=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(),t]:[this._renderContentFeature(),t,this._renderFeatureMenuContainer()];return n`<calcite-flow ${v(this._flowContainerNode)}>${i}</calcite-flow>`}_renderActionBar(){let e=this.viewModel.selectedFeatureViewModel?.isFeatureFromTable&&!this.location?this.viewModel.allActions.filter(t=>t.id!==M.id):this.viewModel.allActions;return!this._isCollapsed&&!this.hideActionBar&&e.length?n`<calcite-action-bar expand-disabled .expanded=${!this._hideActionText} scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s ${v(this._actionBarMenuNode)}>${this._renderActions()}</calcite-action-group></calcite-action-bar>`:null}_renderActions(){return this.viewModel.allActions.toArray().map(e=>{let t=this._getActionTitle(e);return n`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .loading=${e.active} scale=s .textEnabled=${!this._hideActionText} .text=${t??""} title=${t??c} .hidden=${!e.visible} @click=${()=>this._triggerAction(e)}></calcite-action>`})}_renderContent(){let{content:e,selectedFeatureViewModel:t}=this.viewModel;return t?C(t,n`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${v(this._selectedFeatureComponent)}></arcgis-feature>`):typeof e=="string"?C(e,n`<div .innerHTML=${P.sanitize(e)??""}></div>`):e??null}};k("arcgis-features",y);return y},"widgets/Features/FeaturesViewModel","intl","core/reactiveUtils","applications/Components/stringUtils","core/Collection","applications/Components/sanitizerUtils","applications/Components/featureUtils",a,d,e,f,g,h,i)
|
|
2
|
+
import i from"./JFNCIZRD.js";import h from"./YET5HTLQ.js";import"./FF5VMKLK.js";import{a as C}from"./J6UG5EF7.js";import g from"./5MHPKAFK.js";import"./PC4PAQXQ.js";import"./TFUFDVQ6.js";import f from"./5CJ44XUV.js";import{a as D}from"./SVVJHTPA.js";import e from"./3JMJAUSY.js";import d from"./RO4TU5R3.js";import{g as V}from"./55IJQTCC.js";import"./7DOI3267.js";import a from"./O5TDDX7K.js";import{b}from"./EHZW6UXL.js";import{M as w,N as v,O as I,P as F,R as c,S as T,U as k,a as x,b as n,x as _}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([j,{substitute:h,formatNumber:$},{watch:u},{stripHTML:A},L,{renderingSanitizer:P},{initializeProjection:K},,,,N,,{d:E},{a:O,d:B,e:R}])=>{var G=x`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-item-header-border-block-end: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty){padding:var(--arcgis-internal-padding-md, var(--calcite-spacing-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-spacing-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-spacing-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-spacing-xxs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-spacing-lg);width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.action-image{flex:0 0 var(--calcite-spacing-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.header{border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.content-feature{--calcite-flow-item-footer-padding: 0}.feature-menu-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.action-exit{transform:scaleX(-1)}`;function W(d){switch(d?.type){case"point":return d;case"extent":return d.center;case"polygon":return d.centroid;case"multipoint":case"polyline":return d.extent?.center;default:return null}}var M=O.clone();function X(d){return d?.declaredClass.startsWith("esri.layers.")??!1}var J=N(j),y=class extends I{constructor(){super(...arguments),this._fetchFeaturesController=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this.viewModel.featurePage!=null&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._featureMenuIntersectionObserverNode=null,this._rootFlowItemNode=w(),this._featureMenuViewportNode=w(),this._actionBarMenuNode=w(),this._flowContainerNode=w(),this.messages=D(),this._selectedFeatureComponent=w(),this._cancelOpenRelatedFeature=()=>{let{_openRelatedFeatureAbortController:e}=this;e&&e.abort(),this._openRelatedFeatureAbortController=null},this._openRelatedFeatureAbortController=null,this.flowItems=new L,this.viewModel=J(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.autoDestroyDisabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=this.viewModel.featureMenuOpen,this.featureMenuTitle=this.viewModel.featureMenuTitle,this.featureNavigationTop=!1,this.features=this.viewModel.features,this.featuresPerPage=this.viewModel.featuresPerPage,this.featureViewModelAbilities=this.viewModel.featureViewModelAbilities,this.goToOverride=this.viewModel.goToOverride,this.headerActions=new L,this.heading=this.viewModel.title,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSpinner=!1,this.hideContent=!1,this.hideExpressionContent=!1,this.hideLastEditedInfo=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.map=this.viewModel.map,this.open=this.viewModel.visible,this.promises=this.viewModel.promises,this.responsiveActionsEnabled=!1,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.showCollapseButton=!1,this.spatialReference=this.viewModel.spatialReference,this.state=this.viewModel.state,this.timeZone=this.viewModel.timeZone,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=V()("active","collapsed","featureCount","featureMenuOpen","features","promises","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=_(),this.arcgisClose=_(),this.arcgisTriggerAction=_()}static{this.properties={_openRelatedFeatureAbortController:16,flowItems:16,_hideActionText:16,_featureNavigationVisible:16,_isCollapsed:16,_collapseEnabled:16,viewModel:0,actions:0,active:0,autoDestroyDisabled:5,collapsed:5,content:1,defaultPopupTemplateEnabled:5,featureCount:9,featureMenuOpen:5,featureMenuTitle:1,featureNavigationTop:5,features:0,featuresPerPage:9,featureViewModelAbilities:0,goToOverride:0,headerActions:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSpinner:5,hideContent:5,chartAnimationDisabled:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,hideRelationshipContent:5,hideTextContent:5,hideUtilityNetworkContent:5,hideLastEditedInfo:5,highlightDisabled:5,icon:1,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,map:0,messageOverrides:0,open:5,referenceElement:1,promises:0,responsiveActionsEnabled:5,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,showCollapseButton:5,spatialReference:0,state:32,timeZone:1,updateLocationEnabled:5,view:0}}static{this.styles=G}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;let e=this.viewModel.view?.widthBreakpoint;return e==="xsmall"||e==="small"||e==="medium"}get _featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.viewModel.selectedFeature&&!this.hideFeatureNavigation}get _isCollapsed(){return this._collapseEnabled&&this.collapsed}get _collapseEnabled(){return this.showCollapseButton&&(this.initialDisplayMode==="list"||!!(this.heading||this.viewModel.selectedFeatureViewModel?.title)&&!!(this.content||this.viewModel.selectedFeatureViewModel?.content))}get chartAnimationDisabled(){return!(this.viewModel.featureViewModelAbilities?.chartAnimation??!0)}set chartAnimationDisabled(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.chartAnimation=!e}get hideAttachmentsContent(){return!(this.viewModel.featureViewModelAbilities?.attachmentsContent??!0)}set hideAttachmentsContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.attachmentsContent=!e}get hideCustomContent(){return!(this.viewModel.featureViewModelAbilities?.customContent??!0)}set hideCustomContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.customContent=!e}get hideFieldsContent(){return!(this.viewModel.featureViewModelAbilities?.fieldsContent??!0)}set hideFieldsContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.fieldsContent=!e}get hideMediaContent(){return!(this.viewModel.featureViewModelAbilities?.mediaContent??!0)}set hideMediaContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.mediaContent=!e}get hideRelationshipContent(){return!(this.viewModel.featureViewModelAbilities?.relationshipContent??!0)}set hideRelationshipContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.relationshipContent=!e}get hideTextContent(){return!(this.viewModel.featureViewModelAbilities?.textContent??!0)}set hideTextContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.textContent=!e}get hideUtilityNetworkContent(){return!(this.viewModel.featureViewModelAbilities?.utilityNetworkAssociationsContent??!0)}set hideUtilityNetworkContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.utilityNetworkAssociationsContent=!e}get selectedDrillInFeature(){let e=Array.from(this.flowItems).at(-1);return e&&"graphic"in e?e.graphic??null:null}get selectedFeatureComponent(){return this._selectedFeatureComponent.value??null}async clear(){return this.viewModel.clear()}async close(){this.open=!1}async destroy(){await this.manager.destroy(),await this._destroySpinner(this.referenceElement),this._cancelOpenRelatedFeature(),this._removeFlowItems(),this._unobserveFeatureMenuObserver(),this._cancelFetchingFeatures(),this._featureMenuIntersectionObserver?.disconnect()}async fetchFeatures(e,t){this._cancelFetchingFeatures();let i=new AbortController,{signal:a}=i;if(this._fetchFeaturesController=i,!e&&this.view&&this.location&&(await K(this.location.spatialReference,this.view.spatialReference,null,{signal:a}),e=this.view.toScreen(this.location)??void 0),!e)return;let s=await this.viewModel.fetchFeatures(e,{signal:a,...t});this.location=s.location,this.promises=s.pendingFeatures}async next(){return this.viewModel.next()}async previous(){return this.viewModel.previous()}async setFocus(){this._flowContainerNode.value?.setFocus()}async triggerAction(e){if(!e.disabled)return e?.type==="toggle"&&(e.value=!e.value),await R(e,this.viewModel)}loaded(){this.manager.onLifecycle(()=>[u(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),u(()=>this.viewModel?.view,()=>this._viewChange()),u(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),u(()=>this.selectedFeatureComponent?.viewModel,()=>this._removeFlowItems()),u(()=>this.viewModel?.featureViewModels,()=>this._featureMenuViewportScrollTop()),u(()=>[this.flowItems?.length,this.featureMenuOpen],()=>{this.setFocus()}),u(()=>this.referenceElement,(e,t)=>{this._destroySpinner(t),this._createSpinner()},{initial:!0}),u(()=>[this.hideSpinner,this.viewModel?.view,this.viewModel?.location,this.viewModel?.waitingForResult,this.viewModel?.view],()=>void this._createSpinner(),{initial:!0})])}_cancelFetchingFeatures(){this._fetchFeaturesController?.abort(),this._fetchFeaturesController=null}_handleClose(){this.close(),this.arcgisClose.emit()}_groupResultsByLayer(){let{featureViewModels:e}=this.viewModel,t=new Map;return e.forEach(i=>{let a=i?.graphic;if(!a)return;let s=E(a),o=X(s)?s:null,l=t.get(o)??[];t.set(o,[...l,i])}),t}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(e){this._cancelOpenRelatedFeature();let t=new AbortController;this._openRelatedFeatureAbortController=t,await e.updateGeometry();let i=e.graphic,a=i?.geometry;if(a==null||i==null)return;this._removeFlowItems(),await this.viewModel.zoomTo({target:a});let s=W(a);s!=null&&(this.location=s),this.features=[i],this.open=!0,await this.setFocus(),this._openRelatedFeatureAbortController===t&&(this._openRelatedFeatureAbortController=null)}_handlePaginationMenuButton(){this._updateFeatureMenu()}_openFeatureMenu(){this._updateFeatureMenu(!0)}_closeFeatureMenu(){this._updateFeatureMenu(!1)}_updateFeatureMenu(e=!this.featureMenuOpen){this.featureMenuOpen=e}_previousFeature(){this.viewModel.previous()}_nextFeature(){this.viewModel.next()}_handleFeatureBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this.featureMenuOpen&&this._closeFeatureMenu()}_setActiveFeature(e){let{viewModel:t}=this;t.activeFeature=t.features?.[e]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_selectFeature(e){this.viewModel.selectedFeatureIndex=e,this.initialDisplayMode==="feature"?this._handleFeatureMenuBack():this.setFocus()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),e&&this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_getActionTitle(e){let{messages:t,selectedFeature:i}=this,{id:a}=e,s=i?.attributes,o=e.title??"",l=a==="zoom-to-feature"?h(o,{messages:t}):a==="remove-selected-feature"?h(o,{messages:t}):a==="zoom-to-clustered-features"?h(o,{messages:t}):a==="browse-clustered-features"?h(o,{messages:t}):e.title;return l&&s?h(l,s):l??""}_onMainKeydown(e){let{key:t}=e;t==="ArrowLeft"&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.previous(),this.setFocus()),t==="ArrowRight"&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.next(),this.setFocus())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode&&this._featureMenuViewportNode.value?.scrollContentTo({top:0})}_selectedFeatureIndexUpdated(e,t){let{featureCount:i,waitingForResult:a}=this.viewModel;a||!i||e===t||e===-1||(this._removeFlowItems(),this._rootFlowItemNode.value?.scrollContentTo({top:0}))}_triggerAction(e){this.triggerAction(e),this.arcgisTriggerAction.emit({action:e})}_viewChange(){this.viewModel.clear(),this.open=!1}_closeOpenActionMenu(){let{_actionBarMenuNode:e}=this;e.value&&(e.value.menuOpen=!1)}_removeFlowItems(){this.flowItems?.destroyAll()}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":case"feature-utility-network-association-type":return e.description;case"feature-relationship":return e.allItemsDescription}}_handleDrillInBackClick(){this.flowItems?.pop()?.destroy()}_getHeading(){let{hideHeading:e}=this,{title:t,selectedFeatureViewModel:i}=this.viewModel;return i&&!e?i?.state==="error"?this.messages?.errorMessage??"":i?.title||"":!e&&t?t:""}async _destroySpinner(e){e?.manager?.component?.extraContent?.remove(this._spinnerEl)}async _createSpinner(){let e=this.referenceElement;e&&(await this._destroySpinner(e),this._spinnerEl=T(n`<arcgis-spinner auto-destroy-disabled .label=${this.messages.loading??""} .trackLocation=${!this.hideSpinner&&this.viewModel?.waitingForResult} .location=${this.viewModel?.location??void 0} .view=${this.viewModel?.view??void 0}></arcgis-spinner>`),e.manager?.component?.extraContent?.add(this._spinnerEl))}render(){return n`<div class="root" @keydown=${this._onMainKeydown}>${this._renderHeader()}${this._renderContentContainer()}</div>`}_renderFeatureNavigation(){return[this._renderPagination(),this.initialDisplayMode==="list"?this._renderFeaturePaginationText():this._renderFeatureMenuButton()]}_renderHeader(){return this.featureNavigationTop&&this._featureNavigationVisible?n`<div class="header">${this._renderFeatureNavigation()}</div>`:null}_renderFooter(){return!this.featureNavigationTop&&this._featureNavigationVisible?n`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>`:null}_renderFeaturePaginationText(){let{messages:e,viewModel:t}=this,{featureCount:i,selectedFeatureIndex:a}=t;return n`<div class="pagination-text">${h(e.pageText??"",{index:$(a+1),total:$(i)})}</div>`}_renderFeatureMenuButton(){let{messages:e,viewModel:t}=this,{featureCount:i,selectedFeatureIndex:a,pendingPromisesCount:s}=t;return n`<calcite-action class="pagination-menu-button" icon=list .label=${e.selectFeature} .loading=${s>0} @click=${this._handlePaginationMenuButton} .text=${h(e.pageText??"",{index:$(a+1),total:$(i)})} text-enabled title=${e.selectFeature??c}></calcite-action>`}_renderPagination(){let{previous:e,next:t}=this.messages;return n`<calcite-action-bar class="pagination-action-bar" expand-disabled layout=horizontal overflow-actions-disabled scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${e??""} @click=${this._previousFeature} .text=${e??""} title=${e??""??c}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${t??""} @click=${this._nextFeature} .text=${t??""} title=${t??""??c}></calcite-action></calcite-action-group></calcite-action-bar>`}_renderFeatureMenuItem(e){let{initialDisplayMode:t}=this,{selectedFeatureViewModel:i,featureViewModels:a}=this.viewModel,s=e===i,o=a.indexOf(e);return n`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${()=>this._setActiveFeature(o)} @mouseleave=${this._removeActiveFeature} @mouseover=${()=>this._setActiveFeature(o)} .selected=${s} @calciteListItemSelect=${()=>this._selectFeature(o)}><span .innerHTML=${(P.sanitize(e.title)||this.messages.untitled)??""} slot=content></span>${t==="list"?n`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`:null}</calcite-list-item>`}_renderFeatureMenu(){let{messages:e,viewModel:t}=this,i=this._groupResultsByLayer(),a=this.initialDisplayMode==="list"?"none":"single";return t.featureViewModels.length?n`<calcite-list display-mode=flat .label=${e?.featuresList??""} selection-appearance=icon .selectionMode=${a}>${Array.from(i.keys(),s=>{let o=i.get(s)?.map(r=>this._renderFeatureMenuItem(r)),l=s?s.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&l!==null?C(s??"map-graphics",n`<calcite-list-item-group .heading=${l}>${o}</calcite-list-item-group>`):o})}</calcite-list>`:null}_renderHeaderAction(e){let t=e.title||"";return e.visible?n`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .indicator=${e.active} .loading=${e.active} @click=${()=>this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t??c}></calcite-action>`:null}_renderHeaderActions(){return this.headerActions.map(e=>this._renderHeaderAction(e)).toArray()}_renderContentFeature(){let{headingLevel:e,hideCloseButton:t,_isCollapsed:i,_collapseEnabled:a,featureNavigationTop:s,flowItems:o,initialDisplayMode:l,selectedFeature:r,featureMenuOpen:p}=this,{active:g}=this.viewModel,f=this._getHeading();if(l==="list"&&!r)return null;let m=o.length===0&&(l==="list"?!!r:!p);return n`<calcite-flow-item class=${F(b({"content-feature":!0,"flow-item-collapsed":i}))} .closable=${!t} .closed=${!g} .collapsed=${i} .collapseDirection=${s?"down":"up"} .collapsible=${a} .headingLevel=${e} .selected=${m} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} .heading=${A(f)} ${v(this._rootFlowItemNode)}>${this._renderHeaderActions()}${this._renderActionBar()}<div class=${F(b("container","content-container"))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`}_renderFeatureMenuContainer(){let{viewModel:e,hideCloseButton:t,featureMenuTitle:i,messages:a,initialDisplayMode:s,featureMenuOpen:o,selectedFeature:l,_collapseEnabled:r,_isCollapsed:p,featureNavigationTop:g,headingLevel:f}=this,{active:m,featureViewModels:H,pendingPromisesCount:S}=e,z=i??a.selectFeature;if(s==="feature"&&!o)return null;let U=s==="list"?!l:o;return n`<calcite-flow-item class=${F(b({"flow-item-collapsed":p}))} .closable=${s==="list"&&!t} .closed=${!m} .collapsed=${s==="list"&&p} .collapseDirection=${g?"down":"up"} .collapsible=${s==="list"&&r} .description=${this.hideFeatureMenuHeading?void 0:h(a.total??"",{total:H.length})} .heading=${this.hideFeatureMenuHeading?void 0:z} .headingLevel=${f} .loading=${e.waitingForContents} .selected=${U} @calciteFlowItemBack=${Z=>{Z.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${v(this._featureMenuViewportNode)}>${s==="list"?this._renderHeaderActions():null}${S>0?n`<calcite-loader class="loader" inline .label=${a.loading??""} slot=header-actions-end></calcite-loader>`:null}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" ${v(this._featureMenuIntersectionObserverCreated)}></div>${s==="feature"?n`<calcite-button appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full>${a.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{messages:i,hideCloseButton:a,active:s}=this,o="graphic"in e&&"isFeatureFromTable"in e&&!e.isFeatureFromTable,l=e.flowType==="feature-association",r=i.returnToInitialFeature??"",p=i?.selectFeature,g=this._getActionTitle(M),f=!this.hideActionBar&&l&&o;return n`<calcite-flow-item .closable=${!a} .closed=${!s} .description=${A(this._getDrillInFlowItemDescription(e)??"")} .heading=${this.hideHeading?void 0:A(e.heading??"")} .selected=${t} @calciteFlowItemBack=${m=>{m.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${r??""} title=${r??""??c}></calcite-action>${o?n`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${p??""} title=${p??c}></calcite-action>`:null}${f?n`<calcite-action-bar expand-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${M.disabled} .icon=${M.icon??void 0} .loading=${M.active} scale=s text-enabled .text=${g} title=${g??c} @click=${()=>B(this.viewModel,e)}></calcite-action></calcite-action-group></calcite-action-bar>`:null}<div class="container">${e}</div></calcite-flow-item>`}_renderContentContainer(){let e=this.flowItems?.toArray(),t=e?.map((a,s)=>this._renderFlowItem(a,this.initialDisplayMode==="list"||!this.featureMenuOpen&&s===e.length-1)),i=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(),t]:[this._renderContentFeature(),t,this._renderFeatureMenuContainer()];return n`<calcite-flow ${v(this._flowContainerNode)}>${i}</calcite-flow>`}_renderActionBar(){let e=this.viewModel.selectedFeatureViewModel?.isFeatureFromTable&&!this.location?this.viewModel.allActions.filter(t=>t.id!==M.id):this.viewModel.allActions;return!this._isCollapsed&&!this.hideActionBar&&e.length?n`<calcite-action-bar expand-disabled .expanded=${!this._hideActionText} scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s ${v(this._actionBarMenuNode)}>${this._renderActions()}</calcite-action-group></calcite-action-bar>`:null}_renderActions(){return this.viewModel.allActions.toArray().map(e=>{let t=this._getActionTitle(e);return n`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .loading=${e.active} scale=s .textEnabled=${!this._hideActionText} .text=${t??""} title=${t??c} .hidden=${!e.visible} @click=${()=>this._triggerAction(e)}></calcite-action>`})}_renderContent(){let{content:e,selectedFeatureViewModel:t}=this.viewModel;return t?C(t,n`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${v(this._selectedFeatureComponent)}></arcgis-feature>`):typeof e=="string"?C(e,n`<div .innerHTML=${P.sanitize(e)??""}></div>`):e??null}};k("arcgis-features",y);return y},"widgets/Features/FeaturesViewModel","intl","core/reactiveUtils","applications/Components/stringUtils","core/Collection","applications/Components/sanitizerUtils","applications/Components/featureUtils",a,d,e,f,g,h,i)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import b from"./
|
|
2
|
+
import b from"./YET5HTLQ.js";import"./FF5VMKLK.js";import a from"./5MHPKAFK.js";import{a as I}from"./PC4PAQXQ.js";import{O as $,U as N,a as B,b as h}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([{watch:Be,when:$e},Ne,Ce,Me,{compileExpression:Pe},{a:k,d:_},{p:C}])=>{var te=typeof global=="object"&&global&&global.Object===Object&&global,M=te;var re=typeof self=="object"&&self&&self.Object===Object&&self,ae=M||re||Function("return this")(),O=ae;var oe=O.Symbol,g=oe;var P=Object.prototype,fe=P.hasOwnProperty,se=P.toString,b=g?g.toStringTag:void 0;function le(e){var t=fe.call(e,b),a=e[b];try{e[b]=void 0;var r=!0}catch{}var o=se.call(e);return r&&(t?e[b]=a:delete e[b]),o}var F=le;var ie=Object.prototype,pe=ie.toString;function ue(e){return pe.call(e)}var z=ue;var de="[object Null]",me="[object Undefined]",D=g?g.toStringTag:void 0;function ne(e){return e==null?e===void 0?me:de:D&&D in Object(e)?F(e):z(e)}var q=ne;function xe(e){return e!=null&&typeof e=="object"}var J=xe;var ce="[object Symbol]";function he(e){return typeof e=="symbol"||J(e)&&q(e)==ce}var U=he;var ge=/\s/;function ye(e){for(var t=e.length;t--&&ge.test(e.charAt(t)););return t}var G=ye;var ve=/^\s+/;function be(e){return e&&e.slice(0,G(e)+1).replace(ve,"")}var K=be;function Te(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var c=Te;var V=NaN,Ie=/^[-+]0x[0-9a-f]+$/i,ke=/^0b[01]+$/i,Oe=/^0o[0-7]+$/i,we=parseInt;function Se(e){if(typeof e=="number")return e;if(U(e))return V;if(c(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=c(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=K(e);var a=ke.test(e);return a||Oe.test(e)?we(e.slice(2),a?2:8):Ie.test(e)?V:+e}var E=Se;var je=function(){return O.Date.now()},w=je;var _e="Expected a function",Ee=Math.max,We=Math.min;function Le(e,t,a){var r,o,l,p,s,i,d=0,y=!1,m=!1,x=!0;if(typeof e!="function")throw new TypeError(_e);t=E(t)||0,c(a)&&(y=!!a.leading,m="maxWait"in a,l=m?Ee(E(a.maxWait)||0,t):l,x="trailing"in a?!!a.trailing:x);function u(f){var n=r,v=o;return r=o=void 0,d=f,p=e.apply(v,n),p}function Q(f){return d=f,s=setTimeout(T,t),y?u(f):p}function Y(f){var n=f-i,v=f-d,R=t-n;return m?We(R,l-v):R}function L(f){var n=f-i,v=f-d;return i===void 0||n>=t||n<0||m&&v>=l}function T(){var f=w();if(L(f))return A(f);s=setTimeout(T,Y(f))}function A(f){return s=void 0,x&&r?u(f):(r=o=void 0,p)}function Z(){s!==void 0&&clearTimeout(s),d=0,r=i=o=s=void 0}function ee(){return s===void 0?p:A(w())}function j(){var f=w(),n=L(f);if(r=arguments,o=this,i=f,n){if(s===void 0)return Q(i);if(m)return clearTimeout(s),s=setTimeout(T,t),u(i)}return s===void 0&&(s=setTimeout(T,t)),p}return j.cancel=Z,j.flush=ee,j}var X=Le;var Ae="Expected a function";function Re(e,t,a){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(Ae);return c(a)&&(r="leading"in a?!!a.leading:r,o="trailing"in a?!!a.trailing:o),X(e,t,{leading:r,maxWait:t,trailing:o})}var S=Re;var Fe=B`.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}`,H=1,W=class extends ${constructor(){super(...arguments),this._compileThrottled=S(this._startCompile,H),this._evaluateThrottled=S(this._startEvaluate,H),this.headingLevel=2}static{this.properties={_compileTask:16,_evaluateTask:16,values:0,fieldInfoMap:0,expressionInfo:0,graphic:0,headingLevel:9,interceptor:0,location:0,messages:0,spatialReference:0,map:0,view:0}}static{this.styles=Fe}loaded(){this.manager.onLifecycle(()=>[Be(()=>[this.expressionInfo,this.graphic],()=>this._compileThrottled(),{initial:!0}),$e(()=>{if(!this._compileTask?.finished)return null;let t=this._compileTask.value,a=t?.dependencies,{view:r}=this;return[t,this.spatialReference,this.map,r,a?.has("view-scale")&&r&&"scale"in r?r.scale:null,a?.has("view-time-extent")?r?.timeExtent?.start:null,a?.has("view-time-extent")?r?.timeExtent?.end:null]},([t])=>this._evaluateThrottled(t)),{remove:()=>this._cancelThrottles()}])}_cancelThrottles(){this._compileThrottled.cancel(),this._evaluateThrottled.cancel()}_startCompile(){this._evaluateTask=I(this._evaluateTask),this._compileTask=I(this._compileTask),this._compileTask=_(async t=>{let{expressionInfo:a,graphic:r}=this,o=a?.expression;if(!o||!r)return null;let l=await Pe({expression:o,graphic:r});return k(t),l})}_startEvaluate(t){this._evaluateTask=I(this._evaluateTask),this._evaluateTask=_(async a=>{let{graphic:r}=this;if(!t||!r)return null;let{interceptor:o,spatialReference:l,map:p,location:s,view:i}=this,d=await t.evaluate({graphic:r,interceptor:o,location:s,map:p,options:{signal:a},spatialReference:l,view:i});k(a);let y=d&&"castAsJsonAsync"in d&&typeof d.castAsJsonAsync=="function"?d:null;if(!y)return null;let m=await y.castAsJsonAsync(a);k(a);let x=m?.type,u=x==="media"?Ne.fromJSON(m):x==="text"?Me.fromJSON(m):x==="fields"?Ce.fromJSON(m):null;return!u||u.type==="media"&&!u.mediaInfos||u.type==="fields"&&!u.fieldInfos||u.type==="text"&&!u.text?null:u})}render(){let t=!this._compileTask?.finished||!this._evaluateTask?.finished;return h`<div class="root">${t?this._renderLoading():this._evaluateTask?.value?this._renderContent():null}</div>`}_renderContent(){let{values:t,fieldInfoMap:a}=this,r=this._evaluateTask?.value,o=r?.type,l={...t,...r?.attributes};if(!o)return null;if(o==="text"){let p=C({values:l,fieldInfoMap:a??new Map,globalValues:l,layer:void 0,text:r.text});return h`<arcgis-feature-content .creator=${p} .graphic=${this.graphic}></arcgis-feature-content>`}else if(o==="media"){let{title:p,description:s,mediaInfos:i}=r;return i?.length?h`<arcgis-feature-media .heading=${p??""} .values=${l} .formattedValues=${l} .description=${s??""} .mediaInfos=${i} .messages=${this.messages} .headingLevel=${this.headingLevel}></arcgis-feature-media>`:null}else if(o==="fields"){let{title:p,description:s,fieldInfos:i}=r;return i?.length?h`<arcgis-feature-fields .fieldInfos=${i} .heading=${p??""} .values=${l} .description=${s??""} .headingLevel=${this.headingLevel} .messages=${this.messages}></arcgis-feature-fields>`:null}return null}_renderLoading(){return h`<div class="loading-container"><calcite-loader inline label></calcite-loader></div>`}};N("arcgis-feature-expression",W);return W},"core/reactiveUtils","popup/content/MediaContent","popup/content/FieldsContent","popup/content/TextContent","applications/Components/arcadeFeatureUtils",a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{e as M,f as k,g as T,h as ae,i as m}from"./IQPGSWSL.js";import{a as U}from"./GFQGSSBN.js";import{a as Y}from"./6ORHT4GS.js";import{a as S}from"./IGSZABNU.js";import c from"./5MHPKAFK.js";import"./PC4PAQXQ.js";import"./AE6R5TA3.js";import"./TFUFDVQ6.js";import{a as ie}from"./SVVJHTPA.js";import"./YMPJFJHK.js";import b from"./RO4TU5R3.js";import"./55IJQTCC.js";import"./7DOI3267.js";import a from"./O5TDDX7K.js";import"./EHZW6UXL.js";import{M as R,N as B,O as X,Q as G,R as O,U as ee,a as W,b as p,x as j}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([{watch:oe,when:ye,whenOnce:Se},me,De,ke,{createTrackingTarget:Te,runTracked:le,signal:$e},,{a:te},{e:re,f:se,g:ne}])=>{function Pe(t,e){return t/15}function Ce(t,e){let i=t?.[0];if(i==null)return null;e||(e={hours:0,minutes:0,seconds:0}),e.hours=Pe(i);let r=e.hours%1;e.hours-=r,e.minutes=r*60;let s=e.minutes%1;return e.minutes-=s,e.seconds=Math.round(s*60),e}function ze(t){let e=Ce([t.longitude,t.latitude]);return e==null?0:Math.round(e.hours+e.minutes/60+e.seconds/3600)}function _e(t,e){return(t%e+e)%e}var q=class{#i;#r;#s=Te(()=>{this.#t()});constructor(e){this.#r=e;let i;le(this.#s,()=>{i=e()}),this.#i=$e(i)}#t(){let e=this.#i.value;le(this.#s,()=>{this.#i.value=this.#r(e)})}mutate(e){this.#i.value=e}get value(){return this.#i.value}};function F(t){return new q(t)}var N=Math.PI,g=Math.sin,$=Math.cos,Oe=Math.asin,Ue=Math.acos,w=N/180,fe=1e3*60*60*24,be=2440588,ve=2451545;function Me(t){return t.valueOf()/fe-.5+be}function E(t){return new Date((t+.5-be)*fe)}function Ee(t){return Me(t)-ve}var ce=w*23.4397;function Le(t,e){return Oe(g(e)*$(ce)+$(e)*g(ce)*g(t))}function Ae(t){return w*(357.5291+.98560028*t)}function Ne(t){return w*(1.9148*g(t)+.02*g(2*t)+3e-4*g(3*t))}function He(t,e){var i=w*102.9372;return t+e+i+N}var D={};D.PolarException={NORMAL:0,MIDNIGHT_SUN:1,POLAR_NIGHT:2};var Z=[[-.83,"sunrise","sunset"]],we=9e-4;function Ie(t,e){return Math.round(t-we-e/(2*N))}function de(t,e,i){return we+(t+e)/(2*N)+i}function he(t,e,i){return ve+t+.0053*g(e)-.0069*g(2*i)}function je(t,e,i){return Ue((g(t)-g(e)*g(i))/($(e)*$(i)))}D.getTimes=function(t,e,i){var r=w*-i,s=w*e,n=Ee(t),a=Ie(n,r),l=de(0,r,a),o=Ae(l),d=Ne(o),c=He(o,d),h=Le(c,0),u=he(l,o,c);function x(I){var z=je(I,s,h),xe=de(z,r,a);return he(xe,o,c)}function y(I){var z=(g(I)-g(s)*g(h))/($(s)*$(h));return z<-1?D.PolarException.MIDNIGHT_SUN:z>1?D.PolarException.POLAR_NIGHT:D.PolarException.NORMAL}var f={solarNoon:E(u),nadir:E(u-.5),polarException:D.PolarException.NORMAL},v,_,C,H,Q;for(v=0,_=Z.length;v<_;v+=1)C=Z[v],H=x(C[0]*w),Q=u-(H-u),f[C[1]]=E(Q),f[C[2]]=E(H);return f.polarException=y(Z[0][0]*w),f};var Re={spring:{dayOfMonth:20,month:2},summer:{dayOfMonth:21,month:5},fall:{dayOfMonth:23,month:8},winter:{dayOfMonth:21,month:11}},V=["spring","summer","fall","winter"];function P(t,e,i){let r=K(e,i),{dayOfMonth:s,month:n}=Re[r],a=new Date(t.getTime());return a.setMonth(n,s),a}function Be(t,e){let i=Ge(t);return K(i,e)}function Ge(t){let e=t.getTime(),i=P(t,"spring","northern").getTime(),r=P(t,"summer","northern").getTime(),s=P(t,"fall","northern").getTime(),n=P(t,"winter","northern").getTime();return e>=i&&e<r?"spring":e>=r&&e<s?"summer":e>=s&&e<n?"fall":"winter"}function K(t,e){return e==="northern"?t:Ye(t)}function ge(t){return t>=0?"northern":"southern"}function Ye(t){let e=V.indexOf(t);return V[(e+2)%4]}var Fe=1440,Ze=864e5;function qe(t,e,i,r){let s=D.getTimes(t,e,i),n=s.sunrise,a=s.sunset,l=k(t,r),o=k(n,r),d=k(a,r);if(l.getUTCDate()!==o.getUTCDate()||l.getUTCDate()!==d.getUTCDate()){let c=l.getTime()-o.getTime()>0?1:-1;n.setUTCDate(n.getUTCDate()+c),a.setUTCDate(a.getUTCDate()+c)}return{sunrise:n,sunset:a}}var Ve=100,Je=1e3,b=12e5,L=72e5;function ue(t,e){return _e(t+e,24)}function Ke({mode:t,lighting:e,getPlaySpeed:i,onProgress:r,beforeProgress:s}){let n=-1;function a(l=Date.now()){let o=e.date,d=Date.now()-(l??0);if(t==="day"){l=Date.now();let c=i()/Ve*d;if(c>0){let h=new Date(o.getTime()+c),u=e.displayUTCOffset??0,x=ue(h.getUTCHours(),u),y=ue(o.getUTCHours(),u);x<y&&(h=new Date(o.getTime()+c-Ze));let f=e.clone();s?.(),e.date=h,r?.(f,e)}}else if(d>Je){l=Date.now();let c=(o.getUTCMonth()+1)%12,h=new Date(o.getTime());h.setUTCMonth(c);let u=e.clone();s?.(),e.date=h,r?.(u,e)}n=requestAnimationFrame(()=>a(l))}return a(),U(()=>cancelAnimationFrame(n))}var A=b/4;function Qe(t,e,i,r){let{day:s,night:n=s,twilight:a=s}=r,l=s*A,o=n*A,d=a*A;if(t==null||e==null||Number.isNaN(t.getTime())&&Number.isNaN(e.getTime()))return l;let c=i.getTime(),h=t.getTime(),u=e.getTime(),x=h-L/2,y=h+L/2,f=u-L/3*2,v=u+L/3,_=l;return c>=x&&c<=y?c-x<=b?_=o-(c-x)/b*(o-d):y-c<=b/2?_=l-(y-c)/b*2*(l-d):_=d:c>=f&&c<=v?c-f<=b/2?_=l-(c-f)/b*2*(l-d):v-c<=b?_=o-(v-c)/b*(o-d):_=d:(c<h||c>u)&&(_=o),_}var We=W`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}@supports (-ms-ime-align: auto){.esri-slider__anchor:focus{outline:1px dotted var(--calcite-color-foreground-current)}}.esri-slider{-webkit-user-select:none;user-select:none;direction:ltr;width:100%;height:100%;display:flex}.esri-disabled{pointer-events:none}.esri-disabled .esri-slider__content,.esri-disabled .esri-slider__min,.esri-disabled .esri-slider__max{opacity:var(--calcite-opacity-light)}.esri-slider--reversed.esri-slider--horizontal{flex-direction:row-reverse}.esri-slider--reversed.esri-slider--vertical{flex-direction:column}.esri-slider--horizontal{flex-direction:row}.esri-slider--horizontal .esri-slider__content{height:auto}.esri-slider--horizontal .esri-slider__track{width:100%;height:2px}.esri-slider--horizontal .esri-slider__segment--interactive:hover{cursor:ew-resize}.esri-slider--horizontal .esri-slider__anchor{width:1px;height:100%}.esri-slider--horizontal .esri-slider__label{text-align:center;margin:0 11px;top:-30px;left:-50px}.esri-slider--horizontal .esri-slider__label-input{text-align:center}.esri-slider--horizontal .esri-slider__max,.esri-slider--horizontal .esri-slider__min{flex:none;width:50px;height:auto;margin:auto}.esri-slider--horizontal .esri-slider__ticks{width:100%;margin:9px 0 0;top:100%;left:0}.esri-slider--horizontal .esri-slider__tick{width:1px;height:5px}.esri-slider--horizontal .esri-slider__tick-label{margin-top:18px}.esri-slider--vertical{flex-direction:column-reverse}.esri-slider--vertical .esri-slider__content{flex-direction:column;width:auto}.esri-slider--vertical .esri-slider__track{flex-direction:column;flex:1 0 0;width:2px;height:100%}.esri-slider--vertical .esri-slider__segment--interactive:hover{cursor:ns-resize}.esri-slider--vertical .esri-slider__anchor{width:100%;height:1px}.esri-slider--vertical .esri-slider__label{text-align:left;top:-10px;left:20px}.esri-slider--vertical .esri-slider__max,.esri-slider--vertical .esri-slider__min{flex:0 0 22px;width:100%;margin:auto}.esri-slider--vertical .esri-slider__ticks{margin:0 0 0 11px;top:0;left:100%}.esri-slider--vertical .esri-slider__tick{width:5px;height:1px}.esri-slider--vertical .esri-slider__tick-label{margin-left:30px}.esri-slider__content{z-index:0;flex:1 0 auto;justify-content:center;align-items:center;margin:auto;line-height:0;display:flex;position:relative}.esri-slider__track{touch-action:none;background-color:var(--calcite-color-border-ghost);display:inline-block;position:relative}.esri-slider__segment{transform-origin:0 0;will-change:transform;touch-action:none;width:100%;height:100%;position:absolute;top:0;left:0}.esri-slider__segment:hover{cursor:pointer}.esri-slider__anchor{touch-action:none;-webkit-user-select:none;user-select:none;background-color:var(--calcite-color-brand);position:absolute}.esri-slider__anchor:focus .esri-slider__thumb,.esri-slider__anchor:focus .esri-slider__label{outline:inherit}.esri-slider__anchor--moving:focus .esri-slider__thumb{cursor:grabbing;border:3px solid var(--calcite-color-brand-press)}.esri-slider__anchor--moving .esri-slider__label:hover,.esri-slider__anchor--moving .esri-slider__label--interactive:hover{cursor:grabbing}.esri-slider__thumb{box-sizing:border-box;z-index:1;touch-action:none;background-color:var(--calcite-color-foreground-2);border:2px solid var(--calcite-color-brand);border-radius:16px;width:16px;height:16px;transition:all .125s ease-in-out;position:absolute;top:-7px;left:-7px}.esri-slider__thumb:hover{cursor:grab;border-width:3px;border-color:var(--calcite-color-brand-press);width:19.2px;height:19.2px;top:-8.6px;left:-8.6px}.esri-slider__label{min-width:80px;line-height:var(--calcite-font-line-height-fixed-xl);position:absolute}.esri-slider__label:hover{cursor:grab}.esri-slider__label--interactive:hover,.esri-slider__max--interactive:hover,.esri-slider__min--interactive:hover{cursor:pointer;text-decoration:underline}.esri-slider__label-input{z-index:1;width:100%;position:relative}.esri-slider__extra-content{display:inline-block}.esri-slider__max,.esri-slider__min{text-align:center;justify-content:center;align-items:center;height:22px;line-height:var(--calcite-font-line-height-fixed-xl);display:flex}.esri-slider__max--interactive:hover,.esri-slider__min--interactive:hover{background-color:var(--calcite-color-foreground-2)}.esri-slider__range-input{text-align:center;width:100%;padding:1px 0}.esri-slider__ticks{z-index:0;height:100%;display:inline-block;position:absolute}.esri-slider__tick{background:var(--calcite-color-foreground-1);position:absolute}.esri-slider__tick-label{width:max-content;position:absolute}:dir(rtl) .esri-slider__label,:dir(rtl) .esri-slider__max,:dir(rtl) .esri-slider__min,:dir(rtl) .esri-slider__tick-label{direction:rtl;unicode-bidi:plaintext}:dir(rtl) .esri-slider__range-input,:dir(rtl) .esri-slider__label-input{unicode-bidi:plaintext}:host{width:350px}.root{display:flex;flex-direction:column;overflow:visible;gap:var(--calcite-spacing-md);justify-content:space-between;padding:var(--arcgis-internal-padding);position:relative;calcite-label{--calcite-label-margin-bottom: 0}&.loading>*:not(calcite-scrim){opacity:0}}.unsupported{padding:0 var(--calcite-spacing-lg);animation:esri-fade-in .25s ease-in-out}.slider{margin-block-start:0rem}.time-configuration{--date-play-button-offset: 11px;--slider-play-button-offset: var(--calcite-spacing-md-plus);display:grid;gap:var(--calcite-spacing-md);grid-template-columns:1fr min-content;.slider-container{grid-column:1;+calcite-button{grid-column:2;transform:translateY(var(--slider-play-button-offset))}}.timezone-input-container{grid-column:1;min-width:0;+span{grid-column:2}}.date-picker-container{grid-column:1;+calcite-button{grid-column:2;transform:translateY(var(--date-play-button-offset))}}calcite-button{place-self:center}}`,Xe={day:1,night:6,twilight:2/3},J=class extends X{constructor(){super(...arguments),this.messages=ie({blocking:!0}),this.#r="none",this.#s=null,this.#a=R(),this.#o=R(),this.#d=200,this.#h=200,this.#e={},this._offset=F(e=>m(this._lighting)?this._lighting.displayUTCOffset??e:e),this._timesliderPosition=F(e=>{if(m(this._lighting)){let i=this._lighting.displayUTCOffset??0,r=this._lighting.date;if(M(r)){let{minutesSinceMidnight:s}=T(r,i);return s}else return e}return e}),this._localDate=F(e=>ae(this._view)??e),this.view=te(this),this.autoDestroyDisabled=!1,this.dateOrSeason="date",this.headingLevel=2,this.hideDatePicker=!1,this.hideHeader=!1,this.hidePlayButtons=!1,this.hideShadowsToggle=!1,this.hideSunLightingToggle=!1,this.hideTimezone=!1,this.icon="brightness",this.playSpeedMultiplier=1,this.timeSliderSteps=5,this.arcgisReady=j(),this.arcgisUserDateTimeChange=j(),this.#c=!1}static{this.properties={view:0,_playingState:16,_sunlightingDisabled:16,autoDestroyDisabled:5,currentSeason:1,dateOrSeason:3,dayPlaying:5,_directShadowsDisabled:16,headingLevel:9,hideDatePicker:5,hideHeader:5,hidePlayButtons:5,hideShadowsToggle:5,hideSunLightingToggle:5,hideTimezone:5,icon:3,label:1,playSpeedMultiplier:9,referenceElement:1,timeSliderSteps:9,utcOffset:9,timeSliderPosition:9,localDate:1,yearPlaying:5}}static{this.styles=We}get _view(){return this.view?.type==="3d"?this.view:void 0}#i;#r;#s;#t;#a;#o;#d;#h;#l(){if(this.#t)return;let e=se(()=>{if(this.#t?.remove(),m(this._lighting)){let i=this.utcOffset??0,r=this.timeSliderPosition??0,s=this.localDate,n=r-i*60,a=k(s,n,"minutes");this._lighting.date=a,this._lighting.displayUTCOffset=i}},{timeout:this.#d});this.#t=U(()=>{ne(e),this.#t=void 0})}#u({scale:e,disabled:i}){let{messages:r}=this;return p`<calcite-label .scale=${e} class="date-picker-container">${r.date}${ei({disabled:i,scale:e,date:this.localDateAsString,onDateChange:s=>{let n=s.currentTarget.value,a=Array.isArray(n)?n[0]:n;this._stopPlaying(),this.localDate=a,this._emitUserDateTimeChangeEvent()}})}</calcite-label>${S({hidden:this.hidePlayButtons,children:pe({playing:this.yearPlaying,disabled:i,label:r.playYear,onClick:()=>{this._playingState==="year"?this._playingState="none":this._playingState="year"},scale:e})})}`}#p({scale:e,disabled:i}){let{messages:r}=this;return p`<calcite-label .scale=${e} class="date-picker-container">${r.season}${ii({scale:e,selectedSeason:this.currentSeason,disabled:i,messages:r,onSeasonChange:s=>{this._stopPlaying(),this.currentSeason=s.currentTarget.value}})}</calcite-label>`}#e;get#g(){return this.#o?.value?.startTime}get localDateAsString(){return this._localDate.value??""}get _playingState(){return this.#r}set _playingState(e){this.#r=e,this.#n?.remove(),e==="none"?this.#i?.remove():(this._play(e),this._emitUserDateTimeChangeEvent())}get _lighting(){return this._view?.environment?.lighting}get _sunlightingDisabled(){return!m(this._lighting)}set _sunlightingDisabled(e){this.#e.sunlightingDisabled=e;let i=this._view?.environment;if(i==null)return;let r=i.lighting,s=this.#s;this.#s=r;let n={directShadowsEnabled:r.directShadowsEnabled,glow:r.glow};m(r)&&(n.cameraTrackingEnabled=r.cameraTrackingEnabled);let a=e?"virtual":"sun",l;s?.type===a?l=s:l=e?new ke:new De,l.set(n),i.lighting=l,e||(this._stopPlaying(),this.#a.value&&(this.#a.value.open=!1))}get currentSeason(){let e=this._view?.camera?.position?.latitude??0,i=ge(e);return Be(this.localDate,i)}set currentSeason(e){this._stopPlaying();let i=this._view?.camera?.position?.latitude??0,r=ge(i),s=K(e,r);this.localDate=P(this.localDate,s,"northern"),this._emitUserDateTimeChangeEvent()}get dayPlaying(){return this._playingState==="day"}set dayPlaying(e){this._playingState=e?"day":"none"}get _directShadowsDisabled(){return!this._lighting?.directShadowsEnabled}set _directShadowsDisabled(e){this.#e.directShadowsDisabled=e,this._lighting&&(this._lighting.directShadowsEnabled=!e)}get utcOffset(){return this._offset.value}set utcOffset(e){this._offset.mutate(e),this.#l()}get timeSliderPosition(){return this._timesliderPosition.value}set timeSliderPosition(e){this._timesliderPosition.mutate(_e(e??0,Fe)),this.#l()}get localDate(){return this._localDate.value!=null?new Date(this._localDate.value):new Date}set localDate(e){let i=new Date(e);if(M(i)){i.setUTCFullYear(i.getFullYear(),i.getMonth(),i.getDate());let r=i.toISOString().slice(0,10);this._localDate.mutate(r),this.#l()}}get yearPlaying(){return this._playingState==="year"}set yearPlaying(e){this._playingState=e?"year":"none"}async destroy(){await this.manager.destroy()}async load(){this.#e.utcOffset=this.utcOffset,this.#e.timeSliderPosition=this.timeSliderPosition,this.#e.localDate=this.localDateAsString,this.manager.onLifecycle(()=>[oe(()=>{let e=null;if(m(this._lighting)){let i=this._lighting.displayUTCOffset??0,r=this._lighting.date;if(M(r)){let{minutesSinceMidnight:s}=T(r,i);e=s}}return e},e=>{let i=this.#g;e!=null&&i!==e&&this._emitUserDateTimeChangeEvent()},{sync:!0}),oe(()=>{let e=this._view?.camera?.position;return e?ze(e):void 0},e=>{let i=this._lighting;m(i)&&i.cameraTrackingEnabled&&(i.displayUTCOffset=e)},{sync:!0,initial:!0}),ye(()=>!m(this._lighting),()=>{this._stopPlaying()}),me.onLocaleChange(()=>{this.requestUpdate()})]),this.manager.onDisconnected(()=>{this.#i?.remove(),this.#t?.remove(),this.#n?.remove()})}willUpdate(e){if(super.willUpdate(e),!!this.#c&&m(this._lighting)&&e.has("utcOffset")){let i=this.utcOffset??0,r=this._lighting.displayUTCOffset??0,s=this.timeSliderPosition??0,n=this.localDate,a=s-r*60,l=k(n,a,"minutes"),{minutesSinceMidnight:o,localDate:d}=T(l,i);this._timesliderPosition.mutate(o),this._localDate.mutate(d)}}#c;async loaded(){let e=new AbortController;this.manager.onDisconnected(()=>({remove:()=>{e.abort()}})),await re(Se(()=>this._view?.ready,{signal:e.signal}).then(()=>{this.utcOffset=this.#e.utcOffset??this.utcOffset,this.timeSliderPosition=this.#e.timeSliderPosition??this.timeSliderPosition,this.localDate=this.#e.localDate??this.localDate,this.#e.directShadowsDisabled!=null&&(this._directShadowsDisabled=this.#e.directShadowsDisabled),this.#e.sunlightingDisabled!=null&&(this._sunlightingDisabled=this.#e.sunlightingDisabled),this.#e={};let i=this._playingState;i!=="none"&&this.#i==null&&this._play(i)})),this.#c=!0}_emitUserDateTimeChangeEvent(){this.isConnected&&this.arcgisUserDateTimeChange.emit()}_stopPlaying(){this._playingState="none"}#n;#m(e){if(this.#n)return;let i=setTimeout(()=>{let r=e.displayUTCOffset??0,s=e.date,{minutesSinceMidnight:n}=T(s,r);this._timesliderPosition.mutate(n),this.#n?.remove()},this.#h);this.#n=U(()=>{clearTimeout(i),this.#n=void 0;let r=this._lighting;if(m(r)){let s=r.displayUTCOffset??0,n=r.date,{minutesSinceMidnight:a}=T(n,s);this._timesliderPosition.mutate(a)}})}_play(e){this.#i?.remove();let i=this._view;if(i==null||this._sunlightingDisabled)return;let r=i.environment.lighting;if(!m(r))return;let s=0;this.#i=Ke({mode:e,lighting:r,beforeProgress:()=>{s=this.#g??0},onProgress:(n,a)=>{this._timesliderPosition.mutate(s),this.#m(a)},getPlaySpeed:()=>{let n=this._view,a=this._view?.environment.lighting;if(n!=null&&m(a)){let l=n.camera.position.latitude??0,o=n.camera.position.longitude??0,{sunrise:d,sunset:c}=qe(a.date,l,o,a.displayUTCOffset??0);return Qe(d,c,a.date,Xe)*this.playSpeedMultiplier}else return A*this.playSpeedMultiplier}})}render(){let{messages:e,dateOrSeason:i}=this,r=this._sunlightingDisabled,s="m";if(this._view?.type!=="3d")return Y({class:"root",label:e.componentLabel,title:e.title,hideHeader:this.hideHeader,headingLevel:this.headingLevel,children:p`<div class="unsupported"><p>${e.unsupported}</p></div>`});let n=(this.utcOffset??0)*60,a=this.view?.ready===!0,l=Array.isArray(this.timeSliderSteps)?this.timeSliderSteps.at(0):this.timeSliderSteps;return Y({class:{root:!0,loading:!a},label:e.componentLabel,title:e.title,hideHeader:this.hideHeader,headingLevel:this.headingLevel,children:p`${a?void 0:p`<calcite-scrim loading></calcite-scrim>`}<div class="time-configuration" style=${G({columnGap:this.hidePlayButtons?"0":void 0})}><calcite-label class="slider-container" .scale=${s}>${e.timeSliderLabel}<arcgis-time-of-day-slider class="slider" .disabled=${this._sunlightingDisabled} mode=single .startTime=${this.timeSliderPosition??0} .steps=${l} style=${G({gridArea:"slider"})} @arcgisTimeChange=${({currentTarget:o})=>{this._stopPlaying(),this._emitUserDateTimeChangeEvent(),this.timeSliderPosition=o.startTime}} ${B(this.#o)}></arcgis-time-of-day-slider></calcite-label>${S({hidden:this.hidePlayButtons,children:pe({disabled:this._sunlightingDisabled,playing:this.dayPlaying,label:e.playDay,onClick:()=>{this._playingState==="day"?this._stopPlaying():this._playingState="day"},scale:s})})}${S({hidden:this.hideTimezone,children:p`<calcite-label .scale=${s} class="timezone-input-container">${e.timezone}<calcite-input-time-zone mode=offset overlay-positioning=fixed .scale=${s} .disabled=${this._sunlightingDisabled} .value=${`${n}`} .referenceDate=${this.localDateAsString} @calciteInputTimeZoneChange=${o=>{let d=+o.target.value;this.utcOffset=d/60,this._stopPlaying()}} ${B(this.#a)}></calcite-input-time-zone></calcite-label><span></span>`})}${S({hidden:this.hideDatePicker,children:i==="date"?this.#u({scale:s,disabled:r}):this.#p({scale:s,disabled:r})})}</div>${S({hidden:this.hideSunLightingToggle,children:ti({scale:s,messages:e.sunLightingToggle,sunlightingEnabled:!this._sunlightingDisabled,onSunLightingToggle:o=>{this._sunlightingDisabled=!o}})})}${S({hidden:this.hideShadowsToggle,children:ri({scale:s,messages:e.shadowsToggle,onShadowCheckboxChange:o=>{this._directShadowsDisabled=!o},shadowEnabled:!this._directShadowsDisabled})})}`})}};function pe({disabled:t,playing:e,onClick:i,label:r,scale:s="m"}){return p`<calcite-button appearance=solid .scale=${s} .disabled=${t} .iconStart=${e?"pause-f":"play-f"} .label=${r} @click=${i} round title=${r??O} type=button></calcite-button>`}function ei({disabled:t,date:e,onDateChange:i,scale:r}){return p`<calcite-input-date-picker data-testid=daylight-date-picker .disabled=${t} overlay-positioning=fixed placement=bottom .value=${e} .scale=${r} @calciteInputDatePickerChange=${i}></calcite-input-date-picker>`}function ii({messages:t,disabled:e,scale:i,selectedSeason:r,onSeasonChange:s}){return p`<calcite-select .disabled=${e} .label=${t.season} .scale=${i} .value=${r} @calciteSelectChange=${n=>{s(n)}}>${V.map(n=>p`<calcite-option .selected=${r===n} .value=${n}>${t[n]}</calcite-option>`)}</calcite-select>`}function ti({messages:t,sunlightingEnabled:e,onSunLightingToggle:i,scale:r}){return p`<calcite-label layout=inline .scale=${r} title=${t?.tooltip??O}><calcite-checkbox .scale=${r} .checked=${e} @calciteCheckboxChange=${s=>i(s.target.checked)}></calcite-checkbox>${t?.label}</calcite-label>`}function ri({messages:t,shadowEnabled:e,onShadowCheckboxChange:i,scale:r}){return p`<calcite-label layout=inline .scale=${r} title=${t?.tooltip??O}><calcite-checkbox .checked=${e} @calciteCheckboxChange=${s=>i(s.target.checked)}></calcite-checkbox>${t.label}</calcite-label>`}ee("arcgis-daylight",J);return J},"core/reactiveUtils","intl","views/3d/environment/SunLighting","views/3d/environment/VirtualLighting","applications/Components/reactiveUtils",a,b,c)
|
|
2
|
+
import{e as M,f as k,g as T,h as ae,i as m}from"./IQPGSWSL.js";import{a as U}from"./GFQGSSBN.js";import{a as Y}from"./6ORHT4GS.js";import{a as D}from"./IGSZABNU.js";import c from"./5MHPKAFK.js";import"./PC4PAQXQ.js";import"./AE6R5TA3.js";import"./TFUFDVQ6.js";import{a as ie}from"./SVVJHTPA.js";import"./YMPJFJHK.js";import b from"./RO4TU5R3.js";import"./55IJQTCC.js";import"./7DOI3267.js";import a from"./O5TDDX7K.js";import"./EHZW6UXL.js";import{M as R,N as B,O as X,Q as G,R as O,U as ee,a as W,b as p,x as j}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([{watch:oe,when:ye,whenOnce:De},me,Se,ke,{createTrackingTarget:Te,runTracked:le,signal:$e},,{a:te},{e:re,f:se,g:ne}])=>{function Pe(t,e){return t/15}function Ce(t,e){let i=t?.[0];if(i==null)return null;e||(e={hours:0,minutes:0,seconds:0}),e.hours=Pe(i);let r=e.hours%1;e.hours-=r,e.minutes=r*60;let s=e.minutes%1;return e.minutes-=s,e.seconds=Math.round(s*60),e}function ze(t){let e=Ce([t.longitude,t.latitude]);return e==null?0:Math.round(e.hours+e.minutes/60+e.seconds/3600)}function _e(t,e){return(t%e+e)%e}var q=class{#i;#r;#s=Te(()=>{this.#t()});constructor(e){this.#r=e;let i;le(this.#s,()=>{i=e()}),this.#i=$e(i)}#t(){let e=this.#i.value;le(this.#s,()=>{this.#i.value=this.#r(e)})}mutate(e){this.#i.value=e}get value(){return this.#i.value}};function F(t){return new q(t)}var N=Math.PI,g=Math.sin,$=Math.cos,Oe=Math.asin,Ue=Math.acos,w=N/180,fe=1e3*60*60*24,be=2440588,ve=2451545;function Me(t){return t.valueOf()/fe-.5+be}function E(t){return new Date((t+.5-be)*fe)}function Ee(t){return Me(t)-ve}var ce=w*23.4397;function Le(t,e){return Oe(g(e)*$(ce)+$(e)*g(ce)*g(t))}function Ae(t){return w*(357.5291+.98560028*t)}function Ne(t){return w*(1.9148*g(t)+.02*g(2*t)+3e-4*g(3*t))}function He(t,e){var i=w*102.9372;return t+e+i+N}var S={};S.PolarException={NORMAL:0,MIDNIGHT_SUN:1,POLAR_NIGHT:2};var Z=[[-.83,"sunrise","sunset"]],we=9e-4;function Ie(t,e){return Math.round(t-we-e/(2*N))}function de(t,e,i){return we+(t+e)/(2*N)+i}function he(t,e,i){return ve+t+.0053*g(e)-.0069*g(2*i)}function je(t,e,i){return Ue((g(t)-g(e)*g(i))/($(e)*$(i)))}S.getTimes=function(t,e,i){var r=w*-i,s=w*e,n=Ee(t),a=Ie(n,r),l=de(0,r,a),o=Ae(l),d=Ne(o),c=He(o,d),h=Le(c,0),u=he(l,o,c);function x(I){var z=je(I,s,h),xe=de(z,r,a);return he(xe,o,c)}function y(I){var z=(g(I)-g(s)*g(h))/($(s)*$(h));return z<-1?S.PolarException.MIDNIGHT_SUN:z>1?S.PolarException.POLAR_NIGHT:S.PolarException.NORMAL}var f={solarNoon:E(u),nadir:E(u-.5),polarException:S.PolarException.NORMAL},v,_,C,H,Q;for(v=0,_=Z.length;v<_;v+=1)C=Z[v],H=x(C[0]*w),Q=u-(H-u),f[C[1]]=E(Q),f[C[2]]=E(H);return f.polarException=y(Z[0][0]*w),f};var Re={spring:{dayOfMonth:20,month:2},summer:{dayOfMonth:21,month:5},fall:{dayOfMonth:23,month:8},winter:{dayOfMonth:21,month:11}},V=["spring","summer","fall","winter"];function P(t,e,i){let r=K(e,i),{dayOfMonth:s,month:n}=Re[r],a=new Date(t.getTime());return a.setMonth(n,s),a}function Be(t,e){let i=Ge(t);return K(i,e)}function Ge(t){let e=t.getTime(),i=P(t,"spring","northern").getTime(),r=P(t,"summer","northern").getTime(),s=P(t,"fall","northern").getTime(),n=P(t,"winter","northern").getTime();return e>=i&&e<r?"spring":e>=r&&e<s?"summer":e>=s&&e<n?"fall":"winter"}function K(t,e){return e==="northern"?t:Ye(t)}function ge(t){return t>=0?"northern":"southern"}function Ye(t){let e=V.indexOf(t);return V[(e+2)%4]}var Fe=1440,Ze=864e5;function qe(t,e,i,r){let s=S.getTimes(t,e,i),n=s.sunrise,a=s.sunset,l=k(t,r),o=k(n,r),d=k(a,r);if(l.getUTCDate()!==o.getUTCDate()||l.getUTCDate()!==d.getUTCDate()){let c=l.getTime()-o.getTime()>0?1:-1;n.setUTCDate(n.getUTCDate()+c),a.setUTCDate(a.getUTCDate()+c)}return{sunrise:n,sunset:a}}var Ve=100,Je=1e3,b=12e5,L=72e5;function ue(t,e){return _e(t+e,24)}function Ke({mode:t,lighting:e,getPlaySpeed:i,onProgress:r,beforeProgress:s}){let n=-1;function a(l=Date.now()){let o=e.date,d=Date.now()-(l??0);if(t==="day"){l=Date.now();let c=i()/Ve*d;if(c>0){let h=new Date(o.getTime()+c),u=e.displayUTCOffset??0,x=ue(h.getUTCHours(),u),y=ue(o.getUTCHours(),u);x<y&&(h=new Date(o.getTime()+c-Ze));let f=e.clone();s?.(),e.date=h,r?.(f,e)}}else if(d>Je){l=Date.now();let c=(o.getUTCMonth()+1)%12,h=new Date(o.getTime());h.setUTCMonth(c);let u=e.clone();s?.(),e.date=h,r?.(u,e)}n=requestAnimationFrame(()=>a(l))}return a(),U(()=>cancelAnimationFrame(n))}var A=b/4;function Qe(t,e,i,r){let{day:s,night:n=s,twilight:a=s}=r,l=s*A,o=n*A,d=a*A;if(t==null||e==null||Number.isNaN(t.getTime())&&Number.isNaN(e.getTime()))return l;let c=i.getTime(),h=t.getTime(),u=e.getTime(),x=h-L/2,y=h+L/2,f=u-L/3*2,v=u+L/3,_=l;return c>=x&&c<=y?c-x<=b?_=o-(c-x)/b*(o-d):y-c<=b/2?_=l-(y-c)/b*2*(l-d):_=d:c>=f&&c<=v?c-f<=b/2?_=l-(c-f)/b*2*(l-d):v-c<=b?_=o-(v-c)/b*(o-d):_=d:(c<h||c>u)&&(_=o),_}var We=W`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}@supports (-ms-ime-align: auto){.esri-slider__anchor:focus{outline:1px dotted var(--calcite-color-foreground-current)}}.esri-slider{-webkit-user-select:none;user-select:none;direction:ltr;width:100%;height:100%;display:flex}.esri-disabled{pointer-events:none}.esri-disabled .esri-slider__content,.esri-disabled .esri-slider__min,.esri-disabled .esri-slider__max{opacity:var(--calcite-opacity-light)}.esri-slider--reversed.esri-slider--horizontal{flex-direction:row-reverse}.esri-slider--reversed.esri-slider--vertical{flex-direction:column}.esri-slider--horizontal{flex-direction:row}.esri-slider--horizontal .esri-slider__content{height:auto}.esri-slider--horizontal .esri-slider__track{width:100%;height:2px}.esri-slider--horizontal .esri-slider__segment--interactive:hover{cursor:ew-resize}.esri-slider--horizontal .esri-slider__anchor{width:1px;height:100%}.esri-slider--horizontal .esri-slider__label{text-align:center;margin:0 11px;top:-30px;left:-50px}.esri-slider--horizontal .esri-slider__label-input{text-align:center}.esri-slider--horizontal .esri-slider__max,.esri-slider--horizontal .esri-slider__min{flex:none;width:50px;height:auto;margin:auto}.esri-slider--horizontal .esri-slider__ticks{width:100%;margin:9px 0 0;top:100%;left:0}.esri-slider--horizontal .esri-slider__tick{width:1px;height:5px}.esri-slider--horizontal .esri-slider__tick-label{margin-top:18px}.esri-slider--vertical{flex-direction:column-reverse}.esri-slider--vertical .esri-slider__content{flex-direction:column;width:auto}.esri-slider--vertical .esri-slider__track{flex-direction:column;flex:1 0 0;width:2px;height:100%}.esri-slider--vertical .esri-slider__segment--interactive:hover{cursor:ns-resize}.esri-slider--vertical .esri-slider__anchor{width:100%;height:1px}.esri-slider--vertical .esri-slider__label{text-align:left;top:-10px;left:20px}.esri-slider--vertical .esri-slider__max,.esri-slider--vertical .esri-slider__min{flex:0 0 22px;width:100%;margin:auto}.esri-slider--vertical .esri-slider__ticks{margin:0 0 0 11px;top:0;left:100%}.esri-slider--vertical .esri-slider__tick{width:5px;height:1px}.esri-slider--vertical .esri-slider__tick-label{margin-left:30px}.esri-slider__content{z-index:0;flex:1 0 auto;justify-content:center;align-items:center;margin:auto;line-height:0;display:flex;position:relative}.esri-slider__track{touch-action:none;background-color:var(--calcite-color-border-ghost);display:inline-block;position:relative}.esri-slider__segment{transform-origin:0 0;will-change:transform;touch-action:none;width:100%;height:100%;position:absolute;top:0;left:0}.esri-slider__segment:hover{cursor:pointer}.esri-slider__anchor{touch-action:none;-webkit-user-select:none;user-select:none;background-color:var(--calcite-color-brand);position:absolute}.esri-slider__anchor:focus .esri-slider__thumb,.esri-slider__anchor:focus .esri-slider__label{outline:inherit}.esri-slider__anchor--moving:focus .esri-slider__thumb{cursor:grabbing;border:3px solid var(--calcite-color-brand-press)}.esri-slider__anchor--moving .esri-slider__label:hover,.esri-slider__anchor--moving .esri-slider__label--interactive:hover{cursor:grabbing}.esri-slider__thumb{box-sizing:border-box;z-index:1;touch-action:none;background-color:var(--calcite-color-foreground-2);border:2px solid var(--calcite-color-brand);border-radius:16px;width:16px;height:16px;transition:all .125s ease-in-out;position:absolute;top:-7px;left:-7px}.esri-slider__thumb:hover{cursor:grab;border-width:3px;border-color:var(--calcite-color-brand-press);width:19.2px;height:19.2px;top:-8.6px;left:-8.6px}.esri-slider__label{min-width:80px;line-height:var(--calcite-font-line-height-fixed-xl);position:absolute}.esri-slider__label:hover{cursor:grab}.esri-slider__label--interactive:hover,.esri-slider__max--interactive:hover,.esri-slider__min--interactive:hover{cursor:pointer;text-decoration:underline}.esri-slider__label-input{z-index:1;width:100%;position:relative}.esri-slider__extra-content{display:inline-block}.esri-slider__max,.esri-slider__min{text-align:center;justify-content:center;align-items:center;height:22px;line-height:var(--calcite-font-line-height-fixed-xl);display:flex}.esri-slider__max--interactive:hover,.esri-slider__min--interactive:hover{background-color:var(--calcite-color-foreground-2)}.esri-slider__range-input{text-align:center;width:100%;padding:1px 0}.esri-slider__ticks{z-index:0;height:100%;display:inline-block;position:absolute}.esri-slider__tick{background:var(--calcite-color-foreground-1);position:absolute}.esri-slider__tick-label{width:max-content;position:absolute}:dir(rtl) .esri-slider__label,:dir(rtl) .esri-slider__max,:dir(rtl) .esri-slider__min,:dir(rtl) .esri-slider__tick-label{direction:rtl;unicode-bidi:plaintext}:dir(rtl) .esri-slider__range-input,:dir(rtl) .esri-slider__label-input{unicode-bidi:plaintext}:host{width:350px}.root{display:flex;flex-direction:column;overflow:visible;gap:var(--calcite-spacing-md);justify-content:space-between;padding:var(--arcgis-internal-padding);position:relative;calcite-label{--calcite-label-margin-bottom: 0}&.loading>*:not(calcite-scrim){opacity:0}}.unsupported{padding:0 var(--calcite-spacing-lg);animation:esri-fade-in .25s ease-in-out}.slider{margin-block-start:0rem}.time-configuration{--date-play-button-offset: 11px;--slider-play-button-offset: var(--calcite-spacing-md-plus);display:grid;gap:var(--calcite-spacing-md);grid-template-columns:1fr min-content;.slider-container{grid-column:1;+calcite-button{grid-column:2;transform:translateY(var(--slider-play-button-offset))}}.timezone-input-container{grid-column:1;min-width:0;+span{grid-column:2}}.date-picker-container{grid-column:1;+calcite-button{grid-column:2;transform:translateY(var(--date-play-button-offset))}}calcite-button{place-self:center}}`,Xe={day:1,night:6,twilight:2/3},J=class extends X{constructor(){super(...arguments),this.messages=ie({blocking:!0}),this.#r="none",this.#s=null,this.#a=R(),this.#l=R(),this.#d=200,this.#h=200,this.#e={},this._offset=F(e=>m(this._lighting)?this._lighting.displayUTCOffset??e:e),this._timesliderPosition=F(e=>{if(m(this._lighting)){let i=this._lighting.displayUTCOffset??0,r=this._lighting.date;if(M(r)){let{minutesSinceMidnight:s}=T(r,i);return s}else return e}return e}),this._localDate=F(e=>ae(this._view)??e),this.view=te(this),this.autoDestroyDisabled=!1,this.dateOrSeason="date",this.headingLevel=2,this.hideDatePicker=!1,this.hideHeader=!1,this.hidePlayButtons=!1,this.hideShadowsToggle=!1,this.hideSunLightingToggle=!1,this.hideTimezone=!1,this.icon="brightness",this.playSpeedMultiplier=1,this.timeSliderSteps=5,this.arcgisReady=j(),this.arcgisUserDateTimeChange=j(),this.#c=!1}static{this.properties={view:0,_playingState:16,_sunlightingDisabled:16,autoDestroyDisabled:5,currentSeason:1,dateOrSeason:3,dayPlaying:5,_directShadowsDisabled:16,headingLevel:9,hideDatePicker:5,hideHeader:5,hidePlayButtons:5,hideShadowsToggle:5,hideSunLightingToggle:5,hideTimezone:5,icon:3,label:1,playSpeedMultiplier:9,referenceElement:1,timeSliderSteps:9,utcOffset:9,timeSliderPosition:9,localDate:1,yearPlaying:5}}static{this.styles=We}get _view(){return this.view?.type==="3d"?this.view:void 0}#i;#r;#s;#t;#a;#l;#d;#h;#o(){if(this.#t)return;let e=se(()=>{if(this.#t?.remove(),m(this._lighting)){let i=this.utcOffset??0,r=this.timeSliderPosition??0,s=this.localDate,n=r-i*60,a=k(s,n,"minutes");this._lighting.date=a,this._lighting.displayUTCOffset=i}},{timeout:this.#d});this.#t=U(()=>{ne(e),this.#t=void 0})}#u({scale:e,disabled:i}){let{messages:r}=this;return p`<calcite-label .scale=${e} class="date-picker-container">${r.date}${ei({disabled:i,scale:e,date:this.localDateAsString,onDateChange:s=>{let n=s.currentTarget.value,a=Array.isArray(n)?n[0]:n;this._stopPlaying(),this.localDate=a,this._emitUserDateTimeChangeEvent()}})}</calcite-label>${D({hidden:this.hidePlayButtons,children:pe({playing:this.yearPlaying,disabled:i,label:r.playYear,onClick:()=>{this._playingState==="year"?this._playingState="none":this._playingState="year"},scale:e})})}`}#p({scale:e,disabled:i}){let{messages:r}=this;return p`<calcite-label .scale=${e} class="date-picker-container">${r.season}${ii({scale:e,selectedSeason:this.currentSeason,disabled:i,messages:r,onSeasonChange:s=>{this._stopPlaying(),this.currentSeason=s.currentTarget.value}})}</calcite-label>`}#e;get#g(){return this.#l?.value?.startTime}get localDateAsString(){return this._localDate.value??""}get _playingState(){return this.#r}set _playingState(e){this.#r=e,this.#n?.remove(),e==="none"?this.#i?.remove():(this._play(e),this._emitUserDateTimeChangeEvent())}get _lighting(){return this._view?.environment?.lighting}get _sunlightingDisabled(){return!m(this._lighting)}set _sunlightingDisabled(e){this.#e.sunlightingDisabled=e;let i=this._view?.environment;if(i==null)return;let r=i.lighting,s=this.#s;this.#s=r;let n={directShadowsEnabled:r.directShadowsEnabled,glow:r.glow};m(r)&&(n.cameraTrackingEnabled=r.cameraTrackingEnabled);let a=e?"virtual":"sun",l;s?.type===a?l=s:l=e?new ke:new Se,l.set(n),i.lighting=l,e||(this._stopPlaying(),this.#a.value&&(this.#a.value.open=!1))}get currentSeason(){let e=this._view?.camera?.position?.latitude??0,i=ge(e);return Be(this.localDate,i)}set currentSeason(e){this._stopPlaying();let i=this._view?.camera?.position?.latitude??0,r=ge(i),s=K(e,r);this.localDate=P(this.localDate,s,"northern"),this._emitUserDateTimeChangeEvent()}get dayPlaying(){return this._playingState==="day"}set dayPlaying(e){this._playingState=e?"day":"none"}get _directShadowsDisabled(){return!this._lighting?.directShadowsEnabled}set _directShadowsDisabled(e){this.#e.directShadowsDisabled=e,this._lighting&&(this._lighting.directShadowsEnabled=!e)}get utcOffset(){return this._offset.value}set utcOffset(e){this._offset.mutate(e),this.#o()}get timeSliderPosition(){return this._timesliderPosition.value}set timeSliderPosition(e){this._timesliderPosition.mutate(_e(e??0,Fe)),this.#o()}get localDate(){return this._localDate.value!=null?new Date(this._localDate.value):new Date}set localDate(e){if(typeof e=="string"&&/^\d{4}-\d{2}-\d{2}$/u.test(e)){this._localDate.mutate(e),this.#o();return}let i=new Date(e);if(M(i)){i.setUTCFullYear(i.getFullYear(),i.getMonth(),i.getDate());let r=i.toISOString().slice(0,10);this._localDate.mutate(r),this.#o()}}get yearPlaying(){return this._playingState==="year"}set yearPlaying(e){this._playingState=e?"year":"none"}async destroy(){await this.manager.destroy()}async load(){this.#e.utcOffset=this.utcOffset,this.#e.timeSliderPosition=this.timeSliderPosition,this.#e.localDate=this.localDateAsString,this.manager.onLifecycle(()=>[oe(()=>{let e=null;if(m(this._lighting)){let i=this._lighting.displayUTCOffset??0,r=this._lighting.date;if(M(r)){let{minutesSinceMidnight:s}=T(r,i);e=s}}return e},e=>{let i=this.#g;e!=null&&i!==e&&this._emitUserDateTimeChangeEvent()},{sync:!0}),oe(()=>{let e=this._view?.camera?.position;return e?ze(e):void 0},e=>{let i=this._lighting;m(i)&&i.cameraTrackingEnabled&&(i.displayUTCOffset=e)},{sync:!0,initial:!0}),ye(()=>!m(this._lighting),()=>{this._stopPlaying()}),me.onLocaleChange(()=>{this.requestUpdate()})]),this.manager.onDisconnected(()=>{this.#i?.remove(),this.#t?.remove(),this.#n?.remove()})}willUpdate(e){if(super.willUpdate(e),!!this.#c&&m(this._lighting)&&e.has("utcOffset")){let i=this.utcOffset??0,r=this._lighting.displayUTCOffset??0,s=this.timeSliderPosition??0,n=this.localDate,a=s-r*60,l=k(n,a,"minutes"),{minutesSinceMidnight:o,localDate:d}=T(l,i);this._timesliderPosition.mutate(o),this._localDate.mutate(d)}}#c;async loaded(){let e=new AbortController;this.manager.onDisconnected(()=>({remove:()=>{e.abort()}})),await re(De(()=>this._view?.ready,{signal:e.signal}).then(()=>{this.utcOffset=this.#e.utcOffset??this.utcOffset,this.timeSliderPosition=this.#e.timeSliderPosition??this.timeSliderPosition,this.localDate=this.#e.localDate??this.localDate,this.#e.directShadowsDisabled!=null&&(this._directShadowsDisabled=this.#e.directShadowsDisabled),this.#e.sunlightingDisabled!=null&&(this._sunlightingDisabled=this.#e.sunlightingDisabled),this.#e={};let i=this._playingState;i!=="none"&&this.#i==null&&this._play(i)})),this.#c=!0}_emitUserDateTimeChangeEvent(){this.isConnected&&this.arcgisUserDateTimeChange.emit()}_stopPlaying(){this._playingState="none"}#n;#m(e){if(this.#n)return;let i=setTimeout(()=>{let r=e.displayUTCOffset??0,s=e.date,{minutesSinceMidnight:n}=T(s,r);this._timesliderPosition.mutate(n),this.#n?.remove()},this.#h);this.#n=U(()=>{clearTimeout(i),this.#n=void 0;let r=this._lighting;if(m(r)){let s=r.displayUTCOffset??0,n=r.date,{minutesSinceMidnight:a}=T(n,s);this._timesliderPosition.mutate(a)}})}_play(e){this.#i?.remove();let i=this._view;if(i==null||this._sunlightingDisabled)return;let r=i.environment.lighting;if(!m(r))return;let s=0;this.#i=Ke({mode:e,lighting:r,beforeProgress:()=>{s=this.#g??0},onProgress:(n,a)=>{this._timesliderPosition.mutate(s),this.#m(a)},getPlaySpeed:()=>{let n=this._view,a=this._view?.environment.lighting;if(n!=null&&m(a)){let l=n.camera.position.latitude??0,o=n.camera.position.longitude??0,{sunrise:d,sunset:c}=qe(a.date,l,o,a.displayUTCOffset??0);return Qe(d,c,a.date,Xe)*this.playSpeedMultiplier}else return A*this.playSpeedMultiplier}})}render(){let{messages:e,dateOrSeason:i}=this,r=this._sunlightingDisabled,s="m";if(this._view?.type!=="3d")return Y({class:"root",label:e.componentLabel,title:e.title,hideHeader:this.hideHeader,headingLevel:this.headingLevel,children:p`<div class="unsupported"><p>${e.unsupported}</p></div>`});let n=(this.utcOffset??0)*60,a=this.view?.ready===!0,l=Array.isArray(this.timeSliderSteps)?this.timeSliderSteps.at(0):this.timeSliderSteps;return Y({class:{root:!0,loading:!a},label:e.componentLabel,title:e.title,hideHeader:this.hideHeader,headingLevel:this.headingLevel,children:p`${a?void 0:p`<calcite-scrim loading></calcite-scrim>`}<div class="time-configuration" style=${G({columnGap:this.hidePlayButtons?"0":void 0})}><calcite-label class="slider-container" .scale=${s}>${e.timeSliderLabel}<arcgis-time-of-day-slider class="slider" .disabled=${this._sunlightingDisabled} mode=single .startTime=${this.timeSliderPosition??0} .steps=${l} style=${G({gridArea:"slider"})} @arcgisTimeChange=${({currentTarget:o})=>{this._stopPlaying(),this._emitUserDateTimeChangeEvent(),this.timeSliderPosition=o.startTime}} ${B(this.#l)}></arcgis-time-of-day-slider></calcite-label>${D({hidden:this.hidePlayButtons,children:pe({disabled:this._sunlightingDisabled,playing:this.dayPlaying,label:e.playDay,onClick:()=>{this._playingState==="day"?this._stopPlaying():this._playingState="day"},scale:s})})}${D({hidden:this.hideTimezone,children:p`<calcite-label .scale=${s} class="timezone-input-container">${e.timezone}<calcite-input-time-zone mode=offset overlay-positioning=fixed .scale=${s} .disabled=${this._sunlightingDisabled} .value=${`${n}`} .referenceDate=${this.localDateAsString} @calciteInputTimeZoneChange=${o=>{let d=+o.target.value;this.utcOffset=d/60,this._stopPlaying()}} ${B(this.#a)}></calcite-input-time-zone></calcite-label><span></span>`})}${D({hidden:this.hideDatePicker,children:i==="date"?this.#u({scale:s,disabled:r}):this.#p({scale:s,disabled:r})})}</div>${D({hidden:this.hideSunLightingToggle,children:ti({scale:s,messages:e.sunLightingToggle,sunlightingEnabled:!this._sunlightingDisabled,onSunLightingToggle:o=>{this._sunlightingDisabled=!o}})})}${D({hidden:this.hideShadowsToggle,children:ri({scale:s,messages:e.shadowsToggle,onShadowCheckboxChange:o=>{this._directShadowsDisabled=!o},shadowEnabled:!this._directShadowsDisabled})})}`})}};function pe({disabled:t,playing:e,onClick:i,label:r,scale:s="m"}){return p`<calcite-button appearance=solid .scale=${s} .disabled=${t} .iconStart=${e?"pause-f":"play-f"} .label=${r} @click=${i} round title=${r??O} type=button></calcite-button>`}function ei({disabled:t,date:e,onDateChange:i,scale:r}){return p`<calcite-input-date-picker data-testid=daylight-date-picker .disabled=${t} overlay-positioning=fixed placement=bottom .value=${e} .scale=${r} @calciteInputDatePickerChange=${i}></calcite-input-date-picker>`}function ii({messages:t,disabled:e,scale:i,selectedSeason:r,onSeasonChange:s}){return p`<calcite-select .disabled=${e} .label=${t.season} .scale=${i} .value=${r} @calciteSelectChange=${n=>{s(n)}}>${V.map(n=>p`<calcite-option .selected=${r===n} .value=${n}>${t[n]}</calcite-option>`)}</calcite-select>`}function ti({messages:t,sunlightingEnabled:e,onSunLightingToggle:i,scale:r}){return p`<calcite-label layout=inline .scale=${r} title=${t?.tooltip??O}><calcite-checkbox .scale=${r} .checked=${e} @calciteCheckboxChange=${s=>i(s.target.checked)}></calcite-checkbox>${t?.label}</calcite-label>`}function ri({messages:t,shadowEnabled:e,onShadowCheckboxChange:i,scale:r}){return p`<calcite-label layout=inline .scale=${r} title=${t?.tooltip??O}><calcite-checkbox .checked=${e} @calciteCheckboxChange=${s=>i(s.target.checked)}></calcite-checkbox>${t.label}</calcite-label>`}ee("arcgis-daylight",J);return J},"core/reactiveUtils","intl","views/3d/environment/SunLighting","views/3d/environment/VirtualLighting","applications/Components/reactiveUtils",a,b,c)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{j as m}from"./JVFREF7G.js";import"./RH62B2NE.js";import"./A2QPYUE5.js";import{v as p}from"./FWXI6DGS.js";import"./P2ABZVPJ.js";import"./XEXCDGSR.js";import"./DQH27QCF.js";import"./3TTFCHAA.js";export default $arcgis.t(([{getLocale:a,getLocaleLanguage:n}])=>{p("AM5C241025748");var e="en-US",o=new Map([["ar",()=>import("./MM4KQLRF.js")],["bg-BG",()=>import("./TEFALOII.js")],["bs-BA",()=>import("./5TXE67XV.js")],["ca-ES",()=>import("./DMDCKD5U.js")],["cs-CZ",()=>import("./JU3BLGXG.js")],["da-DK",()=>import("./TC3Q2QUA.js")],["de-DE",()=>import("./EP252O27.js")],["de-CH",()=>import("./Q3GALNWS.js")],["el-GR",()=>import("./U35ISUWJ.js")],["en-US",()=>import("./D5WXOOS3.js")],["en-CA",()=>import("./JKVKP7AW.js")],["es-ES",()=>import("./FLLSBLLE.js")],["et-EE",()=>import("./FQZXILRT.js")],["fi-FI",()=>import("./L4TA63M6.js")],["fr-FR",()=>import("./GIGQIUF5.js")],["he-IL",()=>import("./GHY23IXW.js")],["hr-HR",()=>import("./2HXYJZSB.js")],["hu-HU",()=>import("./GS75FRUR.js")],["id-ID",()=>import("./EVHNFE5I.js")],["it-IT",()=>import("./4STAROOM.js")],["ja-JP",()=>import("./EW6V3NZI.js")],["ko-KR",()=>import("./UUC3DBCQ.js")],["lt-LT",()=>import("./YZSLMAVX.js")],["lv-LV",()=>import("./TP5VEU3D.js")],["no-NO",()=>import("./4MDRPZTG.js")],["nb-NO",()=>import("./4MDRPZTG.js")],["nl-NL",()=>import("./XJXQC6HM.js")],["pl-PL",()=>import("./UVMLKDJA.js")],["pt-BR",()=>import("./V7DG2KF6.js")],["pt-PT",()=>import("./LQVZVGY4.js")],["ro-RO",()=>import("./F6BQWE5I.js")],["ru-RU",()=>import("./BBQPUWRO.js")],["sk-SK",()=>import("./HGAJ2IEN.js")],["sl-SL",()=>import("./37GJW6KT.js")],["sr-RS",()=>import("./4IM2FY5W.js")],["sv-SE",()=>import("./ZUPEVR3P.js")],["th-TH",()=>import("./5IMWXYL2.js")],["tr-TR",()=>import("./QM34BSKE.js")],["uk-UA",()=>import("./CJOHGWK6.js")],["vi-VN",()=>import("./WHDMC5HB.js")],["zh-CN",()=>import("./BND2TJBO.js")],["zh-HK",()=>import("./QTWRDNXX.js")],["zh-TW",()=>import("./QTWRDNXX.js")]]);function s(t){if(!t)return e;if(o.has(t))return t;let r=n();return r&&o.has(r)?r:e}async function l(t,r=a()){let i=m.new(t);return i.locale=(await o.get(s(r))()).default,i}return l},"intl")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{R as e}from"./
|
|
2
|
+
import{R as e}from"./P2ABZVPJ.js";import"./XEXCDGSR.js";import{W as t}from"./DQH27QCF.js";import"./3TTFCHAA.js";var r=class extends t{setupDefaultRules(){super.setupDefaultRules(),this.rule("InterfaceColors").setAll({stroke:e.fromHex(0),fill:e.fromHex(2829099),primaryButton:e.lighten(e.fromHex(6788316),-.2),primaryButtonHover:e.lighten(e.fromHex(6779356),-.2),primaryButtonDown:e.lighten(e.fromHex(6872181),-.2),primaryButtonActive:e.lighten(e.fromHex(6872182),-.2),primaryButtonText:e.fromHex(16777215),primaryButtonStroke:e.lighten(e.fromHex(6788316),-.2),secondaryButton:e.fromHex(3881787),secondaryButtonHover:e.lighten(e.fromHex(3881787),.1),secondaryButtonDown:e.lighten(e.fromHex(3881787),.15),secondaryButtonActive:e.lighten(e.fromHex(3881787),.2),secondaryButtonText:e.fromHex(12303291),secondaryButtonStroke:e.lighten(e.fromHex(3881787),-.2),grid:e.fromHex(12303291),background:e.fromHex(0),alternativeBackground:e.fromHex(16777215),text:e.fromHex(16777215),alternativeText:e.fromHex(0),disabled:e.fromHex(11382189),positive:e.fromHex(5288704),negative:e.fromHex(11730944)})}};var b=r;export{b as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as b}from"./GPGC63RW.js";import{I as _,L as T,M as A,f as L,g as y,m as U,o as I}from"./PILEMW25.js";import{a as q}from"./3TTFCHAA.js";var W={};q(W,{StyleRule:()=>P,StyleSheet:()=>D,addClass:()=>gt,addEventListener:()=>N,addSpacing:()=>Pt,alternativeColor:()=>R,blur:()=>nt,brighten:()=>F,capitalizeFirst:()=>Lt,cleanFormat:()=>St,contains:()=>k,decimalPlaces:()=>wt,escapeForRgex:()=>Et,focus:()=>ot,get12Hours:()=>Ft,getBrightnessStep:()=>At,getDayFromWeek:()=>Mt,getEventKey:()=>pt,getEventTarget:()=>ct,getFormat:()=>vt,getLightnessStep:()=>g,getMonthWeek:()=>Ct,getPointerId:()=>rt,getRendererEvent:()=>it,getSafeResolution:()=>bt,getShadowRoot:()=>ht,getStyle:()=>at,getTimeZone:()=>$t,getTimezoneOffset:()=>Rt,getWeek:()=>j,getWeekYear:()=>jt,getYearDay:()=>Ot,hslToHsv:()=>It,hslToRgb:()=>x,hsvToHsl:()=>Ut,iOS:()=>B,isLight:()=>C,isLocalEvent:()=>lt,isTouchEvent:()=>st,lighten:()=>M,mergeTags:()=>Ht,onZoom:()=>et,padString:()=>m,plainText:()=>Tt,ready:()=>X,relativeToValue:()=>_t,removeClass:()=>mt,removeElement:()=>tt,rgbToHsl:()=>v,sameBounds:()=>Nt,saturate:()=>$,setInteractive:()=>ft,setStyle:()=>ut,splitString:()=>Dt,stripTags:()=>Y,supports:()=>w,trim:()=>O,trimLeft:()=>z,trimRight:()=>G,truncateTextWithEllipsis:()=>xt});function X(t){if(document.readyState!=="loading")t();else{let e=()=>{document.readyState!=="loading"&&(document.removeEventListener("readystatechange",e),t())};document.addEventListener("readystatechange",e)}}function tt(t){t.parentNode&&t.parentNode.removeChild(t)}function N(t,e,r,n){return t.addEventListener(e,r,n||!1),new A(()=>{t.removeEventListener(e,r,n||!1)})}function et(t){return N(window,"resize",e=>{t()})}function w(t){switch(t){case"touchevents":return window.hasOwnProperty("TouchEvent");case"pointerevents":return window.hasOwnProperty("PointerEvent");case"mouseevents":return window.hasOwnProperty("MouseEvent");case"wheelevents":return window.hasOwnProperty("WheelEvent");case"keyboardevents":return window.hasOwnProperty("KeyboardEvent")}return!1}function rt(t){return t.pointerId||0}function nt(){if(document.activeElement&&document.activeElement!=document.body)if(document.activeElement.blur)document.activeElement.blur();else{let t=document.createElement("button");t.style.position="fixed",t.style.top="0px",t.style.left="-10000px",document.body.appendChild(t),t.focus(),t.blur(),document.body.removeChild(t)}}function ot(t){t&&t.focus()}function it(t){if(w("pointerevents"))return t;if(w("touchevents"))switch(t){case"pointerover":return"touchstart";case"pointerout":return"touchend";case"pointerleave":return"touchend";case"pointerdown":return"touchstart";case"pointermove":return"touchmove";case"pointerup":return"touchend";case"click":return"click";case"dblclick":return"dblclick"}else if(w("mouseevents"))switch(t){case"pointerover":return"mouseover";case"pointerout":return"mouseout";case"pointerleave":return"mouseleave";case"pointerdown":return"mousedown";case"pointermove":return"mousemove";case"pointerup":return"mouseup";case"click":return"click";case"dblclick":return"dblclick"}return t}function st(t){if(typeof Touch<"u"&&t instanceof Touch)return!0;if(typeof PointerEvent<"u"&&t instanceof PointerEvent&&t.pointerType!=null)switch(t.pointerType){case"touch":case"pen":case 2:return!0;case"mouse":case 4:return!1;default:return!(t instanceof MouseEvent)}else if(t.type!=null&&t.type.match(/^mouse/))return!1;return!0}function ut(t,e,r){t.style[e]=r}function at(t,e){return t.style[e]}function ct(t){if(t.composedPath){let e=t.composedPath();return e.length===0?null:e[0]}else return t.target}function k(t,e){let r=e;for(;;){if(t===r)return!0;if(r.parentNode===null){if(r.host==null)return!1;r=r.host}else r=r.parentNode}}function lt(t,e){return t.target&&k(e.root.dom,t.target)}function ft(t,e){e?t.style.pointerEvents="auto":t.style.pointerEvents="none"}function pt(t){if(t.key!==void 0)return t.key;switch(t.keyCode){case 9:return"Tab";case 13:return"Enter";case 16:return"Shift";case 17:return"Control";case 27:return"Escape";case 32:return" ";case 37:return"ArrowLeft";case 38:return"ArrowUp";case 39:return"ArrowRight";case 40:return"ArrowDown";case 46:return"Delete"}return""+t.keyCode}function ht(t){let e=t;for(;;){if(e.parentNode===null)return e.host!=null?e:null;e=e.parentNode}}var E;function dt(t,e,r=""){let n=document.createElement("style");return n.type="text/css",r!=""&&n.setAttribute("nonce",r),n.textContent=e,t===null?document.head.appendChild(n):t.appendChild(n),n}function yt(t,e=""){if(t===null){if(E==null){let r=document.createElement("style");r.type="text/css",e!=""&&r.setAttribute("nonce",e),document.head.appendChild(r),E=r.sheet}return E}else{let r=document.createElement("style");return r.type="text/css",e!=""&&r.setAttribute("nonce",e),t.appendChild(r),r.sheet}}function H(t,e){let r=t.cssRules.length;return t.insertRule(e+"{}",r),t.cssRules[r]}var P=class extends T{constructor(e,r,n,o=""){super(),this._root=yt(e,o);try{this._rule=H(this._root,r)}catch{this._rule=H(this._root,":not(*)")}_(n,(i,s)=>{this.setStyle(i,s)})}set selector(e){this._rule.selectorText=e}get selector(){return this._rule.selectorText}_dispose(){let e=U(this._root.cssRules,this._rule);if(e===-1)throw new Error("Could not dispose StyleRule");this._root.deleteRule(e)}_setVendorPrefixName(e,r){let n=this._rule.style;n.setProperty("-webkit-"+e,r,""),n.setProperty("-moz-"+e,r,""),n.setProperty("-ms-"+e,r,""),n.setProperty("-o-"+e,r,""),n.setProperty(e,r,"")}setStyle(e,r){e==="transition"?this._setVendorPrefixName(e,r):this._rule.style.setProperty(e,r,"")}},D=class extends T{constructor(e,r,n=""){super(),this._element=dt(e,r,n)}_dispose(){this._element.parentNode&&this._element.parentNode.removeChild(this._element)}};function gt(t,e){if(t)if(t.classList){let r=e.split(" ");I(r,n=>{t.classList.add(n)})}else{let r=t.getAttribute("class");r?t.setAttribute("class",r.split(" ").filter(n=>n!==e).join(" ")+" "+e):t.setAttribute("class",e)}}function mt(t,e){if(t)if(t.classList)t.classList.remove(e);else{let r=t.getAttribute("class");r&&t.setAttribute("class",r.split(" ").filter(n=>n!==e).join(" "))}}function B(){return/apple/i.test(navigator.vendor)&&"ontouchend"in document}function bt(){return B()?1:void 0}function _t(t,e){return y(t)?t:t!=null&&y(t.value)&&y(e)?e*t.value:0}function wt(t){let e=(""+t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}function m(t,e=0,r="0"){return typeof t!="string"&&(t=t.toString()),e>t.length?Array(e-t.length+1).join(r)+t:t}function z(t){return t.replace(/^[\s]*/,"")}function G(t){return t.replace(/[\s]*$/,"")}function O(t){return z(G(t))}function xt(t,e,r=!1,n="..."){if(t.length>e){let o=e-1;for(;o>=0&&t.charAt(o).match(/\w/);)o--;return o>=0&&r==!1?t.substring(0,o+1)+"...":t.substring(0,e)+n}else return t}function vt(t){if(typeof t>"u")return"string";t=t.toLowerCase().replace(/^\[[^\]]*\]/,""),t=t.replace(/\[[^\]]+\]/,""),t=t.trim();let e=t.match(/\/(date|number|duration)$/);return e?e[1]:t==="number"?"number":t==="date"?"date":t==="duration"?"duration":t.match(/[#0]/)?"number":t.match(/[ymwdhnsqaxkzgtei]/)?"date":"string"}function St(t){return t.replace(/\/(date|number|duration)$/i,"")}function Y(t){return t&&t.replace(/<[^>]*>/g,"")}function Tt(t){return t&&Y((""+t).replace(/[\n\r]+/g,". "))}function Et(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Pt(t){let e="";for(let r=0;r<t.length;r++){let n=t.charAt(r);n.toUpperCase()==n&&r!=0&&(e+=" "),e+=n}return e}function Dt(t){let e=/[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/,r=/([^اأدذرزو]*[اأدذرزو])/gi,n=t.split(/(\s+)/),o=[];return n.forEach(i=>{if(i.match(/^\s+$/))(i=" ")&&(i=" "),o.push(i);else if(e.test(i)){let s=i.split(r).filter(u=>u!=="");o=o.concat(s)}else o=o.concat([...i])}),o}function Ot(t,e=!1){let r=new Date(t.getFullYear(),0,0),n=t.getTime()-r.getTime()+(r.getTimezoneOffset()-t.getTimezoneOffset())*60*1e3,o=1e3*60*60*24;return Math.floor(n/o)}function j(t,e=!1){let r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())),n=r.getUTCDay()||7;r.setUTCDate(r.getUTCDate()+4-n);let o=new Date(Date.UTC(r.getUTCFullYear(),0,1));return Math.ceil(((r.getTime()-o.getTime())/864e5+1)/7)}function jt(t,e=!1){let r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())),n=r.getUTCDay()||7;return r.setUTCDate(r.getUTCDate()+4-n),new Date(Date.UTC(r.getUTCFullYear(),0,1)).getFullYear()}function Ct(t,e=!1){let r=j(new Date(t.getFullYear(),t.getMonth(),1),e),n=j(t,e);return n==1&&(n=53),n-r+1}function Mt(t,e,r=1,n=!1){let o=new Date(e,0,4,0,0,0,0);return n&&o.setUTCFullYear(e),t*7+r-((o.getDay()||7)+3)}function Ft(t,e){return t>12?t-=12:t===0&&(t=12),e!=null?t+(e-1):t}function $t(t,e=!1,r=!1,n=!1,o){if(n)return e?"Coordinated Universal Time":"UTC";if(o){let u=t.toLocaleString("en-US",{timeZone:o}),c=t.toLocaleString("en-US",{timeZone:o,timeZoneName:e?"long":"short"});return O(c.substr(u.length))}let i=t.toLocaleString("UTC"),s=t.toLocaleString("UTC",{timeZoneName:e?"long":"short"}).substr(i.length);return r===!1&&(s=s.replace(/ (standard|daylight|summer|winter) /i," ")),O(s)}function Rt(t,e){let r=e||new Date(Date.UTC(2012,0,1,0,0,0,0)),n=new Date(r.toLocaleString("en-US",{timeZone:"UTC"}));return(new Date(r.toLocaleString("en-US",{timeZone:t})).getTime()-n.getTime())/6e4*-1}function Lt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function x(t){let e,r,n,o=t.h,i=t.s,s=t.l;if(i==0)e=r=n=s;else{let u=function(l,S,f){return f<0&&(f+=1),f>1&&(f-=1),f<.16666666666666666?l+(S-l)*6*f:f<.5?S:f<.6666666666666666?l+(S-l)*(.6666666666666666-f)*6:l},c=s<.5?s*(1+i):s+i-s*i,a=2*s-c;e=u(a,c,o+1/3),r=u(a,c,o),n=u(a,c,o-1/3)}return{r:Math.round(e*255),g:Math.round(r*255),b:Math.round(n*255)}}function v(t){let e=t.r/255,r=t.g/255,n=t.b/255,o=Math.max(e,r,n),i=Math.min(e,r,n),s=0,u=0,c=(o+i)/2;if(o===i)s=u=0;else{let a=o-i;switch(u=c>.5?a/(2-o-i):a/(o+i),o){case e:s=(r-n)/a+(r<n?6:0);break;case r:s=(n-e)/a+2;break;case n:s=(e-r)/a+4;break}s/=6}return{h:s,s:u,l:c}}function Ut(t){let e=t.v*(1-t.s/2),r=e===0||e===1?0:(t.v-e)/Math.min(e,1-e);return{h:t.h,s:r,l:e,a:t.a}}function It(t){let e=t.l+t.s*Math.min(t.l,1-t.l),r=e===0?0:2*(1-t.l/e);return{h:t.h,s:r,v:e,a:t.a}}function M(t,e){return t&&{r:Math.max(0,Math.min(255,t.r+g(t.r,e))),g:Math.max(0,Math.min(255,t.g+g(t.g,e))),b:Math.max(0,Math.min(255,t.b+g(t.b,e))),a:t.a}}function g(t,e){let r=e>0?255-t:t;return Math.round(r*e)}function F(t,e){if(t){let r=Math.min(Math.max(t.r,t.g,t.b),230),n=g(r,e);return{r:Math.max(0,Math.min(255,Math.round(t.r+n))),g:Math.max(0,Math.min(255,Math.round(t.g+n))),b:Math.max(0,Math.min(255,Math.round(t.b+n))),a:t.a}}else return t}function At(t,e){return Math.round(255*e)}function C(t){return(t.r*299+t.g*587+t.b*114)/1e3>=128}function $(t,e){if(t===void 0||e==1)return t;let r=v(t);return r.s=e,x(r)}function R(t,e={r:255,g:255,b:255},r={r:255,g:255,b:255}){let n=e,o=r;return C(r)&&(n=r,o=e),C(t)?o:n}function Ht(t,e){return t||(t=[]),[...t,...e].filter((r,n,o)=>o.indexOf(r)===n)}function Nt(t,e){return!(!e||t.left!=e.left||t.right!=e.right||t.top!=e.top||t.bottom!=e.bottom)}function Z(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(h){try{a(n.next(h))}catch(l){s(l)}}function c(h){try{a(n.throw(h))}catch(l){s(l)}}function a(h){h.done?i(h.value):o(h.value).then(u,c)}a((n=n.apply(t,e||[])).next())})}function Jt(t){return Z(this,void 0,void 0,function*(){if(t!==void 0){let e=[];_(t,(r,n)=>{e.push(n.waitForStop())}),yield Promise.all(e)}})}function p(t,e,r){return e+t*(r-e)}function kt(t,e,r){return t>=1?r:e}function Bt(t,e,r){return new b(p(t,e.percent,r.percent))}function zt(t,e,r){return d.interpolate(t,e,r)}function Qt(t,e){return typeof t=="number"&&typeof e=="number"?p:t instanceof b&&e instanceof b?Bt:t instanceof d&&e instanceof d?zt:kt}var V;(function(t){t[t.Stopped=0]="Stopped",t[t.Playing=1]="Playing",t[t.Paused=2]="Paused"})(V||(V={}));function K(t){return t[0]==="#"&&(t=t.substr(1)),t.length==3&&(t=t[0].repeat(2)+t[1].repeat(2)+t[2].repeat(2)),parseInt(t,16)}function Gt(t){t=t.replace(/[ ]/g,"");let e=t.match(/^rgb\(([0-9]*),([0-9]*),([0-9]*)\)/i);if(e)e.push("1");else if(e=t.match(/^rgba\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\)/i),!e)return 0;let r="";for(let n=1;n<=3;n++){let o=parseInt(e[n]).toString(16);o.length==1&&(o="0"+o),r+=o}return K(r)}function ee(t){return d.fromAny(t)}var d=class t{constructor(e){this._hex=e|0}get hex(){return this._hex}get r(){return this._hex>>>16}get g(){return this._hex>>8&255}get b(){return this._hex&255}toCSS(e=1){return"rgba("+this.r+", "+this.g+", "+this.b+", "+e+")"}toCSSHex(){return"#"+m(this.r.toString(16),2)+m(this.g.toString(16),2)+m(this.b.toString(16),2)}toHSL(e=1){return v({r:this.r,g:this.g,b:this.b,a:e})}static fromHSL(e,r,n){let o=x({h:e,s:r,l:n});return this.fromRGB(o.r,o.g,o.b)}toString(){return this.toCSSHex()}static fromHex(e){return new t(e)}static fromRGB(e,r,n){return new t((n|0)+(r<<8)+(e<<16))}static fromString(e){return new t(K(e))}static fromCSS(e){return new t(Gt(e))}static fromAny(e){if(L(e)){if(e[0]=="#")return t.fromString(e);if(e.substr(0,3)=="rgb")return t.fromCSS(e)}else{if(y(e))return t.fromHex(e);if(e instanceof t)return t.fromHex(e.hex)}throw new Error("Unknown color syntax: "+e)}static alternative(e,r,n){let o=R({r:e.r,g:e.g,b:e.b},r?{r:r.r,g:r.g,b:r.b}:void 0,n?{r:n.r,g:n.g,b:n.b}:void 0);return this.fromRGB(o.r,o.g,o.b)}static interpolate(e,r,n,o="rgb"){if(o=="hsl"){let i=r.toHSL(),s=n.toHSL();return t.fromHSL(p(e,i.h,s.h),p(e,i.s,s.s),p(e,i.l,s.l))}else return t.fromRGB(p(e,r.r,n.r),p(e,r.g,n.g),p(e,r.b,n.b))}static lighten(e,r){let n=M({r:e.r,g:e.g,b:e.b},r);return t.fromRGB(n.r,n.g,n.b)}static brighten(e,r){let n=F({r:e.r,g:e.g,b:e.b},r);return t.fromRGB(n.r,n.g,n.b)}static saturate(e,r){let n=$({r:e.r,g:e.g,b:e.b},r);return t.fromRGB(n.r,n.g,n.b)}};export{Z as a,X as b,tt as c,N as d,et as e,w as f,rt as g,nt as h,ot as i,it as j,st as k,ut as l,at as m,ct as n,lt as o,ft as p,pt as q,ht as r,P as s,bt as t,_t as u,wt as v,m as w,O as x,xt as y,vt as z,St as A,Y as B,Et as C,Dt as D,Ot as E,j as F,jt as G,Ct as H,Mt as I,Ft as J,$t as K,Rt as L,Lt as M,Ht as N,Nt as O,W as P,ee as Q,d as R,Jt as S,Bt as T,Qt as U,V};
|
|
2
|
+
import{a as b}from"./XEXCDGSR.js";import{I as _,L as T,M as A,f as L,g as y,m as U,o as I}from"./DQH27QCF.js";import{a as q}from"./3TTFCHAA.js";var W={};q(W,{StyleRule:()=>P,StyleSheet:()=>D,addClass:()=>gt,addEventListener:()=>N,addSpacing:()=>Pt,alternativeColor:()=>R,blur:()=>nt,brighten:()=>F,capitalizeFirst:()=>Lt,cleanFormat:()=>St,contains:()=>k,decimalPlaces:()=>wt,escapeForRgex:()=>Et,focus:()=>ot,get12Hours:()=>Ft,getBrightnessStep:()=>At,getDayFromWeek:()=>Mt,getEventKey:()=>pt,getEventTarget:()=>ct,getFormat:()=>vt,getLightnessStep:()=>g,getMonthWeek:()=>Ct,getPointerId:()=>rt,getRendererEvent:()=>it,getSafeResolution:()=>bt,getShadowRoot:()=>ht,getStyle:()=>at,getTimeZone:()=>$t,getTimezoneOffset:()=>Rt,getWeek:()=>j,getWeekYear:()=>jt,getYearDay:()=>Ot,hslToHsv:()=>It,hslToRgb:()=>x,hsvToHsl:()=>Ut,iOS:()=>B,isLight:()=>C,isLocalEvent:()=>lt,isTouchEvent:()=>st,lighten:()=>M,mergeTags:()=>Ht,onZoom:()=>et,padString:()=>m,plainText:()=>Tt,ready:()=>X,relativeToValue:()=>_t,removeClass:()=>mt,removeElement:()=>tt,rgbToHsl:()=>v,sameBounds:()=>Nt,saturate:()=>$,setInteractive:()=>ft,setStyle:()=>ut,splitString:()=>Dt,stripTags:()=>Y,supports:()=>w,trim:()=>O,trimLeft:()=>z,trimRight:()=>G,truncateTextWithEllipsis:()=>xt});function X(t){if(document.readyState!=="loading")t();else{let e=()=>{document.readyState!=="loading"&&(document.removeEventListener("readystatechange",e),t())};document.addEventListener("readystatechange",e)}}function tt(t){t.parentNode&&t.parentNode.removeChild(t)}function N(t,e,r,n){return t.addEventListener(e,r,n||!1),new A(()=>{t.removeEventListener(e,r,n||!1)})}function et(t){return N(window,"resize",e=>{t()})}function w(t){switch(t){case"touchevents":return window.hasOwnProperty("TouchEvent");case"pointerevents":return window.hasOwnProperty("PointerEvent");case"mouseevents":return window.hasOwnProperty("MouseEvent");case"wheelevents":return window.hasOwnProperty("WheelEvent");case"keyboardevents":return window.hasOwnProperty("KeyboardEvent")}return!1}function rt(t){return t.pointerId||0}function nt(){if(document.activeElement&&document.activeElement!=document.body)if(document.activeElement.blur)document.activeElement.blur();else{let t=document.createElement("button");t.style.position="fixed",t.style.top="0px",t.style.left="-10000px",document.body.appendChild(t),t.focus(),t.blur(),document.body.removeChild(t)}}function ot(t){t&&t.focus()}function it(t){if(w("pointerevents"))return t;if(w("touchevents"))switch(t){case"pointerover":return"touchstart";case"pointerout":return"touchend";case"pointerleave":return"touchend";case"pointerdown":return"touchstart";case"pointermove":return"touchmove";case"pointerup":return"touchend";case"click":return"click";case"dblclick":return"dblclick"}else if(w("mouseevents"))switch(t){case"pointerover":return"mouseover";case"pointerout":return"mouseout";case"pointerleave":return"mouseleave";case"pointerdown":return"mousedown";case"pointermove":return"mousemove";case"pointerup":return"mouseup";case"click":return"click";case"dblclick":return"dblclick"}return t}function st(t){if(typeof Touch<"u"&&t instanceof Touch)return!0;if(typeof PointerEvent<"u"&&t instanceof PointerEvent&&t.pointerType!=null)switch(t.pointerType){case"touch":case"pen":case 2:return!0;case"mouse":case 4:return!1;default:return!(t instanceof MouseEvent)}else if(t.type!=null&&t.type.match(/^mouse/))return!1;return!0}function ut(t,e,r){t.style[e]=r}function at(t,e){return t.style[e]}function ct(t){if(t.composedPath){let e=t.composedPath();return e.length===0?null:e[0]}else return t.target}function k(t,e){let r=e;for(;;){if(t===r)return!0;if(r.parentNode===null){if(r.host==null)return!1;r=r.host}else r=r.parentNode}}function lt(t,e){return t.target&&k(e.root.dom,t.target)}function ft(t,e){e?t.style.pointerEvents="auto":t.style.pointerEvents="none"}function pt(t){if(t.key!==void 0)return t.key;switch(t.keyCode){case 9:return"Tab";case 13:return"Enter";case 16:return"Shift";case 17:return"Control";case 27:return"Escape";case 32:return" ";case 37:return"ArrowLeft";case 38:return"ArrowUp";case 39:return"ArrowRight";case 40:return"ArrowDown";case 46:return"Delete"}return""+t.keyCode}function ht(t){let e=t;for(;;){if(e.parentNode===null)return e.host!=null?e:null;e=e.parentNode}}var E;function dt(t,e,r=""){let n=document.createElement("style");return n.type="text/css",r!=""&&n.setAttribute("nonce",r),n.textContent=e,t===null?document.head.appendChild(n):t.appendChild(n),n}function yt(t,e=""){if(t===null){if(E==null){let r=document.createElement("style");r.type="text/css",e!=""&&r.setAttribute("nonce",e),document.head.appendChild(r),E=r.sheet}return E}else{let r=document.createElement("style");return r.type="text/css",e!=""&&r.setAttribute("nonce",e),t.appendChild(r),r.sheet}}function H(t,e){let r=t.cssRules.length;return t.insertRule(e+"{}",r),t.cssRules[r]}var P=class extends T{constructor(e,r,n,o=""){super(),this._root=yt(e,o);try{this._rule=H(this._root,r)}catch{this._rule=H(this._root,":not(*)")}_(n,(i,s)=>{this.setStyle(i,s)})}set selector(e){this._rule.selectorText=e}get selector(){return this._rule.selectorText}_dispose(){let e=U(this._root.cssRules,this._rule);if(e===-1)throw new Error("Could not dispose StyleRule");this._root.deleteRule(e)}_setVendorPrefixName(e,r){let n=this._rule.style;n.setProperty("-webkit-"+e,r,""),n.setProperty("-moz-"+e,r,""),n.setProperty("-ms-"+e,r,""),n.setProperty("-o-"+e,r,""),n.setProperty(e,r,"")}setStyle(e,r){e==="transition"?this._setVendorPrefixName(e,r):this._rule.style.setProperty(e,r,"")}},D=class extends T{constructor(e,r,n=""){super(),this._element=dt(e,r,n)}_dispose(){this._element.parentNode&&this._element.parentNode.removeChild(this._element)}};function gt(t,e){if(t)if(t.classList){let r=e.split(" ");I(r,n=>{t.classList.add(n)})}else{let r=t.getAttribute("class");r?t.setAttribute("class",r.split(" ").filter(n=>n!==e).join(" ")+" "+e):t.setAttribute("class",e)}}function mt(t,e){if(t)if(t.classList)t.classList.remove(e);else{let r=t.getAttribute("class");r&&t.setAttribute("class",r.split(" ").filter(n=>n!==e).join(" "))}}function B(){return/apple/i.test(navigator.vendor)&&"ontouchend"in document}function bt(){return B()?1:void 0}function _t(t,e){return y(t)?t:t!=null&&y(t.value)&&y(e)?e*t.value:0}function wt(t){let e=(""+t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}function m(t,e=0,r="0"){return typeof t!="string"&&(t=t.toString()),e>t.length?Array(e-t.length+1).join(r)+t:t}function z(t){return t.replace(/^[\s]*/,"")}function G(t){return t.replace(/[\s]*$/,"")}function O(t){return z(G(t))}function xt(t,e,r=!1,n="..."){if(t.length>e){let o=e-1;for(;o>=0&&t.charAt(o).match(/\w/);)o--;return o>=0&&r==!1?t.substring(0,o+1)+"...":t.substring(0,e)+n}else return t}function vt(t){if(typeof t>"u")return"string";t=t.toLowerCase().replace(/^\[[^\]]*\]/,""),t=t.replace(/\[[^\]]+\]/,""),t=t.trim();let e=t.match(/\/(date|number|duration)$/);return e?e[1]:t==="number"?"number":t==="date"?"date":t==="duration"?"duration":t.match(/[#0]/)?"number":t.match(/[ymwdhnsqaxkzgtei]/)?"date":"string"}function St(t){return t.replace(/\/(date|number|duration)$/i,"")}function Y(t){return t&&t.replace(/<[^>]*>/g,"")}function Tt(t){return t&&Y((""+t).replace(/[\n\r]+/g,". "))}function Et(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Pt(t){let e="";for(let r=0;r<t.length;r++){let n=t.charAt(r);n.toUpperCase()==n&&r!=0&&(e+=" "),e+=n}return e}function Dt(t){let e=/[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/,r=/([^اأدذرزو]*[اأدذرزو])/gi,n=t.split(/(\s+)/),o=[];return n.forEach(i=>{if(i.match(/^\s+$/))(i=" ")&&(i=" "),o.push(i);else if(e.test(i)){let s=i.split(r).filter(u=>u!=="");o=o.concat(s)}else o=o.concat([...i])}),o}function Ot(t,e=!1){let r=new Date(t.getFullYear(),0,0),n=t.getTime()-r.getTime()+(r.getTimezoneOffset()-t.getTimezoneOffset())*60*1e3,o=1e3*60*60*24;return Math.floor(n/o)}function j(t,e=!1){let r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())),n=r.getUTCDay()||7;r.setUTCDate(r.getUTCDate()+4-n);let o=new Date(Date.UTC(r.getUTCFullYear(),0,1));return Math.ceil(((r.getTime()-o.getTime())/864e5+1)/7)}function jt(t,e=!1){let r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())),n=r.getUTCDay()||7;return r.setUTCDate(r.getUTCDate()+4-n),new Date(Date.UTC(r.getUTCFullYear(),0,1)).getFullYear()}function Ct(t,e=!1){let r=j(new Date(t.getFullYear(),t.getMonth(),1),e),n=j(t,e);return n==1&&(n=53),n-r+1}function Mt(t,e,r=1,n=!1){let o=new Date(e,0,4,0,0,0,0);return n&&o.setUTCFullYear(e),t*7+r-((o.getDay()||7)+3)}function Ft(t,e){return t>12?t-=12:t===0&&(t=12),e!=null?t+(e-1):t}function $t(t,e=!1,r=!1,n=!1,o){if(n)return e?"Coordinated Universal Time":"UTC";if(o){let u=t.toLocaleString("en-US",{timeZone:o}),c=t.toLocaleString("en-US",{timeZone:o,timeZoneName:e?"long":"short"});return O(c.substr(u.length))}let i=t.toLocaleString("UTC"),s=t.toLocaleString("UTC",{timeZoneName:e?"long":"short"}).substr(i.length);return r===!1&&(s=s.replace(/ (standard|daylight|summer|winter) /i," ")),O(s)}function Rt(t,e){let r=e||new Date(Date.UTC(2012,0,1,0,0,0,0)),n=new Date(r.toLocaleString("en-US",{timeZone:"UTC"}));return(new Date(r.toLocaleString("en-US",{timeZone:t})).getTime()-n.getTime())/6e4*-1}function Lt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function x(t){let e,r,n,o=t.h,i=t.s,s=t.l;if(i==0)e=r=n=s;else{let u=function(l,S,f){return f<0&&(f+=1),f>1&&(f-=1),f<.16666666666666666?l+(S-l)*6*f:f<.5?S:f<.6666666666666666?l+(S-l)*(.6666666666666666-f)*6:l},c=s<.5?s*(1+i):s+i-s*i,a=2*s-c;e=u(a,c,o+1/3),r=u(a,c,o),n=u(a,c,o-1/3)}return{r:Math.round(e*255),g:Math.round(r*255),b:Math.round(n*255)}}function v(t){let e=t.r/255,r=t.g/255,n=t.b/255,o=Math.max(e,r,n),i=Math.min(e,r,n),s=0,u=0,c=(o+i)/2;if(o===i)s=u=0;else{let a=o-i;switch(u=c>.5?a/(2-o-i):a/(o+i),o){case e:s=(r-n)/a+(r<n?6:0);break;case r:s=(n-e)/a+2;break;case n:s=(e-r)/a+4;break}s/=6}return{h:s,s:u,l:c}}function Ut(t){let e=t.v*(1-t.s/2),r=e===0||e===1?0:(t.v-e)/Math.min(e,1-e);return{h:t.h,s:r,l:e,a:t.a}}function It(t){let e=t.l+t.s*Math.min(t.l,1-t.l),r=e===0?0:2*(1-t.l/e);return{h:t.h,s:r,v:e,a:t.a}}function M(t,e){return t&&{r:Math.max(0,Math.min(255,t.r+g(t.r,e))),g:Math.max(0,Math.min(255,t.g+g(t.g,e))),b:Math.max(0,Math.min(255,t.b+g(t.b,e))),a:t.a}}function g(t,e){let r=e>0?255-t:t;return Math.round(r*e)}function F(t,e){if(t){let r=Math.min(Math.max(t.r,t.g,t.b),230),n=g(r,e);return{r:Math.max(0,Math.min(255,Math.round(t.r+n))),g:Math.max(0,Math.min(255,Math.round(t.g+n))),b:Math.max(0,Math.min(255,Math.round(t.b+n))),a:t.a}}else return t}function At(t,e){return Math.round(255*e)}function C(t){return(t.r*299+t.g*587+t.b*114)/1e3>=128}function $(t,e){if(t===void 0||e==1)return t;let r=v(t);return r.s=e,x(r)}function R(t,e={r:255,g:255,b:255},r={r:255,g:255,b:255}){let n=e,o=r;return C(r)&&(n=r,o=e),C(t)?o:n}function Ht(t,e){return t||(t=[]),[...t,...e].filter((r,n,o)=>o.indexOf(r)===n)}function Nt(t,e){return!(!e||t.left!=e.left||t.right!=e.right||t.top!=e.top||t.bottom!=e.bottom)}function Z(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(h){try{a(n.next(h))}catch(l){s(l)}}function c(h){try{a(n.throw(h))}catch(l){s(l)}}function a(h){h.done?i(h.value):o(h.value).then(u,c)}a((n=n.apply(t,e||[])).next())})}function Jt(t){return Z(this,void 0,void 0,function*(){if(t!==void 0){let e=[];_(t,(r,n)=>{e.push(n.waitForStop())}),yield Promise.all(e)}})}function p(t,e,r){return e+t*(r-e)}function kt(t,e,r){return t>=1?r:e}function Bt(t,e,r){return new b(p(t,e.percent,r.percent))}function zt(t,e,r){return d.interpolate(t,e,r)}function Qt(t,e){return typeof t=="number"&&typeof e=="number"?p:t instanceof b&&e instanceof b?Bt:t instanceof d&&e instanceof d?zt:kt}var V;(function(t){t[t.Stopped=0]="Stopped",t[t.Playing=1]="Playing",t[t.Paused=2]="Paused"})(V||(V={}));function K(t){return t[0]==="#"&&(t=t.substr(1)),t.length==3&&(t=t[0].repeat(2)+t[1].repeat(2)+t[2].repeat(2)),parseInt(t,16)}function Gt(t){t=t.replace(/[ ]/g,"");let e=t.match(/^rgb\(([0-9]*),([0-9]*),([0-9]*)\)/i);if(e)e.push("1");else if(e=t.match(/^rgba\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\)/i),!e)return 0;let r="";for(let n=1;n<=3;n++){let o=parseInt(e[n]).toString(16);o.length==1&&(o="0"+o),r+=o}return K(r)}function ee(t){return d.fromAny(t)}var d=class t{constructor(e){this._hex=e|0}get hex(){return this._hex}get r(){return this._hex>>>16}get g(){return this._hex>>8&255}get b(){return this._hex&255}toCSS(e=1){return"rgba("+this.r+", "+this.g+", "+this.b+", "+e+")"}toCSSHex(){return"#"+m(this.r.toString(16),2)+m(this.g.toString(16),2)+m(this.b.toString(16),2)}toHSL(e=1){return v({r:this.r,g:this.g,b:this.b,a:e})}static fromHSL(e,r,n){let o=x({h:e,s:r,l:n});return this.fromRGB(o.r,o.g,o.b)}toString(){return this.toCSSHex()}static fromHex(e){return new t(e)}static fromRGB(e,r,n){return new t((n|0)+(r<<8)+(e<<16))}static fromString(e){return new t(K(e))}static fromCSS(e){return new t(Gt(e))}static fromAny(e){if(L(e)){if(e[0]=="#")return t.fromString(e);if(e.substr(0,3)=="rgb")return t.fromCSS(e)}else{if(y(e))return t.fromHex(e);if(e instanceof t)return t.fromHex(e.hex)}throw new Error("Unknown color syntax: "+e)}static alternative(e,r,n){let o=R({r:e.r,g:e.g,b:e.b},r?{r:r.r,g:r.g,b:r.b}:void 0,n?{r:n.r,g:n.g,b:n.b}:void 0);return this.fromRGB(o.r,o.g,o.b)}static interpolate(e,r,n,o="rgb"){if(o=="hsl"){let i=r.toHSL(),s=n.toHSL();return t.fromHSL(p(e,i.h,s.h),p(e,i.s,s.s),p(e,i.l,s.l))}else return t.fromRGB(p(e,r.r,n.r),p(e,r.g,n.g),p(e,r.b,n.b))}static lighten(e,r){let n=M({r:e.r,g:e.g,b:e.b},r);return t.fromRGB(n.r,n.g,n.b)}static brighten(e,r){let n=F({r:e.r,g:e.g,b:e.b},r);return t.fromRGB(n.r,n.g,n.b)}static saturate(e,r){let n=$({r:e.r,g:e.g,b:e.b},r);return t.fromRGB(n.r,n.g,n.b)}};export{Z as a,X as b,tt as c,N as d,et as e,w as f,rt as g,nt as h,ot as i,it as j,st as k,ut as l,at as m,ct as n,lt as o,ft as p,pt as q,ht as r,P as s,bt as t,_t as u,wt as v,m as w,O as x,xt as y,vt as z,St as A,Y as B,Et as C,Dt as D,Ot as E,j as F,jt as G,Ct as H,Mt as I,Ft as J,$t as K,Rt as L,Lt as M,Ht as N,Nt as O,W as P,ee as Q,d as R,Jt as S,Bt as T,Qt as U,V};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{a as I}from"./MP6Z45SA.js";import{c as E,d as F}from"./FF5VMKLK.js";import{a as A}from"./J6UG5EF7.js";import{O as q,S as L,U as N,a as T,b as p}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([{createReactiveMap:C,findUtilityNetwork:V,queryAllJSON:Q,getOrCreateMapValue:B},{stripHTML:S},f,{ignoreAbortErrors:$},{watch:k},D,P,x,G,O,R])=>{var H=T`.list-container{min-height:var(--calcite-spacing-xxxl)}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.sticky-loading-container{display:flex;position:sticky;bottom:var(--calcite-spacing-sm);align-items:center;justify-content:center;z-index:2;margin:0;padding:0;height:var(--calcite-spacing-xxxl);pointer-events:none;height:500px}`,M=100,j={assetGroup:"assetgroup",assetType:"assettype"},U="{00000000-0000-0000-0000-000000000000}",v=class extends q{constructor(){super(...arguments),this._addFlowItem=t=>{t&&this.flowItems?.push(t)},this._attachmentAssociations=new f,this._attachmentFeatureCount=0,this._cancelQuery=()=>{let{_queryAbortController:t}=this;t&&t.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{let{_queryFeatureCountAbortController:t}=this;t&&t.abort(),this._queryFeatureCountAbortController=null},this._connectivityAssociations=new f,this._connectivityFeatureCount=0,this._containerAssociations=new f,this._containerFeatureCount=0,this._contentAssociations=new f,this._contentFeatureCount=0,this._networkSourceIdsInUse=new Set,this._query=async t=>{if(!t)return;await this._loadUtiltyNetworks();let{_queryAbortController:e}=this;this._destroyAssociatedFeatureViewModels(),this._clearFeatures(),this._featureCount&&await this._queryAssociatedFeatures(t,{signal:e?.signal})},this._queryController=async t=>{this._cancelQuery();let e=new AbortController;this._queryAbortController=e,await $(this._query(t)),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();let t=new AbortController;this._queryFeatureCountAbortController=t,await $(this._queryFeatureCount()),this._queryFeatureCountAbortController===t&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryDebounced=I(this._queryController,M),this._queryFeatureCountDebounced=I(this._queryFeatureCountController,M),this._structureAssociations=new f,this._structureFeatureCount=0,this._queryAssociationType=async()=>{this._activeAssociationType&&this._queryDebounced(this._activeAssociationType)},this._associationFeatures=C(),this._associationViewModels=C(),this._featureCount=0,this._loaded=!1,this._queryAbortController=null,this._queryFeatureCountAbortController=null,this._queryPageAbortController=null,this.associationTypes=null,this.autoDestroyDisabled=!1,this.flowType="feature-utility-network-associations",this.headingLevel=2,this.source="popup"}static{this.properties={_activeAssociationType:16,_associationFeatures:16,_associationViewModels:16,_canLoad:16,_canQuery:16,_featureCount:16,_loaded:16,_queryAbortController:16,_queryFeatureCountAbortController:16,_queryPageAbortController:16,_state:16,associationTypes:0,autoDestroyDisabled:5,description:1,flowItems:0,flowType:1,graphic:0,heading:1,headingLevel:9,layer:0,map:0,messages:0,parentFeatureViewModel:0,referenceElement:1,source:1,spatialReference:0,timeZone:1,view:0}}static{this.styles=H}get _globalId(){return(this._globalIdField&&this.graphic?.attributes?.[this._globalIdField])??null}get _globalIdField(){return this.layer?.globalIdField}get _objectId(){return(this._objectIdField&&this.graphic?.attributes?.[this._objectIdField])??null}get _objectIdField(){return this.layer?.objectIdField}get _supportsCacheHint(){return!!this.layer?.capabilities?.queryRelated?.supportsCacheHint}get _utilityNetwork(){let{layer:t,map:e}=this;if(!t?.loaded||!e)return null;let s=F(t)?t.parent:t;return V(e,s)}get _canLoad(){return!!this.map}get _canQuery(){return!!this.layer?.capabilities?.query?.supportsPagination}get _state(){let{_canLoad:t,_canQuery:e,_featureCount:s,_loaded:a,_queryAbortController:i,_queryFeatureCountAbortController:o,_queryPageAbortController:c,associationTypes:l}=this;return o||t&&!a?"loading":i||c?"querying":!this._globalId||!l||!e||!s?"disabled":"ready"}get heading(){return this._heading}set heading(t){this._heading=t}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[k(()=>[this.graphic,this.layer,this.map,this.associationTypes,this._canQuery,this._objectId,this._globalId],()=>{this._queryFeatureCountDebounced(),this._queryAssociationType()},{initial:!0}),k(()=>this._activeAssociationType,t=>{this._queryDebounced(t)}),k(()=>this._associationFeatures.values(),()=>{this._setUpUtilityNetworkAssociationsViewModels()})]),this.manager.onDestroy(()=>{this._cancelQuery(),this._cancelQueryFeatureCount()})}_addAssociationTypeFlowItem(t){this._addFlowItem(L(p`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this.parentFeatureViewModel?.title} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(t)} .messages=${this.messages} .map=${this.map} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .state=${this._state} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature-utility-network-association-list>`))}_clearAssociations(){this._attachmentAssociations.removeAll(),this._connectivityAssociations.removeAll(),this._containerAssociations.removeAll(),this._contentAssociations.removeAll(),this._structureAssociations.removeAll()}_clearFeatures(){this._associationFeatures.forEach(t=>t.removeAll()),this._associationFeatures.clear()}_compareByFeatureTitle(t,e){return t.title.localeCompare(e.title,void 0,{numeric:!0})}async _countAssociatedFeatureCount(t,e,s,a,i){let o=this._getFeatureQueryWhereClause(t,e,s,a);return await t.queryFeatureCount({where:o,outFields:["*"],returnGeometry:!1},{signal:i?.signal})}async _countAssociatedFeatures(t,e,s,a,i){if(!e.length)return 0;let o=await this._findLayersBySourceId(t);await this._loadLayers(o);let c=o.map(l=>this._countAssociatedFeatureCount(l,e,s,a,i));return(await Promise.all(c)).reduce((l,r)=>l+r,0)}async _createAssociationFeatureObjects(t,e,s,a,i){if(!t.length)return[];let o=new Map,c=Array.from(e.entries()).map(async([r,d])=>{let u=await this._findLayersBySourceId(r);await this._loadLayers(u);let h=u.map(m=>this._queryLayer(m,d,s,a,i));(await Promise.all(h)).forEach(m=>{m.forEach(n=>{if(this.source==="popup"?n.sourceLayer&&n.getEffectivePopupTemplate():n.sourceLayer){let _=n.layer.globalIdField??"",y=n.getAttribute(_),w=o.get(y)??[];w.push(n),o.set(y,w)}})})});await Promise.all(c);let l=[];return await Promise.all(t.toArray().map(async r=>{let{fromNetworkElement:d,toNetworkElement:u}=r,h=d.globalId===this._globalId?u:d,m=o.get(h.globalId)??[];await Promise.all(m.map(async n=>{let _=this._utilityNetwork?.getTerminalById(h?.terminalId??void 0)?.name,y=await n.sourceLayer.getFeatureTitle(n)||this._getFeatureTitle(n);l.push({title:y,feature:n,association:r,terminalName:_})}))})),l}_destroyAssociatedFeatureViewModels(){this._associationViewModels.forEach(t=>t.destroyAll())}_equals(t,e){if(t.globalId===U&&e.globalId===U){let s=function(d,u){return d.networkSourceId===u.networkSourceId&&d.globalId===u.globalId&&d.terminalId===u.terminalId&&d.firstUnit===u.firstUnit&&d.numUnits===u.numUnits},a=t.fromNetworkElement,i=t.toNetworkElement,o=e.fromNetworkElement,c=e.toNetworkElement,l=s(a,o),r=s(i,c);return l&&r&&t.associationType===e.associationType}return t.globalId!=null&&e.globalId!=null&&t.globalId===e.globalId}async _findLayersBySourceId(t){let{_utilityNetwork:e,map:s}=this;e?.loaded||await e?.load();let a=e.getLayerIdBySourceId(t),i=s.allLayers.filter(c=>!!e?.isUtilityLayer(c)&&c.layerId===a),o=s.allTables.filter(c=>!!e?.isUtilityLayer(c)&&c.layerId===a);return i.concat(o).toArray()}_getAssociationsByType(t){switch(t){case"attachment":return this._attachmentAssociations;case"structure":return this._structureAssociations;case"connectivity":return this._connectivityAssociations;case"container":return this._containerAssociations;case"content":return this._contentAssociations}}_getAssociationTypeTitle(t){let{messages:e}=this;if(t.title)return t.title;switch(t.type){case"attachment":return e?.associationsAttachments??this.messages?.noTitle??"";case"connectivity":return e?.associationsConnectivity??this.messages?.noTitle??"";case"structure":return e?.associationsStructure??this.messages?.noTitle??"";case"content":return e?.associationsContents??this.messages?.noTitle??"";case"container":return e?.associationsContainer??this.messages?.noTitle??""}}_getFeatureCountForAssociationType(t){switch(t){case"attachment":return this._attachmentFeatureCount;case"structure":return this._structureFeatureCount;case"content":return this._contentFeatureCount;case"container":return this._containerFeatureCount;case"connectivity":return this._connectivityFeatureCount}}_getFeatureQueryWhereClause(t,e,s,a){let i=t.globalIdField,o=t.fieldsIndex.get(j.assetGroup),c=t.fieldsIndex.get(j.assetType),l=s!=null,r=a!=null,d=i?D.sqlIn(i,e):null,u=l?`(${o?.name} = ${s})`:null,h=l&&r?`(${c?.name} = ${a})`:null;return[d,u,h].filter(Boolean).join(" AND ")}_getFeatureTitle(t){let e=t.attributes,s=t.sourceLayer;if(!e||!s)return"";let a="displayField"in s?s.displayField:null,i=a!=null?e[a.toString()]:null,o=i!=null?i.toString():null,c=t.getObjectId()?.toString();return o||c||""}async _loadUtiltyNetworks(){let t=this.map;if(!t)return;t.utilityNetworks&&await Promise.allSettled(t.utilityNetworks.map(s=>s.load()));let e=this._utilityNetwork;if(e){let s=a=>{if("layerId"in a&&e.isUtilityLayer(a)){let i=a.layerId!=null?e.getSourceIdByLayerId(a.layerId):null;i!=null&&this._networkSourceIdsInUse.add(i)}};this._networkSourceIdsInUse=new Set,t.allLayers.forEach(s),t.allTables.forEach(s)}}async _loadLayers(t){let e=t.filter(s=>!s.loaded).map(s=>s.load());e.length&&await Promise.allSettled(e)}_matchesGlobalFeature(t,e){return this._equals(t.association,e.association)}async _queryAssociatedFeatures(t,e){let{layer:s,_globalId:a,associationTypes:i,_utilityNetwork:o,_canQuery:c,_associationFeatures:l}=this;if(await Promise.allSettled([s?.load(),o?.load()]),!c||!s||!i||!o)return;let r=this._getAssociationsByType(t.type),{associatedAssetGroup:d,associatedAssetType:u}=t,h=new Map;r.forEach(n=>{let{fromNetworkElement:_,toNetworkElement:y}=n,{networkSourceId:w,elementGlobalId:b}=_.globalId===a?{networkSourceId:y.networkSourceId,elementGlobalId:y.globalId}:{networkSourceId:_.networkSourceId,elementGlobalId:_.globalId},g=h.get(w)||[];g.push(b),h.set(w,g)});let m=await this._createAssociationFeatureObjects(r,h,d,u,e);this._parseFeatureObjects(m,l)}async _queryAssociations(t){let{layer:e,_globalId:s,associationTypes:a,_utilityNetwork:i,_canQuery:o}=this;if(await Promise.allSettled([e?.load(),i?.load()]),this._clearAssociations(),!o||!e||!a||!i||!s)return;let c=F(e)?e.parent:e,l=new P({globalId:s,networkSourceId:i.getSourceIdByLayerId(c.layerId)}),r=new Set;a.forEach(n=>{switch(n.type){case"attachment":case"structure":r.add("attachment");break;case"container":case"content":r.add("containment");break;case"connectivity":r.add("connectivity"),r.add("junction-junction-connectivity"),r.add("junction-edge-from-connectivity"),r.add("junction-edge-midspan-connectivity"),r.add("junction-edge-to-connectivity");break}});let d=await i?.queryAssociations(new x({elements:[l],types:Array.from(r)}),{signal:t?.signal}),u=new Map,h=new Map;a.forEach(n=>{h.set(n.type,n),u.set(n.type,[])}),d.forEach(n=>{let{toNetworkElement:_,fromNetworkElement:y}=n;switch(n.associationType){case"attachment":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"attachment",h))break;u.get("attachment")?.push(_.globalId),this._attachmentAssociations.add(n)}else{if(this._shouldDiscardNetworkElement(y,"structure",h))break;u.get("structure")?.push(y.globalId),this._structureAssociations.add(n)}break;case"connectivity":case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":case"junction-junction-connectivity":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"connectivity",h))break;u.get("connectivity")?.push(_.globalId)}else{if(this._shouldDiscardNetworkElement(y,"connectivity",h))break;u.get("connectivity")?.push(y.globalId)}this._connectivityAssociations.add(n);break;case"containment":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"content",h))break;u.get("content")?.push(_.globalId),this._contentAssociations.add(n)}else{if(this._shouldDiscardNetworkElement(y,"container",h))break;u.get("container")?.push(y.globalId),this._containerAssociations.add(n)}break}});let m=a.map(async n=>{let{associatedNetworkSourceId:_,associatedAssetGroup:y,associatedAssetType:w}=n,b=u.get(n.type),g=y!=null?await this._countAssociatedFeatures(_,b,y,w,t):b.length;switch(n.type){case"attachment":this._attachmentFeatureCount=g;break;case"connectivity":this._connectivityFeatureCount=g;break;case"container":this._containerFeatureCount=g;break;case"content":this._contentFeatureCount=g;break;case"structure":this._structureFeatureCount=g;break}});await Promise.allSettled(m)}async _queryFeatureCount(){await this._loadUtiltyNetworks();let{_queryFeatureCountAbortController:t,_canQuery:e}=this;if(!e){this._featureCount=0;return}await this._queryAssociations(t),this._featureCount=this._attachmentFeatureCount+this._connectivityFeatureCount+this._containerFeatureCount+this._contentFeatureCount+this._structureFeatureCount}async _queryLayer(t,e,s,a,i){let o=this._getFeatureQueryWhereClause(t,e,s,a),c=new O({where:o,outFields:["*"],cacheHint:this._supportsCacheHint}),l=G.fromJSON(await Q(t,c,i));return l.features.forEach(r=>{r.layer=E(t)?t.findSublayerForFeature(r):t,r.sourceLayer=r.layer}),l.features}_parseFeatureObjects(t,e){let s=C();t.forEach(a=>{let i=(a?.feature).sourceLayer;B(s,i,()=>new f).add(a)});for(let[a,i]of s)this._sortFeatureObjectsByTitle(i),e.set(a,i)}_selectAssociationType(t){let{flowItems:e}=this;e&&(this._activeAssociationType=t,this._setUpUtilityNetworkAssociationsViewModels(),this._addAssociationTypeFlowItem(t))}_setUpUtilityNetworkAssociationsViewModels(){this._associationViewModels.forEach((i,o)=>{let c=this._associationFeatures.get(o);c?i.forEach(l=>{c.find(r=>this._matchesGlobalFeature(l,r))||(i.remove(l),i.length||this._associationViewModels.delete(o))}):(i.removeAll(),this._associationViewModels.delete(o))});let{map:t,view:e,spatialReference:s,timeZone:a}=this;this._associationFeatures.forEach((i,o)=>{let c=this._associationViewModels.get(o)||new f;i?.filter(Boolean).forEach((l,r)=>{if(!c.some(d=>this._matchesGlobalFeature(d,l))){let{association:d,feature:u,terminalName:h,title:m}=l;c.add({title:m,association:d,featureViewModel:new R({abilities:{utilityNetworkAssociationsContent:!1},map:t,view:e,spatialReference:s,timeZone:a,graphic:u}),terminalName:h},r)}}),this._associationViewModels.set(o,c)})}_shouldDiscardNetworkElement(t,e,s){if(!t)return!1;let{networkSourceId:a}=t,i=s.get(e)?.associatedNetworkSourceId,o=this._networkSourceIdsInUse.has(a);return i!=null&&i!==a||!o}_sortFeatureObjectsByTitle(t){t.sort(this._compareByFeatureTitle)}render(){let{_state:t}=this;return p`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .headingLevel=${this.headingLevel} .description=${this.description}></arcgis-feature-element-info>${t==="loading"?this._renderLoading():t==="disabled"?this._renderAssociationNotFound():this._renderContent()}</div>`}_renderAssociationNotFound(){return p`<calcite-notice icon=information kind=info open scale=s width=full><div slot=message>${this.messages?.noAssociations}</div></calcite-notice>`}_renderAssociationTypeList(t){return this._getFeatureCountForAssociationType(t.type)>0?this._renderAssociationTypeListItem(t):null}_renderAssociationTypeListItem(t){let e=this._getAssociationTypeTitle(t);return A(`association-type-${t.type}`,p`<calcite-list-item .description=${S(t.description)} .label=${S(e)} .value=${t.type} @calciteListItemSelect=${()=>this._selectAssociationType(t)}><calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`)}_renderContent(){let{_state:t,associationTypes:e,messages:s}=this,a=s?.associationsList??s?.noTitle??"";return A("list-container",p`<div class="list-container">${t==="ready"?p`<div><calcite-list display-mode=flat .label=${a}>${e.map(i=>this._renderAssociationTypeList(i))}</calcite-list></div>`:null}${this._renderStickyLoading()}</div>`)}_renderLoading(){return p`<div class="loading-container">${this._renderLoadingIcon()}${this._renderStickyLoading()}</div>`}_renderLoadingIcon(){return p`<calcite-loader inline label></calcite-loader>`}_renderStickyLoading(){return this._state==="querying"?p`<div class="sticky-loading-container">${this._renderLoadingIcon()}</div>`:null}};N("arcgis-feature-utility-network-associations",v);return v},"applications/Components/featureUtils","applications/Components/stringUtils","core/Collection","core/promiseUtils","core/reactiveUtils","core/sql","rest/networks/support/NetworkElement","rest/networks/support/QueryAssociationsParameters","rest/support/FeatureSet","rest/support/Query","widgets/Feature/FeatureViewModel")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import a from"./
|
|
2
|
+
import a from"./YET5HTLQ.js";import"./FF5VMKLK.js";import{A as f,O as h,U as b,a as m,b as l}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([{renderingSanitizer:p},{replace:$},{k:u,l:v,m:I}])=>{var w=[{pattern:/^\s*(https?:\/\/([^\s]+))\s*$/iu,target:"_blank",label:"{messages.view}"},{pattern:/^\s*(tel:([^\s]+))\s*$/iu,label:"{hierPart}"},{pattern:/^\s*(mailto:([^\s]+))\s*$/iu,label:"{hierPart}"},{pattern:/^\s*(arcgis-appstudio-player:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"App Studio Player"},{pattern:/^\s*(arcgis-collector:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Collector"},{pattern:/^\s*(arcgis-explorer:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Explorer"},{pattern:/^\s*(arcgis-navigator:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Navigator"},{pattern:/^\s*(arcgis-survey123:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Survey123"},{pattern:/^\s*(arcgis-trek2there:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Trek2There"},{pattern:/^\s*(arcgis-workforce:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Workforce"},{pattern:/^\s*(iform:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"iForm"},{pattern:/^\s*(flow:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"FlowFinity"},{pattern:/^\s*(lfmobile:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Laserfische"},{pattern:/^\s*(mspbi:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Microsoft Power Bi"}];function F(d,a){let e=w.find(s=>s.pattern.test(a));if(!e)return a;let r=a.match(e.pattern)?.[2],o=$($(e.label,{messages:d,hierPart:r}),{appName:e.appName}),t=e.target?` target="${e.target}"`:"",n=e.target==="_blank"?' rel="noreferrer"':"";return p.sanitizeUrl(new URL(a,window.location.origin==="null"?void 0:window.location.origin).toString()).replace(e.pattern,`<a${t} href="$1"${n}>${o}</a>`)}var k=m`.table{border:none;width:100%;border-collapse:collapse;color:var(--calcite-color-text-2)}.table caption{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.table tr{background-color:var(--arcgis-table-row-background-color, var(--calcite-color-foreground-1))}.table tr:nth-child(odd){background-color:var(--arcgis-table-row-alt-background-color, var(--calcite-color-foreground-2))}.table tr a{color:var(--calcite-color-text-link)}.table tr a:hover,.table tr a:focus{color:var(--calcite-color-brand-hover)}.table tr td,.table tr th{padding:var(--calcite-spacing-xs) var(--calcite-spacing-sm);vertical-align:top;word-break:break-word;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular);line-height:var(--calcite-font-line-height-relative-normal)}.table tr th{border-inline-end:var(--calcite-border-width-md) solid var(--calcite-color-border-3);width:50%;text-align:start}.table tr td{width:50%}`,c=class extends h{constructor(){super(...arguments),this.headingLevel=2}static{this.properties={values:0,description:1,expressionInfos:0,fieldInfos:0,heading:1,isContentFieldInfos:5,graphic:0,layer:0,headingLevel:9,messages:0}}static{this.styles=k}get formattedFieldInfos(){let{expressionInfos:a,fieldInfos:e,layer:r,graphic:o,isContentFieldInfos:t}=this,n=[];return e?.forEach(s=>{if(!(!("visible"in s)||s.visible))return;let i=s.clone();i.label=v({fieldInfo:i,expressionInfos:a,layer:r,graphic:o,isContentFieldInfos:t});let g=u({fieldInfo:s,graphic:o,layer:r});g&&(i.fieldFormat=I({configurableFieldsContainer:g,fieldInfo:i,isContentFieldInfos:t})),n.push(i)}),n}render(){return l`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .description=${this.description} .headingLevel=${this.headingLevel}></arcgis-feature-element-info>${this._renderFields()}</div>`}_renderFieldInfo(a){let{values:e}=this,r=a.fieldName||"",o=a.label||r,t=e?e[r]==null?"":e[r]:"",n=a?.fieldFormat?.type==="date-time",s={openInApp:this.messages?.openInApp??"",view:this.messages?.view??""},i=typeof t=="number"&&!n?f(`${t}`):typeof t=="string"?F(s,t):`${t}`;return l`<tr><th .innerHTML=${p.sanitize(o)??""}></th><td .innerHTML=${p.sanitize(i)??""}></td></tr>`}_renderFields(){let{formattedFieldInfos:a}=this;return a?.length?l`<table class="table"><caption>${this.messages?.fieldsSummary}</caption><tbody>${a.map(e=>this._renderFieldInfo(e))}</tbody></table>`:null}};b("arcgis-feature-fields",c);return c},"applications/Components/sanitizerUtils","applications/Components/stringUtils",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import b from"./
|
|
2
|
+
import b from"./YET5HTLQ.js";import"./FF5VMKLK.js";import{b as $}from"./EHZW6UXL.js";import{O as A,P as y,Q as w,R as d,U as x,a as v,b as a}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([_,I,S,k,{watch:P},{d:u}])=>{function L(i){let e=i.toLowerCase();return e==="image/bmp"||e==="image/emf"||e==="image/exif"||e==="image/gif"||e==="image/x-icon"||e==="image/jpeg"||e==="image/png"||e==="image/tiff"||e==="image/x-wmf"}function T(i){return i?i==="text/plain"?"file-text":i==="application/pdf"?"file-pdf":i==="text/csv"?"file-csv":i==="application/gpx+xml"?"file-gpx":i==="application/x-dwf"?"file-cad":i==="application/postscript"||i==="application/json"||i==="text/xml"||i==="model/vrml"?"file-code":i==="application/x-zip-compressed"||i==="application/x-7z-compressed"||i==="application/x-gzip"||i==="application/x-tar"||i==="application/x-gtar"||i==="application/x-bzip2"||i==="application/gzip"||i==="application/x-compress"||i==="application/x-apple-diskimage"||i==="application/x-rar-compressed"||i==="application/zip"?"file-zip":i.includes("image/")?"file-image":i.includes("audio/")?"file-sound":i.includes("video/")?"file-video":i.includes("msexcel")||i.includes("ms-excel")||i.includes("spreadsheetml")?"file-excel":i.includes("msword")||i.includes("ms-word")||i.includes("wordprocessingml")?"file-word":i.includes("powerpoint")||i.includes("presentationml")?"file-report":"file":"file"}var j=v`.item-link{display:flex;flex-grow:1}.item-link img{max-width:100%;max-height:100%;object-fit:contain}.item-link--list{align-items:center;justify-content:center;width:64px;max-height:64px;overflow:hidden;border-radius:var(--calcite-corner-radius-sm)}.item-link--list img{border-radius:var(--calcite-corner-radius-sm)}.item-link--list-icon{border:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.item-link--list calcite-icon{margin:var(--calcite-spacing-lg)}.item-link--preview{align-items:center;justify-content:center}.item-link--preview calcite-icon{margin-block:var(--calcite-spacing-lg)}.item-description{text-align:center;word-wrap:break-word;word-break:break-word}calcite-link{--calcite-link-text-color: var(--calcite-color-text-3);padding-inline:var(--calcite-spacing-sm);word-wrap:break-word;word-break:break-word}calcite-card{width:100%}`,C=S.ofType(_),b=class extends A{constructor(){super(...arguments),this._attachmentInfos=new C,this._attachmentLayer=null,this._supportsImageOrientation=window?.CSS?.supports("image-orientation","from-image"),this.getAttachmentsPromise=null,this.hideSection=!1,this.headingLevel=2}static{this.properties={effectiveDisplayType:16,getAttachmentsPromise:16,hideSection:16,supportsResizeAttachments:16,attachmentKeywords:0,attachmentTypes:0,description:1,displayType:1,graphic:0,heading:1,messages:0,orderByFields:0,headingLevel:9}}static{this.styles=j}get _supportsTypeWildcard(){let{graphic:e}=this;if(!e)return!1;let t=u(e);return t?.loaded&&"capabilities"in t&&t.capabilities&&"attachment"in t.capabilities&&t.capabilities.attachment&&"supportsResize"in t.capabilities.attachment&&t.capabilities.attachment.supportsTypeWildcard||!1}get effectiveDisplayType(){let{displayType:e}=this;return!e||e==="auto"?this.supportsResizeAttachments?"preview":"list":e}get supportsResizeAttachments(){let{graphic:e}=this;if(!e)return!1;let t=u(e);return t?.loaded&&"capabilities"in t&&t.capabilities&&"attachment"in t.capabilities&&t.capabilities.attachment&&"supportsResize"in t.capabilities.attachment&&t.capabilities.attachment.supportsResize||!1}loaded(){this.manager.onLifecycle(()=>[P(()=>this.graphic,()=>this.graphicChanged(),{initial:!0})])}async getAttachments(){let{_attachmentLayer:e,_attachmentInfos:t,orderByFields:o,attachmentTypes:n,attachmentKeywords:s,_supportsTypeWildcard:g}=this;if(!e||typeof e.queryAttachments!="function")throw new k("invalid-layer","getAttachments(): A valid layer is required.");let l=this.graphic?.getObjectId();if(typeof l!="number")throw new k("invalid-object-id","getAttachments(): Numeric object id is required");let m=o?.map(c=>`${c.field} ${c.order==="descending"?"DESC":"ASC"}`),f=new I({objectIds:[l],returnMetadata:!0,orderByFields:m,attachmentTypes:g?n?.filter(Boolean).map(c=>`${c}/*`):void 0,keywords:s}),r=[],h=e.queryAttachments(f).then(c=>c[l]||r).catch(()=>r);this.getAttachmentsPromise=h;let p=await h;t.destroyAll(),p.length&&t.addMany(p),this.getAttachmentsPromise=null}setAttachmentLayer(){let{graphic:e}=this,t=u(e);this._attachmentLayer=t?t.type==="scene"&&t.associatedLayer!=null?t.associatedLayer:t:null}graphicChanged(){this.graphic&&(this.setAttachmentLayer(),this.getAttachments().catch(()=>this._attachmentInfos.destroyAll()))}getCSSTransform(e){let{orientationInfo:t}=e;return!this._supportsImageOrientation&&t?[t.rotation?`rotate(${t.rotation}deg)`:"",t.mirrored?"scaleX(-1)":""].join(" "):""}render(){return a`<div class="root" .hidden=${!(this.getAttachmentsPromise||this._attachmentInfos.length>0)}><arcgis-feature-element-info .heading=${this.heading} .description=${this.description} .headingLevel=${this.headingLevel}></arcgis-feature-element-info>${this.renderAttachments()}</div>`}renderAttachmentsList(e){return a`<calcite-list .loading=${!!this.getAttachmentsPromise} .label=${this.messages?.componentLabel??""} interaction-mode=static selection-mode=none>${e.toArray().filter(Boolean).map(t=>this.renderAttachmentListItem(t))}</calcite-list>`}renderAttachmentsPreview(e){return a`<calcite-card-group .label=${this.messages?.componentLabel??""}>${this.getAttachmentsPromise?a`<calcite-card loading></calcite-card>`:e.toArray().filter(Boolean).map(t=>this.renderAttachmentPreviewItem(t))}</calcite-card-group>`}renderAttachments(){let{effectiveDisplayType:e,_attachmentInfos:t}=this;return e==="preview"?this.renderAttachmentsPreview(t):this.renderAttachmentsList(t)}renderAttachmentListItem(e){let{supportsResizeAttachments:t}=this,{contentType:o,name:n,url:s,size:g}=e,l=64,m=n||this.messages?.noTitle,f=T(o),r=this.getCSSTransform(e),h=r?{transform:r,"image-orientation":"none"}:{},p=t&&L(o),c=a`<a class=${y($("item-link","item-link--list",{"item-link--list-icon":!p}))} slot=content-start href=${s??void 0??d} rel=noreferrer target=_blank>${p?a`<img alt=${n??d} src=${`${s}${s?.includes("?")?"&":"?"}w=${l}&s=${g}`} style=${w(h)} title=${n??d}>`:a`<calcite-icon .icon=${f}></calcite-icon>`}</a>`,z=a`<calcite-link slot=content .href=${s??void 0} rel=noreferrer target=_blank>${m}</calcite-link>`;return a`<calcite-list-item .label=${m}>${c}${z}</calcite-list-item>`}renderAttachmentPreviewItem(e){let{supportsResizeAttachments:t}=this,{contentType:o,name:n,url:s,size:g}=e,l=225,m=n||this.messages?.noTitle,f=T(o),r=this.getCSSTransform(e),h=r?{transform:r,"image-orientation":"none"}:{},p=a`<a class=${y($("item-link","item-link--preview"))} slot=thumbnail href=${s??void 0??d} rel=noreferrer target=_blank>${t&&L(o)?a`<img alt=${n??d} src=${`${s}${s?.includes("?")?"&":"?"}w=${l}&s=${g}`} style=${w(h)} title=${n??d}>`:a`<calcite-icon scale=l .icon=${f}></calcite-icon>`}</a>`;return a`<calcite-card .label=${m}>${p}<span class="item-description" slot=description>${m}</span></calcite-card>`}};x("arcgis-feature-attachments",b);return b},"rest/query/support/AttachmentInfo","rest/support/AttachmentQuery","core/Collection","core/Error","core/reactiveUtils",b)
|