/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{d as a}from"./DPJE33GY.js";import{g}from"./UG7LOBJE.js";import b from"./AD6GOUND.js";import{n as r}from"./4B3QBH5T.js";import"./FUPYXGG6.js";import"./NKG4FLLR.js";import{F as h,g as n,h as s,z as c}from"./RPU6VCJ4.js";import"./OR4HXHSY.js";export default $arcgis.t(([,,,,,,,,,,,,,,,{Kc:d,Mc:m}])=>{var p=n`:host{overflow-y:auto;overflow-x:hidden;margin-bottom:var(--arcgis-charts-intra-section-margin);margin-top:var(--arcgis-charts-intra-section-margin);height:100%}`,l=class extends c{constructor(){super(...arguments),this.onModelConfigChange=async e=>{let o=e?.detail.config??this.model.config;this.layer===void 0&&await this.updateFetchLayerFieldsInfo(o)},this.activeColorMatch=!1,this.popoverPlacement="leading"}static{this.properties={layerFieldsInfo:16,activeColorMatch:16,model:0,popoverPlacement:1,seriesColor:0,page:1,calculatedMinMaxBounds:0,layer:0,usePopupTemplateFieldsInfo:5}}static{this.styles=p}async load(){this.seriesColor!==void 0&&this.seriesColorChange(this.seriesColor),await this.updateFetchLayerFieldsInfo(this.model?.config),this.modelChange(this.model),this.updateDataFilters()}willUpdate(e){let o=!1;e.has("model")&&this.modelChange(this.model,e.get("model")),e.has("layer")&&this.layer!==void 0&&!r(e.get("layer"),this.layer)&&(o=!0),e.has("usePopupTemplateFieldsInfo")&&this.usePopupTemplateFieldsInfo!==e.get("usePopupTemplateFieldsInfo")&&(o=!0),e.has("seriesColor")&&this.seriesColorChange(this.seriesColor),this.layerFieldsInfo===void 0&&(o=!0),o&&this.updateFetchLayerFieldsInfo()}disconnectedCallback(){super.disconnectedCallback(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}modelChange(e,o){o?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),e?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}seriesColorChange(e){this.activeColorMatch=e?.get(0)===void 0,this.model.colorMatch&&e?.forEach((o,i)=>{let t;o&&("fillSymbol"in o?t=o.fillSymbol?.color:"lineSymbol"in o&&(t=o.lineSymbol.color)),e?.get(0)!==void 0&&t!==void 0&&!r(this.model.getSeriesColor(i),t)&&this.model.setSeriesColor(t,i)})}async updateDataFilters(){let e=this.model.getDataFilters(),o=e?.where,i=this.layer?.definitionExpression??void 0;r(o,i)||await this.model.setDataFilters({...e,where:i??void 0})}async updateFetchLayerFieldsInfo(e){let o=e??this.model.config,i=this.layer;if(!i){let t=g(o)?o.iLayer:void 0;t&&(i=await d(t))}i&&(this.layerFieldsInfo=await m(i,this.usePopupTemplateFieldsInfo))}render(){let e;switch(this.page){case a.Data:e=s`<arcgis-charts-config-box-plot-data .model=${this.model} .layerFieldsInfo=${this.layerFieldsInfo}></arcgis-charts-config-box-plot-data>`;break;case a.Series:e=s`<arcgis-charts-config-box-plot-series .model=${this.model} .activeColorMatch=${this.activeColorMatch} .popoverPlacement=${this.popoverPlacement}></arcgis-charts-config-box-plot-series>`;break;case a.Axes:e=s`<arcgis-charts-config-axes .model=${this.model} show-min-y-bound-option show-max-y-bound-option .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-axes>`;break;case a.Guides:e=s`<arcgis-charts-config-guides .model=${this.model} enable-y-axis-guide></arcgis-charts-config-guides>`;break;case a.Format:e=s`<arcgis-charts-config-format .model=${this.model}></arcgis-charts-config-format>`;break;case a.General:e=s`<arcgis-charts-config-general .model=${this.model}></arcgis-charts-config-general>`;break;default:e="";break}return e}};h("arcgis-charts-config-box-plot",l);return l},"Graphic","renderers/support/jsonUtils","symbols/support/symbolUtils","intl","layers/support/FeatureFilter","smartMapping/statistics/histogram","smartMapping/statistics/summaryStatistics","request","core/sql","AttributeBinsGraphic","geometry/support/jsonUtils","rest/support/AttributeBinsQuery","rest/support/StatisticDefinition","time/TimeExtent","core/promiseUtils",b)