@arcgis/common-components 5.1.0-next.2 → 5.1.0-next.21

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 (53) hide show
  1. package/README.md +24 -1
  2. package/dist/cdn/23DDMSOB.js +2 -0
  3. package/dist/cdn/3O7GAC23.js +2 -0
  4. package/dist/cdn/4CW7U27R.js +2 -0
  5. package/dist/cdn/4DCAUWTC.js +2 -0
  6. package/dist/cdn/EKKJN7WZ.js +2 -0
  7. package/dist/cdn/GAR4QMLU.js +2 -0
  8. package/dist/cdn/JTRO7GRS.js +2 -0
  9. package/dist/cdn/ZLXAKPUH.js +2 -0
  10. package/dist/cdn/index.js +1 -1
  11. package/dist/chunks/commonFunctions.js +3 -13
  12. package/dist/components/arcgis-ckeditor5/customElement.d.ts +1 -0
  13. package/dist/components/arcgis-ckeditor5/types.d.ts +9 -0
  14. package/dist/components/arcgis-ckeditor5-popover/customElement.d.ts +1 -0
  15. package/dist/components/arcgis-color-input/customElement.d.ts +1 -0
  16. package/dist/components/arcgis-field-info/customElement.d.ts +1 -0
  17. package/dist/components/arcgis-field-info/customElement.js +10 -10
  18. package/dist/components/arcgis-field-info/utils/basic.d.ts +1 -0
  19. package/dist/components/arcgis-field-pick-list/customElement.d.ts +1 -0
  20. package/dist/components/arcgis-field-pick-list/utils/types.d.ts +5 -1
  21. package/dist/components/arcgis-histogram/customElement.d.ts +46 -28
  22. package/dist/components/arcgis-label-input/customElement.d.ts +5 -4
  23. package/dist/components/arcgis-picker-input/customElement.d.ts +1 -0
  24. package/dist/components/arcgis-ramp-color/customElement.d.ts +2 -0
  25. package/dist/components/arcgis-ramp-color-break/customElement.d.ts +2 -0
  26. package/dist/components/arcgis-ramp-opacity/customElement.d.ts +1 -0
  27. package/dist/components/arcgis-slider/customElement.d.ts +269 -73
  28. package/dist/components/arcgis-slider/customElement.js +318 -289
  29. package/dist/components/arcgis-slider-input/customElement.d.ts +1 -0
  30. package/dist/components/arcgis-ticks/customElement.d.ts +101 -13
  31. package/dist/components/arcgis-ticks/customElement.js +27 -27
  32. package/dist/components/arcgis-ticks/types.d.ts +23 -0
  33. package/dist/components/arcgis-unique-values-list/customElement.d.ts +8 -1
  34. package/dist/components/arcgis-unique-values-list/customElement.js +155 -149
  35. package/dist/components/arcgis-unique-values-list/utils/basic.d.ts +1 -0
  36. package/dist/docs/api.json +1 -1
  37. package/dist/docs/docs.json +1 -1
  38. package/dist/docs/vscode.html-custom-data.json +1 -1
  39. package/dist/docs/web-types.json +1 -1
  40. package/dist/loader.js +2 -2
  41. package/dist/types/lumina.d.ts +2 -2
  42. package/dist/types/preact.d.ts +2 -2
  43. package/dist/types/react.d.ts +2 -2
  44. package/dist/types/stencil.d.ts +2 -2
  45. package/dist/utils/types.d.ts +24 -7
  46. package/package.json +3 -3
  47. package/dist/cdn/6MGBOM6S.js +0 -2
  48. package/dist/cdn/6NYYZIHB.js +0 -2
  49. package/dist/cdn/BAVGT3I5.js +0 -2
  50. package/dist/cdn/GQLKGVRX.js +0 -2
  51. package/dist/cdn/P45VPBNI.js +0 -2
  52. package/dist/cdn/S7T3XQPB.js +0 -2
  53. package/dist/cdn/ZP76EPVI.js +0 -2
@@ -79,7 +79,7 @@ interface ReactArcgisRampColorBreak extends Partial<Pick<ArcgisRampColorBreak, "
79
79
  interface ReactArcgisRampOpacity extends Partial<Pick<ArcgisRampOpacity, "fillColor" | "layout" | "max" | "min" | "stops">>, HTMLProps<ArcgisRampOpacity> {
80
80
  }
81
81
 
