@arcgis/map-components 6.0.0-next.14 → 6.0.0-next.16
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/33B22YZ5.js +2 -0
- package/dist/cdn/{NWCS3WJE.js → 35YLXOQ5.js} +1 -1
- package/dist/cdn/4XEZYOW7.js +2 -0
- package/dist/cdn/{OL5Z5MUQ.js → 54252KWO.js} +1 -1
- package/dist/cdn/{IZ3VMFW6.js → 5VXEMMLV.js} +1 -1
- package/dist/cdn/{UUBJR2VN.js → AI3ETXGZ.js} +1 -1
- package/dist/cdn/{OS3TKP63.js → AQ4GVWNJ.js} +1 -1
- package/dist/cdn/AWB7XOHF.js +2 -0
- package/dist/cdn/BYYCKI2P.js +2 -0
- package/dist/cdn/C2YP473B.js +2 -0
- package/dist/cdn/DUKK2PHD.js +2 -0
- package/dist/cdn/{I2VQOWJL.js → ECYWLMDD.js} +1 -1
- package/dist/cdn/FFVPO4JB.js +2 -0
- package/dist/cdn/{OS736MCE.js → FUJYJKDU.js} +1 -1
- package/dist/cdn/{SWWJXGPV.js → GFYLYX2V.js} +1 -1
- package/dist/cdn/GMEXAEOI.js +2 -0
- package/dist/cdn/H7QBBTTP.js +2 -0
- package/dist/cdn/{CDCI4EQR.js → HZDWPWBH.js} +1 -1
- package/dist/cdn/JB6WQEFJ.js +2 -0
- package/dist/cdn/{KJNU4Q25.js → JVC5XNYJ.js} +1 -1
- package/dist/cdn/LYYBCY4N.js +2 -0
- package/dist/cdn/{TMQVC4YN.js → NMGC3KRM.js} +1 -1
- package/dist/cdn/NU75HQA2.js +2 -0
- package/dist/cdn/{B2UZB5MB.js → NUZBBPNE.js} +2 -2
- package/dist/cdn/{JC24VBLE.js → ODSZ7JZM.js} +1 -1
- package/dist/cdn/{VWEJ2XSC.js → P3AEIHWE.js} +1 -1
- package/dist/cdn/QCYQNVPL.js +2 -0
- package/dist/cdn/{ARHQMHUP.js → SAIBFBPE.js} +1 -1
- package/dist/cdn/U6NHJKIM.js +2 -0
- package/dist/cdn/VYM3TR3Q.js +2 -0
- package/dist/cdn/WC2N2XG6.js +2 -0
- package/dist/cdn/ZDLHDQCX.js +2 -0
- package/dist/cdn/ZIQRARXE.js +2 -0
- package/dist/cdn/{Y56CR5OU.js → ZS5IADYN.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/loader-utils.js +41 -0
- package/dist/chunks/resources.js +10 -4
- package/dist/chunks/slots.js +3 -3
- package/dist/chunks/useArcgisViewReadyError.js +180 -128
- package/dist/components/arcgis-editor/customElement.d.ts +9 -17
- package/dist/components/arcgis-editor/customElement.js +18 -16
- package/dist/components/arcgis-feature-next/customElement.js +21 -14
- package/dist/components/arcgis-feature-table/customElement.d.ts +58 -39
- package/dist/components/arcgis-features-next/customElement.js +137 -116
- package/dist/components/arcgis-fullscreen/customElement.js +4 -4
- package/dist/components/arcgis-legend/customElement.d.ts +2 -0
- package/dist/components/arcgis-line-of-sight/customElement.d.ts +15 -6
- package/dist/components/arcgis-link-chart/customElement.js +24 -24
- package/dist/components/arcgis-map/customElement.js +16 -16
- package/dist/components/arcgis-scene/customElement.js +21 -21
- package/dist/components/arcgis-sketch/customElement.d.ts +1 -3
- package/dist/components/arcgis-sketch/customElement.js +146 -178
- package/dist/components/arcgis-time-bar/TimeBarViewModel.d.ts +2 -4
- package/dist/components/arcgis-time-bar/customElement.js +108 -105
- package/dist/components/arcgis-time-bar-date/customElement.js +10 -10
- package/dist/components/arcgis-time-bar-extent/customElement.js +9 -9
- package/dist/components/arcgis-time-bar-slider/customElement.js +27 -33
- package/dist/components/arcgis-track/customElement.d.ts +2 -2
- package/dist/components/arcgis-track/types.d.ts +1 -1
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +4 -3
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +61 -68
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.d.ts +26 -3
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +53 -50
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +1 -2
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +2 -2
- package/dist/types/lumina.d.ts +2 -1
- package/dist/types/preact.d.ts +2 -1
- package/dist/types/react.d.ts +2 -1
- package/dist/types/stencil.d.ts +2 -1
- package/package.json +7 -7
- package/dist/cdn/6RE5RWYP.js +0 -2
- package/dist/cdn/AL3PLZEE.js +0 -2
- package/dist/cdn/EYM377YG.js +0 -2
- package/dist/cdn/FINGRYZY.js +0 -2
- package/dist/cdn/GLU2HDV6.js +0 -2
- package/dist/cdn/JR3EXG25.js +0 -2
- package/dist/cdn/LISDXDCI.js +0 -2
- package/dist/cdn/LXLLMRNZ.js +0 -2
- package/dist/cdn/OVXGV76V.js +0 -2
- package/dist/cdn/PTCHEZNA.js +0 -2
- package/dist/cdn/QAZ4W6K3.js +0 -2
- package/dist/cdn/QPR3KBLU.js +0 -2
- package/dist/cdn/TI6R2CP6.js +0 -2
- package/dist/cdn/TUT6GS4A.js +0 -2
- package/dist/cdn/UOO6QY7C.js +0 -2
- package/dist/cdn/UYWJU5UG.js +0 -2
- package/dist/cdn/WADL7TT6.js +0 -2
- /package/dist/cdn/{MGDY6SA3.js → 2JLC2JV7.js} +0 -0
- /package/dist/cdn/{ITSWOLPG.js → 37Z3E4ZM.js} +0 -0
- /package/dist/cdn/{SMCQ5457.js → 53PKFG2U.js} +0 -0
- /package/dist/cdn/{YZ23NKH4.js → 5ZLCMYZU.js} +0 -0
- /package/dist/cdn/{DXD3FSIB.js → 6MRDTILE.js} +0 -0
- /package/dist/cdn/{TTGAGK6Y.js → 72FJMPJ2.js} +0 -0
- /package/dist/cdn/{CIVCCENA.js → 7P23WI52.js} +0 -0
- /package/dist/cdn/{DU7MQDXJ.js → 7QUHJ4F6.js} +0 -0
- /package/dist/cdn/{PLRW457V.js → 7YXE3BUX.js} +0 -0
- /package/dist/cdn/{IYTA36WK.js → AE26KT54.js} +0 -0
- /package/dist/cdn/{OY2F5AX3.js → C4EAONGF.js} +0 -0
- /package/dist/cdn/{7RG4ZQP7.js → CTVCZ2FU.js} +0 -0
- /package/dist/cdn/{DVVXBWDN.js → EIQ3BKQI.js} +0 -0
- /package/dist/cdn/{J5PYSABF.js → EULM4L53.js} +0 -0
- /package/dist/cdn/{VHCJJ5FD.js → EVCKANRW.js} +0 -0
- /package/dist/cdn/{4U7C2G4R.js → GXIGMIXV.js} +0 -0
- /package/dist/cdn/{UAVE6R7W.js → JZSRPSRH.js} +0 -0
- /package/dist/cdn/{FSKKSFCQ.js → KDO2EJA3.js} +0 -0
- /package/dist/cdn/{B42Z3IQW.js → LCTJF3NT.js} +0 -0
- /package/dist/cdn/{LH3HGDD3.js → LGPNRKDT.js} +0 -0
- /package/dist/cdn/{5QBYMSV7.js → LNZRHKHG.js} +0 -0
- /package/dist/cdn/{SN3LTQAO.js → MM4N6C4V.js} +0 -0
- /package/dist/cdn/{A7G5RNN7.js → MQL4JTYG.js} +0 -0
- /package/dist/cdn/{4JRBTFMB.js → NUCXXE6V.js} +0 -0
- /package/dist/cdn/{XELSV7WY.js → O2VAKVIY.js} +0 -0
- /package/dist/cdn/{DYUSQ3OG.js → OLEIOWZX.js} +0 -0
- /package/dist/cdn/{3E6IBNWF.js → ORS7OWLJ.js} +0 -0
- /package/dist/cdn/{IHQ2C6NE.js → P3BAHG4Q.js} +0 -0
- /package/dist/cdn/{IPLEI5W5.js → QYMZT7OC.js} +0 -0
- /package/dist/cdn/{43JS3JXR.js → RENVCO3U.js} +0 -0
- /package/dist/cdn/{CJZCG74B.js → RGECACLD.js} +0 -0
- /package/dist/cdn/{HI7Y3XH5.js → SYIOPNRF.js} +0 -0
- /package/dist/cdn/{F2JEYWUA.js → T62G5MRK.js} +0 -0
- /package/dist/cdn/{AS55LGS3.js → TS32SDVT.js} +0 -0
- /package/dist/cdn/{W5QAG2HP.js → UCHDAO3V.js} +0 -0
- /package/dist/cdn/{HSYCQNEN.js → VNY7TNRC.js} +0 -0
- /package/dist/cdn/{KVN6NUH4.js → XJIILB3W.js} +0 -0
- /package/dist/cdn/{OHIZP5N4.js → Y4D3Q4G7.js} +0 -0
- /package/dist/cdn/{EMFLPMFZ.js → Y7KMV2PI.js} +0 -0
- /package/dist/cdn/{IBTIGEEQ.js → YASANB6O.js} +0 -0
- /package/dist/cdn/{L5L2SWJG.js → YMN2Q7CW.js} +0 -0
- /package/dist/cdn/{ZHP63EHR.js → YN6VG7UO.js} +0 -0
- /package/dist/cdn/{T6V5HDYH.js → YRYYWFPY.js} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import p from"./BYYCKI2P.js";import{a as L}from"./Y6WTYXVP.js";import"./FH3WFF5O.js";import o from"./H6SIAY6D.js";import{a as T}from"./DYUFBVXE.js";import l from"./CESPPRYQ.js";import i from"./HU57LQOA.js";import h from"./F4AJCUZ6.js";import{a as E}from"./WJQUE4DR.js";import{b as Z,c as U,d as j}from"./366GLQ5R.js";import e from"./OISNNHIG.js";import{a as z}from"./7465ANAR.js";import d from"./KRJCOTGC.js";import c from"./U7WRQCRV.js";import{f as N,h as B}from"./GIBXI44G.js";import"./RQT2PVDJ.js";import a from"./SBYVR52H.js";import{a as b}from"./LXME6MU5.js";import{P as f,Q as m,R as O,T as $,X as g,Y as P,_ as H,a as k,b as n,o as x,x as C}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([J,q,Q,{initializeProjection:Y},{renderingSanitizer:M},{stripHTML:A},{substitute:h,formatNumber:I},{when:ee,watch:u},{getGraphicOriginTitle:te},,,,V,,,{e:D},{d:W},S])=>{var ie=k`: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,.content-hidden){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)}.content-feature{--calcite-flow-item-footer-padding: 0;--calcite-flow-header-top-space: 0}.feature-menu-observer{flex:0 0 1px;height:1px;margin-block-start:-1px}.action-exit{transform:scaleX(-1)}.flow-item-drill-in{--calcite-flow-item-footer-padding: 0}.diagnostics-notice{padding:var(--calcite-space-md)}`;function se(_){return _?.declaredClass.startsWith("esri.layers.")??!1}function ae(_){if(!(!_||!("featureReduction"in _)))return _.featureReduction?.type}var ne=V(Q),oe=5,R=class extends O{constructor(){super(...arguments),this._zoomToFeature=new J({icon:"magnifying-glass-plus",id:"zoom-to-feature",title:"{messages.zoom}"}),this._fetchFeaturesController=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this._loadMoreFeatures()},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._featureMenuIntersectionObserverNode=null,this._setFocusAnimationFrameId=null,this._setFocusAnimationFrameResolve=null,this._rootFlowItemNode=f(),this._featureMenuViewportNode=f(),this._actionBarMenuNode=f(),this._flowContainerNode=f(),this._aggregatedFeaturesComponent=f(),this.messages=z(),this._selectedFeatureComponent=f(),this._actionFlowItems=new WeakSet,this._direction=N(),this._cancelOpenRelatedFeature=()=>{this._openRelatedFeatureAbortController=E(this._openRelatedFeatureAbortController)},this._spinnerVisible=!1,this._openRelatedFeatureAbortController=null,this.flowItems=new q,this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._hasActionsStartSlotContent=!1,this._hasActionsEndSlotContent=!1,this._selectedFeatureLoading=!1,this._lastSettledCollapseEnabled=!1,this._lastSettledHeading="",this.viewModel=ne(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.autoDestroyDisabled=!1,this.focusTrapEnabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.diagnostics=this.viewModel.diagnostics,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.effectiveHeading=this.viewModel.effectiveHeading,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=!1,this.featureNavigationTop=!1,this.features=this.viewModel.features,this.featuresPerPage=this.viewModel.featuresPerPage,this.featureItemAbilities=this.viewModel.featureItemAbilities,this.goToOverride=this.viewModel.goToOverride,this.headerActions=new q,this.heading=this.viewModel.heading,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSelectFeature=!1,this.hideSpinner=!1,this.hideContent=!1,this.chartAnimationDisabled=this.viewModel.featureItemAbilities?.chartAnimation,this.hideAttachmentsContent=this.viewModel.featureItemAbilities?.attachmentsContent,this.hideEmptyRelationshipContent=!1,this.hideCustomContent=this.viewModel.featureItemAbilities?.customContent,this.hideExpressionContent=!1,this.hideFieldsContent=this.viewModel.featureItemAbilities?.fieldsContent,this.hideMediaContent=this.viewModel.featureItemAbilities?.mediaContent,this.hideRelationshipContent=this.viewModel.featureItemAbilities?.relationshipContent,this.hideTextContent=this.viewModel.featureItemAbilities?.textContent,this.hideUtilityNetworkContent=this.viewModel.featureItemAbilities?.utilityNetworkAssociationsContent,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.open,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.arcgisClose=C(),this.arcgisPropertyChange=B()("active","collapsed","effectiveHeading","featureCount","featureMenuOpen","features","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=C(),this.arcgisTriggerAction=C()}static{this.properties={_openRelatedFeatureAbortController:16,flowItems:16,_aggregatedFeatureCount:16,_selectedAggregatedFeatureIndex:16,_aggregatedFeaturesLoading:16,_hasActionsStartSlotContent:16,_hasActionsEndSlotContent:16,_selectedFeatureLoading:16,_lastSettledCollapseEnabled:16,_lastSettledHeading:16,_selectedFeatureViewModel:16,_hideActionText:16,_featureNavigationVisible:16,_isCollapsed:16,_collapseEnabled:16,_selectedFeatureHeading:16,_selectedFeatureHeadingText:16,_selectedFeatureContent:16,_selectedFeaturePending:16,_featureFlowItemSelected:16,viewModel:0,actions:0,active:0,autoDestroyDisabled:5,focusTrapEnabled:5,collapseDirection:1,collapsed:5,content:1,diagnostics:0,defaultPopupTemplateEnabled:5,effectiveHeading:32,featureCount:9,featureMenuOpen:5,featureMenuTitle:1,featureNavigationTop:5,features:0,featuresPerPage:9,featureItemAbilities:0,goToOverride:0,headerActions:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSelectFeature:5,hideSpinner:5,hideContent:5,chartAnimationDisabled:5,hideAttachmentsContent:5,hideEmptyRelationshipContent: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,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=ie}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._selectedFeatureHeading)&&!!(this.content||this._selectedFeatureContent)||this._selectedFeaturePending&&this._lastSettledCollapseEnabled)}get _selectedFeatureHeading(){return this.viewModel.selectedFeatureItem?.heading}get _selectedFeatureHeadingText(){return this._selectedFeatureHeading||(this.viewModel.selectedFeatureItem?.state==="loading"?this.messages.loading:this.messages.untitled)}get _selectedFeatureContent(){return this.viewModel.selectedFeatureItem?.content}get _selectedFeaturePending(){let{selectedFeature:e,selectedFeatureItem:t}=this.viewModel;if(!e)return!1;let i=this._selectedFeatureViewModel,s=i?.state;return t==null||t.waitingForContent||i?.graphic!==e||s!=="ready"&&s!=="error"}get _featureFlowItemSelected(){return this.initialDisplayMode==="list"?!!this.selectedFeature:!this.featureMenuOpen}clear(){this.viewModel.clear()}close(){this.open=!1}async destroy(){await this.manager.destroy(),this._removeSpinner(this.referenceElement),this._cancelOpenRelatedFeature(),this._cancelSetFocusAnimationFrame(),this._removeFlowItems(),this._unobserveFeatureMenuObserver(),this._cancelFetchingFeatures(),this._featureMenuIntersectionObserver?.disconnect()}async fetchFeatures(e,t){this._cancelFetchingFeatures();let{signal:i}=t??{},s=new AbortController,{signal:a}=s,o=i?AbortSignal.any([a,i]):a;this._fetchFeaturesController=s,!e&&this.view&&this.location&&(await Y(this.location.spatialReference,this.view.spatialReference,null,{signal:o}),e=this.view.toScreen(this.location)??void 0),e&&await this.viewModel.fetchFeatures(e,{...t,signal:o})}next(){this.viewModel.next()}previous(){this.viewModel.previous()}async setFocus(){this._cancelSetFocusAnimationFrame(),await new Promise(e=>{this._setFocusAnimationFrameResolve=e,this._setFocusAnimationFrameId=requestAnimationFrame(()=>{this._setFocusAnimationFrameId=null;try{if(!this.isConnected||!this.viewModel?.active)return;this._flowContainerNode.value?.setFocus()}finally{this._resolveSetFocusAnimationFrame()}})})}connectedCallback(){super.connectedCallback(),this._createSpinner()}willUpdate(){let e=this._selectedFeaturePending,{effectiveHeading:t}=this.viewModel;e||(this._lastSettledCollapseEnabled=this._collapseEnabled),(t||!e)&&(this._lastSettledHeading=t??"")}updated(){let e=this._selectedFeatureComponent.value??void 0;this.selectedFeatureComponent!==e&&(this._selectedFeatureViewModel=e?.viewModel,x(()=>this.selectedFeatureComponent=e)),this.componentOnReady().then(()=>{let t=this._featureMenuIntersectionObserverNode;this.isConnected&&t&&(this._featureMenuIntersectionObserver.unobserve(t),this._featureMenuIntersectionObserver.observe(t))})}loaded(){this.manager.onLifecycle(()=>[S({getLoading:()=>this.viewModel.waitingForResult,setEffectiveLoading:e=>{this._spinnerVisible=e,this._createSpinner()},timeout:25,minShownDuration:0}),S({getLoading:()=>this._selectedFeaturePending,setEffectiveLoading:e=>{this._selectedFeatureLoading=e}}),ee(()=>[this.initialDisplayMode==="list"&&!!this.viewModel?.selectedFeature,this.viewModel?.active],()=>{this.setFocus()}),u(()=>[this.flowItems?.length,this.featureMenuOpen],()=>{this.setFocus()}),u(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),u(()=>this.viewModel?.view?.scale,()=>this._viewScaleChange()),u(()=>this.viewModel?.view,(e,t)=>t&&this._viewChange()),u(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),u(()=>this.selectedFeatureComponent?.viewModel,(e,t)=>t&&this._removeFlowItems()),u(()=>[this.viewModel?.features.at(0),this.viewModel?.featureCount??0],([e,t],i)=>{let[s,a]=i??[void 0,0];(e!==s||t<a)&&this._featureMenuViewportScrollTop()}),u(()=>[this.featureMenuOpen,this.initialDisplayMode,this.open],()=>{this.viewModel.featureMenuOpen=this.featureMenuOpen,this.open&&(this.featureMenuOpen||this.initialDisplayMode==="list")&&(this.viewModel.featurePage=1)},{initial:!0}),u(()=>this.flowItems.toArray(),()=>this._handleFlowItemsChange(),{initial:!0}),u(()=>this.viewModel.aggregatedFeaturesEnabled,e=>{e||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._removeFlowItems())}),u(()=>this.referenceElement,(e,t)=>{this._removeSpinner(t),this._createSpinner()},{initial:!0}),u(()=>[this.hideSpinner,this.viewModel?.view,this.viewModel?.location,this.viewModel?.pendingLocation,this.viewModel?.open],()=>this._createSpinner(),{initial:!0})])}disconnectedCallback(){super.disconnectedCallback(),this._selectedFeatureLoading=!1,this._spinnerVisible=!1,this._cancelSetFocusAnimationFrame(),this._removeSpinner(this.referenceElement)}_loadMoreFeatures(){let{viewModel:e}=this,{featurePage:t,featuresPerPage:i,features:s}=e;e.open&&(this.initialDisplayMode==="list"||this.featureMenuOpen)&&t!=null&&t*i<s.length&&(e.featurePage=t+1)}_resolveSetFocusAnimationFrame(){let e=this._setFocusAnimationFrameResolve;this._setFocusAnimationFrameResolve=null,e?.()}_cancelSetFocusAnimationFrame(){this._setFocusAnimationFrameId!=null&&(cancelAnimationFrame(this._setFocusAnimationFrameId),this._setFocusAnimationFrameId=null),this._resolveSetFocusAnimationFrame()}_cancelFetchingFeatures(){this._fetchFeaturesController=E(this._fetchFeaturesController)}_handleClose(){this.close(),this.arcgisClose.emit()}_groupResultsByLayer(){let{features:e,featurePage:t,featuresPerPage:i}=this.viewModel,s=new Map,a=Math.min((t??0)*i,e.length);for(let o=0;o<a;o++){let l=e[o],r=D(l),d=se(r)?r:null,c=s.get(d);c||(c=[],s.set(d,c)),c.push(o)}return s}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(e){this._cancelOpenRelatedFeature();let t=new AbortController;if(this._openRelatedFeatureAbortController=t,await e.updateGeometry(),t.signal.aborted)return;let i=e.graphic,s=i?.geometry;if(s==null||i==null){this._openRelatedFeatureAbortController=null;return}if(this._removeFlowItems(),await this.viewModel.zoomTo({target:s}),t.signal.aborted)return;let{labelPointExecute:a}=await $arcgis.t(m=>m[0],"geometry/operators/labelPointOperator");if(t.signal.aborted)return;let o=a(s);o!=null&&(this.location=o),this.features=[i],this.open=!0,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._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?this.selectedFeatureIndex=-1: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()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){e!==this._featureMenuIntersectionObserverNode&&(this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserverNode=e??null)}_getActionLabel(e,t){let{messages:i}=this;if(e.id==="zoom-to-feature"){let s=t?A(t.heading||(("state"in t&&t.state==="loading"?i.loading:i.untitled)??"")):this._selectedFeatureHeadingText;return h(i.zoomLabel??"",{messages:i,title:s})}return null}_getActionTitle(e,t){let{messages:i}=this,s=t?t.graphic:this.selectedFeature,{id:a}=e,o=s?.attributes,l=e.title??"",r=a==="zoom-to-feature"?h(l,{messages:i}):a==="remove-selected-feature"?h(l,{messages:i}):a==="zoom-to-aggregated-features"?h(l,{messages:i}):a==="browse-aggregated-features"?h(l,{messages:i}):e.title;return r&&o?h(r,o):r??""}_onMainKeydown(e){let{key:t}=e;e.defaultPrevented||Z(e)||(j(t,this._direction,{horizontalOnly:!0})&&(e.preventDefault(),e.stopPropagation(),this._closeFeatureMenu(),this.previous()),U(t,this._direction,{horizontalOnly:!0})&&(e.preventDefault(),e.stopPropagation(),this._closeFeatureMenu(),this.next()))}_featureMenuViewportScrollTop(){this._featureMenuViewportNode.value?.scrollContentTo({top:0})}_selectedFeatureIndexUpdated(e,t){let{featureCount:i,waitingForResult:s}=this.viewModel;s||!i||e===t||e===-1||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._removeFlowItems(),this._rootFlowItemNode.value?.scrollContentTo({top:0}))}_triggerAction(e,t=this.flowItems.getItemAt(this.flowItems.length-1)){if(e.disabled)return;e?.type==="toggle"&&(e.value=!e.value);let i=t&&"allActions"in t?t.viewModel:void 0;W(e,this.viewModel,i),this.arcgisTriggerAction.emit({action:e})}_viewScaleChange(){let{selectedFeature:e}=this,t=D(e);!e?.isAggregate||ae(t)!=="cluster"||(this.viewModel.aggregatedFeaturesEnabled=!1,this.open=!1,this.clear())}_viewChange(){this.viewModel.clear(),this.open=!1,this._aggregatedFeatureCount=0,this._removeFlowItems()}_handleAggregatedFeaturesPropertyChange({detail:e,target:t}){e.name==="aggregatedFeatureCount"&&(this._aggregatedFeatureCount=t.aggregatedFeatureCount),e.name==="selectedAggregatedFeatureIndex"&&(this._selectedAggregatedFeatureIndex=t.selectedAggregatedFeatureIndex,this._syncSelectedDrillInFeature()),e.name==="loading"&&(this._aggregatedFeaturesLoading=t.loading)}_closeOpenActionMenu(){let{_actionBarMenuNode:e}=this;e.value&&(e.value.menuOpen=!1)}_handleFlowItemsChange(){this._syncSelectedDrillInFeature(),this.flowItems.forEach(e=>{!("allActions"in e)||this._actionFlowItems.has(e)||(this._actionFlowItems.add(e),e.componentOnReady().then(()=>{this.isConnected&&this.flowItems.includes(e)&&this.requestUpdate()}))})}_syncSelectedDrillInFeature(){let e=this.flowItems.getItemAt(this.flowItems.length-1);x(()=>this.selectedDrillInFeature=e?.graphic??void 0)}_removeFlowItems(){this.viewModel.aggregatedFeaturesEnabled=!1,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(){if(this.hideHeading)return"";let{effectiveHeading:e}=this.viewModel;return e||!this._selectedFeaturePending?e??"":this._lastSettledHeading||(this._selectedFeatureLoading?this.messages.loading??"":"")}_handleActionsStartSlotChange(e){this._hasActionsStartSlotContent=L(e)}_handleActionsEndSlotChange(e){this._hasActionsEndSlotContent=L(e)}_removeSpinner(e){e?.manager?.component?.extraContent?.remove(this._spinnerEl),this._spinnerEl=void 0}_createSpinner(){let e=this.referenceElement;e&&(this._removeSpinner(e),this._spinnerEl=P(n`<arcgis-spinner .label=${this.messages.loading??""} .trackLocation=${!this.hideSpinner&&this.viewModel.open&&this._spinnerVisible} .location=${this.viewModel?.pendingLocation??this.viewModel?.location??void 0} .referenceElement=${e} .view=${this.viewModel?.view??void 0}></arcgis-spinner>`),e.manager?.component?.extraContent?.add(this._spinnerEl))}#e(e){let t=e&&"allActions"in e?e:void 0,{selectedFeatureItem:i}=this.viewModel;if(t&&!t.allActions)return[];let s=t?t.isFeatureFromTable:i?.isFeatureFromTable;return(t?.allActions??i?.allActions??(!e&&this.viewModel.includeDefaultActions?this.viewModel.defaultActions.concat(this.viewModel.actions):this.viewModel.actions)).toArray().filter(a=>!(e&&a.id==="browse-aggregated-features")&&!(s&&!this.location&&a.id===this._zoomToFeature.id))}render(){return n`<div class="root">${this._renderContentContainer()}</div>`}_renderFeatureNavigation(){return[this._renderPagination(()=>this._previousFeature(),()=>this._nextFeature()),this.initialDisplayMode==="list"?this._renderFeaturePaginationText(this.viewModel.featureCount,this.viewModel.selectedFeatureIndex):this._renderFeatureMenuButton()]}_renderHeader(){return this.featureNavigationTop&&this._featureNavigationVisible?n`<div slot=header-top class="header">${this._renderFeatureNavigation()}</div>`:null}_renderFooter(){return!this.featureNavigationTop&&this._featureNavigationVisible?n`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>`:null}_renderFeaturePaginationText(e,t){let{messages:i}=this;return n`<div class="pagination-text">${h(i.pageText??"",{index:I(t+1),total:I(e)})}</div>`}_renderFeatureMenuButton(){let{messages:e,viewModel:t}=this,{featureCount:i,streamingFeatures:s,selectedFeatureIndex:a}=t;return n`<calcite-action class="pagination-menu-button" icon=list .label=${e.showAllFeatures??""} .loading=${s} @click=${this._handlePaginationMenuButton} .text=${h(e.pageText??"",{index:I(a+1),total:I(i)})} text-enabled title=${e.showAllFeatures??""??g}></calcite-action>`}_renderPagination(e,t){let{previous:i,next:s}=this.messages;return n`<calcite-action-bar class="pagination-action-bar" expand-toggle-disabled layout=horizontal overflow-mode=none scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${i??""} @click=${e} .text=${i??""} title=${i??""??g}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${s??""} @click=${t} .text=${s??""} title=${s??""??g}></calcite-action></calcite-action-group></calcite-action-bar>`}_renderFeatureMenuItem(e){let{initialDisplayMode:t}=this,{featureModels:i,selectedFeatureIndex:s}=this.viewModel,a=i[e],o=a?.state==="ready"?a.heading:"",l=e===s;return n`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${()=>this._setActiveFeature(e)} @mouseleave=${this._removeActiveFeature} @mouseover=${()=>this._setActiveFeature(e)} .selected=${l} @calciteListItemSelect=${()=>this._selectFeature(e)}><span .innerHTML=${(M.sanitize(o)||(a?.state==="loading"?this.messages.loading: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(),s=this.initialDisplayMode==="list"?"none":"single";return t.features.length?n`<calcite-list display-mode=flat .label=${e?.featuresList??""} selection-appearance=icon .selectionMode=${s}>${Array.from(i,([a,o])=>{let l=o.map(d=>this._renderFeatureMenuItem(d)),r=a?a.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&r!==null?T(a??"map-graphics",n`<calcite-list-item-group .heading=${r}>${l}</calcite-list-item-group>`):l})}</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??g}></calcite-action>`:null}_renderHeaderActions(){return this.headerActions.map(e=>this._renderHeaderAction(e)).toArray()}_renderContentFeature(e){let{headingLevel:t,hideCloseButton:i,_isCollapsed:s,_collapseEnabled:a,featureNavigationTop:o,initialDisplayMode:l,selectedFeature:r,hideHeading:d}=this,{active:c,selectedFeatureItem:v,content:F}=this.viewModel,p=this._getHeading();if(l==="list"&&!r)return null;let w=!this._selectedFeaturePending&&(v?!v.content:!F);return n`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${$(b({"content-feature":!0,"flow-item-collapsed":s}))} .closable=${!i} .closed=${!c} .collapsed=${s} .collapseDirection=${this.collapseDirection??(o?"down":"up")} .collapsible=${a} .headingLevel=${t} .selected=${e} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand}} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController||this._selectedFeatureLoading} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} @keydown=${this._onMainKeydown} .heading=${!d&&p?A(p):void 0} ${m(this._rootFlowItemNode)}>${this._renderHeader()}${!d&&p?n`<div slot=heading><div .innerHTML=${M.sanitize(p??"")??""}></div></div>`:null}${this._renderHeaderActions()}${this._renderActionBar()}<div class=${$(b("container","content-container",{"content-hidden":w}))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`}_renderDiagnosticsRefineResults(){let{messages:e}=this,{view:t}=this.viewModel;return t!=null&&"effectiveMaxZoom"in t.constraints&&t.constraints.effectiveMaxZoom>=0&&t.zoom>=t.constraints.effectiveMaxZoom?e.maxRecordCountDescriptionRefineResultsMaxZoomLevel:e.maxRecordCountDescriptionRefineResults}_renderDiagnosticsList(e){let{messages:t}=this,i=Array.from(e,s=>te(s)??t.untitled);return i.length?n`<p>${t.maxRecordCountDescriptionWithLayerList}</p><ul>${i.map(s=>n`<li>${s}</li>`)}</ul><p>${this._renderDiagnosticsRefineResults()}</p>`:null}_renderDiagnosticsMultipleLayers(){let{messages:e}=this;return n`<p>${e.maxRecordCountDescriptionMultipleLayers}</p><p>${this._renderDiagnosticsRefineResults()}</p>`}_renderDiagnostics(){let{messages:e}=this,{diagnostics:t}=this.viewModel,i=t?.layerLimitExceeded;return i?.size?n`<calcite-notice class="diagnostics-notice" open kind=info scale=s><span slot=title>${e.maxRecordCountHeading}</span><div slot=message>${i.size<=oe?this._renderDiagnosticsList(i):this._renderDiagnosticsMultipleLayers()}</div></calcite-notice>`:null}_renderFeatureMenuContainer(){let{viewModel:e,hideCloseButton:t,featureMenuTitle:i,messages:s,initialDisplayMode:a,featureMenuOpen:o,_featureFlowItemSelected:l,_collapseEnabled:r,_isCollapsed:d,featureNavigationTop:c,headingLevel:v}=this,{active:F,features:p,streamingFeatures:w}=e,G=i??s.selectFeature,y=h(s.backLabel??"",{title:this._selectedFeatureHeadingText});if(a==="feature"&&!o)return null;let K=!l;return n`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${$(b({"flow-item-collapsed":d}))} .closable=${!t} .closed=${!F} .collapsed=${a==="list"&&d} .collapseDirection=${this.collapseDirection??(c?"down":"up")} .collapsible=${a==="list"&&r} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand,back:y}} .description=${this.hideFeatureMenuHeading?void 0:h(s.total??"",{total:p.length})} .heading=${this.hideFeatureMenuHeading?void 0:G} .headingLevel=${v} .loading=${e.waitingForResult} .selected=${K} @calciteFlowItemBack=${X=>{X.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${m(this._featureMenuViewportNode)}>${a==="list"?this._renderHeaderActions():null}${w?n`<calcite-loader class="loader" inline .label=${s.loading??""} slot=header-actions-end></calcite-loader>`:null}${this._renderDiagnostics()}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" aria-hidden=true ${m(this._featureMenuIntersectionObserverCreated)}></div>${a==="feature"?n`<calcite-button scale=s appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full .label=${y} title=${y??g}>${s.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{hideCloseButton:i,active:s,hideHeading:a,hideSelectFeature:o,messages:l}=this,r=l.returnToInitialFeature??"",d=l?.selectFeature,c="showAllEnabled"in e?e.showAllEnabled:!1,v=e.flowType==="feature"||e.flowType==="feature-association"||e.flowType==="feature-relationship"&&!c,F=e.flowType!=="feature"&&v&&"isFeatureFromTable"in e&&!e.isFeatureFromTable&&!o,p=e.flowType==="feature"&&this.viewModel.aggregatedFeaturesEnabled?n`<div class="footer" slot=footer>${this._renderPagination(()=>{this._aggregatedFeaturesComponent.value?.previous()},()=>{this._aggregatedFeaturesComponent.value?.next()})}${this._renderFeaturePaginationText(this._aggregatedFeatureCount,this._selectedAggregatedFeatureIndex)}</div>`:null;return n`<calcite-flow-item .closable=${!i} .closed=${!s} .focusTrapEnabled=${this.focusTrapEnabled} class="flow-item-drill-in" .description=${A(this._getDrillInFlowItemDescription(e)??"")} .heading=${a?void 0:A(e.heading??"")} .selected=${t} @calciteFlowItemBack=${w=>{w.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${a?null:n`<div slot=heading><div .innerHTML=${M.sanitize(e.heading??"")??""}></div></div>`}<div slot=description><div .innerHTML=${M.sanitize(this._getDrillInFlowItemDescription(e)??"")??""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${r??""} title=${r??""??g}></calcite-action>${F?n`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${d??""} title=${d??g}></calcite-action>`:null}${v&&this._renderActionBar(e)||""}<div class="container">${e}</div>${p}</calcite-flow-item>`}_renderContentContainer(){let e=this.flowItems?.toArray(),t=e.length>0,i=this.viewModel.aggregatedFeaturesEnabled&&this.viewModel.selectedFeature?.isAggregate&&!t,s=i&&e.length===0,a=e.length===0&&this._featureFlowItemSelected&&!i,o=e?.map((d,c)=>this._renderFlowItem(d,this._featureFlowItemSelected&&c===e.length-1)),l=this._renderBrowseAggregateContainer(!!s),r=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(a)]:[this._renderContentFeature(a),this._renderFeatureMenuContainer()];return n`<calcite-flow ${m(this._flowContainerNode)}>${r}${l}${o}</calcite-flow>`}_renderBrowseAggregateContainer(e){let{hideCloseButton:t,active:i,messages:s}=this,{selectedFeature:a}=this.viewModel,o=this.viewModel.aggregatedFeaturesEnabled&&a?.isAggregate,l=h(s.backLabel??"",{title:this._selectedFeatureHeadingText});return o?n`<calcite-flow-item .selected=${e} .closable=${!t} .closed=${!i} .focusTrapEnabled=${this.focusTrapEnabled} .description=${this._aggregatedFeatureCount?h(s.total??"",{total:this._aggregatedFeatureCount}):""} .heading=${s.aggregatedFeatures} @calciteFlowItemBack=${r=>{r.preventDefault(),this.viewModel.aggregatedFeaturesEnabled=!1}} .messageOverrides=${{back:l}} .loading=${this._aggregatedFeaturesLoading} @calciteFlowItemClose=${this._handleClose}><arcgis-aggregated-features .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .feature=${a??void 0} .flowItems=${this.flowItems} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map??void 0} .messageOverrides=${this.messageOverrides} .messages=${s} @arcgisPropertyChange=${this._handleAggregatedFeaturesPropertyChange} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .view=${this.view??void 0} ${m(this._aggregatedFeaturesComponent)}></arcgis-aggregated-features><calcite-button appearance=transparent @click=${()=>this.viewModel.aggregatedFeaturesEnabled=!1} slot=footer-start scale=s width=full .label=${l} title=${l??g}>${s.back}</calcite-button></calcite-flow-item>`:null}_renderActionBar(e){let t=this.#e(e),i=!!t.length||this._hasActionsStartSlotContent||this._hasActionsEndSlotContent,s=this._isCollapsed||this.hideActionBar||!i;return n`<calcite-action-bar expand-toggle-disabled .expanded=${!this._hideActionText} scale=s slot=${(s?void 0:"action-bar")??g} .hidden=${s}><slot name=actions-start @slotchange=${this._handleActionsStartSlotChange}></slot><calcite-action-group overlay-positioning=fixed scale=s ${m(this._actionBarMenuNode)}>${this._renderActions(t,e)}</calcite-action-group><slot name=actions-end @slotchange=${this._handleActionsEndSlotChange}></slot></calcite-action-bar>`}_renderActions(e,t){return e.map(i=>{let s=this._getActionTitle(i,t),a=this._getActionLabel(i,t);return n`<calcite-action .active=${i.type==="toggle"?i.value:!1} .disabled=${i.disabled} .icon=${i.icon??void 0} .loading=${i.active} scale=s .textEnabled=${!this._hideActionText} .text=${s??""} .label=${a??s} title=${a??s??g} .hidden=${!i.visible} @click=${()=>this._triggerAction(i,t)}></calcite-action>`})}_renderContent(){let{content:e,selectedFeature:t,includeDefaultActions:i,actions:s}=this.viewModel;return t?n`<arcgis-feature-next .actions=${s} .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .includeDefaultActions=${i} .location=${this.location} .map=${this.map} .messageOverrides=${this.messageOverrides} @arcgisPropertyChange=${()=>{this._selectedFeatureViewModel=this._selectedFeatureComponent.value?.viewModel}} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${m(this._selectedFeatureComponent)}></arcgis-feature-next>`:typeof e=="string"?T(e,n`<div .innerHTML=${M.sanitize(e)??""}></div>`):e??null}};H("arcgis-features-next",R);return R},"support/actions/ActionButton","core/Collection","popup/FeaturesModel","applications/Components/featureUtils","applications/Components/sanitizerUtils","applications/Components/stringUtils","intl","core/reactiveUtils","graphic/getGraphicOriginTitle",a,c,d,e,h,i,l,o,p)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{A as Ia,B as Ka,C as La,D as Ma,E as Na,F as Oa,G as Pa,H as Qa,I as Ra,J as Sa,K as Ta,L as Va,M as Wa,N as Xa,O as Ya,P as Za,Q as _a,R as $a,S as ab,T as bb,a as S,b as U,c as V,d as W,e as X,f as Y,g as _,h as $,i as aa,j as ba,k as ca,l as fa,m as ga,n as ha,o as ia,p as ja,q as oa,r as pa,s as qa,t as ra,u as va,v as xa,w as ya,x as za,y as Aa,z as Ea}from"./
|
|
2
|
+
import{A as Ia,B as Ka,C as La,D as Ma,E as Na,F as Oa,G as Pa,H as Qa,I as Ra,J as Sa,K as Ta,L as Va,M as Wa,N as Xa,O as Ya,P as Za,Q as _a,R as $a,S as ab,T as bb,a as S,b as U,c as V,d as W,e as X,f as Y,g as _,h as $,i as aa,j as ba,k as ca,l as fa,m as ga,n as ha,o as ia,p as ja,q as oa,r as pa,s as qa,t as ra,u as va,v as xa,w as ya,x as za,y as Aa,z as Ea}from"./ODSZ7JZM.js";import{a as Fa}from"./NMGC3KRM.js";import{f as da,g as ea,h as sa,i as Da}from"./54252KWO.js";import{A as C,B as D,C as E,E as F,F as G,G as H,H as I,I as J,J as K,K as L,L as M,M as N,N as O,O as P,P as Q,Q as R,R as T,U as ka,V as la,W as ma,X as na,c as s,fa as ta,ga as ua,ha as wa,ia as Ba,ja as Ca,pa as Ga,q as t,qa as Ha,ra as Ja,sa as Ua,t as u,u as v,v as w,w as x,x as y,y as z,z as B}from"./HZDWPWBH.js";import{U as p,V as q,W as r,c as n,d as o}from"./P3AEIHWE.js";import{a,b,c,d,e}from"./MQL4JTYG.js";import{F as g,M as h,O as i,P as j,Q as k,R as l,S as m,X as A,Y as Z,l as f}from"./CTVCZ2FU.js";import"./TAVTDQ6S.js";export{j as ArrayDisposer,E as BlendMode,ca as Bullet,ea as Button,Wa as CSVParser,$ as CanvasLayer,_ as CanvasRenderer,Ga as Chart,ga as Circle,Na as CirclePattern,r as Color,Ua as ColorSet,na as Component,fa as ConfirmButton,Q as Container,m as CounterDisposer,ma as DataItem,Xa as DataProcessor,X as DateFormatter,i as Disposer,Y as DurationFormatter,sa as EditableLabel,ia as Ellipse,z as Entity,pa as Gradient,La as GrainPattern,F as Graphics,K as GridLayout,ra as HeatLegend,I as HorizontalLayout,S as InterfaceColors,Va as JSONParser,la as JsonData,T as Label,H as Layout,va as Legend,wa as Line,Oa as LinePattern,qa as LinearGradient,za as Link,ka as ListData,s as ListTemplate,ba as Modal,k as MultiDisposer,l as MutableValueDisposer,W as NumberFormatter,$a as NumericStepper,ya as OrthogonalLine,Sa as PathPattern,C as Pattern,Ta as PatternSet,a as Percent,Aa as Picture,D as PicturePattern,U as PointedRectangle,ha as Polygon,ab as ProgressPie,Ma as RadialGradient,Ca as RadialLabel,Ba as RadialText,G as Rectangle,Pa as RectanglePattern,aa as Root,da as RoundedRectangle,_a as SVGRenderer,Da as Scrollbar,Ha as SerialChart,Ia as SerialChartContainer,ua as Series,Fa as Slice,Ea as Slider,B as Sprite,Ya as SpriteResizer,ja as Star,Qa as StarPattern,A as Template,R as Text,L as TextFormatter,Z as Theme,Ja as Tick,n as Timezone,V as Tooltip,xa as Triangle,Ra as TrianglePattern,J as VerticalLayout,Ka as ZoomTools,oa as ZoomableContainer,w as addLicense,g as array,q as color,x as disposeAllRootElements,u as ease,O as getCustomDataValue,y as getRootById,N as getTagValue,P as getTagValueFromObject,t as math,bb as net,h as object,c as p0,d as p100,e as p50,b as percent,M as populateString,o as ready,v as registry,Za as renderToSVG,ta as time,f as type,p as utils};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import i from"./FFVPO4JB.js";import{a as R}from"./QCYQNVPL.js";import{a as g}from"./JB6WQEFJ.js";import{a as L}from"./OFBCNFBW.js";import"./Y6WTYXVP.js";import h from"./F4AJCUZ6.js";import"./WJQUE4DR.js";import e from"./TWPVYHJG.js";import d from"./KRJCOTGC.js";import"./GIBXI44G.js";import"./RQT2PVDJ.js";import a from"./SBYVR52H.js";import"./LXME6MU5.js";import{P as b,Q as w,R as f,T as v,_,b as c,x as p}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{watch:n},Q,x,{fetchKnowledgeGraph:z},Z,{isAbortError:P},F,{d:V,e:I,f:E,g:A},{c:m,e:C},i,{b:u},{a:M,b:k,c:D,d:U}])=>{var O=m(x,{}),G=m(Q,{}),d=class extends f{constructor(){super(),this._attributionMode=null,this._mapRef=b(),this._uiController=new M(this),this._activeLoadAbortController=null,this.arcgisLoadError=D(this),this.arcgisViewReadyError=U(this),this._map=O(this),this._baseCypherQuery="",this._serviceUrl="",this._propItemId="",this.view=G(this),this.animationsDisabled=this.view.animationsEnabled,this.allLayerViews=this.view.allLayerViews,this.analyses=this.view.analyses,this.autoDestroyDisabled=!1,this.background=this.view.background,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.fatalError=this.view.fatalError,this.graphics=this.view.graphics,this.highlights=this.view.highlights,this.layerViews=this.view.layerViews,this.magnifier=this.view.magnifier,this.map=this.view.map,this.navigation=this.view.navigation,this.options=this.view.options,this.padding=this.view.padding,this.popup=this.view.popup,this.popupDisabled=this.view.popupEnabled,this.popupComponentEnabled=!1,this.ready=this.view.ready,this.resizeAlign=this.view.resizeAlign,this.resolution=this.view.resolution,this.rotation=this.view.rotation,this.selectionManager=this.view.selectionManager,this.focusRegionVisible=this.view.focusRegionVisible,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.timeZone=this.view.timeZone,this.arcgisViewAnalysisViewCreate=i(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=i(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=i(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=p(),this.arcgisViewClick=i(()=>this.view,"click"),this.arcgisViewDoubleClick=i(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=i(()=>this.view,"double-tap-drag"),this.arcgisViewFocusRegionSelect=i(()=>this.view,"focus-region-select"),this.arcgisViewDrag=i(()=>this.view,"drag"),this.arcgisViewHold=i(()=>this.view,"hold"),this.arcgisViewImmediateClick=i(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=i(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=i(()=>this.view,"key-down"),this.arcgisViewKeyUp=i(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=i(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=i(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=i(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=i(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=i(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=i(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=i(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=i(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=i(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=p(),this.arcgisViewVerticalTwoFingerDrag=i(()=>this.view,"vertical-two-finger-drag"),k(this),this.view.ui={components:[]}}static{this.properties={_map:16,_baseCypherQuery:16,_serviceUrl:16,_propItemId:16,view:32,animationsDisabled:5,aria:0,allLayerViews:32,analyses:0,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,background:0,basemap:1,basemapView:0,canZoomIn:36,canZoomOut:36,center:1,constraints:0,displayFilterDisabled:5,extent:0,fatalError:0,focusAreas:0,graphics:0,hideAttribution:5,highlights:0,interacting:32,itemId:3,baseCypherQuery:3,serviceUrl:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,options:0,padding:0,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,ready:36,resizeAlign:1,resolution:40,rotation:9,selectionManager:32,focusRegionVisible:5,focusRegionShortcutEnabled:5,focusRegion:32,scale:9,slotGroupRefs:32,spatialReference:0,stationary:32,suspended:39,theme:0,timeExtent:0,timeZone:1,updating:32,viewpoint:0,zoom:9,loadErrorSources:0}}static{this.styles=[L,R]}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}get aria(){return this.view?.aria}set aria(e){this.view&&(this.view.aria=e)}get attributionItems(){return this.view?.attributionItems??[]}get attributionMode(){return this._attributionMode}set attributionMode(e){this._attributionMode=e,e!=="auto"&&(this.view.attributionMode=e)}get center(){return this.view.center}set center(e){if(I(e,this._center))return;this._center=E(e);let t=A(e,this.view);t&&(this.view.center=t)}get extent(){return this.view.extent}set extent(e){this.extent?.equals(e)||(this.view.extent=e)}get focusAreas(){return this.map?this.map?.focusAreas:{areas:[],style:"bright"}}set focusAreas(e){this.map&&(this.map.focusAreas=e)}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(e){this.view.attributionVisible=!e}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(e){this._propItemId=e}get baseCypherQuery(){return this._baseCypherQuery}set baseCypherQuery(e){this._baseCypherQuery=e}get serviceUrl(){return this._serviceUrl}set serviceUrl(e){this._serviceUrl=e}get navigating(){return this.view.navigating}get popupElement(){return this._uiController.popupElement||null}get focusRegion(){return this.view.focusRegion}get scale(){return this.view.scale}set scale(e){this.view.scale=e}get stationary(){return this.view.stationary}get updating(){return this.view.updating}get viewpoint(){return this.view.viewpoint}set viewpoint(e){V(this.viewpoint,e)&&(this.view.viewpoint=e)}get zoom(){return this.view.zoom}set zoom(e){this.view.zoom=e}async closePopup(){this._uiController.closePopup()}async destroy(){await this.manager.destroy()}async fetchPopupFeatures(e,t){return this.view.fetchPopupFeatures(e,t)}async goTo(e,t){return await this.view.goTo(e,t)}async openPopup(e){await this._uiController.openPopup(e)}toMap(e){return this.view.toMap(e)}toScreen(e,t){return this.view.toScreen(e,t)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(e,t){return await this.componentOnReady(),await this.view.whenReady().then(()=>e?.()).catch(t)}async whenAnalysisView(e){return await this.view.whenAnalysisView(e)}async whenLayerView(e){return await this.view.whenLayerView(e)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}willUpdate(e){let t=()=>{this._activeLoadAbortController?.abort();let a=new AbortController;return this._activeLoadAbortController=a,a};if(e.has("_propItemId")||e.has("_serviceUrl")||e.has("_baseCypherQuery")){if(e.has("_propItemId")&&this._propItemId||e.has("_propItemId")&&!this._serviceUrl)t(),s.reCreateAccessor(this._map,this),s.setPortalItem(this._map,this._propItemId),s.setMap(this.view,this._map);else if(!this._propItemId)if(this._serviceUrl&&!this._baseCypherQuery){let a=t();s.fetchKnowledgeGraph(this._serviceUrl).then(l=>{let h=new s.WebLinkChart,o=new s.LinkChartLayer({url:l.url});o.load({signal:a?.signal});try{u(a.signal),h.add(o),this._setLinkChartAndZoom(h)}catch(y){if(!P(y))throw y}})}else if(this._baseCypherQuery&&this._serviceUrl){let a=t();s.fetchKnowledgeGraph(this._serviceUrl).then(l=>{s.WebLinkChart.fromCypherQuery(l,new Z({openCypherQuery:this._baseCypherQuery}),void 0,{signal:a?.signal}).then(async h=>{try{u(a.signal),this._setLinkChartAndZoom(h)}catch(o){if(!P(o))throw o}})})}else!this._serviceUrl&&e.has("_serviceUrl")&&(t(),s.setMap(this.view,null))}}loaded(){let e=this;e.el.childElem=this._mapRef.value,this.view.container??=e.el.childElem,s.setLocalPublicMap(this,this._map),this.manager.onLifecycle(()=>[n(()=>this.map,t=>{t&&s.setLocalPrivateMap(this,t)},{initial:!0,sync:!0}),n(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),n(()=>this.view.ready,()=>this.arcgisViewReadyChange.emit(),{initial:this.view.ready}),n(()=>this.view.attributionHeight,t=>{this._uiController.handleAttributionHeightChange(t)},{initial:!0})])}_setLinkChartAndZoom(e){s.reCreateAccessor(this._map,this),s.setLocalPrivateMap(this,e),s.setMap(this.view,e),this._map&&this.view.when(()=>{e.diagramNodesExtent&&this.view.goTo(e.diagramNodesExtent)})}renderMain(){return c`<div class=${v(g.base)} ${w(this._mapRef)}></div>`}render(){return c`${this.renderMain()}<section class=${v(g.containerUI)} ${w(this._uiController.uiContainerRef)}>${this._uiController.render()}</section>`}},s={fetchKnowledgeGraph:async r=>await z(r),WebLinkChart:x,LinkChartLayer:F,setMap:(r,e)=>{r.map=e},setLocalPrivateMap:(r,e)=>{r._map=e},setLocalPublicMap:(r,e)=>{r.map||=e},setPortalItem(r,e){r.portalItem={id:e}},reCreateAccessor:C};_("arcgis-link-chart",d);return{ArcgisLinkChart:d,exportsForTests:s}},"core/reactiveUtils","views/LinkChartView","WebLinkChart","rest/knowledgeGraphService","rest/knowledgeGraph/GraphQueryStreaming","core/promiseUtils","layers/LinkChartLayer",a,d,e,h,i)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{E as xt,F as at,K as q,P as z,R as rt,h as j}from"./CDCI4EQR.js";import{A as K,I as pt,S as Y,V as mt,f as st,h as ft,r as gt,t as nt,x as I}from"./VWEJ2XSC.js";import{a as X}from"./A7G5RNN7.js";import{Q as ct,b as it,g as v,p as M,r as dt}from"./7RG4ZQP7.js";var S=class extends at{_beforeChanged(){super._beforeChanged(),(this.isDirty("cornerRadiusTL")||this.isDirty("cornerRadiusTR")||this.isDirty("cornerRadiusBR")||this.isDirty("cornerRadiusBL"))&&(this._clear=!0)}_draw(){let e=this.width(),t=this.height(),s=e/Math.abs(e),i=t/Math.abs(t),n=0,a=0,h=this.get("strokeWidth",0);this.get("containStroke",!1)&&(e-=s*h,t-=i*h,n+=s*h/2,a+=i*h/2);let l=e,d=t;if(v(l)&&v(d)){let u=Math.min(l,d)/2,p=I(this.get("cornerRadiusTL",8),u),c=I(this.get("cornerRadiusTR",8),u),m=I(this.get("cornerRadiusBR",8),u),C=I(this.get("cornerRadiusBL",8),u),_=Math.min(Math.abs(l/2),Math.abs(d/2));p=j(p,0,_),c=j(c,0,_),m=j(m,0,_),C=j(C,0,_);let g=this._display;g.moveTo(n+p*s,a),g.lineTo(n+l-c*s,a),c>0&&g.arcTo(n+l,a,n+l,a+c*i,c),g.lineTo(n+l,a+d-m*i),m>0&&g.arcTo(n+l,a+d,n+l-m*s,a+d,m),g.lineTo(n+C*s,a+d),C>0&&g.arcTo(n,a+d,n,a+d-C*i,C),g.lineTo(n,a+p*i),p>0&&g.arcTo(n,a,n+p*s,a,p),g.closePath()}}};S.className="RoundedRectangle";S.classNames=at.classNames.concat([S.className]);var F=class extends z{_afterNew(){this._settings.themeTags=Y(this._settings.themeTags,["button"]),super._afterNew(),this._setDefaultTagged("background",Y(this._settings.themeTags,["background"]),()=>S.new(this._root,{})),this.setPrivate("trustBounds",!0)}_prepareChildren(){if(super._prepareChildren(),this.isDirty("icon")){let e=this._prevSettings.icon,t=this.get("icon");t!==e&&(this._disposeProperty("icon"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.icon=t)}if(this.isDirty("label")){let e=this._prevSettings.label,t=this.get("label");t!==e&&(this._disposeProperty("label"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.label=t)}}};F.className="Button";F.classNames=z.classNames.concat([F.className]);function Nt(r,e,t,s){let i=[];return e&&e.fontVariant?i.push(e.fontVariant):r.fontVariant&&i.push(r.fontVariant),t||(e&&e.fontWeight?i.push(e.fontWeight):r.fontWeight&&i.push(r.fontWeight)),e&&e.fontStyle?i.push(e.fontStyle):r.fontStyle&&i.push(r.fontStyle),e&&e.fontSize?(e.fontSize=Z(e.fontSize),i.push(e.fontSize)):r.fontSize&&(r.fontSize=Z(r.fontSize),i.push(r.fontSize)),r.fontFamily=="inherit"?i.push(s()):e&&e.fontFamily?i.push(e.fontFamily):r.fontFamily?i.push(r.fontFamily):i.length&&i.push("Arial"),i.join(" ")}function Z(r){return v(r)||/^\s*\d*\.?\d+\s*$/.test(r)?parseFloat(r+"")+"px":r}function At(){return/apple/i.test(navigator.vendor)}function V(r,e,t){let s=e.measureText(r),i={};if(s.actualBoundingBoxAscent==null){let a=document.createElement("div");a.innerText=r,a.style.visibility="hidden",a.style.position="absolute",a.style.top="-1000000px;",a.style.fontFamily=t.fontFamily||"",a.style.fontSize=t.fontSize+"",document.body.appendChild(a);let h=a.getBoundingClientRect();document.body.removeChild(a);let l=h.height,d=s.width;i={actualBoundingBoxAscent:l,actualBoundingBoxDescent:0,actualBoundingBoxLeft:0,actualBoundingBoxRight:d,fontBoundingBoxAscent:l,fontBoundingBoxDescent:0,width:d}}else i={actualBoundingBoxAscent:s.actualBoundingBoxAscent,actualBoundingBoxDescent:s.actualBoundingBoxDescent,actualBoundingBoxLeft:s.actualBoundingBoxLeft,actualBoundingBoxRight:s.actualBoundingBoxRight,fontBoundingBoxAscent:s.actualBoundingBoxAscent,fontBoundingBoxDescent:s.actualBoundingBoxDescent,width:s.width};let n=s.width;switch(t.textAlign){case"right":case"end":i.actualBoundingBoxLeft=n,i.actualBoundingBoxRight=0;break;case"center":i.actualBoundingBoxLeft=n/2,i.actualBoundingBoxRight=n/2;break;default:i.actualBoundingBoxLeft=0,i.actualBoundingBoxRight=n}return i}function vt(r,e,t=!1){let s=r.maxWidth,i=t?void 0:r.maxHeight;if(!v(s)&&!v(i))return 1;let n=e.right-e.left,a=e.bottom-e.top;return Math.min(s/n||1,i/a||1)}function _t(r,e,t,s,i=!1,n=!0){let a;do{if(i)t=t.slice(0,-1);else{let l=t.replace(/(?:[^,;:!?\\\/\s]|,(?=\d))+[,;:!?\\\/\s]*$/g,"");if((l==""||l===t)&&n)i=!0;else{if(l=="")return t;t=l}}let h=V(t,r,e);a=h.actualBoundingBoxLeft+h.actualBoundingBoxRight}while(a>s&&t!="");return t}function Mt(r,e,t,s,i){let n=t.direction=="rtl";i.lines=[];let a=t.oversizedBehavior,h=t.maxWidth,l=v(h)&&a=="truncate",d=v(h)&&(a=="wrap"||a=="wrap-no-break"),u="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",p=e.toString().replace(/\r/g,"").split(/\n/),c=!0,m=0,C=0,_=0,g;M(p,(f,E)=>{let b;for(f==""?b=[{type:"value",text:""}]:b=q.chunk(f,!1,t.ignoreFormatting);b.length>0;){let o={offsetY:_,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]},$=V(u,r,t),ht=$.actualBoundingBoxAscent+$.actualBoundingBoxDescent;o.height=ht,o.ascent=$.actualBoundingBoxAscent;let w,R=t.textDecoration,G,y,P=!1,D=!0,N=[],tt;dt(b,(T,lt)=>{if(T.type=="format")if(T.text=="[/]")c||(r.restore(),c=!0),G=void 0,g=void 0,y=void 0,R=t.textDecoration,tt=void 0,w=T.text;else{c||r.restore();let x=q.getTextStyle(T.text),A=s(x);r.save(),r.font=A,g=A,w=T.text,x.textDecoration&&(R=x.textDecoration),x.fill&&(G=x.fill),x.width&&(y=it(x.width)),x.verticalAlign&&(tt=x.verticalAlign),c=!1;let W=V(u,r,t),H=W.actualBoundingBoxAscent+W.actualBoundingBoxDescent;H>o.height&&(o.height=H),W.actualBoundingBoxAscent>o.ascent&&(o.ascent=W.actualBoundingBoxAscent)}else if(T.type=="value"&&!P){let x=V(T.text,r,t),A=x.actualBoundingBoxLeft+x.actualBoundingBoxRight;if(l){i.truncated=void 0;let k=D||t.breakWords||!1,L=t.ellipsis||"",O=V(L,r,t),ut=O.actualBoundingBoxLeft+O.actualBoundingBoxRight;if(o.width+A>h){let Bt=h-o.width-ut;T.text=_t(r,t,T.text,Bt,k),T.text+=L,P=!0,i.truncated=!0}}else if(d&&o.width+A>h){let k=h-o.width,L=_t(r,t,T.text,k,!1,D&&t.oversizedBehavior!="wrap-no-break");if(L=="")return i.textVisible=!0,!1;if(!D){let O=V(K(L),r,t);if(O.actualBoundingBoxLeft+O.actualBoundingBoxRight>k)return N=b.slice(lt),w&&N.unshift({type:"format",text:w}),b=[],!1}N=b.slice(lt+1),K(L)!=K(T.text)&&(N.unshift({type:"value",text:T.text.substr(L.length)}),w&&N.unshift({type:"format",text:w})),T.text=K(L),b=[],P=!0}let W=1,H=1;if(g&&y&&y>A){let k=A/y;switch(t.textAlign){case"right":case"end":W=k;break;case"center":W=k,H=k;break;default:H=k}A=y}let et=x.actualBoundingBoxAscent+x.actualBoundingBoxDescent;et>o.height&&(o.height=et),x.actualBoundingBoxAscent>o.ascent&&(o.ascent=x.actualBoundingBoxAscent),o.width+=A,o.left+=x.actualBoundingBoxLeft/W,o.right+=x.actualBoundingBoxRight/H,o.textChunks.push({style:g,fill:G,text:T.text,width:A,height:et,left:x.actualBoundingBoxLeft,right:x.actualBoundingBoxRight,ascent:x.actualBoundingBoxAscent,offsetX:0,offsetY:0,textDecoration:R,verticalAlign:tt}),D=!1}return!0}),t.lineHeight instanceof X?(o.height*=t.lineHeight.value,o.ascent*=t.lineHeight.value):(o.height*=t.lineHeight||1.2,o.ascent*=t.lineHeight||1.2),m<o.left&&(m=o.left),C<o.right&&(C=o.right),i.lines.push(o),_+=o.height,b=N||[]}}),c||r.restore(),M(i.lines,(f,E)=>{let b=0;M(f.textChunks,o=>{if(o.offsetX=b+o.left-f.left,o.offsetY+=f.height-f.height*(t.baselineRatio||.19),b+=o.width*(n?-1:1),o.verticalAlign)switch(o.verticalAlign){case"super":o.offsetY-=f.height/2-o.height/2;break;case"sub":o.offsetY+=o.height/2;break}})});let B={left:n?-C:-m,top:0,right:n?m:C,bottom:_};if(a!=="none"){let f=vt(t,B,a=="truncate");if(f<1)if(a=="fit")v(t.minScale)&&f<t.minScale?(i.textVisible=!1,B.left=0,B.top=0,B.right=0,B.bottom=0):(i.originalScale||(i.originalScale=i.scale),i.scale=f,i.textVisible=!0);else if(a=="hide")i.textVisible=!1,B.left=0,B.top=0,B.right=0,B.bottom=0;else{switch(t.textAlign){case"right":case"end":B.left=n?h:-h,B.right=0;break;case"center":B.left=-h/2,B.right=h/2;break;default:B.left=0,B.right=n?-h:h}i.scale=i.originalScale||1,i.originalScale=void 0,i.textVisible=!0}else i.scale=i.originalScale||1,i.originalScale=void 0,i.textVisible=!0}return B}function Pt(r,e,t,s,i){let n=t.direction=="rtl";i.textVisible=!0,i.lines=[];let a=t.oversizedBehavior,h=t.maxWidth,l=v(h)&&a=="truncate",d=t.ellipsis||"",u,p=e.toString().replace(/\r/g,"").split(/\n/),c=!0,m=0,C=0;return M(p,(_,g)=>{let B=q.chunk(_,!1,t.ignoreFormatting),f={offsetY:C,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]},E,b,o;M(B,($,ht)=>{if($.type=="format"){if($.text=="[/]")c||(r.restore(),c=!0),b=void 0,E=void 0,o=void 0;else{let w=q.getTextStyle($.text),R=s(w);r.save(),r.font=R,E=R,w.fill&&(b=w.fill),w.width&&(o=it(w.width)),c=!1}l&&(u=V(d,r,t))}else if($.type=="value"){let w=$.text.match(/./ug)||[];n&&(w=pt($.text),w.reverse());for(let R=0;R<w.length;R++){let G=w[R],y=V(G,r,t),P=y.width;E&&o&&o>P&&(P=o);let D=y.actualBoundingBoxAscent+y.actualBoundingBoxDescent;if(D>f.height&&(f.height=D),y.actualBoundingBoxAscent>f.ascent&&(f.ascent=y.actualBoundingBoxAscent),m+=P,l){u||(u=V(d,r,t));let N=u.actualBoundingBoxLeft+u.actualBoundingBoxRight;if(m+N>h){f.textChunks.length==1?i.textVisible=!1:(f.width+=N,f.left+=u.actualBoundingBoxLeft,f.right+=u.actualBoundingBoxRight,f.textChunks.push({style:E,fill:b,text:d,width:N,height:D+u.actualBoundingBoxDescent,left:u.actualBoundingBoxLeft,right:u.actualBoundingBoxRight,ascent:u.actualBoundingBoxAscent,offsetX:0,offsetY:D,textDecoration:void 0}));break}}f.width+=P,f.left+=y.actualBoundingBoxLeft,f.right+=y.actualBoundingBoxRight,f.textChunks.push({style:E,fill:b,text:G,width:P,height:D+y.actualBoundingBoxDescent,left:y.actualBoundingBoxLeft,right:y.actualBoundingBoxRight,ascent:y.actualBoundingBoxAscent,offsetX:0,offsetY:D,textDecoration:void 0})}}}),t.lineHeight instanceof X?f.height*=t.lineHeight.value:f.height*=t.lineHeight||1.2,i.lines.push(f),C+=f.height}),c||r.restore(),a=="hide"&&m>h&&(i.textVisible=!1),M(i.lines,_=>{M(_.textChunks,g=>{g.offsetY+=Math.round((_.height-g.height+(_.ascent-g.ascent))/2)})}),{left:0,top:0,right:0,bottom:0}}var J=class extends rt{_afterNew(){super._afterNew();let e=this.children.push(z.new(this._root,{html:'<textarea class="am5-editable-label"></textarea>',isMeasured:!1}));e.hide(),this.setPrivate("input",e),this._setDefaultTagged("background",["editablelabel","background"],()=>S.new(this._root,{}))}_beforeChanged(){if(super._beforeChanged(),this.isDirty("editOn")){this._editOnEvents&&this._editOnEvents.dispose();let e=this.get("editOn","click");e!="none"&&(this._editOnEvents=new ct([this.getPrivate("input").events.on(e,t=>{}),this.events.on(e,t=>{this.set("active",!0)})]))}}_prepareChildren(){super._prepareChildren(),this._maybeInitTextarea()}_updateChildren(){if(super._updateChildren(),this.isDirty("active")){let e=this.get("active",!1);e?this._startEditing():this._stopEditing();let t=this.get("background");t&&t.set("active",e)}this._syncText(),this._syncStyle()}_maybeInitTextarea(){if(!this._isInited()){let e=this.getPrivate("input");if(e&&e.getPrivate("htmlElement")){let s=e.getPrivate("htmlElement").querySelector(".am5-editable-label");s&&(this.setPrivate("textarea",s),s.addEventListener("input",i=>{this.get("multiLine")===!1&&(s.value=s.value.replace(/\n/g," ")),this.set("text",s.value),this._syncStyle()}),s.addEventListener("blur",i=>this.set("active",!1)),ft("keyboardevents")&&this._disposers.push(st(s,"keydown",i=>{nt(i)=="Escape"&&this.set("active",!1)})),this._disposers.push(st(s,"keydown",i=>{nt(i)=="Enter"&&this.get("multiLine")===!1&&(i.preventDefault(),this.set("active",!1))})),this.events.dispatch("inited",{type:"inited",target:this}))}}}_isInited(){return!!this.getPrivate("textarea")}_startEditing(){if(!this._isInited()){this.events.once("inited",()=>{this._startEditing()});return}this._text.set("opacity",0);let e=this.getPrivate("input"),t=this.getPrivate("textarea");t&&(this.get("text","")==""&&this.set("text"," "),e.show(0),this.setTimeout(()=>{this._syncStyle(),t.focus()},100))}_stopEditing(){if(!this._isInited()){this.events.once("inited",()=>{this._stopEditing()});return}let e=this.getPrivate("input"),t=this.getPrivate("textarea");t&&(this.set("text",t.value),e.hide(0),this._text.set("opacity",1))}_syncStyle(){let e=this.getPrivate("input"),t=this.getPrivate("textarea"),s=e.getPrivate("htmlElement");if(t&&s){let i=window.getComputedStyle(t);M(i,c=>{t.style[c]="initial"}),t.style.color=this.get("fill",mt(0)).toCSS(this.get("fillOpacity",1)),t.style.backgroundColor="rgba(0, 0, 0, 0)",t.style.border="none",t.style.outline="none",t.style.padding="0",t.wrap="off",t.style.resize="none",t.style.overflow="hidden";let n=this.get("maxWidth",0)-this.get("paddingLeft",0)-this.get("paddingRight",0);n>0?t.style.maxWidth=n+"px":t.style.minWidth="",t.style.height="auto",t.style.minHeight=t.scrollHeight+"px",this.get("width")&&(t.style.width=this.width()-this.get("paddingLeft",0)-this.get("paddingRight",0)+"px",t.style.minWidth="");let a=this.get("lineHeight");a?a instanceof X?t.style.lineHeight=a.value+"":v(a)&&(t.style.lineHeight=a+""):t.style.lineHeight="1.2";let h=this.get("fontFamily");h||(h=getComputedStyle(s,"font-family").getPropertyValue("font-family")),t.style.fontFamily=h;let l=this.get("fontSize");l?l=Z(l):l=getComputedStyle(s,"font-size").getPropertyValue("font-size"),t.style.fontSize=l;let d=this.get("fontWeight");d?d=d:d=getComputedStyle(s,"font-weight").getPropertyValue("font-weight"),t.style.fontWeight=d;let u=this.get("fontStyle");u?u=u:u=getComputedStyle(s,"font-style").getPropertyValue("font-style"),t.style.fontStyle=u,this.get("oversizedBehavior")=="wrap"?t.style.whiteSpace="pre-wrap":t.style.whiteSpace="nowrap",this._frameDp||(this._frameDp=this.addDisposer(this._root.events.on("frameended",()=>{t.style.minWidth==""&&(t.style.minWidth=t.scrollWidth+20+"px");let c=this.get("textAlign","start");c=="center"?(t.style.textAlign="center",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-50%)")):c=="end"?(t.style.textAlign="right",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-100%)")):t.style.textAlign=c})))}}_syncText(){let e=this.getPrivate("textarea"),t=this.get("text","");t==" "&&(t=""),e&&(e.value=t)}};J.className="EditableLabel";J.classNames=rt.classNames.concat([J.className]);var Q=class extends z{constructor(){super(...arguments),this.thumb=this._makeThumb(),this.startGrip=this._makeButton(),this.endGrip=this._makeButton(),this._thumbBusy=!1,this._startDown=!1,this._endDown=!1,this._thumbDown=!1}_addOrientationClass(){this._settings.themeTags=Y(this._settings.themeTags,["scrollbar",this._settings.orientation]),this._setDefaultTagged("background",Y(this._settings.themeTags,["main","background"]),()=>S.new(this._root,{}))}_makeButton(){return this.children.push(F.new(this._root,{themeTags:["resize","button",this.get("orientation")],icon:xt.new(this._root,{themeTags:["icon"]})._markC("themeTags")})._markC("themeTags","icon"))}_makeThumb(){return this.children.push(S.new(this._root,{themeTags:["thumb",this.get("orientation")]})._markC("themeTags"))}_handleAnimation(e){e&&this._disposers.push(e.events.on("stopped",()=>{this.setPrivateRaw("isBusy",!1),this._thumbBusy=!1}))}_afterNew(){this._addOrientationClass(),super._afterNew();let e=this.startGrip,t=this.endGrip,s=this.thumb,i=this.get("background");i&&this._disposers.push(i.events.on("click",n=>{this.setPrivateRaw("isBusy",!0);let a=this._display.toLocal(n.point),h=this.width(),l=this.height(),d=this.get("orientation"),u;d=="vertical"?u=(a.y-s.height()/2)/l:u=(a.x-s.width()/2)/h;let p,c;d=="vertical"?(p=u*l,c="y"):(p=u*h,c="x");let m=this.get("animationDuration",0);m>0?(this._thumbBusy=!0,this._handleAnimation(this.thumb.animate({key:c,to:p,duration:m,easing:this.get("animationEasing")}))):(this.thumb._setC(c,p),this._root.events.once("frameended",()=>{this.setPrivateRaw("isBusy",!1)}))})),this._disposers.push(s.events.on("dblclick",n=>{if(!gt(n.originalEvent,this))return;let a=this.get("animationDuration",0),h=this.get("animationEasing");this.animate({key:"start",to:0,duration:a,easing:h}),this.animate({key:"end",to:1,duration:a,easing:h})})),this._disposers.push(e.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._startDown=!0,this._gripDown="start"})),this._disposers.push(t.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._endDown=!0,this._gripDown="end"})),this._disposers.push(s.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._thumbDown=!0,this._gripDown=void 0})),this._disposers.push(e.events.on("globalpointerup",()=>{this._startDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._startDown=!1})),this._disposers.push(t.events.on("globalpointerup",()=>{this._endDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._endDown=!1})),this._disposers.push(s.events.on("globalpointerup",()=>{this._thumbDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._thumbDown=!1})),this._disposers.push(e.on("x",()=>{this._updateThumb()})),this._disposers.push(t.on("x",()=>{this._updateThumb()})),this._disposers.push(e.on("y",()=>{this._updateThumb()})),this._disposers.push(t.on("y",()=>{this._updateThumb()})),this._disposers.push(s.events.on("positionchanged",()=>{this._updateGripsByThumb()})),this.get("orientation")=="vertical"?(e._setC("x",0),t._setC("x",0),this._disposers.push(s.adapters.add("y",n=>Math.max(Math.min(Number(n),this.height()-s.height()),0))),this._disposers.push(s.adapters.add("x",n=>this.width()/2)),this._disposers.push(e.adapters.add("x",n=>this.width()/2)),this._disposers.push(t.adapters.add("x",n=>this.width()/2)),this._disposers.push(e.adapters.add("y",n=>Math.max(Math.min(Number(n),this.height()),0))),this._disposers.push(t.adapters.add("y",n=>Math.max(Math.min(Number(n),this.height()),0)))):(e._setC("y",0),t._setC("y",0),this._disposers.push(s.adapters.add("x",n=>Math.max(Math.min(Number(n),this.width()-s.width()),0))),this._disposers.push(s.adapters.add("y",n=>this.height()/2)),this._disposers.push(e.adapters.add("y",n=>this.height()/2)),this._disposers.push(t.adapters.add("y",n=>this.height()/2)),this._disposers.push(e.adapters.add("x",n=>Math.max(Math.min(Number(n),this.width()),0))),this._disposers.push(t.adapters.add("x",n=>Math.max(Math.min(Number(n),this.width()),0))))}_updateChildren(){super._updateChildren(),(this.isDirty("end")||this.isDirty("start")||this._sizeDirty)&&this.updateGrips()}_changed(){if(super._changed(),this.isDirty("start")||this.isDirty("end")){let e="rangechanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,start:this.get("start",0),end:this.get("end",1),grip:this._gripDown})}}_released(){let e="released";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this})}updateGrips(){let e=this.startGrip,t=this.endGrip,s=this.get("orientation"),i=this.height(),n=this.width();s=="vertical"?(e._setC("y",i*this.get("start",0)),t._setC("y",i*this.get("end",1))):(e._setC("x",n*this.get("start",0)),t._setC("x",n*this.get("end",1)));let a=this.getPrivate("positionTextFunction"),h=Math.round(this.get("start",0)*100),l=Math.round(this.get("end",0)*100),d,u;a?(d=a.call(this,this.get("start",0)),u=a.call(this,this.get("end",0),!0)):(d=h+"%",u=l+"%"),e._setC("ariaLabel",this._t("From %1",void 0,d)),e._setC("ariaValueNow",""+h),e._setC("ariaValueText",h+"%"),e._setC("ariaValueMin","0"),e._setC("ariaValueMax","100"),t._setC("ariaLabel",this._t("To %1",void 0,u)),t._setC("ariaValueNow",""+l),t._setC("ariaValueText",l+"%"),t._setC("ariaValueMin","0"),t._setC("ariaValueMax","100")}_updateThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip,i=this.height(),n=this.width(),a=t.x(),h=s.x(),l=t.y(),d=s.y(),u=0,p=1;this.get("orientation")=="vertical"?v(l)&&v(d)&&(!this._thumbBusy&&!e.isDragging()&&(e._setC("height",d-l),e._setC("y",l)),u=l/i,p=d/i):v(a)&&v(h)&&(!this._thumbBusy&&!e.isDragging()&&(e._setC("width",h-a),e._setC("x",a)),u=a/n,p=h/n),this.getPrivate("isBusy")&&(this.get("start")!=u||this.get("end")!=p)&&(this._setC("start",u),this._setC("end",p));let c=this.getPrivate("positionTextFunction"),m=Math.round(this.get("start",0)*100),C=Math.round(this.get("end",0)*100),_,g;c?(_=c.call(this,this.get("start",0)),g=c.call(this,this.get("end",0),!0)):(_=m+"%",g=C+"%"),e._setC("ariaLabel",this._t("From %1 to %2",void 0,_,g)),e._setC("ariaValueNow",""+m),e._setC("ariaValueText",m+"%")}_updateGripsByThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip;if(this.get("orientation")=="vertical"){let i=e.height();t._setC("y",e.y()),s._setC("y",e.y()+i)}else{let i=e.width();t._setC("x",e.x()),s._setC("x",e.x()+i)}}};Q.className="Scrollbar";Q.classNames=z.classNames.concat([Q.className]);export{Nt as a,At as b,V as c,Mt as d,Pt as e,S as f,F as g,J as h,Q as i};
|
|
2
|
+
import{E as xt,F as at,K as q,P as z,R as rt,h as j}from"./HZDWPWBH.js";import{A as K,I as pt,S as Y,V as mt,f as st,h as ft,r as gt,t as nt,x as I}from"./P3AEIHWE.js";import{a as X}from"./MQL4JTYG.js";import{Q as ct,b as it,g as v,p as M,r as dt}from"./CTVCZ2FU.js";var S=class extends at{_beforeChanged(){super._beforeChanged(),(this.isDirty("cornerRadiusTL")||this.isDirty("cornerRadiusTR")||this.isDirty("cornerRadiusBR")||this.isDirty("cornerRadiusBL"))&&(this._clear=!0)}_draw(){let e=this.width(),t=this.height(),s=e/Math.abs(e),i=t/Math.abs(t),n=0,a=0,h=this.get("strokeWidth",0);this.get("containStroke",!1)&&(e-=s*h,t-=i*h,n+=s*h/2,a+=i*h/2);let l=e,d=t;if(v(l)&&v(d)){let u=Math.min(l,d)/2,p=I(this.get("cornerRadiusTL",8),u),c=I(this.get("cornerRadiusTR",8),u),m=I(this.get("cornerRadiusBR",8),u),C=I(this.get("cornerRadiusBL",8),u),_=Math.min(Math.abs(l/2),Math.abs(d/2));p=j(p,0,_),c=j(c,0,_),m=j(m,0,_),C=j(C,0,_);let g=this._display;g.moveTo(n+p*s,a),g.lineTo(n+l-c*s,a),c>0&&g.arcTo(n+l,a,n+l,a+c*i,c),g.lineTo(n+l,a+d-m*i),m>0&&g.arcTo(n+l,a+d,n+l-m*s,a+d,m),g.lineTo(n+C*s,a+d),C>0&&g.arcTo(n,a+d,n,a+d-C*i,C),g.lineTo(n,a+p*i),p>0&&g.arcTo(n,a,n+p*s,a,p),g.closePath()}}};S.className="RoundedRectangle";S.classNames=at.classNames.concat([S.className]);var F=class extends z{_afterNew(){this._settings.themeTags=Y(this._settings.themeTags,["button"]),super._afterNew(),this._setDefaultTagged("background",Y(this._settings.themeTags,["background"]),()=>S.new(this._root,{})),this.setPrivate("trustBounds",!0)}_prepareChildren(){if(super._prepareChildren(),this.isDirty("icon")){let e=this._prevSettings.icon,t=this.get("icon");t!==e&&(this._disposeProperty("icon"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.icon=t)}if(this.isDirty("label")){let e=this._prevSettings.label,t=this.get("label");t!==e&&(this._disposeProperty("label"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.label=t)}}};F.className="Button";F.classNames=z.classNames.concat([F.className]);function Nt(r,e,t,s){let i=[];return e&&e.fontVariant?i.push(e.fontVariant):r.fontVariant&&i.push(r.fontVariant),t||(e&&e.fontWeight?i.push(e.fontWeight):r.fontWeight&&i.push(r.fontWeight)),e&&e.fontStyle?i.push(e.fontStyle):r.fontStyle&&i.push(r.fontStyle),e&&e.fontSize?(e.fontSize=Z(e.fontSize),i.push(e.fontSize)):r.fontSize&&(r.fontSize=Z(r.fontSize),i.push(r.fontSize)),r.fontFamily=="inherit"?i.push(s()):e&&e.fontFamily?i.push(e.fontFamily):r.fontFamily?i.push(r.fontFamily):i.length&&i.push("Arial"),i.join(" ")}function Z(r){return v(r)||/^\s*\d*\.?\d+\s*$/.test(r)?parseFloat(r+"")+"px":r}function At(){return/apple/i.test(navigator.vendor)}function V(r,e,t){let s=e.measureText(r),i={};if(s.actualBoundingBoxAscent==null){let a=document.createElement("div");a.innerText=r,a.style.visibility="hidden",a.style.position="absolute",a.style.top="-1000000px;",a.style.fontFamily=t.fontFamily||"",a.style.fontSize=t.fontSize+"",document.body.appendChild(a);let h=a.getBoundingClientRect();document.body.removeChild(a);let l=h.height,d=s.width;i={actualBoundingBoxAscent:l,actualBoundingBoxDescent:0,actualBoundingBoxLeft:0,actualBoundingBoxRight:d,fontBoundingBoxAscent:l,fontBoundingBoxDescent:0,width:d}}else i={actualBoundingBoxAscent:s.actualBoundingBoxAscent,actualBoundingBoxDescent:s.actualBoundingBoxDescent,actualBoundingBoxLeft:s.actualBoundingBoxLeft,actualBoundingBoxRight:s.actualBoundingBoxRight,fontBoundingBoxAscent:s.actualBoundingBoxAscent,fontBoundingBoxDescent:s.actualBoundingBoxDescent,width:s.width};let n=s.width;switch(t.textAlign){case"right":case"end":i.actualBoundingBoxLeft=n,i.actualBoundingBoxRight=0;break;case"center":i.actualBoundingBoxLeft=n/2,i.actualBoundingBoxRight=n/2;break;default:i.actualBoundingBoxLeft=0,i.actualBoundingBoxRight=n}return i}function vt(r,e,t=!1){let s=r.maxWidth,i=t?void 0:r.maxHeight;if(!v(s)&&!v(i))return 1;let n=e.right-e.left,a=e.bottom-e.top;return Math.min(s/n||1,i/a||1)}function _t(r,e,t,s,i=!1,n=!0){let a;do{if(i)t=t.slice(0,-1);else{let l=t.replace(/(?:[^,;:!?\\\/\s]|,(?=\d))+[,;:!?\\\/\s]*$/g,"");if((l==""||l===t)&&n)i=!0;else{if(l=="")return t;t=l}}let h=V(t,r,e);a=h.actualBoundingBoxLeft+h.actualBoundingBoxRight}while(a>s&&t!="");return t}function Mt(r,e,t,s,i){let n=t.direction=="rtl";i.lines=[];let a=t.oversizedBehavior,h=t.maxWidth,l=v(h)&&a=="truncate",d=v(h)&&(a=="wrap"||a=="wrap-no-break"),u="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",p=e.toString().replace(/\r/g,"").split(/\n/),c=!0,m=0,C=0,_=0,g;M(p,(f,E)=>{let b;for(f==""?b=[{type:"value",text:""}]:b=q.chunk(f,!1,t.ignoreFormatting);b.length>0;){let o={offsetY:_,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]},$=V(u,r,t),ht=$.actualBoundingBoxAscent+$.actualBoundingBoxDescent;o.height=ht,o.ascent=$.actualBoundingBoxAscent;let w,R=t.textDecoration,G,y,P=!1,D=!0,N=[],tt;dt(b,(T,lt)=>{if(T.type=="format")if(T.text=="[/]")c||(r.restore(),c=!0),G=void 0,g=void 0,y=void 0,R=t.textDecoration,tt=void 0,w=T.text;else{c||r.restore();let x=q.getTextStyle(T.text),A=s(x);r.save(),r.font=A,g=A,w=T.text,x.textDecoration&&(R=x.textDecoration),x.fill&&(G=x.fill),x.width&&(y=it(x.width)),x.verticalAlign&&(tt=x.verticalAlign),c=!1;let W=V(u,r,t),H=W.actualBoundingBoxAscent+W.actualBoundingBoxDescent;H>o.height&&(o.height=H),W.actualBoundingBoxAscent>o.ascent&&(o.ascent=W.actualBoundingBoxAscent)}else if(T.type=="value"&&!P){let x=V(T.text,r,t),A=x.actualBoundingBoxLeft+x.actualBoundingBoxRight;if(l){i.truncated=void 0;let k=D||t.breakWords||!1,L=t.ellipsis||"",O=V(L,r,t),ut=O.actualBoundingBoxLeft+O.actualBoundingBoxRight;if(o.width+A>h){let Bt=h-o.width-ut;T.text=_t(r,t,T.text,Bt,k),T.text+=L,P=!0,i.truncated=!0}}else if(d&&o.width+A>h){let k=h-o.width,L=_t(r,t,T.text,k,!1,D&&t.oversizedBehavior!="wrap-no-break");if(L=="")return i.textVisible=!0,!1;if(!D){let O=V(K(L),r,t);if(O.actualBoundingBoxLeft+O.actualBoundingBoxRight>k)return N=b.slice(lt),w&&N.unshift({type:"format",text:w}),b=[],!1}N=b.slice(lt+1),K(L)!=K(T.text)&&(N.unshift({type:"value",text:T.text.substr(L.length)}),w&&N.unshift({type:"format",text:w})),T.text=K(L),b=[],P=!0}let W=1,H=1;if(g&&y&&y>A){let k=A/y;switch(t.textAlign){case"right":case"end":W=k;break;case"center":W=k,H=k;break;default:H=k}A=y}let et=x.actualBoundingBoxAscent+x.actualBoundingBoxDescent;et>o.height&&(o.height=et),x.actualBoundingBoxAscent>o.ascent&&(o.ascent=x.actualBoundingBoxAscent),o.width+=A,o.left+=x.actualBoundingBoxLeft/W,o.right+=x.actualBoundingBoxRight/H,o.textChunks.push({style:g,fill:G,text:T.text,width:A,height:et,left:x.actualBoundingBoxLeft,right:x.actualBoundingBoxRight,ascent:x.actualBoundingBoxAscent,offsetX:0,offsetY:0,textDecoration:R,verticalAlign:tt}),D=!1}return!0}),t.lineHeight instanceof X?(o.height*=t.lineHeight.value,o.ascent*=t.lineHeight.value):(o.height*=t.lineHeight||1.2,o.ascent*=t.lineHeight||1.2),m<o.left&&(m=o.left),C<o.right&&(C=o.right),i.lines.push(o),_+=o.height,b=N||[]}}),c||r.restore(),M(i.lines,(f,E)=>{let b=0;M(f.textChunks,o=>{if(o.offsetX=b+o.left-f.left,o.offsetY+=f.height-f.height*(t.baselineRatio||.19),b+=o.width*(n?-1:1),o.verticalAlign)switch(o.verticalAlign){case"super":o.offsetY-=f.height/2-o.height/2;break;case"sub":o.offsetY+=o.height/2;break}})});let B={left:n?-C:-m,top:0,right:n?m:C,bottom:_};if(a!=="none"){let f=vt(t,B,a=="truncate");if(f<1)if(a=="fit")v(t.minScale)&&f<t.minScale?(i.textVisible=!1,B.left=0,B.top=0,B.right=0,B.bottom=0):(i.originalScale||(i.originalScale=i.scale),i.scale=f,i.textVisible=!0);else if(a=="hide")i.textVisible=!1,B.left=0,B.top=0,B.right=0,B.bottom=0;else{switch(t.textAlign){case"right":case"end":B.left=n?h:-h,B.right=0;break;case"center":B.left=-h/2,B.right=h/2;break;default:B.left=0,B.right=n?-h:h}i.scale=i.originalScale||1,i.originalScale=void 0,i.textVisible=!0}else i.scale=i.originalScale||1,i.originalScale=void 0,i.textVisible=!0}return B}function Pt(r,e,t,s,i){let n=t.direction=="rtl";i.textVisible=!0,i.lines=[];let a=t.oversizedBehavior,h=t.maxWidth,l=v(h)&&a=="truncate",d=t.ellipsis||"",u,p=e.toString().replace(/\r/g,"").split(/\n/),c=!0,m=0,C=0;return M(p,(_,g)=>{let B=q.chunk(_,!1,t.ignoreFormatting),f={offsetY:C,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]},E,b,o;M(B,($,ht)=>{if($.type=="format"){if($.text=="[/]")c||(r.restore(),c=!0),b=void 0,E=void 0,o=void 0;else{let w=q.getTextStyle($.text),R=s(w);r.save(),r.font=R,E=R,w.fill&&(b=w.fill),w.width&&(o=it(w.width)),c=!1}l&&(u=V(d,r,t))}else if($.type=="value"){let w=$.text.match(/./ug)||[];n&&(w=pt($.text),w.reverse());for(let R=0;R<w.length;R++){let G=w[R],y=V(G,r,t),P=y.width;E&&o&&o>P&&(P=o);let D=y.actualBoundingBoxAscent+y.actualBoundingBoxDescent;if(D>f.height&&(f.height=D),y.actualBoundingBoxAscent>f.ascent&&(f.ascent=y.actualBoundingBoxAscent),m+=P,l){u||(u=V(d,r,t));let N=u.actualBoundingBoxLeft+u.actualBoundingBoxRight;if(m+N>h){f.textChunks.length==1?i.textVisible=!1:(f.width+=N,f.left+=u.actualBoundingBoxLeft,f.right+=u.actualBoundingBoxRight,f.textChunks.push({style:E,fill:b,text:d,width:N,height:D+u.actualBoundingBoxDescent,left:u.actualBoundingBoxLeft,right:u.actualBoundingBoxRight,ascent:u.actualBoundingBoxAscent,offsetX:0,offsetY:D,textDecoration:void 0}));break}}f.width+=P,f.left+=y.actualBoundingBoxLeft,f.right+=y.actualBoundingBoxRight,f.textChunks.push({style:E,fill:b,text:G,width:P,height:D+y.actualBoundingBoxDescent,left:y.actualBoundingBoxLeft,right:y.actualBoundingBoxRight,ascent:y.actualBoundingBoxAscent,offsetX:0,offsetY:D,textDecoration:void 0})}}}),t.lineHeight instanceof X?f.height*=t.lineHeight.value:f.height*=t.lineHeight||1.2,i.lines.push(f),C+=f.height}),c||r.restore(),a=="hide"&&m>h&&(i.textVisible=!1),M(i.lines,_=>{M(_.textChunks,g=>{g.offsetY+=Math.round((_.height-g.height+(_.ascent-g.ascent))/2)})}),{left:0,top:0,right:0,bottom:0}}var J=class extends rt{_afterNew(){super._afterNew();let e=this.children.push(z.new(this._root,{html:'<textarea class="am5-editable-label"></textarea>',isMeasured:!1}));e.hide(),this.setPrivate("input",e),this._setDefaultTagged("background",["editablelabel","background"],()=>S.new(this._root,{}))}_beforeChanged(){if(super._beforeChanged(),this.isDirty("editOn")){this._editOnEvents&&this._editOnEvents.dispose();let e=this.get("editOn","click");e!="none"&&(this._editOnEvents=new ct([this.getPrivate("input").events.on(e,t=>{}),this.events.on(e,t=>{this.set("active",!0)})]))}}_prepareChildren(){super._prepareChildren(),this._maybeInitTextarea()}_updateChildren(){if(super._updateChildren(),this.isDirty("active")){let e=this.get("active",!1);e?this._startEditing():this._stopEditing();let t=this.get("background");t&&t.set("active",e)}this._syncText(),this._syncStyle()}_maybeInitTextarea(){if(!this._isInited()){let e=this.getPrivate("input");if(e&&e.getPrivate("htmlElement")){let s=e.getPrivate("htmlElement").querySelector(".am5-editable-label");s&&(this.setPrivate("textarea",s),s.addEventListener("input",i=>{this.get("multiLine")===!1&&(s.value=s.value.replace(/\n/g," ")),this.set("text",s.value),this._syncStyle()}),s.addEventListener("blur",i=>this.set("active",!1)),ft("keyboardevents")&&this._disposers.push(st(s,"keydown",i=>{nt(i)=="Escape"&&this.set("active",!1)})),this._disposers.push(st(s,"keydown",i=>{nt(i)=="Enter"&&this.get("multiLine")===!1&&(i.preventDefault(),this.set("active",!1))})),this.events.dispatch("inited",{type:"inited",target:this}))}}}_isInited(){return!!this.getPrivate("textarea")}_startEditing(){if(!this._isInited()){this.events.once("inited",()=>{this._startEditing()});return}this._text.set("opacity",0);let e=this.getPrivate("input"),t=this.getPrivate("textarea");t&&(this.get("text","")==""&&this.set("text"," "),e.show(0),this.setTimeout(()=>{this._syncStyle(),t.focus()},100))}_stopEditing(){if(!this._isInited()){this.events.once("inited",()=>{this._stopEditing()});return}let e=this.getPrivate("input"),t=this.getPrivate("textarea");t&&(this.set("text",t.value),e.hide(0),this._text.set("opacity",1))}_syncStyle(){let e=this.getPrivate("input"),t=this.getPrivate("textarea"),s=e.getPrivate("htmlElement");if(t&&s){let i=window.getComputedStyle(t);M(i,c=>{t.style[c]="initial"}),t.style.color=this.get("fill",mt(0)).toCSS(this.get("fillOpacity",1)),t.style.backgroundColor="rgba(0, 0, 0, 0)",t.style.border="none",t.style.outline="none",t.style.padding="0",t.wrap="off",t.style.resize="none",t.style.overflow="hidden";let n=this.get("maxWidth",0)-this.get("paddingLeft",0)-this.get("paddingRight",0);n>0?t.style.maxWidth=n+"px":t.style.minWidth="",t.style.height="auto",t.style.minHeight=t.scrollHeight+"px",this.get("width")&&(t.style.width=this.width()-this.get("paddingLeft",0)-this.get("paddingRight",0)+"px",t.style.minWidth="");let a=this.get("lineHeight");a?a instanceof X?t.style.lineHeight=a.value+"":v(a)&&(t.style.lineHeight=a+""):t.style.lineHeight="1.2";let h=this.get("fontFamily");h||(h=getComputedStyle(s,"font-family").getPropertyValue("font-family")),t.style.fontFamily=h;let l=this.get("fontSize");l?l=Z(l):l=getComputedStyle(s,"font-size").getPropertyValue("font-size"),t.style.fontSize=l;let d=this.get("fontWeight");d?d=d:d=getComputedStyle(s,"font-weight").getPropertyValue("font-weight"),t.style.fontWeight=d;let u=this.get("fontStyle");u?u=u:u=getComputedStyle(s,"font-style").getPropertyValue("font-style"),t.style.fontStyle=u,this.get("oversizedBehavior")=="wrap"?t.style.whiteSpace="pre-wrap":t.style.whiteSpace="nowrap",this._frameDp||(this._frameDp=this.addDisposer(this._root.events.on("frameended",()=>{t.style.minWidth==""&&(t.style.minWidth=t.scrollWidth+20+"px");let c=this.get("textAlign","start");c=="center"?(t.style.textAlign="center",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-50%)")):c=="end"?(t.style.textAlign="right",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-100%)")):t.style.textAlign=c})))}}_syncText(){let e=this.getPrivate("textarea"),t=this.get("text","");t==" "&&(t=""),e&&(e.value=t)}};J.className="EditableLabel";J.classNames=rt.classNames.concat([J.className]);var Q=class extends z{constructor(){super(...arguments),this.thumb=this._makeThumb(),this.startGrip=this._makeButton(),this.endGrip=this._makeButton(),this._thumbBusy=!1,this._startDown=!1,this._endDown=!1,this._thumbDown=!1}_addOrientationClass(){this._settings.themeTags=Y(this._settings.themeTags,["scrollbar",this._settings.orientation]),this._setDefaultTagged("background",Y(this._settings.themeTags,["main","background"]),()=>S.new(this._root,{}))}_makeButton(){return this.children.push(F.new(this._root,{themeTags:["resize","button",this.get("orientation")],icon:xt.new(this._root,{themeTags:["icon"]})._markC("themeTags")})._markC("themeTags","icon"))}_makeThumb(){return this.children.push(S.new(this._root,{themeTags:["thumb",this.get("orientation")]})._markC("themeTags"))}_handleAnimation(e){e&&this._disposers.push(e.events.on("stopped",()=>{this.setPrivateRaw("isBusy",!1),this._thumbBusy=!1}))}_afterNew(){this._addOrientationClass(),super._afterNew();let e=this.startGrip,t=this.endGrip,s=this.thumb,i=this.get("background");i&&this._disposers.push(i.events.on("click",n=>{this.setPrivateRaw("isBusy",!0);let a=this._display.toLocal(n.point),h=this.width(),l=this.height(),d=this.get("orientation"),u;d=="vertical"?u=(a.y-s.height()/2)/l:u=(a.x-s.width()/2)/h;let p,c;d=="vertical"?(p=u*l,c="y"):(p=u*h,c="x");let m=this.get("animationDuration",0);m>0?(this._thumbBusy=!0,this._handleAnimation(this.thumb.animate({key:c,to:p,duration:m,easing:this.get("animationEasing")}))):(this.thumb._setC(c,p),this._root.events.once("frameended",()=>{this.setPrivateRaw("isBusy",!1)}))})),this._disposers.push(s.events.on("dblclick",n=>{if(!gt(n.originalEvent,this))return;let a=this.get("animationDuration",0),h=this.get("animationEasing");this.animate({key:"start",to:0,duration:a,easing:h}),this.animate({key:"end",to:1,duration:a,easing:h})})),this._disposers.push(e.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._startDown=!0,this._gripDown="start"})),this._disposers.push(t.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._endDown=!0,this._gripDown="end"})),this._disposers.push(s.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._thumbDown=!0,this._gripDown=void 0})),this._disposers.push(e.events.on("globalpointerup",()=>{this._startDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._startDown=!1})),this._disposers.push(t.events.on("globalpointerup",()=>{this._endDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._endDown=!1})),this._disposers.push(s.events.on("globalpointerup",()=>{this._thumbDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._thumbDown=!1})),this._disposers.push(e.on("x",()=>{this._updateThumb()})),this._disposers.push(t.on("x",()=>{this._updateThumb()})),this._disposers.push(e.on("y",()=>{this._updateThumb()})),this._disposers.push(t.on("y",()=>{this._updateThumb()})),this._disposers.push(s.events.on("positionchanged",()=>{this._updateGripsByThumb()})),this.get("orientation")=="vertical"?(e._setC("x",0),t._setC("x",0),this._disposers.push(s.adapters.add("y",n=>Math.max(Math.min(Number(n),this.height()-s.height()),0))),this._disposers.push(s.adapters.add("x",n=>this.width()/2)),this._disposers.push(e.adapters.add("x",n=>this.width()/2)),this._disposers.push(t.adapters.add("x",n=>this.width()/2)),this._disposers.push(e.adapters.add("y",n=>Math.max(Math.min(Number(n),this.height()),0))),this._disposers.push(t.adapters.add("y",n=>Math.max(Math.min(Number(n),this.height()),0)))):(e._setC("y",0),t._setC("y",0),this._disposers.push(s.adapters.add("x",n=>Math.max(Math.min(Number(n),this.width()-s.width()),0))),this._disposers.push(s.adapters.add("y",n=>this.height()/2)),this._disposers.push(e.adapters.add("y",n=>this.height()/2)),this._disposers.push(t.adapters.add("y",n=>this.height()/2)),this._disposers.push(e.adapters.add("x",n=>Math.max(Math.min(Number(n),this.width()),0))),this._disposers.push(t.adapters.add("x",n=>Math.max(Math.min(Number(n),this.width()),0))))}_updateChildren(){super._updateChildren(),(this.isDirty("end")||this.isDirty("start")||this._sizeDirty)&&this.updateGrips()}_changed(){if(super._changed(),this.isDirty("start")||this.isDirty("end")){let e="rangechanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,start:this.get("start",0),end:this.get("end",1),grip:this._gripDown})}}_released(){let e="released";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this})}updateGrips(){let e=this.startGrip,t=this.endGrip,s=this.get("orientation"),i=this.height(),n=this.width();s=="vertical"?(e._setC("y",i*this.get("start",0)),t._setC("y",i*this.get("end",1))):(e._setC("x",n*this.get("start",0)),t._setC("x",n*this.get("end",1)));let a=this.getPrivate("positionTextFunction"),h=Math.round(this.get("start",0)*100),l=Math.round(this.get("end",0)*100),d,u;a?(d=a.call(this,this.get("start",0)),u=a.call(this,this.get("end",0),!0)):(d=h+"%",u=l+"%"),e._setC("ariaLabel",this._t("From %1",void 0,d)),e._setC("ariaValueNow",""+h),e._setC("ariaValueText",h+"%"),e._setC("ariaValueMin","0"),e._setC("ariaValueMax","100"),t._setC("ariaLabel",this._t("To %1",void 0,u)),t._setC("ariaValueNow",""+l),t._setC("ariaValueText",l+"%"),t._setC("ariaValueMin","0"),t._setC("ariaValueMax","100")}_updateThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip,i=this.height(),n=this.width(),a=t.x(),h=s.x(),l=t.y(),d=s.y(),u=0,p=1;this.get("orientation")=="vertical"?v(l)&&v(d)&&(!this._thumbBusy&&!e.isDragging()&&(e._setC("height",d-l),e._setC("y",l)),u=l/i,p=d/i):v(a)&&v(h)&&(!this._thumbBusy&&!e.isDragging()&&(e._setC("width",h-a),e._setC("x",a)),u=a/n,p=h/n),this.getPrivate("isBusy")&&(this.get("start")!=u||this.get("end")!=p)&&(this._setC("start",u),this._setC("end",p));let c=this.getPrivate("positionTextFunction"),m=Math.round(this.get("start",0)*100),C=Math.round(this.get("end",0)*100),_,g;c?(_=c.call(this,this.get("start",0)),g=c.call(this,this.get("end",0),!0)):(_=m+"%",g=C+"%"),e._setC("ariaLabel",this._t("From %1 to %2",void 0,_,g)),e._setC("ariaValueNow",""+m),e._setC("ariaValueText",m+"%")}_updateGripsByThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip;if(this.get("orientation")=="vertical"){let i=e.height();t._setC("y",e.y()),s._setC("y",e.y()+i)}else{let i=e.width();t._setC("x",e.x()),s._setC("x",e.x()+i)}}};Q.className="Scrollbar";Q.classNames=z.classNames.concat([Q.className]);export{Nt as a,At as b,V as c,Mt as d,Pt as e,S as f,F as g,J as h,Q as i};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as f,b as y,c as v}from"./
|
|
2
|
+
import{a as f,b as y,c as v}from"./QCYQNVPL.js";import{a}from"./JB6WQEFJ.js";import{a as p}from"./OFBCNFBW.js";import b from"./KRJCOTGC.js";import{f as m}from"./GIBXI44G.js";import"./RQT2PVDJ.js";import"./LXME6MU5.js";import{P as e,Q as s,R as n,T as l,_ as c,a as o,b as t,x as h}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{watch:w},u,{c:d}])=>{var R=o`:host{width:100%;height:100%}`,g=d(u,{omitProps:["container","focusRegionVisible","focusRegionShortcutEnabled","navigation","scale","ui"]}),r=class extends n{constructor(){super(),this._containerRef=e(),this._direction=m(),this._mapRef=e(),this._slotGroupRefs=y(),this.autoDestroyDisabled=!1,this.view=g(this),this.attributionMode=this.view.attributionMode,this.ready=this.view.ready,this.layer=this.view.layer,this.map=this.view.map,this.operationalDataVisible=this.view.operationalDataVisible,this.arcgisViewReadyChange=h()}static{this.properties={autoDestroyDisabled:5,view:32,aria:0,attributionMode:1,ready:36,layer:0,map:0,operationalDataVisible:5}}static{this.styles=[p,f,R]}get aria(){return this.view?.aria}set aria(i){this.view&&(this.view.aria=i)}async destroy(){await this.manager.destroy()}loaded(){let i=this;i.el.childElem=this._mapRef.value,this.view.container??=i.el.childElem,this.manager.onLifecycle(()=>[w(()=>this.layer,()=>{this.layer&&this.view&&(this.view.layer=this.layer,this.layer.loaded||this.layer.load())},{initial:!0}),w(()=>this.view.ready,()=>{this.view.ready&&this.arcgisViewReadyChange.emit()},{initial:this.view.ready})])}renderMain(){return t`<div class=${`root ${a.base}`} ${s(this._mapRef)}></div>`}render(){return t`${this.renderMain()}<section class=${l(a.containerUI)} ${s(this._containerRef)}>${v({direction:this._direction,slotGroupRefs:this._slotGroupRefs})}</section>`}};c("arcgis-video",r);return r},"core/reactiveUtils","views/VideoView",b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{R as c,T as
|
|
2
|
+
import{R as c,T as i,_ as d,a as l,b as a}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";var m=l`:host{block-size:auto;display:inline-grid;inline-size:max-content}.align-center{justify-items:center}.align-end{justify-items:end}.align-start{justify-items:start}.date{font-weight:var(--calcite-font-weight-bold)}.disabled{opacity:var(--calcite-opacity-disabled)}.table-date,.table-date-time{align-content:center;align-items:center;display:grid;grid-template-columns:1fr}.table-date{grid-template-rows:var(--calcite-font-size-sm)}.table-date-time{grid-template-rows:var(--calcite-font-size-sm) var(--calcite-font-size-sm)}.time{font-weight:var(--calcite-font-weight-normal)}`,s=class extends c{constructor(){super(...arguments),this.align="center",this.autoDestroyDisabled=!1}static{this.properties={align:1,autoDestroyDisabled:5,date:0,viewModel:0}}static{this.styles=m}async destroy(){await this.manager.destroy()}render(){let{align:r,date:e,viewModel:t}=this;if(!t||!e)return null;let{interactive:o}=t,n=!o;switch(t.format){case"date":return a`<div class=${i({"table-date":!0,[`align-${r}`]:!0,disabled:n})}><span class="date">${t.formatDate(e)}</span></div>`;case"date-time":return a`<div class=${i({"table-date-time":!0,[`align-${r}`]:!0,disabled:n})}><span class="date">${t.formatDate(e)}</span><span class="time">${t.formatTime(e)}</span></div>`}}};d("arcgis-time-bar-date",s);export{s as ArcgisTimeBarDate};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import"./
|
|
2
|
+
import"./ODSZ7JZM.js";import"./NMGC3KRM.js";import"./54252KWO.js";import"./HZDWPWBH.js";import{V as o}from"./P3AEIHWE.js";import"./MQL4JTYG.js";import"./CTVCZ2FU.js";import"./TAVTDQ6S.js";var t=["#2888B8","#EB7028","#48A375","#9370B1","#e55035","#3d9ccc","#DC7B04","#b87bb0","#3fa681","#EE6386"],c=t.map(r=>o(r));export{c as esriChartColorSet};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as g}from"./7465ANAR.js";import{a as v}from"./L5IRXOCJ.js";import c from"./U7WRQCRV.js";import{h as f}from"./GIBXI44G.js";import"./RQT2PVDJ.js";import b from"./SBYVR52H.js";import{a as d,c as h}from"./LXME6MU5.js";import{R as i,T as a,X as u,_ as m,a as r,b as n,x as o}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([,{a:p}])=>{var E=r`.arcgis-button{--calcite-icon-color: var(--calcite-color-text-3);--calcite-button-background-color: var(--calcite-color-foreground-1);color:var(--calcite-color-text-3);line-height:var(--calcite-font-line-height-relative-tight);calcite-button{--calcite-offset-invert-focus: 1}display:flex;flex-flow:column;cursor:pointer;background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);:hover{--calcite-icon-color: var(--calcite-color-text-1);--calcite-button-background-color: var(--calcite-color-transparent-hover)}}:host{width:fit-content;height:fit-content}`;function x(s){return s.includes("#")||s.includes(".")||s.includes("[")?s:`#${s}`}var c=class extends i{constructor(){super(),this.messages=g(),this.view=p(this),this.visualScale="m",this.arcgisPropertyChange=f()("state"),this.arcgisReady=o(),this.listenOn(document,"fullscreenchange",()=>this.fullscreenElement=document.fullscreenElement)}static{this.properties={fullscreenElement:16,view:0,element:1,label:1,messageOverrides:0,referenceElement:1,visualScale:1,state:35}}static{this.styles=E}get fullscreenTitle(){return this.state==="active"?this.messages.exit:this.messages.enter}#e;get element(){return this.#e}set element(e){if(typeof e=="string"){let t=x(e),l=h(this.el,t);this.#e=l||void 0}else this.#e=e}get state(){if(!document.fullscreenEnabled)return"unsupported";let e=this._getElement();return e?this.fullscreenElement===e?"active":"ready":"disabled"}connectedCallback(){super.connectedCallback(),this.fullscreenElement=document.fullscreenElement}_getElement(){let e=this.view?.container,t=e?.getRootNode(),l=t instanceof ShadowRoot?t.host:null;return this.element??e?.parentElement??l??null}_toggle(){this.state!=="unsupported"&&(document.fullscreenElement?document.exitFullscreen():this._getElement()?.requestFullscreen())}render(){let{fullscreenTitle:e,state:t}=this,l=t==="unsupported",b=t==="ready"||t==="disabled"||t==="unsupported"?"zoom-out-fixed":"zoom-in-fixed";return n`<div class=${a(d("root",v.arcgisButton))}><calcite-button .disabled=${t==="disabled"||l} .iconStart=${b} kind=neutral .label=${e} @click=${this._toggle} .scale=${this.visualScale} title=${e??u}></calcite-button></div>`}};m("arcgis-fullscreen",c);return c},b,c)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as f}from"./FH3WFF5O.js";export default $arcgis.t(([{watch:v}])=>{var w=500,d=1e3;function h({getLoading:r,setEffectiveLoading:m,timeout:a=w,minShownDuration:s=d}){let o,n;function i(){clearTimeout(n),n=void 0}function e(t){o=t?Date.now():void 0,m(t)}function u(t,c){if(t<=0){e(c);return}n=setTimeout(()=>{i(),e(c)},t)}e(r());let l=v(r,t=>{i(),t?u(a,!0):u(o==null?0:s-(Date.now()-o),!1)},{sync:!0});return f(()=>{l.remove(),i()})}return h},"core/reactiveUtils")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import c from"./BSTT6ICQ.js";import b from"./HU57LQOA.js";import a from"./F4AJCUZ6.js";import"./WJQUE4DR.js";import{a as v}from"./7465ANAR.js";import{h as y}from"./GIBXI44G.js";import"./RQT2PVDJ.js";import"./LXME6MU5.js";import{Q as h,R as m,_ as f,a as p,b as r,x as l}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([o,{watch:k},{substitute:$},T,{a:u},{d:w,h:b},d])=>{var _=p`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0}calcite-notice{margin:var(--calcite-spacing-md)}.subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}.results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-medium)}`,g=class extends m{constructor(){super(...arguments),this._messages=v({blocking:!0}),this.#o=!0,this.#l=new Map,this.#e=new o,this.#i=new o,this.#a=new o,this.#t=null,this.#r=20,this._candidateFeatures=[],this._compatibleSubnetworkNames=[],this._namedTraceConfigurations=[],this._subnetworkNamesState="ready",this._exceedDisplayLimit=!1,this.autoDestroyDisabled=!1,this.hideActionBar=!1,this.includeDefaultActionsDisabled=!1,this.mode="default",this.arcgisPropertyChange=y()("mode","selectedNamedTraceConfiguration","selectedUtilityNetwork","traceLocations"),this.arcgisTraceLocationSelectEnd=l(),this.arcgisTraceLocationSelectStart=l(),this.arcgisTriggerAction=l()}static{this.properties={_selectedFeature:16,_candidateFeatures:16,_compatibleSubnetworkNames:16,_subnetworksTable:16,_namedTraceConfigurations:16,_traceConfiguration:16,_error:16,_subnetworkNamesState:16,_activeTraceLocationType:16,_exceedDisplayLimit:16,actions:0,beforeMapInteraction:0,view:0,selectedUtilityNetwork:0,selectedNamedTraceConfiguration:0,autoDestroyDisabled:5,hideActionBar:5,includeDefaultActionsDisabled:5,traceConfiguration:32,isSubnetworkNameTraceSelected:32,messageOverrides:0,referenceElement:1,mode:3,traceLocationDetails:32,traceLocations:32}}static{this.styles=_}#o;get#v(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}#n;#l;#e;#i;#a;#t;#s;#u;#g;#p;#r;get#m(){return!this.isSubnetworkNameTraceSelected}get#f(){let t=this.selectedNamedTraceConfiguration?.traceType;return t==="path"||t==="circuit"}get#k(){let t=this.selectedUtilityNetwork?.dataElement?.domainNetworks;return t?t.map(e=>e.subnetworkLayerId).filter(e=>e!=null&&e>-1):[]}get traceConfiguration(){return this._traceConfiguration}get isSubnetworkNameTraceSelected(){let{selectedNamedTraceConfiguration:t}=this;return!!t?.traceConfiguration?.subnetworkName&&t?.traceType==="subnetwork"}get traceLocationDetails(){return new o([...this.#e,...this.#i,...this.#a])}get traceLocations(){let t=[];return this.#m&&this.#e.forEach(e=>t.push(...this.#d(e))),this.#f&&this.#a.forEach(e=>t.push(...this.#d(e))),this.#i.forEach(e=>t.push(...this.#d(e))),t}async destroy(){this.#w(),d.getSketchViewModel(this.view)?.cancel(),d.removeSketchGraphicsLayer(this.view);let t=await Promise.allSettled([this.#s?.destroy(),this.#u?.destroy(),this.#g?.destroy(),this.#p?.destroy()]);for(let e of t)e.status==="rejected"&&u(e.reason,this,"Error while destroying trace inputs");await this.manager.destroy()}load(){this.#y(),this.manager.onLifecycle(()=>[k(()=>this.view?.map,()=>this.#y())])}willUpdate(t){t.has("selectedUtilityNetwork")&&this.#S()}disconnectedCallback(){super.disconnectedCallback(),this.#l.clear()}#$(t){t.stopPropagation(),this.arcgisTriggerAction.emit(t.detail)}#T({detail:t,target:e}){(t.name==="selectedDrillInFeature"||t.name==="selectedFeature")&&(this._selectedFeature=e.selectedDrillInFeature??e.selectedFeature??void 0)}#y(){if(this._error=void 0,!this.view?.map){this._error=this._messages.errors.noView;return}}#_(t){t&&(this.#u=t)}#N(t){t&&(this.#g=t)}#L(t){t&&(this.#p=t)}#C(t){t&&(this.#s=t)}#d(t){let e=t.flagProperties.selectedTerminals;return t.flagProperties.terminalConfiguration&&e?.size?Array.from(e,i=>new T({type:t.traceLocation.type,isFilterBarrier:t.traceLocation.isFilterBarrier,globalId:t.traceLocation.globalId,percentAlong:t.traceLocation.percentAlong,terminalId:i})):[t.traceLocation]}#w(){let{view:t}=this;this.#e.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#e.removeAll(),this.#i.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#i.removeAll(),this.#a.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#a.removeAll()}async#S(){let{selectedUtilityNetwork:t}=this;try{t&&!t.loaded&&await t.load()}catch(e){u(e,this,"Error while loading the selected utility network")}this.#D(),this.#P(),this.#w()}#D(){this._traceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0,this._namedTraceConfigurations=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter(t=>t.traceType!=="circuit").sort((t,e)=>t.title.localeCompare(e.title))||[]}#P(){let{selectedUtilityNetwork:t}=this;this.#n=new o(this.#v.filter(e=>t?.isUtilityLayer(e)&&!this.#k.includes(e.layerId)))}#F(t){if(t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented){t.preventDefault();return}this._activeTraceLocationType=t?.target?.traceLocationType,this.mode="add-spatial-instructions"}#A(t){if(t==null)return;let e=this.#l,i=this.#n,a=e.get(t);if(a)return a;if(!i)return;let s=i.find(c=>"layerId"in c&&c.layerId===t);return s&&e.set(t,s),s}async#E(t,e){let i=t.createQuery();i.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,i.objectIds=e.map(s=>s.getObjectId()),i.outFields=["*"];let{features:a}=await w(t,i);return a.forEach(s=>{if(!s.getEffectivePopupTemplate(this.#o)){let c=s.layer;s.popupTemplate=c.createPopupTemplate()}}),a}async#U(t){let e=new Map,i=[];return t.forEach(a=>{let s=b(a.layer)?a.layer.parent:a.layer;if(s){let c=this.#A(s.layerId);if(c){let n=e.get(c)||[];n.push(a),e.set(c,n)}}}),await Promise.all(Array.from(e.keys()).map(async a=>{let s=e.get(a)??[],c=await this.#E(a,s);i.push(...c)})),i}async#I(t){return this._exceedDisplayLimit=t.length>this.#r,this._candidateFeatures=await this.#U(t.slice(0,this.#r)),this._candidateFeatures.length===0?(this.#c(),await Promise.reject(Error("No features found"))):(this._candidateFeatures.length===1&&(this._selectedFeature=this._candidateFeatures.at(0)),this.mode="add-spatial-feature",this.#t?.reject(),this.#t=Promise.withResolvers(),await this.#t.promise)}#x(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit(),this._activeTraceLocationType=void 0,this.mode="default",this.#c()}#c(t){t?.stopPropagation(),this.#s?.clear(),this.#b(),(this.view?d.getSketchViewModel(this.view):null)?.cancel()}#b(){this.mode="default",this._candidateFeatures=[],this._selectedFeature=void 0,this.#t?.reject(),this.#t=null}#M(){let t=this.#t,e=this.#s,{_selectedFeature:i}=this;if(t&&e){if(!i)return;t.resolve(i),this.#t=null}}#O(t,e=!1,i){return r`<calcite-notice .closable=${e} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${t}</div></calcite-notice>`}#B(){let{_namedTraceConfigurations:t,selectedUtilityNetwork:e}=this;return r`<arcgis-utility-network-trace-configuration-picker .messageOverrides=${this.messageOverrides} .traceConfigurations=${t} .utilityNetwork=${e} @arcgisPropertyChange=${i=>{i.stopPropagation(),i.detail.name==="selectedNamedTraceConfiguration"&&(this.selectedNamedTraceConfiguration=i.target.selectedNamedTraceConfiguration),i.detail.name==="traceConfiguration"&&(this._traceConfiguration=i.target.traceConfiguration)}}></arcgis-utility-network-trace-configuration-picker>`}#G(){let{selectedUtilityNetwork:t,view:e}=this;return r`<arcgis-utility-network-picker .messageOverrides=${this.messageOverrides} .selectedUtilityNetwork=${t} .view=${e} @arcgisPropertyChange=${i=>{i.detail.name==="selectedUtilityNetwork"&&(this.selectedUtilityNetwork=i.target.selectedUtilityNetwork)}}></arcgis-utility-network-picker>`}#j(){let{_error:t}=this,{noView:e}=this._messages.errors,i;return t===e?i=this.#O(t,!1,"exclamation-mark-triangle"):i=this.#R(),r`<calcite-flow-item .selected=${this.mode==="default"}>${i}</calcite-flow-item>`}#V(){let{_messages:t,mode:e}=this,i=this._activeTraceLocationType==="starting-point"?t.labels.addSpatial.startingPoint:this._activeTraceLocationType==="barrier"?t.labels.addSpatial.barrier:t.labels.addSpatial.stoppingPoint;return r`<calcite-flow-item .selected=${e==="add-spatial-instructions"} .heading=${i} @calciteFlowItemBack=${a=>this.#c(a)}><div class="add-spatial-mode"><div><h5 class="heading">${t.instructions.addSpatial.selectFeature.heading}</h5>${t.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${t.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${t.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`}#z(){let{_activeTraceLocationType:t,_candidateFeatures:e,_messages:i}=this;if(!e.length)return this.mode="default",null;let a=t==="starting-point"?i.labels.addSpatial.startingPoint:t==="barrier"?i.labels.addSpatial.barrier:i.labels.addSpatial.stoppingPoint,s=e.length===1?"feature":"list";return r`<arcgis-features-next .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#o} .features=${this._candidateFeatures} .featureMenuTitle=${a} .hideActionBar=${this.hideActionBar} hide-select-feature .includeDefaultActionsDisabled=${this.includeDefaultActionsDisabled} .initialDisplayMode=${s} .messageOverrides=${this.messageOverrides} @arcgisClose=${()=>this.#b()} @arcgisPropertyChange=${this.#T} @arcgisTriggerAction=${this.#$} open .referenceElement=${this.referenceElement} .view=${this.view} ${h(this.#C)}></arcgis-features-next>`}#q(){let{mode:t,_messages:e,_selectedFeature:i,selectedUtilityNetwork:a}=this,s=t==="add-spatial-feature"&&this._exceedDisplayLimit&&!i,c=$(e.warnings.exceededDisplayLimit,{limit:this.#r.toString()}),n=i?!(a?.isUtilityLayer(i.layer)??!0):!0;return r`${s&&r`<calcite-input-message class="results-limited-message" icon=exclamation-mark-circle status=idle>${c}</calcite-input-message>`||""}<calcite-button appearance=outline width=full @click=${()=>this.#c()} slot=footer>${e.buttons.cancel}</calcite-button>${t==="add-spatial-feature"&&r`<calcite-button width=full slot=footer appearance=solid @click=${()=>this.#M()} .disabled=${n}>${e.buttons.add}</calcite-button>`||""}`}#h(t,e,i){return r`<arcgis-utility-network-trace-locations .messageOverrides=${this.messageOverrides} .view=${this.view} .traceLocationType=${t} .beforeMapInteraction=${this.beforeMapInteraction} @arcgisTraceLocationSelectStart=${this.#F} @arcgisTraceLocationSelectEnd=${this.#x} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#n} .traceLocations=${e} .afterMapInteraction=${this.#I.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(i)}></arcgis-utility-network-trace-locations>`}#R(){let{_messages:t}=this,e=this.#G(),i=this.#B(),a=this._namedTraceConfigurations.length&&this.traceConfiguration?r`${this.#m?this.#h("starting-point",this.#e,this.#_):null}${this.#f?this.#h("stopping-point",this.#a,this.#L):null}${this.#h("barrier",this.#i,this.#N)}`:null,s=this.selectedUtilityNetwork?.loaded?r`${i}${a}`:null;return r`<calcite-block-group .label=${t.labels.traceInputs}>${e}${s}</calcite-block-group>`}render(){let{mode:t}=this;return r`<calcite-panel>${t==="add-spatial-feature"?this.#z():null}<calcite-flow .hidden=${t==="add-spatial-feature"}>${this.#j()}${this.#V()}</calcite-flow>${t!=="default"?this.#q():null}</calcite-panel>`}};f("arcgis-utility-network-trace-inputs",g);return g},"core/Collection","core/reactiveUtils","intl","rest/networks/support/TraceLocation",a,b,c)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import h from"./FFVPO4JB.js";import{a as b}from"./QCYQNVPL.js";import{a as w}from"./JB6WQEFJ.js";import{a as f}from"./OFBCNFBW.js";import"./Y6WTYXVP.js";import g from"./F4AJCUZ6.js";import"./WJQUE4DR.js";import e from"./TWPVYHJG.js";import d from"./KRJCOTGC.js";import"./GIBXI44G.js";import"./RQT2PVDJ.js";import c from"./SBYVR52H.js";import"./LXME6MU5.js";import{P as l,Q as o,R as p,T as n,_ as v,b as a,x as r}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{watch:s},_,A,D,{d:m,e:g,f:d,g:y},{c:h,e:u},e,,{a:V,b:R,c:C,d:E}])=>{var I=h(A,{}),M=h(_,{}),c=class extends p{constructor(){super(),this._attributionMode=null,this._mapRef=l(),this._uiController=new V(this),this.extraContent=new D,this.arcgisLoadError=C(this),this.arcgisViewReadyError=E(this),this._map=I(this),this.view=M(this),this.animationsDisabled=this.view.animationsEnabled,this.allLayerViews=this.view.allLayerViews,this.analyses=this.view.analyses,this.autoDestroyDisabled=!1,this.background=this.view.background,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.fatalError=this.view.fatalError,this.floors=this.view.floors,this.graphics=this.view.graphics,this.ground=this._map.ground,this.highlights=this.view.highlights,this.ipsInfo=this._map.ipsInfo,this.layerViews=this.view.layerViews,this.magnifier=this.view.magnifier,this.map=this.view.map,this.navigation=this.view.navigation,this.options=this.view.options,this.padding=this.view.padding,this.popup=this.view.popup,this.popupDisabled=this.view.popupEnabled,this.popupComponentEnabled=!1,this.ready=this.view.ready,this.resizeAlign=this.view.resizeAlign,this.resolution=this.view.resolution,this.rotation=this.view.rotation,this.selectionManager=this.view.selectionManager,this.focusRegionVisible=this.view.focusRegionVisible,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.spatialReferenceLocked=this.view.spatialReferenceLocked,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.timeZone=this.view.timeZone,this.visibleArea=this.view.visibleArea,this.arcgisViewAnalysisViewCreate=e(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=e(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=e(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=r(),this.arcgisViewClick=e(()=>this.view,"click"),this.arcgisViewDoubleClick=e(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=e(()=>this.view,"double-tap-drag"),this.arcgisViewFocusRegionSelect=e(()=>this.view,"focus-region-select"),this.arcgisViewDrag=e(()=>this.view,"drag"),this.arcgisViewHold=e(()=>this.view,"hold"),this.arcgisViewImmediateClick=e(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=e(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=e(()=>this.view,"key-down"),this.arcgisViewKeyUp=e(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=e(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=e(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=e(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=e(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=e(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=e(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=e(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=e(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=e(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=r(),this.arcgisViewVerticalTwoFingerDrag=e(()=>this.view,"vertical-two-finger-drag"),R(this),this.view.ui={components:[]}}static{this.properties={_map:16,view:32,animationsDisabled:5,aria:0,allLayerViews:32,analyses:0,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,background:0,basemap:1,basemapView:0,canZoomIn:36,canZoomOut:36,center:1,constraints:0,displayFilterDisabled:5,extent:0,fatalError:0,floors:0,focusAreas:0,gamepad:32,graphics:0,ground:1,hideAttribution:5,highlights:0,interacting:32,ipsInfo:0,itemId:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,options:0,padding:0,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,ready:36,resizeAlign:1,resolution:40,rotation:9,scale:9,selectionManager:32,focusRegionVisible:5,focusRegionShortcutEnabled:5,focusRegion:32,slotGroupRefs:32,spatialReference:0,spatialReferenceLocked:5,stationary:32,suspended:39,theme:0,timeExtent:0,timeZone:1,updating:32,viewpoint:0,visibleArea:32,zoom:9,loadErrorSources:0}}static{this.styles=[f,b]}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}get aria(){return this.view?.aria}set aria(i){this.view&&(this.view.aria=i)}get attributionItems(){return this.view?.attributionItems??[]}get attributionMode(){return this._attributionMode}set attributionMode(i){this._attributionMode=i,i!=="auto"&&(this.view.attributionMode=i)}get center(){return this.view.center}set center(i){if(g(i,this._center))return;this._center=d(i);let t=y(i,this.view);t&&(this.view.center=t)}get extent(){return this.view.extent}set extent(i){i&&!this.extent?.equals(i)&&(this.view.extent=i)}get focusAreas(){return this.map?this.map.focusAreas:{areas:[],style:"bright"}}set focusAreas(i){this.map&&(this.map.focusAreas=i)}get gamepad(){return this.view.input.gamepad}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(i){this.view.attributionVisible=!i}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(i){u(this._map,this),this._map.portalItem={id:i},this.view.map=this._map}get navigating(){return this.view.navigating}get popupElement(){return this._uiController.popupElement||null}get scale(){return this.view.scale}set scale(i){this.view.scale=i}get focusRegion(){return this.view.focusRegion}get stationary(){return this.view.stationary}get updating(){return this.view.updating}get viewpoint(){return this.view.viewpoint}set viewpoint(i){m(this.viewpoint,i)&&(this.view.viewpoint=i)}get zoom(){return this.view.zoom}set zoom(i){this.view.zoom=i}async closePopup(){this._uiController.closePopup()}async destroy(){await this.manager.destroy()}async fetchPopupFeatures(i,t){return this.view.fetchPopupFeatures(i,t)}async goTo(i,t){return await this.view.goTo(i,t)}async hitTest(i,t){return await this.view.hitTest(i,t)}async openPopup(i){await this._uiController.openPopup(i)}async takeScreenshot(i){return await this.view.takeScreenshot(i)}toMap(i){return this.view.toMap(i)}toScreen(i,t){return this.view.toScreen(i,t)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(i,t){return await this.componentOnReady(),await this.view.whenReady().then(()=>i?.()).catch(t)}async whenAnalysisView(i){return await this.view.whenAnalysisView(i)}async whenLayerView(i){return await this.view?.whenLayerView(i)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}loaded(){let i=this;i.el.childElem=this._mapRef.value,this.view.container??=i.el.childElem,this.map||=this._map,this.manager.onLifecycle(()=>[s(()=>this.map,t=>{t&&(this._map=t)},{initial:!0,sync:!0}),s(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),s(()=>this.view.ready,()=>this.arcgisViewReadyChange.emit(),{initial:this.view.ready}),s(()=>this.view.attributionHeight,t=>{this._uiController.handleAttributionHeightChange(t)},{initial:!0})])}renderMain(){return a`<div class=${n(w.base)} ${o(this._mapRef)}></div>`}render(){return a`${this.renderMain()}<section class=${n(w.containerUI)} ${o(this._uiController.uiContainerRef)}>${this._uiController.render()}${this.extraContent}</section>`}};v("arcgis-map",c);return c},"core/reactiveUtils","views/MapView","WebMap","core/Collection",c,d,e,g,h)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{b as s,d}from"./
|
|
2
|
+
import{b as s,d}from"./MQL4JTYG.js";import{Q as h,Y as o,p as r,s as l}from"./CTVCZ2FU.js";import"./TAVTDQ6S.js";var a=class t extends o{constructor(e,i){super(e,i),this.responsiveRules=[],this._dp=new h([this._root._rootContainer.onPrivate("width",n=>{this._isUsed()&&this._maybeApplyRules()}),this._root._rootContainer.onPrivate("height",n=>{this._isUsed()&&this._maybeApplyRules()})])}static widthXXS(e,i){return e<=t.XXS}static widthXS(e,i){return e<=t.XS}static widthS(e,i){return e<=t.S}static widthM(e,i){return e<=t.M}static widthL(e,i){return e<=t.L}static widthXL(e,i){return e<=t.XL}static widthXXL(e,i){return e<=t.XXL}static heightXXS(e,i){return i<=t.XXS}static heightXS(e,i){return i<=t.XS}static heightS(e,i){return i<=t.S}static heightM(e,i){return i<=t.M}static heightL(e,i){return i<=t.L}static heightXL(e,i){return i<=t.XL}static heightXXL(e,i){return i<=t.XXL}static isXXS(e,i){return e<=t.XXS&&i<=t.XXS}static isXS(e,i){return e<=t.XS&&i<=t.XS}static isS(e,i){return e<=t.S&&i<=t.S}static isM(e,i){return e<=t.M&&i<=t.M}static isL(e,i){return e<=t.L&&i<=t.L}static isXL(e,i){return e<=t.XL&&i<=t.XL}static isXXL(e,i){return e<=t.XXL&&i<=t.XXL}static maybeXXS(e,i){return e<=t.XXS||i<=t.XXS}static maybeXS(e,i){return e<=t.XS||i<=t.XS}static maybeS(e,i){return e<=t.S||i<=t.S}static maybeM(e,i){return e<=t.M||i<=t.M}static maybeL(e,i){return e<=t.L||i<=t.L}static maybeXL(e,i){return e<=t.XL||i<=t.XL}static maybeXXL(e,i){return e<=t.XXL||i<=t.XXL}static newEmpty(e){return new this(e,!0)}addRule(e){return e.name&&!e.template&&(e.template=this.rule(e.name,e.tags)),this.responsiveRules.push(e),this._maybeApplyRule(e),e}removeRule(e){l(this.responsiveRules,e)}dispose(){this._dp&&this._dp.dispose()}_isUsed(){return this._root._rootContainer.get("themes").indexOf(this)!==-1}_maybeApplyRules(){r(this.responsiveRules,e=>{this._maybeUnapplyRule(e)}),r(this.responsiveRules,e=>{this._maybeApplyRule(e)})}_maybeApplyRule(e){if(e.applied)return;let i=this._root._rootContainer.getPrivate("width"),n=this._root._rootContainer.getPrivate("height");e.relevant.call(e,i,n)&&(e.applied=!0,e.template&&e.settings&&e.template.setAll(e.settings),e.applying&&e.applying.call(e))}_maybeUnapplyRule(e){if(!e.applied)return;let i=this._root._rootContainer.getPrivate("width"),n=this._root._rootContainer.getPrivate("height");e.relevant.call(e,i,n)||(e.applied=!1,e.template&&e.template.removeAll(),e.removing&&e.removing.call(e))}setupDefaultRules(){super.setupDefaultRules();let e=i=>this.addRule(i);e({name:"Chart",relevant:t.widthXXS,settings:{paddingLeft:0,paddingRight:0}}),e({name:"Chart",relevant:t.heightXXS,settings:{paddingTop:0,paddingBottom:0}}),e({name:"Bullet",relevant:t.isXS,settings:{forceHidden:!0}}),e({name:"Legend",relevant:t.isXS,settings:{forceHidden:!0}}),e({name:"HeatLegend",tags:["vertical"],relevant:t.widthXS,settings:{forceHidden:!0}}),e({name:"HeatLegend",tags:["horizontal"],relevant:t.heightXS,settings:{forceHidden:!0}}),e({name:"Label",tags:["heatlegend","start"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"Label",tags:["heatlegend","end"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"Button",tags:["resize"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"AxisRendererX",relevant:t.heightXS,settings:{inside:!0}}),e({name:"AxisRendererY",relevant:t.widthXS,settings:{inside:!0}}),e({name:"AxisRendererXLabel",relevant:t.heightXS,settings:{minPosition:.1,maxPosition:.9}}),e({name:"AxisLabel",tags:["y"],relevant:t.widthXS,settings:{centerY:d,maxPosition:.9}}),e({name:"AxisLabel",tags:["x"],relevant:t.heightXXS,settings:{forceHidden:!0}}),e({name:"AxisLabel",tags:["x","minor"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"AxisLabel",tags:["y"],relevant:t.widthXXS,settings:{forceHidden:!0}}),e({name:"AxisLabel",tags:["y","minor"],relevant:t.heightL,settings:{forceHidden:!0}}),e({name:"AxisTick",tags:["x"],relevant:t.heightXS,settings:{inside:!0,minPosition:.1,maxPosition:.9}}),e({name:"AxisTick",tags:["y"],relevant:t.widthXXS,settings:{inside:!0,minPosition:.1,maxPosition:.9}}),e({name:"Grid",relevant:t.maybeXXS,settings:{forceHidden:!0}}),e({name:"RadialLabel",tags:["radial"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"RadialLabel",tags:["circular"],relevant:t.maybeS,settings:{inside:!0}}),e({name:"AxisTick",tags:["circular"],relevant:t.maybeS,settings:{inside:!0}}),e({name:"AxisTick",tags:["radial"],relevant:t.maybeS,settings:{inside:!0}}),e({name:"RadialLabel",tags:["circular"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"PieChart",relevant:t.maybeXS,settings:{radius:s(99)}}),e({name:"PieChart",relevant:t.widthM,settings:{radius:s(99)}}),e({name:"RadialLabel",tags:["pie"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"RadialLabel",tags:["pie"],relevant:t.widthM,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pie"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pie"],relevant:t.widthM,settings:{forceHidden:!0}}),e({name:"FunnelSeries",relevant:t.widthM,settings:{alignLabels:!1}}),e({name:"Label",tags:["funnel","vertical"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"Tick",tags:["funnel","vertical"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"Label",tags:["funnel","horizontal"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"Tick",tags:["funnel","horizontal"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"PyramidSeries",relevant:t.widthM,settings:{alignLabels:!1}}),e({name:"Label",tags:["pyramid","vertical"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pyramid","vertical"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"Label",tags:["pyramid","horizontal"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pyramid","horizontal"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"PictorialStackedSeries",relevant:t.widthM,settings:{alignLabels:!1}}),e({name:"Label",tags:["pictorial","vertical"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pictorial","vertical"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"Label",tags:["pictorial","horizontal"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pictorial","horizontal"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"Label",tags:["flow","horizontal"],relevant:t.widthS,settings:{forceHidden:!0}}),e({name:"Label",tags:["flow","vertical"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"Chord",relevant:t.maybeXS,settings:{radius:s(99)}}),e({name:"Label",tags:["hierarchy","node"],relevant:t.maybeXS,settings:{forceHidden:!0}})}};a.XXS=100;a.XS=200;a.S=300;a.M=400;a.L=600;a.XL=800;a.XXL=1e3;var S=a;export{S as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{b as G,c as F}from"./QCYQNVPL.js";import{c as D}from"./Y6WTYXVP.js";import a from"./F4AJCUZ6.js";import{b as x,c as w,f as L}from"./GIBXI44G.js";import{b as R,d as O}from"./LXME6MU5.js";import{D as v,P as _,b as y,x as g,z as S}from"./7IGSTLKW.js";export default $arcgis.t(([{initializeProjection:W},{signal:z},{watch:d,when:H},U,T,{b:M,c:A}])=>{async function*j(i,t){for(let e of i){let o=await v(e,t).catch(()=>{});if(t.aborted)return;yield*Array.isArray(o)?o.filter(n=>n instanceof T):[]}}async function*V(){yield*[]}async function*B(i,t){await v(i,t).catch(()=>{})}async function $(i,t,e,o){let n;if(e instanceof U?(await W(e.spatialReference,i.spatialReference),M(o.signal),n=i.toScreen(e)):n=e,!n)return V();let p=Promise.withResolvers(),s=i.fetchPopupFeatures(n,{...o,defaultPopupTemplateEnabled:t.defaultPopupTemplateEnabled,hitTestResolver:p})??V();return await p.promise,s}function E(i,t){if(t instanceof U)return t;let e="width"in t?{x:t.x+t.width/2,y:t.y+t.height/2}:t;return i.toMap(e)??void 0}async function q(i,t,e,o){let n={};return{diagnostics:n,featureStream:await $(i,t,e,{diagnostics:n,signal:o}),location:E(i,e)}}var k=class extends S{constructor(t){super(t),this.direction=L(),this.popupRef=_(),this.uiContainerRef=_(),this._popupElement=z(void 0),this._popupAbortController=null,this._popupClickOpenCount=0,this.slotGroupRefs=G(),this.attributionHeight=0,this.#t=null,this.component.listenOn(globalThis,"unhandledrejection",e=>{let o=e.reason;if(o?.name==="webgl:required"){let{name:n}=o;this.webGLError={name:n}}})}get _focusRegionSelectionSupported(){return!this.component.popupDisabled&&(this.component.popupComponentEnabled||!!this.popupElement&&this.popupElement!==this._defaultPopupElement)}get popupElement(){return this._popupElement.value}set popupElement(t){this._popupElement.value=t}#t;hostLifecycle(){let{view:t}=this.component,e=t.focusRegionShortcutEnabled;return[d(()=>this.component.focusRegionShortcutEnabled??this._focusRegionSelectionSupported,o=>{this.component.view.focusRegionShortcutEnabled=o},{initial:!0,sync:!0}),H(()=>this.component.view.ready,()=>{this._assignDefaultPopup()}),d(()=>this.component.view.popup?.visible,(o,n)=>{(o||n)&&this._cancelPopupOperation(),o&&this.popupElement?.open&&(this.popupElement.open=!1)},{initial:!0}),d(()=>this.component.popupElement?.open,(o,n)=>{n&&!o&&this._cancelPopupOperation()},{initial:!0,sync:!0}),this.component.view.on("focus-region-select",o=>this._handleFocusRegionSelect(o)),this.component.view.on("click",[],o=>{let n=o.native;o.button!==0||n?.ctrlKey||n?.metaKey||this._handleOpenPopup(o).catch(()=>{})},-2),{remove:()=>{t.focusRegionShortcutEnabled=e}}]}hostConnected(){this._observeCenterSlotElements()}hostUpdated(){this.component.el.isConnected&&this._observeCenterSlotElements(),this.component.popupComponentEnabled?this._assignDefaultPopup():(this.popupElement===this._defaultPopupElement&&(this._cancelPopupOperation(),this._maybeResetViewPopup(),this.popupElement=void 0),this._defaultPopupElement=void 0)}hostDestroy(){this._cancelPopupOperation(),this._disconnectCenterSlotResizeObserver()}hostDisconnected(){this._disconnectCenterSlotResizeObserver()}async openPopup(t={}){this._assignDefaultPopup();let e=this.popupElement,o=t.location??e?.location,n=!!e&&!t.featureStream&&!t.promises?.length&&!!t.fetchFeatures&&!!o;this._cancelPopupOperation();let p=new AbortController;if(this._popupAbortController=p,e){let{fetchFeatures:s,shouldFocus:r,title:a,featureStream:c,promises:m,location:l,...C}=t,f=l?E(this.component.view,l):void 0,P=l??o,u=n&&P?q(this.component.view,e,P,p.signal):null,b=u?Promise.withResolvers():null;u&&b&&(u.catch(()=>{}),e.featureStream=B(b.promise,p.signal));try{await e.componentOnReady()}catch(h){throw u&&this._isCurrentPopupOperation(p)&&(p.abort(),e.open=!1,await e.clear()),h}if(!this._isCurrentPopupOperation(p))return;if(u)try{let h=await u;if(!this._isCurrentPopupOperation(p))return;Object.assign(e,C),a!==void 0&&(e.heading=a),await e.openFeatureStream(h)}catch(h){if(!A(h))throw this._isCurrentPopupOperation(p)&&(e.open=!1,await e.clear()),h;return}finally{b?.resolve()}else Object.assign(e,C),a!==void 0&&(e.heading=a),c?await e.openFeatureStream({featureStream:c,location:f}):m?.length?await e.openFeatureStream({featureStream:j(m,p.signal),location:f}):(e.featureStream=null,l!==void 0&&(e.location=f),e.open=!0);r&&this._isCurrentPopupOperation(p)&&await e.setFocus()}else{let{location:s,...r}=t;await this.component.view.openPopup({...r,location:s?E(this.component.view,s):void 0})}}closePopup(){this._cancelPopupOperation(),this.popupElement?(this.popupElement.open=!1,this.popupElement.clear()):this.component.view.closePopup()}_cancelPopupOperation(){this._popupAbortController?.abort(),this._popupAbortController=null}_isCurrentPopupOperation(t){return this._popupAbortController===t&&!t.signal.aborted}_assignDefaultPopup(){this.component.popupComponentEnabled&&this.popupRef.value&&!this.popupElement&&(this._defaultPopupElement=this.popupRef.value,this.popupElement=this.popupRef.value,this.popupElement.referenceElement=this.component.el,this.popupElement.view=this.component.view)}handleAttributionHeightChange(t){this.attributionHeight!==t&&(this.attributionHeight=t,this._getUiContainer()?.style.setProperty("--arcgis-internal-attribution-space-top",`${this.attributionHeight}px`))}_observeCenterSlotElements(){let t=this._getUiContainer(),{topLeft:e,topRight:o,bottomLeft:n,bottomRight:p}=this.slotGroupRefs,s=[e.value,o.value,n.value,p.value];if(t){this.#t??=new ResizeObserver(()=>this._updateCenterSlotMaxWidths()),this.#t.disconnect(),this.#t.observe(t);for(let r of s)r&&this.#t.observe(r,{box:"border-box"});this._updateCenterSlotMaxWidths()}}_updateCenterSlotMaxWidths(){let t=this._getUiContainer(),{topLeft:e,topRight:o,bottomLeft:n,bottomRight:p}=this.slotGroupRefs;if(!(t&&e.value&&o.value&&n.value&&p.value))return;let s=t.getBoundingClientRect(),r=this._getCenterSlotLayout(s,e.value,o.value),a=this._getCenterSlotLayout(s,n.value,p.value);this._setCenterSlotProperty(t,"--arcgis-internal-top-center-max-width",r.maxWidth),this._setCenterSlotProperty(t,"--arcgis-internal-top-center-position",r.position),this._setCenterSlotProperty(t,"--arcgis-internal-bottom-center-max-width",a.maxWidth),this._setCenterSlotProperty(t,"--arcgis-internal-bottom-center-position",a.position)}_setCenterSlotProperty(t,e,o){let n=`${o}px`;t.style.getPropertyValue(e)!==n&&t.style.setProperty(e,n)}_getCenterSlotLayout(t,e,o){let n=e.getBoundingClientRect(),p=o.getBoundingClientRect(),s=n.width>0,r=p.width>0,a=n.right-t.left,c=t.right-p.left,m=s&&r,l=m?Math.max(0,t.width-2*Math.max(a,c)):Math.max(0,t.width-a-c);return{maxWidth:l,position:m?t.width/2:a+l/2}}_disconnectCenterSlotResizeObserver(){this.#t?.disconnect(),this.#t=null}_getUiContainer(){return this.uiContainerRef.value}_maybeDisableViewPopup(){this.component.view&&(this.component.popupComponentEnabled||this.popupElement)&&(this.previousViewPopupEnabled??=this.component.view.popupEnabled,this.component.view.popupEnabled=!1)}_maybeResetViewPopup(){this.component.view&&this.previousViewPopupEnabled!==void 0&&(this.component.view.popupEnabled=this.previousViewPopupEnabled,this.previousViewPopupEnabled=void 0)}async _handleOpenPopup(t){if(this._assignDefaultPopup(),!this.component.popupDisabled){this._popupClickOpenCount++,this._maybeDisableViewPopup();try{this.popupElement&&await this.openPopup({fetchFeatures:!0,location:{x:t.x,y:t.y}})}finally{this._popupClickOpenCount--,this._popupClickOpenCount||this._maybeResetViewPopup()}}}_handleFocusRegionSelect(t){this._assignDefaultPopup(),!(!this._focusRegionSelectionSupported||!this.popupElement)&&queueMicrotask(()=>{let{focusRegion:e}=this.component.view;!t.defaultPrevented&&e&&this.openPopup({fetchFeatures:!0,location:e}).catch(()=>{})})}_handlePopupSlotChange(t){let e=D(t.target,"arcgis-popup")[0];e?this.popupElement=e:this.popupElement!==this._defaultPopupElement&&(this.popupElement=void 0,this._assignDefaultPopup())}_webGLErrorAlert(){return this.webGLError?y`<arcgis-webgl-error .errorName=${this.webGLError.name}></arcgis-webgl-error>`:null}render(){return F({direction:this.direction,popupComponentEnabled:this.component.popupComponentEnabled,slotGroupRefs:this.slotGroupRefs,handlePopupSlotChange:t=>this._handlePopupSlotChange(t),webGLErrorElement:this._webGLErrorAlert(),popupElement:this.popupRef})}};function st(i){x((t,e)=>{let o=()=>{if(i.attributionMode!=="auto")return;let n=O(i.el);i.view.attributionMode!==n&&(i.view.attributionMode=n)};e.onLifecycle(()=>(o(),R(i.el,["class"],o))),e.onUpdate(n=>{n.has("attributionMode")&&i.attributionMode==="auto"&&o()})})}var rt=w((i,t)=>{let e=g();return t.onLifecycle(()=>d(()=>{let{map:o}=i;if(!o||o.destroyed)return[];let n=[];return o.loadError&&n.push(o),o.basemap?.loadError&&n.push(o.basemap),o.ground.loadError&&n.push(o.ground),[...o.allLayers,...o.allTables].forEach(p=>{p.loadError&&n.push(p)}),n},o=>{o.length&&(i.loadErrorSources=o,e.emit())})),e}),at=w((i,t)=>{let e=g();return t.onLifecycle(()=>d(()=>i.view?.readyState,o=>{(o==="map-content-error"||o==="rendering-error")&&e.emit()})),e});return{a:k,b:st,c:rt,d:at}},"applications/Components/featureUtils","applications/Components/reactiveUtils","core/reactiveUtils","geometry/Point","Graphic",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as x}from"./CKZBNHMD.js";import{c as b}from"./AL3PLZEE.js";import f from"./F4AJCUZ6.js";import"./WJQUE4DR.js";import e from"./OISNNHIG.js";import{a as B}from"./7465ANAR.js";import d from"./KRJCOTGC.js";import c from"./U7WRQCRV.js";import{a as R,f as z}from"./GIBXI44G.js";import"./RQT2PVDJ.js";import a from"./SBYVR52H.js";import"./LXME6MU5.js";import{R as E,X as w,_ as D,a as F,b as u,x as v,z as L}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{property:d,subclass:H},j,_,{ignoreAbortErrors:V},{watch:g,on:M,whenOnce:I},W,U,K,Q,q,J,X,Y,{fetchPopupFeaturesFromGraphics:k},,,,O])=>{var Z=F`:host{width:100%;height:100%;padding:var(--calcite-space-none);margin:var(--calcite-space-none);display:flex;--internal-attribution-height: 16px;--arcgis-internal-presentation-padding-start: unset;--arcgis-internal-presentation-padding-end: unset;--arcgis-internal-presentation-cover-padding-top: unset;--arcgis-internal-presentation-cover-padding-bottom: unset;--arcgis-internal-presentation-cover-padding-start: unset;--arcgis-internal-presentation-cover-padding-end: unset;--arcgis-presentation-navigation-z-index: unset}p{padding:0;margin:0}.root{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%}.presentation-content{position:absolute;display:flex;width:100%;height:100%;justify-content:flex-end;padding-top:var(--calcite-space-lg);padding-inline-start:calc(var(--calcite-space-lg) + var(--arcgis-internal-presentation-padding-start));padding-inline-end:calc(var(--calcite-space-lg) + var(--arcgis-internal-presentation-padding-end))}.navigation-container{display:flex;flex-direction:column;margin-inline-start:var(--calcite-space-lg);margin-block:auto calc(var(--calcite-space-lg) + var(--arcgis-internal-attribution-space-top));width:fit-content;height:100%;z-index:var(--arcgis-presentation-navigation-z-index)}.navigation{width:fit-content;display:flex;align-items:center;background-color:var(--calcite-color-surface-2);box-shadow:var(--arcgis-internal-box-shadow);pointer-events:auto}.navigation-slide-list-container{position:relative;height:100%;min-height:0;margin-block-start:var(--calcite-space-lg)}.slide-list-action-container{border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.slide-counter-text{display:flex;align-items:center;justify-content:center;gap:var(--calcite-space-base);font-size:var(--calcite-font-size-md)}.slide-counter-text-element{box-sizing:border-box;max-width:28px;margin:0;padding:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-variant-numeric:tabular-nums;min-width:var(--calcite-spacing-md);text-align:center}.legend-container{pointer-events:all;box-shadow:var(--calcite-shadow-sm);max-width:300px;height:fit-content;max-height:calc(100vh - 136px);overflow:hidden auto}.legend{background-color:var(--calcite-color-surface-2)}`,ee=Object.defineProperty,te=Object.getOwnPropertyDescriptor,o=(i,e,t,s)=>{for(var n=s>1?void 0:s?te(e,t):e,a=i.length-1,r;a>=0;a--)(r=i[a])&&(n=(s?r(e,t,n):r(n))||n);return s&&n&&ee(e,t,n),n},l=class extends j{constructor(i){super(i),this.transitionActive=!1,this.showLegend=!1,this._slideLegendDisabled=!1,this.keyboardNavigationEnabled=!1,this._subscribeToSlideEvents=e=>{this._unsubscribeToSlideEvents(e),e.forEach(t=>{let s=t.on("apply-slide-start",()=>this._onApplySlideStart(t)),n=t.on("apply-slide-complete",()=>this._onApplySlideComplete(t)),a=t.on("apply-slide-cancel",()=>this._onApplySlideCancel(t));this.addHandles(s,t.id),this.addHandles(n,t.id),this.addHandles(a,t.id)})},this._unsubscribeToSlideEvents=e=>{e.forEach(t=>{this.hasHandles(t.id)&&this.removeHandles(t.id)})}}initialize(){this.addHandles(g(()=>this.view?.map,(i,e)=>{if(this.hasHandles("sceneLoaded")&&this.removeHandles("sceneLoaded"),e){let t=e.presentation?.slides;t&&t.length>0&&this._unsubscribeToSlideEvents(t)}i&&this.addHandles(g(()=>i.loaded,t=>{t&&(this.removeHandles("sceneLoaded"),this._startWatchSlides(),this._slideId&&this._applySlideById(this._slideId))},{initial:!0}),"sceneLoaded")},{initial:!0}))}destroy(){this._unsubscribeToSlideEvents(this.slides)}get slideId(){return this._slideId}set slideId(i){i===void 0||!this.view?.map?.loaded?this._slideId=i:this._applySlideById(i)}get visibleSlides(){return this.view?.map?.presentation?.slides?.filter(i=>!i.hidden)??new _}get slides(){return this.view?.map?.presentation?.slides??new _}get lastSlideSelected(){return this.getSlideIndexBySlideId(this.slideId)===this.visibleSlides.length-1}get firstSlideSelected(){return this.getSlideIndexBySlideId(this.slideId)===0}get slideSelected(){return this.getSlideIndexBySlideId(this.slideId)>-1}get hasOnlyOneSlide(){return this.visibleSlides.length===1}get slideIndex(){return this.getSlideIndexBySlideId(this.slideId)}get slideLegendDisabled(){return this._slideLegendDisabled}set slideLegendDisabled(i){this._slideLegendDisabled=i,i&&(this.showLegend=!1)}getSlideIndexBySlideId(i){let e=-1;return i&&(e=this.visibleSlides.findIndex(t=>t.id===i)),e}navigateInPresentation(i){let e=this.slideIndex+i,t=this._getSlideBySlideIndex(e);t??=this._getSlideBySlideIndex(0),t&&this.applySlide(t)}captureArrowKeysForNavigation(i,e){let t=["ArrowLeft","ArrowRight","PageUp","PageDown"];if(document.activeElement?.nodeName.toLowerCase()==="arcgis-scene"||!t.includes(i.code))return;let s=e==="rtl"?"ArrowRight":"ArrowLeft",n=i.code===s||i.code==="PageUp"?-1:1;this.navigateInPresentation(n)}async setSliceAnalysisInteractive(i){if(!this.view?.analyses?.length)return;let e=this.view.analyses.find(s=>s.type==="slice"&&s.origin?.type==="web-scene");if(!e)return;let t=await this.view.whenAnalysisView(e);t&&(t.interactive=i)}getSlideBySlideId(i){return this.visibleSlides.find(e=>e.id===i)}async applySlide(i,e,t){if(this.view){let s=t?{signal:t?.signal}:{};await V(i.applyTo(this.view,{...s,animate:!e}))}}_getSlideBySlideIndex(i){if(i!=null&&i>=0&&i<this.visibleSlides.length)return this.visibleSlides.getItemAt(i)}async _applySlideById(i){let e=i?this.getSlideBySlideId(i):void 0;e&&await this.applySlide(e)}_startWatchSlides(){this._subscribeToSlideEvents(this.slides),this.addHandles(M(()=>this.slides,"change",i=>{this._subscribeToSlideEvents(new _(i.added)),this._unsubscribeToSlideEvents(new _(i.removed))},{onListenerAdd:this._subscribeToSlideEvents,onListenerRemove:this._unsubscribeToSlideEvents}))}_onApplySlideStart(i){this._slideId=i.id,this.transitionActive=!0,this.showLegend=!1,this.onApplySlideStart?.(i)}_onApplySlideComplete(i){this.transitionActive=!1,this._updateLegendDisplay(i),this.onApplySlideComplete?.(i)}_onApplySlideCancel(i){this.transitionActive=!1,this._updateLegendDisplay(i),this.onApplySlideCancel?.(i)}_updateLegendDisplay(i){this.showLegend=!this._slideLegendDisabled&&!!i.elements.legendInfo?.visible}};o([d()],l.prototype,"_slideId",2);o([d()],l.prototype,"view",2);o([d()],l.prototype,"slideId",1);o([d()],l.prototype,"transitionActive",2);o([d()],l.prototype,"showLegend",2);o([d()],l.prototype,"_slideLegendDisabled",2);o([d()],l.prototype,"keyboardNavigationEnabled",2);o([d()],l.prototype,"visibleSlides",1);o([d()],l.prototype,"slides",1);o([d()],l.prototype,"lastSlideSelected",1);o([d()],l.prototype,"firstSlideSelected",1);o([d()],l.prototype,"slideSelected",1);o([d()],l.prototype,"hasOnlyOneSlide",1);o([d()],l.prototype,"slideLegendDisabled",1);o([d()],l.prototype,"onApplySlideStart",2);o([d()],l.prototype,"onApplySlideComplete",2);o([d()],l.prototype,"onApplySlideCancel",2);o([d()],l.prototype,"getSlideIndexBySlideId",1);l=o([H("components.presentation.PresentationViewModel")],l);var $=class extends L{constructor(e){super(e)}hostLoaded(){this.component.manager.onLifecycle(()=>{let e=this.component;I(()=>e.referenceElement).then(t=>{this._isArcgisScene(t)&&(this._sceneRef=t)})})}openPopup(e){this.component.view&&this.component.slideId===e.id&&e.elements.popupInfo!=null&&this._preparePopupFeature(this.component.view,e.elements.popupInfo).then(({success:t,features:s,popupInfo:n})=>{this.component.slideId===e.id&&(t?this._handlePopupFeatureFound(e,s,n):this.component.arcgisPopupFeatureNotFound.emit({slide:e}))})}_isArcgisScene(e){return e===void 0||typeof e=="string"?!1:"tagName"in e&&e.tagName==="ARCGIS-SCENE"}closePopup(e){(!this.component.slidePopupDisabled||e)&&this._sceneRef?.closePopup()}async _handlePopupFeatureFound(e,t,s){let n=s?.location??void 0;this.component.arcgisPopupFeaturesRetrieved.emit({slide:e,features:t,location:n}),this.component.slidePopupDisabled||await this._sceneRef?.openPopup({features:t,location:n})}async _preparePopupFeature(e,t){let s=[];if(!t.features?.length||t.features.length===0)return{success:!1,features:s};let n=t.features?.getItemAt(t.selectedFeatureIndex)?.layerReference;if(n?.layerId==null)return{success:!1,features:s};let{layer:a,sublayer:r}=this._getLayersFromView(e,n.layerId,n?.sublayerId);if(!a)return{success:!1,features:s};let p=r??a;if(!p||!this._layerTypeSupportsCapturePopup(p))return{success:!1,features:s};if(s=await this._fetchFeaturesFromQueryable(e,t,a,r,p),s&&this._featureHasBeenFilledWithAttributes(s)){let c=s[0];return this._setFallbackPopupTemplate(c,r,a),this._setFallbackGeometry(c,t?.location),{success:!0,features:s,popupInfo:t}}return{success:!1,features:s}}_getLayersFromView(e,t,s){let n=e.map?.findLayerById(t)??void 0,a=this._getBuildingSceneLayerSublayer(n,s);return{layer:n,sublayer:a}}_getBuildingSceneLayerSublayer(e,t){let s;return e&&this._isLayer(e)&&this._isBuildingSceneLayer(e)&&t!=null&&(s=e.allSublayers.find(n=>n.id===t&&n.type==="building-component")),s}_featureHasBeenFilledWithAttributes(e){return e&&e.length>0&&e[0].attributes&&Object.entries(e[0].attributes)?.length>1}async _fetchFeaturesFromQueryable(e,t,s,n,a){let r=t.features?.getItemAt(t.selectedFeatureIndex);if(r?.id==null)return await Promise.resolve([]);let p=await e.whenLayerView(s);await I(()=>!p.updating);let c=this._tryGetBuildingComponentSublayerView(s,n,p)??p;await I(()=>!c.updating);let h=this._createFeatureGraphic(s,n,a,r.id),y=await k(c,[h]);return this._featureHasBeenFilledWithAttributes(y)||(await I(()=>!e.updating),y=await k(c,[h])),y}_tryGetBuildingComponentSublayerView(e,t,s){let n;return this._isLayer(e)&&this._isBuildingSceneLayer(e)&&t!=null&&(n=s.sublayerViews.find(a=>a.sublayer.id===t.id)),n}_setFallbackPopupTemplate(e,t,s){e.popupTemplate==null&&(e.popupTemplate=t?.popupTemplate?t.popupTemplate:s.popupTemplate)}_setFallbackGeometry(e,t){e.geometry==null&&t&&(e.geometry=t.clone())}_createFeatureGraphic(e,t,s,n){let a=this._getGlobalIdFieldNameFromLayer(s),r=n.type==="global-id"&&a?a:s.objectIdField,p=this._getGraphicOrigin(e,t),c=new W({attributes:{},layer:e,origin:p});return c.attributes[r]=n.value,c}_getGraphicOrigin(e,t){switch(e.type){case"csv":return new K(e);case"feature":return new Y(e);case"geojson":return new Q(e);case"scene":return new q(e);case"wfs":return new J(e);case"building-scene":return t?new X(t):void 0;default:return}}_layerTypeSupportsCapturePopup(e){return e!=null&&["csv","feature","geojson","wfs","scene","building-component"].includes(e.type)}_isLayer(e){return!!e&&e instanceof U}_isBuildingSceneLayer(e){return e?.type==="building-scene"}_getGlobalIdFieldNameFromLayer(e){return e.fields?.find(t=>t.type==="global-id")?.name}},ie=i=>new $(i),m=Object.freeze({width:0,height:0}),f=new WeakMap,S=()=>({topCenter:{...m},topLeft:{...m},topRight:{...m},bottomCenter:{...m},bottomLeft:{...m},bottomRight:{...m}}),T=i=>({topCenter:{...i.topCenter},topLeft:{...i.topLeft},topRight:{...i.topRight},bottomCenter:{...i.bottomCenter},bottomLeft:{...i.bottomLeft},bottomRight:{...i.bottomRight}}),N=i=>{let e=f.get(i);return e||(e={observedGroups:new Map,observedSizes:S(),subscribers:new Set},f.set(i,e)),e},se=i=>{let e=i?.topCenter.value,t=i?.topLeft.value,s=i?.topRight.value,n=i?.bottomCenter.value,a=i?.bottomLeft.value,r=i?.bottomRight.value;return e&&t&&s&&n&&a&&r?{topCenter:e,topLeft:t,topRight:s,bottomCenter:n,bottomLeft:a,bottomRight:r}:null},ne=(i,e)=>b.every(t=>i.get(t)===e[t]),ae=i=>{let e=T(i.observedSizes);i.subscribers.forEach(t=>t(e))},re=(i,e)=>{let t=f.get(i);if(!t)return;let s=!1;e.forEach(n=>{let a=b.find(y=>t.observedGroups.get(y)===n.target);if(!a)return;let{width:r,height:p}=n.contentRect,c={width:r,height:p},h=t.observedSizes[a];h.width===c.width&&h.height===c.height||(t.observedSizes[a]=c,s=!0)}),s&&ae(t)},A=(i,e)=>{let t=N(i);t.resizeObserver||(t.resizeObserver=new ResizeObserver(n=>{re(i,n)}));let s=se(e);if(!s){t.observedGroups.size>0&&(t.resizeObserver.disconnect(),t.observedGroups.clear());return}ne(t.observedGroups,s)||(t.resizeObserver.disconnect(),t.observedGroups.clear(),b.forEach(n=>{let a=s[n];t.observedGroups.set(n,a),t.resizeObserver?.observe(a)}))},le=(i,e)=>{let t=N(i);return t.subscribers.add(e),e(T(t.observedSizes)),()=>{let s=f.get(i);s&&(s.subscribers.delete(e),s.subscribers.size===0&&(s.resizeObserver?.disconnect(),s.observedGroups.clear(),f.delete(i)))}},P=class extends L{#e;#t;#i;constructor(e){super(e),this.exports=S()}hostDisconnected(){this.#i?.(),this.#i=void 0,this.#t=void 0,this.#e=void 0,this.exports=S()}hostLifecycle(){return[g(()=>this.#s(),e=>{if(this.#t!==e){if(this.#i?.(),this.#i=void 0,this.#t=e,this.#e=e?.slotGroupRefs,!e){this.exports=S();return}this.#i=le(e,t=>{this.#n(t)||(this.exports=t)}),A(e,this.#e)}},{sync:!0,initial:!0}),g(()=>this.#s()?.slotGroupRefs,e=>{this.#e=e,this.#t&&e&&A(this.#t,e)},{sync:!0,initial:!0})]}#s(){let{referenceElement:e}=this.component;return e&&typeof e!="string"?e:void 0}hostUpdated(){!this.#t||!this.#e||A(this.#t,this.#e)}#n(e){let t=this.exports??S();return b.every(s=>{let n=t[s],a=e[s];return n.width===a.width&&n.height===a.height})}},oe=R(P),de=O(l),C=class extends E{constructor(){super(...arguments),this._messages=B(),this._direction=z(),this.#e=de(this),this.#i=e=>{this.#e.captureArrowKeysForNavigation(e,this._direction)},this.#s=ie(this),this.#a=null,this.#l=e=>{this.#s.closePopup(),this.arcgisSlideApplyStart.emit({slide:e})},this.#o=e=>{this.#s.openPopup(e),this.sliceAnalysisInteractive&&this.#e.setSliceAnalysisInteractive(!0),this.arcgisSlideApplyComplete.emit({slide:e})},this.#d=e=>{this.sliceAnalysisInteractive&&this.#e.setSliceAnalysisInteractive(!0),this.arcgisSlideApplyCancel.emit({slide:e})},this.#c=e=>{let t=e.detail?.selectedSlide;if(!t)return;this.#n?.abort();let s=new AbortController;this.#n=s;let n=Date.now(),a=this.#a!==null&&n-this.#a<300;if(this.#a=n,this.#e.applySlide(t,a,s),a){this._showSlideList=!1;return}setTimeout(()=>{s.signal.aborted||(this._showSlideList=!1,this.#e.applySlide(t,!1,s))},300)},this.#r=()=>{this._showSlideList=!1},this._showSlideList=!1,this.autoDestroyDisabled=!1,this.view=this.#e.view,this.visualScale="m",this.keyboardNavigationEnabled=!1,this.slidePopupDisabled=!1,this.slideCaptionsDisabled=!1,this.slideLegendDisabled=this.#e.slideLegendDisabled,this.sliceAnalysisInteractive=!1,this.navigationHidden=!1,this.arcgisPopupFeatureNotFound=v(),this.arcgisPopupFeaturesRetrieved=v(),this.arcgisReady=v(),this.arcgisSlideApplyCancel=v(),this.arcgisSlideApplyComplete=v(),this.arcgisSlideApplyStart=v()}static{this.properties={_slotSizesController:16,_showSlideList:16,slideId:1,autoDestroyDisabled:5,view:0,visualScale:1,keyboardNavigationEnabled:5,slidePopupDisabled:5,slideCaptionsDisabled:5,slideLegendDisabled:5,sliceAnalysisInteractive:5,navigationHidden:5}}static{this.styles=Z}#e;#t;#i;#s;#n;#a;#l;#o;#d;#c;#r;#h;#p;get slideId(){return this.#e.slideId}set slideId(e){this.#e.slideId=e}async destroy(){await this.manager.destroy()}loaded(){this.#e.onApplySlideStart=this.#l,this.#e.onApplySlideComplete=this.#o,this.#e.onApplySlideCancel=this.#d,this.#m();let e=this;this.manager.onLifecycle(()=>[g(()=>this.sliceAnalysisInteractive,t=>{this.#e.setSliceAnalysisInteractive(t)},{initial:!0}),g(()=>e.referenceElement,t=>{this.#u(t)&&(this._slotSizesController=oe(this),this.#p=this.#g())},{once:!0,initial:!0}),{remove:()=>{document.removeEventListener("keydown",this.#i),this.#h?.removeEventListener("arcgisSlideListClose",this.#r),this.#t?.remove(),this.#p?.remove(),this.#n?.abort()}}])}#u(e){return e===void 0||typeof e=="string"?!1:"tagName"in e&&e.tagName==="ARCGIS-SCENE"}#g(){return g(()=>this._slotSizesController,e=>this.#v(e?.topLeft,e?.topRight,e?.bottomLeft,e?.bottomRight),{initial:!0})}#v(e,t,s,n){let a=this._direction==="ltr"?e?.width??0:t?.width??0,r=this._direction==="ltr"?t?.width??0:e?.width??0,p=Math.max(e?.height??0,t?.height??0),c=Math.max(s?.height??0,n?.height??0);a>0?this.el.style.setProperty("--arcgis-internal-presentation-padding-start",`calc(var(--calcite-space-lg) + ${a.toString()}px)`):this.el.style.setProperty("--arcgis-internal-presentation-padding-start","0px"),r>0?this.el.style.setProperty("--arcgis-internal-presentation-padding-end",`calc(var(--calcite-space-lg) + ${r.toString()}px)`):this.el.style.setProperty("--arcgis-internal-presentation-padding-end","0px");let h=a<=Math.max(p,c)&&r<=Math.max(p,c);this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-top",h?"0":`${p}px`),this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-bottom",h?"0":`${c}px`),this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-start",h?`${a}px`:"0"),this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-end",h?`${r}px`:"0")}#m(){this.#t=g(()=>this.keyboardNavigationEnabled,e=>{document.removeEventListener("keydown",this.#i),e&&document.addEventListener("keydown",this.#i)},{initial:!0})}render(){if(this.#e?.visibleSlides?.length===0)return u`<div></div>`;let e=this.#e.visibleSlides.find(a=>a.id===this.slideId),t=this.#y(),s=this.#S(e),n=this.#f();return u`<div class="root"><div class="presentation-content">${s}${n}</div>${t}</div>`}#y(){if(this.navigationHidden)return null;let e=this.#e.lastSlideSelected&&!this.#e.hasOnlyOneSlide,t=this.#w();return u`<div class="navigation-container"><div class="navigation-slide-list-container">${t}</div><div class="navigation"><div class="slide-list-action-container" id=${x}><calcite-action-bar expand-toggle-disabled layout=horizontal .scale=${this.visualScale==="l"?"m":"s"}><calcite-action .text=${this._messages.slideList??""} selection-appearance=highlight icon=list .scale=${this.visualScale==="l"?"m":"s"} .label=${this._messages.slideList} .active=${this._showSlideList} @click=${()=>this._showSlideList=!this._showSlideList}></calcite-action></calcite-action-bar><calcite-tooltip .referenceElement=${x} placement=bottom><span>${this._messages.slideList}</span></calcite-tooltip></div><calcite-button appearance=transparent icon-start=chevron-left icon-flip-rtl=start kind=neutral .scale=${this.visualScale} .disabled=${this.#e.firstSlideSelected||!this.#e.slideSelected} .label=${this._messages.previous} title=${this._messages.previous??w} @click=${()=>this.#e.navigateInPresentation(-1)}></calcite-button><div class="slide-counter-text">${this.#b()}</div><calcite-button appearance=transparent icon-start=${e?"reset":"chevron-right"} icon-flip-rtl=start kind=neutral .scale=${this.visualScale} .label=${e?this._messages.restart:this._messages.next} title=${(e?this._messages.restart:this._messages.next)??w} @click=${()=>this.#e.navigateInPresentation(1)}></calcite-button></div></div>`}#b(){let e=this.#e.slideIndex+1,t=this._messages?.slideNavAriaText?.replace("${index}",e.toString()).replace("${numberOfSlides}",this.#e.visibleSlides.length.toString());return this.#e.slideSelected?u`<p role=banner aria-label=${t??w} aria-live=polite><div class="slide-counter-text-element" data-testId=arcgis-map-presentation-slideIndex>${e}</div><div>/</div><p class="slide-counter-text-element" data-testId=arcgis-map-presentation-numberOfSlides>${this.#e.visibleSlides.length}</p></p>`:u`<p role=banner data-testId=arcgis-map-presentation-numberOfSlides>${this.#e.visibleSlides?.length} ${this._messages?.slides}</p>`}#S(e){return this.slideCaptionsDisabled?null:u`<arcgis-presentation-captions .slide=${e} .transitionActive=${this.#e.transitionActive}></arcgis-presentation-captions>`}#f(){return this.#e.showLegend?u`<calcite-panel data-testid=presentation-legend class="legend-container" .heading=${this._messages.legend} closable @calcitePanelClose=${()=>this.#e.showLegend=!1}><arcgis-legend class="legend" .view=${this.view} @arcgisReady=${e=>e.stopPropagation()}></arcgis-legend></calcite-panel>`:null}#w(){return this._showSlideList?u`<arcgis-presentation-slide-list .slides=${this.#e.visibleSlides} .slideId=${this.#e.slideId} .label=${this._messages.slideList} .visualScale=${this.visualScale} @arcgisSlideListItemSelected=${this.#c} @arcgisSlideListOutsideClick=${this.#r}></arcgis-presentation-slide-list>`:null}};D("arcgis-presentation",C);return C},"core/accessorSupport/decorators","core/Accessor","core/Collection","core/promiseUtils","core/reactiveUtils","Graphic","layers/Layer","graphic/CSVGraphicOrigin","graphic/GeoJSONGraphicOrigin","graphic/SceneGraphicOrigin","graphic/WFSGraphicOrigin","graphic/BuildingGraphicOrigin","graphic/FeatureGraphicOrigin","applications/SceneViewer/sceneViewerUtils",a,c,d,e,f)
|
|
2
|
+
import{a as x}from"./CKZBNHMD.js";import{c as b}from"./JB6WQEFJ.js";import f from"./F4AJCUZ6.js";import"./WJQUE4DR.js";import e from"./OISNNHIG.js";import{a as B}from"./7465ANAR.js";import d from"./KRJCOTGC.js";import c from"./U7WRQCRV.js";import{a as R,f as z}from"./GIBXI44G.js";import"./RQT2PVDJ.js";import a from"./SBYVR52H.js";import"./LXME6MU5.js";import{R as E,X as w,_ as D,a as F,b as u,x as v,z as L}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{property:d,subclass:H},j,_,{ignoreAbortErrors:V},{watch:g,on:M,whenOnce:I},W,U,K,Q,q,J,X,Y,{fetchPopupFeaturesFromGraphics:k},,,,O])=>{var Z=F`:host{width:100%;height:100%;padding:var(--calcite-space-none);margin:var(--calcite-space-none);display:flex;--internal-attribution-height: 16px;--arcgis-internal-presentation-padding-start: unset;--arcgis-internal-presentation-padding-end: unset;--arcgis-internal-presentation-cover-padding-top: unset;--arcgis-internal-presentation-cover-padding-bottom: unset;--arcgis-internal-presentation-cover-padding-start: unset;--arcgis-internal-presentation-cover-padding-end: unset;--arcgis-presentation-navigation-z-index: unset}p{padding:0;margin:0}.root{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%}.presentation-content{position:absolute;display:flex;width:100%;height:100%;justify-content:flex-end;padding-top:var(--calcite-space-lg);padding-inline-start:calc(var(--calcite-space-lg) + var(--arcgis-internal-presentation-padding-start));padding-inline-end:calc(var(--calcite-space-lg) + var(--arcgis-internal-presentation-padding-end))}.navigation-container{display:flex;flex-direction:column;margin-inline-start:var(--calcite-space-lg);margin-block:auto calc(var(--calcite-space-lg) + var(--arcgis-internal-attribution-space-top));width:fit-content;height:100%;z-index:var(--arcgis-presentation-navigation-z-index)}.navigation{width:fit-content;display:flex;align-items:center;background-color:var(--calcite-color-surface-2);box-shadow:var(--arcgis-internal-box-shadow);pointer-events:auto}.navigation-slide-list-container{position:relative;height:100%;min-height:0;margin-block-start:var(--calcite-space-lg)}.slide-list-action-container{border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.slide-counter-text{display:flex;align-items:center;justify-content:center;gap:var(--calcite-space-base);font-size:var(--calcite-font-size-md)}.slide-counter-text-element{box-sizing:border-box;max-width:28px;margin:0;padding:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-variant-numeric:tabular-nums;min-width:var(--calcite-spacing-md);text-align:center}.legend-container{pointer-events:all;box-shadow:var(--calcite-shadow-sm);max-width:300px;height:fit-content;max-height:calc(100vh - 136px);overflow:hidden auto}.legend{background-color:var(--calcite-color-surface-2)}`,ee=Object.defineProperty,te=Object.getOwnPropertyDescriptor,o=(i,e,t,s)=>{for(var n=s>1?void 0:s?te(e,t):e,a=i.length-1,r;a>=0;a--)(r=i[a])&&(n=(s?r(e,t,n):r(n))||n);return s&&n&&ee(e,t,n),n},l=class extends j{constructor(i){super(i),this.transitionActive=!1,this.showLegend=!1,this._slideLegendDisabled=!1,this.keyboardNavigationEnabled=!1,this._subscribeToSlideEvents=e=>{this._unsubscribeToSlideEvents(e),e.forEach(t=>{let s=t.on("apply-slide-start",()=>this._onApplySlideStart(t)),n=t.on("apply-slide-complete",()=>this._onApplySlideComplete(t)),a=t.on("apply-slide-cancel",()=>this._onApplySlideCancel(t));this.addHandles(s,t.id),this.addHandles(n,t.id),this.addHandles(a,t.id)})},this._unsubscribeToSlideEvents=e=>{e.forEach(t=>{this.hasHandles(t.id)&&this.removeHandles(t.id)})}}initialize(){this.addHandles(g(()=>this.view?.map,(i,e)=>{if(this.hasHandles("sceneLoaded")&&this.removeHandles("sceneLoaded"),e){let t=e.presentation?.slides;t&&t.length>0&&this._unsubscribeToSlideEvents(t)}i&&this.addHandles(g(()=>i.loaded,t=>{t&&(this.removeHandles("sceneLoaded"),this._startWatchSlides(),this._slideId&&this._applySlideById(this._slideId))},{initial:!0}),"sceneLoaded")},{initial:!0}))}destroy(){this._unsubscribeToSlideEvents(this.slides)}get slideId(){return this._slideId}set slideId(i){i===void 0||!this.view?.map?.loaded?this._slideId=i:this._applySlideById(i)}get visibleSlides(){return this.view?.map?.presentation?.slides?.filter(i=>!i.hidden)??new _}get slides(){return this.view?.map?.presentation?.slides??new _}get lastSlideSelected(){return this.getSlideIndexBySlideId(this.slideId)===this.visibleSlides.length-1}get firstSlideSelected(){return this.getSlideIndexBySlideId(this.slideId)===0}get slideSelected(){return this.getSlideIndexBySlideId(this.slideId)>-1}get hasOnlyOneSlide(){return this.visibleSlides.length===1}get slideIndex(){return this.getSlideIndexBySlideId(this.slideId)}get slideLegendDisabled(){return this._slideLegendDisabled}set slideLegendDisabled(i){this._slideLegendDisabled=i,i&&(this.showLegend=!1)}getSlideIndexBySlideId(i){let e=-1;return i&&(e=this.visibleSlides.findIndex(t=>t.id===i)),e}navigateInPresentation(i){let e=this.slideIndex+i,t=this._getSlideBySlideIndex(e);t??=this._getSlideBySlideIndex(0),t&&this.applySlide(t)}captureArrowKeysForNavigation(i,e){let t=["ArrowLeft","ArrowRight","PageUp","PageDown"];if(document.activeElement?.nodeName.toLowerCase()==="arcgis-scene"||!t.includes(i.code))return;let s=e==="rtl"?"ArrowRight":"ArrowLeft",n=i.code===s||i.code==="PageUp"?-1:1;this.navigateInPresentation(n)}async setSliceAnalysisInteractive(i){if(!this.view?.analyses?.length)return;let e=this.view.analyses.find(s=>s.type==="slice"&&s.origin?.type==="web-scene");if(!e)return;let t=await this.view.whenAnalysisView(e);t&&(t.interactive=i)}getSlideBySlideId(i){return this.visibleSlides.find(e=>e.id===i)}async applySlide(i,e,t){if(this.view){let s=t?{signal:t?.signal}:{};await V(i.applyTo(this.view,{...s,animate:!e}))}}_getSlideBySlideIndex(i){if(i!=null&&i>=0&&i<this.visibleSlides.length)return this.visibleSlides.getItemAt(i)}async _applySlideById(i){let e=i?this.getSlideBySlideId(i):void 0;e&&await this.applySlide(e)}_startWatchSlides(){this._subscribeToSlideEvents(this.slides),this.addHandles(M(()=>this.slides,"change",i=>{this._subscribeToSlideEvents(new _(i.added)),this._unsubscribeToSlideEvents(new _(i.removed))},{onListenerAdd:this._subscribeToSlideEvents,onListenerRemove:this._unsubscribeToSlideEvents}))}_onApplySlideStart(i){this._slideId=i.id,this.transitionActive=!0,this.showLegend=!1,this.onApplySlideStart?.(i)}_onApplySlideComplete(i){this.transitionActive=!1,this._updateLegendDisplay(i),this.onApplySlideComplete?.(i)}_onApplySlideCancel(i){this.transitionActive=!1,this._updateLegendDisplay(i),this.onApplySlideCancel?.(i)}_updateLegendDisplay(i){this.showLegend=!this._slideLegendDisabled&&!!i.elements.legendInfo?.visible}};o([d()],l.prototype,"_slideId",2);o([d()],l.prototype,"view",2);o([d()],l.prototype,"slideId",1);o([d()],l.prototype,"transitionActive",2);o([d()],l.prototype,"showLegend",2);o([d()],l.prototype,"_slideLegendDisabled",2);o([d()],l.prototype,"keyboardNavigationEnabled",2);o([d()],l.prototype,"visibleSlides",1);o([d()],l.prototype,"slides",1);o([d()],l.prototype,"lastSlideSelected",1);o([d()],l.prototype,"firstSlideSelected",1);o([d()],l.prototype,"slideSelected",1);o([d()],l.prototype,"hasOnlyOneSlide",1);o([d()],l.prototype,"slideLegendDisabled",1);o([d()],l.prototype,"onApplySlideStart",2);o([d()],l.prototype,"onApplySlideComplete",2);o([d()],l.prototype,"onApplySlideCancel",2);o([d()],l.prototype,"getSlideIndexBySlideId",1);l=o([H("components.presentation.PresentationViewModel")],l);var $=class extends L{constructor(e){super(e)}hostLoaded(){this.component.manager.onLifecycle(()=>{let e=this.component;I(()=>e.referenceElement).then(t=>{this._isArcgisScene(t)&&(this._sceneRef=t)})})}openPopup(e){this.component.view&&this.component.slideId===e.id&&e.elements.popupInfo!=null&&this._preparePopupFeature(this.component.view,e.elements.popupInfo).then(({success:t,features:s,popupInfo:n})=>{this.component.slideId===e.id&&(t?this._handlePopupFeatureFound(e,s,n):this.component.arcgisPopupFeatureNotFound.emit({slide:e}))})}_isArcgisScene(e){return e===void 0||typeof e=="string"?!1:"tagName"in e&&e.tagName==="ARCGIS-SCENE"}closePopup(e){(!this.component.slidePopupDisabled||e)&&this._sceneRef?.closePopup()}async _handlePopupFeatureFound(e,t,s){let n=s?.location??void 0;this.component.arcgisPopupFeaturesRetrieved.emit({slide:e,features:t,location:n}),this.component.slidePopupDisabled||await this._sceneRef?.openPopup({features:t,location:n})}async _preparePopupFeature(e,t){let s=[];if(!t.features?.length||t.features.length===0)return{success:!1,features:s};let n=t.features?.getItemAt(t.selectedFeatureIndex)?.layerReference;if(n?.layerId==null)return{success:!1,features:s};let{layer:a,sublayer:r}=this._getLayersFromView(e,n.layerId,n?.sublayerId);if(!a)return{success:!1,features:s};let p=r??a;if(!p||!this._layerTypeSupportsCapturePopup(p))return{success:!1,features:s};if(s=await this._fetchFeaturesFromQueryable(e,t,a,r,p),s&&this._featureHasBeenFilledWithAttributes(s)){let c=s[0];return this._setFallbackPopupTemplate(c,r,a),this._setFallbackGeometry(c,t?.location),{success:!0,features:s,popupInfo:t}}return{success:!1,features:s}}_getLayersFromView(e,t,s){let n=e.map?.findLayerById(t)??void 0,a=this._getBuildingSceneLayerSublayer(n,s);return{layer:n,sublayer:a}}_getBuildingSceneLayerSublayer(e,t){let s;return e&&this._isLayer(e)&&this._isBuildingSceneLayer(e)&&t!=null&&(s=e.allSublayers.find(n=>n.id===t&&n.type==="building-component")),s}_featureHasBeenFilledWithAttributes(e){return e&&e.length>0&&e[0].attributes&&Object.entries(e[0].attributes)?.length>1}async _fetchFeaturesFromQueryable(e,t,s,n,a){let r=t.features?.getItemAt(t.selectedFeatureIndex);if(r?.id==null)return await Promise.resolve([]);let p=await e.whenLayerView(s);await I(()=>!p.updating);let c=this._tryGetBuildingComponentSublayerView(s,n,p)??p;await I(()=>!c.updating);let h=this._createFeatureGraphic(s,n,a,r.id),y=await k(c,[h]);return this._featureHasBeenFilledWithAttributes(y)||(await I(()=>!e.updating),y=await k(c,[h])),y}_tryGetBuildingComponentSublayerView(e,t,s){let n;return this._isLayer(e)&&this._isBuildingSceneLayer(e)&&t!=null&&(n=s.sublayerViews.find(a=>a.sublayer.id===t.id)),n}_setFallbackPopupTemplate(e,t,s){e.popupTemplate==null&&(e.popupTemplate=t?.popupTemplate?t.popupTemplate:s.popupTemplate)}_setFallbackGeometry(e,t){e.geometry==null&&t&&(e.geometry=t.clone())}_createFeatureGraphic(e,t,s,n){let a=this._getGlobalIdFieldNameFromLayer(s),r=n.type==="global-id"&&a?a:s.objectIdField,p=this._getGraphicOrigin(e,t),c=new W({attributes:{},layer:e,origin:p});return c.attributes[r]=n.value,c}_getGraphicOrigin(e,t){switch(e.type){case"csv":return new K(e);case"feature":return new Y(e);case"geojson":return new Q(e);case"scene":return new q(e);case"wfs":return new J(e);case"building-scene":return t?new X(t):void 0;default:return}}_layerTypeSupportsCapturePopup(e){return e!=null&&["csv","feature","geojson","wfs","scene","building-component"].includes(e.type)}_isLayer(e){return!!e&&e instanceof U}_isBuildingSceneLayer(e){return e?.type==="building-scene"}_getGlobalIdFieldNameFromLayer(e){return e.fields?.find(t=>t.type==="global-id")?.name}},ie=i=>new $(i),m=Object.freeze({width:0,height:0}),f=new WeakMap,S=()=>({topCenter:{...m},topLeft:{...m},topRight:{...m},bottomCenter:{...m},bottomLeft:{...m},bottomRight:{...m}}),T=i=>({topCenter:{...i.topCenter},topLeft:{...i.topLeft},topRight:{...i.topRight},bottomCenter:{...i.bottomCenter},bottomLeft:{...i.bottomLeft},bottomRight:{...i.bottomRight}}),N=i=>{let e=f.get(i);return e||(e={observedGroups:new Map,observedSizes:S(),subscribers:new Set},f.set(i,e)),e},se=i=>{let e=i?.topCenter.value,t=i?.topLeft.value,s=i?.topRight.value,n=i?.bottomCenter.value,a=i?.bottomLeft.value,r=i?.bottomRight.value;return e&&t&&s&&n&&a&&r?{topCenter:e,topLeft:t,topRight:s,bottomCenter:n,bottomLeft:a,bottomRight:r}:null},ne=(i,e)=>b.every(t=>i.get(t)===e[t]),ae=i=>{let e=T(i.observedSizes);i.subscribers.forEach(t=>t(e))},re=(i,e)=>{let t=f.get(i);if(!t)return;let s=!1;e.forEach(n=>{let a=b.find(y=>t.observedGroups.get(y)===n.target);if(!a)return;let{width:r,height:p}=n.contentRect,c={width:r,height:p},h=t.observedSizes[a];h.width===c.width&&h.height===c.height||(t.observedSizes[a]=c,s=!0)}),s&&ae(t)},A=(i,e)=>{let t=N(i);t.resizeObserver||(t.resizeObserver=new ResizeObserver(n=>{re(i,n)}));let s=se(e);if(!s){t.observedGroups.size>0&&(t.resizeObserver.disconnect(),t.observedGroups.clear());return}ne(t.observedGroups,s)||(t.resizeObserver.disconnect(),t.observedGroups.clear(),b.forEach(n=>{let a=s[n];t.observedGroups.set(n,a),t.resizeObserver?.observe(a)}))},le=(i,e)=>{let t=N(i);return t.subscribers.add(e),e(T(t.observedSizes)),()=>{let s=f.get(i);s&&(s.subscribers.delete(e),s.subscribers.size===0&&(s.resizeObserver?.disconnect(),s.observedGroups.clear(),f.delete(i)))}},P=class extends L{#e;#t;#i;constructor(e){super(e),this.exports=S()}hostDisconnected(){this.#i?.(),this.#i=void 0,this.#t=void 0,this.#e=void 0,this.exports=S()}hostLifecycle(){return[g(()=>this.#s(),e=>{if(this.#t!==e){if(this.#i?.(),this.#i=void 0,this.#t=e,this.#e=e?.slotGroupRefs,!e){this.exports=S();return}this.#i=le(e,t=>{this.#n(t)||(this.exports=t)}),A(e,this.#e)}},{sync:!0,initial:!0}),g(()=>this.#s()?.slotGroupRefs,e=>{this.#e=e,this.#t&&e&&A(this.#t,e)},{sync:!0,initial:!0})]}#s(){let{referenceElement:e}=this.component;return e&&typeof e!="string"?e:void 0}hostUpdated(){!this.#t||!this.#e||A(this.#t,this.#e)}#n(e){let t=this.exports??S();return b.every(s=>{let n=t[s],a=e[s];return n.width===a.width&&n.height===a.height})}},oe=R(P),de=O(l),C=class extends E{constructor(){super(...arguments),this._messages=B(),this._direction=z(),this.#e=de(this),this.#i=e=>{this.#e.captureArrowKeysForNavigation(e,this._direction)},this.#s=ie(this),this.#a=null,this.#l=e=>{this.#s.closePopup(),this.arcgisSlideApplyStart.emit({slide:e})},this.#o=e=>{this.#s.openPopup(e),this.sliceAnalysisInteractive&&this.#e.setSliceAnalysisInteractive(!0),this.arcgisSlideApplyComplete.emit({slide:e})},this.#d=e=>{this.sliceAnalysisInteractive&&this.#e.setSliceAnalysisInteractive(!0),this.arcgisSlideApplyCancel.emit({slide:e})},this.#c=e=>{let t=e.detail?.selectedSlide;if(!t)return;this.#n?.abort();let s=new AbortController;this.#n=s;let n=Date.now(),a=this.#a!==null&&n-this.#a<300;if(this.#a=n,this.#e.applySlide(t,a,s),a){this._showSlideList=!1;return}setTimeout(()=>{s.signal.aborted||(this._showSlideList=!1,this.#e.applySlide(t,!1,s))},300)},this.#r=()=>{this._showSlideList=!1},this._showSlideList=!1,this.autoDestroyDisabled=!1,this.view=this.#e.view,this.visualScale="m",this.keyboardNavigationEnabled=!1,this.slidePopupDisabled=!1,this.slideCaptionsDisabled=!1,this.slideLegendDisabled=this.#e.slideLegendDisabled,this.sliceAnalysisInteractive=!1,this.navigationHidden=!1,this.arcgisPopupFeatureNotFound=v(),this.arcgisPopupFeaturesRetrieved=v(),this.arcgisReady=v(),this.arcgisSlideApplyCancel=v(),this.arcgisSlideApplyComplete=v(),this.arcgisSlideApplyStart=v()}static{this.properties={_slotSizesController:16,_showSlideList:16,slideId:1,autoDestroyDisabled:5,view:0,visualScale:1,keyboardNavigationEnabled:5,slidePopupDisabled:5,slideCaptionsDisabled:5,slideLegendDisabled:5,sliceAnalysisInteractive:5,navigationHidden:5}}static{this.styles=Z}#e;#t;#i;#s;#n;#a;#l;#o;#d;#c;#r;#h;#p;get slideId(){return this.#e.slideId}set slideId(e){this.#e.slideId=e}async destroy(){await this.manager.destroy()}loaded(){this.#e.onApplySlideStart=this.#l,this.#e.onApplySlideComplete=this.#o,this.#e.onApplySlideCancel=this.#d,this.#m();let e=this;this.manager.onLifecycle(()=>[g(()=>this.sliceAnalysisInteractive,t=>{this.#e.setSliceAnalysisInteractive(t)},{initial:!0}),g(()=>e.referenceElement,t=>{this.#u(t)&&(this._slotSizesController=oe(this),this.#p=this.#g())},{once:!0,initial:!0}),{remove:()=>{document.removeEventListener("keydown",this.#i),this.#h?.removeEventListener("arcgisSlideListClose",this.#r),this.#t?.remove(),this.#p?.remove(),this.#n?.abort()}}])}#u(e){return e===void 0||typeof e=="string"?!1:"tagName"in e&&e.tagName==="ARCGIS-SCENE"}#g(){return g(()=>this._slotSizesController,e=>this.#v(e?.topLeft,e?.topRight,e?.bottomLeft,e?.bottomRight),{initial:!0})}#v(e,t,s,n){let a=this._direction==="ltr"?e?.width??0:t?.width??0,r=this._direction==="ltr"?t?.width??0:e?.width??0,p=Math.max(e?.height??0,t?.height??0),c=Math.max(s?.height??0,n?.height??0);a>0?this.el.style.setProperty("--arcgis-internal-presentation-padding-start",`calc(var(--calcite-space-lg) + ${a.toString()}px)`):this.el.style.setProperty("--arcgis-internal-presentation-padding-start","0px"),r>0?this.el.style.setProperty("--arcgis-internal-presentation-padding-end",`calc(var(--calcite-space-lg) + ${r.toString()}px)`):this.el.style.setProperty("--arcgis-internal-presentation-padding-end","0px");let h=a<=Math.max(p,c)&&r<=Math.max(p,c);this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-top",h?"0":`${p}px`),this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-bottom",h?"0":`${c}px`),this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-start",h?`${a}px`:"0"),this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-end",h?`${r}px`:"0")}#m(){this.#t=g(()=>this.keyboardNavigationEnabled,e=>{document.removeEventListener("keydown",this.#i),e&&document.addEventListener("keydown",this.#i)},{initial:!0})}render(){if(this.#e?.visibleSlides?.length===0)return u`<div></div>`;let e=this.#e.visibleSlides.find(a=>a.id===this.slideId),t=this.#y(),s=this.#S(e),n=this.#f();return u`<div class="root"><div class="presentation-content">${s}${n}</div>${t}</div>`}#y(){if(this.navigationHidden)return null;let e=this.#e.lastSlideSelected&&!this.#e.hasOnlyOneSlide,t=this.#w();return u`<div class="navigation-container"><div class="navigation-slide-list-container">${t}</div><div class="navigation"><div class="slide-list-action-container" id=${x}><calcite-action-bar expand-toggle-disabled layout=horizontal .scale=${this.visualScale==="l"?"m":"s"}><calcite-action .text=${this._messages.slideList??""} selection-appearance=highlight icon=list .scale=${this.visualScale==="l"?"m":"s"} .label=${this._messages.slideList} .active=${this._showSlideList} @click=${()=>this._showSlideList=!this._showSlideList}></calcite-action></calcite-action-bar><calcite-tooltip .referenceElement=${x} placement=bottom><span>${this._messages.slideList}</span></calcite-tooltip></div><calcite-button appearance=transparent icon-start=chevron-left icon-flip-rtl=start kind=neutral .scale=${this.visualScale} .disabled=${this.#e.firstSlideSelected||!this.#e.slideSelected} .label=${this._messages.previous} title=${this._messages.previous??w} @click=${()=>this.#e.navigateInPresentation(-1)}></calcite-button><div class="slide-counter-text">${this.#b()}</div><calcite-button appearance=transparent icon-start=${e?"reset":"chevron-right"} icon-flip-rtl=start kind=neutral .scale=${this.visualScale} .label=${e?this._messages.restart:this._messages.next} title=${(e?this._messages.restart:this._messages.next)??w} @click=${()=>this.#e.navigateInPresentation(1)}></calcite-button></div></div>`}#b(){let e=this.#e.slideIndex+1,t=this._messages?.slideNavAriaText?.replace("${index}",e.toString()).replace("${numberOfSlides}",this.#e.visibleSlides.length.toString());return this.#e.slideSelected?u`<p role=banner aria-label=${t??w} aria-live=polite><div class="slide-counter-text-element" data-testId=arcgis-map-presentation-slideIndex>${e}</div><div>/</div><p class="slide-counter-text-element" data-testId=arcgis-map-presentation-numberOfSlides>${this.#e.visibleSlides.length}</p></p>`:u`<p role=banner data-testId=arcgis-map-presentation-numberOfSlides>${this.#e.visibleSlides?.length} ${this._messages?.slides}</p>`}#S(e){return this.slideCaptionsDisabled?null:u`<arcgis-presentation-captions .slide=${e} .transitionActive=${this.#e.transitionActive}></arcgis-presentation-captions>`}#f(){return this.#e.showLegend?u`<calcite-panel data-testid=presentation-legend class="legend-container" .heading=${this._messages.legend} closable @calcitePanelClose=${()=>this.#e.showLegend=!1}><arcgis-legend class="legend" .view=${this.view} @arcgisReady=${e=>e.stopPropagation()}></arcgis-legend></calcite-panel>`:null}#w(){return this._showSlideList?u`<arcgis-presentation-slide-list .slides=${this.#e.visibleSlides} .slideId=${this.#e.slideId} .label=${this._messages.slideList} .visualScale=${this.visualScale} @arcgisSlideListItemSelected=${this.#c} @arcgisSlideListOutsideClick=${this.#r}></arcgis-presentation-slide-list>`:null}};D("arcgis-presentation",C);return C},"core/accessorSupport/decorators","core/Accessor","core/Collection","core/promiseUtils","core/reactiveUtils","Graphic","layers/Layer","graphic/CSVGraphicOrigin","graphic/GeoJSONGraphicOrigin","graphic/SceneGraphicOrigin","graphic/WFSGraphicOrigin","graphic/BuildingGraphicOrigin","graphic/FeatureGraphicOrigin","applications/SceneViewer/sceneViewerUtils",a,c,d,e,f)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{Y as i}from"./
|
|
2
|
+
import{Y as i}from"./CTVCZ2FU.js";import"./TAVTDQ6S.js";var t=class extends i{setupDefaultRules(){super.setupDefaultRules(),this.rule("Component").setAll({interpolationDuration:600}),this.rule("Hierarchy").set("animationDuration",600),this.rule("Scrollbar").set("animationDuration",600),this.rule("Tooltip").set("animationDuration",300),this.rule("MapChart").set("animationDuration",1e3),this.rule("MapChart").set("wheelDuration",300),this.rule("Entity").setAll({stateAnimationDuration:600}),this.rule("Sprite").states.create("default",{stateAnimationDuration:600}),this.rule("Tooltip",["axis"]).setAll({animationDuration:200}),this.rule("WordCloud").set("animationDuration",500),this.rule("Polygon").set("animationDuration",600),this.rule("ArcDiagram").set("animationDuration",600)}};var n=t;export{n as default};
|