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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/dist/cdn/{IULGMTSK.js → 3GY55TR6.js} +1 -1
  2. package/dist/cdn/{JJTM5KZ2.js → 5EGS3PEJ.js} +1 -1
  3. package/dist/cdn/{GO5BD6QL.js → 5FJIKNID.js} +1 -1
  4. package/dist/cdn/{UVHZXCAN.js → 6E7H5LPA.js} +2 -2
  5. package/dist/cdn/{HKNVYHER.js → 6XPVHLWQ.js} +1 -1
  6. package/dist/cdn/6ZLSCYL5.js +2 -0
  7. package/dist/cdn/{G7SRL7WF.js → 76RS6RKB.js} +1 -1
  8. package/dist/cdn/{5C33IP7B.js → A2QPYUE5.js} +1 -1
  9. package/dist/cdn/{FHVFIK44.js → CC77IOI3.js} +1 -1
  10. package/dist/cdn/CYSDIJ4L.js +2 -0
  11. package/dist/cdn/EHPHVZAX.js +2 -0
  12. package/dist/cdn/{YGC6EPZT.js → EJ3K6UKQ.js} +1 -1
  13. package/dist/cdn/{PFQ5U7SF.js → ET2U2ZGP.js} +1 -1
  14. package/dist/cdn/{DCRCFVBU.js → F2SNWNAZ.js} +1 -1
  15. package/dist/cdn/FF5VMKLK.js +2 -0
  16. package/dist/cdn/{IPIYZVAJ.js → FWXI6DGS.js} +1 -1
  17. package/dist/cdn/{SSMJJQ7K.js → HRPEPALP.js} +1 -1
  18. package/dist/cdn/I6PZUSTS.js +2 -0
  19. package/dist/cdn/{2IFKJHFD.js → JFNCIZRD.js} +1 -1
  20. package/dist/cdn/{QEDQOBD7.js → JVFREF7G.js} +2 -2
  21. package/dist/cdn/{SZSOX5MA.js → KWZTLNUH.js} +1 -1
  22. package/dist/cdn/{YQWTCTTH.js → LY77GAJT.js} +1 -1
  23. package/dist/cdn/LYUX5DD5.js +2 -0
  24. package/dist/cdn/{UNDBLG66.js → OCGWSO54.js} +1 -1
  25. package/dist/cdn/ODQ4JQEF.js +2 -0
  26. package/dist/cdn/{NBBZRGXH.js → OH3I63ZU.js} +1 -1
  27. package/dist/cdn/{JWJHIBYW.js → P2ABZVPJ.js} +1 -1
  28. package/dist/cdn/PNGKWZJQ.js +2 -0
  29. package/dist/cdn/{XSEIJTVD.js → R42WEZRB.js} +1 -1
  30. package/dist/cdn/{KFG6ZJAZ.js → REQFNQZY.js} +1 -1
  31. package/dist/cdn/{WG4E5DBM.js → RH62B2NE.js} +1 -1
  32. package/dist/cdn/{L3AVJM22.js → T5MRUYOH.js} +1 -1
  33. package/dist/cdn/TBWM3VXL.js +2 -0
  34. package/dist/cdn/{6OLWNBTA.js → UMPYIYP6.js} +1 -1
  35. package/dist/cdn/{ANRWXBWL.js → VEYOGGAN.js} +1 -1
  36. package/dist/cdn/{Q5Y3DHAC.js → W27U4A3P.js} +1 -1
  37. package/dist/cdn/XPZYTUFI.js +2 -0
  38. package/dist/cdn/{DLB6EEQE.js → YET5HTLQ.js} +1 -1
  39. package/dist/cdn/{3SNOI43K.js → YSJ2M36J.js} +1 -1
  40. package/dist/cdn/YXUK3MCB.js +2 -0
  41. package/dist/cdn/index.js +1 -1
  42. package/dist/chunks/layer-utils.js +17 -13
  43. package/dist/chunks/useArcgisViewReadyError.js +6 -6
  44. package/dist/components/arcgis-editor/customElement.d.ts +36 -2
  45. package/dist/components/arcgis-editor/customElement.js +22 -13
  46. package/dist/components/arcgis-feature-table/customElement.js +1 -1
  47. package/dist/components/arcgis-feature-utility-network-association-list/customElement.js +14 -13
  48. package/dist/components/arcgis-feature-utility-network-associations/customElement.js +80 -86
  49. package/dist/components/arcgis-utility-network-aggregated-geometry/customElement.js +1 -1
  50. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +37 -28
  51. package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +37 -37
  52. package/dist/components/arcgis-utility-network-trace-location/customElement.js +1 -1
  53. package/dist/components/arcgis-utility-network-trace-results/customElement.js +26 -25
  54. package/dist/components/arcgis-version-management-version-list/customElement.js +1 -1
  55. package/dist/docs/api.json +1 -1
  56. package/dist/docs/docs.json +1 -1
  57. package/dist/docs/vscode.html-custom-data.json +1 -1
  58. package/dist/docs/web-types.json +1 -1
  59. package/dist/loader.js +1 -1
  60. package/package.json +5 -5
  61. package/dist/cdn/2EXP26TA.js +0 -2
  62. package/dist/cdn/6JYHNX2S.js +0 -2
  63. package/dist/cdn/AHCYJUL7.js +0 -2
  64. package/dist/cdn/BE4GRNQV.js +0 -2
  65. package/dist/cdn/CAXI6CJY.js +0 -2
  66. package/dist/cdn/ELTHY6FL.js +0 -2
  67. package/dist/cdn/MFIMBD2E.js +0 -2
  68. package/dist/cdn/NXQA6DOA.js +0 -2
  69. package/dist/cdn/OGE4JCW6.js +0 -2
  70. package/dist/cdn/R4FIN5ZR.js +0 -2
  71. package/dist/cdn/T34SPRV3.js +0 -2
  72. /package/dist/cdn/{BILSW27K.js → 2HXYJZSB.js} +0 -0
  73. /package/dist/cdn/{5VWD7SPW.js → 37GJW6KT.js} +0 -0
  74. /package/dist/cdn/{VIEEGP7G.js → 4IM2FY5W.js} +0 -0
  75. /package/dist/cdn/{OIJPQ63Z.js → 4MDRPZTG.js} +0 -0
  76. /package/dist/cdn/{ZYZA5VUV.js → 4STAROOM.js} +0 -0
  77. /package/dist/cdn/{YJPCWIX2.js → 5IMWXYL2.js} +0 -0
  78. /package/dist/cdn/{O5S54F3U.js → 5TXE67XV.js} +0 -0
  79. /package/dist/cdn/{E6GYGJ2B.js → BBQPUWRO.js} +0 -0
  80. /package/dist/cdn/{EG3W3ADI.js → BND2TJBO.js} +0 -0
  81. /package/dist/cdn/{WRS3F55Q.js → CJOHGWK6.js} +0 -0
  82. /package/dist/cdn/{6TB2XH3T.js → D5WXOOS3.js} +0 -0
  83. /package/dist/cdn/{UX5YG5TO.js → DMDCKD5U.js} +0 -0
  84. /package/dist/cdn/{PILEMW25.js → DQH27QCF.js} +0 -0
  85. /package/dist/cdn/{HX6XVMJE.js → EP252O27.js} +0 -0
  86. /package/dist/cdn/{H4WIQKA4.js → EVHNFE5I.js} +0 -0
  87. /package/dist/cdn/{T3ZFKRCS.js → EW6V3NZI.js} +0 -0
  88. /package/dist/cdn/{6PWTVRJ6.js → F6BQWE5I.js} +0 -0
  89. /package/dist/cdn/{ULYGZ4D2.js → FLLSBLLE.js} +0 -0
  90. /package/dist/cdn/{PWPTFBHS.js → FQZXILRT.js} +0 -0
  91. /package/dist/cdn/{6ZCH5OTT.js → GHY23IXW.js} +0 -0
  92. /package/dist/cdn/{QY7A4VMP.js → GIGQIUF5.js} +0 -0
  93. /package/dist/cdn/{GPESYF4D.js → GS75FRUR.js} +0 -0
  94. /package/dist/cdn/{6W3OENEK.js → HGAJ2IEN.js} +0 -0
  95. /package/dist/cdn/{YGVSJT3E.js → JKVKP7AW.js} +0 -0
  96. /package/dist/cdn/{7C22TPME.js → JU3BLGXG.js} +0 -0
  97. /package/dist/cdn/{MR5AEEII.js → L4TA63M6.js} +0 -0
  98. /package/dist/cdn/{BUILQQ6S.js → LQVZVGY4.js} +0 -0
  99. /package/dist/cdn/{SPSJMCAO.js → MM4KQLRF.js} +0 -0
  100. /package/dist/cdn/{4S2JKX63.js → Q3GALNWS.js} +0 -0
  101. /package/dist/cdn/{BLSJEYOH.js → QM34BSKE.js} +0 -0
  102. /package/dist/cdn/{QSOU6NQA.js → QTWRDNXX.js} +0 -0
  103. /package/dist/cdn/{FVTX4GNH.js → TC3Q2QUA.js} +0 -0
  104. /package/dist/cdn/{WTUUS552.js → TEFALOII.js} +0 -0
  105. /package/dist/cdn/{2HJ7EGEB.js → TP5VEU3D.js} +0 -0
  106. /package/dist/cdn/{3LKCMCHN.js → U35ISUWJ.js} +0 -0
  107. /package/dist/cdn/{FWV2SQE2.js → UUC3DBCQ.js} +0 -0
  108. /package/dist/cdn/{ZLOQIB7A.js → UVMLKDJA.js} +0 -0
  109. /package/dist/cdn/{BEDLAEXK.js → V7DG2KF6.js} +0 -0
  110. /package/dist/cdn/{TKVE7ETK.js → WHDMC5HB.js} +0 -0
  111. /package/dist/cdn/{GPGC63RW.js → XEXCDGSR.js} +0 -0
  112. /package/dist/cdn/{BVFH7ZG4.js → XJXQC6HM.js} +0 -0
  113. /package/dist/cdn/{GT5SWKXT.js → YZSLMAVX.js} +0 -0
  114. /package/dist/cdn/{ZX5YTFYB.js → ZUPEVR3P.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import i from"./2IFKJHFD.js";import h from"./DLB6EEQE.js";import"./CAXI6CJY.js";import{a as C}from"./J6UG5EF7.js";import g from"./5MHPKAFK.js";import"./PC4PAQXQ.js";import"./TFUFDVQ6.js";import f from"./5CJ44XUV.js";import{a as D}from"./SVVJHTPA.js";import e from"./3JMJAUSY.js";import d from"./RO4TU5R3.js";import{g as V}from"./55IJQTCC.js";import"./7DOI3267.js";import a from"./O5TDDX7K.js";import{b}from"./EHZW6UXL.js";import{M as w,N as v,O as I,P as F,R as c,S as T,U as k,a as x,b as n,x as _}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([j,{substitute:h,formatNumber:$},{watch:u},{stripHTML:A},L,{renderingSanitizer:P},{initializeProjection:K},,,,N,,{d:E},{a:O,d:B,e:R}])=>{var G=x`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-item-header-border-block-end: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty){padding:var(--arcgis-internal-padding-md, var(--calcite-spacing-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-spacing-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-spacing-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-spacing-xxs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-spacing-lg);width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.action-image{flex:0 0 var(--calcite-spacing-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.header{border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.content-feature{--calcite-flow-item-footer-padding: 0}.feature-menu-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.action-exit{transform:scaleX(-1)}`;function W(d){switch(d?.type){case"point":return d;case"extent":return d.center;case"polygon":return d.centroid;case"multipoint":case"polyline":return d.extent?.center;default:return null}}var M=O.clone();function X(d){return d?.declaredClass.startsWith("esri.layers.")??!1}var J=N(j),y=class extends I{constructor(){super(...arguments),this._fetchFeaturesController=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this.viewModel.featurePage!=null&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._featureMenuIntersectionObserverNode=null,this._rootFlowItemNode=w(),this._featureMenuViewportNode=w(),this._actionBarMenuNode=w(),this._flowContainerNode=w(),this.messages=D(),this._selectedFeatureComponent=w(),this._cancelOpenRelatedFeature=()=>{let{_openRelatedFeatureAbortController:e}=this;e&&e.abort(),this._openRelatedFeatureAbortController=null},this._openRelatedFeatureAbortController=null,this.flowItems=new L,this.viewModel=J(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.autoDestroyDisabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=this.viewModel.featureMenuOpen,this.featureMenuTitle=this.viewModel.featureMenuTitle,this.featureNavigationTop=!1,this.features=this.viewModel.features,this.featuresPerPage=this.viewModel.featuresPerPage,this.featureViewModelAbilities=this.viewModel.featureViewModelAbilities,this.goToOverride=this.viewModel.goToOverride,this.headerActions=new L,this.heading=this.viewModel.title,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSpinner=!1,this.hideContent=!1,this.hideExpressionContent=!1,this.hideLastEditedInfo=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.map=this.viewModel.map,this.open=this.viewModel.visible,this.promises=this.viewModel.promises,this.responsiveActionsEnabled=!1,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.showCollapseButton=!1,this.spatialReference=this.viewModel.spatialReference,this.state=this.viewModel.state,this.timeZone=this.viewModel.timeZone,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=V()("active","collapsed","featureCount","featureMenuOpen","features","promises","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=_(),this.arcgisClose=_(),this.arcgisTriggerAction=_()}static{this.properties={_openRelatedFeatureAbortController:16,flowItems:16,_hideActionText:16,_featureNavigationVisible:16,_isCollapsed:16,_collapseEnabled:16,viewModel:0,actions:0,active:0,autoDestroyDisabled:5,collapsed:5,content:1,defaultPopupTemplateEnabled:5,featureCount:9,featureMenuOpen:5,featureMenuTitle:1,featureNavigationTop:5,features:0,featuresPerPage:9,featureViewModelAbilities:0,goToOverride:0,headerActions:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSpinner:5,hideContent:5,chartAnimationDisabled:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,hideRelationshipContent:5,hideTextContent:5,hideUtilityNetworkContent:5,hideLastEditedInfo:5,highlightDisabled:5,icon:1,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,map:0,messageOverrides:0,open:5,referenceElement:1,promises:0,responsiveActionsEnabled:5,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,showCollapseButton:5,spatialReference:0,state:32,timeZone:1,updateLocationEnabled:5,view:0}}static{this.styles=G}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;let e=this.viewModel.view?.widthBreakpoint;return e==="xsmall"||e==="small"||e==="medium"}get _featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.viewModel.selectedFeature&&!this.hideFeatureNavigation}get _isCollapsed(){return this._collapseEnabled&&this.collapsed}get _collapseEnabled(){return this.showCollapseButton&&(this.initialDisplayMode==="list"||!!(this.heading||this.viewModel.selectedFeatureViewModel?.title)&&!!(this.content||this.viewModel.selectedFeatureViewModel?.content))}get chartAnimationDisabled(){return!(this.viewModel.featureViewModelAbilities?.chartAnimation??!0)}set chartAnimationDisabled(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.chartAnimation=!e}get hideAttachmentsContent(){return!(this.viewModel.featureViewModelAbilities?.attachmentsContent??!0)}set hideAttachmentsContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.attachmentsContent=!e}get hideCustomContent(){return!(this.viewModel.featureViewModelAbilities?.customContent??!0)}set hideCustomContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.customContent=!e}get hideFieldsContent(){return!(this.viewModel.featureViewModelAbilities?.fieldsContent??!0)}set hideFieldsContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.fieldsContent=!e}get hideMediaContent(){return!(this.viewModel.featureViewModelAbilities?.mediaContent??!0)}set hideMediaContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.mediaContent=!e}get hideRelationshipContent(){return!(this.viewModel.featureViewModelAbilities?.relationshipContent??!0)}set hideRelationshipContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.relationshipContent=!e}get hideTextContent(){return!(this.viewModel.featureViewModelAbilities?.textContent??!0)}set hideTextContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.textContent=!e}get hideUtilityNetworkContent(){return!(this.viewModel.featureViewModelAbilities?.utilityNetworkAssociationsContent??!0)}set hideUtilityNetworkContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.utilityNetworkAssociationsContent=!e}get selectedDrillInFeature(){let e=Array.from(this.flowItems).at(-1);return e&&"graphic"in e?e.graphic??null:null}get selectedFeatureComponent(){return this._selectedFeatureComponent.value??null}async clear(){return this.viewModel.clear()}async close(){this.open=!1}async destroy(){await this.manager.destroy(),await this._destroySpinner(this.referenceElement),this._cancelOpenRelatedFeature(),this._removeFlowItems(),this._unobserveFeatureMenuObserver(),this._cancelFetchingFeatures(),this._featureMenuIntersectionObserver?.disconnect()}async fetchFeatures(e,t){this._cancelFetchingFeatures();let i=new AbortController,{signal:a}=i;if(this._fetchFeaturesController=i,!e&&this.view&&this.location&&(await K(this.location.spatialReference,this.view.spatialReference,null,{signal:a}),e=this.view.toScreen(this.location)??void 0),!e)return;let s=await this.viewModel.fetchFeatures(e,{signal:a,...t});this.location=s.location,this.promises=s.pendingFeatures}async next(){return this.viewModel.next()}async previous(){return this.viewModel.previous()}async setFocus(){this._flowContainerNode.value?.setFocus()}async triggerAction(e){if(!e.disabled)return e?.type==="toggle"&&(e.value=!e.value),await R(e,this.viewModel)}loaded(){this.manager.onLifecycle(()=>[u(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),u(()=>this.viewModel?.view,()=>this._viewChange()),u(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),u(()=>this.selectedFeatureComponent?.viewModel,()=>this._removeFlowItems()),u(()=>this.viewModel?.featureViewModels,()=>this._featureMenuViewportScrollTop()),u(()=>[this.flowItems?.length,this.featureMenuOpen],()=>{this.setFocus()}),u(()=>this.referenceElement,(e,t)=>{this._destroySpinner(t),this._createSpinner()},{initial:!0}),u(()=>[this.hideSpinner,this.viewModel?.view,this.viewModel?.location,this.viewModel?.waitingForResult,this.viewModel?.view],()=>void this._createSpinner(),{initial:!0})])}_cancelFetchingFeatures(){this._fetchFeaturesController?.abort(),this._fetchFeaturesController=null}_handleClose(){this.close(),this.arcgisClose.emit()}_groupResultsByLayer(){let{featureViewModels:e}=this.viewModel,t=new Map;return e.forEach(i=>{let a=i?.graphic;if(!a)return;let s=E(a),o=X(s)?s:null,l=t.get(o)??[];t.set(o,[...l,i])}),t}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(e){this._cancelOpenRelatedFeature();let t=new AbortController;this._openRelatedFeatureAbortController=t,await e.updateGeometry();let i=e.graphic,a=i?.geometry;if(a==null||i==null)return;this._removeFlowItems(),await this.viewModel.zoomTo({target:a});let s=W(a);s!=null&&(this.location=s),this.features=[i],this.open=!0,await this.setFocus(),this._openRelatedFeatureAbortController===t&&(this._openRelatedFeatureAbortController=null)}_handlePaginationMenuButton(){this._updateFeatureMenu()}_openFeatureMenu(){this._updateFeatureMenu(!0)}_closeFeatureMenu(){this._updateFeatureMenu(!1)}_updateFeatureMenu(e=!this.featureMenuOpen){this.featureMenuOpen=e}_previousFeature(){this.viewModel.previous()}_nextFeature(){this.viewModel.next()}_handleFeatureBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this.featureMenuOpen&&this._closeFeatureMenu()}_setActiveFeature(e){let{viewModel:t}=this;t.activeFeature=t.features?.[e]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_selectFeature(e){this.viewModel.selectedFeatureIndex=e,this.initialDisplayMode==="feature"?this._handleFeatureMenuBack():this.setFocus()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),e&&this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_getActionTitle(e){let{messages:t,selectedFeature:i}=this,{id:a}=e,s=i?.attributes,o=e.title??"",l=a==="zoom-to-feature"?h(o,{messages:t}):a==="remove-selected-feature"?h(o,{messages:t}):a==="zoom-to-clustered-features"?h(o,{messages:t}):a==="browse-clustered-features"?h(o,{messages:t}):e.title;return l&&s?h(l,s):l??""}_onMainKeydown(e){let{key:t}=e;t==="ArrowLeft"&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.previous(),this.setFocus()),t==="ArrowRight"&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.next(),this.setFocus())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode&&this._featureMenuViewportNode.value?.scrollContentTo({top:0})}_selectedFeatureIndexUpdated(e,t){let{featureCount:i,waitingForResult:a}=this.viewModel;a||!i||e===t||e===-1||(this._removeFlowItems(),this._rootFlowItemNode.value?.scrollContentTo({top:0}))}_triggerAction(e){this.triggerAction(e),this.arcgisTriggerAction.emit({action:e})}_viewChange(){this.viewModel.clear(),this.open=!1}_closeOpenActionMenu(){let{_actionBarMenuNode:e}=this;e.value&&(e.value.menuOpen=!1)}_removeFlowItems(){this.flowItems?.destroyAll()}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":case"feature-utility-network-association-type":return e.description;case"feature-relationship":return e.allItemsDescription}}_handleDrillInBackClick(){this.flowItems?.pop()?.destroy()}_getHeading(){let{hideHeading:e}=this,{title:t,selectedFeatureViewModel:i}=this.viewModel;return i&&!e?i?.state==="error"?this.messages?.errorMessage??"":i?.title||"":!e&&t?t:""}async _destroySpinner(e){e?.manager?.component?.extraContent?.remove(this._spinnerEl)}async _createSpinner(){let e=this.referenceElement;e&&(await this._destroySpinner(e),this._spinnerEl=T(n`<arcgis-spinner auto-destroy-disabled .label=${this.messages.loading??""} .trackLocation=${!this.hideSpinner&&this.viewModel?.waitingForResult} .location=${this.viewModel?.location??void 0} .view=${this.viewModel?.view??void 0}></arcgis-spinner>`),e.manager?.component?.extraContent?.add(this._spinnerEl))}render(){return n`<div class="root" @keydown=${this._onMainKeydown}>${this._renderHeader()}${this._renderContentContainer()}</div>`}_renderFeatureNavigation(){return[this._renderPagination(),this.initialDisplayMode==="list"?this._renderFeaturePaginationText():this._renderFeatureMenuButton()]}_renderHeader(){return this.featureNavigationTop&&this._featureNavigationVisible?n`<div class="header">${this._renderFeatureNavigation()}</div>`:null}_renderFooter(){return!this.featureNavigationTop&&this._featureNavigationVisible?n`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>`:null}_renderFeaturePaginationText(){let{messages:e,viewModel:t}=this,{featureCount:i,selectedFeatureIndex:a}=t;return n`<div class="pagination-text">${h(e.pageText??"",{index:$(a+1),total:$(i)})}</div>`}_renderFeatureMenuButton(){let{messages:e,viewModel:t}=this,{featureCount:i,selectedFeatureIndex:a,pendingPromisesCount:s}=t;return n`<calcite-action class="pagination-menu-button" icon=list .label=${e.selectFeature} .loading=${s>0} @click=${this._handlePaginationMenuButton} .text=${h(e.pageText??"",{index:$(a+1),total:$(i)})} text-enabled title=${e.selectFeature??c}></calcite-action>`}_renderPagination(){let{previous:e,next:t}=this.messages;return n`<calcite-action-bar class="pagination-action-bar" expand-disabled layout=horizontal overflow-actions-disabled scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${e??""} @click=${this._previousFeature} .text=${e??""} title=${e??""??c}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${t??""} @click=${this._nextFeature} .text=${t??""} title=${t??""??c}></calcite-action></calcite-action-group></calcite-action-bar>`}_renderFeatureMenuItem(e){let{initialDisplayMode:t}=this,{selectedFeatureViewModel:i,featureViewModels:a}=this.viewModel,s=e===i,o=a.indexOf(e);return n`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${()=>this._setActiveFeature(o)} @mouseleave=${this._removeActiveFeature} @mouseover=${()=>this._setActiveFeature(o)} .selected=${s} @calciteListItemSelect=${()=>this._selectFeature(o)}><span .innerHTML=${(P.sanitize(e.title)||this.messages.untitled)??""} slot=content></span>${t==="list"?n`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`:null}</calcite-list-item>`}_renderFeatureMenu(){let{messages:e,viewModel:t}=this,i=this._groupResultsByLayer(),a=this.initialDisplayMode==="list"?"none":"single";return t.featureViewModels.length?n`<calcite-list display-mode=flat .label=${e?.featuresList??""} selection-appearance=icon .selectionMode=${a}>${Array.from(i.keys(),s=>{let o=i.get(s)?.map(r=>this._renderFeatureMenuItem(r)),l=s?s.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&l!==null?C(s??"map-graphics",n`<calcite-list-item-group .heading=${l}>${o}</calcite-list-item-group>`):o})}</calcite-list>`:null}_renderHeaderAction(e){let t=e.title||"";return e.visible?n`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .indicator=${e.active} .loading=${e.active} @click=${()=>this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t??c}></calcite-action>`:null}_renderHeaderActions(){return this.headerActions.map(e=>this._renderHeaderAction(e)).toArray()}_renderContentFeature(){let{headingLevel:e,hideCloseButton:t,_isCollapsed:i,_collapseEnabled:a,featureNavigationTop:s,flowItems:o,initialDisplayMode:l,selectedFeature:r,featureMenuOpen:p}=this,{active:g}=this.viewModel,f=this._getHeading();if(l==="list"&&!r)return null;let m=o.length===0&&(l==="list"?!!r:!p);return n`<calcite-flow-item class=${F(b({"content-feature":!0,"flow-item-collapsed":i}))} .closable=${!t} .closed=${!g} .collapsed=${i} .collapseDirection=${s?"down":"up"} .collapsible=${a} .headingLevel=${e} .selected=${m} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} .heading=${A(f)} ${v(this._rootFlowItemNode)}>${this._renderHeaderActions()}${this._renderActionBar()}<div class=${F(b("container","content-container"))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`}_renderFeatureMenuContainer(){let{viewModel:e,hideCloseButton:t,featureMenuTitle:i,messages:a,initialDisplayMode:s,featureMenuOpen:o,selectedFeature:l,_collapseEnabled:r,_isCollapsed:p,featureNavigationTop:g,headingLevel:f}=this,{active:m,featureViewModels:H,pendingPromisesCount:S}=e,z=i??a.selectFeature;if(s==="feature"&&!o)return null;let U=s==="list"?!l:o;return n`<calcite-flow-item class=${F(b({"flow-item-collapsed":p}))} .closable=${s==="list"&&!t} .closed=${!m} .collapsed=${s==="list"&&p} .collapseDirection=${g?"down":"up"} .collapsible=${s==="list"&&r} .description=${this.hideFeatureMenuHeading?void 0:h(a.total??"",{total:H.length})} .heading=${this.hideFeatureMenuHeading?void 0:z} .headingLevel=${f} .loading=${e.waitingForContents} .selected=${U} @calciteFlowItemBack=${Z=>{Z.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${v(this._featureMenuViewportNode)}>${s==="list"?this._renderHeaderActions():null}${S>0?n`<calcite-loader class="loader" inline .label=${a.loading??""} slot=header-actions-end></calcite-loader>`:null}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" ${v(this._featureMenuIntersectionObserverCreated)}></div>${s==="feature"?n`<calcite-button appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full>${a.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{messages:i,hideCloseButton:a,active:s}=this,o="graphic"in e&&"isFeatureFromTable"in e&&!e.isFeatureFromTable,l=e.flowType==="feature-association",r=i.returnToInitialFeature??"",p=i?.selectFeature,g=this._getActionTitle(M),f=!this.hideActionBar&&l&&o;return n`<calcite-flow-item .closable=${!a} .closed=${!s} .description=${A(this._getDrillInFlowItemDescription(e)??"")} .heading=${this.hideHeading?void 0:A(e.heading??"")} .selected=${t} @calciteFlowItemBack=${m=>{m.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${r??""} title=${r??""??c}></calcite-action>${o?n`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${p??""} title=${p??c}></calcite-action>`:null}${f?n`<calcite-action-bar expand-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${M.disabled} .icon=${M.icon??void 0} .loading=${M.active} scale=s text-enabled .text=${g} title=${g??c} @click=${()=>B(this.viewModel,e)}></calcite-action></calcite-action-group></calcite-action-bar>`:null}<div class="container">${e}</div></calcite-flow-item>`}_renderContentContainer(){let e=this.flowItems?.toArray(),t=e?.map((a,s)=>this._renderFlowItem(a,this.initialDisplayMode==="list"||!this.featureMenuOpen&&s===e.length-1)),i=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(),t]:[this._renderContentFeature(),t,this._renderFeatureMenuContainer()];return n`<calcite-flow ${v(this._flowContainerNode)}>${i}</calcite-flow>`}_renderActionBar(){let e=this.viewModel.selectedFeatureViewModel?.isFeatureFromTable&&!this.location?this.viewModel.allActions.filter(t=>t.id!==M.id):this.viewModel.allActions;return!this._isCollapsed&&!this.hideActionBar&&e.length?n`<calcite-action-bar expand-disabled .expanded=${!this._hideActionText} scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s ${v(this._actionBarMenuNode)}>${this._renderActions()}</calcite-action-group></calcite-action-bar>`:null}_renderActions(){return this.viewModel.allActions.toArray().map(e=>{let t=this._getActionTitle(e);return n`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .loading=${e.active} scale=s .textEnabled=${!this._hideActionText} .text=${t??""} title=${t??c} .hidden=${!e.visible} @click=${()=>this._triggerAction(e)}></calcite-action>`})}_renderContent(){let{content:e,selectedFeatureViewModel:t}=this.viewModel;return t?C(t,n`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${v(this._selectedFeatureComponent)}></arcgis-feature>`):typeof e=="string"?C(e,n`<div .innerHTML=${P.sanitize(e)??""}></div>`):e??null}};k("arcgis-features",y);return y},"widgets/Features/FeaturesViewModel","intl","core/reactiveUtils","applications/Components/stringUtils","core/Collection","applications/Components/sanitizerUtils","applications/Components/featureUtils",a,d,e,f,g,h,i)
2
+ import i from"./JFNCIZRD.js";import h from"./YET5HTLQ.js";import"./FF5VMKLK.js";import{a as C}from"./J6UG5EF7.js";import g from"./5MHPKAFK.js";import"./PC4PAQXQ.js";import"./TFUFDVQ6.js";import f from"./5CJ44XUV.js";import{a as D}from"./SVVJHTPA.js";import e from"./3JMJAUSY.js";import d from"./RO4TU5R3.js";import{g as V}from"./55IJQTCC.js";import"./7DOI3267.js";import a from"./O5TDDX7K.js";import{b}from"./EHZW6UXL.js";import{M as w,N as v,O as I,P as F,R as c,S as T,U as k,a as x,b as n,x as _}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([j,{substitute:h,formatNumber:$},{watch:u},{stripHTML:A},L,{renderingSanitizer:P},{initializeProjection:K},,,,N,,{d:E},{a:O,d:B,e:R}])=>{var G=x`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-item-header-border-block-end: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty){padding:var(--arcgis-internal-padding-md, var(--calcite-spacing-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-spacing-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-spacing-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-spacing-xxs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-spacing-lg);width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.action-image{flex:0 0 var(--calcite-spacing-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.header{border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.content-feature{--calcite-flow-item-footer-padding: 0}.feature-menu-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.action-exit{transform:scaleX(-1)}`;function W(d){switch(d?.type){case"point":return d;case"extent":return d.center;case"polygon":return d.centroid;case"multipoint":case"polyline":return d.extent?.center;default:return null}}var M=O.clone();function X(d){return d?.declaredClass.startsWith("esri.layers.")??!1}var J=N(j),y=class extends I{constructor(){super(...arguments),this._fetchFeaturesController=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this.viewModel.featurePage!=null&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._featureMenuIntersectionObserverNode=null,this._rootFlowItemNode=w(),this._featureMenuViewportNode=w(),this._actionBarMenuNode=w(),this._flowContainerNode=w(),this.messages=D(),this._selectedFeatureComponent=w(),this._cancelOpenRelatedFeature=()=>{let{_openRelatedFeatureAbortController:e}=this;e&&e.abort(),this._openRelatedFeatureAbortController=null},this._openRelatedFeatureAbortController=null,this.flowItems=new L,this.viewModel=J(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.autoDestroyDisabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=this.viewModel.featureMenuOpen,this.featureMenuTitle=this.viewModel.featureMenuTitle,this.featureNavigationTop=!1,this.features=this.viewModel.features,this.featuresPerPage=this.viewModel.featuresPerPage,this.featureViewModelAbilities=this.viewModel.featureViewModelAbilities,this.goToOverride=this.viewModel.goToOverride,this.headerActions=new L,this.heading=this.viewModel.title,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSpinner=!1,this.hideContent=!1,this.hideExpressionContent=!1,this.hideLastEditedInfo=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.map=this.viewModel.map,this.open=this.viewModel.visible,this.promises=this.viewModel.promises,this.responsiveActionsEnabled=!1,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.showCollapseButton=!1,this.spatialReference=this.viewModel.spatialReference,this.state=this.viewModel.state,this.timeZone=this.viewModel.timeZone,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=V()("active","collapsed","featureCount","featureMenuOpen","features","promises","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=_(),this.arcgisClose=_(),this.arcgisTriggerAction=_()}static{this.properties={_openRelatedFeatureAbortController:16,flowItems:16,_hideActionText:16,_featureNavigationVisible:16,_isCollapsed:16,_collapseEnabled:16,viewModel:0,actions:0,active:0,autoDestroyDisabled:5,collapsed:5,content:1,defaultPopupTemplateEnabled:5,featureCount:9,featureMenuOpen:5,featureMenuTitle:1,featureNavigationTop:5,features:0,featuresPerPage:9,featureViewModelAbilities:0,goToOverride:0,headerActions:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSpinner:5,hideContent:5,chartAnimationDisabled:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,hideRelationshipContent:5,hideTextContent:5,hideUtilityNetworkContent:5,hideLastEditedInfo:5,highlightDisabled:5,icon:1,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,map:0,messageOverrides:0,open:5,referenceElement:1,promises:0,responsiveActionsEnabled:5,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,showCollapseButton:5,spatialReference:0,state:32,timeZone:1,updateLocationEnabled:5,view:0}}static{this.styles=G}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;let e=this.viewModel.view?.widthBreakpoint;return e==="xsmall"||e==="small"||e==="medium"}get _featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.viewModel.selectedFeature&&!this.hideFeatureNavigation}get _isCollapsed(){return this._collapseEnabled&&this.collapsed}get _collapseEnabled(){return this.showCollapseButton&&(this.initialDisplayMode==="list"||!!(this.heading||this.viewModel.selectedFeatureViewModel?.title)&&!!(this.content||this.viewModel.selectedFeatureViewModel?.content))}get chartAnimationDisabled(){return!(this.viewModel.featureViewModelAbilities?.chartAnimation??!0)}set chartAnimationDisabled(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.chartAnimation=!e}get hideAttachmentsContent(){return!(this.viewModel.featureViewModelAbilities?.attachmentsContent??!0)}set hideAttachmentsContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.attachmentsContent=!e}get hideCustomContent(){return!(this.viewModel.featureViewModelAbilities?.customContent??!0)}set hideCustomContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.customContent=!e}get hideFieldsContent(){return!(this.viewModel.featureViewModelAbilities?.fieldsContent??!0)}set hideFieldsContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.fieldsContent=!e}get hideMediaContent(){return!(this.viewModel.featureViewModelAbilities?.mediaContent??!0)}set hideMediaContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.mediaContent=!e}get hideRelationshipContent(){return!(this.viewModel.featureViewModelAbilities?.relationshipContent??!0)}set hideRelationshipContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.relationshipContent=!e}get hideTextContent(){return!(this.viewModel.featureViewModelAbilities?.textContent??!0)}set hideTextContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.textContent=!e}get hideUtilityNetworkContent(){return!(this.viewModel.featureViewModelAbilities?.utilityNetworkAssociationsContent??!0)}set hideUtilityNetworkContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.utilityNetworkAssociationsContent=!e}get selectedDrillInFeature(){let e=Array.from(this.flowItems).at(-1);return e&&"graphic"in e?e.graphic??null:null}get selectedFeatureComponent(){return this._selectedFeatureComponent.value??null}async clear(){return this.viewModel.clear()}async close(){this.open=!1}async destroy(){await this.manager.destroy(),await this._destroySpinner(this.referenceElement),this._cancelOpenRelatedFeature(),this._removeFlowItems(),this._unobserveFeatureMenuObserver(),this._cancelFetchingFeatures(),this._featureMenuIntersectionObserver?.disconnect()}async fetchFeatures(e,t){this._cancelFetchingFeatures();let i=new AbortController,{signal:a}=i;if(this._fetchFeaturesController=i,!e&&this.view&&this.location&&(await K(this.location.spatialReference,this.view.spatialReference,null,{signal:a}),e=this.view.toScreen(this.location)??void 0),!e)return;let s=await this.viewModel.fetchFeatures(e,{signal:a,...t});this.location=s.location,this.promises=s.pendingFeatures}async next(){return this.viewModel.next()}async previous(){return this.viewModel.previous()}async setFocus(){this._flowContainerNode.value?.setFocus()}async triggerAction(e){if(!e.disabled)return e?.type==="toggle"&&(e.value=!e.value),await R(e,this.viewModel)}loaded(){this.manager.onLifecycle(()=>[u(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),u(()=>this.viewModel?.view,()=>this._viewChange()),u(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),u(()=>this.selectedFeatureComponent?.viewModel,()=>this._removeFlowItems()),u(()=>this.viewModel?.featureViewModels,()=>this._featureMenuViewportScrollTop()),u(()=>[this.flowItems?.length,this.featureMenuOpen],()=>{this.setFocus()}),u(()=>this.referenceElement,(e,t)=>{this._destroySpinner(t),this._createSpinner()},{initial:!0}),u(()=>[this.hideSpinner,this.viewModel?.view,this.viewModel?.location,this.viewModel?.waitingForResult,this.viewModel?.view],()=>void this._createSpinner(),{initial:!0})])}_cancelFetchingFeatures(){this._fetchFeaturesController?.abort(),this._fetchFeaturesController=null}_handleClose(){this.close(),this.arcgisClose.emit()}_groupResultsByLayer(){let{featureViewModels:e}=this.viewModel,t=new Map;return e.forEach(i=>{let a=i?.graphic;if(!a)return;let s=E(a),o=X(s)?s:null,l=t.get(o)??[];t.set(o,[...l,i])}),t}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(e){this._cancelOpenRelatedFeature();let t=new AbortController;this._openRelatedFeatureAbortController=t,await e.updateGeometry();let i=e.graphic,a=i?.geometry;if(a==null||i==null)return;this._removeFlowItems(),await this.viewModel.zoomTo({target:a});let s=W(a);s!=null&&(this.location=s),this.features=[i],this.open=!0,await this.setFocus(),this._openRelatedFeatureAbortController===t&&(this._openRelatedFeatureAbortController=null)}_handlePaginationMenuButton(){this._updateFeatureMenu()}_openFeatureMenu(){this._updateFeatureMenu(!0)}_closeFeatureMenu(){this._updateFeatureMenu(!1)}_updateFeatureMenu(e=!this.featureMenuOpen){this.featureMenuOpen=e}_previousFeature(){this.viewModel.previous()}_nextFeature(){this.viewModel.next()}_handleFeatureBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this.featureMenuOpen&&this._closeFeatureMenu()}_setActiveFeature(e){let{viewModel:t}=this;t.activeFeature=t.features?.[e]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_selectFeature(e){this.viewModel.selectedFeatureIndex=e,this.initialDisplayMode==="feature"?this._handleFeatureMenuBack():this.setFocus()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),e&&this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_getActionTitle(e){let{messages:t,selectedFeature:i}=this,{id:a}=e,s=i?.attributes,o=e.title??"",l=a==="zoom-to-feature"?h(o,{messages:t}):a==="remove-selected-feature"?h(o,{messages:t}):a==="zoom-to-clustered-features"?h(o,{messages:t}):a==="browse-clustered-features"?h(o,{messages:t}):e.title;return l&&s?h(l,s):l??""}_onMainKeydown(e){let{key:t}=e;t==="ArrowLeft"&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.previous(),this.setFocus()),t==="ArrowRight"&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.next(),this.setFocus())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode&&this._featureMenuViewportNode.value?.scrollContentTo({top:0})}_selectedFeatureIndexUpdated(e,t){let{featureCount:i,waitingForResult:a}=this.viewModel;a||!i||e===t||e===-1||(this._removeFlowItems(),this._rootFlowItemNode.value?.scrollContentTo({top:0}))}_triggerAction(e){this.triggerAction(e),this.arcgisTriggerAction.emit({action:e})}_viewChange(){this.viewModel.clear(),this.open=!1}_closeOpenActionMenu(){let{_actionBarMenuNode:e}=this;e.value&&(e.value.menuOpen=!1)}_removeFlowItems(){this.flowItems?.destroyAll()}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":case"feature-utility-network-association-type":return e.description;case"feature-relationship":return e.allItemsDescription}}_handleDrillInBackClick(){this.flowItems?.pop()?.destroy()}_getHeading(){let{hideHeading:e}=this,{title:t,selectedFeatureViewModel:i}=this.viewModel;return i&&!e?i?.state==="error"?this.messages?.errorMessage??"":i?.title||"":!e&&t?t:""}async _destroySpinner(e){e?.manager?.component?.extraContent?.remove(this._spinnerEl)}async _createSpinner(){let e=this.referenceElement;e&&(await this._destroySpinner(e),this._spinnerEl=T(n`<arcgis-spinner auto-destroy-disabled .label=${this.messages.loading??""} .trackLocation=${!this.hideSpinner&&this.viewModel?.waitingForResult} .location=${this.viewModel?.location??void 0} .view=${this.viewModel?.view??void 0}></arcgis-spinner>`),e.manager?.component?.extraContent?.add(this._spinnerEl))}render(){return n`<div class="root" @keydown=${this._onMainKeydown}>${this._renderHeader()}${this._renderContentContainer()}</div>`}_renderFeatureNavigation(){return[this._renderPagination(),this.initialDisplayMode==="list"?this._renderFeaturePaginationText():this._renderFeatureMenuButton()]}_renderHeader(){return this.featureNavigationTop&&this._featureNavigationVisible?n`<div class="header">${this._renderFeatureNavigation()}</div>`:null}_renderFooter(){return!this.featureNavigationTop&&this._featureNavigationVisible?n`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>`:null}_renderFeaturePaginationText(){let{messages:e,viewModel:t}=this,{featureCount:i,selectedFeatureIndex:a}=t;return n`<div class="pagination-text">${h(e.pageText??"",{index:$(a+1),total:$(i)})}</div>`}_renderFeatureMenuButton(){let{messages:e,viewModel:t}=this,{featureCount:i,selectedFeatureIndex:a,pendingPromisesCount:s}=t;return n`<calcite-action class="pagination-menu-button" icon=list .label=${e.selectFeature} .loading=${s>0} @click=${this._handlePaginationMenuButton} .text=${h(e.pageText??"",{index:$(a+1),total:$(i)})} text-enabled title=${e.selectFeature??c}></calcite-action>`}_renderPagination(){let{previous:e,next:t}=this.messages;return n`<calcite-action-bar class="pagination-action-bar" expand-disabled layout=horizontal overflow-actions-disabled scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${e??""} @click=${this._previousFeature} .text=${e??""} title=${e??""??c}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${t??""} @click=${this._nextFeature} .text=${t??""} title=${t??""??c}></calcite-action></calcite-action-group></calcite-action-bar>`}_renderFeatureMenuItem(e){let{initialDisplayMode:t}=this,{selectedFeatureViewModel:i,featureViewModels:a}=this.viewModel,s=e===i,o=a.indexOf(e);return n`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${()=>this._setActiveFeature(o)} @mouseleave=${this._removeActiveFeature} @mouseover=${()=>this._setActiveFeature(o)} .selected=${s} @calciteListItemSelect=${()=>this._selectFeature(o)}><span .innerHTML=${(P.sanitize(e.title)||this.messages.untitled)??""} slot=content></span>${t==="list"?n`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`:null}</calcite-list-item>`}_renderFeatureMenu(){let{messages:e,viewModel:t}=this,i=this._groupResultsByLayer(),a=this.initialDisplayMode==="list"?"none":"single";return t.featureViewModels.length?n`<calcite-list display-mode=flat .label=${e?.featuresList??""} selection-appearance=icon .selectionMode=${a}>${Array.from(i.keys(),s=>{let o=i.get(s)?.map(r=>this._renderFeatureMenuItem(r)),l=s?s.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&l!==null?C(s??"map-graphics",n`<calcite-list-item-group .heading=${l}>${o}</calcite-list-item-group>`):o})}</calcite-list>`:null}_renderHeaderAction(e){let t=e.title||"";return e.visible?n`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .indicator=${e.active} .loading=${e.active} @click=${()=>this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t??c}></calcite-action>`:null}_renderHeaderActions(){return this.headerActions.map(e=>this._renderHeaderAction(e)).toArray()}_renderContentFeature(){let{headingLevel:e,hideCloseButton:t,_isCollapsed:i,_collapseEnabled:a,featureNavigationTop:s,flowItems:o,initialDisplayMode:l,selectedFeature:r,featureMenuOpen:p}=this,{active:g}=this.viewModel,f=this._getHeading();if(l==="list"&&!r)return null;let m=o.length===0&&(l==="list"?!!r:!p);return n`<calcite-flow-item class=${F(b({"content-feature":!0,"flow-item-collapsed":i}))} .closable=${!t} .closed=${!g} .collapsed=${i} .collapseDirection=${s?"down":"up"} .collapsible=${a} .headingLevel=${e} .selected=${m} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} .heading=${A(f)} ${v(this._rootFlowItemNode)}>${this._renderHeaderActions()}${this._renderActionBar()}<div class=${F(b("container","content-container"))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`}_renderFeatureMenuContainer(){let{viewModel:e,hideCloseButton:t,featureMenuTitle:i,messages:a,initialDisplayMode:s,featureMenuOpen:o,selectedFeature:l,_collapseEnabled:r,_isCollapsed:p,featureNavigationTop:g,headingLevel:f}=this,{active:m,featureViewModels:H,pendingPromisesCount:S}=e,z=i??a.selectFeature;if(s==="feature"&&!o)return null;let U=s==="list"?!l:o;return n`<calcite-flow-item class=${F(b({"flow-item-collapsed":p}))} .closable=${s==="list"&&!t} .closed=${!m} .collapsed=${s==="list"&&p} .collapseDirection=${g?"down":"up"} .collapsible=${s==="list"&&r} .description=${this.hideFeatureMenuHeading?void 0:h(a.total??"",{total:H.length})} .heading=${this.hideFeatureMenuHeading?void 0:z} .headingLevel=${f} .loading=${e.waitingForContents} .selected=${U} @calciteFlowItemBack=${Z=>{Z.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${v(this._featureMenuViewportNode)}>${s==="list"?this._renderHeaderActions():null}${S>0?n`<calcite-loader class="loader" inline .label=${a.loading??""} slot=header-actions-end></calcite-loader>`:null}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" ${v(this._featureMenuIntersectionObserverCreated)}></div>${s==="feature"?n`<calcite-button appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full>${a.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{messages:i,hideCloseButton:a,active:s}=this,o="graphic"in e&&"isFeatureFromTable"in e&&!e.isFeatureFromTable,l=e.flowType==="feature-association",r=i.returnToInitialFeature??"",p=i?.selectFeature,g=this._getActionTitle(M),f=!this.hideActionBar&&l&&o;return n`<calcite-flow-item .closable=${!a} .closed=${!s} .description=${A(this._getDrillInFlowItemDescription(e)??"")} .heading=${this.hideHeading?void 0:A(e.heading??"")} .selected=${t} @calciteFlowItemBack=${m=>{m.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${r??""} title=${r??""??c}></calcite-action>${o?n`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${p??""} title=${p??c}></calcite-action>`:null}${f?n`<calcite-action-bar expand-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${M.disabled} .icon=${M.icon??void 0} .loading=${M.active} scale=s text-enabled .text=${g} title=${g??c} @click=${()=>B(this.viewModel,e)}></calcite-action></calcite-action-group></calcite-action-bar>`:null}<div class="container">${e}</div></calcite-flow-item>`}_renderContentContainer(){let e=this.flowItems?.toArray(),t=e?.map((a,s)=>this._renderFlowItem(a,this.initialDisplayMode==="list"||!this.featureMenuOpen&&s===e.length-1)),i=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(),t]:[this._renderContentFeature(),t,this._renderFeatureMenuContainer()];return n`<calcite-flow ${v(this._flowContainerNode)}>${i}</calcite-flow>`}_renderActionBar(){let e=this.viewModel.selectedFeatureViewModel?.isFeatureFromTable&&!this.location?this.viewModel.allActions.filter(t=>t.id!==M.id):this.viewModel.allActions;return!this._isCollapsed&&!this.hideActionBar&&e.length?n`<calcite-action-bar expand-disabled .expanded=${!this._hideActionText} scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s ${v(this._actionBarMenuNode)}>${this._renderActions()}</calcite-action-group></calcite-action-bar>`:null}_renderActions(){return this.viewModel.allActions.toArray().map(e=>{let t=this._getActionTitle(e);return n`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .loading=${e.active} scale=s .textEnabled=${!this._hideActionText} .text=${t??""} title=${t??c} .hidden=${!e.visible} @click=${()=>this._triggerAction(e)}></calcite-action>`})}_renderContent(){let{content:e,selectedFeatureViewModel:t}=this.viewModel;return t?C(t,n`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${v(this._selectedFeatureComponent)}></arcgis-feature>`):typeof e=="string"?C(e,n`<div .innerHTML=${P.sanitize(e)??""}></div>`):e??null}};k("arcgis-features",y);return y},"widgets/Features/FeaturesViewModel","intl","core/reactiveUtils","applications/Components/stringUtils","core/Collection","applications/Components/sanitizerUtils","applications/Components/featureUtils",a,d,e,f,g,h,i)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import b from"./DLB6EEQE.js";import"./CAXI6CJY.js";import a from"./5MHPKAFK.js";import{a as I}from"./PC4PAQXQ.js";import{O as $,U as N,a as B,b as h}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([{watch:Be,when:$e},Ne,Ce,Me,{compileExpression:Pe},{a:k,d:_},{p:C}])=>{var te=typeof global=="object"&&global&&global.Object===Object&&global,M=te;var re=typeof self=="object"&&self&&self.Object===Object&&self,ae=M||re||Function("return this")(),O=ae;var oe=O.Symbol,g=oe;var P=Object.prototype,fe=P.hasOwnProperty,se=P.toString,b=g?g.toStringTag:void 0;function le(e){var t=fe.call(e,b),a=e[b];try{e[b]=void 0;var r=!0}catch{}var o=se.call(e);return r&&(t?e[b]=a:delete e[b]),o}var F=le;var ie=Object.prototype,pe=ie.toString;function ue(e){return pe.call(e)}var z=ue;var de="[object Null]",me="[object Undefined]",D=g?g.toStringTag:void 0;function ne(e){return e==null?e===void 0?me:de:D&&D in Object(e)?F(e):z(e)}var q=ne;function xe(e){return e!=null&&typeof e=="object"}var J=xe;var ce="[object Symbol]";function he(e){return typeof e=="symbol"||J(e)&&q(e)==ce}var U=he;var ge=/\s/;function ye(e){for(var t=e.length;t--&&ge.test(e.charAt(t)););return t}var G=ye;var ve=/^\s+/;function be(e){return e&&e.slice(0,G(e)+1).replace(ve,"")}var K=be;function Te(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var c=Te;var V=NaN,Ie=/^[-+]0x[0-9a-f]+$/i,ke=/^0b[01]+$/i,Oe=/^0o[0-7]+$/i,we=parseInt;function Se(e){if(typeof e=="number")return e;if(U(e))return V;if(c(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=c(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=K(e);var a=ke.test(e);return a||Oe.test(e)?we(e.slice(2),a?2:8):Ie.test(e)?V:+e}var E=Se;var je=function(){return O.Date.now()},w=je;var _e="Expected a function",Ee=Math.max,We=Math.min;function Le(e,t,a){var r,o,l,p,s,i,d=0,y=!1,m=!1,x=!0;if(typeof e!="function")throw new TypeError(_e);t=E(t)||0,c(a)&&(y=!!a.leading,m="maxWait"in a,l=m?Ee(E(a.maxWait)||0,t):l,x="trailing"in a?!!a.trailing:x);function u(f){var n=r,v=o;return r=o=void 0,d=f,p=e.apply(v,n),p}function Q(f){return d=f,s=setTimeout(T,t),y?u(f):p}function Y(f){var n=f-i,v=f-d,R=t-n;return m?We(R,l-v):R}function L(f){var n=f-i,v=f-d;return i===void 0||n>=t||n<0||m&&v>=l}function T(){var f=w();if(L(f))return A(f);s=setTimeout(T,Y(f))}function A(f){return s=void 0,x&&r?u(f):(r=o=void 0,p)}function Z(){s!==void 0&&clearTimeout(s),d=0,r=i=o=s=void 0}function ee(){return s===void 0?p:A(w())}function j(){var f=w(),n=L(f);if(r=arguments,o=this,i=f,n){if(s===void 0)return Q(i);if(m)return clearTimeout(s),s=setTimeout(T,t),u(i)}return s===void 0&&(s=setTimeout(T,t)),p}return j.cancel=Z,j.flush=ee,j}var X=Le;var Ae="Expected a function";function Re(e,t,a){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(Ae);return c(a)&&(r="leading"in a?!!a.leading:r,o="trailing"in a?!!a.trailing:o),X(e,t,{leading:r,maxWait:t,trailing:o})}var S=Re;var Fe=B`.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}`,H=1,W=class extends ${constructor(){super(...arguments),this._compileThrottled=S(this._startCompile,H),this._evaluateThrottled=S(this._startEvaluate,H),this.headingLevel=2}static{this.properties={_compileTask:16,_evaluateTask:16,values:0,fieldInfoMap:0,expressionInfo:0,graphic:0,headingLevel:9,interceptor:0,location:0,messages:0,spatialReference:0,map:0,view:0}}static{this.styles=Fe}loaded(){this.manager.onLifecycle(()=>[Be(()=>[this.expressionInfo,this.graphic],()=>this._compileThrottled(),{initial:!0}),$e(()=>{if(!this._compileTask?.finished)return null;let t=this._compileTask.value,a=t?.dependencies,{view:r}=this;return[t,this.spatialReference,this.map,r,a?.has("view-scale")&&r&&"scale"in r?r.scale:null,a?.has("view-time-extent")?r?.timeExtent?.start:null,a?.has("view-time-extent")?r?.timeExtent?.end:null]},([t])=>this._evaluateThrottled(t)),{remove:()=>this._cancelThrottles()}])}_cancelThrottles(){this._compileThrottled.cancel(),this._evaluateThrottled.cancel()}_startCompile(){this._evaluateTask=I(this._evaluateTask),this._compileTask=I(this._compileTask),this._compileTask=_(async t=>{let{expressionInfo:a,graphic:r}=this,o=a?.expression;if(!o||!r)return null;let l=await Pe({expression:o,graphic:r});return k(t),l})}_startEvaluate(t){this._evaluateTask=I(this._evaluateTask),this._evaluateTask=_(async a=>{let{graphic:r}=this;if(!t||!r)return null;let{interceptor:o,spatialReference:l,map:p,location:s,view:i}=this,d=await t.evaluate({graphic:r,interceptor:o,location:s,map:p,options:{signal:a},spatialReference:l,view:i});k(a);let y=d&&"castAsJsonAsync"in d&&typeof d.castAsJsonAsync=="function"?d:null;if(!y)return null;let m=await y.castAsJsonAsync(a);k(a);let x=m?.type,u=x==="media"?Ne.fromJSON(m):x==="text"?Me.fromJSON(m):x==="fields"?Ce.fromJSON(m):null;return!u||u.type==="media"&&!u.mediaInfos||u.type==="fields"&&!u.fieldInfos||u.type==="text"&&!u.text?null:u})}render(){let t=!this._compileTask?.finished||!this._evaluateTask?.finished;return h`<div class="root">${t?this._renderLoading():this._evaluateTask?.value?this._renderContent():null}</div>`}_renderContent(){let{values:t,fieldInfoMap:a}=this,r=this._evaluateTask?.value,o=r?.type,l={...t,...r?.attributes};if(!o)return null;if(o==="text"){let p=C({values:l,fieldInfoMap:a??new Map,globalValues:l,layer:void 0,text:r.text});return h`<arcgis-feature-content .creator=${p} .graphic=${this.graphic}></arcgis-feature-content>`}else if(o==="media"){let{title:p,description:s,mediaInfos:i}=r;return i?.length?h`<arcgis-feature-media .heading=${p??""} .values=${l} .formattedValues=${l} .description=${s??""} .mediaInfos=${i} .messages=${this.messages} .headingLevel=${this.headingLevel}></arcgis-feature-media>`:null}else if(o==="fields"){let{title:p,description:s,fieldInfos:i}=r;return i?.length?h`<arcgis-feature-fields .fieldInfos=${i} .heading=${p??""} .values=${l} .description=${s??""} .headingLevel=${this.headingLevel} .messages=${this.messages}></arcgis-feature-fields>`:null}return null}_renderLoading(){return h`<div class="loading-container"><calcite-loader inline label></calcite-loader></div>`}};N("arcgis-feature-expression",W);return W},"core/reactiveUtils","popup/content/MediaContent","popup/content/FieldsContent","popup/content/TextContent","applications/Components/arcadeFeatureUtils",a,b)
2
+ import b from"./YET5HTLQ.js";import"./FF5VMKLK.js";import a from"./5MHPKAFK.js";import{a as I}from"./PC4PAQXQ.js";import{O as $,U as N,a as B,b as h}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([{watch:Be,when:$e},Ne,Ce,Me,{compileExpression:Pe},{a:k,d:_},{p:C}])=>{var te=typeof global=="object"&&global&&global.Object===Object&&global,M=te;var re=typeof self=="object"&&self&&self.Object===Object&&self,ae=M||re||Function("return this")(),O=ae;var oe=O.Symbol,g=oe;var P=Object.prototype,fe=P.hasOwnProperty,se=P.toString,b=g?g.toStringTag:void 0;function le(e){var t=fe.call(e,b),a=e[b];try{e[b]=void 0;var r=!0}catch{}var o=se.call(e);return r&&(t?e[b]=a:delete e[b]),o}var F=le;var ie=Object.prototype,pe=ie.toString;function ue(e){return pe.call(e)}var z=ue;var de="[object Null]",me="[object Undefined]",D=g?g.toStringTag:void 0;function ne(e){return e==null?e===void 0?me:de:D&&D in Object(e)?F(e):z(e)}var q=ne;function xe(e){return e!=null&&typeof e=="object"}var J=xe;var ce="[object Symbol]";function he(e){return typeof e=="symbol"||J(e)&&q(e)==ce}var U=he;var ge=/\s/;function ye(e){for(var t=e.length;t--&&ge.test(e.charAt(t)););return t}var G=ye;var ve=/^\s+/;function be(e){return e&&e.slice(0,G(e)+1).replace(ve,"")}var K=be;function Te(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var c=Te;var V=NaN,Ie=/^[-+]0x[0-9a-f]+$/i,ke=/^0b[01]+$/i,Oe=/^0o[0-7]+$/i,we=parseInt;function Se(e){if(typeof e=="number")return e;if(U(e))return V;if(c(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=c(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=K(e);var a=ke.test(e);return a||Oe.test(e)?we(e.slice(2),a?2:8):Ie.test(e)?V:+e}var E=Se;var je=function(){return O.Date.now()},w=je;var _e="Expected a function",Ee=Math.max,We=Math.min;function Le(e,t,a){var r,o,l,p,s,i,d=0,y=!1,m=!1,x=!0;if(typeof e!="function")throw new TypeError(_e);t=E(t)||0,c(a)&&(y=!!a.leading,m="maxWait"in a,l=m?Ee(E(a.maxWait)||0,t):l,x="trailing"in a?!!a.trailing:x);function u(f){var n=r,v=o;return r=o=void 0,d=f,p=e.apply(v,n),p}function Q(f){return d=f,s=setTimeout(T,t),y?u(f):p}function Y(f){var n=f-i,v=f-d,R=t-n;return m?We(R,l-v):R}function L(f){var n=f-i,v=f-d;return i===void 0||n>=t||n<0||m&&v>=l}function T(){var f=w();if(L(f))return A(f);s=setTimeout(T,Y(f))}function A(f){return s=void 0,x&&r?u(f):(r=o=void 0,p)}function Z(){s!==void 0&&clearTimeout(s),d=0,r=i=o=s=void 0}function ee(){return s===void 0?p:A(w())}function j(){var f=w(),n=L(f);if(r=arguments,o=this,i=f,n){if(s===void 0)return Q(i);if(m)return clearTimeout(s),s=setTimeout(T,t),u(i)}return s===void 0&&(s=setTimeout(T,t)),p}return j.cancel=Z,j.flush=ee,j}var X=Le;var Ae="Expected a function";function Re(e,t,a){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(Ae);return c(a)&&(r="leading"in a?!!a.leading:r,o="trailing"in a?!!a.trailing:o),X(e,t,{leading:r,maxWait:t,trailing:o})}var S=Re;var Fe=B`.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}`,H=1,W=class extends ${constructor(){super(...arguments),this._compileThrottled=S(this._startCompile,H),this._evaluateThrottled=S(this._startEvaluate,H),this.headingLevel=2}static{this.properties={_compileTask:16,_evaluateTask:16,values:0,fieldInfoMap:0,expressionInfo:0,graphic:0,headingLevel:9,interceptor:0,location:0,messages:0,spatialReference:0,map:0,view:0}}static{this.styles=Fe}loaded(){this.manager.onLifecycle(()=>[Be(()=>[this.expressionInfo,this.graphic],()=>this._compileThrottled(),{initial:!0}),$e(()=>{if(!this._compileTask?.finished)return null;let t=this._compileTask.value,a=t?.dependencies,{view:r}=this;return[t,this.spatialReference,this.map,r,a?.has("view-scale")&&r&&"scale"in r?r.scale:null,a?.has("view-time-extent")?r?.timeExtent?.start:null,a?.has("view-time-extent")?r?.timeExtent?.end:null]},([t])=>this._evaluateThrottled(t)),{remove:()=>this._cancelThrottles()}])}_cancelThrottles(){this._compileThrottled.cancel(),this._evaluateThrottled.cancel()}_startCompile(){this._evaluateTask=I(this._evaluateTask),this._compileTask=I(this._compileTask),this._compileTask=_(async t=>{let{expressionInfo:a,graphic:r}=this,o=a?.expression;if(!o||!r)return null;let l=await Pe({expression:o,graphic:r});return k(t),l})}_startEvaluate(t){this._evaluateTask=I(this._evaluateTask),this._evaluateTask=_(async a=>{let{graphic:r}=this;if(!t||!r)return null;let{interceptor:o,spatialReference:l,map:p,location:s,view:i}=this,d=await t.evaluate({graphic:r,interceptor:o,location:s,map:p,options:{signal:a},spatialReference:l,view:i});k(a);let y=d&&"castAsJsonAsync"in d&&typeof d.castAsJsonAsync=="function"?d:null;if(!y)return null;let m=await y.castAsJsonAsync(a);k(a);let x=m?.type,u=x==="media"?Ne.fromJSON(m):x==="text"?Me.fromJSON(m):x==="fields"?Ce.fromJSON(m):null;return!u||u.type==="media"&&!u.mediaInfos||u.type==="fields"&&!u.fieldInfos||u.type==="text"&&!u.text?null:u})}render(){let t=!this._compileTask?.finished||!this._evaluateTask?.finished;return h`<div class="root">${t?this._renderLoading():this._evaluateTask?.value?this._renderContent():null}</div>`}_renderContent(){let{values:t,fieldInfoMap:a}=this,r=this._evaluateTask?.value,o=r?.type,l={...t,...r?.attributes};if(!o)return null;if(o==="text"){let p=C({values:l,fieldInfoMap:a??new Map,globalValues:l,layer:void 0,text:r.text});return h`<arcgis-feature-content .creator=${p} .graphic=${this.graphic}></arcgis-feature-content>`}else if(o==="media"){let{title:p,description:s,mediaInfos:i}=r;return i?.length?h`<arcgis-feature-media .heading=${p??""} .values=${l} .formattedValues=${l} .description=${s??""} .mediaInfos=${i} .messages=${this.messages} .headingLevel=${this.headingLevel}></arcgis-feature-media>`:null}else if(o==="fields"){let{title:p,description:s,fieldInfos:i}=r;return i?.length?h`<arcgis-feature-fields .fieldInfos=${i} .heading=${p??""} .values=${l} .description=${s??""} .headingLevel=${this.headingLevel} .messages=${this.messages}></arcgis-feature-fields>`:null}return null}_renderLoading(){return h`<div class="loading-container"><calcite-loader inline label></calcite-loader></div>`}};N("arcgis-feature-expression",W);return W},"core/reactiveUtils","popup/content/MediaContent","popup/content/FieldsContent","popup/content/TextContent","applications/Components/arcadeFeatureUtils",a,b)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import g from"./2SQ2T6UO.js";import f from"./3JMJAUSY.js";import e from"./RO4TU5R3.js";import{g as d}from"./55IJQTCC.js";import"./7DOI3267.js";import b from"./O5TDDX7K.js";import{e as c}from"./EHZW6UXL.js";import{O as n,U as s,a as l,q as r,x as a}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([{on:_},u,b,{b:h,g:g},,{a:t},m])=>{var w=l`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-feature-table{--icon-size: 64px;flex-direction:column;width:100%;height:100%;display:flex}.esri-feature-table__content{overflow:hidden}.esri-feature-table__content calcite-pagination{justify-content:center}.esri-feature-table calcite-scrim>div:first-child{min-width:300px;max-width:400px;max-height:100%;position:relative}.esri-feature-table__collapsed{min-width:500px}.esri-feature-table__collapsed:not(:last-child){border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-text-2);min-width:300px;max-width:300px}.esri-feature-table__expanded{min-width:300px;display:flex}.esri-feature-table__expanded:not(:last-child){border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-text-2)}.esri-feature-table__expanded.esri-feature-table__table-container--attachments:last-child{flex:2 1 0}.esri-feature-table__expanded.esri-feature-table__table-container--attachments:last-child calcite-panel{min-width:fit-content}.esri-feature-table__expanded.esri-feature-table__table-container--attachments:last-child calcite-panel>div:first-child{flex:2 1 0}.esri-feature-table__expanded.esri-feature-table__table-container--attachments:last-child .esri-feature-table__collapsed{max-width:inherit}.esri-feature-table__table-container{flex:1 1 0;min-height:0;margin:0;padding:0;display:flex;width:100%;height:100%}.esri-feature-table__table-container calcite-panel>div{overflow-y:auto}.esri-feature-table__table-container calcite-panel div{flex:1 1 0;display:flex}.esri-feature-table__table-container calcite-panel div .esri-feature-table__attachments-view__list{border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-text-2);flex:1 1 0;min-width:480px;overflow-y:auto}.esri-feature-table__table-container calcite-panel div .esri-feature-table__attachments-view__list__filesize{cursor:default;align-items:center;height:100%;margin-inline-end:var(--calcite-spacing-md);display:flex}.esri-feature-table__table-navigation{--calcite-label-margin-bottom: 0;background-color:var(--calcite-color-foreground-1);width:100%;line-height:initial;align-items:center;padding-block-start:var(--calcite-spacing-base);display:flex}.esri-feature-table__table-navigation calcite-action:first-child{border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);transform:scaleX(-1)}.esri-feature-table__table-navigation calcite-chip{--calcite-chip-close-icon-color: var(--calcite-color-text-inverse);margin-inline-end:var(--calcite-spacing-md)}.esri-feature-table__table-navigation calcite-label{border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);padding-inline:var(--calcite-spacing-md);height:100%}.esri-feature-table__table-navigation calcite-action{display:flex;overflow:hidden}.esri-feature-table__table-navigation div:last-child{float:inline-end;align-items:center;height:100%;margin-inline:auto 0;display:flex}.esri-feature-table__table-navigation calcite-action:last-child{float:inline-end;margin-inline:auto 0;display:flex}.esri-feature-table__attachments-view{background-color:var(--calcite-color-foreground-1);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-text-2);min-width:300px}.esri-feature-table__attachments-view__content{background-color:var(--calcite-color-background);padding:var(--calcite-spacing-md);flex-direction:column;justify-content:center;align-items:center;width:100%;max-height:100%;overflow-y:auto}.esri-feature-table__attachments-view__details,.esri-feature-table__attachments-view__drop-area{flex-direction:column;justify-content:center;align-items:center;width:100%}.esri-feature-table__attachments-view__details{padding:var(--calcite-spacing-xl);max-height:100%}.esri-feature-table__attachments-view__details img{display:block;padding:var(--calcite-spacing-sm);max-width:100%;max-height:100%}.esri-feature-table__attachments-view__details caclite-action{--calcite-action-text-color: var(--calcite-color-brand);position:sticky}.esri-feature-table__attachments-view__drop-area{border:var(--calcite-border-width-sm) dashed var(--calcite-color-border-input);border-radius:var(--calcite-corner-radius-round);text-align:center}.esri-feature-table__attachments-view__drop-area form{justify-content:center;display:flex}.esri-feature-table__attachments-view__drop-area form fieldset{border:none;display:flex;flex-direction:column;align-items:center}.esri-feature-table__attachments-view__drop-area form fieldset calcite-button,.esri-feature-table__attachments-view__drop-area form fieldset span{margin-bottom:var(--calcite-spacing-sm)}.esri-feature-table__attachments-view__drop-area__label{margin-bottom:var(--calcite-spacing-md);font-size:var(--calcite-font-size-md)}.esri-feature-table__attachments-view__drop-area__message{margin-bottom:var(--calcite-spacing-md);word-break:break-all}.esri-feature-table__attachments-view__icon{margin-bottom:var(--calcite-spacing-md);block-size:var(--icon-size);inline-size:var(--icon-size)}.esri-feature-table__attachments-view__information{padding:var(--calcite-spacing-md);flex-direction:column;max-width:200px;overflow-y:auto}.esri-feature-table__attachments-view__information calcite-button,.esri-feature-table__attachments-view__information calcite-icon,.esri-feature-table__attachments-view__information img{margin-block-end:var(--calcite-spacing-md)}.esri-feature-table__attachments-view__information__data{margin-block-end:var(--calcite-spacing-md);word-wrap:break-word;color:var(--calcite-color-text-1)}.esri-feature-table__attachments-view__information__label{color:var(--calcite-color-text-3);font-weight:var(--calcite-font-weight-normal)}.esri-feature-table__attachments-view__list-item--delete{border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.esri-feature-table__attachments-view__list__thumbnail{margin-block:var(--calcite-spacing-sm);justify-content:center;align-items:center}.esri-feature-table__attachments-view__list__thumbnail span{border:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-round);width:var(--icon-size);height:var(--icon-size);color:var(--calcite-color-text-3);justify-content:center;align-items:center;display:flex;overflow:hidden}.esri-feature-table__menu-popover calcite-list{max-width:300px;max-height:260px;overflow-y:auto}.esri-feature-table__dialog{--calcite-dialog-content-space: 0}.esri-feature-table__dialog calcite-progress{position:sticky;top:0;margin-bottom:var(--calcite-spacing-sm)}.esri-feature-table__dialog calcite-pagination{justify-content:center;width:100%}.esri-feature-table__dialog img{width:auto;max-width:100%}.esri-feature-table__dialog__content{display:flex;flex-direction:column;flex-grow:1;align-items:center;justify-content:center}.esri-feature-table__dialog__header{display:flex;flex-direction:row;gap:var(--calcite-spacing-sm);justify-content:space-between;width:100%}.esri-feature-table__dialog__header span{align-self:center;word-break:break-all}.esri-feature-table__footer__message{gap:var(--calcite-spacing-sm);margin:0 var(--calcite-spacing-md);align-items:center;display:flex}.esri-feature-table__footer__icon--danger{color:var(--calcite-color-status-danger)}.esri-feature-table__footer__icon--success{color:var(--calcite-color-status-success)}.esri-feature-table__layer-switcher-menu{align-items:center;display:flex}.esri-attachments-column__button,.esri-column__show-related-records-button{--calcite-offset-invert-focus: 2}.esri-column__show-related-records-button{height:100%;display:flex}.esri-attachments-column__button{overflow:hidden}.esri-attachments-column__button>div{display:flex;overflow:hidden}.esri-attachments-column__button>div>div:first-child{text-overflow:ellipsis;width:100%;margin-inline-end:var(--calcite-spacing-xxl);overflow:hidden}.esri-attachments-column__button>div span{align-self:center;position:absolute;inset-inline-end:var(--calcite-spacing-xxxl)}.esri-attachments-column__content{flex-direction:row;justify-content:space-between;width:100%;height:100%;display:flex;overflow:hidden}.esri-attachments-column__content>div:first-child{text-overflow:ellipsis;line-height:0;overflow:hidden}.esri-attachments-column__button calcite-icon,.esri-attachments-column__button img,.esri-attachments-column__content calcite-icon,.esri-attachments-column__content img{max-width:var(--calcite-spacing-xxl);max-height:var(--calcite-spacing-xxl);vertical-align:middle;margin-inline-end:var(--calcite-spacing-xxs);display:inline-flex}.esri-grid{background-color:var(--calcite-color-foreground-1);width:100%;height:100%}.esri-grid vaadin-grid{border-block-end:none;border-inline:none;background-color:inherit;color:inherit;font-family:inherit;font-size:var(--calcite-font-size);overflow:visible}.esri-grid vaadin-grid[reordering]::part(cell):after{content:normal}.esri-grid vaadin-grid[reordering]::part(frozen-cell),.esri-grid vaadin-grid[reordering]::part(frozen-to-end-cell),.esri-grid vaadin-grid[reordering]::part(reorder-allowed-cell){filter:brightness(.9) contrast(1.1)}.esri-grid vaadin-grid::part(empty-state){border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-2);color:var(--calcite-color-text-1)}.esri-grid vaadin-grid::part(cell editing){z-index:2}.esri-grid vaadin-grid::part(frozen-cell),.esri-grid vaadin-grid::part(frozen-to-end-cell){z-index:4}.esri-grid vaadin-grid::part(cell last-frozen-cell){overflow:visible}.esri-grid vaadin-grid::part(cell text-wrap){text-wrap:wrap}.esri-grid vaadin-grid-cell-content{box-sizing:border-box!important;align-items:center;padding:var(--calcite-spacing-xxs) var(--calcite-spacing-sm);height:100%;min-height:var(--calcite-font-line-height-fixed-3xl)}.esri-grid vaadin-grid::part(cell){border-inline-end:var(--calcite-border-width-sm) solid;border-color:var(--calcite-color-foreground-3);line-height:28px;color:var(--calcite-color-text-1)}.esri-grid vaadin-grid::part(cell):focus:after{outline-color:var(--calcite-color-brand)}.esri-grid vaadin-grid[overflow~=start]::part(cell last-frozen-cell){border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-text-3)}[dir=rtl].esri-grid vaadin-grid[overflow~=start]::part(cell last-frozen-cell){border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-text-3)}.esri-grid vaadin-grid[overflow~=end]::part(cell first-frozen-to-end-cell){border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-text-3)}[dir=rtl].esri-grid vaadin-grid[overflow~=end]::part(cell first-frozen-to-end-cell){border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-text-3)}.esri-grid vaadin-grid::part(body-cell){background-color:var(--calcite-color-foreground-1)}.esri-grid vaadin-grid::part(body-cell):hover{background-color:var(--calcite-color-foreground-2)}.esri-grid vaadin-grid::part(body-cell invalid){color:var(--calcite-color-text-3);font-style:italic}.esri-grid vaadin-grid::part(header-cell){background-color:var(--calcite-color-background)}.esri-grid vaadin-grid::part(header-cell invalid){font-weight:var(--calcite-font-weight-bold)}.esri-grid vaadin-grid[overflow~=top]::part(header-cell){border-bottom:var(--calcite-border-width-sm) solid var(--calcite-color-text-3)}.esri-grid vaadin-grid::part(header-cell direction){border-bottom:var(--calcite-border-width-sm) solid var(--calcite-color-brand);background-color:var(--calcite-color-foreground-1)}.esri-grid vaadin-grid[overflow~=top]::part(header-cell direction){border-bottom:var(--calcite-border-width-sm) solid var(--calcite-color-brand)}.esri-grid vaadin-grid::part(body-cell highlight){background-color:var(--calcite-color-foreground-3)}.esri-grid vaadin-grid::part(body-cell pending-edit){border:var(--calcite-border-width-md) solid var(--calcite-color-status-success);background-color:color-mix(in sRGB,var(--calcite-color-status-success) 20%,var(--calcite-color-foreground-1));&:hover{background-color:color-mix(in sRGB,var(--calcite-color-status-success-hover) 20%,var(--calcite-color-foreground-1))}}.esri-grid vaadin-grid::part(body-cell pending-edit-invalid){border:var(--calcite-border-width-md) dashed var(--calcite-color-status-danger);background-color:color-mix(in sRGB,var(--calcite-color-status-danger) 20%,var(--calcite-color-foreground-1));font-weight:var(--calcite-font-weight-bold);&:hover{background-color:color-mix(in sRGB,var(--calcite-color-status-danger-hover) 20%,var(--calcite-color-foreground-1))}}.esri-grid vaadin-grid::part(body-cell pending-edit-other){cursor:not-allowed;color:var(--calcite-color-text-3)}.esri-grid vaadin-grid::part(selected-row-cell){background-color:color-mix(in sRGB,var(--calcite-color-brand) 10%,var(--calcite-color-foreground-1))}.esri-grid vaadin-grid::part(selected-row-cell):hover{background-color:color-mix(in sRGB,var(--calcite-color-brand) 20%,var(--calcite-color-foreground-1))}.esri-grid vaadin-checkbox{line-height:var(--calcite-font-line-height-relative-snug)}.esri-grid vaadin-checkbox::part(checkbox){background-color:var(--calcite-color-text-3);line-height:var(--calcite-font-line-height-relative-snug)}.esri-grid vaadin-checkbox[checked]::part(checkbox){background-color:var(--calcite-color-brand)}.esri-grid vaadin-grid-sorter[direction]::part(indicators),.esri-grid vaadin-grid-sorter[direction]::part(order){color:var(--calcite-color-text-1)}.esri-grid .esri-grid__content{background-color:inherit;width:100%;height:100%}.esri-grid .esri-grid__grid{width:100%;height:100%}.esri-grid a{color:var(--calcite-color-text-link);text-decoration:underline}.esri-grid a:hover,.esri-grid a:focus{color:var(--calcite-color-text-highlight)}.esri-grid .esri-column__content--full{width:100%;height:100%;position:absolute;top:0;left:0}.esri-grid .esri-column__header-content{text-align:start;align-items:flex-start;width:100%;height:100%;font-weight:var(--calcite-font-weight-normal);display:flex;overflow:hidden}.esri-grid .esri-column__header-content:has(calcite-icon:only-child){justify-content:center;align-items:center}.esri-grid .esri-column__header-content div{width:100%;flex-flow:column wrap;display:flex;overflow:hidden}.esri-grid .esri-column__header-content div span{text-overflow:ellipsis;width:100%;line-height:var(--calcite-font-line-height-fixed-xl);overflow:hidden}.esri-grid .esri-column__header-content calcite-icon{height:var(--calcite-spacing-xxl);margin-inline-end:var(--calcite-spacing-xxs)}.esri-grid .esri-column__header-content calcite-dropdown{float:inline-end;max-height:180px}.esri-grid .esri-column__header-content calcite-dropdown calcite-dropdown-group{max-width:200px;overflow-x:auto}.esri-grid .esri-column__header-content calcite-dropdown calcite-dropdown-group:only-of-type{max-height:180px;overflow:visible}.esri-grid .esri-column__header-content calcite-dropdown[open] calcite-dropdown-item{display:flex}.esri-grid .esri-column__header-content calcite-dropdown calcite-dropdown-item,.esri-grid .esri-column__header-content calcite-dropdown calcite-dropdown-item[hidden]{display:none}.esri-grid .esri-column__header-description{color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.esri-grid .esri-column__sorter:hover{cursor:pointer}.esri-grid .esri-column__sorter,.esri-grid .esri-column__header-label{color:var(--calcite-color-text-1);flex-grow:1;align-items:center;display:flex;overflow:hidden}.esri-column__header-menu-icon{margin-inline-end:15px}.esri-column__cell-input{border:none;flex:1 1 0;width:100%;height:100%}.esri-column__cell__input-container{flex-direction:column;align-items:center;width:100%;display:flex}.esri-column__cell__input-container input,.esri-column__cell__input-container select{padding:0;position:absolute;top:0;left:0}.esri-column__cell__input-container div,.esri-column__cell__input-container input,.esri-column__cell__input-container select{width:100%;display:flex}.esri-column__cell__input-container calcite-action-bar{background-color:var(--calcite-color-foreground-1)}.esri-column__cell__input-container div:first-child{flex-direction:column}.esri-column__cell__input-container calcite-input-time-zone{--calcite-dropdown-width: 200px}.esri-column__cell__input-container calcite-input-time-picker:last-child,.esri-column__cell__input-container calcite-input-time-picker:nth-child(2),.esri-column__cell__input-container calcite-input-time-zone{margin-top:-1px}.esri-feature-table .esri-editor__prompt--danger{border-top:solid 3px var(--calcite-color-status-danger);background-color:var(--calcite-color-background);color:var(--calcite-color-text-1);flex-flow:column;max-height:85%;padding-block:var(--calcite-spacing-md);padding-inline:15px;animation:.25s ease-in-out esri-fade-in-up;display:flex;position:absolute;bottom:0;left:0;right:0;box-shadow:0 1px 2px #0000004d}.esri-feature-table .esri-editor__prompt--danger .esri-editor__prompt__header{color:var(--calcite-color-status-danger);flex:none;align-items:center;gap:7px;margin-bottom:var(--calcite-spacing-md);display:flex}.esri-feature-table .esri-editor__prompt--danger .esri-editor__prompt__header__heading{color:var(--calcite-color-text-1);margin:0 3px}.esri-feature-table .esri-editor__prompt--danger .esri-editor__prompt__message{word-break:break-word;color:inherit;flex:auto;padding:0 0 12px;font-weight:var(--calcite-font-weight-normal);overflow:hidden auto}.esri-feature-table .esri-editor__prompt--danger .esri-editor__prompt__divider{color:inherit;border-color:var(--calcite-color-border-2);border-bottom-style:solid;border-bottom-width:1px;flex:none;margin:0 0 12px}.esri-feature-table .esri-editor__prompt--danger .esri-editor__prompt__actions{flex-direction:row;display:flex}.esri-feature-table .esri-editor__prompt--danger .esri-editor__prompt__half-width-button{width:50%}`,f=m(b),o=class extends n{constructor(){super(...arguments),this.widget=f(this),this.viewModel=this.widget.viewModel,this.view=this.widget.view,this.attachmentsColumns=this.widget.attachmentsColumns,this.attributeTableTemplate=this.widget.attributeTableTemplate,this.actionColumn=this.widget.actionColumn,this.actionColumnConfig=this.widget.actionColumnConfig,this.activeFilters=this.widget.activeFilters,this.activeSortOrders=this.widget.activeSortOrders,this.allColumns=this.widget.allColumns,this.allRelatedTablesVisible=this.widget.allRelatedTablesVisible,this.allVisibleColumns=this.widget.allVisibleColumns,this.attachmentsEnabled=this.widget.attachmentsEnabled,this.attachmentsViewOptions=this.widget.attachmentsViewOptions,this.autoDestroyDisabled=!1,this.autoRefreshDisabled=this.widget.autoRefreshEnabled,this.autoSaveDisabled=this.widget.autoSaveEnabled,this.canAddRelatedFeature=this.widget.canAddRelatedFeature,this.columnPerformanceModeDisabled=this.widget.columnPerformanceModeEnabled,this.columnReorderingDisabled=this.widget.columnReorderingEnabled,this.columns=this.widget.columns,this.definitionExpression=this.widget.definitionExpression,this.description=this.widget.description,this.disabled=this.widget.disabled,this.editingEnabled=this.widget.editingEnabled,this.effectiveSize=this.widget.effectiveSize,this.fieldColumns=this.widget.fieldColumns,this.filterBySelectionEnabled=this.widget.filterBySelectionEnabled,this.filterGeometry=this.widget.filterGeometry,this.groupColumns=this.widget.groupColumns,this.hasContingentValues=this.widget.hasContingentValues,this.hasInvalidPendingEdits=this.widget.hasInvalidPendingEdits,this.hasPendingEdits=this.widget.hasPendingEdits,this.hiddenFields=this.widget.hiddenFields,this.hideColumnDescriptions=this.widget.visibleElements.columnDescriptions,this.hideColumnMenuItemsSortAscending=this.widget.visibleElements.columnMenuItems.sortAscending,this.hideColumnMenuItemsSortDescending=this.widget.visibleElements.columnMenuItems.sortDescending,this.hideColumnMenus=this.widget.visibleElements.columnMenus,this.hideHeader=this.widget.visibleElements.header,this.hideLayerDropdownIcons=this.widget.visibleElements.layerDropdownIcons,this.hideMenu=this.widget.visibleElements.menu,this.hideMenuItemsClearSelection=this.widget.visibleElements.menuItems.clearSelection,this.hideMenuItemsDeleteSelection=this.widget.visibleElements.menuItems.deleteSelection,this.hideMenuItemsExportSelectionToCsv=this.widget.visibleElements.menuItems.exportSelectionToCSV,this.hideMenuItemsRefreshData=this.widget.visibleElements.menuItems.refreshData,this.hideMenuItemsSelectedRecordsShowAllToggle=this.widget.visibleElements.menuItems.selectedRecordsShowAllToggle,this.hideMenuItemsSelectedRecordsShowSelectedToggle=this.widget.visibleElements.menuItems.selectedRecordsShowSelectedToggle,this.hideMenuItemsToggleColumns=this.widget.visibleElements.menuItems.toggleColumns,this.hideMenuItemsZoomToSelection=this.widget.visibleElements.menuItems.zoomToSelection,this.hideProgress=this.widget.visibleElements.progress,this.hideSelectionColumn=this.widget.visibleElements.selectionColumn,this.hideTooltips=this.widget.visibleElements.tooltips,this.highlightDisabled=this.widget.highlightEnabled,this.highlightIds=this.widget.highlightIds,this.initialSize=this.widget.initialSize,this.icon=this.widget.icon,this.isQueryingOrSyncing=this.widget.isQueryingOrSyncing,this.isSyncingAttachments=this.widget.isSyncingAttachments,this.label=this.widget.label,this.layer=this.widget.layer,this.layerView=this.widget.layerView,this.layers=this.widget.layers,this.maxSize=this.widget.maxSize,this.menuConfig=this.widget.menuConfig,this.multipleSelectionDisabled=this.widget.multipleSelectionEnabled,this.multipleSortEnabled=this.widget.multiSortEnabled,this.multipleSortPriority=this.widget.multipleSortPriority,this.navigationScale=this.widget.navigationScale,this.noDataMessage=this.widget.noDataMessage,this.objectIds=this.widget.objectIds,this.outFields=this.widget.outFields,this.pageCount=this.widget.pageCount,this.pageIndex=this.widget.pageIndex,this.pageSize=this.widget.pageSize,this.paginationEnabled=this.widget.paginationEnabled,this.relatedRecordsEnabled=this.widget.relatedRecordsEnabled,this.relatedTable=this.widget.relatedTable,this.relatedTables=this.widget.relatedTables,this.relationship=this.widget.relationship,this.relationshipColumns=this.widget.relationshipColumns,this.returnGeometryEnabled=this.widget.returnGeometryEnabled,this.returnMEnabled=this.widget.returnMEnabled,this.returnZEnabled=this.widget.returnZEnabled,this.rowHighlightIds=this.widget.rowHighlightIds,this.selectionManager=this.widget.selectionManager,this.size=this.widget.size,this.showLayerDropdown=this.widget.visibleElements.layerDropdown,this.state=this.widget.state,this.supportsAddAttachments=this.widget.supportsAddAttachments,this.supportsAttachments=this.widget.supportsAttachments,this.supportsDeleteAttachments=this.widget.supportsDeleteAttachments,this.supportsResizeAttachments=this.widget.supportsResizeAttachments,this.supportsUpdateAttachments=this.widget.supportsUpdateAttachments,this.syncTemplateOnChangesDisabled=this.widget.syncTemplateOnChangesEnabled,this.syncViewSelection=this.widget.syncViewSelection,this.tableController=this.widget.tableController,this.tableParent=this.widget.tableParent,this.tableTemplate=this.widget.tableTemplate,this.tableTitle=this.widget.title,this.timeExtent=this.widget.timeExtent,this.timeZone=this.widget.timeZone,this.visibleColumns=this.widget.visibleColumns,this.arcgisCellClick=t(()=>this.widget,"cell-click"),this.arcgisCellKeydown=t(()=>this.widget,"cell-keydown"),this.arcgisCellPointerout=t(()=>this.widget,"cell-pointerout"),this.arcgisCellPointerover=t(()=>this.widget,"cell-pointerover"),this.arcgisColumnReorder=t(()=>this.widget,"column-reorder"),this.arcgisPropertyChange=d()("effectiveSize","isQueryingOrSyncing","layerView","size","state"),this.arcgisReady=a(),this.arcgisSelectionChange=a()}static{this.properties={view:0,attachmentsColumns:32,attributeTableTemplate:0,actionColumn:32,actionColumnConfig:0,activeFilters:32,activeSortOrders:32,allColumns:32,allRelatedTablesVisible:36,allVisibleColumns:32,attachmentsEnabled:5,attachmentsViewOptions:0,autoDestroyDisabled:5,autoRefreshDisabled:5,autoSaveDisabled:5,canAddRelatedFeature:36,columnPerformanceModeDisabled:5,columnReorderingDisabled:5,columns:32,definitionExpression:1,description:1,disabled:7,editingEnabled:5,effectiveSize:40,fieldColumns:32,filterBySelectionEnabled:5,filterGeometry:0,groupColumns:32,hasContingentValues:36,hasInvalidPendingEdits:36,hasPendingEdits:36,hiddenFields:0,hideColumnDescriptions:5,hideColumnMenuItemsSortAscending:5,hideColumnMenuItemsSortDescending:5,hideColumnMenus:5,hideHeader:5,hideLayerDropdownIcons:5,hideMenu:5,hideMenuItemsClearSelection:5,hideMenuItemsDeleteSelection:5,hideMenuItemsExportSelectionToCsv:5,hideMenuItemsRefreshData:5,hideMenuItemsSelectedRecordsShowAllToggle:5,hideMenuItemsSelectedRecordsShowSelectedToggle:5,hideMenuItemsToggleColumns:5,hideMenuItemsZoomToSelection:5,hideProgress:5,hideSelectionColumn:5,hideTooltips:5,highlightDisabled:5,highlightIds:0,initialSize:9,icon:1,isQueryingOrSyncing:36,isSyncingAttachments:36,label:1,layer:0,layerItemId:1,layerUrl:1,layerView:32,layers:0,maxSize:9,menuConfig:0,multipleSelectionDisabled:5,multipleSortEnabled:5,multipleSortPriority:1,navigationScale:1,noDataMessage:1,objectIds:0,outFields:0,pageCount:40,pageIndex:9,pageSize:9,paginationEnabled:5,referenceElement:1,relatedRecordsEnabled:5,relatedTable:32,relatedTables:0,relationship:32,relationshipColumns:32,returnGeometryEnabled:5,returnMEnabled:5,returnZEnabled:5,rowHighlightIds:0,selectionManager:0,size:40,showLayerDropdown:5,state:32,supportsAddAttachments:36,supportsAttachments:36,supportsDeleteAttachments:36,supportsResizeAttachments:36,supportsUpdateAttachments:36,syncTemplateOnChangesDisabled:5,syncViewSelection:5,tableController:32,tableDisabled:5,tableParent:32,tableTemplate:0,tableTitle:1,timeExtent:0,timeZone:1,visibleColumns:32}}static{this.styles=w}get tableDisabled(){return this.widget.disabled}set tableDisabled(e){this.widget.disabled=e}addPendingEdits(e){this.widget.addPendingEdits(e)}async deleteSelection(e){await this.widget.deleteSelection(e)}async destroy(){await this.manager.destroy()}async discardPendingEdits(e,i){return await this.widget.discardPendingEdits(e,i)}async exportSelectionToCSV(e){await this.widget.exportSelectionToCSV(e)}async findColumn(e){return this.widget.findColumn(e)}async getFeatureStoreItemByObjectId(e){return this.widget.getFeatureStoreItemByObjectId(e)}async goToPage(e){this.widget.goToPage(e)}async hideColumn(e){this.widget.hideColumn(e)}async nextPage(){this.widget.nextPage()}async previousPage(){this.widget.previousPage()}async refresh(){await this.widget.refresh()}async refreshCellContent(){this.widget.refreshCellContent()}async savePendingEdits(){this.widget.savePendingEdits()}async scrollToBottom(){this.widget.scrollToBottom()}async scrollToIndex(e){this.widget.scrollToIndex(e)}async scrollToLeft(){this.widget.scrollLeft()}async scrollToRow(e){this.widget.scrollToRow(e)}async scrollToTop(){this.widget.scrollToTop()}async showAllColumns(){this.widget.showAllColumns()}async showColumn(e){this.widget.showColumn(e)}async sortColumn(e,i){this.widget.sortColumn(e,i)}async toggleColumnVisibility(e){this.widget.toggleColumnVisibility(e)}async zoomToSelection(){this.widget.zoomToSelection()}load(){this.manager.onLifecycle(()=>_(()=>this.widget.highlightIds,"change",this.arcgisSelectionChange.emit))}willUpdate(e){if(e.has("layerItemId")&&(h(this.layerItemId)?this.layer=null:this.layerItemId&&u.fromPortalItem({portalItem:{id:this.layerItemId}}).then(i=>{this.layer=i}).catch(r(this))),e.has("layerUrl")){let i=this.layerUrl;i?u.fromArcGISServerUrl({url:i}).then(p=>{this.layer=p}).catch(r(this)):this.layer=null}}loaded(){g(this)?.classList.add("arcgis-feature-table");let e=c(this.el);this.setAttribute("calcite-mode",e)}};s("arcgis-feature-table",o);return o},"core/reactiveUtils","layers/Layer","widgets/FeatureTable",b,e,f,g)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{c as m}from"./MSYERWRZ.js";import{b as r,e as c}from"./55IJQTCC.js";import{a as u}from"./EHZW6UXL.js";import{M as h,b as a,x as i,z as l}from"./MDRC374Z.js";export default $arcgis.t(([{when:E,watch:g}])=>{var d=class extends l{constructor(t){super(t),this.direction=c(),this.popupRef=h(),this.attributionHeight=0,this._uiContainer=null,this.component.listen("arcgisViewClick",o=>{this._handleOpenPopup(o.detail)}),this.component.listenOn(globalThis,"unhandledrejection",o=>{if(o.reason?.name==="webgl:required"){let{name:e}=o.reason;this.webGLError={name:e}}})}hostLifecycle(){return[E(()=>this.component.view.ready,()=>{this._assignDefaultPopup()}),E(()=>this.component.view.popup?.visible,()=>{this.popupElement?.open&&(this.popupElement.open=!1)})]}async openPopup(t){if(this._assignDefaultPopup(),this.closePopup(),this.popupElement){await this.popupElement.componentOnReady(),this.popupElement.open=!0;let{fetchFeatures:o}=t;delete t.fetchFeatures,Object.assign(this.popupElement,t),o&&this.popupElement.fetchFeatures()}else await this.component.view.openPopup(t)}closePopup(){this.popupElement&&(this.popupElement.open=!1),this.component.view.closePopup()}_assignDefaultPopup(){this.popupRef.value&&!this.popupElement&&(this.popupElement=this.popupRef.value,this.popupElement.referenceElement=this.component.el,this.popupElement.view=this.component.view)}handleAttributionHeightChange(t){if(!(this.attributionHeight===t||!this.component.el.shadowRoot)){if(this.attributionHeight=t,!this._uiContainer){let o=this.component.el.shadowRoot.querySelector(".arcgis-map-container-ui");this._uiContainer=o}this._uiContainer?.style.setProperty("--arcgis-internal-attribution-space-top",`${this.attributionHeight}px`)}}async _handleOpenPopup(t){if(this._assignDefaultPopup(),this.popupElement&&!this.component.popupDisabled){t.stopPropagation();let{location:o,promises:e}=await this.popupElement.handleViewClick(t);e?.length&&this.openPopup({location:o,promises:e})}}_handlePopupSlotChange(t){let o=u(t.target,"arcgis-popup");!this.popupElement&&o.length?this.popupElement=o[0]:o.length||(this.popupElement=void 0)}_webGLErrorAlert(){return this.webGLError?a`<arcgis-webgl-error .errorName=${this.webGLError.name}></arcgis-webgl-error>`:null}render(){return m({direction:this.direction,popupComponentEnabled:this.component.popupComponentEnabled,handlePopupSlotChange:t=>this._handlePopupSlotChange(t),webGLErrorElement:this._webGLErrorAlert(),popupElement:this.popupRef})}},_=r((p,t)=>{let o=i();return t.onLifecycle(()=>g(()=>{let{map:e}=p;if(!e||e.destroyed)return[];let n=[];return e.loadError&&n.push(e),e.basemap?.loadError&&n.push(e.basemap),e.ground.loadError&&n.push(e.ground),[...e.allLayers,...e.allTables].forEach(s=>{s.loadError&&n.push(s)}),n},e=>{e.length&&(p.loadErrorSources=e,o.emit())})),o}),L=r((p,t)=>{let o=i();return t.onLifecycle(()=>g(()=>p.view?.readyState,e=>{(e==="map-content-error"||e==="rendering-error")&&o.emit()})),o});return{a:d,b:_,c:L}},"core/reactiveUtils")
2
+ import{c as m}from"./MSYERWRZ.js";import{b as s,e as c}from"./55IJQTCC.js";import{a as u}from"./EHZW6UXL.js";import{M as h,b as a,x as i,z as l}from"./MDRC374Z.js";export default $arcgis.t(([{when:E,watch:g}])=>{var d=class extends l{constructor(t){super(t),this.direction=c(),this.popupRef=h(),this.attributionHeight=0,this._uiContainer=null,this.component.listen("arcgisViewClick",o=>{this._handleOpenPopup(o.detail)}),this.component.listenOn(globalThis,"unhandledrejection",o=>{if(o.reason?.name==="webgl:required"){let{name:e}=o.reason;this.webGLError={name:e}}})}hostLifecycle(){return[E(()=>this.component.view.ready,()=>{this._assignDefaultPopup()}),E(()=>this.component.view.popup?.visible,()=>{this.popupElement?.open&&(this.popupElement.open=!1)})]}async openPopup(t){if(this._assignDefaultPopup(),this.closePopup(),this.popupElement){await this.popupElement.componentOnReady(),this.popupElement.open=!0;let{fetchFeatures:o}=t;delete t.fetchFeatures,Object.assign(this.popupElement,t),o&&this.popupElement.fetchFeatures()}else await this.component.view.openPopup(t)}closePopup(){this.popupElement&&(this.popupElement.open=!1),this.component.view.closePopup()}_assignDefaultPopup(){this.popupRef.value&&!this.popupElement&&(this.popupElement=this.popupRef.value,this.popupElement.referenceElement=this.component.el,this.popupElement.view=this.component.view)}handleAttributionHeightChange(t){if(!(this.attributionHeight===t||!this.component.el.shadowRoot)){if(this.attributionHeight=t,!this._uiContainer){let o=this.component.el.shadowRoot.querySelector(".arcgis-map-container-ui");this._uiContainer=o}this._uiContainer?.style.setProperty("--arcgis-internal-attribution-space-top",`${this.attributionHeight}px`)}}async _handleOpenPopup(t){if(this._assignDefaultPopup(),this.popupElement&&!this.component.popupDisabled){t.stopPropagation();let{location:o,promises:e}=await this.popupElement.handleViewClick(t);e?.length?this.openPopup({location:o,promises:e}):this.popupElement.open&&this.closePopup()}}_handlePopupSlotChange(t){let o=u(t.target,"arcgis-popup");!this.popupElement&&o.length?this.popupElement=o[0]:o.length||(this.popupElement=void 0)}_webGLErrorAlert(){return this.webGLError?a`<arcgis-webgl-error .errorName=${this.webGLError.name}></arcgis-webgl-error>`:null}render(){return m({direction:this.direction,popupComponentEnabled:this.component.popupComponentEnabled,handlePopupSlotChange:t=>this._handlePopupSlotChange(t),webGLErrorElement:this._webGLErrorAlert(),popupElement:this.popupRef})}},_=s((p,t)=>{let o=i();return t.onLifecycle(()=>g(()=>{let{map:e}=p;if(!e||e.destroyed)return[];let n=[];return e.loadError&&n.push(e),e.basemap?.loadError&&n.push(e.basemap),e.ground.loadError&&n.push(e.ground),[...e.allLayers,...e.allTables].forEach(r=>{r.loadError&&n.push(r)}),n},e=>{e.length&&(p.loadErrorSources=e,o.emit())})),o}),L=s((p,t)=>{let o=i();return t.onLifecycle(()=>g(()=>p.view?.readyState,e=>{(e==="map-content-error"||e==="rendering-error")&&o.emit()})),o});return{a:d,b:_,c:L}},"core/reactiveUtils")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{j as m}from"./JVFREF7G.js";import"./RH62B2NE.js";import"./A2QPYUE5.js";import{v as p}from"./FWXI6DGS.js";import"./P2ABZVPJ.js";import"./XEXCDGSR.js";import"./DQH27QCF.js";import"./3TTFCHAA.js";export default $arcgis.t(([{getLocale:a,getLocaleLanguage:n}])=>{p("AM5C241025748");var e="en-US",o=new Map([["ar",()=>import("./MM4KQLRF.js")],["bg-BG",()=>import("./TEFALOII.js")],["bs-BA",()=>import("./5TXE67XV.js")],["ca-ES",()=>import("./DMDCKD5U.js")],["cs-CZ",()=>import("./JU3BLGXG.js")],["da-DK",()=>import("./TC3Q2QUA.js")],["de-DE",()=>import("./EP252O27.js")],["de-CH",()=>import("./Q3GALNWS.js")],["el-GR",()=>import("./U35ISUWJ.js")],["en-US",()=>import("./D5WXOOS3.js")],["en-CA",()=>import("./JKVKP7AW.js")],["es-ES",()=>import("./FLLSBLLE.js")],["et-EE",()=>import("./FQZXILRT.js")],["fi-FI",()=>import("./L4TA63M6.js")],["fr-FR",()=>import("./GIGQIUF5.js")],["he-IL",()=>import("./GHY23IXW.js")],["hr-HR",()=>import("./2HXYJZSB.js")],["hu-HU",()=>import("./GS75FRUR.js")],["id-ID",()=>import("./EVHNFE5I.js")],["it-IT",()=>import("./4STAROOM.js")],["ja-JP",()=>import("./EW6V3NZI.js")],["ko-KR",()=>import("./UUC3DBCQ.js")],["lt-LT",()=>import("./YZSLMAVX.js")],["lv-LV",()=>import("./TP5VEU3D.js")],["no-NO",()=>import("./4MDRPZTG.js")],["nb-NO",()=>import("./4MDRPZTG.js")],["nl-NL",()=>import("./XJXQC6HM.js")],["pl-PL",()=>import("./UVMLKDJA.js")],["pt-BR",()=>import("./V7DG2KF6.js")],["pt-PT",()=>import("./LQVZVGY4.js")],["ro-RO",()=>import("./F6BQWE5I.js")],["ru-RU",()=>import("./BBQPUWRO.js")],["sk-SK",()=>import("./HGAJ2IEN.js")],["sl-SL",()=>import("./37GJW6KT.js")],["sr-RS",()=>import("./4IM2FY5W.js")],["sv-SE",()=>import("./ZUPEVR3P.js")],["th-TH",()=>import("./5IMWXYL2.js")],["tr-TR",()=>import("./QM34BSKE.js")],["uk-UA",()=>import("./CJOHGWK6.js")],["vi-VN",()=>import("./WHDMC5HB.js")],["zh-CN",()=>import("./BND2TJBO.js")],["zh-HK",()=>import("./QTWRDNXX.js")],["zh-TW",()=>import("./QTWRDNXX.js")]]);function s(t){if(!t)return e;if(o.has(t))return t;let r=n();return r&&o.has(r)?r:e}async function l(t,r=a()){let i=m.new(t);return i.locale=(await o.get(s(r))()).default,i}return l},"intl")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{R as e}from"./JWJHIBYW.js";import"./GPGC63RW.js";import{W as t}from"./PILEMW25.js";import"./3TTFCHAA.js";var r=class extends t{setupDefaultRules(){super.setupDefaultRules(),this.rule("InterfaceColors").setAll({stroke:e.fromHex(0),fill:e.fromHex(2829099),primaryButton:e.lighten(e.fromHex(6788316),-.2),primaryButtonHover:e.lighten(e.fromHex(6779356),-.2),primaryButtonDown:e.lighten(e.fromHex(6872181),-.2),primaryButtonActive:e.lighten(e.fromHex(6872182),-.2),primaryButtonText:e.fromHex(16777215),primaryButtonStroke:e.lighten(e.fromHex(6788316),-.2),secondaryButton:e.fromHex(3881787),secondaryButtonHover:e.lighten(e.fromHex(3881787),.1),secondaryButtonDown:e.lighten(e.fromHex(3881787),.15),secondaryButtonActive:e.lighten(e.fromHex(3881787),.2),secondaryButtonText:e.fromHex(12303291),secondaryButtonStroke:e.lighten(e.fromHex(3881787),-.2),grid:e.fromHex(12303291),background:e.fromHex(0),alternativeBackground:e.fromHex(16777215),text:e.fromHex(16777215),alternativeText:e.fromHex(0),disabled:e.fromHex(11382189),positive:e.fromHex(5288704),negative:e.fromHex(11730944)})}};var b=r;export{b as default};
2
+ import{R as e}from"./P2ABZVPJ.js";import"./XEXCDGSR.js";import{W as t}from"./DQH27QCF.js";import"./3TTFCHAA.js";var r=class extends t{setupDefaultRules(){super.setupDefaultRules(),this.rule("InterfaceColors").setAll({stroke:e.fromHex(0),fill:e.fromHex(2829099),primaryButton:e.lighten(e.fromHex(6788316),-.2),primaryButtonHover:e.lighten(e.fromHex(6779356),-.2),primaryButtonDown:e.lighten(e.fromHex(6872181),-.2),primaryButtonActive:e.lighten(e.fromHex(6872182),-.2),primaryButtonText:e.fromHex(16777215),primaryButtonStroke:e.lighten(e.fromHex(6788316),-.2),secondaryButton:e.fromHex(3881787),secondaryButtonHover:e.lighten(e.fromHex(3881787),.1),secondaryButtonDown:e.lighten(e.fromHex(3881787),.15),secondaryButtonActive:e.lighten(e.fromHex(3881787),.2),secondaryButtonText:e.fromHex(12303291),secondaryButtonStroke:e.lighten(e.fromHex(3881787),-.2),grid:e.fromHex(12303291),background:e.fromHex(0),alternativeBackground:e.fromHex(16777215),text:e.fromHex(16777215),alternativeText:e.fromHex(0),disabled:e.fromHex(11382189),positive:e.fromHex(5288704),negative:e.fromHex(11730944)})}};var b=r;export{b as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as b}from"./GPGC63RW.js";import{I as _,L as T,M as A,f as L,g as y,m as U,o as I}from"./PILEMW25.js";import{a as q}from"./3TTFCHAA.js";var W={};q(W,{StyleRule:()=>P,StyleSheet:()=>D,addClass:()=>gt,addEventListener:()=>N,addSpacing:()=>Pt,alternativeColor:()=>R,blur:()=>nt,brighten:()=>F,capitalizeFirst:()=>Lt,cleanFormat:()=>St,contains:()=>k,decimalPlaces:()=>wt,escapeForRgex:()=>Et,focus:()=>ot,get12Hours:()=>Ft,getBrightnessStep:()=>At,getDayFromWeek:()=>Mt,getEventKey:()=>pt,getEventTarget:()=>ct,getFormat:()=>vt,getLightnessStep:()=>g,getMonthWeek:()=>Ct,getPointerId:()=>rt,getRendererEvent:()=>it,getSafeResolution:()=>bt,getShadowRoot:()=>ht,getStyle:()=>at,getTimeZone:()=>$t,getTimezoneOffset:()=>Rt,getWeek:()=>j,getWeekYear:()=>jt,getYearDay:()=>Ot,hslToHsv:()=>It,hslToRgb:()=>x,hsvToHsl:()=>Ut,iOS:()=>B,isLight:()=>C,isLocalEvent:()=>lt,isTouchEvent:()=>st,lighten:()=>M,mergeTags:()=>Ht,onZoom:()=>et,padString:()=>m,plainText:()=>Tt,ready:()=>X,relativeToValue:()=>_t,removeClass:()=>mt,removeElement:()=>tt,rgbToHsl:()=>v,sameBounds:()=>Nt,saturate:()=>$,setInteractive:()=>ft,setStyle:()=>ut,splitString:()=>Dt,stripTags:()=>Y,supports:()=>w,trim:()=>O,trimLeft:()=>z,trimRight:()=>G,truncateTextWithEllipsis:()=>xt});function X(t){if(document.readyState!=="loading")t();else{let e=()=>{document.readyState!=="loading"&&(document.removeEventListener("readystatechange",e),t())};document.addEventListener("readystatechange",e)}}function tt(t){t.parentNode&&t.parentNode.removeChild(t)}function N(t,e,r,n){return t.addEventListener(e,r,n||!1),new A(()=>{t.removeEventListener(e,r,n||!1)})}function et(t){return N(window,"resize",e=>{t()})}function w(t){switch(t){case"touchevents":return window.hasOwnProperty("TouchEvent");case"pointerevents":return window.hasOwnProperty("PointerEvent");case"mouseevents":return window.hasOwnProperty("MouseEvent");case"wheelevents":return window.hasOwnProperty("WheelEvent");case"keyboardevents":return window.hasOwnProperty("KeyboardEvent")}return!1}function rt(t){return t.pointerId||0}function nt(){if(document.activeElement&&document.activeElement!=document.body)if(document.activeElement.blur)document.activeElement.blur();else{let t=document.createElement("button");t.style.position="fixed",t.style.top="0px",t.style.left="-10000px",document.body.appendChild(t),t.focus(),t.blur(),document.body.removeChild(t)}}function ot(t){t&&t.focus()}function it(t){if(w("pointerevents"))return t;if(w("touchevents"))switch(t){case"pointerover":return"touchstart";case"pointerout":return"touchend";case"pointerleave":return"touchend";case"pointerdown":return"touchstart";case"pointermove":return"touchmove";case"pointerup":return"touchend";case"click":return"click";case"dblclick":return"dblclick"}else if(w("mouseevents"))switch(t){case"pointerover":return"mouseover";case"pointerout":return"mouseout";case"pointerleave":return"mouseleave";case"pointerdown":return"mousedown";case"pointermove":return"mousemove";case"pointerup":return"mouseup";case"click":return"click";case"dblclick":return"dblclick"}return t}function st(t){if(typeof Touch<"u"&&t instanceof Touch)return!0;if(typeof PointerEvent<"u"&&t instanceof PointerEvent&&t.pointerType!=null)switch(t.pointerType){case"touch":case"pen":case 2:return!0;case"mouse":case 4:return!1;default:return!(t instanceof MouseEvent)}else if(t.type!=null&&t.type.match(/^mouse/))return!1;return!0}function ut(t,e,r){t.style[e]=r}function at(t,e){return t.style[e]}function ct(t){if(t.composedPath){let e=t.composedPath();return e.length===0?null:e[0]}else return t.target}function k(t,e){let r=e;for(;;){if(t===r)return!0;if(r.parentNode===null){if(r.host==null)return!1;r=r.host}else r=r.parentNode}}function lt(t,e){return t.target&&k(e.root.dom,t.target)}function ft(t,e){e?t.style.pointerEvents="auto":t.style.pointerEvents="none"}function pt(t){if(t.key!==void 0)return t.key;switch(t.keyCode){case 9:return"Tab";case 13:return"Enter";case 16:return"Shift";case 17:return"Control";case 27:return"Escape";case 32:return" ";case 37:return"ArrowLeft";case 38:return"ArrowUp";case 39:return"ArrowRight";case 40:return"ArrowDown";case 46:return"Delete"}return""+t.keyCode}function ht(t){let e=t;for(;;){if(e.parentNode===null)return e.host!=null?e:null;e=e.parentNode}}var E;function dt(t,e,r=""){let n=document.createElement("style");return n.type="text/css",r!=""&&n.setAttribute("nonce",r),n.textContent=e,t===null?document.head.appendChild(n):t.appendChild(n),n}function yt(t,e=""){if(t===null){if(E==null){let r=document.createElement("style");r.type="text/css",e!=""&&r.setAttribute("nonce",e),document.head.appendChild(r),E=r.sheet}return E}else{let r=document.createElement("style");return r.type="text/css",e!=""&&r.setAttribute("nonce",e),t.appendChild(r),r.sheet}}function H(t,e){let r=t.cssRules.length;return t.insertRule(e+"{}",r),t.cssRules[r]}var P=class extends T{constructor(e,r,n,o=""){super(),this._root=yt(e,o);try{this._rule=H(this._root,r)}catch{this._rule=H(this._root,":not(*)")}_(n,(i,s)=>{this.setStyle(i,s)})}set selector(e){this._rule.selectorText=e}get selector(){return this._rule.selectorText}_dispose(){let e=U(this._root.cssRules,this._rule);if(e===-1)throw new Error("Could not dispose StyleRule");this._root.deleteRule(e)}_setVendorPrefixName(e,r){let n=this._rule.style;n.setProperty("-webkit-"+e,r,""),n.setProperty("-moz-"+e,r,""),n.setProperty("-ms-"+e,r,""),n.setProperty("-o-"+e,r,""),n.setProperty(e,r,"")}setStyle(e,r){e==="transition"?this._setVendorPrefixName(e,r):this._rule.style.setProperty(e,r,"")}},D=class extends T{constructor(e,r,n=""){super(),this._element=dt(e,r,n)}_dispose(){this._element.parentNode&&this._element.parentNode.removeChild(this._element)}};function gt(t,e){if(t)if(t.classList){let r=e.split(" ");I(r,n=>{t.classList.add(n)})}else{let r=t.getAttribute("class");r?t.setAttribute("class",r.split(" ").filter(n=>n!==e).join(" ")+" "+e):t.setAttribute("class",e)}}function mt(t,e){if(t)if(t.classList)t.classList.remove(e);else{let r=t.getAttribute("class");r&&t.setAttribute("class",r.split(" ").filter(n=>n!==e).join(" "))}}function B(){return/apple/i.test(navigator.vendor)&&"ontouchend"in document}function bt(){return B()?1:void 0}function _t(t,e){return y(t)?t:t!=null&&y(t.value)&&y(e)?e*t.value:0}function wt(t){let e=(""+t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}function m(t,e=0,r="0"){return typeof t!="string"&&(t=t.toString()),e>t.length?Array(e-t.length+1).join(r)+t:t}function z(t){return t.replace(/^[\s]*/,"")}function G(t){return t.replace(/[\s]*$/,"")}function O(t){return z(G(t))}function xt(t,e,r=!1,n="..."){if(t.length>e){let o=e-1;for(;o>=0&&t.charAt(o).match(/\w/);)o--;return o>=0&&r==!1?t.substring(0,o+1)+"...":t.substring(0,e)+n}else return t}function vt(t){if(typeof t>"u")return"string";t=t.toLowerCase().replace(/^\[[^\]]*\]/,""),t=t.replace(/\[[^\]]+\]/,""),t=t.trim();let e=t.match(/\/(date|number|duration)$/);return e?e[1]:t==="number"?"number":t==="date"?"date":t==="duration"?"duration":t.match(/[#0]/)?"number":t.match(/[ymwdhnsqaxkzgtei]/)?"date":"string"}function St(t){return t.replace(/\/(date|number|duration)$/i,"")}function Y(t){return t&&t.replace(/<[^>]*>/g,"")}function Tt(t){return t&&Y((""+t).replace(/[\n\r]+/g,". "))}function Et(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Pt(t){let e="";for(let r=0;r<t.length;r++){let n=t.charAt(r);n.toUpperCase()==n&&r!=0&&(e+=" "),e+=n}return e}function Dt(t){let e=/[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/,r=/([^اأدذرزو]*[اأدذرزو])/gi,n=t.split(/(\s+)/),o=[];return n.forEach(i=>{if(i.match(/^\s+$/))(i=" ")&&(i=" "),o.push(i);else if(e.test(i)){let s=i.split(r).filter(u=>u!=="");o=o.concat(s)}else o=o.concat([...i])}),o}function Ot(t,e=!1){let r=new Date(t.getFullYear(),0,0),n=t.getTime()-r.getTime()+(r.getTimezoneOffset()-t.getTimezoneOffset())*60*1e3,o=1e3*60*60*24;return Math.floor(n/o)}function j(t,e=!1){let r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())),n=r.getUTCDay()||7;r.setUTCDate(r.getUTCDate()+4-n);let o=new Date(Date.UTC(r.getUTCFullYear(),0,1));return Math.ceil(((r.getTime()-o.getTime())/864e5+1)/7)}function jt(t,e=!1){let r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())),n=r.getUTCDay()||7;return r.setUTCDate(r.getUTCDate()+4-n),new Date(Date.UTC(r.getUTCFullYear(),0,1)).getFullYear()}function Ct(t,e=!1){let r=j(new Date(t.getFullYear(),t.getMonth(),1),e),n=j(t,e);return n==1&&(n=53),n-r+1}function Mt(t,e,r=1,n=!1){let o=new Date(e,0,4,0,0,0,0);return n&&o.setUTCFullYear(e),t*7+r-((o.getDay()||7)+3)}function Ft(t,e){return t>12?t-=12:t===0&&(t=12),e!=null?t+(e-1):t}function $t(t,e=!1,r=!1,n=!1,o){if(n)return e?"Coordinated Universal Time":"UTC";if(o){let u=t.toLocaleString("en-US",{timeZone:o}),c=t.toLocaleString("en-US",{timeZone:o,timeZoneName:e?"long":"short"});return O(c.substr(u.length))}let i=t.toLocaleString("UTC"),s=t.toLocaleString("UTC",{timeZoneName:e?"long":"short"}).substr(i.length);return r===!1&&(s=s.replace(/ (standard|daylight|summer|winter) /i," ")),O(s)}function Rt(t,e){let r=e||new Date(Date.UTC(2012,0,1,0,0,0,0)),n=new Date(r.toLocaleString("en-US",{timeZone:"UTC"}));return(new Date(r.toLocaleString("en-US",{timeZone:t})).getTime()-n.getTime())/6e4*-1}function Lt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function x(t){let e,r,n,o=t.h,i=t.s,s=t.l;if(i==0)e=r=n=s;else{let u=function(l,S,f){return f<0&&(f+=1),f>1&&(f-=1),f<.16666666666666666?l+(S-l)*6*f:f<.5?S:f<.6666666666666666?l+(S-l)*(.6666666666666666-f)*6:l},c=s<.5?s*(1+i):s+i-s*i,a=2*s-c;e=u(a,c,o+1/3),r=u(a,c,o),n=u(a,c,o-1/3)}return{r:Math.round(e*255),g:Math.round(r*255),b:Math.round(n*255)}}function v(t){let e=t.r/255,r=t.g/255,n=t.b/255,o=Math.max(e,r,n),i=Math.min(e,r,n),s=0,u=0,c=(o+i)/2;if(o===i)s=u=0;else{let a=o-i;switch(u=c>.5?a/(2-o-i):a/(o+i),o){case e:s=(r-n)/a+(r<n?6:0);break;case r:s=(n-e)/a+2;break;case n:s=(e-r)/a+4;break}s/=6}return{h:s,s:u,l:c}}function Ut(t){let e=t.v*(1-t.s/2),r=e===0||e===1?0:(t.v-e)/Math.min(e,1-e);return{h:t.h,s:r,l:e,a:t.a}}function It(t){let e=t.l+t.s*Math.min(t.l,1-t.l),r=e===0?0:2*(1-t.l/e);return{h:t.h,s:r,v:e,a:t.a}}function M(t,e){return t&&{r:Math.max(0,Math.min(255,t.r+g(t.r,e))),g:Math.max(0,Math.min(255,t.g+g(t.g,e))),b:Math.max(0,Math.min(255,t.b+g(t.b,e))),a:t.a}}function g(t,e){let r=e>0?255-t:t;return Math.round(r*e)}function F(t,e){if(t){let r=Math.min(Math.max(t.r,t.g,t.b),230),n=g(r,e);return{r:Math.max(0,Math.min(255,Math.round(t.r+n))),g:Math.max(0,Math.min(255,Math.round(t.g+n))),b:Math.max(0,Math.min(255,Math.round(t.b+n))),a:t.a}}else return t}function At(t,e){return Math.round(255*e)}function C(t){return(t.r*299+t.g*587+t.b*114)/1e3>=128}function $(t,e){if(t===void 0||e==1)return t;let r=v(t);return r.s=e,x(r)}function R(t,e={r:255,g:255,b:255},r={r:255,g:255,b:255}){let n=e,o=r;return C(r)&&(n=r,o=e),C(t)?o:n}function Ht(t,e){return t||(t=[]),[...t,...e].filter((r,n,o)=>o.indexOf(r)===n)}function Nt(t,e){return!(!e||t.left!=e.left||t.right!=e.right||t.top!=e.top||t.bottom!=e.bottom)}function Z(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(h){try{a(n.next(h))}catch(l){s(l)}}function c(h){try{a(n.throw(h))}catch(l){s(l)}}function a(h){h.done?i(h.value):o(h.value).then(u,c)}a((n=n.apply(t,e||[])).next())})}function Jt(t){return Z(this,void 0,void 0,function*(){if(t!==void 0){let e=[];_(t,(r,n)=>{e.push(n.waitForStop())}),yield Promise.all(e)}})}function p(t,e,r){return e+t*(r-e)}function kt(t,e,r){return t>=1?r:e}function Bt(t,e,r){return new b(p(t,e.percent,r.percent))}function zt(t,e,r){return d.interpolate(t,e,r)}function Qt(t,e){return typeof t=="number"&&typeof e=="number"?p:t instanceof b&&e instanceof b?Bt:t instanceof d&&e instanceof d?zt:kt}var V;(function(t){t[t.Stopped=0]="Stopped",t[t.Playing=1]="Playing",t[t.Paused=2]="Paused"})(V||(V={}));function K(t){return t[0]==="#"&&(t=t.substr(1)),t.length==3&&(t=t[0].repeat(2)+t[1].repeat(2)+t[2].repeat(2)),parseInt(t,16)}function Gt(t){t=t.replace(/[ ]/g,"");let e=t.match(/^rgb\(([0-9]*),([0-9]*),([0-9]*)\)/i);if(e)e.push("1");else if(e=t.match(/^rgba\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\)/i),!e)return 0;let r="";for(let n=1;n<=3;n++){let o=parseInt(e[n]).toString(16);o.length==1&&(o="0"+o),r+=o}return K(r)}function ee(t){return d.fromAny(t)}var d=class t{constructor(e){this._hex=e|0}get hex(){return this._hex}get r(){return this._hex>>>16}get g(){return this._hex>>8&255}get b(){return this._hex&255}toCSS(e=1){return"rgba("+this.r+", "+this.g+", "+this.b+", "+e+")"}toCSSHex(){return"#"+m(this.r.toString(16),2)+m(this.g.toString(16),2)+m(this.b.toString(16),2)}toHSL(e=1){return v({r:this.r,g:this.g,b:this.b,a:e})}static fromHSL(e,r,n){let o=x({h:e,s:r,l:n});return this.fromRGB(o.r,o.g,o.b)}toString(){return this.toCSSHex()}static fromHex(e){return new t(e)}static fromRGB(e,r,n){return new t((n|0)+(r<<8)+(e<<16))}static fromString(e){return new t(K(e))}static fromCSS(e){return new t(Gt(e))}static fromAny(e){if(L(e)){if(e[0]=="#")return t.fromString(e);if(e.substr(0,3)=="rgb")return t.fromCSS(e)}else{if(y(e))return t.fromHex(e);if(e instanceof t)return t.fromHex(e.hex)}throw new Error("Unknown color syntax: "+e)}static alternative(e,r,n){let o=R({r:e.r,g:e.g,b:e.b},r?{r:r.r,g:r.g,b:r.b}:void 0,n?{r:n.r,g:n.g,b:n.b}:void 0);return this.fromRGB(o.r,o.g,o.b)}static interpolate(e,r,n,o="rgb"){if(o=="hsl"){let i=r.toHSL(),s=n.toHSL();return t.fromHSL(p(e,i.h,s.h),p(e,i.s,s.s),p(e,i.l,s.l))}else return t.fromRGB(p(e,r.r,n.r),p(e,r.g,n.g),p(e,r.b,n.b))}static lighten(e,r){let n=M({r:e.r,g:e.g,b:e.b},r);return t.fromRGB(n.r,n.g,n.b)}static brighten(e,r){let n=F({r:e.r,g:e.g,b:e.b},r);return t.fromRGB(n.r,n.g,n.b)}static saturate(e,r){let n=$({r:e.r,g:e.g,b:e.b},r);return t.fromRGB(n.r,n.g,n.b)}};export{Z as a,X as b,tt as c,N as d,et as e,w as f,rt as g,nt as h,ot as i,it as j,st as k,ut as l,at as m,ct as n,lt as o,ft as p,pt as q,ht as r,P as s,bt as t,_t as u,wt as v,m as w,O as x,xt as y,vt as z,St as A,Y as B,Et as C,Dt as D,Ot as E,j as F,jt as G,Ct as H,Mt as I,Ft as J,$t as K,Rt as L,Lt as M,Ht as N,Nt as O,W as P,ee as Q,d as R,Jt as S,Bt as T,Qt as U,V};
2
+ import{a as b}from"./XEXCDGSR.js";import{I as _,L as T,M as A,f as L,g as y,m as U,o as I}from"./DQH27QCF.js";import{a as q}from"./3TTFCHAA.js";var W={};q(W,{StyleRule:()=>P,StyleSheet:()=>D,addClass:()=>gt,addEventListener:()=>N,addSpacing:()=>Pt,alternativeColor:()=>R,blur:()=>nt,brighten:()=>F,capitalizeFirst:()=>Lt,cleanFormat:()=>St,contains:()=>k,decimalPlaces:()=>wt,escapeForRgex:()=>Et,focus:()=>ot,get12Hours:()=>Ft,getBrightnessStep:()=>At,getDayFromWeek:()=>Mt,getEventKey:()=>pt,getEventTarget:()=>ct,getFormat:()=>vt,getLightnessStep:()=>g,getMonthWeek:()=>Ct,getPointerId:()=>rt,getRendererEvent:()=>it,getSafeResolution:()=>bt,getShadowRoot:()=>ht,getStyle:()=>at,getTimeZone:()=>$t,getTimezoneOffset:()=>Rt,getWeek:()=>j,getWeekYear:()=>jt,getYearDay:()=>Ot,hslToHsv:()=>It,hslToRgb:()=>x,hsvToHsl:()=>Ut,iOS:()=>B,isLight:()=>C,isLocalEvent:()=>lt,isTouchEvent:()=>st,lighten:()=>M,mergeTags:()=>Ht,onZoom:()=>et,padString:()=>m,plainText:()=>Tt,ready:()=>X,relativeToValue:()=>_t,removeClass:()=>mt,removeElement:()=>tt,rgbToHsl:()=>v,sameBounds:()=>Nt,saturate:()=>$,setInteractive:()=>ft,setStyle:()=>ut,splitString:()=>Dt,stripTags:()=>Y,supports:()=>w,trim:()=>O,trimLeft:()=>z,trimRight:()=>G,truncateTextWithEllipsis:()=>xt});function X(t){if(document.readyState!=="loading")t();else{let e=()=>{document.readyState!=="loading"&&(document.removeEventListener("readystatechange",e),t())};document.addEventListener("readystatechange",e)}}function tt(t){t.parentNode&&t.parentNode.removeChild(t)}function N(t,e,r,n){return t.addEventListener(e,r,n||!1),new A(()=>{t.removeEventListener(e,r,n||!1)})}function et(t){return N(window,"resize",e=>{t()})}function w(t){switch(t){case"touchevents":return window.hasOwnProperty("TouchEvent");case"pointerevents":return window.hasOwnProperty("PointerEvent");case"mouseevents":return window.hasOwnProperty("MouseEvent");case"wheelevents":return window.hasOwnProperty("WheelEvent");case"keyboardevents":return window.hasOwnProperty("KeyboardEvent")}return!1}function rt(t){return t.pointerId||0}function nt(){if(document.activeElement&&document.activeElement!=document.body)if(document.activeElement.blur)document.activeElement.blur();else{let t=document.createElement("button");t.style.position="fixed",t.style.top="0px",t.style.left="-10000px",document.body.appendChild(t),t.focus(),t.blur(),document.body.removeChild(t)}}function ot(t){t&&t.focus()}function it(t){if(w("pointerevents"))return t;if(w("touchevents"))switch(t){case"pointerover":return"touchstart";case"pointerout":return"touchend";case"pointerleave":return"touchend";case"pointerdown":return"touchstart";case"pointermove":return"touchmove";case"pointerup":return"touchend";case"click":return"click";case"dblclick":return"dblclick"}else if(w("mouseevents"))switch(t){case"pointerover":return"mouseover";case"pointerout":return"mouseout";case"pointerleave":return"mouseleave";case"pointerdown":return"mousedown";case"pointermove":return"mousemove";case"pointerup":return"mouseup";case"click":return"click";case"dblclick":return"dblclick"}return t}function st(t){if(typeof Touch<"u"&&t instanceof Touch)return!0;if(typeof PointerEvent<"u"&&t instanceof PointerEvent&&t.pointerType!=null)switch(t.pointerType){case"touch":case"pen":case 2:return!0;case"mouse":case 4:return!1;default:return!(t instanceof MouseEvent)}else if(t.type!=null&&t.type.match(/^mouse/))return!1;return!0}function ut(t,e,r){t.style[e]=r}function at(t,e){return t.style[e]}function ct(t){if(t.composedPath){let e=t.composedPath();return e.length===0?null:e[0]}else return t.target}function k(t,e){let r=e;for(;;){if(t===r)return!0;if(r.parentNode===null){if(r.host==null)return!1;r=r.host}else r=r.parentNode}}function lt(t,e){return t.target&&k(e.root.dom,t.target)}function ft(t,e){e?t.style.pointerEvents="auto":t.style.pointerEvents="none"}function pt(t){if(t.key!==void 0)return t.key;switch(t.keyCode){case 9:return"Tab";case 13:return"Enter";case 16:return"Shift";case 17:return"Control";case 27:return"Escape";case 32:return" ";case 37:return"ArrowLeft";case 38:return"ArrowUp";case 39:return"ArrowRight";case 40:return"ArrowDown";case 46:return"Delete"}return""+t.keyCode}function ht(t){let e=t;for(;;){if(e.parentNode===null)return e.host!=null?e:null;e=e.parentNode}}var E;function dt(t,e,r=""){let n=document.createElement("style");return n.type="text/css",r!=""&&n.setAttribute("nonce",r),n.textContent=e,t===null?document.head.appendChild(n):t.appendChild(n),n}function yt(t,e=""){if(t===null){if(E==null){let r=document.createElement("style");r.type="text/css",e!=""&&r.setAttribute("nonce",e),document.head.appendChild(r),E=r.sheet}return E}else{let r=document.createElement("style");return r.type="text/css",e!=""&&r.setAttribute("nonce",e),t.appendChild(r),r.sheet}}function H(t,e){let r=t.cssRules.length;return t.insertRule(e+"{}",r),t.cssRules[r]}var P=class extends T{constructor(e,r,n,o=""){super(),this._root=yt(e,o);try{this._rule=H(this._root,r)}catch{this._rule=H(this._root,":not(*)")}_(n,(i,s)=>{this.setStyle(i,s)})}set selector(e){this._rule.selectorText=e}get selector(){return this._rule.selectorText}_dispose(){let e=U(this._root.cssRules,this._rule);if(e===-1)throw new Error("Could not dispose StyleRule");this._root.deleteRule(e)}_setVendorPrefixName(e,r){let n=this._rule.style;n.setProperty("-webkit-"+e,r,""),n.setProperty("-moz-"+e,r,""),n.setProperty("-ms-"+e,r,""),n.setProperty("-o-"+e,r,""),n.setProperty(e,r,"")}setStyle(e,r){e==="transition"?this._setVendorPrefixName(e,r):this._rule.style.setProperty(e,r,"")}},D=class extends T{constructor(e,r,n=""){super(),this._element=dt(e,r,n)}_dispose(){this._element.parentNode&&this._element.parentNode.removeChild(this._element)}};function gt(t,e){if(t)if(t.classList){let r=e.split(" ");I(r,n=>{t.classList.add(n)})}else{let r=t.getAttribute("class");r?t.setAttribute("class",r.split(" ").filter(n=>n!==e).join(" ")+" "+e):t.setAttribute("class",e)}}function mt(t,e){if(t)if(t.classList)t.classList.remove(e);else{let r=t.getAttribute("class");r&&t.setAttribute("class",r.split(" ").filter(n=>n!==e).join(" "))}}function B(){return/apple/i.test(navigator.vendor)&&"ontouchend"in document}function bt(){return B()?1:void 0}function _t(t,e){return y(t)?t:t!=null&&y(t.value)&&y(e)?e*t.value:0}function wt(t){let e=(""+t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}function m(t,e=0,r="0"){return typeof t!="string"&&(t=t.toString()),e>t.length?Array(e-t.length+1).join(r)+t:t}function z(t){return t.replace(/^[\s]*/,"")}function G(t){return t.replace(/[\s]*$/,"")}function O(t){return z(G(t))}function xt(t,e,r=!1,n="..."){if(t.length>e){let o=e-1;for(;o>=0&&t.charAt(o).match(/\w/);)o--;return o>=0&&r==!1?t.substring(0,o+1)+"...":t.substring(0,e)+n}else return t}function vt(t){if(typeof t>"u")return"string";t=t.toLowerCase().replace(/^\[[^\]]*\]/,""),t=t.replace(/\[[^\]]+\]/,""),t=t.trim();let e=t.match(/\/(date|number|duration)$/);return e?e[1]:t==="number"?"number":t==="date"?"date":t==="duration"?"duration":t.match(/[#0]/)?"number":t.match(/[ymwdhnsqaxkzgtei]/)?"date":"string"}function St(t){return t.replace(/\/(date|number|duration)$/i,"")}function Y(t){return t&&t.replace(/<[^>]*>/g,"")}function Tt(t){return t&&Y((""+t).replace(/[\n\r]+/g,". "))}function Et(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Pt(t){let e="";for(let r=0;r<t.length;r++){let n=t.charAt(r);n.toUpperCase()==n&&r!=0&&(e+=" "),e+=n}return e}function Dt(t){let e=/[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/,r=/([^اأدذرزو]*[اأدذرزو])/gi,n=t.split(/(\s+)/),o=[];return n.forEach(i=>{if(i.match(/^\s+$/))(i=" ")&&(i=" "),o.push(i);else if(e.test(i)){let s=i.split(r).filter(u=>u!=="");o=o.concat(s)}else o=o.concat([...i])}),o}function Ot(t,e=!1){let r=new Date(t.getFullYear(),0,0),n=t.getTime()-r.getTime()+(r.getTimezoneOffset()-t.getTimezoneOffset())*60*1e3,o=1e3*60*60*24;return Math.floor(n/o)}function j(t,e=!1){let r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())),n=r.getUTCDay()||7;r.setUTCDate(r.getUTCDate()+4-n);let o=new Date(Date.UTC(r.getUTCFullYear(),0,1));return Math.ceil(((r.getTime()-o.getTime())/864e5+1)/7)}function jt(t,e=!1){let r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())),n=r.getUTCDay()||7;return r.setUTCDate(r.getUTCDate()+4-n),new Date(Date.UTC(r.getUTCFullYear(),0,1)).getFullYear()}function Ct(t,e=!1){let r=j(new Date(t.getFullYear(),t.getMonth(),1),e),n=j(t,e);return n==1&&(n=53),n-r+1}function Mt(t,e,r=1,n=!1){let o=new Date(e,0,4,0,0,0,0);return n&&o.setUTCFullYear(e),t*7+r-((o.getDay()||7)+3)}function Ft(t,e){return t>12?t-=12:t===0&&(t=12),e!=null?t+(e-1):t}function $t(t,e=!1,r=!1,n=!1,o){if(n)return e?"Coordinated Universal Time":"UTC";if(o){let u=t.toLocaleString("en-US",{timeZone:o}),c=t.toLocaleString("en-US",{timeZone:o,timeZoneName:e?"long":"short"});return O(c.substr(u.length))}let i=t.toLocaleString("UTC"),s=t.toLocaleString("UTC",{timeZoneName:e?"long":"short"}).substr(i.length);return r===!1&&(s=s.replace(/ (standard|daylight|summer|winter) /i," ")),O(s)}function Rt(t,e){let r=e||new Date(Date.UTC(2012,0,1,0,0,0,0)),n=new Date(r.toLocaleString("en-US",{timeZone:"UTC"}));return(new Date(r.toLocaleString("en-US",{timeZone:t})).getTime()-n.getTime())/6e4*-1}function Lt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function x(t){let e,r,n,o=t.h,i=t.s,s=t.l;if(i==0)e=r=n=s;else{let u=function(l,S,f){return f<0&&(f+=1),f>1&&(f-=1),f<.16666666666666666?l+(S-l)*6*f:f<.5?S:f<.6666666666666666?l+(S-l)*(.6666666666666666-f)*6:l},c=s<.5?s*(1+i):s+i-s*i,a=2*s-c;e=u(a,c,o+1/3),r=u(a,c,o),n=u(a,c,o-1/3)}return{r:Math.round(e*255),g:Math.round(r*255),b:Math.round(n*255)}}function v(t){let e=t.r/255,r=t.g/255,n=t.b/255,o=Math.max(e,r,n),i=Math.min(e,r,n),s=0,u=0,c=(o+i)/2;if(o===i)s=u=0;else{let a=o-i;switch(u=c>.5?a/(2-o-i):a/(o+i),o){case e:s=(r-n)/a+(r<n?6:0);break;case r:s=(n-e)/a+2;break;case n:s=(e-r)/a+4;break}s/=6}return{h:s,s:u,l:c}}function Ut(t){let e=t.v*(1-t.s/2),r=e===0||e===1?0:(t.v-e)/Math.min(e,1-e);return{h:t.h,s:r,l:e,a:t.a}}function It(t){let e=t.l+t.s*Math.min(t.l,1-t.l),r=e===0?0:2*(1-t.l/e);return{h:t.h,s:r,v:e,a:t.a}}function M(t,e){return t&&{r:Math.max(0,Math.min(255,t.r+g(t.r,e))),g:Math.max(0,Math.min(255,t.g+g(t.g,e))),b:Math.max(0,Math.min(255,t.b+g(t.b,e))),a:t.a}}function g(t,e){let r=e>0?255-t:t;return Math.round(r*e)}function F(t,e){if(t){let r=Math.min(Math.max(t.r,t.g,t.b),230),n=g(r,e);return{r:Math.max(0,Math.min(255,Math.round(t.r+n))),g:Math.max(0,Math.min(255,Math.round(t.g+n))),b:Math.max(0,Math.min(255,Math.round(t.b+n))),a:t.a}}else return t}function At(t,e){return Math.round(255*e)}function C(t){return(t.r*299+t.g*587+t.b*114)/1e3>=128}function $(t,e){if(t===void 0||e==1)return t;let r=v(t);return r.s=e,x(r)}function R(t,e={r:255,g:255,b:255},r={r:255,g:255,b:255}){let n=e,o=r;return C(r)&&(n=r,o=e),C(t)?o:n}function Ht(t,e){return t||(t=[]),[...t,...e].filter((r,n,o)=>o.indexOf(r)===n)}function Nt(t,e){return!(!e||t.left!=e.left||t.right!=e.right||t.top!=e.top||t.bottom!=e.bottom)}function Z(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(h){try{a(n.next(h))}catch(l){s(l)}}function c(h){try{a(n.throw(h))}catch(l){s(l)}}function a(h){h.done?i(h.value):o(h.value).then(u,c)}a((n=n.apply(t,e||[])).next())})}function Jt(t){return Z(this,void 0,void 0,function*(){if(t!==void 0){let e=[];_(t,(r,n)=>{e.push(n.waitForStop())}),yield Promise.all(e)}})}function p(t,e,r){return e+t*(r-e)}function kt(t,e,r){return t>=1?r:e}function Bt(t,e,r){return new b(p(t,e.percent,r.percent))}function zt(t,e,r){return d.interpolate(t,e,r)}function Qt(t,e){return typeof t=="number"&&typeof e=="number"?p:t instanceof b&&e instanceof b?Bt:t instanceof d&&e instanceof d?zt:kt}var V;(function(t){t[t.Stopped=0]="Stopped",t[t.Playing=1]="Playing",t[t.Paused=2]="Paused"})(V||(V={}));function K(t){return t[0]==="#"&&(t=t.substr(1)),t.length==3&&(t=t[0].repeat(2)+t[1].repeat(2)+t[2].repeat(2)),parseInt(t,16)}function Gt(t){t=t.replace(/[ ]/g,"");let e=t.match(/^rgb\(([0-9]*),([0-9]*),([0-9]*)\)/i);if(e)e.push("1");else if(e=t.match(/^rgba\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\)/i),!e)return 0;let r="";for(let n=1;n<=3;n++){let o=parseInt(e[n]).toString(16);o.length==1&&(o="0"+o),r+=o}return K(r)}function ee(t){return d.fromAny(t)}var d=class t{constructor(e){this._hex=e|0}get hex(){return this._hex}get r(){return this._hex>>>16}get g(){return this._hex>>8&255}get b(){return this._hex&255}toCSS(e=1){return"rgba("+this.r+", "+this.g+", "+this.b+", "+e+")"}toCSSHex(){return"#"+m(this.r.toString(16),2)+m(this.g.toString(16),2)+m(this.b.toString(16),2)}toHSL(e=1){return v({r:this.r,g:this.g,b:this.b,a:e})}static fromHSL(e,r,n){let o=x({h:e,s:r,l:n});return this.fromRGB(o.r,o.g,o.b)}toString(){return this.toCSSHex()}static fromHex(e){return new t(e)}static fromRGB(e,r,n){return new t((n|0)+(r<<8)+(e<<16))}static fromString(e){return new t(K(e))}static fromCSS(e){return new t(Gt(e))}static fromAny(e){if(L(e)){if(e[0]=="#")return t.fromString(e);if(e.substr(0,3)=="rgb")return t.fromCSS(e)}else{if(y(e))return t.fromHex(e);if(e instanceof t)return t.fromHex(e.hex)}throw new Error("Unknown color syntax: "+e)}static alternative(e,r,n){let o=R({r:e.r,g:e.g,b:e.b},r?{r:r.r,g:r.g,b:r.b}:void 0,n?{r:n.r,g:n.g,b:n.b}:void 0);return this.fromRGB(o.r,o.g,o.b)}static interpolate(e,r,n,o="rgb"){if(o=="hsl"){let i=r.toHSL(),s=n.toHSL();return t.fromHSL(p(e,i.h,s.h),p(e,i.s,s.s),p(e,i.l,s.l))}else return t.fromRGB(p(e,r.r,n.r),p(e,r.g,n.g),p(e,r.b,n.b))}static lighten(e,r){let n=M({r:e.r,g:e.g,b:e.b},r);return t.fromRGB(n.r,n.g,n.b)}static brighten(e,r){let n=F({r:e.r,g:e.g,b:e.b},r);return t.fromRGB(n.r,n.g,n.b)}static saturate(e,r){let n=$({r:e.r,g:e.g,b:e.b},r);return t.fromRGB(n.r,n.g,n.b)}};export{Z as a,X as b,tt as c,N as d,et as e,w as f,rt as g,nt as h,ot as i,it as j,st as k,ut as l,at as m,ct as n,lt as o,ft as p,pt as q,ht as r,P as s,bt as t,_t as u,wt as v,m as w,O as x,xt as y,vt as z,St as A,Y as B,Et as C,Dt as D,Ot as E,j as F,jt as G,Ct as H,Mt as I,Ft as J,$t as K,Rt as L,Lt as M,Ht as N,Nt as O,W as P,ee as Q,d as R,Jt as S,Bt as T,Qt as U,V};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{a as I}from"./MP6Z45SA.js";import{c as E,d as F}from"./FF5VMKLK.js";import{a as A}from"./J6UG5EF7.js";import{O as q,S as L,U as N,a as T,b as p}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([{createReactiveMap:C,findUtilityNetwork:V,queryAllJSON:Q,getOrCreateMapValue:B},{stripHTML:S},f,{ignoreAbortErrors:$},{watch:k},D,P,x,G,O,R])=>{var H=T`.list-container{min-height:var(--calcite-spacing-xxxl)}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.sticky-loading-container{display:flex;position:sticky;bottom:var(--calcite-spacing-sm);align-items:center;justify-content:center;z-index:2;margin:0;padding:0;height:var(--calcite-spacing-xxxl);pointer-events:none;height:500px}`,M=100,j={assetGroup:"assetgroup",assetType:"assettype"},U="{00000000-0000-0000-0000-000000000000}",v=class extends q{constructor(){super(...arguments),this._addFlowItem=t=>{t&&this.flowItems?.push(t)},this._attachmentAssociations=new f,this._attachmentFeatureCount=0,this._cancelQuery=()=>{let{_queryAbortController:t}=this;t&&t.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{let{_queryFeatureCountAbortController:t}=this;t&&t.abort(),this._queryFeatureCountAbortController=null},this._connectivityAssociations=new f,this._connectivityFeatureCount=0,this._containerAssociations=new f,this._containerFeatureCount=0,this._contentAssociations=new f,this._contentFeatureCount=0,this._networkSourceIdsInUse=new Set,this._query=async t=>{if(!t)return;await this._loadUtiltyNetworks();let{_queryAbortController:e}=this;this._destroyAssociatedFeatureViewModels(),this._clearFeatures(),this._featureCount&&await this._queryAssociatedFeatures(t,{signal:e?.signal})},this._queryController=async t=>{this._cancelQuery();let e=new AbortController;this._queryAbortController=e,await $(this._query(t)),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();let t=new AbortController;this._queryFeatureCountAbortController=t,await $(this._queryFeatureCount()),this._queryFeatureCountAbortController===t&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryDebounced=I(this._queryController,M),this._queryFeatureCountDebounced=I(this._queryFeatureCountController,M),this._structureAssociations=new f,this._structureFeatureCount=0,this._queryAssociationType=async()=>{this._activeAssociationType&&this._queryDebounced(this._activeAssociationType)},this._associationFeatures=C(),this._associationViewModels=C(),this._featureCount=0,this._loaded=!1,this._queryAbortController=null,this._queryFeatureCountAbortController=null,this._queryPageAbortController=null,this.associationTypes=null,this.autoDestroyDisabled=!1,this.flowType="feature-utility-network-associations",this.headingLevel=2,this.source="popup"}static{this.properties={_activeAssociationType:16,_associationFeatures:16,_associationViewModels:16,_canLoad:16,_canQuery:16,_featureCount:16,_loaded:16,_queryAbortController:16,_queryFeatureCountAbortController:16,_queryPageAbortController:16,_state:16,associationTypes:0,autoDestroyDisabled:5,description:1,flowItems:0,flowType:1,graphic:0,heading:1,headingLevel:9,layer:0,map:0,messages:0,parentFeatureViewModel:0,referenceElement:1,source:1,spatialReference:0,timeZone:1,view:0}}static{this.styles=H}get _globalId(){return(this._globalIdField&&this.graphic?.attributes?.[this._globalIdField])??null}get _globalIdField(){return this.layer?.globalIdField}get _objectId(){return(this._objectIdField&&this.graphic?.attributes?.[this._objectIdField])??null}get _objectIdField(){return this.layer?.objectIdField}get _supportsCacheHint(){return!!this.layer?.capabilities?.queryRelated?.supportsCacheHint}get _utilityNetwork(){let{layer:t,map:e}=this;if(!t?.loaded||!e)return null;let s=F(t)?t.parent:t;return V(e,s)}get _canLoad(){return!!this.map}get _canQuery(){return!!this.layer?.capabilities?.query?.supportsPagination}get _state(){let{_canLoad:t,_canQuery:e,_featureCount:s,_loaded:a,_queryAbortController:i,_queryFeatureCountAbortController:o,_queryPageAbortController:c,associationTypes:l}=this;return o||t&&!a?"loading":i||c?"querying":!this._globalId||!l||!e||!s?"disabled":"ready"}get heading(){return this._heading}set heading(t){this._heading=t}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[k(()=>[this.graphic,this.layer,this.map,this.associationTypes,this._canQuery,this._objectId,this._globalId],()=>{this._queryFeatureCountDebounced(),this._queryAssociationType()},{initial:!0}),k(()=>this._activeAssociationType,t=>{this._queryDebounced(t)}),k(()=>this._associationFeatures.values(),()=>{this._setUpUtilityNetworkAssociationsViewModels()})]),this.manager.onDestroy(()=>{this._cancelQuery(),this._cancelQueryFeatureCount()})}_addAssociationTypeFlowItem(t){this._addFlowItem(L(p`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this.parentFeatureViewModel?.title} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(t)} .messages=${this.messages} .map=${this.map} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .state=${this._state} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature-utility-network-association-list>`))}_clearAssociations(){this._attachmentAssociations.removeAll(),this._connectivityAssociations.removeAll(),this._containerAssociations.removeAll(),this._contentAssociations.removeAll(),this._structureAssociations.removeAll()}_clearFeatures(){this._associationFeatures.forEach(t=>t.removeAll()),this._associationFeatures.clear()}_compareByFeatureTitle(t,e){return t.title.localeCompare(e.title,void 0,{numeric:!0})}async _countAssociatedFeatureCount(t,e,s,a,i){let o=this._getFeatureQueryWhereClause(t,e,s,a);return await t.queryFeatureCount({where:o,outFields:["*"],returnGeometry:!1},{signal:i?.signal})}async _countAssociatedFeatures(t,e,s,a,i){if(!e.length)return 0;let o=await this._findLayersBySourceId(t);await this._loadLayers(o);let c=o.map(l=>this._countAssociatedFeatureCount(l,e,s,a,i));return(await Promise.all(c)).reduce((l,r)=>l+r,0)}async _createAssociationFeatureObjects(t,e,s,a,i){if(!t.length)return[];let o=new Map,c=Array.from(e.entries()).map(async([r,d])=>{let u=await this._findLayersBySourceId(r);await this._loadLayers(u);let h=u.map(m=>this._queryLayer(m,d,s,a,i));(await Promise.all(h)).forEach(m=>{m.forEach(n=>{if(this.source==="popup"?n.sourceLayer&&n.getEffectivePopupTemplate():n.sourceLayer){let _=n.layer.globalIdField??"",y=n.getAttribute(_),w=o.get(y)??[];w.push(n),o.set(y,w)}})})});await Promise.all(c);let l=[];return await Promise.all(t.toArray().map(async r=>{let{fromNetworkElement:d,toNetworkElement:u}=r,h=d.globalId===this._globalId?u:d,m=o.get(h.globalId)??[];await Promise.all(m.map(async n=>{let _=this._utilityNetwork?.getTerminalById(h?.terminalId??void 0)?.name,y=await n.sourceLayer.getFeatureTitle(n)||this._getFeatureTitle(n);l.push({title:y,feature:n,association:r,terminalName:_})}))})),l}_destroyAssociatedFeatureViewModels(){this._associationViewModels.forEach(t=>t.destroyAll())}_equals(t,e){if(t.globalId===U&&e.globalId===U){let s=function(d,u){return d.networkSourceId===u.networkSourceId&&d.globalId===u.globalId&&d.terminalId===u.terminalId&&d.firstUnit===u.firstUnit&&d.numUnits===u.numUnits},a=t.fromNetworkElement,i=t.toNetworkElement,o=e.fromNetworkElement,c=e.toNetworkElement,l=s(a,o),r=s(i,c);return l&&r&&t.associationType===e.associationType}return t.globalId!=null&&e.globalId!=null&&t.globalId===e.globalId}async _findLayersBySourceId(t){let{_utilityNetwork:e,map:s}=this;e?.loaded||await e?.load();let a=e.getLayerIdBySourceId(t),i=s.allLayers.filter(c=>!!e?.isUtilityLayer(c)&&c.layerId===a),o=s.allTables.filter(c=>!!e?.isUtilityLayer(c)&&c.layerId===a);return i.concat(o).toArray()}_getAssociationsByType(t){switch(t){case"attachment":return this._attachmentAssociations;case"structure":return this._structureAssociations;case"connectivity":return this._connectivityAssociations;case"container":return this._containerAssociations;case"content":return this._contentAssociations}}_getAssociationTypeTitle(t){let{messages:e}=this;if(t.title)return t.title;switch(t.type){case"attachment":return e?.associationsAttachments??this.messages?.noTitle??"";case"connectivity":return e?.associationsConnectivity??this.messages?.noTitle??"";case"structure":return e?.associationsStructure??this.messages?.noTitle??"";case"content":return e?.associationsContents??this.messages?.noTitle??"";case"container":return e?.associationsContainer??this.messages?.noTitle??""}}_getFeatureCountForAssociationType(t){switch(t){case"attachment":return this._attachmentFeatureCount;case"structure":return this._structureFeatureCount;case"content":return this._contentFeatureCount;case"container":return this._containerFeatureCount;case"connectivity":return this._connectivityFeatureCount}}_getFeatureQueryWhereClause(t,e,s,a){let i=t.globalIdField,o=t.fieldsIndex.get(j.assetGroup),c=t.fieldsIndex.get(j.assetType),l=s!=null,r=a!=null,d=i?D.sqlIn(i,e):null,u=l?`(${o?.name} = ${s})`:null,h=l&&r?`(${c?.name} = ${a})`:null;return[d,u,h].filter(Boolean).join(" AND ")}_getFeatureTitle(t){let e=t.attributes,s=t.sourceLayer;if(!e||!s)return"";let a="displayField"in s?s.displayField:null,i=a!=null?e[a.toString()]:null,o=i!=null?i.toString():null,c=t.getObjectId()?.toString();return o||c||""}async _loadUtiltyNetworks(){let t=this.map;if(!t)return;t.utilityNetworks&&await Promise.allSettled(t.utilityNetworks.map(s=>s.load()));let e=this._utilityNetwork;if(e){let s=a=>{if("layerId"in a&&e.isUtilityLayer(a)){let i=a.layerId!=null?e.getSourceIdByLayerId(a.layerId):null;i!=null&&this._networkSourceIdsInUse.add(i)}};this._networkSourceIdsInUse=new Set,t.allLayers.forEach(s),t.allTables.forEach(s)}}async _loadLayers(t){let e=t.filter(s=>!s.loaded).map(s=>s.load());e.length&&await Promise.allSettled(e)}_matchesGlobalFeature(t,e){return this._equals(t.association,e.association)}async _queryAssociatedFeatures(t,e){let{layer:s,_globalId:a,associationTypes:i,_utilityNetwork:o,_canQuery:c,_associationFeatures:l}=this;if(await Promise.allSettled([s?.load(),o?.load()]),!c||!s||!i||!o)return;let r=this._getAssociationsByType(t.type),{associatedAssetGroup:d,associatedAssetType:u}=t,h=new Map;r.forEach(n=>{let{fromNetworkElement:_,toNetworkElement:y}=n,{networkSourceId:w,elementGlobalId:b}=_.globalId===a?{networkSourceId:y.networkSourceId,elementGlobalId:y.globalId}:{networkSourceId:_.networkSourceId,elementGlobalId:_.globalId},g=h.get(w)||[];g.push(b),h.set(w,g)});let m=await this._createAssociationFeatureObjects(r,h,d,u,e);this._parseFeatureObjects(m,l)}async _queryAssociations(t){let{layer:e,_globalId:s,associationTypes:a,_utilityNetwork:i,_canQuery:o}=this;if(await Promise.allSettled([e?.load(),i?.load()]),this._clearAssociations(),!o||!e||!a||!i||!s)return;let c=F(e)?e.parent:e,l=new P({globalId:s,networkSourceId:i.getSourceIdByLayerId(c.layerId)}),r=new Set;a.forEach(n=>{switch(n.type){case"attachment":case"structure":r.add("attachment");break;case"container":case"content":r.add("containment");break;case"connectivity":r.add("connectivity"),r.add("junction-junction-connectivity"),r.add("junction-edge-from-connectivity"),r.add("junction-edge-midspan-connectivity"),r.add("junction-edge-to-connectivity");break}});let d=await i?.queryAssociations(new x({elements:[l],types:Array.from(r)}),{signal:t?.signal}),u=new Map,h=new Map;a.forEach(n=>{h.set(n.type,n),u.set(n.type,[])}),d.forEach(n=>{let{toNetworkElement:_,fromNetworkElement:y}=n;switch(n.associationType){case"attachment":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"attachment",h))break;u.get("attachment")?.push(_.globalId),this._attachmentAssociations.add(n)}else{if(this._shouldDiscardNetworkElement(y,"structure",h))break;u.get("structure")?.push(y.globalId),this._structureAssociations.add(n)}break;case"connectivity":case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":case"junction-junction-connectivity":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"connectivity",h))break;u.get("connectivity")?.push(_.globalId)}else{if(this._shouldDiscardNetworkElement(y,"connectivity",h))break;u.get("connectivity")?.push(y.globalId)}this._connectivityAssociations.add(n);break;case"containment":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"content",h))break;u.get("content")?.push(_.globalId),this._contentAssociations.add(n)}else{if(this._shouldDiscardNetworkElement(y,"container",h))break;u.get("container")?.push(y.globalId),this._containerAssociations.add(n)}break}});let m=a.map(async n=>{let{associatedNetworkSourceId:_,associatedAssetGroup:y,associatedAssetType:w}=n,b=u.get(n.type),g=y!=null?await this._countAssociatedFeatures(_,b,y,w,t):b.length;switch(n.type){case"attachment":this._attachmentFeatureCount=g;break;case"connectivity":this._connectivityFeatureCount=g;break;case"container":this._containerFeatureCount=g;break;case"content":this._contentFeatureCount=g;break;case"structure":this._structureFeatureCount=g;break}});await Promise.allSettled(m)}async _queryFeatureCount(){await this._loadUtiltyNetworks();let{_queryFeatureCountAbortController:t,_canQuery:e}=this;if(!e){this._featureCount=0;return}await this._queryAssociations(t),this._featureCount=this._attachmentFeatureCount+this._connectivityFeatureCount+this._containerFeatureCount+this._contentFeatureCount+this._structureFeatureCount}async _queryLayer(t,e,s,a,i){let o=this._getFeatureQueryWhereClause(t,e,s,a),c=new O({where:o,outFields:["*"],cacheHint:this._supportsCacheHint}),l=G.fromJSON(await Q(t,c,i));return l.features.forEach(r=>{r.layer=E(t)?t.findSublayerForFeature(r):t,r.sourceLayer=r.layer}),l.features}_parseFeatureObjects(t,e){let s=C();t.forEach(a=>{let i=(a?.feature).sourceLayer;B(s,i,()=>new f).add(a)});for(let[a,i]of s)this._sortFeatureObjectsByTitle(i),e.set(a,i)}_selectAssociationType(t){let{flowItems:e}=this;e&&(this._activeAssociationType=t,this._setUpUtilityNetworkAssociationsViewModels(),this._addAssociationTypeFlowItem(t))}_setUpUtilityNetworkAssociationsViewModels(){this._associationViewModels.forEach((i,o)=>{let c=this._associationFeatures.get(o);c?i.forEach(l=>{c.find(r=>this._matchesGlobalFeature(l,r))||(i.remove(l),i.length||this._associationViewModels.delete(o))}):(i.removeAll(),this._associationViewModels.delete(o))});let{map:t,view:e,spatialReference:s,timeZone:a}=this;this._associationFeatures.forEach((i,o)=>{let c=this._associationViewModels.get(o)||new f;i?.filter(Boolean).forEach((l,r)=>{if(!c.some(d=>this._matchesGlobalFeature(d,l))){let{association:d,feature:u,terminalName:h,title:m}=l;c.add({title:m,association:d,featureViewModel:new R({abilities:{utilityNetworkAssociationsContent:!1},map:t,view:e,spatialReference:s,timeZone:a,graphic:u}),terminalName:h},r)}}),this._associationViewModels.set(o,c)})}_shouldDiscardNetworkElement(t,e,s){if(!t)return!1;let{networkSourceId:a}=t,i=s.get(e)?.associatedNetworkSourceId,o=this._networkSourceIdsInUse.has(a);return i!=null&&i!==a||!o}_sortFeatureObjectsByTitle(t){t.sort(this._compareByFeatureTitle)}render(){let{_state:t}=this;return p`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .headingLevel=${this.headingLevel} .description=${this.description}></arcgis-feature-element-info>${t==="loading"?this._renderLoading():t==="disabled"?this._renderAssociationNotFound():this._renderContent()}</div>`}_renderAssociationNotFound(){return p`<calcite-notice icon=information kind=info open scale=s width=full><div slot=message>${this.messages?.noAssociations}</div></calcite-notice>`}_renderAssociationTypeList(t){return this._getFeatureCountForAssociationType(t.type)>0?this._renderAssociationTypeListItem(t):null}_renderAssociationTypeListItem(t){let e=this._getAssociationTypeTitle(t);return A(`association-type-${t.type}`,p`<calcite-list-item .description=${S(t.description)} .label=${S(e)} .value=${t.type} @calciteListItemSelect=${()=>this._selectAssociationType(t)}><calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`)}_renderContent(){let{_state:t,associationTypes:e,messages:s}=this,a=s?.associationsList??s?.noTitle??"";return A("list-container",p`<div class="list-container">${t==="ready"?p`<div><calcite-list display-mode=flat .label=${a}>${e.map(i=>this._renderAssociationTypeList(i))}</calcite-list></div>`:null}${this._renderStickyLoading()}</div>`)}_renderLoading(){return p`<div class="loading-container">${this._renderLoadingIcon()}${this._renderStickyLoading()}</div>`}_renderLoadingIcon(){return p`<calcite-loader inline label></calcite-loader>`}_renderStickyLoading(){return this._state==="querying"?p`<div class="sticky-loading-container">${this._renderLoadingIcon()}</div>`:null}};N("arcgis-feature-utility-network-associations",v);return v},"applications/Components/featureUtils","applications/Components/stringUtils","core/Collection","core/promiseUtils","core/reactiveUtils","core/sql","rest/networks/support/NetworkElement","rest/networks/support/QueryAssociationsParameters","rest/support/FeatureSet","rest/support/Query","widgets/Feature/FeatureViewModel")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import a from"./DLB6EEQE.js";import"./CAXI6CJY.js";import{A as f,O as h,U as b,a as m,b as l}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([{renderingSanitizer:p},{replace:$},{k:u,l:v,m:I}])=>{var w=[{pattern:/^\s*(https?:\/\/([^\s]+))\s*$/iu,target:"_blank",label:"{messages.view}"},{pattern:/^\s*(tel:([^\s]+))\s*$/iu,label:"{hierPart}"},{pattern:/^\s*(mailto:([^\s]+))\s*$/iu,label:"{hierPart}"},{pattern:/^\s*(arcgis-appstudio-player:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"App Studio Player"},{pattern:/^\s*(arcgis-collector:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Collector"},{pattern:/^\s*(arcgis-explorer:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Explorer"},{pattern:/^\s*(arcgis-navigator:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Navigator"},{pattern:/^\s*(arcgis-survey123:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Survey123"},{pattern:/^\s*(arcgis-trek2there:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Trek2There"},{pattern:/^\s*(arcgis-workforce:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Workforce"},{pattern:/^\s*(iform:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"iForm"},{pattern:/^\s*(flow:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"FlowFinity"},{pattern:/^\s*(lfmobile:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Laserfische"},{pattern:/^\s*(mspbi:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Microsoft Power Bi"}];function F(d,a){let e=w.find(s=>s.pattern.test(a));if(!e)return a;let r=a.match(e.pattern)?.[2],o=$($(e.label,{messages:d,hierPart:r}),{appName:e.appName}),t=e.target?` target="${e.target}"`:"",n=e.target==="_blank"?' rel="noreferrer"':"";return p.sanitizeUrl(new URL(a,window.location.origin==="null"?void 0:window.location.origin).toString()).replace(e.pattern,`<a${t} href="$1"${n}>${o}</a>`)}var k=m`.table{border:none;width:100%;border-collapse:collapse;color:var(--calcite-color-text-2)}.table caption{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.table tr{background-color:var(--arcgis-table-row-background-color, var(--calcite-color-foreground-1))}.table tr:nth-child(odd){background-color:var(--arcgis-table-row-alt-background-color, var(--calcite-color-foreground-2))}.table tr a{color:var(--calcite-color-text-link)}.table tr a:hover,.table tr a:focus{color:var(--calcite-color-brand-hover)}.table tr td,.table tr th{padding:var(--calcite-spacing-xs) var(--calcite-spacing-sm);vertical-align:top;word-break:break-word;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular);line-height:var(--calcite-font-line-height-relative-normal)}.table tr th{border-inline-end:var(--calcite-border-width-md) solid var(--calcite-color-border-3);width:50%;text-align:start}.table tr td{width:50%}`,c=class extends h{constructor(){super(...arguments),this.headingLevel=2}static{this.properties={values:0,description:1,expressionInfos:0,fieldInfos:0,heading:1,isContentFieldInfos:5,graphic:0,layer:0,headingLevel:9,messages:0}}static{this.styles=k}get formattedFieldInfos(){let{expressionInfos:a,fieldInfos:e,layer:r,graphic:o,isContentFieldInfos:t}=this,n=[];return e?.forEach(s=>{if(!(!("visible"in s)||s.visible))return;let i=s.clone();i.label=v({fieldInfo:i,expressionInfos:a,layer:r,graphic:o,isContentFieldInfos:t});let g=u({fieldInfo:s,graphic:o,layer:r});g&&(i.fieldFormat=I({configurableFieldsContainer:g,fieldInfo:i,isContentFieldInfos:t})),n.push(i)}),n}render(){return l`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .description=${this.description} .headingLevel=${this.headingLevel}></arcgis-feature-element-info>${this._renderFields()}</div>`}_renderFieldInfo(a){let{values:e}=this,r=a.fieldName||"",o=a.label||r,t=e?e[r]==null?"":e[r]:"",n=a?.fieldFormat?.type==="date-time",s={openInApp:this.messages?.openInApp??"",view:this.messages?.view??""},i=typeof t=="number"&&!n?f(`${t}`):typeof t=="string"?F(s,t):`${t}`;return l`<tr><th .innerHTML=${p.sanitize(o)??""}></th><td .innerHTML=${p.sanitize(i)??""}></td></tr>`}_renderFields(){let{formattedFieldInfos:a}=this;return a?.length?l`<table class="table"><caption>${this.messages?.fieldsSummary}</caption><tbody>${a.map(e=>this._renderFieldInfo(e))}</tbody></table>`:null}};b("arcgis-feature-fields",c);return c},"applications/Components/sanitizerUtils","applications/Components/stringUtils",a)
2
+ import a from"./YET5HTLQ.js";import"./FF5VMKLK.js";import{A as f,O as h,U as b,a as m,b as l}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([{renderingSanitizer:p},{replace:$},{k:u,l:v,m:I}])=>{var w=[{pattern:/^\s*(https?:\/\/([^\s]+))\s*$/iu,target:"_blank",label:"{messages.view}"},{pattern:/^\s*(tel:([^\s]+))\s*$/iu,label:"{hierPart}"},{pattern:/^\s*(mailto:([^\s]+))\s*$/iu,label:"{hierPart}"},{pattern:/^\s*(arcgis-appstudio-player:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"App Studio Player"},{pattern:/^\s*(arcgis-collector:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Collector"},{pattern:/^\s*(arcgis-explorer:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Explorer"},{pattern:/^\s*(arcgis-navigator:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Navigator"},{pattern:/^\s*(arcgis-survey123:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Survey123"},{pattern:/^\s*(arcgis-trek2there:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Trek2There"},{pattern:/^\s*(arcgis-workforce:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Workforce"},{pattern:/^\s*(iform:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"iForm"},{pattern:/^\s*(flow:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"FlowFinity"},{pattern:/^\s*(lfmobile:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Laserfische"},{pattern:/^\s*(mspbi:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Microsoft Power Bi"}];function F(d,a){let e=w.find(s=>s.pattern.test(a));if(!e)return a;let r=a.match(e.pattern)?.[2],o=$($(e.label,{messages:d,hierPart:r}),{appName:e.appName}),t=e.target?` target="${e.target}"`:"",n=e.target==="_blank"?' rel="noreferrer"':"";return p.sanitizeUrl(new URL(a,window.location.origin==="null"?void 0:window.location.origin).toString()).replace(e.pattern,`<a${t} href="$1"${n}>${o}</a>`)}var k=m`.table{border:none;width:100%;border-collapse:collapse;color:var(--calcite-color-text-2)}.table caption{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.table tr{background-color:var(--arcgis-table-row-background-color, var(--calcite-color-foreground-1))}.table tr:nth-child(odd){background-color:var(--arcgis-table-row-alt-background-color, var(--calcite-color-foreground-2))}.table tr a{color:var(--calcite-color-text-link)}.table tr a:hover,.table tr a:focus{color:var(--calcite-color-brand-hover)}.table tr td,.table tr th{padding:var(--calcite-spacing-xs) var(--calcite-spacing-sm);vertical-align:top;word-break:break-word;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular);line-height:var(--calcite-font-line-height-relative-normal)}.table tr th{border-inline-end:var(--calcite-border-width-md) solid var(--calcite-color-border-3);width:50%;text-align:start}.table tr td{width:50%}`,c=class extends h{constructor(){super(...arguments),this.headingLevel=2}static{this.properties={values:0,description:1,expressionInfos:0,fieldInfos:0,heading:1,isContentFieldInfos:5,graphic:0,layer:0,headingLevel:9,messages:0}}static{this.styles=k}get formattedFieldInfos(){let{expressionInfos:a,fieldInfos:e,layer:r,graphic:o,isContentFieldInfos:t}=this,n=[];return e?.forEach(s=>{if(!(!("visible"in s)||s.visible))return;let i=s.clone();i.label=v({fieldInfo:i,expressionInfos:a,layer:r,graphic:o,isContentFieldInfos:t});let g=u({fieldInfo:s,graphic:o,layer:r});g&&(i.fieldFormat=I({configurableFieldsContainer:g,fieldInfo:i,isContentFieldInfos:t})),n.push(i)}),n}render(){return l`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .description=${this.description} .headingLevel=${this.headingLevel}></arcgis-feature-element-info>${this._renderFields()}</div>`}_renderFieldInfo(a){let{values:e}=this,r=a.fieldName||"",o=a.label||r,t=e?e[r]==null?"":e[r]:"",n=a?.fieldFormat?.type==="date-time",s={openInApp:this.messages?.openInApp??"",view:this.messages?.view??""},i=typeof t=="number"&&!n?f(`${t}`):typeof t=="string"?F(s,t):`${t}`;return l`<tr><th .innerHTML=${p.sanitize(o)??""}></th><td .innerHTML=${p.sanitize(i)??""}></td></tr>`}_renderFields(){let{formattedFieldInfos:a}=this;return a?.length?l`<table class="table"><caption>${this.messages?.fieldsSummary}</caption><tbody>${a.map(e=>this._renderFieldInfo(e))}</tbody></table>`:null}};b("arcgis-feature-fields",c);return c},"applications/Components/sanitizerUtils","applications/Components/stringUtils",a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import b from"./DLB6EEQE.js";import"./CAXI6CJY.js";import{b as $}from"./EHZW6UXL.js";import{O as A,P as y,Q as w,R as d,U as x,a as v,b as a}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([_,I,S,k,{watch:P},{d:u}])=>{function L(i){let e=i.toLowerCase();return e==="image/bmp"||e==="image/emf"||e==="image/exif"||e==="image/gif"||e==="image/x-icon"||e==="image/jpeg"||e==="image/png"||e==="image/tiff"||e==="image/x-wmf"}function T(i){return i?i==="text/plain"?"file-text":i==="application/pdf"?"file-pdf":i==="text/csv"?"file-csv":i==="application/gpx+xml"?"file-gpx":i==="application/x-dwf"?"file-cad":i==="application/postscript"||i==="application/json"||i==="text/xml"||i==="model/vrml"?"file-code":i==="application/x-zip-compressed"||i==="application/x-7z-compressed"||i==="application/x-gzip"||i==="application/x-tar"||i==="application/x-gtar"||i==="application/x-bzip2"||i==="application/gzip"||i==="application/x-compress"||i==="application/x-apple-diskimage"||i==="application/x-rar-compressed"||i==="application/zip"?"file-zip":i.includes("image/")?"file-image":i.includes("audio/")?"file-sound":i.includes("video/")?"file-video":i.includes("msexcel")||i.includes("ms-excel")||i.includes("spreadsheetml")?"file-excel":i.includes("msword")||i.includes("ms-word")||i.includes("wordprocessingml")?"file-word":i.includes("powerpoint")||i.includes("presentationml")?"file-report":"file":"file"}var j=v`.item-link{display:flex;flex-grow:1}.item-link img{max-width:100%;max-height:100%;object-fit:contain}.item-link--list{align-items:center;justify-content:center;width:64px;max-height:64px;overflow:hidden;border-radius:var(--calcite-corner-radius-sm)}.item-link--list img{border-radius:var(--calcite-corner-radius-sm)}.item-link--list-icon{border:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.item-link--list calcite-icon{margin:var(--calcite-spacing-lg)}.item-link--preview{align-items:center;justify-content:center}.item-link--preview calcite-icon{margin-block:var(--calcite-spacing-lg)}.item-description{text-align:center;word-wrap:break-word;word-break:break-word}calcite-link{--calcite-link-text-color: var(--calcite-color-text-3);padding-inline:var(--calcite-spacing-sm);word-wrap:break-word;word-break:break-word}calcite-card{width:100%}`,C=S.ofType(_),b=class extends A{constructor(){super(...arguments),this._attachmentInfos=new C,this._attachmentLayer=null,this._supportsImageOrientation=window?.CSS?.supports("image-orientation","from-image"),this.getAttachmentsPromise=null,this.hideSection=!1,this.headingLevel=2}static{this.properties={effectiveDisplayType:16,getAttachmentsPromise:16,hideSection:16,supportsResizeAttachments:16,attachmentKeywords:0,attachmentTypes:0,description:1,displayType:1,graphic:0,heading:1,messages:0,orderByFields:0,headingLevel:9}}static{this.styles=j}get _supportsTypeWildcard(){let{graphic:e}=this;if(!e)return!1;let t=u(e);return t?.loaded&&"capabilities"in t&&t.capabilities&&"attachment"in t.capabilities&&t.capabilities.attachment&&"supportsResize"in t.capabilities.attachment&&t.capabilities.attachment.supportsTypeWildcard||!1}get effectiveDisplayType(){let{displayType:e}=this;return!e||e==="auto"?this.supportsResizeAttachments?"preview":"list":e}get supportsResizeAttachments(){let{graphic:e}=this;if(!e)return!1;let t=u(e);return t?.loaded&&"capabilities"in t&&t.capabilities&&"attachment"in t.capabilities&&t.capabilities.attachment&&"supportsResize"in t.capabilities.attachment&&t.capabilities.attachment.supportsResize||!1}loaded(){this.manager.onLifecycle(()=>[P(()=>this.graphic,()=>this.graphicChanged(),{initial:!0})])}async getAttachments(){let{_attachmentLayer:e,_attachmentInfos:t,orderByFields:o,attachmentTypes:n,attachmentKeywords:s,_supportsTypeWildcard:g}=this;if(!e||typeof e.queryAttachments!="function")throw new k("invalid-layer","getAttachments(): A valid layer is required.");let l=this.graphic?.getObjectId();if(typeof l!="number")throw new k("invalid-object-id","getAttachments(): Numeric object id is required");let m=o?.map(c=>`${c.field} ${c.order==="descending"?"DESC":"ASC"}`),f=new I({objectIds:[l],returnMetadata:!0,orderByFields:m,attachmentTypes:g?n?.filter(Boolean).map(c=>`${c}/*`):void 0,keywords:s}),r=[],h=e.queryAttachments(f).then(c=>c[l]||r).catch(()=>r);this.getAttachmentsPromise=h;let p=await h;t.destroyAll(),p.length&&t.addMany(p),this.getAttachmentsPromise=null}setAttachmentLayer(){let{graphic:e}=this,t=u(e);this._attachmentLayer=t?t.type==="scene"&&t.associatedLayer!=null?t.associatedLayer:t:null}graphicChanged(){this.graphic&&(this.setAttachmentLayer(),this.getAttachments().catch(()=>this._attachmentInfos.destroyAll()))}getCSSTransform(e){let{orientationInfo:t}=e;return!this._supportsImageOrientation&&t?[t.rotation?`rotate(${t.rotation}deg)`:"",t.mirrored?"scaleX(-1)":""].join(" "):""}render(){return a`<div class="root" .hidden=${!(this.getAttachmentsPromise||this._attachmentInfos.length>0)}><arcgis-feature-element-info .heading=${this.heading} .description=${this.description} .headingLevel=${this.headingLevel}></arcgis-feature-element-info>${this.renderAttachments()}</div>`}renderAttachmentsList(e){return a`<calcite-list .loading=${!!this.getAttachmentsPromise} .label=${this.messages?.componentLabel??""} interaction-mode=static selection-mode=none>${e.toArray().filter(Boolean).map(t=>this.renderAttachmentListItem(t))}</calcite-list>`}renderAttachmentsPreview(e){return a`<calcite-card-group .label=${this.messages?.componentLabel??""}>${this.getAttachmentsPromise?a`<calcite-card loading></calcite-card>`:e.toArray().filter(Boolean).map(t=>this.renderAttachmentPreviewItem(t))}</calcite-card-group>`}renderAttachments(){let{effectiveDisplayType:e,_attachmentInfos:t}=this;return e==="preview"?this.renderAttachmentsPreview(t):this.renderAttachmentsList(t)}renderAttachmentListItem(e){let{supportsResizeAttachments:t}=this,{contentType:o,name:n,url:s,size:g}=e,l=64,m=n||this.messages?.noTitle,f=T(o),r=this.getCSSTransform(e),h=r?{transform:r,"image-orientation":"none"}:{},p=t&&L(o),c=a`<a class=${y($("item-link","item-link--list",{"item-link--list-icon":!p}))} slot=content-start href=${s??void 0??d} rel=noreferrer target=_blank>${p?a`<img alt=${n??d} src=${`${s}${s?.includes("?")?"&":"?"}w=${l}&s=${g}`} style=${w(h)} title=${n??d}>`:a`<calcite-icon .icon=${f}></calcite-icon>`}</a>`,z=a`<calcite-link slot=content .href=${s??void 0} rel=noreferrer target=_blank>${m}</calcite-link>`;return a`<calcite-list-item .label=${m}>${c}${z}</calcite-list-item>`}renderAttachmentPreviewItem(e){let{supportsResizeAttachments:t}=this,{contentType:o,name:n,url:s,size:g}=e,l=225,m=n||this.messages?.noTitle,f=T(o),r=this.getCSSTransform(e),h=r?{transform:r,"image-orientation":"none"}:{},p=a`<a class=${y($("item-link","item-link--preview"))} slot=thumbnail href=${s??void 0??d} rel=noreferrer target=_blank>${t&&L(o)?a`<img alt=${n??d} src=${`${s}${s?.includes("?")?"&":"?"}w=${l}&s=${g}`} style=${w(h)} title=${n??d}>`:a`<calcite-icon scale=l .icon=${f}></calcite-icon>`}</a>`;return a`<calcite-card .label=${m}>${p}<span class="item-description" slot=description>${m}</span></calcite-card>`}};x("arcgis-feature-attachments",b);return b},"rest/query/support/AttachmentInfo","rest/support/AttachmentQuery","core/Collection","core/Error","core/reactiveUtils",b)
2
+ import b from"./YET5HTLQ.js";import"./FF5VMKLK.js";import{b as $}from"./EHZW6UXL.js";import{O as A,P as y,Q as w,R as d,U as x,a as v,b as a}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([_,I,S,k,{watch:P},{d:u}])=>{function L(i){let e=i.toLowerCase();return e==="image/bmp"||e==="image/emf"||e==="image/exif"||e==="image/gif"||e==="image/x-icon"||e==="image/jpeg"||e==="image/png"||e==="image/tiff"||e==="image/x-wmf"}function T(i){return i?i==="text/plain"?"file-text":i==="application/pdf"?"file-pdf":i==="text/csv"?"file-csv":i==="application/gpx+xml"?"file-gpx":i==="application/x-dwf"?"file-cad":i==="application/postscript"||i==="application/json"||i==="text/xml"||i==="model/vrml"?"file-code":i==="application/x-zip-compressed"||i==="application/x-7z-compressed"||i==="application/x-gzip"||i==="application/x-tar"||i==="application/x-gtar"||i==="application/x-bzip2"||i==="application/gzip"||i==="application/x-compress"||i==="application/x-apple-diskimage"||i==="application/x-rar-compressed"||i==="application/zip"?"file-zip":i.includes("image/")?"file-image":i.includes("audio/")?"file-sound":i.includes("video/")?"file-video":i.includes("msexcel")||i.includes("ms-excel")||i.includes("spreadsheetml")?"file-excel":i.includes("msword")||i.includes("ms-word")||i.includes("wordprocessingml")?"file-word":i.includes("powerpoint")||i.includes("presentationml")?"file-report":"file":"file"}var j=v`.item-link{display:flex;flex-grow:1}.item-link img{max-width:100%;max-height:100%;object-fit:contain}.item-link--list{align-items:center;justify-content:center;width:64px;max-height:64px;overflow:hidden;border-radius:var(--calcite-corner-radius-sm)}.item-link--list img{border-radius:var(--calcite-corner-radius-sm)}.item-link--list-icon{border:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.item-link--list calcite-icon{margin:var(--calcite-spacing-lg)}.item-link--preview{align-items:center;justify-content:center}.item-link--preview calcite-icon{margin-block:var(--calcite-spacing-lg)}.item-description{text-align:center;word-wrap:break-word;word-break:break-word}calcite-link{--calcite-link-text-color: var(--calcite-color-text-3);padding-inline:var(--calcite-spacing-sm);word-wrap:break-word;word-break:break-word}calcite-card{width:100%}`,C=S.ofType(_),b=class extends A{constructor(){super(...arguments),this._attachmentInfos=new C,this._attachmentLayer=null,this._supportsImageOrientation=window?.CSS?.supports("image-orientation","from-image"),this.getAttachmentsPromise=null,this.hideSection=!1,this.headingLevel=2}static{this.properties={effectiveDisplayType:16,getAttachmentsPromise:16,hideSection:16,supportsResizeAttachments:16,attachmentKeywords:0,attachmentTypes:0,description:1,displayType:1,graphic:0,heading:1,messages:0,orderByFields:0,headingLevel:9}}static{this.styles=j}get _supportsTypeWildcard(){let{graphic:e}=this;if(!e)return!1;let t=u(e);return t?.loaded&&"capabilities"in t&&t.capabilities&&"attachment"in t.capabilities&&t.capabilities.attachment&&"supportsResize"in t.capabilities.attachment&&t.capabilities.attachment.supportsTypeWildcard||!1}get effectiveDisplayType(){let{displayType:e}=this;return!e||e==="auto"?this.supportsResizeAttachments?"preview":"list":e}get supportsResizeAttachments(){let{graphic:e}=this;if(!e)return!1;let t=u(e);return t?.loaded&&"capabilities"in t&&t.capabilities&&"attachment"in t.capabilities&&t.capabilities.attachment&&"supportsResize"in t.capabilities.attachment&&t.capabilities.attachment.supportsResize||!1}loaded(){this.manager.onLifecycle(()=>[P(()=>this.graphic,()=>this.graphicChanged(),{initial:!0})])}async getAttachments(){let{_attachmentLayer:e,_attachmentInfos:t,orderByFields:o,attachmentTypes:n,attachmentKeywords:s,_supportsTypeWildcard:g}=this;if(!e||typeof e.queryAttachments!="function")throw new k("invalid-layer","getAttachments(): A valid layer is required.");let l=this.graphic?.getObjectId();if(typeof l!="number")throw new k("invalid-object-id","getAttachments(): Numeric object id is required");let m=o?.map(c=>`${c.field} ${c.order==="descending"?"DESC":"ASC"}`),f=new I({objectIds:[l],returnMetadata:!0,orderByFields:m,attachmentTypes:g?n?.filter(Boolean).map(c=>`${c}/*`):void 0,keywords:s}),r=[],h=e.queryAttachments(f).then(c=>c[l]||r).catch(()=>r);this.getAttachmentsPromise=h;let p=await h;t.destroyAll(),p.length&&t.addMany(p),this.getAttachmentsPromise=null}setAttachmentLayer(){let{graphic:e}=this,t=u(e);this._attachmentLayer=t?t.type==="scene"&&t.associatedLayer!=null?t.associatedLayer:t:null}graphicChanged(){this.graphic&&(this.setAttachmentLayer(),this.getAttachments().catch(()=>this._attachmentInfos.destroyAll()))}getCSSTransform(e){let{orientationInfo:t}=e;return!this._supportsImageOrientation&&t?[t.rotation?`rotate(${t.rotation}deg)`:"",t.mirrored?"scaleX(-1)":""].join(" "):""}render(){return a`<div class="root" .hidden=${!(this.getAttachmentsPromise||this._attachmentInfos.length>0)}><arcgis-feature-element-info .heading=${this.heading} .description=${this.description} .headingLevel=${this.headingLevel}></arcgis-feature-element-info>${this.renderAttachments()}</div>`}renderAttachmentsList(e){return a`<calcite-list .loading=${!!this.getAttachmentsPromise} .label=${this.messages?.componentLabel??""} interaction-mode=static selection-mode=none>${e.toArray().filter(Boolean).map(t=>this.renderAttachmentListItem(t))}</calcite-list>`}renderAttachmentsPreview(e){return a`<calcite-card-group .label=${this.messages?.componentLabel??""}>${this.getAttachmentsPromise?a`<calcite-card loading></calcite-card>`:e.toArray().filter(Boolean).map(t=>this.renderAttachmentPreviewItem(t))}</calcite-card-group>`}renderAttachments(){let{effectiveDisplayType:e,_attachmentInfos:t}=this;return e==="preview"?this.renderAttachmentsPreview(t):this.renderAttachmentsList(t)}renderAttachmentListItem(e){let{supportsResizeAttachments:t}=this,{contentType:o,name:n,url:s,size:g}=e,l=64,m=n||this.messages?.noTitle,f=T(o),r=this.getCSSTransform(e),h=r?{transform:r,"image-orientation":"none"}:{},p=t&&L(o),c=a`<a class=${y($("item-link","item-link--list",{"item-link--list-icon":!p}))} slot=content-start href=${s??void 0??d} rel=noreferrer target=_blank>${p?a`<img alt=${n??d} src=${`${s}${s?.includes("?")?"&":"?"}w=${l}&s=${g}`} style=${w(h)} title=${n??d}>`:a`<calcite-icon .icon=${f}></calcite-icon>`}</a>`,z=a`<calcite-link slot=content .href=${s??void 0} rel=noreferrer target=_blank>${m}</calcite-link>`;return a`<calcite-list-item .label=${m}>${c}${z}</calcite-list-item>`}renderAttachmentPreviewItem(e){let{supportsResizeAttachments:t}=this,{contentType:o,name:n,url:s,size:g}=e,l=225,m=n||this.messages?.noTitle,f=T(o),r=this.getCSSTransform(e),h=r?{transform:r,"image-orientation":"none"}:{},p=a`<a class=${y($("item-link","item-link--preview"))} slot=thumbnail href=${s??void 0??d} rel=noreferrer target=_blank>${t&&L(o)?a`<img alt=${n??d} src=${`${s}${s?.includes("?")?"&":"?"}w=${l}&s=${g}`} style=${w(h)} title=${n??d}>`:a`<calcite-icon scale=l .icon=${f}></calcite-icon>`}</a>`;return a`<calcite-card .label=${m}>${p}<span class="item-description" slot=description>${m}</span></calcite-card>`}};x("arcgis-feature-attachments",b);return b},"rest/query/support/AttachmentInfo","rest/support/AttachmentQuery","core/Collection","core/Error","core/reactiveUtils",b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{E as L,F as R,M as y,O as k,h as x}from"./IPIYZVAJ.js";import{N as b,Q as V,d as $,f as C,o as G,q as D,u as w}from"./JWJHIBYW.js";import{a as B}from"./GPGC63RW.js";import{O as E,g as m,o as M}from"./PILEMW25.js";var c=class extends R{_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),r=t/Math.abs(t),i=0,a=0,l=this.get("strokeWidth",0);this.get("containStroke",!1)&&(e-=s*l,t-=r*l,i+=s*l/2,a+=r*l/2);let n=e,h=t;if(m(n)&&m(h)){let o=Math.min(n,h)/2,u=w(this.get("cornerRadiusTL",8),o),d=w(this.get("cornerRadiusTR",8),o),g=w(this.get("cornerRadiusBR",8),o),f=w(this.get("cornerRadiusBL",8),o),_=Math.min(Math.abs(n/2),Math.abs(h/2));u=x(u,0,_),d=x(d,0,_),g=x(g,0,_),f=x(f,0,_);let p=this._display;p.moveTo(i+u*s,a),p.lineTo(i+n-d*s,a),d>0&&p.arcTo(i+n,a,i+n,a+d*r,d),p.lineTo(i+n,a+h-g*r),g>0&&p.arcTo(i+n,a+h,i+n-g*s,a+h,g),p.lineTo(i+f*s,a+h),f>0&&p.arcTo(i,a+h,i,a+h-f*r,f),p.lineTo(i,a+u*r),u>0&&p.arcTo(i,a,i+u*s,a,u),p.closePath()}}};c.className="RoundedRectangle";c.classNames=R.classNames.concat([c.className]);var v=class extends y{_afterNew(){this._settings.themeTags=b(this._settings.themeTags,["button"]),super._afterNew(),this._settings.background||this.set("background",c.new(this._root,{themeTags:b(this._settings.themeTags,["background"])})),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)}}};v.className="Button";v.classNames=y.classNames.concat([v.className]);var T=class extends k{_afterNew(){super._afterNew();let e=this.children.push(y.new(this._root,{html:'<textarea class="am5-editable-label"></textarea>',isMeasured:!1}));e.hide(),this.setPrivate("input",e);let t=this.get("background");t?t.set("themeTags",["editablelabel","background"]):t=this.set("background",c.new(this._root,{themeTags:["editablelabel","background"]}))}_beforeChanged(){if(super._beforeChanged(),this.isDirty("editOn")){this._editOnEvents&&this._editOnEvents.dispose();let e=this.get("editOn","click");e!="none"&&(this._editOnEvents=new E([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",r=>{this.get("multiLine")===!1&&(s.value=s.value.replace(/\n/g," ")),this.set("text",s.value),this._syncStyle()}),s.addEventListener("blur",r=>this.set("active",!1)),C("keyboardevents")&&this._disposers.push($(document,"keydown",r=>{D(r)=="Escape"&&this.set("active",!1)})),this._disposers.push($(document,"keydown",r=>{D(r)=="Enter"&&this.get("multiLine")===!1&&(r.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 r=window.getComputedStyle(t);M(r,d=>{t.style[d]="initial"}),t.style.color=this.get("fill",V(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 i=this.get("maxWidth",0)-this.get("paddingLeft",0)-this.get("paddingRight",0);i>0?t.style.maxWidth=i+"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 B?t.style.lineHeight=a.value+"":m(a)&&(t.style.lineHeight=a+""):t.style.lineHeight="1.2";let l=this.get("fontFamily");l||(l=getComputedStyle(s,"font-family").getPropertyValue("font-family")),t.style.fontFamily=l;let n=this.get("fontSize");n?m(n)?n=n+"px":n=n:n=getComputedStyle(s,"font-size").getPropertyValue("font-size"),t.style.fontSize=n;let h=this.get("fontWeight");h?h=h:h=getComputedStyle(s,"font-weight").getPropertyValue("font-weight"),t.style.fontWeight=h;let o=this.get("fontStyle");o?o=o:o=getComputedStyle(s,"font-style").getPropertyValue("font-style"),t.style.fontStyle=o,this.get("oversizedBehavior")=="wrap"?t.style.whiteSpace="pre-wrap":t.style.whiteSpace="nowrap",this._root.events.on("frameended",()=>{t.style.minWidth==""&&(t.style.minWidth=t.scrollWidth+20+"px");let d=this.get("textAlign","start");d=="center"?(t.style.textAlign="center",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-50%)")):d=="end"?(t.style.textAlign="right",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-100%)")):t.style.textAlign=d})}}_syncText(){let e=this.getPrivate("textarea"),t=this.get("text","");t==" "&&(t=""),e&&(e.value=t)}};T.className="EditableLabel";T.classNames=k.classNames.concat([T.className]);var N=class extends y{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=b(this._settings.themeTags,["scrollbar",this._settings.orientation]),this._settings.background||(this._settings.background=c.new(this._root,{themeTags:b(this._settings.themeTags,["main","background"])}))}_makeButton(){return this.children.push(v.new(this._root,{themeTags:["resize","button",this.get("orientation")],icon:L.new(this._root,{themeTags:["icon"]})}))}_makeThumb(){return this.children.push(c.new(this._root,{themeTags:["thumb",this.get("orientation")]}))}_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,r=this.get("background");r&&this._disposers.push(r.events.on("click",i=>{this.setPrivateRaw("isBusy",!0);let a=this._display.toLocal(i.point),l=this.width(),n=this.height(),h=this.get("orientation"),o;h=="vertical"?o=(a.y-s.height()/2)/n:o=(a.x-s.width()/2)/l;let u,d;h=="vertical"?(u=o*n,d="y"):(u=o*l,d="x");let g=this.get("animationDuration",0);g>0?(this._thumbBusy=!0,this._handleAnimation(this.thumb.animate({key:d,to:u,duration:g,easing:this.get("animationEasing")}))):(this.thumb.set(d,u),this._root.events.once("frameended",()=>{this.setPrivateRaw("isBusy",!1)}))})),this._disposers.push(s.events.on("dblclick",i=>{if(!G(i.originalEvent,this))return;let a=this.get("animationDuration",0),l=this.get("animationEasing");this.animate({key:"start",to:0,duration:a,easing:l}),this.animate({key:"end",to:1,duration:a,easing:l})})),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.set("x",0),t.set("x",0),this._disposers.push(s.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()-s.height()),0))),this._disposers.push(s.adapters.add("x",i=>this.width()/2)),this._disposers.push(e.adapters.add("x",i=>this.width()/2)),this._disposers.push(t.adapters.add("x",i=>this.width()/2)),this._disposers.push(e.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()),0))),this._disposers.push(t.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()),0)))):(e.set("y",0),t.set("y",0),this._disposers.push(s.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()-s.width()),0))),this._disposers.push(s.adapters.add("y",i=>this.height()/2)),this._disposers.push(e.adapters.add("y",i=>this.height()/2)),this._disposers.push(t.adapters.add("y",i=>this.height()/2)),this._disposers.push(e.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()),0))),this._disposers.push(t.adapters.add("x",i=>Math.max(Math.min(Number(i),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"),r=this.height(),i=this.width();s=="vertical"?(e.set("y",r*this.get("start",0)),t.set("y",r*this.get("end",1))):(e.set("x",i*this.get("start",0)),t.set("x",i*this.get("end",1)));let a=this.getPrivate("positionTextFunction"),l=Math.round(this.get("start",0)*100),n=Math.round(this.get("end",0)*100),h,o;a?(h=a.call(this,this.get("start",0)),o=a.call(this,this.get("end",0))):(h=l+"%",o=n+"%"),e.set("ariaLabel",this._t("From %1",void 0,h)),e.set("ariaValueNow",""+l),e.set("ariaValueText",l+"%"),e.set("ariaValueMin","0"),e.set("ariaValueMax","100"),t.set("ariaLabel",this._t("To %1",void 0,o)),t.set("ariaValueNow",""+n),t.set("ariaValueText",n+"%"),t.set("ariaValueMin","0"),t.set("ariaValueMax","100")}_updateThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip,r=this.height(),i=this.width(),a=t.x(),l=s.x(),n=t.y(),h=s.y(),o=0,u=1;this.get("orientation")=="vertical"?m(n)&&m(h)&&(!this._thumbBusy&&!e.isDragging()&&(e.set("height",h-n),e.set("y",n)),o=n/r,u=h/r):m(a)&&m(l)&&(!this._thumbBusy&&!e.isDragging()&&(e.set("width",l-a),e.set("x",a)),o=a/i,u=l/i),this.getPrivate("isBusy")&&(this.get("start")!=o||this.get("end")!=u)&&(this.set("start",o),this.set("end",u));let d=this.getPrivate("positionTextFunction"),g=Math.round(this.get("start",0)*100),f=Math.round(this.get("end",0)*100),_,p;d?(_=d.call(this,this.get("start",0)),p=d.call(this,this.get("end",0))):(_=g+"%",p=f+"%"),e.set("ariaLabel",this._t("From %1 to %2",void 0,_,p)),e.set("ariaValueNow",""+g),e.set("ariaValueText",g+"%")}_updateGripsByThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip;if(this.get("orientation")=="vertical"){let r=e.height();t.set("y",e.y()),s.set("y",e.y()+r)}else{let r=e.width();t.set("x",e.x()),s.set("x",e.x()+r)}}};N.className="Scrollbar";N.classNames=y.classNames.concat([N.className]);export{c as a,v as b,T as c,N as d};
2
+ import{E as L,F as R,P as y,R as k,h as x}from"./FWXI6DGS.js";import{N as b,Q as V,d as $,f as C,o as G,q as D,u as w}from"./P2ABZVPJ.js";import{a as B}from"./XEXCDGSR.js";import{O as E,g as m,o as M}from"./DQH27QCF.js";var c=class extends R{_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),r=t/Math.abs(t),i=0,a=0,l=this.get("strokeWidth",0);this.get("containStroke",!1)&&(e-=s*l,t-=r*l,i+=s*l/2,a+=r*l/2);let n=e,h=t;if(m(n)&&m(h)){let o=Math.min(n,h)/2,u=w(this.get("cornerRadiusTL",8),o),d=w(this.get("cornerRadiusTR",8),o),g=w(this.get("cornerRadiusBR",8),o),f=w(this.get("cornerRadiusBL",8),o),_=Math.min(Math.abs(n/2),Math.abs(h/2));u=x(u,0,_),d=x(d,0,_),g=x(g,0,_),f=x(f,0,_);let p=this._display;p.moveTo(i+u*s,a),p.lineTo(i+n-d*s,a),d>0&&p.arcTo(i+n,a,i+n,a+d*r,d),p.lineTo(i+n,a+h-g*r),g>0&&p.arcTo(i+n,a+h,i+n-g*s,a+h,g),p.lineTo(i+f*s,a+h),f>0&&p.arcTo(i,a+h,i,a+h-f*r,f),p.lineTo(i,a+u*r),u>0&&p.arcTo(i,a,i+u*s,a,u),p.closePath()}}};c.className="RoundedRectangle";c.classNames=R.classNames.concat([c.className]);var v=class extends y{_afterNew(){this._settings.themeTags=b(this._settings.themeTags,["button"]),super._afterNew(),this._settings.background||this.set("background",c.new(this._root,{themeTags:b(this._settings.themeTags,["background"])})),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)}}};v.className="Button";v.classNames=y.classNames.concat([v.className]);var T=class extends k{_afterNew(){super._afterNew();let e=this.children.push(y.new(this._root,{html:'<textarea class="am5-editable-label"></textarea>',isMeasured:!1}));e.hide(),this.setPrivate("input",e);let t=this.get("background");t?t.set("themeTags",["editablelabel","background"]):t=this.set("background",c.new(this._root,{themeTags:["editablelabel","background"]}))}_beforeChanged(){if(super._beforeChanged(),this.isDirty("editOn")){this._editOnEvents&&this._editOnEvents.dispose();let e=this.get("editOn","click");e!="none"&&(this._editOnEvents=new E([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",r=>{this.get("multiLine")===!1&&(s.value=s.value.replace(/\n/g," ")),this.set("text",s.value),this._syncStyle()}),s.addEventListener("blur",r=>this.set("active",!1)),C("keyboardevents")&&this._disposers.push($(document,"keydown",r=>{D(r)=="Escape"&&this.set("active",!1)})),this._disposers.push($(document,"keydown",r=>{D(r)=="Enter"&&this.get("multiLine")===!1&&(r.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 r=window.getComputedStyle(t);M(r,d=>{t.style[d]="initial"}),t.style.color=this.get("fill",V(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 i=this.get("maxWidth",0)-this.get("paddingLeft",0)-this.get("paddingRight",0);i>0?t.style.maxWidth=i+"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 B?t.style.lineHeight=a.value+"":m(a)&&(t.style.lineHeight=a+""):t.style.lineHeight="1.2";let l=this.get("fontFamily");l||(l=getComputedStyle(s,"font-family").getPropertyValue("font-family")),t.style.fontFamily=l;let n=this.get("fontSize");n?m(n)?n=n+"px":n=n:n=getComputedStyle(s,"font-size").getPropertyValue("font-size"),t.style.fontSize=n;let h=this.get("fontWeight");h?h=h:h=getComputedStyle(s,"font-weight").getPropertyValue("font-weight"),t.style.fontWeight=h;let o=this.get("fontStyle");o?o=o:o=getComputedStyle(s,"font-style").getPropertyValue("font-style"),t.style.fontStyle=o,this.get("oversizedBehavior")=="wrap"?t.style.whiteSpace="pre-wrap":t.style.whiteSpace="nowrap",this._root.events.on("frameended",()=>{t.style.minWidth==""&&(t.style.minWidth=t.scrollWidth+20+"px");let d=this.get("textAlign","start");d=="center"?(t.style.textAlign="center",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-50%)")):d=="end"?(t.style.textAlign="right",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-100%)")):t.style.textAlign=d})}}_syncText(){let e=this.getPrivate("textarea"),t=this.get("text","");t==" "&&(t=""),e&&(e.value=t)}};T.className="EditableLabel";T.classNames=k.classNames.concat([T.className]);var N=class extends y{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=b(this._settings.themeTags,["scrollbar",this._settings.orientation]),this._settings.background||(this._settings.background=c.new(this._root,{themeTags:b(this._settings.themeTags,["main","background"])}))}_makeButton(){return this.children.push(v.new(this._root,{themeTags:["resize","button",this.get("orientation")],icon:L.new(this._root,{themeTags:["icon"]})}))}_makeThumb(){return this.children.push(c.new(this._root,{themeTags:["thumb",this.get("orientation")]}))}_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,r=this.get("background");r&&this._disposers.push(r.events.on("click",i=>{this.setPrivateRaw("isBusy",!0);let a=this._display.toLocal(i.point),l=this.width(),n=this.height(),h=this.get("orientation"),o;h=="vertical"?o=(a.y-s.height()/2)/n:o=(a.x-s.width()/2)/l;let u,d;h=="vertical"?(u=o*n,d="y"):(u=o*l,d="x");let g=this.get("animationDuration",0);g>0?(this._thumbBusy=!0,this._handleAnimation(this.thumb.animate({key:d,to:u,duration:g,easing:this.get("animationEasing")}))):(this.thumb.set(d,u),this._root.events.once("frameended",()=>{this.setPrivateRaw("isBusy",!1)}))})),this._disposers.push(s.events.on("dblclick",i=>{if(!G(i.originalEvent,this))return;let a=this.get("animationDuration",0),l=this.get("animationEasing");this.animate({key:"start",to:0,duration:a,easing:l}),this.animate({key:"end",to:1,duration:a,easing:l})})),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.set("x",0),t.set("x",0),this._disposers.push(s.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()-s.height()),0))),this._disposers.push(s.adapters.add("x",i=>this.width()/2)),this._disposers.push(e.adapters.add("x",i=>this.width()/2)),this._disposers.push(t.adapters.add("x",i=>this.width()/2)),this._disposers.push(e.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()),0))),this._disposers.push(t.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()),0)))):(e.set("y",0),t.set("y",0),this._disposers.push(s.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()-s.width()),0))),this._disposers.push(s.adapters.add("y",i=>this.height()/2)),this._disposers.push(e.adapters.add("y",i=>this.height()/2)),this._disposers.push(t.adapters.add("y",i=>this.height()/2)),this._disposers.push(e.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()),0))),this._disposers.push(t.adapters.add("x",i=>Math.max(Math.min(Number(i),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"),r=this.height(),i=this.width();s=="vertical"?(e.set("y",r*this.get("start",0)),t.set("y",r*this.get("end",1))):(e.set("x",i*this.get("start",0)),t.set("x",i*this.get("end",1)));let a=this.getPrivate("positionTextFunction"),l=Math.round(this.get("start",0)*100),n=Math.round(this.get("end",0)*100),h,o;a?(h=a.call(this,this.get("start",0)),o=a.call(this,this.get("end",0))):(h=l+"%",o=n+"%"),e.set("ariaLabel",this._t("From %1",void 0,h)),e.set("ariaValueNow",""+l),e.set("ariaValueText",l+"%"),e.set("ariaValueMin","0"),e.set("ariaValueMax","100"),t.set("ariaLabel",this._t("To %1",void 0,o)),t.set("ariaValueNow",""+n),t.set("ariaValueText",n+"%"),t.set("ariaValueMin","0"),t.set("ariaValueMax","100")}_updateThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip,r=this.height(),i=this.width(),a=t.x(),l=s.x(),n=t.y(),h=s.y(),o=0,u=1;this.get("orientation")=="vertical"?m(n)&&m(h)&&(!this._thumbBusy&&!e.isDragging()&&(e.set("height",h-n),e.set("y",n)),o=n/r,u=h/r):m(a)&&m(l)&&(!this._thumbBusy&&!e.isDragging()&&(e.set("width",l-a),e.set("x",a)),o=a/i,u=l/i),this.getPrivate("isBusy")&&(this.get("start")!=o||this.get("end")!=u)&&(this.set("start",o),this.set("end",u));let d=this.getPrivate("positionTextFunction"),g=Math.round(this.get("start",0)*100),f=Math.round(this.get("end",0)*100),_,p;d?(_=d.call(this,this.get("start",0)),p=d.call(this,this.get("end",0))):(_=g+"%",p=f+"%"),e.set("ariaLabel",this._t("From %1 to %2",void 0,_,p)),e.set("ariaValueNow",""+g),e.set("ariaValueText",g+"%")}_updateGripsByThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip;if(this.get("orientation")=="vertical"){let r=e.height();t.set("y",e.y()),s.set("y",e.y()+r)}else{let r=e.width();t.set("x",e.x()),s.set("x",e.x()+r)}}};N.className="Scrollbar";N.classNames=y.classNames.concat([N.className]);export{c as a,v as b,T as c,N as d};