@arcgis/common-components 5.1.0-next.31 → 5.1.0-next.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{ZPC4G24J.js → 2TZIP7OF.js} +1 -1
- package/dist/cdn/{NEZDZZ6D.js → 357YPDTQ.js} +1 -1
- package/dist/cdn/{2F3FM6VX.js → 3HKYWLJY.js} +1 -1
- package/dist/cdn/{6HXZBQL4.js → 45CNSLKA.js} +1 -1
- package/dist/cdn/{JKXEMJNT.js → 5GJ4DXIW.js} +1 -1
- package/dist/cdn/{CSBHN4SH.js → 5PG2K3KH.js} +1 -1
- package/dist/cdn/{SAX5Y76O.js → 736PTIHC.js} +1 -1
- package/dist/cdn/{CG7OQMEV.js → ANGNTSLN.js} +1 -1
- package/dist/cdn/{ATQVL2C7.js → CADM67RN.js} +1 -1
- package/dist/cdn/{7IYSWEUK.js → ESI3PVIT.js} +1 -1
- package/dist/cdn/{22GRTRMF.js → HVU4IDVW.js} +1 -1
- package/dist/cdn/{JN2RY5YZ.js → KAHX5ZGA.js} +1 -1
- package/dist/cdn/{3UL7AE5P.js → KRJ6PIL6.js} +1 -1
- package/dist/cdn/{7D6ITPI4.js → N5FBDEZK.js} +1 -1
- package/dist/cdn/{KAIGOKQE.js → TICCVQ7N.js} +1 -1
- package/dist/cdn/{5FTQHNFB.js → UCXHK4PA.js} +1 -1
- package/dist/cdn/{4LO2H2XZ.js → UK3JIV7H.js} +1 -1
- package/dist/cdn/{KESRGTPP.js → UKIOB6Y2.js} +1 -1
- package/dist/cdn/{X4CZ666G.js → ZHUCZTR2.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as f,b as I}from"./MB7UDGWW.js";import{a as R}from"./KESRGTPP.js";import{a as B}from"./7IYSWEUK.js";import{b as C}from"./NEZDZZ6D.js";import"./7CI55VCH.js";import{A as E,B as O,H as k,g as L,i as w,m as q,n as Z,q as F,z as U}from"./2F3FM6VX.js";export default $arcgis.t(([{formatDate:N,convertDateFormatToIntlOptions:v,formatDateOnly:Q,formatTimeOnly:X,formatTimestamp:_,formatNumber:Y},ee,{clone:D}])=>{function M(i){return new Date(`1970-01-01T${i}Z`).getTime()}function z(i){return new Date(`${i} 00:00:00`).getTime()}function te(i,e,s){let t;return e==="unknown"?t=N(i,{...v("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):t=N(i,{...v("short-date-short-time"),timeZone:e}),t}function ie(i){return i?Q(i,v("short-date")):""}function se(i){let e;return typeof i=="string"?e=X(i,v("short-date-long-time")):e=N(i,{...v("long-time"),timeZone:"utc"}),e}function ae(i,e){return typeof i=="string"?e&&"timeZone"in e&&e.timeZone==="unknown"?_(i,{...v("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):_(i,{...v("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"}):e&&"timeZone"in e&&e.timeZone==="unknown"?N(i,{...v("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):N(i,{...v("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"})}function A(i,e,s){if(i.type!=="feature"&&i.type!=="subtype-group"&&i.type!=="subtype-sublayer"&&i.type!=="imagery")return;let t;return I(i,s).fields.forEach(l=>{let a=l.name,d="domain"in l?l.domain:void 0;if(i.type!=="imagery"&&i.subtypeField===a){let m;i.type==="subtype-group"||i.type==="feature"?m=i.subtypes:m=i.parent.subtypes,m.forEach(r=>{i.type==="subtype-sublayer"&&i.subtypeCode!==r.code||(e.name===a&&(t=t||[],t.push({code:r.code,name:r.name})),r.domains&&Object.keys(r.domains).forEach(n=>{if(e.name===n){let o=r.domains[n];o?.type==="coded-value"&&o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;t=t||[],t.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||t.push({code:u.code,name:u.name})})}}))})}if(e.name===a&&(i.type==="feature"||i.type==="imagery")){let m=i.type==="feature"?i.typeIdField:void 0,r=i.type==="feature"?i.types:void 0;i.type==="feature"&&m&&r?(m===a?t=r.map(n=>({code:n.id,name:n.name})):(t=t||[],r.forEach(n=>{if(!n.domains?.[a]||n.domains[a].type==="inherited"){let o=d;o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;t.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||t.push(D(u))})}else n.domains?.[a]?.codedValues&&n.domains[a].codedValues.forEach(o=>{let u=!1;t.forEach(c=>{c.code===o.code&&(u=!0,`| ${c.name} |`.includes(`| ${o.name} |`)||(c.name+=` | ${o.name}`))}),u||t.push(D(o))})})),!t?.length&&d?.codedValues&&(t=D(d.codedValues))):d?.codedValues&&(t=d.codedValues)}}),t}function x(i,e){let s=e;if(s){let t="";for(let l=0;l<s.length;l++){let a=s[l];a.code==i&&(t+=(t.length?" | ":"")+a.name)}return t.length||(t=`${i}`),t}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}`,S=class extends O{constructor(){super(...arguments),this.dropdownNode=U(),this._messages=C({blocking:!0}),this._propWatcherTask=new R(this,{task:async([e,s,t])=>{let l=f(e)&&f(s)||f(t);if(!f(t)&&!f(e)&&!f(s)?q("error",this,Z("uniqueValues")):f(t)||(f(e)||q("error",this,Z("layer")),f(s)||q("error",this,Z("fieldName"))),f(e)&&f(s)){let{visualizationSource:a}=this;if(!I(e,a).fields?.filter(d=>d.name===s))throw q("error",this,"Field could not be found."),new Error}if(!l)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=F(),this.arcgisSortByChange=F(),this.arcgisLoad=F()}static{this.properties={initialRender:16,view:0,layer:0,visualizationSource:1,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(f(e?.uniqueValueInfos)){let{uniqueValueInfos:s,partialUniqueValues:t}=e;return{uniqueValues:s,partialUniqueValues:t}}}loaded(){this.layer&&this.fieldInfo&&(setTimeout(()=>this.initialRender=!1,800),this.listNode?.setFocus())}async processProps(){let{layer:e,fieldName:s,view:t,visualizationSource:l}=this,a=(e?I(e,l):void 0)?.fields?.filter(d=>d.name===s)?.[0];if(f(this.uniqueValues))this.fieldInfo={layerField:a,fieldDomains:e&&a?A(e,a,l):void 0,simpleType:e&&a?P(a):void 0,partialUniqueValues:this.partialUniqueValues??!1,uniqueValueInfos:this.uniqueValues},this.arcgisLoad.emit();else if(e&&a){this.fieldInfo={layerField:a,fieldDomains:A(e,a,l),simpleType:P(a),partialUniqueValues:!1};let{fieldInfo:d}=this;try{let m=await ee({layer:e,view:t,field:s,sqlWhere:"definitionExpression"in e?e.definitionExpression??void 0:void 0,forBinning:!1}),r=W(a),n=m.uniqueValueInfos.filter(o=>f(o.value)?a.type==="string"&&!r||a.type==="guid"?o.value!=="<Null>"&&`${o.value}`.trim()!=="":(W(a)||a.type,o.value!=="<Null>"&&o.value!==""):!1);n.sort((o,u)=>o.count>u.count?-1:o.count<u.count?1:0),d.fieldDomains?.length&&d.fieldDomains.forEach(o=>{n.find(u=>u.value===o.code)||n.push({value:o.code,count:0})}),d.uniqueValueInfos=n,d.partialUniqueValues=m.uniqueValueInfos.length===2e3,this.arcgisLoad.emit()}catch(m){if(q("error",this,`uniqueValues() - ${m.message}`),this.hasFieldDomains(d)){let r=[];d.fieldDomains.forEach(n=>{r.find(o=>o.value===n.code)||r.push({value:n.code,count:void 0})})}}setTimeout(()=>{this.initialRender=!1,this.listNode?.setFocus()},800)}}setListRef(e){let{maxHeight:s}=this;this.listNode=e,s&&e?.setAttribute("style",`max-height: ${s||400}px`)}onSortMenuSelect(e){let s=e.currentTarget.selectedItems?.[0].getAttribute("data-value");this.sortBy=s||void 0,this.arcgisSortByChange.emit(s||void 0)}isSameLists(e,s){if(!e&&!s)return!0;if(!e||!s||e?.length!==s?.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==s[t])return!1;return!0}hasFieldDomains(e){return!!e.fieldDomains?.length}render(){return this._propWatcherTask.render({complete:()=>{let{fieldInfo:e,selectedValues:s,sortBy:t,multiple:l,initialRender:a,showFilterLength:d,_messages:m}=this,{fieldDomains:r,uniqueValueInfos:n,partialUniqueValues:o,layerField:u}=e,c=u?.type;if(!n?.length)return"";let g=c?["small-integer","big-integer","integer","single","double","long","oid"].includes(c):!1,H=c?["date","date-only","time-only"].includes(c):!1,j=y=>{y.sort((h,p)=>h.count<=p.count?1:-1)},G=y=>{let h=r?.length;y.sort((p,V)=>{if(!h&&g)return(typeof p.value=="string"?Number.parseFloat(p.value):p.value)-(typeof V.value=="string"?Number.parseFloat(V.value):V.value);{let $=h?x(p.value,r):p.value,b=h?x(V.value,r):V.value;return`${$}`.startsWith("_")?1:`${b}`.startsWith("_")?-1:`${$}`.localeCompare(`${b}`)}})},J=(y,h)=>{y.sort((p,V)=>{let $=h?.indexOf(p.value)??-1,b=h?.indexOf(V.value)??-1;return $===b||$>-1&&b>-1?0:$>b?-1:1})};G(n),!t||t==="count"?j(n):t==="selected"&&J(n,s);let K=n.map(y=>this.renderUniqueValue(y)),T;return o&&!a&&(T=w`<div class="unique-values-content-list-msg">${m.errors.tooManyUniqueValues}</div>`),w`<div class="container"><calcite-list .label=${m.values} class="popover-unique-list" .filterEnabled=${n.length>=d} .selectionMode=${l?"multiple":"single"} .filterPlaceholder=${m.searchValues} @calciteListChange=${y=>{let h=y.target.selectedItems.map(p=>p.value);!r&&c==="date-only"?h=h?.map(p=>z(p)):!r&&c==="time-only"?h=h?.map(p=>M(p)):c&&["date","oid","small-integer","big-integer","integer","long"].includes(c)?h=h?.map(p=>Number.parseInt(p)):c&&["single","double"].includes(c)&&(h=h?.map(p=>Number.parseFloat(p))),!this.isSameLists(h,this.selectedValues)&&(this.selectedValues=h,this.arcgisChange.emit(h))}} @calciteListFilter=${()=>{this.dropdownNode.value&&(this.dropdownNode.value.disabled=this.listNode.filteredItems.length<4)}} ${E(this.setListRef)}>${n.length>=d&&!a?this.renderSort(g,H):null}${K}</calcite-list>${T}</div>`},error:()=>""})}renderSort(e,s){let{sortBy:t,_messages:l}=this;return w`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${E(this.dropdownNode)}><calcite-action slot=trigger .label=${l.sortValues} text><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${t==="count"||!f(t)} data-value=count>${l.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${t==="name"} data-value=name>${e||s?l.sortAscending:l.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${t==="selected"} data-value=selected>${l.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderUniqueValue(e){let{selectedValues:s,initialRender:t,view:l,fieldInfo:a,numberFormatOptions:d}=this,{fieldDomains:m,uniqueValueInfos:r,simpleType:n}=a,o=l&&"timeZone"in l&&l.timeZone||"system",u=m?.length?x(e.value,m):n==="date"?te(e.value,o):n==="date-only"?ie(e.value):n==="time-only"?se(e.value):n==="timestamp-offset"?ae(e.value,l):typeof e.value=="number"?Y(e.value,d):e.value,c=s?n==="date-only"?s.includes(m?.length?e.value:z(e.value)):n==="time-only"?s.includes(m?.length?e.value:M(e.value)):s.includes(e.value):!1;return B(`list-item_${e.value}`,w`<calcite-list-item .label=${`${u}`} .value=${`${e.value}`} .selected=${c}>${f(e.count)&&(r.length>200&&!t||r.length<=200)?w`<div class="count" slot=actions-end>${`${e.count}`}</div>`:null}</calcite-list-item>`)}};k("arcgis-unique-values-list",S);return S},"intl","smartMapping/statistics/uniqueValues","core/lang")
|
|
2
|
+
import{a as f,b as I}from"./MB7UDGWW.js";import{a as R}from"./UKIOB6Y2.js";import{a as B}from"./ESI3PVIT.js";import{b as C}from"./357YPDTQ.js";import"./7CI55VCH.js";import{A as E,B as O,H as k,g as L,i as w,m as q,n as Z,q as F,z as U}from"./3HKYWLJY.js";export default $arcgis.t(([{formatDate:N,convertDateFormatToIntlOptions:v,formatDateOnly:Q,formatTimeOnly:X,formatTimestamp:_,formatNumber:Y},ee,{clone:D}])=>{function M(i){return new Date(`1970-01-01T${i}Z`).getTime()}function z(i){return new Date(`${i} 00:00:00`).getTime()}function te(i,e,s){let t;return e==="unknown"?t=N(i,{...v("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):t=N(i,{...v("short-date-short-time"),timeZone:e}),t}function ie(i){return i?Q(i,v("short-date")):""}function se(i){let e;return typeof i=="string"?e=X(i,v("short-date-long-time")):e=N(i,{...v("long-time"),timeZone:"utc"}),e}function ae(i,e){return typeof i=="string"?e&&"timeZone"in e&&e.timeZone==="unknown"?_(i,{...v("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):_(i,{...v("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"}):e&&"timeZone"in e&&e.timeZone==="unknown"?N(i,{...v("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):N(i,{...v("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"})}function A(i,e,s){if(i.type!=="feature"&&i.type!=="subtype-group"&&i.type!=="subtype-sublayer"&&i.type!=="imagery")return;let t;return I(i,s).fields.forEach(l=>{let a=l.name,d="domain"in l?l.domain:void 0;if(i.type!=="imagery"&&i.subtypeField===a){let m;i.type==="subtype-group"||i.type==="feature"?m=i.subtypes:m=i.parent.subtypes,m.forEach(r=>{i.type==="subtype-sublayer"&&i.subtypeCode!==r.code||(e.name===a&&(t=t||[],t.push({code:r.code,name:r.name})),r.domains&&Object.keys(r.domains).forEach(n=>{if(e.name===n){let o=r.domains[n];o?.type==="coded-value"&&o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;t=t||[],t.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||t.push({code:u.code,name:u.name})})}}))})}if(e.name===a&&(i.type==="feature"||i.type==="imagery")){let m=i.type==="feature"?i.typeIdField:void 0,r=i.type==="feature"?i.types:void 0;i.type==="feature"&&m&&r?(m===a?t=r.map(n=>({code:n.id,name:n.name})):(t=t||[],r.forEach(n=>{if(!n.domains?.[a]||n.domains[a].type==="inherited"){let o=d;o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;t.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||t.push(D(u))})}else n.domains?.[a]?.codedValues&&n.domains[a].codedValues.forEach(o=>{let u=!1;t.forEach(c=>{c.code===o.code&&(u=!0,`| ${c.name} |`.includes(`| ${o.name} |`)||(c.name+=` | ${o.name}`))}),u||t.push(D(o))})})),!t?.length&&d?.codedValues&&(t=D(d.codedValues))):d?.codedValues&&(t=d.codedValues)}}),t}function x(i,e){let s=e;if(s){let t="";for(let l=0;l<s.length;l++){let a=s[l];a.code==i&&(t+=(t.length?" | ":"")+a.name)}return t.length||(t=`${i}`),t}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}`,S=class extends O{constructor(){super(...arguments),this.dropdownNode=U(),this._messages=C({blocking:!0}),this._propWatcherTask=new R(this,{task:async([e,s,t])=>{let l=f(e)&&f(s)||f(t);if(!f(t)&&!f(e)&&!f(s)?q("error",this,Z("uniqueValues")):f(t)||(f(e)||q("error",this,Z("layer")),f(s)||q("error",this,Z("fieldName"))),f(e)&&f(s)){let{visualizationSource:a}=this;if(!I(e,a).fields?.filter(d=>d.name===s))throw q("error",this,"Field could not be found."),new Error}if(!l)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=F(),this.arcgisSortByChange=F(),this.arcgisLoad=F()}static{this.properties={initialRender:16,view:0,layer:0,visualizationSource:1,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(f(e?.uniqueValueInfos)){let{uniqueValueInfos:s,partialUniqueValues:t}=e;return{uniqueValues:s,partialUniqueValues:t}}}loaded(){this.layer&&this.fieldInfo&&(setTimeout(()=>this.initialRender=!1,800),this.listNode?.setFocus())}async processProps(){let{layer:e,fieldName:s,view:t,visualizationSource:l}=this,a=(e?I(e,l):void 0)?.fields?.filter(d=>d.name===s)?.[0];if(f(this.uniqueValues))this.fieldInfo={layerField:a,fieldDomains:e&&a?A(e,a,l):void 0,simpleType:e&&a?P(a):void 0,partialUniqueValues:this.partialUniqueValues??!1,uniqueValueInfos:this.uniqueValues},this.arcgisLoad.emit();else if(e&&a){this.fieldInfo={layerField:a,fieldDomains:A(e,a,l),simpleType:P(a),partialUniqueValues:!1};let{fieldInfo:d}=this;try{let m=await ee({layer:e,view:t,field:s,sqlWhere:"definitionExpression"in e?e.definitionExpression??void 0:void 0,forBinning:!1}),r=W(a),n=m.uniqueValueInfos.filter(o=>f(o.value)?a.type==="string"&&!r||a.type==="guid"?o.value!=="<Null>"&&`${o.value}`.trim()!=="":(W(a)||a.type,o.value!=="<Null>"&&o.value!==""):!1);n.sort((o,u)=>o.count>u.count?-1:o.count<u.count?1:0),d.fieldDomains?.length&&d.fieldDomains.forEach(o=>{n.find(u=>u.value===o.code)||n.push({value:o.code,count:0})}),d.uniqueValueInfos=n,d.partialUniqueValues=m.uniqueValueInfos.length===2e3,this.arcgisLoad.emit()}catch(m){if(q("error",this,`uniqueValues() - ${m.message}`),this.hasFieldDomains(d)){let r=[];d.fieldDomains.forEach(n=>{r.find(o=>o.value===n.code)||r.push({value:n.code,count:void 0})})}}setTimeout(()=>{this.initialRender=!1,this.listNode?.setFocus()},800)}}setListRef(e){let{maxHeight:s}=this;this.listNode=e,s&&e?.setAttribute("style",`max-height: ${s||400}px`)}onSortMenuSelect(e){let s=e.currentTarget.selectedItems?.[0].getAttribute("data-value");this.sortBy=s||void 0,this.arcgisSortByChange.emit(s||void 0)}isSameLists(e,s){if(!e&&!s)return!0;if(!e||!s||e?.length!==s?.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==s[t])return!1;return!0}hasFieldDomains(e){return!!e.fieldDomains?.length}render(){return this._propWatcherTask.render({complete:()=>{let{fieldInfo:e,selectedValues:s,sortBy:t,multiple:l,initialRender:a,showFilterLength:d,_messages:m}=this,{fieldDomains:r,uniqueValueInfos:n,partialUniqueValues:o,layerField:u}=e,c=u?.type;if(!n?.length)return"";let g=c?["small-integer","big-integer","integer","single","double","long","oid"].includes(c):!1,H=c?["date","date-only","time-only"].includes(c):!1,j=y=>{y.sort((h,p)=>h.count<=p.count?1:-1)},G=y=>{let h=r?.length;y.sort((p,V)=>{if(!h&&g)return(typeof p.value=="string"?Number.parseFloat(p.value):p.value)-(typeof V.value=="string"?Number.parseFloat(V.value):V.value);{let $=h?x(p.value,r):p.value,b=h?x(V.value,r):V.value;return`${$}`.startsWith("_")?1:`${b}`.startsWith("_")?-1:`${$}`.localeCompare(`${b}`)}})},J=(y,h)=>{y.sort((p,V)=>{let $=h?.indexOf(p.value)??-1,b=h?.indexOf(V.value)??-1;return $===b||$>-1&&b>-1?0:$>b?-1:1})};G(n),!t||t==="count"?j(n):t==="selected"&&J(n,s);let K=n.map(y=>this.renderUniqueValue(y)),T;return o&&!a&&(T=w`<div class="unique-values-content-list-msg">${m.errors.tooManyUniqueValues}</div>`),w`<div class="container"><calcite-list .label=${m.values} class="popover-unique-list" .filterEnabled=${n.length>=d} .selectionMode=${l?"multiple":"single"} .filterPlaceholder=${m.searchValues} @calciteListChange=${y=>{let h=y.target.selectedItems.map(p=>p.value);!r&&c==="date-only"?h=h?.map(p=>z(p)):!r&&c==="time-only"?h=h?.map(p=>M(p)):c&&["date","oid","small-integer","big-integer","integer","long"].includes(c)?h=h?.map(p=>Number.parseInt(p)):c&&["single","double"].includes(c)&&(h=h?.map(p=>Number.parseFloat(p))),!this.isSameLists(h,this.selectedValues)&&(this.selectedValues=h,this.arcgisChange.emit(h))}} @calciteListFilter=${()=>{this.dropdownNode.value&&(this.dropdownNode.value.disabled=this.listNode.filteredItems.length<4)}} ${E(this.setListRef)}>${n.length>=d&&!a?this.renderSort(g,H):null}${K}</calcite-list>${T}</div>`},error:()=>""})}renderSort(e,s){let{sortBy:t,_messages:l}=this;return w`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${E(this.dropdownNode)}><calcite-action slot=trigger .label=${l.sortValues} text><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${t==="count"||!f(t)} data-value=count>${l.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${t==="name"} data-value=name>${e||s?l.sortAscending:l.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${t==="selected"} data-value=selected>${l.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderUniqueValue(e){let{selectedValues:s,initialRender:t,view:l,fieldInfo:a,numberFormatOptions:d}=this,{fieldDomains:m,uniqueValueInfos:r,simpleType:n}=a,o=l&&"timeZone"in l&&l.timeZone||"system",u=m?.length?x(e.value,m):n==="date"?te(e.value,o):n==="date-only"?ie(e.value):n==="time-only"?se(e.value):n==="timestamp-offset"?ae(e.value,l):typeof e.value=="number"?Y(e.value,d):e.value,c=s?n==="date-only"?s.includes(m?.length?e.value:z(e.value)):n==="time-only"?s.includes(m?.length?e.value:M(e.value)):s.includes(e.value):!1;return B(`list-item_${e.value}`,w`<calcite-list-item .label=${`${u}`} .value=${`${e.value}`} .selected=${c}>${f(e.count)&&(r.length>200&&!t||r.length<=200)?w`<div class="count" slot=actions-end>${`${e.count}`}</div>`:null}</calcite-list-item>`)}};k("arcgis-unique-values-list",S);return S},"intl","smartMapping/statistics/uniqueValues","core/lang")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{c as $,f as k}from"./7CI55VCH.js";import{I as N,a as C,b as L,c as m,d as f,e as P,f as O,m as g,p as v,r as w}from"./
|
|
2
|
+
import{c as $,f as k}from"./7CI55VCH.js";import{I as N,a as C,b as L,c as m,d as f,e as P,f as O,m as g,p as v,r as w}from"./3HKYWLJY.js";var _=t=>(...s)=>{let o=f(),e=new t(...s),r=e.exports;m(o.at(-1));let n=e.component.manager;n.W(e,r),e.watchExports(n.W.bind(n,e)),P(e);let a=[e.component,...o].reverse();return v(a,i=>i===void 0?void 0:j(e,i,r),r)},j=(t,{host:s,key:o,isReactive:e},r)=>{let n=s,a=n[o]!==t.exports,i=n[o]!==r,c=r!==t.exports;if(a&&!i&&c&&(n[o]=t.exports),s===t.component){if(e){let l=t.component.manager;i&&l.W(t,n[o]),t.onUpdate(u=>{if(u.has(o)){let x=n[o];x!==t.exports&&l.W(t,x)}})}t.O=e?void 0:o}let d=t.component.constructor.elementProperties.get(o)?.readOnly;t.watchExports(()=>{n[o]!==t.exports&&(d?O(()=>{n[o]=t.exports}):n[o]=t.exports)})};var z="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),M=new Set(z),h="en",U={pt:"pt-PT",nb:"no",nn:"no",zh:"zh-CN"},F=async(t,s,o="")=>{let e=`${s}/${o}`,r=`${e}${t}.json`;return b[r]??(b[r]=A(t,e)),await b[r]},b={},A=async(t,s)=>{let o=`${s}${t}.json`;try{let e=await fetch(o);if(e.ok)return await e.json()}catch(e){return g("error","intl",`An unknown error occurred while fetching localization strings at ${o}`,{detail:{error:e}}),{}}return t===h?{}:await A(h,s)},y=t=>{let s=k(t,"lang",globalThis.navigator?.language||h);return{lang:s,t9nLocale:T(s)}},T=t=>{let[s,o]=t.split("-"),e=s.toLowerCase(),r=e;return o&&(r=`${e}-${o.toUpperCase()}`),r=U[r]??r,M.has(r)?r:o?T(e):h},D=(t,s,o,e)=>{let r,n=()=>K(t,s(),e).then(a=>{(r?.lang!==a.lang||r.t9nLocale!==a.t9nLocale||r.t9nStrings!==a.t9nStrings)&&o(a),r=a}).catch(a=>{g("error","intl","Error updating component locale state",{detail:{error:a}})});return queueMicrotask(n),$(t,["lang"],n)},K=async(t,s,o=t.localName.split("-").slice(1).join("-"))=>{let{lang:e,t9nLocale:r}=y(t),n=`${s}/${o}/t9n`,i=o===null?{}:await F(r,n,"messages.");return{lang:e,t9nLocale:r,t9nStrings:i}};var W=t=>I(void 0,t);var E=class extends w{constructor(s,o){super(s);let e=this.exports;try{L(this.component);let r=o(this.component,this),n=this.exports!==e;if(C(r)){n||this.setProvisionalExports(r);let a=r.then(i=>{this.exports=i,super.catchUpLifecycle()}).catch(i=>{this.P.reject(i)});this.onLoad(async()=>await a)}else(!n||r!==void 0)&&(this.exports=r),queueMicrotask(()=>super.catchUpLifecycle())}catch(r){this.P.reject(r)}}catchUpLifecycle(){}},I=_(E);var S=t=>(s={})=>W((o,e)=>{let r=y(o.el),n={_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0},a=o;e.onLifecycle(()=>D(o.el,()=>t("./assets"),({t9nLocale:c,t9nStrings:p,lang:d})=>{let l={...p,_lang:d,_t9nLocale:c,_loading:!1};e.exports=l;let u=p.componentLabel;typeof u=="string"&&"label"in o&&o.label==null&&(o.label??=u),i(a.messageOverrides)},s.name));let i=c=>{let p=e.exports,d=p._original??p,l=V(d,c);c&&(l._original=d),e.exports=l};return"messageOverrides"in a&&e.onUpdate(c=>{c.has("messageOverrides")&&i(a.messageOverrides)}),s.blocking?(e.setProvisionalExports(n,!1),e.ready):n}),V=(t,s)=>{if(!s)return t;let o={...t};return Object.entries(s).forEach(([e,r])=>{t[e]!==void 0&&(typeof r=="object"?o[e]=V(t[e],r):o[e]=r??t[e])}),o};var ct=S(N);export{_ as a,ct as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
var Y=globalThis,Z=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,vt=Symbol(),Mt=new WeakMap,M=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==vt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Z&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=Mt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Mt.set(e,t))}return t}toString(){return this.cssText}},kt=o=>new M(typeof o=="string"?o:o+"",void 0,vt),be=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((s,r,n)=>s+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+o[n+1],o[0]);return new M(e,o,vt)},jt=(o,t)=>{if(Z)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),r=Y.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=e.cssText,o.appendChild(s)}},Et=Z?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return kt(e)})(o):o;var{is:_e,defineProperty:Ae,getOwnPropertyDescriptor:Ce,getOwnPropertyNames:we,getOwnPropertySymbols:Oe,getPrototypeOf:Te}=Object,tt=globalThis,Ht=tt.trustedTypes,Se=Ht?Ht.emptyScript:"",Pe=tt.reactiveElementPolyfillSupport,k=(o,t)=>o,X={toAttribute(o,t){switch(t){case Boolean:o=o?Se:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},j=(o,t)=>!_e(o,t),zt={attribute:!0,type:String,converter:X,reflect:!1,useDefault:!1,hasChanged:j};Symbol.metadata??=Symbol("metadata"),tt.litPropertyMetadata??=new WeakMap;var _=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=zt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),r=this.getPropertyDescriptor(t,s,e);r!==void 0&&Ae(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){let{get:r,set:n}=Ce(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:r,set(i){let a=r?.call(this);n?.call(this,i),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??zt}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;let t=Te(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){let e=this.properties,s=[...we(e),...Oe(e)];for(let r of s)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,r]of e)this.elementProperties.set(s,r)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let r=this._$Eu(e,s);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let r of s)e.unshift(Et(r))}else t!==void 0&&e.push(Et(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return jt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){let n=(s.converter?.toAttribute!==void 0?s.converter:X).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(t,e){let s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let n=s.getPropertyOptions(r),i=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:X;this._$Em=r;let a=i.fromAttribute(e,n.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(t,e,s,r=!1,n){if(t!==void 0){let i=this.constructor;if(r===!1&&(n=this[t]),s??=i.getPropertyOptions(t),!((s.hasChanged??j)(n,e)||s.useDefault&&s.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:r,wrapped:n},i){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),n!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,n]of this._$Ep)this[r]=n;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[r,n]of s){let{wrapped:i}=n,a=this[r];i!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,n,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};_.elementStyles=[],_.shadowRootOptions={mode:"open"},_[k("elementProperties")]=new Map,_[k("finalized")]=new Map,Pe?.({ReactiveElement:_}),(tt.reactiveElementVersions??=[]).push("2.1.2");var bt=globalThis,Vt=o=>o,et=bt.trustedTypes,Bt=et?et.createPolicy("lit-html",{createHTML:o=>o}):void 0,_t="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,At="?"+A,Ne=`<${At}>`,T=document,z=()=>T.createComment(""),V=o=>o===null||typeof o!="object"&&typeof o!="function",Ct=Array.isArray,Qt=o=>Ct(o)||typeof o?.[Symbol.iterator]=="function",$t=`[
|
|
3
3
|
\f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Wt=/-->/g,Ft=/>/g,w=RegExp(`>|${$t}(?:([^\\s"'>=/]+)(${$t}*=${$t}*(?:[^
|
|
4
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),qt=/'/g,Gt=/"/g,Jt=/^(?:script|style|textarea|title)$/i,wt=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),us=wt(1),fs=wt(2),ms=wt(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Kt=new WeakMap,O=T.createTreeWalker(T,129);function Yt(o,t){if(!Ct(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Bt!==void 0?Bt.createHTML(t):t}var Zt=(o,t)=>{let e=o.length-1,s=[],r,n=t===2?"<svg>":t===3?"<math>":"",i=H;for(let a=0;a<e;a++){let c=o[a],h,u,l=-1,m=0;for(;m<c.length&&(i.lastIndex=m,u=i.exec(c),u!==null);)m=i.lastIndex,i===H?u[1]==="!--"?i=Wt:u[1]!==void 0?i=Ft:u[2]!==void 0?(Jt.test(u[2])&&(r=RegExp("</"+u[2],"g")),i=w):u[3]!==void 0&&(i=w):i===w?u[0]===">"?(i=r??H,l=-1):u[1]===void 0?l=-2:(l=i.lastIndex-u[2].length,h=u[1],i=u[3]===void 0?w:u[3]==='"'?Gt:qt):i===Gt||i===qt?i=w:i===Wt||i===Ft?i=H:(i=w,r=void 0);let v=i===w&&o[a+1].startsWith("/>")?" ":"";n+=i===H?c+Ne:l>=0?(s.push(h),c.slice(0,l)+_t+c.slice(l)+A+v):c+A+(l===-2?a:v)}return[Yt(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},B=class o{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let n=0,i=0,a=t.length-1,c=this.parts,[h,u]=Zt(t,e);if(this.el=o.createElement(h,s),O.currentNode=this.el.content,e===2||e===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(r=O.nextNode())!==null&&c.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let l of r.getAttributeNames())if(l.endsWith(_t)){let m=u[i++],v=r.getAttribute(l).split(A),C=/([.?@])?(.*)/.exec(m);c.push({type:1,index:n,name:C[2],strings:v,ctor:C[1]==="."?ot:C[1]==="?"?rt:C[1]==="@"?nt:P}),r.removeAttribute(l)}else l.startsWith(A)&&(c.push({type:6,index:n}),r.removeAttribute(l));if(Jt.test(r.tagName)){let l=r.textContent.split(A),m=l.length-1;if(m>0){r.textContent=et?et.emptyScript:"";for(let v=0;v<m;v++)r.append(l[v],z()),O.nextNode(),c.push({type:2,index:++n});r.append(l[m],z())}}}else if(r.nodeType===8)if(r.data===At)c.push({type:2,index:n});else{let l=-1;for(;(l=r.data.indexOf(A,l+1))!==-1;)c.push({type:7,index:n}),l+=A.length-1}n++}}static createElement(t,e){let s=T.createElement("template");return s.innerHTML=t,s}};function S(o,t,e=o,s){if(t===f)return t;let r=s!==void 0?e._$Co?.[s]:e._$Cl,n=V(t)?void 0:t._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),n===void 0?r=void 0:(r=new n(o),r._$AT(o,e,s)),s!==void 0?(e._$Co??=[])[s]=r:e._$Cl=r),r!==void 0&&(t=S(o,r._$AS(o,t.values),r,s)),t}var st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,r=(t?.creationScope??T).importNode(e,!0);O.currentNode=r;let n=O.nextNode(),i=0,a=0,c=s[0];for(;c!==void 0;){if(i===c.index){let h;c.type===2?h=new L(n,n.nextSibling,this,t):c.type===1?h=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(h=new it(n,this,t)),this._$AV.push(h),c=s[++a]}i!==c?.index&&(n=O.nextNode(),i++)}return O.currentNode=T,r}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},L=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),V(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Qt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&V(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=B.createElement(Yt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(e);else{let n=new st(r,this),i=n.u(this.options);n.p(e),this.T(i),this._$AH=n}}_$AC(t){let e=Kt.get(t.strings);return e===void 0&&Kt.set(t.strings,e=new B(t)),e}k(t){Ct(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,r=0;for(let n of t)r===e.length?e.push(s=new o(this.O(z()),this.O(z()),this,this.options)):s=e[r],s._$AI(n),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=Vt(t).nextSibling;Vt(t).remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,r){let n=this.strings,i=!1;if(n===void 0)t=S(this,t,e,0),i=!V(t)||t!==this._$AH&&t!==f,i&&(this._$AH=t);else{let a=t,c,h;for(t=n[0],c=0;c<n.length-1;c++)h=S(this,a[s+c],e,c),h===f&&(h=this._$AH[c]),i||=!V(h)||h!==this._$AH[c],h===d?t=d:t!==d&&(t+=(h??"")+n[c+1]),this._$AH[c]=h}i&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ot=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},rt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},nt=class extends P{constructor(t,e,s,r,n){super(t,e,s,r,n),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??d)===f)return;let s=this._$AH,r=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==d&&(s===d||r);r&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},it=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}},Xt={M:_t,P:A,A:At,C:1,L:Zt,R:st,D:Qt,V:S,I:L,H:P,N:rt,U:nt,B:ot,F:it},De=bt.litHtmlPolyfillSupport;De?.(B,L),(bt.litHtmlVersions??=[]).push("3.3.2");var at=(o,t,e)=>{let s=e?.renderBefore??t,r=s._$litPart$;if(r===void 0){let n=e?.renderBefore??null;s._$litPart$=r=new L(t.insertBefore(z(),n),n,void 0,e??{})}return r._$AI(o),r};var Ot=globalThis,$=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=at(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};$._$litElement$=!0,$.finalized=!0,Ot.litElementHydrateSupport?.({LitElement:$});var xe=Ot.litElementPolyfillSupport;xe?.({LitElement:$});(Ot.litElementVersions??=[]).push("4.2.2");var te=new Set,ee;var se=o=>typeof o=="string"?o:"el"in o?o.el.localName:"localName"in o?o.localName:o.declaredClass,Ss=(o,t,e,s)=>{let r=se(t);if(s?.once){let i=`${o}${r}${e}`;if(te.has(i))return;te.add(i)}let n;if(s?.detail){n={};for(let[i,a]of Object.entries(s.detail))if((typeof a=="object"||typeof a=="function")&&a!==null){let c=new WeakRef(a);Object.defineProperty(n,i,{get(){return c.deref()}})}else n[i]=a;ee?.log.interceptors?.forEach(i=>i(o,r,e,n)),console[o](`[${r}]: ${e}`,n)}else ee?.log.interceptors?.forEach(i=>i(o,r,e)),console[o](`[${r}]: ${e}`)},oe=o=>{let t=`[${se(o)}] `;return e=>{let s=e instanceof Error&&e.message?e:new Error(String(e));s.message=`${t}${s.message}`,setTimeout(()=>{throw e})}},Ps=o=>`The property \`${o.toString()}\` is required but missing.`;var p=(o,t,...e)=>{try{return o?.call(t,...e)}catch(s){console.error(s,o)}},W=async(o,t,...e)=>{try{return await o?.call(t,...e)}catch(s){console.error(s,o)}};var q=Symbol.for("controller"),Le=o=>typeof o=="object"&&o!==null&&(q in o||"hostConnected"in o||"hostDisconnected"in o||"hostUpdate"in o||"hostUpdated"in o),xs=o=>typeof o?.then=="function";var F,D=o=>{F!==o&&(F=o,queueMicrotask(()=>F===o?F=void 0:0))},G=o=>F,N=[],re=o=>{if(o===void 0){N=[];return}let t=N.indexOf(o);N=t===-1?[...N,o]:N.slice(0,t+1),queueMicrotask(()=>N=[])},ne=()=>N,U,Ls=o=>{U!==o&&(U=o,queueMicrotask(()=>U===o?U=void 0:0))},Ue=()=>{let o=U;return U=void 0,o},ie=async(o,t)=>{let e=lt(o);if(e===void 0)return o;if(await e.ready,typeof t=="function"){let s=e.watchExports(r=>t(r,s))}return e.exports},ae=async o=>{let t=lt(o);return await t.ready,t},lt=o=>{let e=G().manager.X(o);if(e!==void 0)return e;if(Le(o))return o;let s=Ue();if(s!==void 0)return s},ct=!1,Us=o=>{ct=!0;try{return o()}finally{ct=!1}};var b=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}},ce=(o,t)=>{let e=t>Re?Ie:t/Me,s=0,r=setInterval(()=>{s+=e,s>=t&&(clearInterval(r),o())},e);return r},Re=4e3,Ie=2e3,Me=4;var ke=(o,t,e)=>{let s=Object.keys(o),r=s.length;R===void 0&&queueMicrotask(I),R??=new Map;let n=R.get(o);return n===void 0&&(n={callbacks:[],keyCount:r},R.set(o,n)),n.keyCount!==r&&(n.callbacks.forEach(i=>i(s)),n.callbacks=[],n.keyCount=r),n.callbacks.push(i=>{let a=h=>p(t,null,h),c=i[r];c===void 0?a(void 0):o[c]===e?a(c):a(void 0)}),e},R,I=()=>{R?.forEach(({callbacks:o},t)=>{let e=Object.keys(t);o.forEach(s=>s(e))}),R=void 0},je=(o,t,e)=>{let s=o.manager;return s.V!==d&&s.V!==e&&s.S(void 0,void 0),s.T.length===0&&queueMicrotask(()=>s.S(void 0,void 0)),s.V=e,s.T.push((r,n)=>p(t,void 0,e===n?r:void 0)),e},He=(o=[G(),...ne()],t,e)=>{let s=Array.isArray(o)?o:[o],r=s.length+1,n=i=>{r-=1,i!==void 0&&(r=Math.min(r,0)),r===0&&t(i)};s.forEach(i=>ke(i,a=>n(a===void 0?void 0:{key:a,host:i,isReactive:!1}),e));for(let i of s)if("manager"in i&&i.manager.component===i){je(i,a=>n(a===void 0?void 0:{key:a,host:i,isReactive:!0}),e);break}return e},ze=(o="",t={},e=G())=>{let s={emit:r=>{o===""&&I();let n=new CustomEvent(o,{detail:r,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(n),n}};return o===""&&He(void 0,r=>o=r.key,s),s},Ve=ze.bind(null,""),de;de=q;var Tt=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#r=[],this.#n=[],this.#a=[],this.#l=[],this.#h=[],this.#d=[],this.#p=!1,this.P=new b,this.connectedCalled=!1,this.loadedCalled=!1,this[de]=!0,this.#c=[];let e=this,s=t??G(new.target.name);e.#o=s,e.ready=e.P.promise,e.#i=he(e),e.component=s,e.#o.addController(e),e.#o.manager===void 0||(re(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#r;#n;#a;#l;#h;#d;#p;#o;catchUpLifecycle(){let{manager:t}=this.#o;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#p&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(oe(this.#o))}#i;get exports(){return this.#i}set exports(t){let e=this.#i;e!==t&&(this.#i=t,this.#c.forEach(p),this.connectedCalled&&this.O!==!1&&this.#o.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#i=e?he(t):t,this.#c.forEach(p)}#c;watchExports(t){let e=()=>t(this.#i);return this.#c.push(e),()=>void this.#c.splice(this.#c.indexOf(e),1)}get use(){return D(this.#o),ie}get useRef(){return D(this.#o),ae}get useRefSync(){return D(this.#o),lt}controllerRemoved(){this.#o.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#r.push(t)}onUpdate(t){this.#n.push(t)}onUpdated(t){this.#a.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#h.push(t),this.connectedCalled&&this.#o.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#d.forEach(p),t.#d=[]}async triggerLoad(){if(this.#p)return;this.#p=!0;let t=this;t.hostLoad&&await W(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(W)),this.P.resolve(this.#i)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#r.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#n.forEach(le,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#a.forEach(le,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#h.forEach(this.#u,this)}#u(t){D(this.#o);let e=p(t);(Array.isArray(e)?e:[e]).forEach(r=>{typeof r=="function"?this.#d.push(r):typeof r=="object"&&typeof r.remove=="function"&&this.#d.push(r.remove)})}};function le(o){p(o,void 0,this)}var pe=Tt,he=o=>{if(typeof o!="object"&&typeof o!="function"||o===null)return o;let t={get(s,r,n){if(!((r==="exports"||r==="_exports")&&r in s&&s[r]===e)&&(r in s||r in Promise.prototype||typeof r=="symbol"))return typeof s=="function"?s[r]:Reflect.get(s,r,n)}},e=new Proxy(o,t);return e};var ht=o=>o.replace(Be,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),Be=/[A-Z]+(?![a-z])|[A-Z]/gu;var We="randomUUID"in crypto,Ws=()=>{if(We)return crypto.randomUUID();let o=crypto.getRandomValues(new Uint16Array(8));o[3]=o[3]&4095|16384,o[4]=o[4]&16383|32768;let t=e=>o[e].toString(16).padStart(4,"0");return`${t(0)+t(1)}-${t(2)}-${t(3)}-${t(4)}-${t(5)}${t(6)}${t(7)}`};var Pt=o=>{let t=o;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(o),(e.I??e._postLoad).promise}return!1},Nt={};function Dt(){}function xt(o){for(let e of["Associated","Disabled","Reset","StateRestore"]){let s=`orm${e}Callback`;o.prototype["f"+s]=function(...r){this.manager===void 0?this.constructor.B.then(()=>t(this,s,...r)):t(this,s,...r)}}let t=(e,s,...r)=>(e.el??e).dispatchEvent(new CustomEvent(`luminaF${s}`,{detail:r}))}var Fe=(o,t)=>function(s,r){if(!globalThis.customElements)return;let i=(r??s??{}).resourcesUrl;i&&o.setAssetPath(i);for(let[a,[c,h="",u=0]]of Object.entries(t)){if(customElements.get(a))continue;let[l,m,v]=h.split(";"),C=l?l?.split(",").map(qe):void 0,gt=C?.map(([x])=>x),J=class extends St{static{this.formAssociated=u===1}static{this.observedAttributes=C?.map(([,x])=>x).filter(x=>x!=="")}static{this.C=gt}static{this.E=m?m?.split(","):void 0}static{this.D=v?.split(",")}static{this.L=a}static{this.K=o}constructor(){!J.B&&(J.B=c(),J.F()),super()}};customElements.define(a,J)}},dt=Object.defineProperty,qe=o=>{let t=o.split(":");return t.length===1?[t[0],ht(t[0])]:t},Ge=globalThis.HTMLElement??Dt,St=class extends Ge{constructor(){super(),this.#e={},this.#s=[],this.I=new b,this.H=new b,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(s=>{Object.hasOwn(t,s)&&(t.#e[s]=t[s],delete t[s])}),e.A?t.#r({a:e.A}):e.B.then(async s=>{await e.K.p,t.#r(await(s.default?.then(r=>typeof r=="function"?{a:r}:r)??s))}).catch(s=>{t.H.reject(s),setTimeout(()=>{throw s})})}static{this.lumina=!0}static F(){for(let t of this.C??[])dt(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])dt(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])dt(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}static{xt(this)}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,s){this.#t?.attributeChangedCallback(t,e,s),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=Pt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#r(t){let e=this.constructor,s=e.L,r=this.#e,n=Object.values(t).find(l=>l.L===s),i=`${s}--lazy`,a=n;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);Qe(a),!e.A&&(e.A=n,customElements.define(i,n)),n.N=this;let h=document.createElement(i);n.N=void 0,this.#t=h,this.#e=h,this.#s.forEach(l=>h.attributeChangedCallback(l,null,this.getAttribute(l))),Object.entries(r).forEach(Ke,h);let u=this.isConnected;(u||this.G)&&(h.connectedCallback?.(),u||h.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function Ke([o,t]){this[o]=t}var Qe=o=>{let t=o.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(r,n){e.setAttribute.call(this.el,r,n)},t.removeAttribute=function(r){e.removeAttribute.call(this.el,r)},dt(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var{I:Xs}=Xt;var pt=o=>o.strings===void 0;var Je={},fe=(o,t=Je)=>o._$AH=t;var y={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},E=o=>(...t)=>({_$litDirective$:o,values:t}),g=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var K=(o,t)=>{let e=o._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),K(s,t);return!0},ut=o=>{let t,e;do{if((t=o._$AM)===void 0)break;e=t._$AN,e.delete(o),o=t}while(e?.size===0)},me=o=>{for(let t;t=o._$AM;o=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(o))break;e.add(o),Xe(t)}};function Ye(o){this._$AN!==void 0?(ut(this),this._$AM=o,me(this)):this._$AM=o}function Ze(o,t=!1,e=0){let s=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(s))for(let n=e;n<s.length;n++)K(s[n],!1),ut(s[n]);else s!=null&&(K(s,!1),ut(s));else K(this,o)}var Xe=o=>{o.type==y.CHILD&&(o._$AP??=Ze,o._$AQ??=Ye)},ft=class extends g{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),me(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(K(this,t),ut(this))}setValue(t){if(pt(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var lo=()=>new Ut,Ut=class{},Lt=new WeakMap,Rt=E(class extends ft{render(o){return d}update(o,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=o.options?.host,this.rt(this.ct=o.element)),d}rt(o){if(this.isConnected||(o=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=Lt.get(t);e===void 0&&(e=new WeakMap,Lt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,o),o!==void 0&&this.G.call(this.ht,o)}else this.G.value=o}get lt(){return typeof this.G=="function"?Lt.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var mt=class extends pe{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=yt in t&&typeof t.destroy=="function",$.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${yt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),I();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),D(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>void this.#e.destroy();this.#t=ce(t,es)}}S(t,e){let s=this.T;this.V=d,this.T=[],s.forEach(r=>r(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},es=1e3,yt="autoDestroyDisabled";var ye=E(class extends g{constructor(o){if(super(o),o.type!==y.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(t=>o[t]).join(" ")+" "}update(o,[t]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(let s in t)t[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(t)}let e=o.element.classList;for(let s of this.st)s in t||(e.remove(s),this.st.delete(s));for(let s in t){let r=!!t[s];r===this.st.has(s)||this.nt?.has(s)||(r?(e.add(s),this.st.add(s)):(e.remove(s),this.st.delete(s)))}return f}});var ge="important",ss=" !"+ge,ve=E(class extends g{constructor(o){if(super(o),o.type!==y.ATTRIBUTE||o.name!=="style"||o.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((t,e)=>{let s=o[e];return s==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`},"")}update(o,[t]){let{style:e}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let s of this.ft)t[s]==null&&(this.ft.delete(s),s.includes("-")?e.removeProperty(s):e[s]=null);for(let s in t){let r=t[s];if(r!=null){this.ft.add(s);let n=typeof r=="string"&&r.endsWith(ss);s.includes("-")||n?e.setProperty(s,n?r.slice(0,-11):r,n?ge:""):e[s]=r}}return f}});var os=E(class extends g{constructor(o){if(super(o),o.type!==y.PROPERTY&&o.type!==y.ATTRIBUTE&&o.type!==y.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!pt(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[t]){if(t===f||t===d)return t;let e=o.element,s=o.name;if(o.type===y.PROPERTY){if(t===e[s])return f}else if(o.type===y.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(s))return f}else if(o.type===y.ATTRIBUTE&&e.getAttribute(s)===t+"")return f;return fe(o),t}});var Ee=class o extends ${constructor(){super(),this.M=[],this.manager=new mt(this);let t=this,e=t.constructor,s=e.N,r=e.K.o,n=o.prototype.shouldUpdate;t.#r=s?.H??new b,t.I=s?.I??new b,t.J=s?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=s??t,t.#s=t.enableUpdating,t.enableUpdating=Dt,t.shouldUpdate!==n&&(t.#e=t.shouldUpdate,t.shouldUpdate=n),r&&(t.#t=new Map,e.elementProperties.forEach((i,a)=>t.#t.set(a,r()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),s=this.shadowRootOptions===Nt;return this.K?.commonStyles===void 0||s?e:[this.K.commonStyles,...e]}static createProperty(t,e){let s=typeof e=="number"?e:Array.isArray(e)?e[0]:0,r=Array.isArray(e)?e[1]:void 0,n=r?.hasChanged??j,i={attribute:s&1&&typeof t=="string"?ht(t):!1,reflect:!!(s&2),type:s&4?Boolean:s&8?Number:void 0,state:!!(s&16),readOnly:!!(s&32),noAccessor:!!(s&64),c:!1,...r,hasChanged(a,c){let h=n(a,c);return i.c=h,h}};super.createProperty(t,i)}static getPropertyDescriptor(t,e,s){let r=this.K,n=super.getPropertyDescriptor(t,e,s);return s.d=n,{...n,get(){return r.t?.(this.#t.get(t)),n.get?.call(this)},set(i){let a=this.manager;if(s.readOnly&&!ct&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${i}"`);n.set.call(this,i??void 0),s.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(I(),a?.S(t,i))}}}static{this.lumina=!0}static{xt(this)}#t;#e;#s;#r;#n;#a;get elementInternals(){return this.#a??=this.el.attachInternals(),this.#a}connectedCallback(){if(this.el.hasAttribute("defer-hydration"))return;let t=this.constructor.K.c?.(()=>this.requestUpdate());this.#n=t;let e=!this.manager.connectedCalled;super.connectedCallback(),e?queueMicrotask(()=>this.#h().catch(s=>{this.#r.reject(s),setTimeout(()=>{throw s})})):t&&this.requestUpdate()}#l(t){try{this.#n.clear(),this.constructor.K.r(this.#n,()=>super.update(t))}catch(e){throw this.#n.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#n?.destroy(),this.#n=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,s=e.shadowRootOptions,n=t??(s===Nt?this.el:this.el.attachShadow(s));if(this.isConnected){let i=n.getRootNode();i.adoptedStyleSheets=[...i.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return n}async#h(){let t=this.el.G??Pt(this.el);t&&await t;let e=[];for(let r of this.M)"triggerLoad"in r?e.push(r.triggerLoad()):e.push(W(r.hostLoad,r));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(r=>r.has(yt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await Promise.resolve();let s=this.J.filter(r=>!r.manager?.loadedCalled);s.length&&await Promise.allSettled(s.map(async r=>await r.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let r of this.M)"triggerLoaded"in r?r.triggerLoaded():p(r.hostLoaded,r);this.loaded?.(),this.#r.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#n?this.#l(t):super.update(t)}listen(t,e,s){let r=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,r,s),()=>this.el.removeEventListener(t,r,s)))}listenOn(t,e,s,r){let n=s?.bind(this)??s;this.manager.onLifecycle(()=>(t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)))}async componentOnReady(){return await this.#r.promise,this}addController(t){this.M.push(t),!(q in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var $e=o=>{let t,e=r=>{t=new URL(r,globalThis.location?.href||void 0).href},s={...o,getAssetPath(r){let n=new URL(r,t);return n.origin!==globalThis.location?.origin?n.href:n.pathname},setAssetPath:e,customElement(r,n){n.K=s,n.L=r,customElements.get(r)||customElements.define(r,n)}};return e(o.defaultAssetPath),s};var Cr=o=>typeof o=="object"&&o!=null?ye(o):o,wr=o=>typeof o=="object"&&o!=null?ve(o):o;var It=class extends g{#t;#e;constructor(t){super(t);let e=this;this.#e=function(r){return e.#t.call(this,r)}}render(t){return typeof t=="function"?(this.#t=t,Rt(this.#e)):Rt(t)}},Or=E(It);var Tr=d;var Sr=o=>{let t=document.createElement("div");return at(o,t),t.firstElementChild};var Q=$e({defaultAssetPath:"https://jsdev.arcgis.com/5.1.0-next/common-components/",hydratedAttribute:"hydrated"}),{customElement:Lr,getAssetPath:Ur,setAssetPath:Rr}=Q;Q.t=void 0;Q.o=void 0;Q.c=void 0;Q.r=void 0;export{xs as a,D as b,re as c,ne as d,Ls as e,Us as f,be as g,j as h,us as i,fs as j,d as k,at as l,Ss as m,Ps as n,je as o,He as p,Ve as q,Tt as r,pe as s,Ws as t,Nt as u,Fe as v,E as w,g as x,fe as y,lo as z,Rt as A,Ee as B,Cr as C,wr as D,Tr as E,Sr as F,Q as G,Lr as H,Ur as I};
|
|
4
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),qt=/'/g,Gt=/"/g,Jt=/^(?:script|style|textarea|title)$/i,wt=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),us=wt(1),fs=wt(2),ms=wt(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Kt=new WeakMap,O=T.createTreeWalker(T,129);function Yt(o,t){if(!Ct(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Bt!==void 0?Bt.createHTML(t):t}var Zt=(o,t)=>{let e=o.length-1,s=[],r,n=t===2?"<svg>":t===3?"<math>":"",i=H;for(let a=0;a<e;a++){let c=o[a],h,u,l=-1,m=0;for(;m<c.length&&(i.lastIndex=m,u=i.exec(c),u!==null);)m=i.lastIndex,i===H?u[1]==="!--"?i=Wt:u[1]!==void 0?i=Ft:u[2]!==void 0?(Jt.test(u[2])&&(r=RegExp("</"+u[2],"g")),i=w):u[3]!==void 0&&(i=w):i===w?u[0]===">"?(i=r??H,l=-1):u[1]===void 0?l=-2:(l=i.lastIndex-u[2].length,h=u[1],i=u[3]===void 0?w:u[3]==='"'?Gt:qt):i===Gt||i===qt?i=w:i===Wt||i===Ft?i=H:(i=w,r=void 0);let v=i===w&&o[a+1].startsWith("/>")?" ":"";n+=i===H?c+Ne:l>=0?(s.push(h),c.slice(0,l)+_t+c.slice(l)+A+v):c+A+(l===-2?a:v)}return[Yt(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},B=class o{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let n=0,i=0,a=t.length-1,c=this.parts,[h,u]=Zt(t,e);if(this.el=o.createElement(h,s),O.currentNode=this.el.content,e===2||e===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(r=O.nextNode())!==null&&c.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let l of r.getAttributeNames())if(l.endsWith(_t)){let m=u[i++],v=r.getAttribute(l).split(A),C=/([.?@])?(.*)/.exec(m);c.push({type:1,index:n,name:C[2],strings:v,ctor:C[1]==="."?ot:C[1]==="?"?rt:C[1]==="@"?nt:P}),r.removeAttribute(l)}else l.startsWith(A)&&(c.push({type:6,index:n}),r.removeAttribute(l));if(Jt.test(r.tagName)){let l=r.textContent.split(A),m=l.length-1;if(m>0){r.textContent=et?et.emptyScript:"";for(let v=0;v<m;v++)r.append(l[v],z()),O.nextNode(),c.push({type:2,index:++n});r.append(l[m],z())}}}else if(r.nodeType===8)if(r.data===At)c.push({type:2,index:n});else{let l=-1;for(;(l=r.data.indexOf(A,l+1))!==-1;)c.push({type:7,index:n}),l+=A.length-1}n++}}static createElement(t,e){let s=T.createElement("template");return s.innerHTML=t,s}};function S(o,t,e=o,s){if(t===f)return t;let r=s!==void 0?e._$Co?.[s]:e._$Cl,n=V(t)?void 0:t._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),n===void 0?r=void 0:(r=new n(o),r._$AT(o,e,s)),s!==void 0?(e._$Co??=[])[s]=r:e._$Cl=r),r!==void 0&&(t=S(o,r._$AS(o,t.values),r,s)),t}var st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,r=(t?.creationScope??T).importNode(e,!0);O.currentNode=r;let n=O.nextNode(),i=0,a=0,c=s[0];for(;c!==void 0;){if(i===c.index){let h;c.type===2?h=new L(n,n.nextSibling,this,t):c.type===1?h=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(h=new it(n,this,t)),this._$AV.push(h),c=s[++a]}i!==c?.index&&(n=O.nextNode(),i++)}return O.currentNode=T,r}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},L=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),V(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Qt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&V(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=B.createElement(Yt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(e);else{let n=new st(r,this),i=n.u(this.options);n.p(e),this.T(i),this._$AH=n}}_$AC(t){let e=Kt.get(t.strings);return e===void 0&&Kt.set(t.strings,e=new B(t)),e}k(t){Ct(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,r=0;for(let n of t)r===e.length?e.push(s=new o(this.O(z()),this.O(z()),this,this.options)):s=e[r],s._$AI(n),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=Vt(t).nextSibling;Vt(t).remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,r){let n=this.strings,i=!1;if(n===void 0)t=S(this,t,e,0),i=!V(t)||t!==this._$AH&&t!==f,i&&(this._$AH=t);else{let a=t,c,h;for(t=n[0],c=0;c<n.length-1;c++)h=S(this,a[s+c],e,c),h===f&&(h=this._$AH[c]),i||=!V(h)||h!==this._$AH[c],h===d?t=d:t!==d&&(t+=(h??"")+n[c+1]),this._$AH[c]=h}i&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ot=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},rt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},nt=class extends P{constructor(t,e,s,r,n){super(t,e,s,r,n),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??d)===f)return;let s=this._$AH,r=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==d&&(s===d||r);r&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},it=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}},Xt={M:_t,P:A,A:At,C:1,L:Zt,R:st,D:Qt,V:S,I:L,H:P,N:rt,U:nt,B:ot,F:it},De=bt.litHtmlPolyfillSupport;De?.(B,L),(bt.litHtmlVersions??=[]).push("3.3.2");var at=(o,t,e)=>{let s=e?.renderBefore??t,r=s._$litPart$;if(r===void 0){let n=e?.renderBefore??null;s._$litPart$=r=new L(t.insertBefore(z(),n),n,void 0,e??{})}return r._$AI(o),r};var Ot=globalThis,$=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=at(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};$._$litElement$=!0,$.finalized=!0,Ot.litElementHydrateSupport?.({LitElement:$});var xe=Ot.litElementPolyfillSupport;xe?.({LitElement:$});(Ot.litElementVersions??=[]).push("4.2.2");var te=new Set,ee;var se=o=>typeof o=="string"?o:"el"in o?o.el.localName:"localName"in o?o.localName:o.declaredClass,Ss=(o,t,e,s)=>{let r=se(t);if(s?.once){let i=`${o}${r}${e}`;if(te.has(i))return;te.add(i)}let n;if(s?.detail){n={};for(let[i,a]of Object.entries(s.detail))if((typeof a=="object"||typeof a=="function")&&a!==null){let c=new WeakRef(a);Object.defineProperty(n,i,{get(){return c.deref()}})}else n[i]=a;ee?.log.interceptors?.forEach(i=>i(o,r,e,n)),console[o](`[${r}]: ${e}`,n)}else ee?.log.interceptors?.forEach(i=>i(o,r,e)),console[o](`[${r}]: ${e}`)},oe=o=>{let t=`[${se(o)}] `;return e=>{let s=e instanceof Error&&e.message?e:new Error(String(e));s.message=`${t}${s.message}`,setTimeout(()=>{throw e})}},Ps=o=>`The property \`${o.toString()}\` is required but missing.`;var p=(o,t,...e)=>{try{return o?.call(t,...e)}catch(s){console.error(s,o)}},W=async(o,t,...e)=>{try{return await o?.call(t,...e)}catch(s){console.error(s,o)}};var q=Symbol.for("controller"),Le=o=>typeof o=="object"&&o!==null&&(q in o||"hostConnected"in o||"hostDisconnected"in o||"hostUpdate"in o||"hostUpdated"in o),xs=o=>typeof o?.then=="function";var F,D=o=>{F!==o&&(F=o,queueMicrotask(()=>F===o?F=void 0:0))},G=o=>F,N=[],re=o=>{if(o===void 0){N=[];return}let t=N.indexOf(o);N=t===-1?[...N,o]:N.slice(0,t+1),queueMicrotask(()=>N=[])},ne=()=>N,U,Ls=o=>{U!==o&&(U=o,queueMicrotask(()=>U===o?U=void 0:0))},Ue=()=>{let o=U;return U=void 0,o},ie=async(o,t)=>{let e=lt(o);if(e===void 0)return o;if(await e.ready,typeof t=="function"){let s=e.watchExports(r=>t(r,s))}return e.exports},ae=async o=>{let t=lt(o);return await t.ready,t},lt=o=>{let e=G().manager.X(o);if(e!==void 0)return e;if(Le(o))return o;let s=Ue();if(s!==void 0)return s},ct=!1,Us=o=>{ct=!0;try{return o()}finally{ct=!1}};var b=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}},ce=(o,t)=>{let e=t>Re?Ie:t/Me,s=0,r=setInterval(()=>{s+=e,s>=t&&(clearInterval(r),o())},e);return r},Re=4e3,Ie=2e3,Me=4;var ke=(o,t,e)=>{let s=Object.keys(o),r=s.length;R===void 0&&queueMicrotask(I),R??=new Map;let n=R.get(o);return n===void 0&&(n={callbacks:[],keyCount:r},R.set(o,n)),n.keyCount!==r&&(n.callbacks.forEach(i=>i(s)),n.callbacks=[],n.keyCount=r),n.callbacks.push(i=>{let a=h=>p(t,null,h),c=i[r];c===void 0?a(void 0):o[c]===e?a(c):a(void 0)}),e},R,I=()=>{R?.forEach(({callbacks:o},t)=>{let e=Object.keys(t);o.forEach(s=>s(e))}),R=void 0},je=(o,t,e)=>{let s=o.manager;return s.V!==d&&s.V!==e&&s.S(void 0,void 0),s.T.length===0&&queueMicrotask(()=>s.S(void 0,void 0)),s.V=e,s.T.push((r,n)=>p(t,void 0,e===n?r:void 0)),e},He=(o=[G(),...ne()],t,e)=>{let s=Array.isArray(o)?o:[o],r=s.length+1,n=i=>{r-=1,i!==void 0&&(r=Math.min(r,0)),r===0&&t(i)};s.forEach(i=>ke(i,a=>n(a===void 0?void 0:{key:a,host:i,isReactive:!1}),e));for(let i of s)if("manager"in i&&i.manager.component===i){je(i,a=>n(a===void 0?void 0:{key:a,host:i,isReactive:!0}),e);break}return e},ze=(o="",t={},e=G())=>{let s={emit:r=>{o===""&&I();let n=new CustomEvent(o,{detail:r,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(n),n}};return o===""&&He(void 0,r=>o=r.key,s),s},Ve=ze.bind(null,""),de;de=q;var Tt=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#r=[],this.#n=[],this.#a=[],this.#l=[],this.#h=[],this.#d=[],this.#p=!1,this.P=new b,this.connectedCalled=!1,this.loadedCalled=!1,this[de]=!0,this.#c=[];let e=this,s=t??G(new.target.name);e.#o=s,e.ready=e.P.promise,e.#i=he(e),e.component=s,e.#o.addController(e),e.#o.manager===void 0||(re(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#r;#n;#a;#l;#h;#d;#p;#o;catchUpLifecycle(){let{manager:t}=this.#o;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#p&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(oe(this.#o))}#i;get exports(){return this.#i}set exports(t){let e=this.#i;e!==t&&(this.#i=t,this.#c.forEach(p),this.connectedCalled&&this.O!==!1&&this.#o.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#i=e?he(t):t,this.#c.forEach(p)}#c;watchExports(t){let e=()=>t(this.#i);return this.#c.push(e),()=>void this.#c.splice(this.#c.indexOf(e),1)}get use(){return D(this.#o),ie}get useRef(){return D(this.#o),ae}get useRefSync(){return D(this.#o),lt}controllerRemoved(){this.#o.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#r.push(t)}onUpdate(t){this.#n.push(t)}onUpdated(t){this.#a.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#h.push(t),this.connectedCalled&&this.#o.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#d.forEach(p),t.#d=[]}async triggerLoad(){if(this.#p)return;this.#p=!0;let t=this;t.hostLoad&&await W(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(W)),this.P.resolve(this.#i)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#r.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#n.forEach(le,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#a.forEach(le,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#h.forEach(this.#u,this)}#u(t){D(this.#o);let e=p(t);(Array.isArray(e)?e:[e]).forEach(r=>{typeof r=="function"?this.#d.push(r):typeof r=="object"&&typeof r.remove=="function"&&this.#d.push(r.remove)})}};function le(o){p(o,void 0,this)}var pe=Tt,he=o=>{if(typeof o!="object"&&typeof o!="function"||o===null)return o;let t={get(s,r,n){if(!((r==="exports"||r==="_exports")&&r in s&&s[r]===e)&&(r in s||r in Promise.prototype||typeof r=="symbol"))return typeof s=="function"?s[r]:Reflect.get(s,r,n)}},e=new Proxy(o,t);return e};var ht=o=>o.replace(Be,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),Be=/[A-Z]+(?![a-z])|[A-Z]/gu;var We="randomUUID"in crypto,Ws=()=>{if(We)return crypto.randomUUID();let o=crypto.getRandomValues(new Uint16Array(8));o[3]=o[3]&4095|16384,o[4]=o[4]&16383|32768;let t=e=>o[e].toString(16).padStart(4,"0");return`${t(0)+t(1)}-${t(2)}-${t(3)}-${t(4)}-${t(5)}${t(6)}${t(7)}`};var Pt=o=>{let t=o;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(o),(e.I??e._postLoad).promise}return!1},Nt={};function Dt(){}function xt(o){for(let t of["Associated","Disabled","Reset","StateRestore"]){let e=`orm${t}Callback`;o.prototype["f"+e]=async function(...s){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${e}`,{detail:s}))}}}var Fe=(o,t)=>function(s,r){if(!globalThis.customElements)return;let i=(r??s??{}).resourcesUrl;i&&o.setAssetPath(i);for(let[a,[c,h="",u=0]]of Object.entries(t)){if(customElements.get(a))continue;let[l,m,v]=h.split(";"),C=l?l?.split(",").map(qe):void 0,gt=C?.map(([x])=>x),J=class extends St{static{this.formAssociated=u===1}static{this.observedAttributes=C?.map(([,x])=>x).filter(x=>x!=="")}static{this.C=gt}static{this.E=m?m?.split(","):void 0}static{this.D=v?.split(",")}static{this.L=a}static{this.K=o}constructor(){!J.B&&(J.B=c(),J.F()),super()}};customElements.define(a,J)}},dt=Object.defineProperty,qe=o=>{let t=o.split(":");return t.length===1?[t[0],ht(t[0])]:t},Ge=globalThis.HTMLElement??Dt,St=class extends Ge{constructor(){super(),this.#e={},this.#s=[],this.I=new b,this.H=new b,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(s=>{Object.hasOwn(t,s)&&(t.#e[s]=t[s],delete t[s])}),e.A?t.#r({a:e.A}):e.B.then(async s=>{await e.K.p,t.#r(await(s.default?.then(r=>typeof r=="function"?{a:r}:r)??s))}).catch(s=>{t.H.reject(s),setTimeout(()=>{throw s})})}static{this.lumina=!0}static F(){for(let t of this.C??[])dt(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])dt(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])dt(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}static{xt(this)}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,s){this.#t?.attributeChangedCallback(t,e,s),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=Pt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#r(t){let e=this.constructor,s=e.L,r=this.#e,n=Object.values(t).find(l=>l.L===s),i=`${s}--lazy`,a=n;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);Qe(a),!e.A&&(e.A=n,customElements.define(i,n)),n.N=this;let h=document.createElement(i);n.N=void 0,this.#t=h,this.#e=h,this.#s.forEach(l=>h.attributeChangedCallback(l,null,this.getAttribute(l))),Object.entries(r).forEach(Ke,h);let u=this.isConnected;(u||this.G)&&(h.connectedCallback?.(),u||h.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function Ke([o,t]){this[o]=t}var Qe=o=>{let t=o.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(r,n){e.setAttribute.call(this.el,r,n)},t.removeAttribute=function(r){e.removeAttribute.call(this.el,r)},dt(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var{I:Xs}=Xt;var pt=o=>o.strings===void 0;var Je={},fe=(o,t=Je)=>o._$AH=t;var y={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},E=o=>(...t)=>({_$litDirective$:o,values:t}),g=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var K=(o,t)=>{let e=o._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),K(s,t);return!0},ut=o=>{let t,e;do{if((t=o._$AM)===void 0)break;e=t._$AN,e.delete(o),o=t}while(e?.size===0)},me=o=>{for(let t;t=o._$AM;o=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(o))break;e.add(o),Xe(t)}};function Ye(o){this._$AN!==void 0?(ut(this),this._$AM=o,me(this)):this._$AM=o}function Ze(o,t=!1,e=0){let s=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(s))for(let n=e;n<s.length;n++)K(s[n],!1),ut(s[n]);else s!=null&&(K(s,!1),ut(s));else K(this,o)}var Xe=o=>{o.type==y.CHILD&&(o._$AP??=Ze,o._$AQ??=Ye)},ft=class extends g{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),me(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(K(this,t),ut(this))}setValue(t){if(pt(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var lo=()=>new Ut,Ut=class{},Lt=new WeakMap,Rt=E(class extends ft{render(o){return d}update(o,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=o.options?.host,this.rt(this.ct=o.element)),d}rt(o){if(this.isConnected||(o=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=Lt.get(t);e===void 0&&(e=new WeakMap,Lt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,o),o!==void 0&&this.G.call(this.ht,o)}else this.G.value=o}get lt(){return typeof this.G=="function"?Lt.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var mt=class extends pe{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=yt in t&&typeof t.destroy=="function",$.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${yt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),I();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),D(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>void this.#e.destroy();this.#t=ce(t,es)}}S(t,e){let s=this.T;this.V=d,this.T=[],s.forEach(r=>r(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},es=1e3,yt="autoDestroyDisabled";var ye=E(class extends g{constructor(o){if(super(o),o.type!==y.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(t=>o[t]).join(" ")+" "}update(o,[t]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(let s in t)t[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(t)}let e=o.element.classList;for(let s of this.st)s in t||(e.remove(s),this.st.delete(s));for(let s in t){let r=!!t[s];r===this.st.has(s)||this.nt?.has(s)||(r?(e.add(s),this.st.add(s)):(e.remove(s),this.st.delete(s)))}return f}});var ge="important",ss=" !"+ge,ve=E(class extends g{constructor(o){if(super(o),o.type!==y.ATTRIBUTE||o.name!=="style"||o.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((t,e)=>{let s=o[e];return s==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`},"")}update(o,[t]){let{style:e}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let s of this.ft)t[s]==null&&(this.ft.delete(s),s.includes("-")?e.removeProperty(s):e[s]=null);for(let s in t){let r=t[s];if(r!=null){this.ft.add(s);let n=typeof r=="string"&&r.endsWith(ss);s.includes("-")||n?e.setProperty(s,n?r.slice(0,-11):r,n?ge:""):e[s]=r}}return f}});var os=E(class extends g{constructor(o){if(super(o),o.type!==y.PROPERTY&&o.type!==y.ATTRIBUTE&&o.type!==y.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!pt(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[t]){if(t===f||t===d)return t;let e=o.element,s=o.name;if(o.type===y.PROPERTY){if(t===e[s])return f}else if(o.type===y.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(s))return f}else if(o.type===y.ATTRIBUTE&&e.getAttribute(s)===t+"")return f;return fe(o),t}});var Ee=class o extends ${constructor(){super(),this.M=[],this.manager=new mt(this);let t=this,e=t.constructor,s=e.N,r=e.K.o,n=o.prototype.shouldUpdate;t.#r=s?.H??new b,t.I=s?.I??new b,t.J=s?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=s??t,t.#s=t.enableUpdating,t.enableUpdating=Dt,t.shouldUpdate!==n&&(t.#e=t.shouldUpdate,t.shouldUpdate=n),r&&(t.#t=new Map,e.elementProperties.forEach((i,a)=>t.#t.set(a,r()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),s=this.shadowRootOptions===Nt;return this.K?.commonStyles===void 0||s?e:[this.K.commonStyles,...e]}static createProperty(t,e){let s=typeof e=="number"?e:Array.isArray(e)?e[0]:0,r=Array.isArray(e)?e[1]:void 0,n=r?.hasChanged??j,i={attribute:s&1&&typeof t=="string"?ht(t):!1,reflect:!!(s&2),type:s&4?Boolean:s&8?Number:void 0,state:!!(s&16),readOnly:!!(s&32),noAccessor:!!(s&64),c:!1,...r,hasChanged(a,c){let h=n(a,c);return i.c=h,h}};super.createProperty(t,i)}static getPropertyDescriptor(t,e,s){let r=this.K,n=super.getPropertyDescriptor(t,e,s);return s.d=n,{...n,get(){return r.t?.(this.#t.get(t)),n.get?.call(this)},set(i){let a=this.manager;if(s.readOnly&&!ct&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${i}"`);n.set.call(this,i??void 0),s.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(I(),a?.S(t,i))}}}static{this.lumina=!0}static{xt(this)}#t;#e;#s;#r;#n;#a;get elementInternals(){return this.#a??=this.el.attachInternals(),this.#a}connectedCallback(){if(this.el.hasAttribute("defer-hydration"))return;let t=this.constructor.K.c?.(()=>this.requestUpdate());this.#n=t;let e=!this.manager.connectedCalled;super.connectedCallback(),e?queueMicrotask(()=>this.#h().catch(s=>{this.#r.reject(s),setTimeout(()=>{throw s})})):t&&this.requestUpdate()}#l(t){try{this.#n.clear(),this.constructor.K.r(this.#n,()=>super.update(t))}catch(e){throw this.#n.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#n?.destroy(),this.#n=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,s=e.shadowRootOptions,n=t??(s===Nt?this.el:this.el.attachShadow(s));if(this.isConnected){let i=n.getRootNode();i.adoptedStyleSheets=[...i.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return n}async#h(){let t=this.el.G??Pt(this.el);t&&await t;let e=[];for(let r of this.M)"triggerLoad"in r?e.push(r.triggerLoad()):e.push(W(r.hostLoad,r));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(r=>r.has(yt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await Promise.resolve();let s=this.J.filter(r=>!r.manager?.loadedCalled);s.length&&await Promise.allSettled(s.map(async r=>await r.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let r of this.M)"triggerLoaded"in r?r.triggerLoaded():p(r.hostLoaded,r);this.loaded?.(),this.#r.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#n?this.#l(t):super.update(t)}listen(t,e,s){let r=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,r,s),()=>this.el.removeEventListener(t,r,s)))}listenOn(t,e,s,r){let n=s?.bind(this)??s;this.manager.onLifecycle(()=>(t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)))}async componentOnReady(){return await this.#r.promise,this}addController(t){this.M.push(t),!(q in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var $e=o=>{let t,e=r=>{t=new URL(r,globalThis.location?.href||void 0).href},s={...o,getAssetPath(r){let n=new URL(r,t);return n.origin!==globalThis.location?.origin?n.href:n.pathname},setAssetPath:e,customElement(r,n){n.K=s,n.L=r,customElements.get(r)||customElements.define(r,n)}};return e(o.defaultAssetPath),s};var Cr=o=>typeof o=="object"&&o!=null?ye(o):o,wr=o=>typeof o=="object"&&o!=null?ve(o):o;var It=class extends g{#t;#e;constructor(t){super(t);let e=this;this.#e=function(r){return e.#t.call(this,r)}}render(t){return typeof t=="function"?(this.#t=t,Rt(this.#e)):Rt(t)}},Or=E(It);var Tr=d;var Sr=o=>{let t=document.createElement("div");return at(o,t),t.firstElementChild};var Q=$e({defaultAssetPath:"https://jsdev.arcgis.com/5.1.0-next/common-components/",hydratedAttribute:"hydrated"}),{customElement:Lr,getAssetPath:Ur,setAssetPath:Rr}=Q;Q.t=void 0;Q.o=void 0;Q.c=void 0;Q.r=void 0;export{xs as a,D as b,re as c,ne as d,Ls as e,Us as f,be as g,j as h,us as i,fs as j,d as k,at as l,Ss as m,Ps as n,je as o,He as p,Ve as q,Tt as r,pe as s,Ws as t,Nt as u,Fe as v,E as w,g as x,fe as y,lo as z,Rt as A,Ee as B,Cr as C,wr as D,Tr as E,Sr as F,Q as G,Lr as H,Ur as I};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as Q}from"./7IYSWEUK.js";import{a as re}from"./EPX7DYFW.js";import{a as ee,b as te}from"./NEZDZZ6D.js";import{a as V,b as X,d as J}from"./7CI55VCH.js";import{A as S,B as G,C as $,D as F,E,H as Z,g as K,i as x,o as q,p as W,q as C,s as Y,t as R,z as O}from"./2F3FM6VX.js";export default $arcgis.t(([{on:qe,watch:ne},{createObservable:me,trackAccess:pe},{property:Xe,subclass:Je},et,xe,{property:P,subclass:ye},{watch:H}])=>{var ae=(n,e)=>t=>fe(t,n),A=class extends Y{constructor(e,t){super(e),this.Y=new Map,this.A=void 0,this.#r=me();let r=this;r.#e=t,r.Z(),r.setProvisionalExports(ve(e,new WeakRef(r),e.M.length-1,r.instance,r.Y),!1),q(e,i=>{if(i){let a=ne(()=>e[i],o=>{if(o===r.instance)return;let s=r.instance;r.exports=o,r.instance=o,r.Y.forEach((l,c)=>e.requestUpdate(l,s[c])),r.#t&&s.destroy(),r.#t=!1},{sync:!0});r.onDestroy(a.remove)}},r.exports)}#t;#r;#e;get exports(){return pe(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?.()}},fe=ee(A),ve=(n,e,t,r,i)=>new Proxy(r,{get:(a,o)=>{let s=a[o];if(typeof o=="symbol"||i.has(o))return s;let l=n.M[t];return l.A=o,W(n,c=>{if(l.A=void 0,c!==void 0){let d=c.key;i.set(o,d);let h=n.constructor.getPropertyOptions(d),u=o!==d&&d.toLowerCase().includes("disable");be(e,h,o,d,u),h.i===void 0&&_e(h,t,o,u)}},s)}}),be=(n,e,t,r,i,a)=>a=ne(()=>{let o=n.deref();return o===void 0||o.component.manager.destroyed?a=a.remove():o.exports[t]},(o,s)=>{if(!a)return;n.deref().component?.requestUpdate(r,i?!s:s),e.c=!1},{sync:!0}),_e=(n,e,t,r)=>{n.d.get=function(){let i=this.M[e]?.exports[t];return r?!i:i},n.d.set=function(i){let a=this.M[e];a.A!==t&&(a.exports[t]=r?!i:i)}};function*ie(n,e){if(n!==void 0){let t=0;for(let r of n)yield e(r,t++)}}var v={increment:"ArrowUp",incrementHorizontal:"ArrowRight",decrement:"ArrowDown",decrementHorizontal:"ArrowLeft",pageIncrement:"PageUp",pageDecrement:"PageDown",jumpToStart:"Home",jumpToEnd:"End",confirmEdit:"Enter"};function se({key:n,shiftKey:e},t,r){let i=ke(n);if(i==null)return null;let a=De(n)||we(n)&&e?Ee(t):1;return{direction:r?i*-1:i,count:a}}function ke(n){return n===v.increment||n===v.incrementHorizontal||n===v.pageIncrement?1:n===v.decrement||n===v.decrementHorizontal||n===v.pageDecrement?-1:null}function oe(n){return n===v.jumpToEnd||n===v.jumpToStart}function we(n){return n===v.increment||n===v.decrement||n===v.decrementHorizontal||n===v.incrementHorizontal}function De(n){return n===v.pageIncrement||n===v.pageDecrement}function Ee(n){let e=Number.isFinite(n)?Math.floor(n):1;return Math.max(1,e)}var Pe=K`: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-start: 0;--arcgis-slider-internal-value-labels-placement-end: 0;--arcgis-slider-internal-range-labels-placement-center: 0;--arcgis-slider-internal-range-labels-placement-end: 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="start"]){--arcgis-slider-internal-value-labels-placement-start: var(--arcgis-slider-internal-show-value-labels)}:host([value-labels-placement="end"]){--arcgis-slider-internal-value-labels-placement-end: 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="end"]){--arcgis-slider-internal-range-labels-placement-end: 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-start{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-end{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-start{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-end{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="start"]){.label{right:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="end"]){.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-start) * 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-end) * 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="start"]){.label{bottom:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="end"]){.label{top:var(--arcgis-slider-internal-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="end"]){.content{--arcgis-slider-internal-content-start-min-height: calc( var(--arcgis-slider-internal-handle-offset) + var(--arcgis-slider-internal-value-labels-placement-start) * var(--arcgis-slider-internal-label-input-height) );--arcgis-slider-internal-content-end-min-height: calc( var(--arcgis-slider-internal-value-labels-placement-end) * 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-end) * 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="start"]){.label{bottom:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="end"]){.label{top:calc(var(--arcgis-slider-internal-label-input-margin) + var(--arcgis-slider-internal-range-labels-placement-end) * (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))}}}`,Ce=Object.defineProperty,$e=Object.getOwnPropertyDescriptor,D=(n,e,t,r)=>{for(var i=r>1?void 0:r?$e(e,t):e,a=n.length-1,o;a>=0;a--)(o=n[a])&&(i=(r?o(e,t,i):o(i))||i);return r&&i&&Ce(e,t,i),i};function Me(){return{min:0,max:100,values:[]}}var k=class extends xe{constructor(n={}){super({...Me(),properties:n}),this._entries=new Map,this.precision=4,this.ready=!1}startup(){let{precision:n}=this,{min:e,max:t,values:r}=this;t=y(t,n),e=y(e,n),r=r?.map(a=>I(y(a,n),e,t)),this._set("min",e),this._set("max",t),this._set("values",r);let i=new Map(r?.map(a=>[R(),a]));this._entries=i,H(()=>this.min,a=>{let o=this.values;a!=null&&o?.length&&o.some(s=>s<a)&&(this._entries.forEach((s,l)=>{s<a&&this._entries.set(l,a)}),this._updatesValues())},{sync:!0}),H(()=>this.max,a=>{let o=this.values;a!=null&&o?.length&&o.some(s=>s>a)&&(this._entries.forEach((s,l)=>{s>a&&this._entries.set(l,a)}),this._updatesValues())},{sync:!0}),H(()=>this.precision,a=>{let{min:o,max:s,values:l}=this;this._set("min",y(o,a)),this._set("max",y(s,a)),l?.length&&(this._entries.forEach((c,d)=>{this._entries.set(d,y(c,a))}),this._updatesValues())},{sync:!0}),this._set("ready",!0)}get entries(){return this._entries}set max(n){if(!this.ready){this._set("max",n);return}let e=this._get("max"),t=y(n,this.precision);e!==t&&this._set("max",t)}set min(n){if(!this.ready){this._set("min",n);return}let e=this._get("min"),t=y(n,this.precision);e!==t&&this._set("min",t)}set values(n){if(!this.ready){this._set("values",n);return}let e=this._get("values");if(n=n?.map(r=>I(y(r,this.precision),this.min,this.max)).sort((r,i)=>r-i),e&&n&&e.length===n.length&&e.every((r,i)=>r===n[i]))return;let t=new Map(n?.map(r=>[R(),r]));this._entries=t,this._set("values",n)}getValue(n){return this._entries.get(n)}setValue(n,e){if(this.values==null)return!1;let{min:t,max:r}=this,i=this._entries.get(n),a=I(y(e,this.precision),t,r);return i===a?!1:(this._entries.set(n,a),this._updatesValues(),!0)}setValues(n){if(this.values==null)return!1;let e=!1,{min:t,max:r}=this;for(let[i,a]of n){let o=this._entries.get(i),s=I(y(a,this.precision),t,r);o!==s&&(e=!0,this._entries.set(i,s))}return e?(this._updatesValues(),!0):!1}_updatesValues(){let n=Array.from(this._entries.values()).sort((e,t)=>e-t);this._set("values",n)}};D([P()],k.prototype,"_entries",2);D([P({readOnly:!0})],k.prototype,"entries",1);D([P()],k.prototype,"max",1);D([P()],k.prototype,"min",1);D([P({cast:n=>I(n,0,20)})],k.prototype,"precision",2);D([P({readOnly:!0})],k.prototype,"ready",2);D([P()],k.prototype,"values",1);k=D([ye("esri.widgets.Slider.SliderData")],k);function I(n,e,t){return Math.min(Math.max(n,e),t)}function y(n,e){return Number.parseFloat(n.toFixed(e))}var N=class{constructor(e){this.steps=e,this.minIndex=0,this.maxIndex=this.steps.length-1}indexToValue(e){return this.steps[w(e,this.minIndex,this.maxIndex)]}valueToIndex(e){let t=this.steps.indexOf(e);return t!==-1?t:this.steps.reduce((r,i,a,o)=>Math.abs(i-e)<Math.abs(o[r]-e)?a:r)}getClosestStepDistances(e,t){if(t<=0)return[];let r=[];for(let i=this.minIndex;i<=this.maxIndex;i++){let a=this.indexToValue(i),o=Math.abs(a-e),s=!1;for(let l=0;l<r.length;l++)if(o<r[l].dist){r.splice(l,0,{idx:i,value:a,dist:o}),s=!0;break}!s&&r.length<t&&r.push({idx:i,value:a,dist:o}),r.length>t&&(r.length=t)}return r}},B=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+w(e,this.minIndex,this.maxIndex)*this.stepSize}valueToIndex(e){return e=w(e,this.min,this.max),Math.round((e-this.min)/this.stepSize)}getClosestStepDistances(e,t){if(t<=0)return[];let r=[],i=this.minIndex,a=this.maxIndex,o=(w(e,this.min,this.max)-this.min)/this.stepSize,s=Math.floor(o),l=s+1;for(;r.length<t&&(s>=i||l<=a);){if(s<i){let p=this.indexToValue(l);r.push({idx:l,value:p,dist:Math.abs(p-e)}),l++;continue}if(l>a){let p=this.indexToValue(s);r.push({idx:s,value:p,dist:Math.abs(p-e)}),s--;continue}let c=this.indexToValue(s),d=this.indexToValue(l),h=Math.abs(c-e),u=Math.abs(d-e);h<=u?(r.push({idx:s,value:c,dist:h}),s--):(r.push({idx:l,value:d,dist:u}),l++)}return r}};function Ie(n){if(n.steps==null)return null;let e=n.steps;return Array.isArray(e)?e.length===0?null:new N(e):e<=0?null:new B(n.min,n.max,e)}function Te(n,e,t){if(n==null){let s=new Map;for(let[l,c]of e.entries())s.set(l,c+t);return s}let r=e.size,i=Array.from(e.entries()).map(([s,l])=>{let c=l+t,d=n.getClosestStepDistances(c,r);return{uuid:s,stepDistances:d}}),a=new Set,o=new Map;i.sort((s,l)=>s.stepDistances[0].dist-l.stepDistances[0].dist);for(let s of i){let l=s.stepDistances.find(c=>!a.has(c.idx));l?(a.add(l.idx),o.set(s.uuid,l.value)):o.set(s.uuid,e.get(s.uuid))}return o}function le(n,e,t,r,i){let a=e.get(t)??0;if(!n)return a+r;let o=a+r,s=n.minIndex,l=n.maxIndex,c=new Set;if(!i)for(let[g,f]of e.entries())g!==t&&c.add(n.valueToIndex(f));let d=w(n.valueToIndex(o),s,l);if(!c.has(d))return n.indexToValue(d);let h=null,u=1/0,p=Math.min(Math.max(d-s,l-d),c.size+1);for(let g=1;g<=p;g++){let f=d-g;if(f>=s&&!c.has(f)){let m=n.indexToValue(f),b=Math.abs(m-o);h=f,u=b}let _=d+g;if(_<=l&&!c.has(_)){let m=n.indexToValue(_),b=Math.abs(m-o);(h==null||b<u)&&(h=_,u=b)}if(h!=null)return n.indexToValue(h)}return h==null?a:n.indexToValue(h)}function Se(n,e,t,r=1){let i=he(r),a=e,o=!1;for(let s=0;s<i;s++){let l=Ve(n,a,t);if(o||=l.changed,a=l.entries,!l.changed)break}return{changed:o,entries:a}}function Fe(n,e,t,r,i=1){let a=he(i);if(a===1)return U(n,e,t,r);let o=new Map(e),s=o.get(t);for(let l=0;l<a;l++){let c=U(n,o,t,r);if(c===s)break;s=c,o.set(t,s)}return s}function he(n){let e=Number.isFinite(n)?Math.floor(n):1;return Math.max(1,e)}function Ve(n,e,t){let r=new Map,i=t>0?Re:ue,a=Array.from(e).sort((l,c)=>i(l[1],c[1])),o=!1,s=!0;for(let[l,c]of a)if(r.set(l,c),s){let d=U(n,r,l,t);c===d&&(s=!1),o||=s,r.set(l,d)}return{changed:o,entries:r}}function U(n,e,t,r){let{allowValuesOverlap:i,stepsProvider:a,resolution:o,min:s,max:l}=n,c=e.get(t);if(r=r>0?1:-1,!a){let m=w(c+r*o,s,l);if(i)return m;let b=new Set;for(let[T,ge]of e)T!==t&&b.add(ge);for(;b.has(m)&&m<=l&&m>=s;)m=w(m+r*o,s,l);return b.has(m)||m>l||m<s?c:m}let d=a.valueToIndex(c);if(d===-1)return c;if(i){let m=w(d+r,a.minIndex,a.maxIndex);return a.indexToValue(m)}let h=new Set;for(let[m,b]of e)m!==t&&h.add(a.valueToIndex(b));let u=d,p=!1,g=a.minIndex,f=a.maxIndex,_=0;for(;_<Math.abs(f-g)&&(u+=r,!(u<g||u>f));){if(!h.has(u)){p=!0;break}_++}return p?a.indexToValue(u):c}function ze(n,e,t,r){let{allowValuesOverlap:i,stepsProvider:a,resolution:o,min:s,max:l}=n,c=e.get(t);if(r=r>0?1:-1,!a){let p=new Set(Array.from(e).filter(([f])=>f!==t).map(([,f])=>f)),g=r>0?l:s;if(i)return g;for(;p.has(g);)if(g-=r*o,r>0&&g>l||r<0&&g<s){g=c;break}return g}if(i)return r>0?a.indexToValue(a.maxIndex):a.indexToValue(a.minIndex);let d=a.valueToIndex(c);if(d===-1)return c;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>l||r<0&&u<s){u=d;break}return a.indexToValue(u)}function Le(n,e,t){let{stepsProvider:r,min:i,max:a}=n,o=new Map,s=Array.from(e).sort((c,d)=>ue(c[1],d[1]));if(r){let c=0;if(t>0){let d=s[s.length-1],h=r.valueToIndex(d[1]);c=r.maxIndex-h}else{let d=s[0],h=r.valueToIndex(d[1]);c=r.minIndex-h}if(c===0)for(let[d,h]of s)o.set(d,h);for(let[d,h]of s){let u=r.indexToValue(r.valueToIndex(h)+c);o.set(d,u)}return o}let l=0;if(t>0){let c=s[s.length-1];l=a-c[1]}else{let c=s[0];l=i-c[1]}for(let[c,d]of s)o.set(c,d+l);return o}function ue(n,e){return n-e}function Re(n,e){return e-n}function w(n,e,t){return Math.max(e,Math.min(t,n))}var Oe=ae(k),j=class extends G{constructor(){super(...arguments),this._stepsProvider=null,this._popoverElement=O(),this._trackElement=O(),this.messages=te({}),this._onPointerMoveDragUpdate=e=>{this._updateDrag(this._mapEventToRange(e))},this._onPointerUpDragEnd=e=>{z(e)&&this._endDrag()},this._onPointerCancelDragEnd=()=>{this._endDrag()},this._formatLabel=(e,t,r)=>{let i=re(this.messages._lang,t),a=this.labelFormatter;return a?a(r,e,s=>i.format(s))??i.format(r):i.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._activePart=null,this._sliderData=Oe(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="start",this.precision=this._sliderData.precision,this.rangeLabelsEditingEnabled=!1,this.rangeLabelsPlacement="center",this.segmentsDraggingDisabled=!1,this.showRangeLabels=!1,this.valueLabelsDisplay="hidden",this.valueLabelsPlacement="start",this.valueLabelsEditingEnabled=!1,this.keyboardLargeStep=10,this.values=this._sliderData.values,this.arcgisActiveValueChange=C({cancelable:!1}),this.arcgisChange=C({cancelable:!1}),this.arcgisInput=C({cancelable:!1}),this.arcgisRangeChange=C({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,keyboardLargeStep:9,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=Pe}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=Ie(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 i=r.getBoundingClientRect();for(let a of this._sliderData.entries.keys()){let o=this._activePart==="range"||this._activePart===a;if(this.valueLabelsDisplay==="always"||o){let s=Be(this,a),l=ce(this,a);if(!s||!l)continue;let c=s.getBoundingClientRect(),d=l.getBoundingClientRect(),h=l.getLabelBoundingClientRect(),u=c.width/2,p=Math.round(c.left+u),g=Math.round(h.width/2),f=d.width/2,_=i.left-u,m=i.right+u,b=p-g,T=p+g;b<_?f+=b-_:T>m&&(f+=T-m),l.style.transform=`translateX(${-Math.round(f)}px)`}}}_onTrackFocus(){this._setActivePart("range")}_onTrackBlur(){this._setActivePart(null)}_onTrackRangePointerDown(e){this._disabledOrInvalid||!z(e)||(e.preventDefault(),e.currentTarget.focus(),this._startDrag("range",this._mapEventToRange(e)))}async _onPointerDown(e){if(this._disabledOrInvalid||!z(e))return;let t=this.renderRoot.querySelector("arcgis-label-input[editing]");if(e.target===t)return;if(t){t.blur(),this._focusEntry(M(t));return}if(Ae(e.target)||this.values?.length>1)return;let r=this._mapEventToRange(e),[i,a]=this._sliderData.entries.entries().next().value,o=r*this._fullRange+this._fullMin-a,s=L(this._fullMin,this._fullMax,a)/100;this._startDrag(i,s);let l=le(this._stepsProvider,this._sliderData.entries,i,o,this.allowValuesOverlap);this._setValue(i,l),this._focusEntry(i)}_onThumbPointerDown(e){let t=M(e.currentTarget);if(!z(e)||this._disabledOrInvalid||!t)return;let r=ce(this,t);e.target===r&&r?.editing||(e.stopPropagation(),e.preventDefault(),this._focusEntry(t),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,i]of t)if(this._sliderData.getValue(r)!==i){e=!0;break}}this._dragInfo=null,e&&this.arcgisChange.emit()}_startDrag(e,t){if(this._disabledOrInvalid)return;let{min:r,max:i,values:a}=this,o=r,s=i;if(this._setActivePart(e),e==="range"){if(this.segmentsDraggingDisabled)return;o=r-a[0],s=i-a[a.length-1]}this._dragInfo={position:t,entries:new Map(this._sliderData.entries.entries()),minDiff:o,maxDiff:s},this._addDragListeners()}_updateDrag(e){if(!this._dragInfo||!this._activePart)return;let{_activePart:t,_dragInfo:{position:r,entries:i,minDiff:a,maxDiff:o}}=this;if(r===e)return;let s=(e-r)*this._fullRange;if(t==="range"){s=Math.min(o,Math.max(a,s));let l=Te(this._stepsProvider,i,s);this._setValues(l)}else{let l=le(this._stepsProvider,i,t,s,this.allowValuesOverlap);this._setValue(t,l)}}_focusEntry(e){e&&Ne(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=M(e.currentTarget);this._setActivePart(t)}_onThumbBlur(){this._setActivePart(null)}_onRangeInputChange(e){let t=e.currentTarget,r=t.value,i=t.dataset.type,a=!1;switch(e.stopPropagation(),i){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=M(t),i=t.value;r&&(e.stopPropagation(),this._setValue(r,i),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=L(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=M(e.currentTarget);if(!t)return;let r=e.currentTarget.querySelector("arcgis-label-input");if(!r||r.editing)return;if(e.key===v.confirmEdit){r.edit();return}let i=se(e,this.keyboardLargeStep,this.mirrored);if(i){e.preventDefault();let a=Fe(this._getStepsConfiguration(),this._sliderData.entries,t,i.direction,i.count);this._setValue(t,a);return}if(oe(e.key)){e.preventDefault();let a=ze(this._getStepsConfiguration(),this._sliderData.entries,t,this._getDirectionForHomeEndKey(e.key));this._setValue(t,a)}}_onTrackRangeKeyDown(e){if(this._disabledOrInvalid)return;let t=se(e,this.keyboardLargeStep,this.mirrored);if(t){e.preventDefault();let{entries:r}=Se(this._getStepsConfiguration(),this._sliderData.entries,t.direction,t.count);this._setValues(r);return}if(oe(e.key)){e.preventDefault();let r=Le(this._getStepsConfiguration(),this._sliderData.entries,this._getDirectionForHomeEndKey(e.key));this._setValues(r)}}_getStepsConfiguration(){return{allowValuesOverlap:this.allowValuesOverlap,stepsProvider:this._stepsProvider,resolution:this.resolution,min:this.min,max:this.max}}_getDirectionForHomeEndKey(e){return this.isHorizontal&&this.mirrored||this.layout==="vertical"?e===v.jumpToEnd?-1:1:e===v.jumpToStart?-1:1}_setActivePart(e){this._activePart!==e&&(this._activePart=e,this.arcgisActiveValueChange.emit())}render(){return x`<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:i,valueLabelsDisplay:a,popoverLabel:o}=this,s=e?He(e)?e:"track-range":"",l=this._hasPopoverContent&&!!s,c=t==="horizontal"?r==="start"?"top":"bottom":r==="start"?"left":"right",d=14;return a!=="hidden"&&r===i&&(d+=24),x`<calcite-popover flip-disabled focus-trap-disabled .label=${o} .open=${l} .offsetDistance=${d} .placement=${c} pointer-disabled .referenceElement=${s} scale=s trigger-disabled ${S(this._popoverElement)}><slot name=popover @slotchange=${this._popoverSlotChange}></slot></calcite-popover>`}_renderContentStart(){return x`<div class="content-start" .hidden=${!this._hasContentStart}><slot name=content-start @slotchange=${this._onContentStartSlotChange}></slot></div>`}_renderContentEnd(){return x`<div class="content-end" .hidden=${!this._hasContentEnd}><slot name=content-end @slotchange=${this._onContentEndSlotChange}></slot></div>`}_renderTrackRange(){return x`<div class="track-container">${this._renderTrack()}${this._renderThumbs()}</div>`}_renderTrack(){return x`<div class="track" ${S(this._trackElement)}>${this._renderTrackBackground()}${this._renderFillSegment()}</div>`}_renderTrackBackground(){let{max:e,min:t,fillPlacement:r,values:i}=this,a=i.length>1,o=this._fullMin,s=this._fullMax,l=[];return this._invalid?x`<div class="segment track-bounds" style=${F({left:"0%",right:"0%",top:"0%",bottom:"0%"})}></div>`:(o<t&&(l.push(this._renderSegment(o,t,[this.mirrored?"track-effective-end":"track-effective-start",!a&&r==="start"?"track-fill":null])),o=t),s>e&&(l.push(this._renderSegment(e,s,[this.mirrored?"track-effective-start":"track-effective-end",!a&&r==="end"?"track-fill":null])),s=e),l.push(this._renderSegment(o,s,["track-bounds"])),l)}_renderFillSegment(){let{values:e,fillPlacement:t,min:r,max:i}=this;if(!e?.length||this._invalid)return;let a=[...e].sort((s,l)=>s-l);if(a.length===1)switch(t){case"start":if(r<a[0])return this._renderSegment(r,a[0],["track-range"]);break;case"end":if(i>a[0])return this._renderSegment(a[0],i,["track-range"]);break}let o=this.segmentsDraggingDisabled;return this._renderSegment(a[0],a[a.length-1],["track-range",o?null:"interactive",this._activePart==="range"?"active":null],{id:"track-range",onFocus:o?void 0:this._onTrackFocus,onBlur:o?void 0:this._onTrackBlur,onPointerDown:o?void 0:this._onTrackRangePointerDown,onKeyDown:o?void 0:this._onTrackRangeKeyDown})}_renderSegment(e,t,r,i){let{_fullMin:a,_fullMax:o,mirrored:s}=this,l=[L(a,o,de(e,a,o)),100-L(a,o,de(t,a,o))];s&&l.reverse();let c=this.isHorizontal?{left:`${l[0]}%`,right:`${l[1]}%`}:{top:`${l[1]}%`,bottom:`${l[0]}%`},d=X("segment",...r);return x`<div id=${i?.id??E} class=${$(d)} style=${F(c)} .tabIndex=${i?.onPointerDown?0:-1} @focus=${i?.onFocus} @blur=${i?.onBlur} @pointerdown=${i?.onPointerDown} @keydown=${i?.onKeyDown}></div>`}_renderThumbs(){let{_sliderData:e}=this,t=Array.from(e.entries).filter(([,r])=>r>=this._fullMin&&r<=this._fullMax);return ie(t,([r,i])=>this._renderThumb(r,i))}_renderThumb(e,t){let{valueLabelsDisplay:r}=this,i=this._disabledOrInvalid,a=this._activePart===e||this._activePart==="range",o=this._activePart==="range"||this._activePart===e,s=r==="always"||r==="auto"&&o,l=this.isHorizontal,c=l?"horizontal":"vertical",d=`label-${e}`,h=l?"center":this.valueLabelsPlacement==="start"?"end":"start";return Q(e,x`<div id=${e??E} .ariaLabel=${this.messages.sliderValue} aria-labelledby=${(r?d:void 0)??E} .ariaOrientation=${c} .ariaValueMin=${this._minFormatter(this.min)} .ariaValueMax=${this._maxFormatter(this.max)} .ariaValueNow=${t} .ariaValueText=${this._valueFormatter(t)} class=${$({thumb:!0,active:a})} data-entry=${e??E} @pointerdown=${this._onThumbPointerDown} @focus=${this._onThumbFocus} @blur=${this._onThumbBlur} @keydown=${this._onThumbKeyDown} role=slider style=${F({...this._getPositionStyleForElement(t),"z-index":this._activePart===e?1:0})} .tabIndex=${i?-1:0}><span class="handle"></span><arcgis-label-input .alignment=${h} class="label" .hidden=${!s} id=${d??E} .labelFormatter=${this._valueFormatter} @focus=${i?void 0:this._onThumbFocus} @blur=${i?void 0:this._onThumbBlur} @arcgisChange=${this._onValueInputChange} .readOnly=${!this.valueLabelsEditingEnabled} tabindex=-1 .value=${t} ${S(this._makeResizeRef())}></arcgis-label-input></div>`)}_renderRangeLabel(e){let t="center";return this.isHorizontal&&(t=e==="min"?"end":"start",this.rangeLabelsPlacement==="end"&&(t=t==="end"?"start":"end"),this.mirrored&&(t=t==="end"?"start":"end")),x`<arcgis-label-input .alignment=${t} class=${$(e)} data-type=${e??E} .hidden=${!this.showRangeLabels} .labelFormatter=${this[`_${e}Formatter`]} @arcgisChange=${this._onRangeInputChange} .readOnly=${!this.rangeLabelsEditingEnabled} .value=${this[e]}></arcgis-label-input>`}};function Ae(n){return"dataset"in n&&n.tagName==="ARCGIS-LABEL-INPUT"&&(n.dataset.type==="min"||n.dataset.type==="max")}function M(n){let e=J(n,"[data-entry]");return e&&"dataset"in e?e.dataset.entry:null}function He(n){return typeof n!=null&&n!=="range"}function Ne(n,e){return e?n.renderRoot.querySelector(`div[data-entry="${e}"]`):null}function Be(n,e){return e?n.renderRoot.querySelector(`div[data-entry="${e}"] span.handle`):null}function ce(n,e){return e?n.renderRoot.querySelector(`div[data-entry="${e}"] arcgis-label-input`):null}function z(n){return n.isPrimary&&n.button===0}var Ue=5;function L(n,e,t){let r=e-n,i=(t-n)/r*100;return Number.parseFloat(i.toFixed(Ue))}function de(n,e,t){return Math.max(e,Math.min(t,n))}Z("arcgis-slider",j);return j},"core/reactiveUtils","applications/Components/reactiveUtils","core/accessorSupport/decorators","core/Accessor","core/Accessor","core/accessorSupport/decorators","core/reactiveUtils")
|
|
2
|
+
import{a as Q}from"./ESI3PVIT.js";import{a as re}from"./EPX7DYFW.js";import{a as ee,b as te}from"./357YPDTQ.js";import{a as V,b as X,d as J}from"./7CI55VCH.js";import{A as S,B as G,C as $,D as F,E,H as Z,g as K,i as x,o as q,p as W,q as C,s as Y,t as R,z as O}from"./3HKYWLJY.js";export default $arcgis.t(([{on:qe,watch:ne},{createObservable:me,trackAccess:pe},{property:Xe,subclass:Je},et,xe,{property:P,subclass:ye},{watch:H}])=>{var ae=(n,e)=>t=>fe(t,n),A=class extends Y{constructor(e,t){super(e),this.Y=new Map,this.A=void 0,this.#r=me();let r=this;r.#e=t,r.Z(),r.setProvisionalExports(ve(e,new WeakRef(r),e.M.length-1,r.instance,r.Y),!1),q(e,i=>{if(i){let a=ne(()=>e[i],o=>{if(o===r.instance)return;let s=r.instance;r.exports=o,r.instance=o,r.Y.forEach((l,c)=>e.requestUpdate(l,s[c])),r.#t&&s.destroy(),r.#t=!1},{sync:!0});r.onDestroy(a.remove)}},r.exports)}#t;#r;#e;get exports(){return pe(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?.()}},fe=ee(A),ve=(n,e,t,r,i)=>new Proxy(r,{get:(a,o)=>{let s=a[o];if(typeof o=="symbol"||i.has(o))return s;let l=n.M[t];return l.A=o,W(n,c=>{if(l.A=void 0,c!==void 0){let d=c.key;i.set(o,d);let h=n.constructor.getPropertyOptions(d),u=o!==d&&d.toLowerCase().includes("disable");be(e,h,o,d,u),h.i===void 0&&_e(h,t,o,u)}},s)}}),be=(n,e,t,r,i,a)=>a=ne(()=>{let o=n.deref();return o===void 0||o.component.manager.destroyed?a=a.remove():o.exports[t]},(o,s)=>{if(!a)return;n.deref().component?.requestUpdate(r,i?!s:s),e.c=!1},{sync:!0}),_e=(n,e,t,r)=>{n.d.get=function(){let i=this.M[e]?.exports[t];return r?!i:i},n.d.set=function(i){let a=this.M[e];a.A!==t&&(a.exports[t]=r?!i:i)}};function*ie(n,e){if(n!==void 0){let t=0;for(let r of n)yield e(r,t++)}}var v={increment:"ArrowUp",incrementHorizontal:"ArrowRight",decrement:"ArrowDown",decrementHorizontal:"ArrowLeft",pageIncrement:"PageUp",pageDecrement:"PageDown",jumpToStart:"Home",jumpToEnd:"End",confirmEdit:"Enter"};function se({key:n,shiftKey:e},t,r){let i=ke(n);if(i==null)return null;let a=De(n)||we(n)&&e?Ee(t):1;return{direction:r?i*-1:i,count:a}}function ke(n){return n===v.increment||n===v.incrementHorizontal||n===v.pageIncrement?1:n===v.decrement||n===v.decrementHorizontal||n===v.pageDecrement?-1:null}function oe(n){return n===v.jumpToEnd||n===v.jumpToStart}function we(n){return n===v.increment||n===v.decrement||n===v.decrementHorizontal||n===v.incrementHorizontal}function De(n){return n===v.pageIncrement||n===v.pageDecrement}function Ee(n){let e=Number.isFinite(n)?Math.floor(n):1;return Math.max(1,e)}var Pe=K`: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-start: 0;--arcgis-slider-internal-value-labels-placement-end: 0;--arcgis-slider-internal-range-labels-placement-center: 0;--arcgis-slider-internal-range-labels-placement-end: 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="start"]){--arcgis-slider-internal-value-labels-placement-start: var(--arcgis-slider-internal-show-value-labels)}:host([value-labels-placement="end"]){--arcgis-slider-internal-value-labels-placement-end: 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="end"]){--arcgis-slider-internal-range-labels-placement-end: 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-start{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-end{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-start{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-end{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="start"]){.label{right:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="end"]){.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-start) * 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-end) * 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="start"]){.label{bottom:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="end"]){.label{top:var(--arcgis-slider-internal-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="end"]){.content{--arcgis-slider-internal-content-start-min-height: calc( var(--arcgis-slider-internal-handle-offset) + var(--arcgis-slider-internal-value-labels-placement-start) * var(--arcgis-slider-internal-label-input-height) );--arcgis-slider-internal-content-end-min-height: calc( var(--arcgis-slider-internal-value-labels-placement-end) * 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-end) * 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="start"]){.label{bottom:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="end"]){.label{top:calc(var(--arcgis-slider-internal-label-input-margin) + var(--arcgis-slider-internal-range-labels-placement-end) * (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))}}}`,Ce=Object.defineProperty,$e=Object.getOwnPropertyDescriptor,D=(n,e,t,r)=>{for(var i=r>1?void 0:r?$e(e,t):e,a=n.length-1,o;a>=0;a--)(o=n[a])&&(i=(r?o(e,t,i):o(i))||i);return r&&i&&Ce(e,t,i),i};function Me(){return{min:0,max:100,values:[]}}var k=class extends xe{constructor(n={}){super({...Me(),properties:n}),this._entries=new Map,this.precision=4,this.ready=!1}startup(){let{precision:n}=this,{min:e,max:t,values:r}=this;t=y(t,n),e=y(e,n),r=r?.map(a=>I(y(a,n),e,t)),this._set("min",e),this._set("max",t),this._set("values",r);let i=new Map(r?.map(a=>[R(),a]));this._entries=i,H(()=>this.min,a=>{let o=this.values;a!=null&&o?.length&&o.some(s=>s<a)&&(this._entries.forEach((s,l)=>{s<a&&this._entries.set(l,a)}),this._updatesValues())},{sync:!0}),H(()=>this.max,a=>{let o=this.values;a!=null&&o?.length&&o.some(s=>s>a)&&(this._entries.forEach((s,l)=>{s>a&&this._entries.set(l,a)}),this._updatesValues())},{sync:!0}),H(()=>this.precision,a=>{let{min:o,max:s,values:l}=this;this._set("min",y(o,a)),this._set("max",y(s,a)),l?.length&&(this._entries.forEach((c,d)=>{this._entries.set(d,y(c,a))}),this._updatesValues())},{sync:!0}),this._set("ready",!0)}get entries(){return this._entries}set max(n){if(!this.ready){this._set("max",n);return}let e=this._get("max"),t=y(n,this.precision);e!==t&&this._set("max",t)}set min(n){if(!this.ready){this._set("min",n);return}let e=this._get("min"),t=y(n,this.precision);e!==t&&this._set("min",t)}set values(n){if(!this.ready){this._set("values",n);return}let e=this._get("values");if(n=n?.map(r=>I(y(r,this.precision),this.min,this.max)).sort((r,i)=>r-i),e&&n&&e.length===n.length&&e.every((r,i)=>r===n[i]))return;let t=new Map(n?.map(r=>[R(),r]));this._entries=t,this._set("values",n)}getValue(n){return this._entries.get(n)}setValue(n,e){if(this.values==null)return!1;let{min:t,max:r}=this,i=this._entries.get(n),a=I(y(e,this.precision),t,r);return i===a?!1:(this._entries.set(n,a),this._updatesValues(),!0)}setValues(n){if(this.values==null)return!1;let e=!1,{min:t,max:r}=this;for(let[i,a]of n){let o=this._entries.get(i),s=I(y(a,this.precision),t,r);o!==s&&(e=!0,this._entries.set(i,s))}return e?(this._updatesValues(),!0):!1}_updatesValues(){let n=Array.from(this._entries.values()).sort((e,t)=>e-t);this._set("values",n)}};D([P()],k.prototype,"_entries",2);D([P({readOnly:!0})],k.prototype,"entries",1);D([P()],k.prototype,"max",1);D([P()],k.prototype,"min",1);D([P({cast:n=>I(n,0,20)})],k.prototype,"precision",2);D([P({readOnly:!0})],k.prototype,"ready",2);D([P()],k.prototype,"values",1);k=D([ye("esri.widgets.Slider.SliderData")],k);function I(n,e,t){return Math.min(Math.max(n,e),t)}function y(n,e){return Number.parseFloat(n.toFixed(e))}var N=class{constructor(e){this.steps=e,this.minIndex=0,this.maxIndex=this.steps.length-1}indexToValue(e){return this.steps[w(e,this.minIndex,this.maxIndex)]}valueToIndex(e){let t=this.steps.indexOf(e);return t!==-1?t:this.steps.reduce((r,i,a,o)=>Math.abs(i-e)<Math.abs(o[r]-e)?a:r)}getClosestStepDistances(e,t){if(t<=0)return[];let r=[];for(let i=this.minIndex;i<=this.maxIndex;i++){let a=this.indexToValue(i),o=Math.abs(a-e),s=!1;for(let l=0;l<r.length;l++)if(o<r[l].dist){r.splice(l,0,{idx:i,value:a,dist:o}),s=!0;break}!s&&r.length<t&&r.push({idx:i,value:a,dist:o}),r.length>t&&(r.length=t)}return r}},B=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+w(e,this.minIndex,this.maxIndex)*this.stepSize}valueToIndex(e){return e=w(e,this.min,this.max),Math.round((e-this.min)/this.stepSize)}getClosestStepDistances(e,t){if(t<=0)return[];let r=[],i=this.minIndex,a=this.maxIndex,o=(w(e,this.min,this.max)-this.min)/this.stepSize,s=Math.floor(o),l=s+1;for(;r.length<t&&(s>=i||l<=a);){if(s<i){let p=this.indexToValue(l);r.push({idx:l,value:p,dist:Math.abs(p-e)}),l++;continue}if(l>a){let p=this.indexToValue(s);r.push({idx:s,value:p,dist:Math.abs(p-e)}),s--;continue}let c=this.indexToValue(s),d=this.indexToValue(l),h=Math.abs(c-e),u=Math.abs(d-e);h<=u?(r.push({idx:s,value:c,dist:h}),s--):(r.push({idx:l,value:d,dist:u}),l++)}return r}};function Ie(n){if(n.steps==null)return null;let e=n.steps;return Array.isArray(e)?e.length===0?null:new N(e):e<=0?null:new B(n.min,n.max,e)}function Te(n,e,t){if(n==null){let s=new Map;for(let[l,c]of e.entries())s.set(l,c+t);return s}let r=e.size,i=Array.from(e.entries()).map(([s,l])=>{let c=l+t,d=n.getClosestStepDistances(c,r);return{uuid:s,stepDistances:d}}),a=new Set,o=new Map;i.sort((s,l)=>s.stepDistances[0].dist-l.stepDistances[0].dist);for(let s of i){let l=s.stepDistances.find(c=>!a.has(c.idx));l?(a.add(l.idx),o.set(s.uuid,l.value)):o.set(s.uuid,e.get(s.uuid))}return o}function le(n,e,t,r,i){let a=e.get(t)??0;if(!n)return a+r;let o=a+r,s=n.minIndex,l=n.maxIndex,c=new Set;if(!i)for(let[g,f]of e.entries())g!==t&&c.add(n.valueToIndex(f));let d=w(n.valueToIndex(o),s,l);if(!c.has(d))return n.indexToValue(d);let h=null,u=1/0,p=Math.min(Math.max(d-s,l-d),c.size+1);for(let g=1;g<=p;g++){let f=d-g;if(f>=s&&!c.has(f)){let m=n.indexToValue(f),b=Math.abs(m-o);h=f,u=b}let _=d+g;if(_<=l&&!c.has(_)){let m=n.indexToValue(_),b=Math.abs(m-o);(h==null||b<u)&&(h=_,u=b)}if(h!=null)return n.indexToValue(h)}return h==null?a:n.indexToValue(h)}function Se(n,e,t,r=1){let i=he(r),a=e,o=!1;for(let s=0;s<i;s++){let l=Ve(n,a,t);if(o||=l.changed,a=l.entries,!l.changed)break}return{changed:o,entries:a}}function Fe(n,e,t,r,i=1){let a=he(i);if(a===1)return U(n,e,t,r);let o=new Map(e),s=o.get(t);for(let l=0;l<a;l++){let c=U(n,o,t,r);if(c===s)break;s=c,o.set(t,s)}return s}function he(n){let e=Number.isFinite(n)?Math.floor(n):1;return Math.max(1,e)}function Ve(n,e,t){let r=new Map,i=t>0?Re:ue,a=Array.from(e).sort((l,c)=>i(l[1],c[1])),o=!1,s=!0;for(let[l,c]of a)if(r.set(l,c),s){let d=U(n,r,l,t);c===d&&(s=!1),o||=s,r.set(l,d)}return{changed:o,entries:r}}function U(n,e,t,r){let{allowValuesOverlap:i,stepsProvider:a,resolution:o,min:s,max:l}=n,c=e.get(t);if(r=r>0?1:-1,!a){let m=w(c+r*o,s,l);if(i)return m;let b=new Set;for(let[T,ge]of e)T!==t&&b.add(ge);for(;b.has(m)&&m<=l&&m>=s;)m=w(m+r*o,s,l);return b.has(m)||m>l||m<s?c:m}let d=a.valueToIndex(c);if(d===-1)return c;if(i){let m=w(d+r,a.minIndex,a.maxIndex);return a.indexToValue(m)}let h=new Set;for(let[m,b]of e)m!==t&&h.add(a.valueToIndex(b));let u=d,p=!1,g=a.minIndex,f=a.maxIndex,_=0;for(;_<Math.abs(f-g)&&(u+=r,!(u<g||u>f));){if(!h.has(u)){p=!0;break}_++}return p?a.indexToValue(u):c}function ze(n,e,t,r){let{allowValuesOverlap:i,stepsProvider:a,resolution:o,min:s,max:l}=n,c=e.get(t);if(r=r>0?1:-1,!a){let p=new Set(Array.from(e).filter(([f])=>f!==t).map(([,f])=>f)),g=r>0?l:s;if(i)return g;for(;p.has(g);)if(g-=r*o,r>0&&g>l||r<0&&g<s){g=c;break}return g}if(i)return r>0?a.indexToValue(a.maxIndex):a.indexToValue(a.minIndex);let d=a.valueToIndex(c);if(d===-1)return c;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>l||r<0&&u<s){u=d;break}return a.indexToValue(u)}function Le(n,e,t){let{stepsProvider:r,min:i,max:a}=n,o=new Map,s=Array.from(e).sort((c,d)=>ue(c[1],d[1]));if(r){let c=0;if(t>0){let d=s[s.length-1],h=r.valueToIndex(d[1]);c=r.maxIndex-h}else{let d=s[0],h=r.valueToIndex(d[1]);c=r.minIndex-h}if(c===0)for(let[d,h]of s)o.set(d,h);for(let[d,h]of s){let u=r.indexToValue(r.valueToIndex(h)+c);o.set(d,u)}return o}let l=0;if(t>0){let c=s[s.length-1];l=a-c[1]}else{let c=s[0];l=i-c[1]}for(let[c,d]of s)o.set(c,d+l);return o}function ue(n,e){return n-e}function Re(n,e){return e-n}function w(n,e,t){return Math.max(e,Math.min(t,n))}var Oe=ae(k),j=class extends G{constructor(){super(...arguments),this._stepsProvider=null,this._popoverElement=O(),this._trackElement=O(),this.messages=te({}),this._onPointerMoveDragUpdate=e=>{this._updateDrag(this._mapEventToRange(e))},this._onPointerUpDragEnd=e=>{z(e)&&this._endDrag()},this._onPointerCancelDragEnd=()=>{this._endDrag()},this._formatLabel=(e,t,r)=>{let i=re(this.messages._lang,t),a=this.labelFormatter;return a?a(r,e,s=>i.format(s))??i.format(r):i.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._activePart=null,this._sliderData=Oe(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="start",this.precision=this._sliderData.precision,this.rangeLabelsEditingEnabled=!1,this.rangeLabelsPlacement="center",this.segmentsDraggingDisabled=!1,this.showRangeLabels=!1,this.valueLabelsDisplay="hidden",this.valueLabelsPlacement="start",this.valueLabelsEditingEnabled=!1,this.keyboardLargeStep=10,this.values=this._sliderData.values,this.arcgisActiveValueChange=C({cancelable:!1}),this.arcgisChange=C({cancelable:!1}),this.arcgisInput=C({cancelable:!1}),this.arcgisRangeChange=C({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,keyboardLargeStep:9,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=Pe}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=Ie(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 i=r.getBoundingClientRect();for(let a of this._sliderData.entries.keys()){let o=this._activePart==="range"||this._activePart===a;if(this.valueLabelsDisplay==="always"||o){let s=Be(this,a),l=ce(this,a);if(!s||!l)continue;let c=s.getBoundingClientRect(),d=l.getBoundingClientRect(),h=l.getLabelBoundingClientRect(),u=c.width/2,p=Math.round(c.left+u),g=Math.round(h.width/2),f=d.width/2,_=i.left-u,m=i.right+u,b=p-g,T=p+g;b<_?f+=b-_:T>m&&(f+=T-m),l.style.transform=`translateX(${-Math.round(f)}px)`}}}_onTrackFocus(){this._setActivePart("range")}_onTrackBlur(){this._setActivePart(null)}_onTrackRangePointerDown(e){this._disabledOrInvalid||!z(e)||(e.preventDefault(),e.currentTarget.focus(),this._startDrag("range",this._mapEventToRange(e)))}async _onPointerDown(e){if(this._disabledOrInvalid||!z(e))return;let t=this.renderRoot.querySelector("arcgis-label-input[editing]");if(e.target===t)return;if(t){t.blur(),this._focusEntry(M(t));return}if(Ae(e.target)||this.values?.length>1)return;let r=this._mapEventToRange(e),[i,a]=this._sliderData.entries.entries().next().value,o=r*this._fullRange+this._fullMin-a,s=L(this._fullMin,this._fullMax,a)/100;this._startDrag(i,s);let l=le(this._stepsProvider,this._sliderData.entries,i,o,this.allowValuesOverlap);this._setValue(i,l),this._focusEntry(i)}_onThumbPointerDown(e){let t=M(e.currentTarget);if(!z(e)||this._disabledOrInvalid||!t)return;let r=ce(this,t);e.target===r&&r?.editing||(e.stopPropagation(),e.preventDefault(),this._focusEntry(t),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,i]of t)if(this._sliderData.getValue(r)!==i){e=!0;break}}this._dragInfo=null,e&&this.arcgisChange.emit()}_startDrag(e,t){if(this._disabledOrInvalid)return;let{min:r,max:i,values:a}=this,o=r,s=i;if(this._setActivePart(e),e==="range"){if(this.segmentsDraggingDisabled)return;o=r-a[0],s=i-a[a.length-1]}this._dragInfo={position:t,entries:new Map(this._sliderData.entries.entries()),minDiff:o,maxDiff:s},this._addDragListeners()}_updateDrag(e){if(!this._dragInfo||!this._activePart)return;let{_activePart:t,_dragInfo:{position:r,entries:i,minDiff:a,maxDiff:o}}=this;if(r===e)return;let s=(e-r)*this._fullRange;if(t==="range"){s=Math.min(o,Math.max(a,s));let l=Te(this._stepsProvider,i,s);this._setValues(l)}else{let l=le(this._stepsProvider,i,t,s,this.allowValuesOverlap);this._setValue(t,l)}}_focusEntry(e){e&&Ne(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=M(e.currentTarget);this._setActivePart(t)}_onThumbBlur(){this._setActivePart(null)}_onRangeInputChange(e){let t=e.currentTarget,r=t.value,i=t.dataset.type,a=!1;switch(e.stopPropagation(),i){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=M(t),i=t.value;r&&(e.stopPropagation(),this._setValue(r,i),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=L(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=M(e.currentTarget);if(!t)return;let r=e.currentTarget.querySelector("arcgis-label-input");if(!r||r.editing)return;if(e.key===v.confirmEdit){r.edit();return}let i=se(e,this.keyboardLargeStep,this.mirrored);if(i){e.preventDefault();let a=Fe(this._getStepsConfiguration(),this._sliderData.entries,t,i.direction,i.count);this._setValue(t,a);return}if(oe(e.key)){e.preventDefault();let a=ze(this._getStepsConfiguration(),this._sliderData.entries,t,this._getDirectionForHomeEndKey(e.key));this._setValue(t,a)}}_onTrackRangeKeyDown(e){if(this._disabledOrInvalid)return;let t=se(e,this.keyboardLargeStep,this.mirrored);if(t){e.preventDefault();let{entries:r}=Se(this._getStepsConfiguration(),this._sliderData.entries,t.direction,t.count);this._setValues(r);return}if(oe(e.key)){e.preventDefault();let r=Le(this._getStepsConfiguration(),this._sliderData.entries,this._getDirectionForHomeEndKey(e.key));this._setValues(r)}}_getStepsConfiguration(){return{allowValuesOverlap:this.allowValuesOverlap,stepsProvider:this._stepsProvider,resolution:this.resolution,min:this.min,max:this.max}}_getDirectionForHomeEndKey(e){return this.isHorizontal&&this.mirrored||this.layout==="vertical"?e===v.jumpToEnd?-1:1:e===v.jumpToStart?-1:1}_setActivePart(e){this._activePart!==e&&(this._activePart=e,this.arcgisActiveValueChange.emit())}render(){return x`<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:i,valueLabelsDisplay:a,popoverLabel:o}=this,s=e?He(e)?e:"track-range":"",l=this._hasPopoverContent&&!!s,c=t==="horizontal"?r==="start"?"top":"bottom":r==="start"?"left":"right",d=14;return a!=="hidden"&&r===i&&(d+=24),x`<calcite-popover flip-disabled focus-trap-disabled .label=${o} .open=${l} .offsetDistance=${d} .placement=${c} pointer-disabled .referenceElement=${s} scale=s trigger-disabled ${S(this._popoverElement)}><slot name=popover @slotchange=${this._popoverSlotChange}></slot></calcite-popover>`}_renderContentStart(){return x`<div class="content-start" .hidden=${!this._hasContentStart}><slot name=content-start @slotchange=${this._onContentStartSlotChange}></slot></div>`}_renderContentEnd(){return x`<div class="content-end" .hidden=${!this._hasContentEnd}><slot name=content-end @slotchange=${this._onContentEndSlotChange}></slot></div>`}_renderTrackRange(){return x`<div class="track-container">${this._renderTrack()}${this._renderThumbs()}</div>`}_renderTrack(){return x`<div class="track" ${S(this._trackElement)}>${this._renderTrackBackground()}${this._renderFillSegment()}</div>`}_renderTrackBackground(){let{max:e,min:t,fillPlacement:r,values:i}=this,a=i.length>1,o=this._fullMin,s=this._fullMax,l=[];return this._invalid?x`<div class="segment track-bounds" style=${F({left:"0%",right:"0%",top:"0%",bottom:"0%"})}></div>`:(o<t&&(l.push(this._renderSegment(o,t,[this.mirrored?"track-effective-end":"track-effective-start",!a&&r==="start"?"track-fill":null])),o=t),s>e&&(l.push(this._renderSegment(e,s,[this.mirrored?"track-effective-start":"track-effective-end",!a&&r==="end"?"track-fill":null])),s=e),l.push(this._renderSegment(o,s,["track-bounds"])),l)}_renderFillSegment(){let{values:e,fillPlacement:t,min:r,max:i}=this;if(!e?.length||this._invalid)return;let a=[...e].sort((s,l)=>s-l);if(a.length===1)switch(t){case"start":if(r<a[0])return this._renderSegment(r,a[0],["track-range"]);break;case"end":if(i>a[0])return this._renderSegment(a[0],i,["track-range"]);break}let o=this.segmentsDraggingDisabled;return this._renderSegment(a[0],a[a.length-1],["track-range",o?null:"interactive",this._activePart==="range"?"active":null],{id:"track-range",onFocus:o?void 0:this._onTrackFocus,onBlur:o?void 0:this._onTrackBlur,onPointerDown:o?void 0:this._onTrackRangePointerDown,onKeyDown:o?void 0:this._onTrackRangeKeyDown})}_renderSegment(e,t,r,i){let{_fullMin:a,_fullMax:o,mirrored:s}=this,l=[L(a,o,de(e,a,o)),100-L(a,o,de(t,a,o))];s&&l.reverse();let c=this.isHorizontal?{left:`${l[0]}%`,right:`${l[1]}%`}:{top:`${l[1]}%`,bottom:`${l[0]}%`},d=X("segment",...r);return x`<div id=${i?.id??E} class=${$(d)} style=${F(c)} .tabIndex=${i?.onPointerDown?0:-1} @focus=${i?.onFocus} @blur=${i?.onBlur} @pointerdown=${i?.onPointerDown} @keydown=${i?.onKeyDown}></div>`}_renderThumbs(){let{_sliderData:e}=this,t=Array.from(e.entries).filter(([,r])=>r>=this._fullMin&&r<=this._fullMax);return ie(t,([r,i])=>this._renderThumb(r,i))}_renderThumb(e,t){let{valueLabelsDisplay:r}=this,i=this._disabledOrInvalid,a=this._activePart===e||this._activePart==="range",o=this._activePart==="range"||this._activePart===e,s=r==="always"||r==="auto"&&o,l=this.isHorizontal,c=l?"horizontal":"vertical",d=`label-${e}`,h=l?"center":this.valueLabelsPlacement==="start"?"end":"start";return Q(e,x`<div id=${e??E} .ariaLabel=${this.messages.sliderValue} aria-labelledby=${(r?d:void 0)??E} .ariaOrientation=${c} .ariaValueMin=${this._minFormatter(this.min)} .ariaValueMax=${this._maxFormatter(this.max)} .ariaValueNow=${t} .ariaValueText=${this._valueFormatter(t)} class=${$({thumb:!0,active:a})} data-entry=${e??E} @pointerdown=${this._onThumbPointerDown} @focus=${this._onThumbFocus} @blur=${this._onThumbBlur} @keydown=${this._onThumbKeyDown} role=slider style=${F({...this._getPositionStyleForElement(t),"z-index":this._activePart===e?1:0})} .tabIndex=${i?-1:0}><span class="handle"></span><arcgis-label-input .alignment=${h} class="label" .hidden=${!s} id=${d??E} .labelFormatter=${this._valueFormatter} @focus=${i?void 0:this._onThumbFocus} @blur=${i?void 0:this._onThumbBlur} @arcgisChange=${this._onValueInputChange} .readOnly=${!this.valueLabelsEditingEnabled} tabindex=-1 .value=${t} ${S(this._makeResizeRef())}></arcgis-label-input></div>`)}_renderRangeLabel(e){let t="center";return this.isHorizontal&&(t=e==="min"?"end":"start",this.rangeLabelsPlacement==="end"&&(t=t==="end"?"start":"end"),this.mirrored&&(t=t==="end"?"start":"end")),x`<arcgis-label-input .alignment=${t} class=${$(e)} data-type=${e??E} .hidden=${!this.showRangeLabels} .labelFormatter=${this[`_${e}Formatter`]} @arcgisChange=${this._onRangeInputChange} .readOnly=${!this.rangeLabelsEditingEnabled} .value=${this[e]}></arcgis-label-input>`}};function Ae(n){return"dataset"in n&&n.tagName==="ARCGIS-LABEL-INPUT"&&(n.dataset.type==="min"||n.dataset.type==="max")}function M(n){let e=J(n,"[data-entry]");return e&&"dataset"in e?e.dataset.entry:null}function He(n){return typeof n!=null&&n!=="range"}function Ne(n,e){return e?n.renderRoot.querySelector(`div[data-entry="${e}"]`):null}function Be(n,e){return e?n.renderRoot.querySelector(`div[data-entry="${e}"] span.handle`):null}function ce(n,e){return e?n.renderRoot.querySelector(`div[data-entry="${e}"] arcgis-label-input`):null}function z(n){return n.isPrimary&&n.button===0}var Ue=5;function L(n,e,t){let r=e-n,i=(t-n)/r*100;return Number.parseFloat(i.toFixed(Ue))}function de(n,e,t){return Math.max(e,Math.min(t,n))}Z("arcgis-slider",j);return j},"core/reactiveUtils","applications/Components/reactiveUtils","core/accessorSupport/decorators","core/Accessor","core/Accessor","core/accessorSupport/decorators","core/reactiveUtils")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as b}from"./MP6Z45SA.js";import{B as m,H as o,g as h,i as d,q as r}from"./
|
|
2
|
+
import{a as b}from"./MP6Z45SA.js";import{B as m,H as o,g as h,i as d,q as r}from"./3HKYWLJY.js";var $=h`.container{display:flex;align-items:center;justify-content:space-between;position:relative}.slider{width:50%}.input{width:45%}`,p=class extends m{constructor(){super(...arguments),this.debouncedApplyValueOnChange=b(e=>this.applyValueOnChange(e),800),this.disabled=!1,this.flipLabels=!1,this.min=0,this.max=100,this.value=50,this.step=1,this.withSteppers=!1,this.arcgisSliderInputValueChange=r(),this.arcgisValueChange=r()}static{this.properties={disabled:5,label:1,flipLabels:5,min:9,max:9,value:9,step:9,unitsLabel:1,withSteppers:5}}static{this.styles=$}applyValueOnChange(e){let{min:i,max:a,value:n}=this,s=Number(e.value),t=i!==void 0&&a!==void 0?Math.min(a,Math.max(i,s)):s;s!==n&&(e.value=`${t}`,this.arcgisValueChange.emit(t),this.arcgisSliderInputValueChange.emit(t),this.value=t)}render(){let{disabled:e,min:i,max:a,value:n,step:s,withSteppers:t,flipLabels:c,unitsLabel:u,label:g}=this;return d`<div class="container"><calcite-slider class="slider" .disabled=${e} .min=${i} .max=${a} .value=${n} .step=${s} @calciteSliderInput=${l=>this.debouncedApplyValueOnChange(l.currentTarget)}></calcite-slider><calcite-input class="input" .disabled=${e} .min=${i} .max=${a} .numberButtonType=${t?"vertical":"none"} .prefixText=${c?u:""} @calciteInputInput=${l=>this.debouncedApplyValueOnChange(l.target)} @click=${l=>l.stopPropagation()} scale=s step=any .suffixText=${c?"":u} type=number .value=${`${n}`} .label=${g}></calcite-input></div>`}};o("arcgis-slider-input",p);export{p as ArcgisSliderInput};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{B as p,H as m,g as l,i as e}from"./
|
|
2
|
+
import{B as p,H as m,g as l,i as e}from"./3HKYWLJY.js";export default $arcgis.t(([t])=>{var h=l`:host{display:block;block-size:30px;inline-size:100%}:host([layout="vertical"]){writing-mode:vertical-lr}arcgis-ramp-color{block-size:inherit;inline-size:inherit}`,c=new t([0,121,193]),o=class extends p{constructor(){super(...arguments),this._rampStops=[],this.fillColor=c.clone(),this.layout="horizontal",this.min=0,this.max=1,this.stops=[]}static{this.properties={fillColor:1,layout:1,min:9,max:9,stops:0}}static{this.styles=h}willUpdate(s){if(super.willUpdate(s),s.has("fillColor")||s.has("stops")){let{stops:n,fillColor:i}=this,r=(i instanceof t?i:t.fromString(i)??c).toRgb();this._rampStops=n.map(a=>({color:new t(r&&[...r,a.opacity]),value:a.value}))}}render(){return e`<arcgis-ramp-color .layout=${this.layout} .stops=${this._rampStops} .min=${this.min} .max=${this.max}></arcgis-ramp-color>`}};m("arcgis-ramp-opacity",o);return o},"Color")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as g}from"./CSDKXC4T.js";import{a as k}from"./MB7UDGWW.js";import{a as C}from"./KESRGTPP.js";import{a as B}from"./7IYSWEUK.js";import{b as x}from"./NEZDZZ6D.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"./2F3FM6VX.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};
|
|
2
|
+
import{a as g}from"./CSDKXC4T.js";import{a as k}from"./MB7UDGWW.js";import{a as C}from"./UKIOB6Y2.js";import{a as B}from"./ESI3PVIT.js";import{b as x}from"./357YPDTQ.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"./3HKYWLJY.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};
|