82
- interface ReactArcgisSlider extends Partial<Pick<ArcgisSlider, "allowValuesOverlap" | "autoDestroyDisabled" | "disabled" | "fillPlacement" | "fullRangeMax" | "fullRangeMin" | "labelFormatter" | "layout" | "max" | "messageOverrides" | "min" | "mirrored" | "popoverLabel" | "popoverPlacement" | "precision" | "rangeLabelsEditingEnabled" | "rangeLabelsPlacement" | "segmentsDraggingDisabled" | "showRangeLabels" | "steps" | "valueLabelsDisplay" | "valueLabelsEditingEnabled" | "valueLabelsPlacement" | "values">>, HTMLProps<ArcgisSlider> {
82
+ interface ReactArcgisSlider extends Partial<Pick<ArcgisSlider, "allowValuesOverlap" | "autoDestroyDisabled" | "disabled" | "fillPlacement" | "fullRangeMax" | "fullRangeMin" | "keyboardLargeStep" | "labelFormatter" | "layout" | "max" | "messageOverrides" | "min" | "mirrored" | "popoverLabel" | "popoverPlacement" | "precision" | "rangeLabelsEditingEnabled" | "rangeLabelsPlacement" | "segmentsDraggingDisabled" | "showRangeLabels" | "steps" | "valueLabelsDisplay" | "valueLabelsEditingEnabled" | "valueLabelsPlacement" | "values">>, HTMLProps<ArcgisSlider> {
83
83
  onarcgisActiveValueChange?: EventHandler<ArcgisSlider["arcgisActiveValueChange"]>;
84
84
  onarcgisChange?: EventHandler<ArcgisSlider["arcgisChange"]>;
85
85
  onarcgisInput?: EventHandler<ArcgisSlider["arcgisInput"]>;
@@ -95,7 +95,7 @@ interface ReactArcgisTicks extends Partial<Pick<ArcgisTicks, "interactive" | "in
95
95
  onarcgisTickClick?: EventHandler<ArcgisTicks["arcgisTickClick"]>;
96
96
  }
97
97
 
98
- interface ReactArcgisUniqueValuesList extends Partial<Pick<ArcgisUniqueValuesList, "fieldName" | "layer" | "maxHeight" | "multiple" | "numberFormatOptions" | "partialUniqueValues" | "selectedValues" | "showFilterLength" | "sortBy" | "uniqueValues" | "view">>, HTMLProps<ArcgisUniqueValuesList> {
98
+ interface ReactArcgisUniqueValuesList extends Partial<Pick<ArcgisUniqueValuesList, "fieldName" | "fieldSource" | "layer" | "maxHeight" | "multiple" | "numberFormatOptions" | "partialUniqueValues" | "selectedValues" | "showFilterLength" | "sortBy" | "uniqueValues" | "view">>, HTMLProps<ArcgisUniqueValuesList> {
99
99
  onarcgisChange?: EventHandler<ArcgisUniqueValuesList["arcgisChange"]>;
100
100
  onarcgisLoad?: EventHandler<ArcgisUniqueValuesList["arcgisLoad"]>;
101
101
  onarcgisSortByChange?: EventHandler<ArcgisUniqueValuesList["arcgisSortByChange"]>;
@@ -79,7 +79,7 @@ interface StencilArcgisRampColorBreak extends Partial<Pick<ArcgisRampColorBreak,
79
79
  interface StencilArcgisRampOpacity extends Partial<Pick<ArcgisRampOpacity, "fillColor" | "layout" | "max" | "min" | "stops">>, StencilJsx.HTMLAttributes<ArcgisRampOpacity> {
80
80
  }
81
81
 
82
- interface StencilArcgisSlider extends Partial<Pick<ArcgisSlider, "allowValuesOverlap" | "autoDestroyDisabled" | "disabled" | "fillPlacement" | "fullRangeMax" | "fullRangeMin" | "labelFormatter" | "layout" | "max" | "messageOverrides" | "min" | "mirrored" | "popoverLabel" | "popoverPlacement" | "precision" | "rangeLabelsEditingEnabled" | "rangeLabelsPlacement" | "segmentsDraggingDisabled" | "showRangeLabels" | "steps" | "valueLabelsDisplay" | "valueLabelsEditingEnabled" | "valueLabelsPlacement" | "values">>, StencilJsx.HTMLAttributes<ArcgisSlider> {
82
+ interface StencilArcgisSlider extends Partial<Pick<ArcgisSlider, "allowValuesOverlap" | "autoDestroyDisabled" | "disabled" | "fillPlacement" | "fullRangeMax" | "fullRangeMin" | "keyboardLargeStep" | "labelFormatter" | "layout" | "max" | "messageOverrides" | "min" | "mirrored" | "popoverLabel" | "popoverPlacement" | "precision" | "rangeLabelsEditingEnabled" | "rangeLabelsPlacement" | "segmentsDraggingDisabled" | "showRangeLabels" | "steps" | "valueLabelsDisplay" | "valueLabelsEditingEnabled" | "valueLabelsPlacement" | "values">>, StencilJsx.HTMLAttributes<ArcgisSlider> {
83
83
  onArcgisActiveValueChange?: EventHandler<ArcgisSlider["arcgisActiveValueChange"]>;
84
84
  onArcgisChange?: EventHandler<ArcgisSlider["arcgisChange"]>;
85
85
  onArcgisInput?: EventHandler<ArcgisSlider["arcgisInput"]>;
@@ -95,7 +95,7 @@ interface StencilArcgisTicks extends Partial<Pick<ArcgisTicks, "interactive" | "
95
95
  onArcgisTickClick?: EventHandler<ArcgisTicks["arcgisTickClick"]>;
96
96
  }
97
97
 
98
- interface StencilArcgisUniqueValuesList extends Partial<Pick<ArcgisUniqueValuesList, "fieldName" | "layer" | "maxHeight" | "multiple" | "numberFormatOptions" | "partialUniqueValues" | "selectedValues" | "showFilterLength" | "sortBy" | "uniqueValues" | "view">>, StencilJsx.HTMLAttributes<ArcgisUniqueValuesList> {
98
+ interface StencilArcgisUniqueValuesList extends Partial<Pick<ArcgisUniqueValuesList, "fieldName" | "fieldSource" | "layer" | "maxHeight" | "multiple" | "numberFormatOptions" | "partialUniqueValues" | "selectedValues" | "showFilterLength" | "sortBy" | "uniqueValues" | "view">>, StencilJsx.HTMLAttributes<ArcgisUniqueValuesList> {
99
99
  onArcgisChange?: EventHandler<ArcgisUniqueValuesList["arcgisChange"]>;
100
100
  onArcgisLoad?: EventHandler<ArcgisUniqueValuesList["arcgisLoad"]>;
101
101
  onArcgisSortByChange?: EventHandler<ArcgisUniqueValuesList["arcgisSortByChange"]>;
@@ -1,6 +1,16 @@
1
1
  import type { Popover } from "@esri/calcite-components/dist/components/calcite-popover";
2
2
 
3
- /** Properties used for calcite-popover. */
3
+ /** @internal */
4
+ export type OverlayPositioning = Popover["overlayPositioning"];
5
+
6
+ /** @internal */
7
+ export type LogicalPlacement = Popover["placement"];
8
+
9
+ /**
10
+ * Properties used for calcite-popover.
11
+ *
12
+ * @internal
13
+ */
4
14
  export interface IPopoverProps {
5
15
  refElement: HTMLElement;
6
16
  placement?: LogicalPlacement;
@@ -18,6 +28,8 @@ export interface IPopoverProps {
18
28
  /**
19
29
  * Object to be passed to arcgis-field-pick-list containing info about a field.
20
30
  * Use type:"none" to add non-sortable items, without info options, to the bottom of the list.
31
+ *
32
+ * @internal
21
33
  */
22
34
  export interface IPickListFieldInfo {
23
35
  name: string;
@@ -30,20 +42,25 @@ export interface IPickListFieldInfo {
30
42
  showDeleteAction?: boolean;
31
43
  }
32
44
 
33
- /** Object to be passed to arcgis-field-pick-list containing a group of fields. */
45
+ /**
46
+ * Object to be passed to arcgis-field-pick-list containing a group of fields.
47
+ *
48
+ * @internal
49
+ */
34
50
  export interface IPickListGroupInfo {
35
51
  title?: string;
36
52
  fields: IPickListFieldInfo[];
37
53
  }
38
54
 
55
+ /** @internal */
39
56
  export type LastSortBy = "default" | "display" | "field" | "type";
40
57
 
58
+ /** @internal */
59
+ export type FieldSource = "feature-reduction" | undefined;
60
+
61
+ /** @internal */
41
62
  export const FieldInfoPrefix: {
42
63
  expression: string;
43
64
  relationship: string;
44
65
  raster: string;
45
- };
46
-
47
- export type OverlayPositioning = Popover["overlayPositioning"];
48
-
49
- export type LogicalPlacement = Popover["placement"];
66
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/common-components",
3
- "version": "5.1.0-next.2",
3
+ "version": "5.1.0-next.21",
4
4
  "description": "ArcGIS Maps SDK for JavaScript common components",
5
5
  "keywords": [
6
6
  "2D",
@@ -47,8 +47,8 @@
47
47
  "lit": "^3.3.0",
48
48
  "luxon": "~3.7.2",
49
49
  "tslib": "^2.8.1",
50
- "@arcgis/lumina": "5.1.0-next.2",
51
- "@arcgis/toolkit": "5.1.0-next.2"
50
+ "@arcgis/lumina": "5.1.0-next.21",
51
+ "@arcgis/toolkit": "5.1.0-next.21"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@arcgis/core": "^5.0.0-next",
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{B as $,C as h,D as m,E as g,H as M,g as y,i as c,q as w}from"./UTXWKXMT.js";export default $arcgis.t(([{formatNumber:A}])=>{var l={container:"container",ticksContainer:"ticks-container",labelsContainer:"labels-container",tick:"tick",tickMin:"tick--min",tickMax:"tick--max",tickLabel:"tick-label",baseline:"baseline"},L=y`:host{display:flex;--arcgis-ticks-tick-length: .5rem;--arcgis-ticks-tick-color: var(--calcite-color-border-input);--arcgis-ticks-gap: 1em;--arcgis-ticks-font-size: var(--calcite-font-size--2)}.container{align-items:stretch;display:flex;color:var(--calcite-color-text-2);flex:1;font-weight:var(--calcite-font-weight-medium);font-size:var(--arcgis-ticks-font-size);line-height:1em;position:relative;user-select:none;word-wrap:normal;word-break:normal}.baseline{background-color:var(--arcgis-ticks-tick-color, var(--calcite-color-border-input))}.tick{position:absolute;background-color:var(--arcgis-ticks-tick-color, var(--calcite-color-border-input))}.tick-label{position:absolute;text-align:var(--arcgis-ticks-label-text-align, center);width:var(--arcgis-ticks-label-width, var(--labels-container-width, "auto"))}:host([layout="horizontal"]){.ticks-container{height:var(--arcgis-ticks-tick-length)}.labels-container{height:var(--labels-container-height, "auto")}.tick{width:.125rem;height:var(--arcgis-ticks-tick-length);transform:translate(-50%)}.tick-label{transform:translate(-50%)}.tick--min{transform:unset}.tick--max{transform:translate(-100%)}}:host([layout="vertical"]){.ticks-container{width:var(--arcgis-ticks-tick-length)}.labels-container{width:var(--labels-container-width)}.tick{width:var(--arcgis-ticks-tick-length);height:.125rem;transform:translateY(50%)}.tick-label{text-align:right;transform:translateY(50%)}.tick--min{transform:unset}.tick--max{transform:translateY(100%)}}:host([layout="horizontal"][mirrored]){.tick,.tick-label{transform:translate(50%)}.tick--min{transform:unset}.tick--max{transform:translate(100%)}}:host([layout="vertical"][mirrored]){.tick,.tick-label{transform:translateY(-50%)}.tick--min{transform:unset}.tick--max{transform:translateY(-100%)}}:host([layout="horizontal"][label-placement="leading"]){.container{flex-direction:column;justify-content:flex-end}.labels-container{margin-bottom:var(--arcgis-ticks-gap)}}:host([layout="horizontal"][label-placement="trailing"]){.container{flex-direction:column-reverse;justify-content:flex-end}.labels-container{margin-top:var(--arcgis-ticks-gap)}}:host([layout="vertical"][label-placement="leading"]){.container{flex-direction:row;justify-content:flex-end}:dir(ltr){.labels-container{margin-right:var(--arcgis-ticks-gap)}.tick-label{text-align:right}}:dir(rtl){.labels-container{margin-left:var(--arcgis-ticks-gap)}.tick-label{text-align:left;unicode-bidi:plaintext}}}:host([layout="vertical"][label-placement="trailing"]){.container{flex-direction:row-reverse;justify-content:flex-end}:dir(ltr){.labels-container{margin-left:var(--arcgis-ticks-gap)}.tick-label{text-align:left}}:dir(rtl){.labels-container{margin-right:var(--arcgis-ticks-gap)}.tick-label{text-align:right;unicode-bidi:plaintext}}}:host([interactive]){pointer-events:none;.tick,.tick-label{pointer-events:auto;cursor:pointer}.tick-label:hover{text-decoration:underline}}`,f=class extends ${constructor(){super(...arguments),this._formatValue=e=>A(e,this._formatOptions),this._formatOptions={style:"decimal",useGrouping:!0,minimumFractionDigits:0,maximumFractionDigits:2},this.interactive=!1,this.interpolationExponent=0,this.labelPlacement="trailing",this.layout="horizontal",this.max=100,this.min=0,this.mirrored=!1,this.mode="count",this.showLabels=!1,this.showBaseline=!1,this.values=[],this.arcgisTickClick=w({cancelable:!1})}static{this.properties={_formatOptions:16,interactive:7,interpolationExponent:9,labelFormatter:0,labelPlacement:3,layout:3,max:9,min:9,mirrored:7,mode:1,showLabels:5,showBaseline:5,values:[9,{converter:{fromAttribute(e){if(e.includes(","))return e.split(",").filter(t=>t.trim()!=="").map(parseFloat).filter(t=>Number.isFinite(t));{let t=parseFloat(e);return Number.isFinite(t)?[t]:[]}}}}]}}static{this.styles=L}updated(){let e=this.renderRoot.querySelector(`.${l.labelsContainer}`);if(e){let t=0,i=0;for(let a of this.renderRoot.querySelectorAll(`.${l.tickLabel}`)){let r=a.getBoundingClientRect();t=Math.max(t,r.width),i=Math.max(i,r.height)}t=Math.ceil(t),i=Math.ceil(i),!t||!i?(e.style.removeProperty("--labels-container-width"),e.style.removeProperty("--labels-container-height")):(e.style.setProperty("--labels-container-width",`${t}px`),e.style.setProperty("--labels-container-height",`${i}px`))}}_handleClick(e){if(!this.interactive)return;let t=e.target.dataset.value;t&&this.arcgisTickClick.emit({value:Number(t)})}_internalLabelFormatter(e){let t=this.labelFormatter;return t?t(e,this._formatValue)??this._formatValue(e):this._formatValue(e)}render(){return c`<div class=${h(l.container)} touch-action=none @click=${this._handleClick}>${this._renderContent()}${this._renderBaseline()}</div>`}_renderContent(){let{interpolationExponent:e,max:t,min:i,mode:a,values:r,layout:o,mirrored:s,showLabels:C}=this,p=[],v=[];for(let[d,k]of F(a,i,t,e,r)){let x={[o==="horizontal"?s?"right":"left":s?"top":"bottom"]:`${d}%`},z={[l.tick]:!0,[l.tickMin]:d===0,[l.tickMax]:d===100};p.push(c`<div class=${h(z)} style=${m(x)} data-value=${k??g}></div>`),C&&v.push(c`<div class=${h(l.tickLabel)} style=${m(x)} data-value=${k??g}>${this._internalLabelFormatter(k)}</div>`)}return[c`<div class=${h(l.labelsContainer)}>${v}</div>`,c`<div class=${h(l.ticksContainer)}>${p}</div>`]}_renderBaseline(){let{showBaseline:e,layout:t}=this;return e&&c`<div class=${h(l.baseline)} style=${m({[t==="horizontal"?"width":"height"]:"100%",[t==="horizontal"?"height":"width"]:"0.125rem"})}></div>`||""}};function*F(n,e,t,i,a){switch(n){case"value":{let r=Array.isArray(a)?a:[a];for(let o of r){let s=P(e,t,o,i)*100;s>=0&&s<=100&&(yield[s,o])}break}case"percent":{if(Array.isArray(a))for(let r of a)r>=0&&r<=100&&(yield[r,u(e,t,r/100,i)]);else if(a>0)for(let r=0;r<=100;r+=a)yield[r,u(e,t,r/100,i)];break}case"count":{let r=Array.isArray(a)?a[0]:a;if(r<=1)yield[50,u(e,t,.5,i)];else for(let o=0;o<r;o++){let s=o*100/(r-1);yield[s,u(e,t,s/100,i)]}break}}}function b(n,e,t){return t<n?n:t>e?e:t}function _(n,e,t){return n+(e-n)*t}function P(n,e,t,i=0){let a=(t-n)/(e-n);if(a=b(0,1,a),Math.abs(i)<1e-9)return a;let r=1+Math.expm1(i)*a;return a=Math.log(r)/i,b(0,1,a)}function u(n,e,t,i=0){if(t=b(0,1,t),Math.abs(i)<1e-9)return _(n,e,t);let a=Math.expm1(i*t)/Math.expm1(i);return _(n,e,a)}M("arcgis-ticks",f);return f},"intl")
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as i}from"./WDOKXOEG.js";import{a as u,b as m}from"./GQLKGVRX.js";import{e as g}from"./7CI55VCH.js";import{A as a,B as d,C as e,E as p,H as h,g as l,i as n,q as s,t as c,z as o}from"./UTXWKXMT.js";var v=l`.arcgis-app-ckeditor-popover-footer{display:flex;justify-content:flex-end;margin-top:var(--calcite-space-sm);padding:0 var(--calcite-space-lg)}.arcgis-app-ckeditor-popover-container{margin:0 var(--calcite-space-md) 0 0;padding-bottom:var(--calcite-space-lg);box-shadow:val(--calcite-shadow-1)}`,r=class extends d{constructor(){super(),this.okButton=o(),this.popoverNode=o(),this._propWatcherTask=new u(this,{task:async([t])=>{if(!m(t)){console.error("[ckeditor5] Required properties are missing.");return}},args:()=>[this.refElement]}),this.guid=c(),this.intlOk="Ok",this.intlCancel="Cancel",this.arcgisCkeditor5PopoverClosed=s(),this.arcgisPopoverClosed=s(),this.listen("arcgisCreated",this.afterEditorCreated),this.listen("arcgisSourceEditingChanged",this.onSourceEditingStatusChanged)}static{this.properties={guid:1,refElement:0,intlOk:1,intlCancel:1,intlLabel:1}}static{this.styles=v}async reposition(){this.popoverNode.value?.reposition()}afterEditorCreated(t){this.editor=t.target,this.reposition(),this.requestUpdate()}onSourceEditingStatusChanged(t){this.okButton.value&&(this.okButton.value.disabled=t.detail)}render(){return this.el.classList.add("js-app-flyout"),this._propWatcherTask.render({complete:()=>n`<calcite-popover class=${e(i.popover)} dir=${g(this.el)??p} placement=leading-start open pointer-disabled .referenceElement=${this.refElement} .offsetDistance=${-Math.round(this.refElement.getBoundingClientRect().width)} offset-skidding=50 .label=${this.intlLabel??""} focus-trap-disabled trigger-disabled top-layer-disabled ${a(this.popoverNode)}><div class=${e(i.arcgisAppCkeditorPopoverContainer)}><slot></slot><div class=${e(i.arcgisAppCkeditorPopoverFooter)}><calcite-button .label=${this.intlOk} @click=${async t=>{this.okButton.value?.disabled||(t.stopPropagation(),this.arcgisCkeditor5PopoverClosed.emit({guid:this.guid,data:await this.editor?.getData()}),this.arcgisPopoverClosed.emit({guid:this.guid,data:await this.editor?.getData()}))}} ${a(this.okButton)}>${this.intlOk}</calcite-button><calcite-button appearance=outline-fill .label=${this.intlCancel} @click=${t=>{t.stopPropagation(),this.arcgisCkeditor5PopoverClosed.emit({guid:this.guid}),this.arcgisPopoverClosed.emit({guid:this.guid})}}>${this.intlCancel}</calcite-button></div></div></calcite-popover>`})}};h("arcgis-ckeditor5-popover",r);export{r as ArcgisCkeditor5Popover};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as x,c as N}from"./GQLKGVRX.js";import{a as F}from"./7Y42J3JI.js";import{b as k}from"./7PB2GGQH.js";import"./7CI55VCH.js";import{A as V,B as C,C as h,H as q,g as D,i as d,m as $,n as b,q as T}from"./UTXWKXMT.js";export default $arcgis.t(([L,w,f,S,Z,A,P])=>{function p(s){return s!=null}function M(s){return s.type==="scene"?s.associatedLayer?.url:s.url}var G={dateStyle:"short",timeStyle:"short"},W={timeStyle:"medium"};function H(s){let{layer:e,fieldName:t}=s,i,a=N(e),r;"popupTemplate"in e&&(r=e.popupTemplate);let n=r?r.fieldInfos:[];return R(s)?.filter(l=>l.name===t).forEach(l=>{let u=!a&&n?n.filter(m=>m.fieldName===l.name):null,c=a?e.getFieldAlias(t):u?.length?u[0].label:l.alias;/^raster.(item|service)pixelvalue/iu.test(t)&&(l.type="double");let o={layerField:l,label:c||l.name};o.codedValues=j(t,s),Q(o),o.simpleFieldType&&(i=o)}),i}function R(s){let{layer:e}=s;return e.type==="imagery-tile"||e.type==="wcs"||e.type==="imagery"&&e.rasterFields.length?e.rasterFields:e.fields}async function E(s){s.statisticsStatus="in-progress";let{layer:e,view:t}=s;if(e.type==="imagery-tile"||e.type==="wcs"||e.type==="stream"||e.type==="voxel")throw new Error("could not get feature count");try{return await B(e,t)}catch{return}}async function U(s){let{layer:e,view:t,fieldName:i,fieldInfo:a}=s;if(e.type==="imagery-tile"||e.type==="wcs"||e.type==="voxel")throw new Error("could not get statistics for ImageryTileLayer/WCSLayer/VoxelLayer");if(!a||a.layerField.type==="oid"||a.layerField.type==="guid"||a.layerField.type==="global-id")return{totalCount:await E(s),nullcount:0};try{let r=await Z({layer:e,view:t,field:i,outStatisticTypes:{exclude:["median"]}});if(!p(r.count))throw new Error("could not get statistics");let n="sourceJSON"in e&&e.sourceJSON.maxRecordCount===r.count;if(p(r.nullcount)&&!n)return{...r,totalCount:r.count+r.nullcount};{let l=await E(s);return{...r,totalCount:l}}}catch{throw new Error("could not get statistics")}}async function J(s){let{layer:e,view:t,fieldName:i}=s;if(e.type==="imagery-tile"||e.type==="wcs"||e.type==="voxel")throw new Error("could not get unique values for ImageryLayer/ImageryTileLayer/WCSLayer/VoxelLayer");e.type==="feature"&&!e.url&&(e.outFields=["*"]);try{return await A({layer:e,view:t,field:i})}catch{throw new Error("could not get unique values")}}function Q(s){switch(s.layerField.type){case"string":s.simpleFieldType="string";break;case"date":s.simpleFieldType="date";break;case"timestamp-offset":s.simpleFieldType="timestamp-offset";break;case"date-only":s.simpleFieldType="date-only";break;case"time-only":s.simpleFieldType="time-only";break;case"oid":s.simpleFieldType="oid";break;case"guid":case"global-id":s.simpleFieldType="guid";break;case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":s.simpleFieldType="number";break}}function j(s,e){let{layer:t}=e;if(t.type==="subtype-sublayer"&&t.subtypeField===s){let u=t.parent?.subtypes?.find(c=>c.code===t.subtypeCode);if(u)return[{code:u.code,name:u.name}]}if(t.type!=="feature"&&t.type!=="imagery")return;let i=t.type==="feature"?t.typeIdField:void 0,a=t.type==="feature"?t.types:void 0,r,n=R(e)?.find(u=>u.name===s),l=n?.domain;return t.type==="feature"&&i&&a?(i===s?r=a.map(u=>({code:u.id,name:u.name})):(r=[],a.forEach(u=>{if(!u.domains[s]||u.domains[s].type==="inherited"){let c=l;c?.codedValues&&c.codedValues.forEach(async o=>{let m=!1;r.forEach(y=>{y.code===o.code&&(m=!0,`, ${y.name},`.includes(`, ${o.name},`)||(y.name+=`, ${o.name}`))}),m||r.push(S.clone(o))})}else u.domains[s].codedValues&&u.domains[s].codedValues.forEach(async c=>{let o=!1;r.forEach(m=>{m.code===c.code&&(o=!0,`, ${m.name},`.includes(`, ${c.name},`)||(m.name+=`, ${c.name}`))}),o||r.push(S.clone(c))})})),!r.length&&l?.codedValues&&(r=S.clone(l.codedValues))):l?.codedValues&&(r=n.domain.codedValues),r?.length?r:null}async function z(s){let{view:e,layer:t}=s;if(t.type==="imagery"||t.type==="imagery-tile"||t.type==="wcs")throw new Error("could not get feature");if(t.type==="feature"&&!t.url||t.type==="wfs"){let i=t.createQuery();i.start=0,i.num=5,i.outFields=["*"];let a=await t.queryFeatures(i);if(a.features.length)return a;throw new Error("could not get feature")}else{if(!e)return await _(s);let i;if(t.type==="subtype-sublayer"||t.type==="sublayer"){let a=t.parent;for(;["subtype-group","map-image"].includes(a.type);)a=a.parent;i=await e.whenLayerView(a)}else i=await e.whenLayerView(t);if(i.availableFields.length===t.fields.length||["stream","ogc-feature"].includes(t.type)&&i.availableFields.length>0){let a=t.createQuery();a.start=0,a.num=5,a.outFields=["*"];let r=await i.queryFeatures(a);return r.features?.length?r:await _(s)}else return await _(s)}}async function _(s){let{layer:e}=s;if(["imagery","imagery-tile","stream","ogc-feature"].includes(e.type))throw new Error("cannot get feature from service");let t=new P({where:"1=1",outFields:["*"],returnGeometry:!1});return"sourceJSON"in e&&e.sourceJSON?.advancedQueryCapabilities?.supportsPagination&&(t.num=1),await e.queryFeatures(t)}async function B(s,e){if(s.type==="feature"&&!s.url)return await K(s);if(s.type==="feature"||s.type==="csv"||s.type==="scene"||s.type==="wfs"||s.type==="geojson")return await s.queryFeatureCount();if(e&&(s.type==="stream"||s.type==="ogc-feature"))return await X(s,e)}async function K(s){let e=s.createQuery();e.outFields=["*"];let t=await s.queryFeatures(e);if(t.features.length)return t.features.length;throw new Error("could not get feature count")}async function X(s,e){return await(await e.whenLayerView(s)).queryFeatureCount()}var Y=D`:host{height:100%}.container{padding:var(--calcite-space-xs);background-color:var(--calcite-color-foreground-1)}.title{font-weight:700;padding:5px 0}.missing,.data{color:#a9a9a9}.count{white-space:nowrap}.section{padding:var(--calcite-space-xs) 0}.statistics-row{border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-2);padding:var(--calcite-space-xs) 0;display:flex;justify-content:space-between}.statistics-row-top-values{border-top:var(--calcite-border-width-sm) solid var(--calctie-color-border-2);padding:20px 0 var(--calcite-space-xs) 0;display:flex;justify-content:space-between}`,I=class extends C{constructor(){super(...arguments),this._messages=k({blocking:!0}),this._propWatcherTask=new x(this,{task:async([e,t])=>{let i=p(e)&&p(t);if(p(e)||$("error",this,b("layer")),p(t)||$("error",this,b("fieldName")),!i)throw new Error;await this.processProps(),this._propWatcherTask.autoRun=!1},args:()=>[this.layer,this.fieldName]}),this.oneFeatureResponseStatus="missing",this.statisticsStatus="missing",this.uniqueValuesStatus="missing",this.hideAlias=!1,this.hideNumericFormat=!1,this.hideStatistics=!1,this.arcgisComplete=T(),this.arcgisFieldInfoComplete=T()}static{this.properties={oneFeatureResponseStatus:16,oneFeatureResponse:16,statisticsStatus:16,statistics:16,uniqueValuesStatus:16,uniqueValues:16,view:0,layer:0,fieldName:1,hideAlias:5,hideNumericFormat:5,hideStatistics:5}}static{this.styles=Y}async refresh(){await this.processProps(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),this.timeZoneHandle?.remove()}async processProps(){let{view:e,layer:t,fieldName:i,hideStatistics:a}=this;if(!t||!i)return;let r;if(t.declaredClass==="esri.layers.support.Sublayer"){let n=t;e&&await w.whenOnce(()=>!e.updating),r=await n.createFeatureLayer(),await r?.load()}this.props={view:e,layer:r??t,fieldName:i,hideStatistics:a},this.props.fieldInfo=H(this.props),t.type==="scene"&&L.request.interceptors?.push({urls:`${M(t)}/${t.layerId}`,before(n){n.requestOptions.authMode="no-prompt"}}),this.oneFeatureResponseStatus="in-progress";try{let n=await z(this.props);this.oneFeatureResponse=n,this.oneFeatureResponseStatus="success"}catch{this.oneFeatureResponseStatus="failed"}if(t.type==="stream"){this.uniqueValuesStatus="failed",this.statisticsStatus="failed";return}if(a)this.uniqueValuesStatus="failed";else{this.uniqueValuesStatus="in-progress";try{let n=await J(this.props);this.uniqueValues=n,n?.uniqueValueInfos?.length?this.uniqueValuesStatus="success":this.uniqueValuesStatus="failed"}catch{this.uniqueValuesStatus="failed"}}if(a)this.statisticsStatus="failed";else{this.statisticsStatus="in-progress";try{let n=await U(this.props);if(!p(n.totalCount)&&p(n.count)&&this.uniqueValuesStatus==="success"){let l=this.uniqueValues?.uniqueValueInfos??[];for(let u=0;u<l.length;u++){let c=l[u];if(c.value===null){n.totalCount=c.count+n.count;break}}n.totalCount??=n.count}this.statistics=n,this.statisticsStatus="success"}catch{this.statisticsStatus="failed"}}this.setUpTimeZoneHandle()}setUpTimeZoneHandle(){this.timeZoneHandle?.remove();let{props:e}=this,{view:t,fieldInfo:i}=e;["date","timestamp-offset"].includes(this._getStatisticsType(i))&&(this.timeZoneHandle=w.watch(()=>t?.timeZone,()=>{this.requestUpdate()}))}_getFieldTypeLabel(e){let{_messages:t}=this,i=t.fieldTypes;switch(e){case"big-integer":return i.bigInteger;case"date":return i.date;case"date-only":return i.dateOnly;case"double":return i.double;case"global-id":return i.globalId;case"guid":return i.guid;case"integer":return i.integer;case"long":return i.long;case"oid":return i.oid;case"single":return i.single;case"small-integer":return i.smallInteger;case"string":return i.string;case"time-only":return i.timeOnly;case"timestamp-offset":return i.timestampOffset;default:return i.string}}_getStatisticsType(e){switch(e.layerField.type){case"big-integer":case"double":case"integer":case"single":case"small-integer":{if(e.codedValues)return"string";switch(e.layerField.valueType){case"binary":case"description":case"location-or-place-name":case"name-or-title":case"ordered-or-ranked":case"type-or-category":return"string";default:return"number"}}case"date":return"date";case"date-only":return"date-only";case"string":return"string";case"time-only":return"time-only";case"timestamp-offset":return"timestamp-offset";default:return"string"}}_getFieldValueTypeCamelCase(e){switch(e.layerField.valueType){case"count-or-amount":return"countOrAmount";case"date-and-time":return"dateAndTime";case"location-or-place-name":return"locationOrPlaceName";case"name-or-title":return"nameOrTitle";case"ordered-or-ranked":return"orderedOrRanked";case"percentage-or-ratio":return"percentageOrRatio";case"type-or-category":return"typeOrCategory";case"unique-identifier":return"uniqueIdentifier";case"phone-number":return"phoneNumber";case"email-address":return"emailAddress";default:return e.layerField.valueType}}_getDisplayString(e,t){let{props:i}=this,{fieldInfo:a}=i;switch(a.simpleFieldType){case"date":return this._getDateString(e,t);case"date-only":return this._getDateOnlyString(e,t);case"guid":return this._getGuidString(e);case"number":return this._getNumberString(e,t);case"time-only":return this._getTimeOnlyString(e,t);case"timestamp-offset":return this._getTimestampOffsetString(e,t);default:return`${e}`}}_getDateString(e,t){let{view:i}=this.props;return i&&i.timeZone==="unknown"?f.formatDate(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:"utc"}):f.formatDate(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:i?.timeZone||"system"})}_getTimestampOffsetString(e,t){let{view:i}=this.props;return typeof e=="string"?i&&i.timeZone==="unknown"?f.formatTimestamp(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:"utc"}):f.formatTimestamp(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:i?.timeZone||"system"}):this._getDateString(e,t)}_getDateOnlyString(e,t){return f.formatDateOnly(e,this.getIntlDateTimeFormattingOptions("short-date",t))}_getTimeOnlyString(e,t){return typeof e=="string"?f.formatTimeOnly(e,this.getIntlDateTimeFormattingOptions("short-date-long-time",t)):f.formatDate(e,{...this.getIntlDateTimeFormattingOptions("long-time",{...t,isTimeOnly:!0}),timeZone:"utc"})}_getGuidString(e){return e.startsWith("{")?e:`{${e}}`}_getNumberString(e,t){let i=t?.useFieldFormatting?e:Math.round(e*100)/100;return f.formatNumber(i,this.getIntlNumberFormattingOptions(t))}_printNumValue(e,t){return p(e)?this._getNumberString(e,t):"--"}_setCompleteRef(){this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit()}getCurrentFieldFormat(){let{props:e}=this,{layer:t,fieldName:i}=e;return(this.originalLayerSupportsFieldConfiguration()?t.getFieldConfiguration(i):void 0)?.fieldFormat}getIntlNumberFormattingOptions(e){let t=this.getCurrentFieldFormat();if(!e?.useFieldFormatting)return t?{useGrouping:["always","auto"].includes(t.useGrouping)}:f.convertNumberFormatToIntlOptions({digitSeparator:this.getPopupTemplateFieldInfo()?.format?.digitSeparator??!0});let i=t?{minimumFractionDigits:t.minimumFractionDigits,maximumFractionDigits:t.maximumFractionDigits,useGrouping:["always","auto"].includes(t.useGrouping)}:void 0;if(i)return i;let a=this.getPopupTemplateFieldInfo();return f.convertNumberFormatToIntlOptions({digitSeparator:a?.format?.digitSeparator??!0,places:a?.format?.places??2})}getIntlDateTimeFormattingOptions(e,t){let i=this.getCurrentFieldFormat();if(!t?.useFieldFormatting)return i?t?.isTimeOnly?W:G:f.convertDateFormatToIntlOptions(e);let a=i?{dateStyle:t?.isTimeOnly?void 0:i.dateStyle??void 0,year:i.dateStyle?void 0:i.year??void 0,month:i.dateStyle?void 0:i.month??void 0,timeStyle:i.timeStyle??void 0,hourCycle:i.hour12==="never"?"h23":"h11"}:void 0;if(a)return a;let r=this.getPopupTemplateFieldInfo();return f.convertDateFormatToIntlOptions(r?.format?.dateFormat??e)}originalLayerSupportsFieldConfiguration(){let{layer:e}=this;return N(e)}getPopupTemplateFieldInfo(){let{props:e}=this,{layer:t,fieldName:i}=e;return("popupTemplate"in t?t.popupTemplate:void 0)?.fieldInfos?.find(a=>a.fieldName===i)}render(){return this._propWatcherTask.render({complete:()=>{let{props:e}=this,{fieldInfo:t}=e;return t?d`<div class="container">${this.renderFieldType()}${this.renderFieldAlias()}${this.renderFieldDescription()}${this.renderFieldValueType()}${this.renderFieldSampleValue()}${this.renderFieldNumericFormat()}${this.renderFieldStatistics()}</div>`:""},error:()=>""})}renderFieldType(){let{_messages:e,props:t}=this,{fieldInfo:i}=t,a=this._getFieldTypeLabel(i.layerField.type);return d`<div class="section"><div class="title">${e.fieldType}</div><div>${a}</div></div>`}renderFieldAlias(){let{_messages:e,props:t,hideAlias:i}=this,{fieldInfo:a}=t;return i?"":d`<div class="section"><div class="title">${e.fieldAlias}</div><div>${a.label}</div></div>`}renderFieldDescription(){let{_messages:e,props:t}=this,{layer:i}=t;if(i.type!=="feature")return"";let{fieldInfo:a}=t,r=a.layerField.description;return d`<div class="section"><div class="title">${e.fieldDescription}</div><div class=${h({missing:!r})}>${r||e.fieldDescriptionNotSet}</div></div>`}renderFieldValueType(){let{_messages:e,props:t}=this,{layer:i}=t;if(i.type!=="feature")return"";let{fieldInfo:a}=t,r=this._getFieldValueTypeCamelCase(a);return d`<div class="section"><div class="title">${e.fieldValueType}</div><div class=${h(r?"":"missing")}>${r?e.fieldValueTypes[r]:e.fieldValueTypeNotSet}</div></div>`}renderFieldSampleValue(){let{oneFeatureResponse:e,oneFeatureResponseStatus:t,statisticsStatus:i,statistics:a,uniqueValuesStatus:r,uniqueValues:n,_messages:l,props:u}=this,{layer:c,fieldName:o,fieldInfo:m}=u,{statistics:y}=l,g;if(["imagery-tile","voxel"].includes(c.type)||c.type!=="stream"&&["string","oid","guid"].includes(this._getStatisticsType(m))&&r!=="failed")return"";t==="success"?e.features.forEach(v=>{(g===void 0||g===null&&v.attributes[o]!==null)&&(g=v.attributes[o])}):i==="success"?g=a?.min:r==="success"&&(g=n?.uniqueValueInfos?.[0]?.value||n?.uniqueValueInfos?.[1]?.value);let O=m.codedValues;return p(g)&&(O?g=O.find(v=>g===v.code)?.name||g:g=this._getDisplayString(g,{useFieldFormatting:!0})),d`<div class="section"><div class="title">${l.fieldSampleValue}</div><div class=${h(t==="failed"&&i==="failed"&&r==="failed"||!p(g)?"missing":"")}>${t==="success"||i==="success"||r==="success"?g?.toString()??y.allNulls:t==="failed"&&i==="failed"&&r==="failed"?l.fieldSampleNotAvailable:l.fieldSampleRetrieving}</div></div>`}renderFieldNumericFormat(){let{_messages:e,props:t,hideNumericFormat:i}=this,{fieldName:a,fieldInfo:r,layer:n}=t;if(i||!["double","long","single"].includes(r.layerField.type))return"";let l=this.originalLayerSupportsFieldConfiguration()?n.getFieldConfiguration(a):void 0;if(l?.fieldFormat){let{minimumFractionDigits:c,maximumFractionDigits:o}=l.fieldFormat;return d`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldMinimumFractionDigits.replace("${number}",c.toString())}</div><div>${e.fieldMaximumFractionDigits.replace("${number}",o.toString())}</div></div>`}let u="popupTemplate"in n?n.popupTemplate:void 0;if(u?.fieldInfos){let c=u.fieldInfos?.filter(o=>o.fieldName===a);if(c?.length){let o=c[0];if(p(o?.format?.places)){let m=o.format.places;return d`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldNumDecimalPlaces.replace("${number}",m.toString())}</div></div>`}}}return d`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div class="missing">${e.fieldDecimalPlacesNotAvailable}</div></div>`}renderFieldStatistics(){let{statisticsStatus:e,uniqueValuesStatus:t,hideStatistics:i,_messages:a,props:r}=this,{layer:n,fieldInfo:l}=r;return i?(this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit(),""):["stream","imagery-tile","voxel"].includes(n.type)||["long"].includes(l.layerField.type)?(this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit(),""):d`<div class="section"><div class="title">${a.fieldStatistics}</div>${!e||e==="missing"||e==="in-progress"?F("field-info-statistics-content",d`<div class="missing">${a.fieldStatisticsRetrieving}</div>`):e==="failed"&&t!=="success"?this.renderNoStatistics():F("field-info-statistics-content",d`<div ${V(this._setCompleteRef)}>${this.renderStatistics()}</div>`)}</div>`}renderNoStatistics(){let{_messages:e}=this;return F("field-info-statistics-content",d`<div class="missing" ${V(this._setCompleteRef)}>${e.fieldStatisticsNotAvailable}</div>`)}renderStatistics(){let{props:e}=this,{fieldInfo:t}=e;switch(this._getStatisticsType(t)){case"number":return this.renderNumberStatistics();case"guid":case"oid":case"string":return this.renderStringStatistics();case"date":case"date-only":case"time-only":case"timestamp-offset":return this.renderDateStatistics();default:return""}}renderNumberStatistics(){let{statistics:e,_messages:t}=this;if(!e)return this.renderNoStatistics();let{statistics:i}=t;return d`<div><div class="statistics-row"><div>${i.numberOfValues}</div><div class="data">${this._printNumValue(e.totalCount)}</div></div>${p(e.sum)?d`<div class="statistics-row"><div>${i.sumOfValues}</div><div class="data">${this._printNumValue(e.sum)}</div></div>`:null}${p(e.min)?d`<div class="statistics-row"><div>${i.minimum}</div><div class="data">${this._printNumValue(e.min)}</div></div>`:null}${p(e.max)?d`<div class="statistics-row"><div>${i.maximum}</div><div class="data">${this._printNumValue(e.max)}</div></div>`:null}${p(e.avg)?d`<div class="statistics-row"><div>${i.average}</div><div class="data">${this._printNumValue(e.avg)}</div></div>`:null}${p(e.stddev)?d`<div class="statistics-row"><div>${i.standardDeviation}</div><div class="data">${this._printNumValue(e.stddev)}</div></div>`:null}${this.renderNullValues()}</div>`}renderStringStatistics(){let{statistics:e,uniqueValuesStatus:t,_messages:i}=this,{statistics:a}=i;return d`<div><div class="statistics-row"><div>${a.numberOfValues}</div>${t!=="success"?d`<div class="missing">--</div>`:d`<div class="data">${this._printNumValue(e?.totalCount)}</div>`}</div>${this.renderNullValues()}${this.renderTopValues()}</div>`}renderDateStatistics(){let{statistics:e,view:t,props:i,_messages:a}=this,{fieldInfo:r}=i;if(!e||!p(e.max)||!p(e.min))return this.renderNoStatistics();let{statistics:n}=a,l=e.max-e.min,u=Math.floor(l/31536e6),c=Math.floor((l-u*31536e6)/2628e6),o=Math.ceil((l-c*2628e6)/864e5);o>=30&&(c+=1,o=0);let m=u===1?n.timeSpanOptions.year:u>1?n.timeSpanOptions.years.replace("${years}",u.toString()):"";m+=u>0&&(c>0||o>0)?", ":"",m+=c===1?n.timeSpanOptions.month:c>1?n.timeSpanOptions.months.replace("${months}",c.toString()):"",m+=c>0&&o>0?", ":"",m+=o===1?n.timeSpanOptions.day:o>1?n.timeSpanOptions.days.replace("${days}",o.toString()):"";let y=r.simpleFieldType!=="timestamp-offset"||!t||t.timeZone!=="unknown",g=r.simpleFieldType==="time-only";return d`<div><div class="statistics-row"><div>${n.numberOfValues}</div><div class="data">${this._printNumValue(e?.totalCount)}</div></div>${y&&p(e.min)?d`<div class="statistics-row"><div>${g?n.minimumTime:n.minimumDate}</div><div class="data">${this._getDisplayString(e.min)}</div></div>`:null}${y&&p(e.max)?d`<div class="statistics-row"><div>${g?n.maximumTime:n.maximumDate}</div><div class="data">${this._getDisplayString(e.max)}</div></div>`:null}${y&&p(e.avg)?d`<div class="statistics-row"><div>${g?n.averageTime:n.averageDate}</div><div class="data">${this._getDisplayString(e.avg)}</div></div>`:null}${y&&!g&&p(e.min)&&p(e.max)&&l>0?d`<div class="statistics-row"><div>${n.timespan}</div><div class="data">${m}</div></div>`:null}${this.renderNullValues()}</div>`}renderTopValues(){let{uniqueValues:e,uniqueValuesStatus:t,_messages:i,props:a}=this,{fieldInfo:r}=a,{statistics:n}=i;if(e?.uniqueValueInfos?.length){let l=e.uniqueValueInfos;l.sort((o,m)=>o.count<m.count?1:o.count>m.count?-1:0);let u=r.codedValues,c=l.filter(o=>o.value!==null).filter((o,m)=>o&&m<10).map(o=>{let m=o.value;return u?u.forEach(y=>{m===y.code&&(m=y.name)}):m=this._getDisplayString(m),d`<div class="statistics-row"><div class="data">${`${m}`}</div><div class="count">${this._printNumValue(o.count)}</div></div>`});return c.length?d`<div><div class="statistics-row-top-values"><div>${l.length>10?n.topTenValues:n.topValues}</div><div>${n.count}</div></div>${c}</div>`:""}else return d`<div><div class="statistics-row-top-values"><div>${n.topValues}</div><div>${n.count}</div></div><div class="statistics-row"><div class="missing">${t==="failed"?i.fieldUniqueValuesNotAvailable:i.fieldSampleRetrieving}</div></div></div>`}renderNullValues(){let{statistics:e,uniqueValues:t,_messages:i}=this,{statistics:a}=i,r=e?.nullcount;if(!p(r)&&t){let n=t.uniqueValueInfos;for(let l=0;l<n.length;l++){let u=n[l];if(u.value===null){r=u.count;break}}}return d`<div class="statistics-row"><div>${a.numberOfNulls}</div>${p(r)?d`<div class="data">${this._printNumValue(r)}</div>`:d`<div class="missing">--</div>`}</div>`}};q("arcgis-field-info",I);return I},"config","core/reactiveUtils","intl","core/lang","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","rest/support/Query")
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{h as o}from"./UTXWKXMT.js";var n=Symbol(),h=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,i)=>{this.o=t,this.h=i})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,i,e){this.p=0,this.i=0,(this._=t).addController(this);let r=typeof i=="object"?i:{task:i,args:e};this.v=r.task,this.j=r.args,this.m=r.argsEqual??u,this.k=r.onComplete,this.A=r.onError,this.autoRun=r.autoRun??!0,"initialValue"in r&&(this.u=r.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;let t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){let t=this.T(),i=this.O;this.O=t,t===i||t===void 0||i!==void 0&&this.m(i,t)||await this.run(t)}async run(t){let i,e;t??=this.T(),this.O=t,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let r=++this.p;this.q=new AbortController;let a=!1;try{i=await this.v(t,{signal:this.q.signal})}catch(l){a=!0,e=l}if(this.p===r){if(i===n)this.i=0;else{if(a===!1){try{this.k?.(i)}catch{}this.i=2,this.o?.(i)}else{try{this.A?.(e)}catch{}this.i=3,this.h?.(e)}this.u=i,this.l=e}this._.requestUpdate()}}abort(t){this.i===1&&this.q?.abort(t)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},u=(s,t)=>s===t||s.length===t.length&&s.every(((i,e)=>!o(i,t[e])));function q(s){return s!=null}function v(s){return c(s)&&p(s)}function c(s){return s!=null&&typeof s=="object"&&"type"in s&&s.type==="feature"}function p(s){return s?.type==="feature"&&s.source?.type==="feature-layer"}export{h as a,q as b,v as c};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as k,b as h}from"./GQLKGVRX.js";import{a as R}from"./7Y42J3JI.js";import{b as B}from"./7PB2GGQH.js";import"./7CI55VCH.js";import{A as F,B as S,H as O,g as L,i as b,m as w,n as N,q as Z,z as U}from"./UTXWKXMT.js";export default $arcgis.t(([{formatDate:q,convertDateFormatToIntlOptions:y,formatDateOnly:K,formatTimeOnly:Q,formatTimestamp:C,formatNumber:X},Y,{clone:I}])=>{function _(i){return new Date(`1970-01-01T${i}Z`).getTime()}function M(i){return new Date(`${i} 00:00:00`).getTime()}function ee(i,e,t){let o;return e==="unknown"?o=q(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):o=q(i,{...y("short-date-short-time"),timeZone:e}),o}function te(i){return i?K(i,y("short-date")):""}function ie(i){let e;return typeof i=="string"?e=Q(i,y("short-date-long-time")):e=q(i,{...y("long-time"),timeZone:"utc"}),e}function se(i,e){return typeof i=="string"?e&&"timeZone"in e&&e.timeZone==="unknown"?C(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):C(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"}):e&&"timeZone"in e&&e.timeZone==="unknown"?q(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):q(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"})}function A(i,e){if(i.type!=="feature"&&i.type!=="subtype-group"&&i.type!=="subtype-sublayer"&&i.type!=="imagery")return;let t;return i.fields.forEach(o=>{let s=o.name,r=o.domain;if(i.type!=="imagery"&&i.subtypeField===s){let p;i.type==="subtype-group"||i.type==="feature"?p=i.subtypes:p=i.parent.subtypes,p.forEach(l=>{i.type==="subtype-sublayer"&&i.subtypeCode!==l.code||(e.name===s&&(t=t||[],t.push({code:l.code,name:l.name})),l.domains&&Object.keys(l.domains).forEach(a=>{if(e.name===a){let n=l.domains[a];n?.type==="coded-value"&&n?.codedValues&&n.codedValues.forEach(u=>{let f=!1;t=t||[],t.forEach(c=>{c.code===u.code&&(f=!0,`| ${c.name} |`.includes(`| ${u.name} |`)||(c.name+=` | ${u.name}`))}),f||t.push({code:u.code,name:u.name})})}}))})}if(e.name===s&&(i.type==="feature"||i.type==="imagery")){let p=i.type==="feature"?i.typeIdField:void 0,l=i.type==="feature"?i.types:void 0;i.type==="feature"&&p&&l?(p===s?t=l.map(a=>({code:a.id,name:a.name})):(t=t||[],l.forEach(a=>{if(!a.domains?.[s]||a.domains[s].type==="inherited"){let n=r;n?.codedValues&&n.codedValues.forEach(u=>{let f=!1;t.forEach(c=>{c.code===u.code&&(f=!0,`| ${c.name} |`.includes(`| ${u.name} |`)||(c.name+=` | ${u.name}`))}),f||t.push(I(u))})}else a.domains?.[s]?.codedValues&&a.domains[s].codedValues.forEach(n=>{let u=!1;t.forEach(f=>{f.code===n.code&&(u=!0,`| ${f.name} |`.includes(`| ${n.name} |`)||(f.name+=` | ${n.name}`))}),u||t.push(I(n))})})),!t?.length&&r?.codedValues&&(t=I(r.codedValues))):r?.codedValues&&(t=r.codedValues)}}),t}function E(i,e){let t=e;if(t){let o="";for(let s=0;s<t.length;s++){let r=t[s];r.code==i&&(o+=(o.length?" | ":"")+r.name)}return o.length||(o=`${i}`),o}return i}function W(i){return["small-integer","big-integer","integer","single","double","long"].includes(i.type)}function P(i){switch(i.type){case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":return"number";case"blob":case"geometry":case"global-id":case"guid":case"oid":case"raster":case"xml":return;default:return i.type}}var ne=L`:host{width:100%}.container{min-height:30px}.popover-unique-list{width:100%;overflow-y:auto}.unique-values-content-list-msg{font-size:75%;margin:5px}.count{padding:0 6px;font-size:smaller;white-space:nowrap}`,D=class extends S{constructor(){super(...arguments),this.dropdownNode=U(),this._messages=B({blocking:!0}),this._propWatcherTask=new k(this,{task:async([e,t,o])=>{let s=h(e)&&h(t)||h(o);if(!h(o)&&!h(e)&&!h(t)?w("error",this,N("uniqueValues")):h(o)||(h(e)||w("error",this,N("layer")),h(t)||w("error",this,N("fieldName"))),h(e)&&h(t)&&!e.fields?.filter(r=>r.name===t))throw w("error",this,"Field could not be found."),new Error;if(!s)throw new Error;await this.processProps()},args:()=>[this.layer,this.fieldName,this.uniqueValues]}),this.initialRender=!0,this.multiple=!1,this.partialUniqueValues=!1,this.showFilterLength=10,this.arcgisChange=Z(),this.arcgisSortByChange=Z(),this.arcgisLoad=Z()}static{this.properties={initialRender:16,view:0,layer:0,fieldName:1,uniqueValues:0,numberFormatOptions:0,selectedValues:0,sortBy:1,multiple:5,partialUniqueValues:5,showFilterLength:9,maxHeight:9}}static{this.styles=ne}async setFocus(){this.listNode?.setFocus()}async getUniqueValues(){let{fieldInfo:e}=this;if(h(e?.uniqueValueInfos)){let{uniqueValueInfos:t,partialUniqueValues:o}=e;return{uniqueValues:t,partialUniqueValues:o}}}loaded(){this.layer&&this.fieldInfo&&(setTimeout(()=>this.initialRender=!1,800),this.listNode?.setFocus())}async processProps(){let{layer:e,fieldName:t,view:o}=this,s=e?.fields?.filter(r=>r.name===t)?.[0];if(h(this.uniqueValues))this.fieldInfo={layerField:s,fieldDomains:e&&s?A(e,s):void 0,simpleType:e&&s?P(s):void 0,partialUniqueValues:this.partialUniqueValues??!1,uniqueValueInfos:this.uniqueValues},this.arcgisLoad.emit();else if(e&&s){this.fieldInfo={layerField:s,fieldDomains:A(e,s),simpleType:P(s),partialUniqueValues:!1};let{fieldInfo:r}=this;try{let p=await Y({layer:e,view:o,field:t,sqlWhere:"definitionExpression"in e?e.definitionExpression??void 0:void 0,forBinning:!1}),l=W(s),a=p.uniqueValueInfos.filter(n=>h(n.value)?s.type==="string"&&!l||s.type==="guid"?n.value!=="<Null>"&&`${n.value}`.trim()!=="":(W(s)||s.type,n.value!=="<Null>"&&n.value!==""):!1);a.sort((n,u)=>n.count>u.count?-1:n.count<u.count?1:0),r.fieldDomains?.length&&r.fieldDomains.forEach(n=>{a.find(u=>u.value===n.code)||a.push({value:n.code,count:0})}),r.uniqueValueInfos=a,r.partialUniqueValues=p.uniqueValueInfos.length===2e3,this.arcgisLoad.emit()}catch(p){if(w("error",this,`uniqueValues() - ${p.message}`),this.hasFieldDomains(r)){let l=[];r.fieldDomains.forEach(a=>{l.find(n=>n.value===a.code)||l.push({value:a.code,count:void 0})})}}setTimeout(()=>{this.initialRender=!1,this.listNode?.setFocus()},800)}}setListRef(e){let{maxHeight:t}=this;this.listNode=e,t&&e?.setAttribute("style",`max-height: ${t||400}px`)}onSortMenuSelect(e){let t=e.currentTarget.selectedItems?.[0].getAttribute("data-value");this.sortBy=t||void 0,this.arcgisSortByChange.emit(t||void 0)}isSameLists(e,t){if(!e&&!t)return!0;if(!e||!t||e?.length!==t?.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}hasFieldDomains(e){return!!e.fieldDomains?.length}render(){return this._propWatcherTask.render({complete:()=>{let{fieldInfo:e,selectedValues:t,sortBy:o,multiple:s,initialRender:r,showFilterLength:p,_messages:l}=this,{fieldDomains:a,uniqueValueInfos:n,partialUniqueValues:u,layerField:f}=e,c=f?.type;if(!n?.length)return"";let x=c?["small-integer","big-integer","integer","single","double","long","oid"].includes(c):!1,z=c?["date","date-only","time-only"].includes(c):!1,H=g=>{g.sort((d,m)=>d.count<=m.count?1:-1)},j=g=>{let d=a?.length;g.sort((m,v)=>{if(!d&&x)return(typeof m.value=="string"?Number.parseFloat(m.value):m.value)-(typeof v.value=="string"?Number.parseFloat(v.value):v.value);{let $=d?E(m.value,a):m.value,V=d?E(v.value,a):v.value;return`${$}`.startsWith("_")?1:`${V}`.startsWith("_")?-1:`${$}`.localeCompare(`${V}`)}})},G=(g,d)=>{g.sort((m,v)=>{let $=d?.indexOf(m.value)??-1,V=d?.indexOf(v.value)??-1;return $===V||$>-1&&V>-1?0:$>V?-1:1})};j(n),!o||o==="count"?H(n):o==="selected"&&G(n,t);let J=n.map(g=>this.renderUniqueValue(g)),T;return u&&!r&&(T=b`<div class="unique-values-content-list-msg">${l.errors.tooManyUniqueValues}</div>`),b`<div class="container"><calcite-list .label=${l.values} class="popover-unique-list" .filterEnabled=${n.length>=p} .selectionMode=${s?"multiple":"single"} .filterPlaceholder=${l.searchValues} @calciteListChange=${g=>{let d=g.target.selectedItems.map(m=>m.value);!a&&c==="date-only"?d=d?.map(m=>M(m)):!a&&c==="time-only"?d=d?.map(m=>_(m)):c&&["date","oid","small-integer","big-integer","integer","long"].includes(c)?d=d?.map(m=>Number.parseInt(m)):c&&["single","double"].includes(c)&&(d=d?.map(m=>Number.parseFloat(m))),!this.isSameLists(d,this.selectedValues)&&(this.selectedValues=d,this.arcgisChange.emit(d))}} @calciteListFilter=${()=>{this.dropdownNode.value&&(this.dropdownNode.value.disabled=this.listNode.filteredItems.length<4)}} ${F(this.setListRef)}>${n.length>=p&&!r?this.renderSort(x,z):null}${J}</calcite-list>${T}</div>`},error:()=>""})}renderSort(e,t){let{sortBy:o,_messages:s}=this;return b`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${F(this.dropdownNode)}><calcite-action slot=trigger .label=${s.sortValues} text><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${o==="count"||!h(o)} data-value=count>${s.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${o==="name"} data-value=name>${e||t?s.sortAscending:s.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${o==="selected"} data-value=selected>${s.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderUniqueValue(e){let{selectedValues:t,initialRender:o,view:s,fieldInfo:r,numberFormatOptions:p}=this,{fieldDomains:l,uniqueValueInfos:a,simpleType:n}=r,u=s&&"timeZone"in s&&s.timeZone||"system",f=l?.length?E(e.value,l):n==="date"?ee(e.value,u):n==="date-only"?te(e.value):n==="time-only"?ie(e.value):n==="timestamp-offset"?se(e.value,s):typeof e.value=="number"?X(e.value,p):e.value,c=t?n==="date-only"?t.includes(l?.length?e.value:M(e.value)):n==="time-only"?t.includes(l?.length?e.value:_(e.value)):t.includes(e.value):!1;return R(`list-item_${e.value}`,b`<calcite-list-item .label=${`${f}`} .value=${`${e.value}`} .selected=${c}>${h(e.count)&&(a.length>200&&!o||a.length<=200)?b`<div class="count" slot=actions-end>${`${e.count}`}</div>`:null}</calcite-list-item>`)}};O("arcgis-unique-values-list",D);return D},"intl","smartMapping/statistics/uniqueValues","core/lang")
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as g}from"./CSDKXC4T.js";import{a as C,b as k}from"./GQLKGVRX.js";import{a as B}from"./7Y42J3JI.js";import{b as x}from"./7PB2GGQH.js";import"./7CI55VCH.js";import{A as h,B as w,C as $,D as m,E as c,F as v,H as S,g as y,i as s,m as p,n as F,q as n,z as r}from"./UTXWKXMT.js";var o=new Map;o.set("oid","key");o.set("guid","key");o.set("global-id","key");o.set("blob","binary");o.set("integer","integer");o.set("small-integer","integer");o.set("big-integer","integer");o.set("single","number");o.set("double","number");o.set("long","number");o.set("number","number");o.set("date","date-time");o.set("date-only","calendar");o.set("time-only","clock");o.set("timestamp-offset","time-zone");o.set("string","string");var L=({fieldType:u})=>s`<calcite-icon scale=s .icon=${o.get(u)}></calcite-icon>`,E=y`.panel{min-height:250px}.content{max-height:50vh}.field-icons{display:flex;align-items:center;padding:0 var(--calcite-space-sm)}.selection-button-div{padding:var(--calcite-space-2xs) var(--calcite-space-sm-plus)}.no-match-text{padding:var(--calcite-space-md)}.footer{width:100%}.add-cancel-buttons{display:flex;align-content:space-between}`,f=class extends w{constructor(){super(...arguments),this._messages=x({blocking:!0}),this.popoverNode=r(),this.listNode=r(),this.flowElement=r(),this.panelElement=r(),this.dropdownNode=r(),this.fieldInfoFlowItemEl=r(),this.allLists=[],this.filterText="",this.panelCutOffHeight=0,this._propWatcherTask=new C(this,{task:async([e])=>{if(!this.listOnly&&!k(e?.refElement))throw p("error",this,F("popoverProps")),new Error;this._propWatcherTask.autoRun=!1},args:()=>[this.popoverProps]}),this.fields=[],this.selectedFields=[],this.listOnly=!1,this.showFieldInfo=!1,this.showFieldTypeIcon=!1,this.showFieldName=!1,this.showDescription=!1,this.showSelectionAll=!1,this.showCancel=!0,this.hideCancel=!1,this.showSort=!0,this.hideSort=!1,this.showFilterLength=10,this.multiple=!1,this.sortBy="default",this.groupFieldsAndExpressions=!1,this.arcgisChange=n(),this.arcgisClose=n(),this.arcgisFieldPickListChange=n(),this.arcgisFieldPickListDismissed=n(),this.arcgisFieldPickListSortByChange=n(),this.arcgisSortByChange=n(),this.arcgisEditField=n(),this.arcgisDeleteField=n()}static{this.properties={lastSortBy:16,filterFields:16,mapView:0,view:0,layer:0,fields:0,selectedFields:0,listOnly:5,popoverProps:0,showFieldInfo:5,showFieldTypeIcon:5,showFieldName:5,showDescription:5,showSelectionAll:5,showCancel:5,hideCancel:5,showSort:5,hideSort:5,showFilterLength:9,multiple:5,heading:1,okBtnText:1,filterPlaceholderText:1,filterNoResultsText:1,sortBy:1,groupFieldsAndExpressions:5,fieldsGroupHeading:1,expressionsGroupHeading:1,customExpressionCheck:0}}static{this.styles=E}async reposition(){await this.popoverNode.value?.reposition()}async setFocus(){setTimeout(()=>requestAnimationFrame(()=>{this.listOnly?this.listNode.value?.setFocus():this.panelElement.value?.setFocus()}),1)}async setDisabled(e){this.panelElement.value&&(this.panelElement.value.disabled=e)}load(){!this.view&&this.mapView&&(this.view=this.mapView),!this.showCancel&&!this.hideCancel&&(this.hideCancel=!0),!this.showSort&&!this.hideSort&&(this.hideSort=!0),this.listOnly&&this.showFieldInfo&&(this.showFieldInfo=!1,p("info",this,"showFieldInfo is not supported if listOnly is true.")),!this.multiple&&this.selectedFields.length>1&&(this.selectedFields=[this.selectedFields[0]]),this.lastSortBy=this.sortBy??this.lastSortBy,this.updateGroupedLists()}willUpdate(e){(e.has("fields")||e.has("lastSortBy")||e.has("customExpressionCheck"))&&this.updateGroupedLists()}loaded(){this.setUpObserver(),this.listOnly?this.listNode.value?.setFocus():(this.flowElement.value?.setFocus(),this.checkMaxHeight())}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect()}setUpObserver(){this.observer=new MutationObserver(e=>{for(let t of e)t.attributeName==="style"&&this.popoverNode.value&&this.dropdownNode.value&&this.popoverNode.value.style.visibility==="hidden"&&(this.dropdownNode.value.open=!1)})}checkMaxHeight(){setTimeout(()=>this.checkPanelMaxHeight(),200),setTimeout(()=>this.checkPanelMaxHeight(),500),setTimeout(()=>this.checkPanelMaxHeight(),1e3),setTimeout(()=>this.checkPanelMaxHeight(),1500)}checkPanelMaxHeight(){if(this.panelCutOffHeight===0){let e=this.panelElement.value?.getBoundingClientRect();if(e&&e.bottom>window.innerHeight){this.panelCutOffHeight=e.height-(e.bottom-window.innerHeight)-5;let t=this.listNode.value?.getBoundingClientRect();t&&(this.listNode.value.style.maxHeight=`${t.height-(e.bottom-window.innerHeight)-5}px`)}}}getSortedList(e){let t=[...e],i=t.filter(l=>l.type==="none");return t=t.filter(l=>l.type!=="none"),this.lastSortBy==="display"?t.sort((l,a)=>l.alias.localeCompare(a.alias)):this.lastSortBy==="field"?t.sort((l,a)=>l.name.localeCompare(a.name)):this.lastSortBy==="type"&&t.sort((l,a)=>l.type.localeCompare(a.type)),t=t.concat(i),t}isExpression(e){return this.customExpressionCheck?this.customExpressionCheck(e):e.name.includes(g.expression)}canDeselectAll(){let e=this.getAllFields();return this.filterFields?.length?this.filterContainsAll():this.selectedFields.length===e.length}filterContainsAll(){return!!this.filterFields?.every(e=>this.selectedFields.some(t=>t===e))}showFieldInfoCheck(e){let{layer:t}=this;return this.showFieldInfo?!(!t||this.isExpression(e)||e.name.includes(g.relationship)||e.type==="none"):!1}updateGroupedLists(){if(this.fields)if(this.allLists=[],this.usingCustomGroups())for(let e of this.fields)this.allLists.push({title:e.title,fields:[...this.getSortedList(e.fields)]});else this.allLists=this.groupFieldsAndExpressions?[{title:this.expressionsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>this.isExpression(e))},{title:this.fieldsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>!this.isExpression(e))}]:[{title:void 0,fields:[...this.getSortedList(this.fields)]}]}addFieldInfoFlowItem(e,t){let i=this.flowElement.value,l=v(s`<calcite-flow-item selected .heading=${e.alias??e.name} .description=${e.name} class="panel" style=${m(this.panelCutOffHeight>0?`max-height: ${this.panelCutOffHeight}px`:"max-height: 50vh")} @calciteFlowItemBack=${a=>{a.currentTarget.remove(),this.fieldInfoFlowItemEl.value.selected=!1,this.panelElement.value.selected=!0,setTimeout(()=>{t.setFocus()},300)}} ${h(this.fieldInfoFlowItemEl)}><arcgis-field-info lang=${this._messages._lang??c} .fieldName=${e.name} .layer=${this.layer} .view=${this.view} class="content"></arcgis-field-info></calcite-flow-item>`);i.appendChild(l),this.panelElement.value.selected=!1,this.fieldInfoFlowItemEl?.value.setFocus()}usingCustomGroups(){return!!this.fields.length&&"fields"in this.fields[0]}getAllFields(){return this.allLists.map(e=>e.fields).flat()}render(){return this._propWatcherTask.render({complete:()=>{if(this.listOnly)return this.renderList();let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=this.popoverProps;return this.el.classList.add("js-app-flyout"),s`<calcite-popover .placement=${t.placement??"leading-start"} open pointer-disabled .referenceElement=${t.refElement} .offsetDistance=${t.offsetDistance??-Math.round(t.refElement.getBoundingClientRect().width)} .offsetSkidding=${t.offsetSkidding??0} .overlayPositioning=${t.overlayPositioning} trigger-disabled .autoClose=${t.autoClose} .label=${this.heading??(this.multiple?this._messages.headerSelect:this._messages.header)??""} @calcitePopoverClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${h(this.popoverNode)}><calcite-flow style=${m({width:`${t.popoverWidth??t.refElement.getBoundingClientRect().width}px`,...t.maxHeight&&{maxHeight:t.maxHeight}})} ${h(this.flowElement)}><calcite-flow-item class="panel" .heading=${e} closable @calciteFlowItemClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${h(this.panelElement)}><slot slot=content-top name=content-top></slot>${this.renderList()}<slot slot=content-bottom name=content-bottom></slot>${(this.multiple||!this.hideCancel)&&s`<div slot=footer class="footer"><slot name=content-footer></slot>${this.multiple&&!this.hideCancel?s`<div class="add-cancel-buttons">${this.renderAddButton()}${this.renderCancelButton()}</div>`:s`${this.renderAddButton()}${this.renderCancelButton()}`}</div>`||""}</calcite-flow-item></calcite-flow></calcite-popover>`},error:()=>""})}renderList(){let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=this.getAllFields(),i=t.length>=this.showFilterLength;return s`${t.length?s`<calcite-list .label=${e} .selectionMode=${this.multiple?"multiple":"single"} class=${$(this.listOnly?"":"content")} .filterEnabled=${i} .filterPlaceholder=${this.filterPlaceholderText??this._messages.filter} @calciteListChange=${()=>{let l=this.listNode.value.selectedItems.map(d=>d.value),a=this.selectedFields.filter(d=>l.includes(d)),b=l.filter(d=>!this.selectedFields.includes(d));this.selectedFields=[...new Set([...a,...b])],this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}),this.multiple||(this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields}))}} @calciteListFilter=${l=>{l.stopPropagation(),this.filterFields=this.listNode.value.filteredItems?.map(a=>a.value),this.filterText=this.listNode.value.filterText}} ${h(this.listNode)}>${this.renderSortButton()}<slot name=content-center></slot>${this.multiple&&this.showSelectionAll&&(!i||!this.filterText||this.filterFields?.length)?this.renderSelectionButton():null}${this.renderListItems()}</calcite-list>`:s`<slot name=no-fields></slot>`}${this.filterFields&&!this.filterFields.length&&this.listNode.value&&this.filterNoResultsText?.length!==0?s`<div class="no-match-text">${this.filterNoResultsText??this._messages.noMatches}</div>`:null}`}renderSortButton(){let e=this.getAllFields();if(!(e.length>=this.showFilterLength&&!this.hideSort))return"";let t=e.every(i=>!!i.type);return s`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed .disabled=${this.filterFields?this.filterFields.length<4:!1} @calciteDropdownOpen=${()=>{this.observer?.disconnect(),this.popoverNode.value&&this.observer?.observe(this.popoverNode.value,{attributes:!0})}} @calciteDropdownClose=${()=>this.observer?.disconnect()} ${h(this.dropdownNode)}><calcite-action slot=trigger .text=${this._messages.sort??""} title=${this._messages.sort??c}><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${this.lastSortBy==="default"} @click=${()=>{this.lastSortBy="default",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="default",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.default}</calcite-dropdown-item><calcite-dropdown-item .selected=${this.lastSortBy==="display"} @click=${()=>{this.lastSortBy="display",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="display",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.displayName}</calcite-dropdown-item>${t&&s`<calcite-dropdown-item .selected=${this.lastSortBy==="type"} @click=${()=>{this.lastSortBy="type",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="type",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.type}</calcite-dropdown-item>`||""}<calcite-dropdown-item .selected=${this.lastSortBy==="field"} @click=${()=>{this.lastSortBy="field",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="field",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.fieldName}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderSelectionButton(){return s`<div class="selection-button-div"><calcite-button appearance=transparent scale=s width=full @click=${()=>{if(this.canDeselectAll())this.selectedFields=this.filterFields?.length?this.selectedFields.filter(e=>!this.filterFields?.includes(e)):[];else if(this.filterFields?.length)this.selectedFields=[...new Set([...this.selectedFields,...this.filterFields])];else{let e=this.getAllFields();this.selectedFields=e.map(t=>t.name)}this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields})}}>${this.canDeselectAll()?this._messages.deselectAll:this._messages.selectAll}</calcite-button></div>`}renderListItems(){let e=this.allLists.filter(t=>!!t.fields.length);return e.length===1&&!e[0].title?e[0].fields.map(t=>this.renderCalciteListItem(t)):e.map(t=>s`<calcite-list-item-group .heading=${t.title}>${t.fields.map(i=>this.renderCalciteListItem(i))}</calcite-list-item-group>`)}renderCalciteListItem(e){let t=this.showFieldInfoCheck(e),i=this.showFieldTypeIcon&&!!e.type;return B(e.name,s`<calcite-list-item .label=${e.alias||e.name} .description=${(()=>{if(this.showFieldName&&e.hideFieldName!==!0)return`{${e.name}}`;if(this.showDescription&&e.hideDescription!==!0&&e.description)return e.description})()} .value=${e.name} .selected=${!this.multiple&&e.name===this.selectedFields[0]||this.multiple&&this.selectedFields.includes(e.name)} .metadata=${{label:e.alias,fieldName:e.name}}>${i&&s`<div slot=actions-end class="field-icons">${L({fieldType:e.type})}</div>`||""}${this.renderInfoAction(e,t)}${this.renderEditAction(e)}${this.renderDeleteAction(e)}</calcite-list-item>`)}renderInfoAction(e,t){let{_messages:i}=this;return t?s`<calcite-action slot=actions-end .text=${i.info} title=${i.info??c} scale=s icon=information @click=${l=>{l.stopPropagation();let a=l.currentTarget;this.addFieldInfoFlowItem(e,a)}}></calcite-action>`:""}renderEditAction(e){let{_messages:t}=this;return e.showEditAction?s`<calcite-action slot=actions-end .text=${t.edit} title=${t.edit??c} scale=s icon=pencil @click=${i=>{i.stopPropagation(),this.arcgisEditField.emit({fieldName:e.name})}}></calcite-action>`:""}renderDeleteAction(e){let{_messages:t}=this;return e.showDeleteAction?s`<calcite-action slot=actions-end .text=${t.delete} title=${t.delete??c} scale=s icon=trash @click=${i=>{i.stopPropagation(),this.arcgisDeleteField.emit({fieldName:e.name})}}></calcite-action>`:""}renderAddButton(){return this.multiple?s`<calcite-button .appearance=${this.hideCancel?"outline-fill":"solid"} .width=${this.hideCancel?"full":"half"} @click=${()=>{this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields})}}>${this.okBtnText||(this.multiple?this._messages.done:this._messages.ok)}</calcite-button>`:""}renderCancelButton(){return this.hideCancel?"":s`<calcite-button appearance=outline-fill .width=${this.multiple?"half":"full"} @click=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}}>${this._messages.cancel}</calcite-button>`}};S("arcgis-field-pick-list",f);export{f as ArcgisFieldPickList};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as X}from"./7Y42J3JI.js";import{a as ee}from"./EPX7DYFW.js";import{a as J,b as Q}from"./7PB2GGQH.js";import{a as V,b as G,d as Z}from"./7CI55VCH.js";import{A as T,B as W,C as $,D as R,E as w,H as Y,g as H,i as f,o as q,p as K,q as E,s as j,t as L,z}from"./UTXWKXMT.js";export default $arcgis.t(([{on:Le,watch:te},{createObservable:de,trackAccess:he},{property:Ne,subclass:Ue},qe,ve,{property:k,subclass:fe},{watch:S}])=>{var re=(i,e)=>t=>ue(t,i),A=class extends j{constructor(e,t){super(e),this.Y=new Map,this.A=void 0,this.#r=de();let r=this;r.#e=t,r.Z(),r.setProvisionalExports(ge(e,new WeakRef(r),e.M.length-1,r.instance,r.Y),!1),q(e,n=>{if(n){let a=te(()=>e[n],l=>{if(l===r.instance)return;let s=r.instance;r.exports=l,r.instance=l,r.Y.forEach((o,d)=>e.requestUpdate(o,s[d])),r.#t&&s.destroy(),r.#t=!1},{sync:!0});r.onDestroy(a.remove)}},r.exports)}#t;#r;#e;get exports(){return he(this.#r),super.exports}set exports(e){super.exports=e,this.#r.notify()}Z(){let e=this;e.instance="prototype"in e.#e&&"declaredClass"in e.#e.prototype?new e.#e:e.#e(),e.#t=!0}hostConnected(){this.exports=this.instance}hostDestroy(){this.#t&&this.instance.destroy?.()}},ue=J(A),ge=(i,e,t,r,n)=>new Proxy(r,{get:(a,l)=>{let s=a[l];if(typeof l=="symbol"||n.has(l))return s;let o=i.M[t];return o.A=l,K(i,d=>{if(o.A=void 0,d!==void 0){let c=d.key;n.set(l,c);let h=i.constructor.getPropertyOptions(c),u=l!==c&&c.toLowerCase().includes("disable");me(e,h,l,c,u),h.i===void 0&&pe(h,t,l,u)}},s)}}),me=(i,e,t,r,n,a)=>a=te(()=>{let l=i.deref();return l===void 0||l.component.manager.destroyed?a=a.remove():l.exports[t]},(l,s)=>{if(!a)return;i.deref().component?.requestUpdate(r,n?!s:s),e.c=!1},{sync:!0}),pe=(i,e,t,r)=>{i.d.get=function(){let n=this.M[e]?.exports[t];return r?!n:n},i.d.set=function(n){let a=this.M[e];a.A!==t&&(a.exports[t]=r?!n:n)}};function*ae(i,e){if(i!==void 0){let t=0;for(let r of i)yield e(r,t++)}}var be=H`:host{display:flex;width:100%;height:100%;font-family:Avenir Next,Helvetica Neue,helvetica,arial,sans-serif;font-size:var(--calcite-font-size--2);font-variant-numeric:tabular-nums;--arcgis-slider-dash-length: 5px;--arcgis-slider-handle-size: .875rem;--arcgis-slider-track-background-color: var(--calcite-color-border-2);--arcgis-slider-internal-show-range-labels: 0;--arcgis-slider-internal-show-value-labels: 0;--arcgis-slider-internal-value-labels-placement-leading: 0;--arcgis-slider-internal-value-labels-placement-trailing: 0;--arcgis-slider-internal-range-labels-placement-center: 0;--arcgis-slider-internal-range-labels-placement-trailing: 0;--arcgis-slider-internal-handle-offset: calc(var(--arcgis-slider-handle-size) / 2);--arcgis-slider-internal-label-input-margin: calc(var(--arcgis-slider-internal-handle-offset) + 4px);--arcgis-slider-internal-label-input-height: var(--calcite-input-number-height, 1.5rem);--arcgis-slider-internal-track-size: 2px}:host([show-range-labels]){--arcgis-slider-internal-show-range-labels: 1}:host(:not([value-labels-display="hidden"])){--arcgis-slider-internal-show-value-labels: 1}:host([value-labels-placement="leading"]){--arcgis-slider-internal-value-labels-placement-leading: var(--arcgis-slider-internal-show-value-labels)}:host([value-labels-placement="trailing"]){--arcgis-slider-internal-value-labels-placement-trailing: var(--arcgis-slider-internal-show-value-labels)}:host([range-labels-placement="center"]){--arcgis-slider-internal-range-labels-placement-center: var(--arcgis-slider-internal-show-range-labels)}:host([range-labels-placement="trailing"]){--arcgis-slider-internal-range-labels-placement-trailing: var(--arcgis-slider-internal-show-range-labels)}:host([disabled]){cursor:default;opacity:var(--calcite-opacity-disabled);pointer-events:none}.content{direction:ltr;flex:1;touch-action:none;user-select:none;display:grid;word-wrap:normal;word-break:normal;padding-block:var(--arcgis-slider-internal-handle-offset)}.track-container{grid-area:track-container;position:relative;display:flex;justify-content:center;align-items:center}.track{touch-action:none;position:relative}.track-bounds{background-color:var(--calcite-color-border-2)}.track-fill{--arcgis-slider-track-background-color: var(--calcite-color-brand)}:host([layout="vertical"]){.track-effective-leading{background:repeating-linear-gradient(to bottom,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}.track-effective-trailing{background:repeating-linear-gradient(to top,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}}:host([layout="horizontal"]){.track-effective-leading{background:repeating-linear-gradient(to right,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}.track-effective-trailing{background:repeating-linear-gradient(to left,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}}.track-range{background-color:var(--calcite-color-brand);&.active{box-shadow:0 0 8px #00000029;outline:1px solid var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)))}}:host([disabled]) .track-range{background-color:var(--calcite-color-text-3)}:host([disabled]),:host([disabled][layout="horizontal"]),:host([disabled][layout="vertical"]){.track-range.interactive:after{cursor:default;pointer-events:none}}:host([layout="horizontal"]){.track-range.interactive:after{all:initial;cursor:ew-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-slider-internal-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-top:1px}}:host([layout="vertical"]){.track-range.interactive:after{all:initial;cursor:ns-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-slider-internal-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-left:1px;writing-mode:vertical-lr}}.segment{transform-origin:0 0;inset-block-start:0px;block-size:.125rem;position:absolute;top:0;left:0}.thumb{-webkit-user-select:none;user-select:none;background-color:#4c4c4c;position:absolute}.thumb:focus,.thumb.active{.handle{background-color:var(--calcite-color-brand);box-shadow:0 0 8px #00000029;outline:2px solid var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}}.handle{cursor:pointer;box-sizing:border-box;z-index:1;touch-action:none;background-color:var(--calcite-color-foreground-1);box-shadow:0 0 0 2px var(--calcite-color-text-3) inset;border-radius:var(--arcgis-slider-handle-size);width:var(--arcgis-slider-handle-size);height:var(--arcgis-slider-handle-size);transition:all var(--calcite-animation-timing, .125s) ease-in-out;position:absolute;top:calc(var(--arcgis-slider-internal-handle-offset) * -1);left:calc(var(--arcgis-slider-internal-handle-offset) * -1)}.handle:hover{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}.label{position:absolute;will-change:transform}.label[hidden]{display:block;opacity:0;pointer-events:none}.min{grid-area:range-start}.max{grid-area:range-end}:host([layout="horizontal"][mirrored][range-labels-placement="center"]),:host([layout="vertical"]:not([mirrored])){.min{grid-area:range-end}.max{grid-area:range-start}}.content-start{grid-area:content-start;display:flex}.content-end{grid-area:content-end;display:flex}:host([layout="vertical"]){.content{grid-template:". range-start range-start range-start ." "content-start content-start track-container content-end content-end" ". range-end range-end range-end .";grid-template-rows:auto 1fr auto;grid-template-columns:1fr auto auto auto 1fr;row-gap:var(--arcgis-slider-internal-handle-offset)}.track-container{flex-direction:column}.track{flex:1;width:var(--arcgis-slider-internal-track-size)}.segment{writing-mode:vertical-lr}.label{top:calc(var(--arcgis-slider-internal-label-input-height) * -.5)}&:host([value-labels-placement="leading"]){.label{right:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="trailing"]){.label{left:var(--arcgis-slider-internal-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="center"]){.content{--arcgis-slider-internal-content-start-min-height: calc( ((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-handle-offset)) + ( var(--arcgis-slider-internal-value-labels-placement-leading) * var(--arcgis-slider-internal-label-input-height) ) );--arcgis-slider-internal-content-end-min-height: calc( ((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-handle-offset)) + ( var(--arcgis-slider-internal-value-labels-placement-trailing) * var(--arcgis-slider-internal-label-input-height) ) );column-gap:calc(var(--arcgis-slider-internal-show-range-labels) * var(--arcgis-slider-internal-handle-offset) / 2);padding-inline:calc((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-handle-offset));grid-template:". content-start ." "range-start content-start range-end" "range-start track-container range-end" "range-start content-end range-end" ". content-end .";grid-template-columns:auto 1fr auto;grid-template-rows:minmax(var(--arcgis-slider-internal-content-start-min-height),auto) calc(var(--arcgis-slider-internal-show-range-labels) * calc(calc(var(--arcgis-slider-internal-label-input-height) / 2) - calc(var(--arcgis-slider-internal-track-size) / 2))) var(--arcgis-slider-internal-track-size) calc(var(--arcgis-slider-internal-show-range-labels) * calc(calc(var(--arcgis-slider-internal-label-input-height) / 2) - calc(var(--arcgis-slider-internal-track-size) / 2))) minmax(var(--arcgis-slider-internal-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-slider-internal-track-size)}&:host([value-labels-placement="leading"]){.label{bottom:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="trailing"]){.label{top:var(--arcgis-slider-internal-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="trailing"]){.content{--arcgis-slider-internal-content-start-min-height: calc( var(--arcgis-slider-internal-handle-offset) + var(--arcgis-slider-internal-value-labels-placement-leading) * var(--arcgis-slider-internal-label-input-height) );--arcgis-slider-internal-content-end-min-height: calc( var(--arcgis-slider-internal-value-labels-placement-trailing) * var(--arcgis-slider-internal-label-input-height) );padding-inline:var(--arcgis-slider-internal-handle-offset);grid-template:"content-start content-start content-start" "track-container track-container track-container" "content-end content-end content-end" "content-end content-end content-end" "content-end content-end content-end";grid-template-columns:auto;grid-template-rows:minmax(var(--arcgis-slider-internal-content-start-min-height),auto) var(--arcgis-slider-internal-track-size) var(--arcgis-slider-internal-handle-offset) calc(var(--arcgis-slider-internal-range-labels-placement-trailing) * var(--arcgis-slider-internal-label-input-height)) minmax(var(--arcgis-slider-internal-content-end-min-height),auto);column-gap:var(--arcgis-slider-internal-handle-offset)}.track{flex:1;height:var(--arcgis-slider-internal-track-size)}&:host([value-labels-placement="leading"]){.label{bottom:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="trailing"]){.label{top:calc(var(--arcgis-slider-internal-label-input-margin) + var(--arcgis-slider-internal-range-labels-placement-trailing) * (var(--arcgis-slider-internal-label-input-height)))}}.min,.max{--arcgis-slider-internal-range-translation: calc(var(--arcgis-slider-internal-handle-offset) + .5rem + 1px);grid-area:unset;grid-row:-3}&:host(:not([mirrored])){.min{grid-column:1;transform:translate(calc(var(--arcgis-slider-internal-range-translation) * -1))}.max{grid-column:3;transform:translate(var(--arcgis-slider-internal-range-translation))}}&:host([mirrored]){.min{grid-column:3;transform:translate(var(--arcgis-slider-internal-range-translation))}.max{grid-column:1;transform:translate(calc(var(--arcgis-slider-internal-range-translation) * -1))}}}`,_e=Object.defineProperty,xe=Object.getOwnPropertyDescriptor,y=(i,e,t,r)=>{for(var n=r>1?void 0:r?xe(e,t):e,a=i.length-1,l;a>=0;a--)(l=i[a])&&(n=(r?l(e,t,n):l(n))||n);return r&&n&&_e(e,t,n),n};function ye(){return{min:0,max:100,values:[]}}var _=class extends ve{constructor(i={}){super({...ye(),properties:i}),this._entries=new Map,this.precision=4,this.ready=!1}startup(){let{precision:i}=this,{min:e,max:t,values:r}=this;t=b(t,i),e=b(e,i),r=r?.map(a=>I(b(a,i),e,t)),this._set("min",e),this._set("max",t),this._set("values",r);let n=new Map(r?.map(a=>[L(),a]));this._entries=n,S(()=>this.min,a=>{let l=this.values;a!=null&&l?.length&&l.some(s=>s<a)&&(this._entries.forEach((s,o)=>{s<a&&this._entries.set(o,a)}),this._updatesValues())},{sync:!0}),S(()=>this.max,a=>{let l=this.values;a!=null&&l?.length&&l.some(s=>s>a)&&(this._entries.forEach((s,o)=>{s>a&&this._entries.set(o,a)}),this._updatesValues())},{sync:!0}),S(()=>this.precision,a=>{let{min:l,max:s,values:o}=this;this._set("min",b(l,a)),this._set("max",b(s,a)),o?.length&&(this._entries.forEach((d,c)=>{this._entries.set(c,b(d,a))}),this._updatesValues())},{sync:!0}),this._set("ready",!0)}get entries(){return this._entries}set max(i){if(!this.ready){this._set("max",i);return}let e=this._get("max"),t=b(i,this.precision);e!==t&&this._set("max",t)}set min(i){if(!this.ready){this._set("min",i);return}let e=this._get("min"),t=b(i,this.precision);e!==t&&this._set("min",t)}set values(i){if(!this.ready){this._set("values",i);return}let e=this._get("values");if(i=i?.map(r=>I(b(r,this.precision),this.min,this.max)).sort((r,n)=>r-n),e&&i&&e.length===i.length&&e.every((r,n)=>r===i[n]))return;let t=new Map(i?.map(r=>[L(),r]));this._entries=t,this._set("values",i)}getValue(i){return this._entries.get(i)}setValue(i,e){if(this.values==null)return!1;let{min:t,max:r}=this,n=this._entries.get(i),a=I(b(e,this.precision),t,r);return n===a?!1:(this._entries.set(i,a),this._updatesValues(),!0)}setValues(i){if(this.values==null)return!1;let e=!1,{min:t,max:r}=this;for(let[n,a]of i){let l=this._entries.get(n),s=I(b(a,this.precision),t,r);l!==s&&(e=!0,this._entries.set(n,s))}return e?(this._updatesValues(),!0):!1}_updatesValues(){let i=Array.from(this._entries.values()).sort((e,t)=>e-t);this._set("values",i)}};y([k()],_.prototype,"_entries",2);y([k({readOnly:!0})],_.prototype,"entries",1);y([k()],_.prototype,"max",1);y([k()],_.prototype,"min",1);y([k({cast:i=>I(i,0,20)})],_.prototype,"precision",2);y([k({readOnly:!0})],_.prototype,"ready",2);y([k()],_.prototype,"values",1);_=y([fe("esri.widgets.Slider.SliderData")],_);function I(i,e,t){return Math.min(Math.max(i,e),t)}function b(i,e){return Number.parseFloat(i.toFixed(e))}var B=class{constructor(e){this.steps=e,this.minIndex=0,this.maxIndex=this.steps.length-1}indexToValue(e){return this.steps[P(e,this.minIndex,this.maxIndex)]}valueToIndex(e){let t=this.steps.indexOf(e);return t!==-1?t:this.steps.reduce((r,n,a,l)=>Math.abs(n-e)<Math.abs(l[r]-e)?a:r)}},N=class{constructor(e,t,r){this.min=e,this.max=t,this.stepSize=r,this.minIndex=0,this.maxIndex=Math.round((this.max-this.min)/this.stepSize)}indexToValue(e){return this.min+P(e,this.minIndex,this.maxIndex)*this.stepSize}valueToIndex(e){return e=P(e,this.min,this.max),Math.round((e-this.min)/this.stepSize)}};function we(i){if(i.steps==null)return null;let e=i.steps;return Array.isArray(e)?e.length===0?null:new B(e):new N(i.min,i.max,e)}function ke(i,e,t){if(i==null){let s=new Map;for(let[o,d]of e.entries())s.set(o,d+t);return s}let r=e.size,n=Array.from(e.entries()).map(([s,o])=>{let d=o+t,c=[];for(let h=i.minIndex;h<=i.maxIndex;h++){let u=i.indexToValue(h),p=Math.abs(u-d),g=!1;for(let v=0;v<c.length;v++)if(p<c[v].dist){c.splice(v,0,{idx:h,value:u,dist:p}),g=!0;break}!g&&c.length<r&&c.push({idx:h,value:u,dist:p}),c.length>r&&(c.length=r)}return{uuid:s,stepDistances:c}}),a=new Set,l=new Map;n.sort((s,o)=>s.stepDistances[0].dist-o.stepDistances[0].dist);for(let s of n){let o=s.stepDistances.find(d=>!a.has(d.idx));o?(a.add(o.idx),l.set(s.uuid,o.value)):l.set(s.uuid,e.get(s.uuid))}return l}function ie(i,e,t,r,n){let a=e.get(t)??0;if(!i)return a+r;let l=a+r,s=new Set;if(!n)for(let[c,h]of e.entries())c!==t&&s.add(i.valueToIndex(h));let o=null,d=1/0;for(let c=i.minIndex;c<=i.maxIndex;c++){if(s.has(c))continue;let h=i.indexToValue(c),u=Math.abs(h-l);u<d&&(d=u,o=c)}return o==null?a:i.indexToValue(o)}function De(i,e,t){let r=new Map,n=t>0?$e:oe,a=Array.from(e).sort((o,d)=>n(o[1],d[1])),l=!1,s=!0;for(let[o,d]of a)if(r.set(o,d),s){let c=le(i,r,o,t);d===c&&(s=!1),l||=s,r.set(o,c)}return{changed:l,entries:r}}function le(i,e,t,r){let{allowValuesOverlap:n,stepsProvider:a,resolution:l,min:s,max:o}=i,d=e.get(t);if(r=r>0?1:-1,!a){let m=P(d+r*l,s,o);if(n)return m;let x=new Set;for(let[M,ce]of e)M!==t&&x.add(ce);for(;x.has(m)&&m<=o&&m>=s;)m=P(m+r*l,s,o);return x.has(m)||m>o||m<s?d:m}let c=a.valueToIndex(d);if(c===-1)return d;if(n){let m=P(c+r,a.minIndex,a.maxIndex);return a.indexToValue(m)}let h=new Set;for(let[m,x]of e)m!==t&&h.add(a.valueToIndex(x));let u=c,p=!1,g=a.minIndex,v=a.maxIndex,D=0;for(;D<Math.abs(v-g)&&(u+=r,!(u<g||u>v));){if(!h.has(u)){p=!0;break}D++}return p?a.indexToValue(u):d}function Pe(i,e,t,r){let{allowValuesOverlap:n,stepsProvider:a,resolution:l,min:s,max:o}=i,d=e.get(t);if(r=r>0?1:-1,!a){let p=new Set(Array.from(e).filter(([v])=>v!==t).map(([,v])=>v)),g=r>0?o:s;if(n)return g;for(;p.has(g);)if(g-=r*l,r>0&&g>o||r<0&&g<s){g=d;break}return g}if(n)return r>0?a.indexToValue(a.maxIndex):a.indexToValue(a.minIndex);let c=a.valueToIndex(d);if(c===-1)return d;let h=new Set(Array.from(e).filter(([p])=>p!==t).map(([,p])=>a.valueToIndex(p))),u=r>0?a.maxIndex:a.minIndex;for(;h.has(u);)if(u-=r,r>0&&u>o||r<0&&u<s){u=c;break}return a.indexToValue(u)}function Ee(i,e,t){let{stepsProvider:r,min:n,max:a}=i,l=new Map,s=Array.from(e).sort((d,c)=>oe(d[1],c[1]));if(r){let d=0;if(t>0){let c=s[s.length-1],h=r.valueToIndex(c[1]);d=r.maxIndex-h}else{let c=s[0],h=r.valueToIndex(c[1]);d=r.minIndex-h}if(d===0)for(let[c,h]of s)l.set(c,h);for(let[c,h]of s){let u=r.indexToValue(r.valueToIndex(h)+d);l.set(c,u)}return l}let o=0;if(t>0){let d=s[s.length-1];o=a-d[1]}else{let d=s[0];o=n-d[1]}for(let[d,c]of s)l.set(d,c+o);return l}function oe(i,e){return i-e}function $e(i,e){return e-i}function P(i,e,t){return Math.max(e,Math.min(t,i))}var Ce=re(_),U=class extends W{constructor(){super(...arguments),this._popoverElement=z(),this._trackElement=z(),this.messages=Q({}),this._onPointerMoveDragUpdate=e=>{this._updateDrag(this._mapEventToRange(e))},this._onPointerUpDragEnd=e=>{O(e)&&this._endDrag()},this._onPointerCancelDragEnd=()=>{this._endDrag()},this._formatLabel=(e,t,r)=>{let n=ee(this.messages._lang,t),a=this.labelFormatter;return a?a(r,e,s=>n.format(s))??n.format(r):n.format(r)},this._numberFormatOptions={},this._createFormatter=(e,t)=>this._formatLabel.bind(this,e,t),this._minFormatter=this._createFormatter("min",this._numberFormatOptions),this._maxFormatter=this._createFormatter("max",this._numberFormatOptions),this._valueFormatter=this._createFormatter("value",this._numberFormatOptions),this._resizeObserver=new ResizeObserver(()=>{this._layoutLabelInputs()}),this._labelInputsUpdateComplete=null,this._dragInfo=null,this._hasPopoverContent=!1,this._hasContentStart=!1,this._hasContentEnd=!1,this._sliderData=Ce(this),this.allowValuesOverlap=!1,this.autoDestroyDisabled=!1,this.disabled=!1,this.fillPlacement="start",this.layout="horizontal",this.max=this._sliderData.max,this.min=this._sliderData.min,this.mirrored=!1,this.popoverLabel="",this.popoverPlacement="leading",this.precision=this._sliderData.precision,this.rangeLabelsEditingEnabled=!1,this.rangeLabelsPlacement="center",this.segmentsDraggingDisabled=!1,this.showRangeLabels=!1,this.valueLabelsDisplay="hidden",this.valueLabelsPlacement="leading",this.valueLabelsEditingEnabled=!1,this.values=this._sliderData.values,this.arcgisActiveValueChange=E({cancelable:!1}),this.arcgisChange=E({cancelable:!1}),this.arcgisInput=E({cancelable:!1}),this.arcgisRangeChange=E({cancelable:!1})}static{this.properties={_dragInfo:16,_hasPopoverContent:16,_hasContentStart:16,_hasContentEnd:16,_activePart:16,_sliderData:16,activeValue:32,allowValuesOverlap:5,autoDestroyDisabled:5,disabled:7,fullRangeMax:11,fullRangeMin:11,fillPlacement:1,labelFormatter:0,layout:3,max:11,min:11,mirrored:7,popoverLabel:1,popoverPlacement:3,precision:11,rangeLabelsEditingEnabled:5,rangeLabelsPlacement:3,segmentsDraggingDisabled:5,showRangeLabels:7,steps:[9,{converter:{fromAttribute(e){if(e.includes(","))return e.split(",").filter(r=>r.trim()!=="").map(parseFloat).filter(r=>Number.isFinite(r));let t=parseFloat(e);return Number.isFinite(t)?t:void 0}}}],valueLabelsDisplay:3,valueLabelsPlacement:3,valueLabelsEditingEnabled:5,values:[1,{converter:{fromAttribute(e){return e.includes(",")?e.split(",").filter(t=>t.trim()!=="").map(parseFloat).filter(t=>Number.isFinite(t)):[parseFloat(e)].filter(t=>Number.isFinite(t))}}}],messageOverrides:0}}static{this.styles=be}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}get _fullMin(){return this.fullRangeMin??this.min}get _fullMax(){return this.fullRangeMax??this.max}get _fullRange(){return this._fullMax-this._fullMin}get isHorizontal(){return this.layout==="horizontal"}get _trackWidthOrHeight(){let e=this._trackElement.value?.getBoundingClientRect();return e?this.isHorizontal?e.width:e.height:0}get _disabledOrInvalid(){return this.disabled||this.values.length===0||this._invalid}get _invalid(){let e=this.fullRangeMin==null||this.fullRangeMax==null||this.fullRangeMin<this.fullRangeMax,t=this.fullRangeMin==null||this.fullRangeMin<=this.min,r=this.fullRangeMax==null||this.fullRangeMax>=this.max;return this.min>=this.max||!e||!t||!r}get resolution(){let e=(this._sliderData.max-this._sliderData.min)/this._trackWidthOrHeight;return Math.max(e,1/Math.pow(10,this.precision))}get activeValue(){if(this._activePart)return this._activePart==="range"?"all":this._sliderData.getValue(this._activePart)}async destroy(){await this.manager.destroy()}load(){this._sliderData.startup()}willUpdate(e){if((e.has("steps")||e.has("min")||e.has("max"))&&(this._stepsProvider=we(this)),e.has("messages")||e.has("min")||e.has("max")||e.has("precision")||e.has("labelFormatter")){let t=this.max!=null&&this.min!=null&&this.max-this.min>10?2:this.precision;this._numberFormatOptions={maximumFractionDigits:t},this._minFormatter=this._createFormatter("min",this._numberFormatOptions),this._maxFormatter=this._createFormatter("max",this._numberFormatOptions),this._valueFormatter=this._createFormatter("value",this._numberFormatOptions)}}updated(e){this._layoutLabelInputs();let t=this._popoverElement.value;t&&(e.has("values")||e.has("min")||e.has("max"))&&t.reposition()}loaded(){this._resizeObserver.observe(this.el)}disconnectedCallback(){super.disconnectedCallback(),this._removeDragListeners()}_makeResizeRef(){let e=null;return t=>{t?(e=t,this._resizeObserver.observe(t)):e&&(this._resizeObserver.unobserve(e),e=null)}}async _layoutLabelInputs(){if(this.layout!=="horizontal"||!this._trackElement.value||this.valueLabelsDisplay==="hidden")return;let e=this.renderRoot.querySelectorAll("arcgis-label-input"),t=this.componentOnReady().then(()=>Promise.all(Array.from(e,a=>a.updateComplete)));if(this._labelInputsUpdateComplete=t,await t,t!==this._labelInputsUpdateComplete)return;this._labelInputsUpdateComplete=null;let r=this._trackElement.value;if(!r)return;let n=r.getBoundingClientRect();for(let a of this._sliderData.entries.keys()){let l=this._activePart==="range"||this._activePart===a;if(this.valueLabelsDisplay==="always"||l){let s=Re(this,a),o=ne(this,a);if(!s||!o)continue;let d=s.getBoundingClientRect(),c=o.getBoundingClientRect(),h=o.getLabelBoundingClientRect(),u=d.width/2,p=Math.round(d.left+u),g=Math.round(h.width/2),v=c.width/2,D=n.left-u,m=n.right+u,x=p-g,M=p+g;x<D?v+=x-D:M>m&&(v+=M-m),o.style.transform=`translateX(${-Math.round(v)}px)`}}}_onTrackFocus(){this._setActivePart("range")}_onTrackBlur(){this._setActivePart(null)}_onTrackRangePointerDown(e){this._disabledOrInvalid||!O(e)||this._startDrag("range",this._mapEventToRange(e))}async _onPointerDown(e){if(this._disabledOrInvalid||!O(e))return;let t=this.renderRoot.querySelector("arcgis-label-input[editing]");if(e.target===t)return;if(t){t.blur(),this._focusEntry(C(t));return}if(Ie(e.target)||this.values?.length>1)return;let r=this._mapEventToRange(e),[n,a]=this._sliderData.entries.entries().next().value,l=r*this._fullRange+this._fullMin-a,s=F(this._fullMin,this._fullMax,a)/100;this._startDrag(n,s);let o=ie(this._stepsProvider,this._sliderData.entries,n,l,this.allowValuesOverlap);this._setValue(n,o),this._focusEntry(n)}_onThumbPointerDown(e){let t=C(e.currentTarget);if(!O(e)||this._disabledOrInvalid||!t)return;let r=ne(this,t);e.target===r&&r?.editing||(e.stopPropagation(),this._startDrag(t,this._mapEventToRange(e)))}_endDrag(){if(this._disabledOrInvalid)return;this._removeDragListeners();let e=!1;if(this._dragInfo){let{entries:t}=this._dragInfo;for(let[r,n]of t)if(this._sliderData.getValue(r)!==n){e=!0;break}}this._dragInfo=null,e&&this.arcgisChange.emit()}_startDrag(e,t){if(this._disabledOrInvalid)return;let{min:r,max:n,values:a}=this,l=r,s=n;if(this._setActivePart(e),e==="range"){if(this.segmentsDraggingDisabled)return;l=r-a[0],s=n-a[a.length-1]}this._dragInfo={position:t,entries:new Map(this._sliderData.entries.entries()),minDiff:l,maxDiff:s},this._addDragListeners()}_updateDrag(e){if(!this._dragInfo||!this._activePart)return;let{_activePart:t,_dragInfo:{position:r,entries:n,minDiff:a,maxDiff:l}}=this;if(r===e)return;let s=(e-r)*this._fullRange;if(t==="range"){s=Math.min(l,Math.max(a,s));let o=ke(this._stepsProvider,n,s);this._setValues(o)}else{let o=ie(this._stepsProvider,n,t,s,this.allowValuesOverlap);this._setValue(t,o)}}_focusEntry(e){e&&Te(this,e)?.focus()}_addDragListeners(){document.addEventListener("pointerup",this._onPointerUpDragEnd),document.addEventListener("pointermove",this._onPointerMoveDragUpdate),document.addEventListener("pointercancel",this._onPointerCancelDragEnd)}_removeDragListeners(){document.removeEventListener("pointerup",this._onPointerUpDragEnd),document.removeEventListener("pointermove",this._onPointerMoveDragUpdate),document.removeEventListener("pointercancel",this._onPointerCancelDragEnd)}_setValues(e){this._sliderData.setValues(e)&&(this._dragInfo||this.arcgisChange.emit(),this.arcgisInput.emit())}_setValue(e,t){this._sliderData.setValue(e,t)&&(this._dragInfo||this.arcgisChange.emit(),this.arcgisInput.emit())}_onThumbFocus(e){let t=C(e.currentTarget);this._setActivePart(t)}_onThumbBlur(){this._setActivePart(null)}_onRangeInputChange(e){let t=e.currentTarget,r=t.value,n=t.dataset.type,a=!1;switch(e.stopPropagation(),n){case"min":{r<this.max?(this.min=r,a=!0):t.value=this.min;break}case"max":{r>this.min?(this.max=r,a=!0):t.value=this.max;break}}a&&this.arcgisRangeChange.emit()}_onValueInputChange(e){let t=e.currentTarget,r=C(t),n=t.value;r&&(e.stopPropagation(),this._setValue(r,n),t.value=this._sliderData.getValue(r))}_mapEventToRange(e){let t=this._trackElement.value?.getBoundingClientRect();if(!t)return 0;let r=this.isHorizontal?(e.clientX-t.left)/t.width:1-(e.clientY-t.top)/t.height;return this.mirrored?1-r:r}_getPositionStyleForElement(e){let t=F(this._fullMin,this._fullMax,e);return{[this.isHorizontal?this.mirrored?"right":"left":this.mirrored?"top":"bottom"]:`${t}%`}}_popoverSlotChange(e){this._hasPopoverContent=V(e)}_onContentStartSlotChange(e){this._hasContentStart=V(e)}_onContentEndSlotChange(e){this._hasContentEnd=V(e)}_onThumbKeyDown(e){let t=C(e.currentTarget);if(!t)return;let r=e.currentTarget.querySelector("arcgis-label-input");if(!r||r.editing)return;let n=e.key;switch(n){case"Enter":{r.edit();break}case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":{e.preventDefault();let a=n==="ArrowUp"||n==="ArrowRight"?1:-1;a=this.mirrored?a*-1:a;let l=le({allowValuesOverlap:this.allowValuesOverlap,stepsProvider:this._stepsProvider,resolution:this.resolution,min:this.min,max:this.max},this._sliderData.entries,t,a);this._setValue(t,l);break}case"End":case"Home":{e.preventDefault();let a=this.isHorizontal&&this.mirrored||this.layout==="vertical"?n==="End"?-1:1:n==="Home"?-1:1,l=Pe({allowValuesOverlap:this.allowValuesOverlap,stepsProvider:this._stepsProvider,resolution:this.resolution,min:this.min,max:this.max},this._sliderData.entries,t,a);this._setValue(t,l);break}}}_onTrackRangeKeyDown(e){let t=e.key;switch(t){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":{e.preventDefault();let r=t==="ArrowUp"||t==="ArrowRight"?1:-1;r=this.mirrored?r*-1:r;let{entries:n}=De({allowValuesOverlap:this.allowValuesOverlap,stepsProvider:this._stepsProvider,resolution:this.resolution,min:this.min,max:this.max},this._sliderData.entries,r);this._setValues(n);break}case"End":case"Home":{e.preventDefault();let r=this.isHorizontal&&this.mirrored||this.layout==="vertical"?t==="End"?-1:1:t==="Home"?-1:1,n=Ee({allowValuesOverlap:this.allowValuesOverlap,stepsProvider:this._stepsProvider,resolution:this.resolution,min:this.min,max:this.max},this._sliderData.entries,r);this._setValues(n);break}}}_setActivePart(e){this._activePart!==e&&(this._activePart=e,this.arcgisActiveValueChange.emit())}render(){return f`<div class=${$({content:!0,disabled:this._disabledOrInvalid})} @pointerdown=${this._onPointerDown}>${this._renderContentStart()}${this._renderContentEnd()}${this._renderRangeLabel("min")}${this._renderTrackRange()}${this._renderRangeLabel("max")}${this._renderPopover()}</div>`}_renderPopover(){let{_activePart:e,layout:t,popoverPlacement:r,valueLabelsPlacement:n,valueLabelsDisplay:a,popoverLabel:l}=this,s=e?Me(e)?e:"track-range":"",o=this._hasPopoverContent&&!!s,d=t==="horizontal"?r==="leading"?"top":"bottom":r==="leading"?"left":"right",c=14;return a!=="hidden"&&r===n&&(c+=24),f`<calcite-popover flip-disabled focus-trap-disabled .label=${l} .open=${o} .offsetDistance=${c} .placement=${d} pointer-disabled .referenceElement=${s} scale=s trigger-disabled ${T(this._popoverElement)}><slot name=popover @slotchange=${this._popoverSlotChange}></slot></calcite-popover>`}_renderContentStart(){return f`<div class="content-start" .hidden=${!this._hasContentStart}><slot name=content-start @slotchange=${this._onContentStartSlotChange}></slot></div>`}_renderContentEnd(){return f`<div class="content-end" .hidden=${!this._hasContentEnd}><slot name=content-end @slotchange=${this._onContentEndSlotChange}></slot></div>`}_renderTrackRange(){return f`<div class="track-container">${this._renderTrack()}${this._renderThumbs()}</div>`}_renderTrack(){return f`<div class="track" ${T(this._trackElement)}>${this._renderTrackBackground()}${this._renderFillSegment()}</div>`}_renderTrackBackground(){let{max:e,min:t,fillPlacement:r,values:n}=this,a=n.length>1,l=this._fullMin,s=this._fullMax,o=[];return this._invalid?f`<div class="segment track-bounds" style=${R({left:"0%",right:"0%",top:"0%",bottom:"0%"})}></div>`:(l<t&&(o.push(this._renderSegment(l,t,[this.mirrored?"track-effective-trailing":"track-effective-leading",!a&&r==="start"?"track-fill":null])),l=t),s>e&&(o.push(this._renderSegment(e,s,[this.mirrored?"track-effective-leading":"track-effective-trailing",!a&&r==="end"?"track-fill":null])),s=e),o.push(this._renderSegment(l,s,["track-bounds"])),o)}_renderFillSegment(){let{values:e,fillPlacement:t,min:r,max:n}=this;if(!e?.length||this._invalid)return;let a=[...e].sort((s,o)=>s-o);if(a.length===1)switch(t){case"start":if(r<a[0])return this._renderSegment(r,a[0],["track-range"]);break;case"end":if(n>a[0])return this._renderSegment(a[0],n,["track-range"]);break}let l=this.segmentsDraggingDisabled;return this._renderSegment(a[0],a[a.length-1],["track-range",l?null:"interactive",this._activePart==="range"?"active":null],{id:"track-range",onFocus:l?void 0:this._onTrackFocus,onBlur:l?void 0:this._onTrackBlur,onPointerDown:l?void 0:this._onTrackRangePointerDown,onKeyDown:l?void 0:this._onTrackRangeKeyDown})}_renderSegment(e,t,r,n){let{_fullMin:a,_fullMax:l,mirrored:s}=this,o=[F(a,l,se(e,a,l)),100-F(a,l,se(t,a,l))];s&&o.reverse();let d=this.isHorizontal?{left:`${o[0]}%`,right:`${o[1]}%`}:{top:`${o[1]}%`,bottom:`${o[0]}%`},c=G("segment",...r);return f`<div id=${n?.id??w} class=${$(c)} style=${R(d)} .tabIndex=${n?.onPointerDown?0:-1} @focus=${n?.onFocus} @blur=${n?.onBlur} @pointerdown=${n?.onPointerDown} @keydown=${n?.onKeyDown}></div>`}_renderThumbs(){let{_sliderData:e}=this,t=Array.from(e.entries).filter(([,r])=>r>=this._fullMin&&r<=this._fullMax);return ae(t,([r,n])=>this._renderThumb(r,n))}_renderThumb(e,t){let{valueLabelsDisplay:r}=this,n=this._disabledOrInvalid,a=this._activePart===e||this._activePart==="range",l=this._activePart==="range"||this._activePart===e,s=r==="always"||r==="auto"&&l,o=this.isHorizontal,d=o?"horizontal":"vertical",c=`label-${e}`,h=o?"center":this.valueLabelsPlacement==="leading"?"end":"start";return X(e,f`<div id=${e??w} .ariaLabel=${this.messages.sliderValue} aria-labelledby=${(r?c:void 0)??w} .ariaOrientation=${d} .ariaValueMin=${this._minFormatter(this.min)} .ariaValueMax=${this._maxFormatter(this.max)} .ariaValueNow=${t} .ariaValueText=${this._valueFormatter(t)} class=${$({thumb:!0,active:a})} data-entry=${e??w} @pointerdown=${this._onThumbPointerDown} @focus=${this._onThumbFocus} @blur=${this._onThumbBlur} @keydown=${this._onThumbKeyDown} role=slider style=${R({...this._getPositionStyleForElement(t),"z-index":this._activePart===e?1:0})} .tabIndex=${n?-1:0}><span class="handle"></span><arcgis-label-input .alignment=${h} class="label" .hidden=${!s} id=${c??w} .labelFormatter=${this._valueFormatter} @focus=${n?void 0:this._onThumbFocus} @blur=${n?void 0:this._onThumbBlur} @arcgisChange=${this._onValueInputChange} .readOnly=${!this.valueLabelsEditingEnabled} tabindex=-1 .value=${t} ${T(this._makeResizeRef())}></arcgis-label-input></div>`)}_renderRangeLabel(e){let t="center";return this.isHorizontal&&(t=e==="min"?"end":"start",this.rangeLabelsPlacement==="trailing"&&(t=t==="end"?"start":"end"),this.mirrored&&(t=t==="end"?"start":"end")),f`<arcgis-label-input .alignment=${t} class=${$(e)} data-type=${e??w} .hidden=${!this.showRangeLabels} .labelFormatter=${this[`_${e}Formatter`]} @arcgisChange=${this._onRangeInputChange} .readOnly=${!this.rangeLabelsEditingEnabled} .value=${this[e]}></arcgis-label-input>`}};function Ie(i){return"dataset"in i&&i.tagName==="ARCGIS-LABEL-INPUT"&&(i.dataset.type==="min"||i.dataset.type==="max")}function C(i){let e=Z(i,"[data-entry]");return e&&"dataset"in e?e.dataset.entry:null}function Me(i){return typeof i!=null&&i!=="range"}function Te(i,e){return e?i.renderRoot.querySelector(`div[data-entry="${e}"]`):null}function Re(i,e){return e?i.renderRoot.querySelector(`div[data-entry="${e}"] span.handle`):null}function ne(i,e){return e?i.renderRoot.querySelector(`div[data-entry="${e}"] arcgis-label-input`):null}function O(i){return i.isPrimary&&i.button===0}var Ve=5;function F(i,e,t){let r=e-i,n=(t-i)/r*100;return Number.parseFloat(n.toFixed(Ve))}function se(i,e,t){return Math.max(e,Math.min(t,i))}Y("arcgis-slider",U);return U},"core/reactiveUtils","applications/Components/reactiveUtils","core/accessorSupport/decorators","core/Accessor","core/Accessor","core/accessorSupport/decorators","core/reactiveUtils")