@arcgis/map-components 5.2.0-next.7 → 5.2.0-next.9
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/{WA7JHFV4.js → 2LRS7XSQ.js} +1 -1
- package/dist/cdn/462X4ZCG.js +2 -0
- package/dist/cdn/{Y27ZQGV5.js → CW7J5L5W.js} +1 -1
- package/dist/cdn/D2JUQOOB.js +2 -0
- package/dist/cdn/{YABPKPDP.js → GX45UPO4.js} +1 -1
- package/dist/cdn/{JQVWY2TG.js → HXDS4O7D.js} +1 -1
- package/dist/cdn/HXHMU23F.js +2 -0
- package/dist/cdn/{XKPUIYHL.js → JAANZHBL.js} +1 -1
- package/dist/cdn/K5NKFHWA.js +2 -0
- package/dist/cdn/{GRF2FJN5.js → OO3T24WP.js} +1 -1
- package/dist/cdn/{P3TXSVMD.js → QZB3WXJH.js} +2 -2
- package/dist/cdn/ROQ6HC6T.js +2 -0
- package/dist/cdn/{QM2RBDFO.js → TQYGI7O4.js} +1 -1
- package/dist/cdn/U5FGCB62.js +2 -0
- package/dist/cdn/{FZNGDLO6.js → U6FG3DCW.js} +1 -1
- package/dist/cdn/{FT2LXOKH.js → UADZMW3G.js} +1 -1
- package/dist/cdn/{2THVOG4Y.js → WA7IUOYU.js} +1 -1
- package/dist/cdn/{CUMFJ3AY.js → XMYIWNY6.js} +1 -1
- package/dist/cdn/XUDFNAMR.js +2 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-feature-templates/customElement.d.ts +10 -8
- package/dist/components/arcgis-feature-templates/customElement.js +198 -247
- package/dist/components/arcgis-layer-list-next/layer-list-item/customElement.js +18 -15
- package/dist/components/arcgis-map/customElement.d.ts +21 -35
- package/dist/components/arcgis-measurement-content/customElement.js +5 -5
- package/dist/components/arcgis-paste/PasteViewModel.d.ts +2 -2
- package/dist/components/arcgis-template-image/customElement.d.ts +2 -2
- package/dist/components/arcgis-template-image/customElement.js +25 -22
- package/dist/components/arcgis-template-image/index.js +1 -0
- package/dist/components/arcgis-weather/customElement.js +108 -102
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +5 -5
- package/dist/cdn/5T3MHTWU.js +0 -2
- package/dist/cdn/6N233F4I.js +0 -2
- package/dist/cdn/ABPHGXQN.js +0 -2
- package/dist/cdn/L34RL7Y3.js +0 -2
- package/dist/cdn/QY5F7WAO.js +0 -2
- package/dist/cdn/RJM52R4G.js +0 -2
- package/dist/cdn/UZWPHO3G.js +0 -2
- package/dist/components/arcgis-feature-templates/TemplateItem.d.ts +0 -33
- /package/dist/cdn/{Q5PJLESJ.js → 2IJFHZMD.js} +0 -0
- /package/dist/cdn/{TIRTPJYQ.js → 2KJOV5HK.js} +0 -0
- /package/dist/cdn/{2LKEXUGD.js → 2SUHVYCI.js} +0 -0
- /package/dist/cdn/{27HHZNMM.js → 2YXRZJMN.js} +0 -0
- /package/dist/cdn/{XPS7ZSFJ.js → 3JMCA4ZR.js} +0 -0
- /package/dist/cdn/{HQPBHWPK.js → 4GKDVLBA.js} +0 -0
- /package/dist/cdn/{AK2M26FE.js → 4XU4I5VY.js} +0 -0
- /package/dist/cdn/{KIZ3ARHJ.js → 5DCYVSSO.js} +0 -0
- /package/dist/cdn/{SOOQCCHH.js → 5UPND3OG.js} +0 -0
- /package/dist/cdn/{O2CLPWU5.js → 6CGHMQTL.js} +0 -0
- /package/dist/cdn/{Y3B5PQ5E.js → 6DVVJ6UQ.js} +0 -0
- /package/dist/cdn/{XVY5OKH2.js → AQB6HLVS.js} +0 -0
- /package/dist/cdn/{IA3NCWIB.js → B4A4RH4L.js} +0 -0
- /package/dist/cdn/{VHB2BYFO.js → B5D6OPEJ.js} +0 -0
- /package/dist/cdn/{HUYCG6D3.js → C3LA23CB.js} +0 -0
- /package/dist/cdn/{NYHNV75B.js → C436KPG7.js} +0 -0
- /package/dist/cdn/{YJPDBYVX.js → CGISH4NH.js} +0 -0
- /package/dist/cdn/{AT6DOX43.js → DF5Q25A7.js} +0 -0
- /package/dist/cdn/{ZX5J6SMV.js → DIZDIIUN.js} +0 -0
- /package/dist/cdn/{3YVA4NJL.js → DJ3VJDLN.js} +0 -0
- /package/dist/cdn/{GLRISNYR.js → DVZKG2WC.js} +0 -0
- /package/dist/cdn/{PMWIRBWT.js → EFUEICKE.js} +0 -0
- /package/dist/cdn/{WFJH7WES.js → ELJCC3WK.js} +0 -0
- /package/dist/cdn/{FYDZH6BL.js → EPLP4YMK.js} +0 -0
- /package/dist/cdn/{QI5WIEJM.js → F7DW6VHH.js} +0 -0
- /package/dist/cdn/{CDAV4NEB.js → FBXUEXNZ.js} +0 -0
- /package/dist/cdn/{KEGLDP4A.js → FZYHVESP.js} +0 -0
- /package/dist/cdn/{HH3DMGSF.js → HAADLXJX.js} +0 -0
- /package/dist/cdn/{744JVRBH.js → HQZQCK6J.js} +0 -0
- /package/dist/cdn/{A4S3GECZ.js → L3L24SIA.js} +0 -0
- /package/dist/cdn/{3JU2AHMP.js → LM6ZA4HA.js} +0 -0
- /package/dist/cdn/{CTMF7NFP.js → LXZ2GZTN.js} +0 -0
- /package/dist/cdn/{6FT2R5PB.js → O263Z4SH.js} +0 -0
- /package/dist/cdn/{2G4VQVBD.js → O4PQUMJR.js} +0 -0
- /package/dist/cdn/{ADD3R54T.js → PU6QKY7I.js} +0 -0
- /package/dist/cdn/{UUUPIG6P.js → TW24OEJB.js} +0 -0
- /package/dist/cdn/{IBGSVDSQ.js → UJA6BLTS.js} +0 -0
- /package/dist/cdn/{24HADOKV.js → UUCYWMS2.js} +0 -0
- /package/dist/cdn/{FUTB3TZA.js → VKIVTDAN.js} +0 -0
- /package/dist/cdn/{BRANLHXP.js → WBNMJ4VE.js} +0 -0
- /package/dist/cdn/{APMRTXPD.js → WGGJPXPR.js} +0 -0
- /package/dist/cdn/{MLV3GXE7.js → YJMFI5UV.js} +0 -0
- /package/dist/cdn/{SWYSBYOY.js → YLLLSHFK.js} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as $}from"./ECNI2A4K.js";import f from"./MZWO5JYA.js";import e from"./AC4VLUR7.js";import{a as F}from"./SWOFXLPC.js";import d from"./UNGXK2Y7.js";import c from"./M3U7I4H6.js";import{h as w}from"./UC4ZZXFO.js";import"./JK33HXYG.js";import a from"./5J4YSRUG.js";import"./GFALET66.js";import{O as g,U as b,a as T,b as r,x as h}from"./URMAKTOH.js";import"./H6RQVSYM.js";export default $arcgis.t(([{property:l,subclass:x},B,_,{getAllStandardFeatureTemplatesForLayer:D,getTemplatesForLayers:E},{isTable:y,getEffectiveLayerCapabilities:L},{watch:v},,{a:M},,S,{e:m,f:f}])=>{var U=T`:host{display:flex;position:relative;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.filter-no-results{padding:var(--calcite-spacing-md) var(--calcite-spacing-lg)}.root{display:flex;flex:1 1 auto;overflow:hidden auto;transition:max-height .25s ease-in-out}.root>*{width:100%;box-sizing:border-box}.feature-template-tabs{--calcite-tab-background-color: transparent}`,C=Object.defineProperty,I=Object.getOwnPropertyDescriptor,a=(t,e,i,o)=>{for(var n=o>1?void 0:o?I(e,i):e,p=t.length-1,c;p>=0;p--)(c=t[p])&&(n=(o?c(e,i,n):c(n))||n);return o&&n&&C(e,i,n),n};function R(t){switch(t){case"point":case"multipoint":case"polyline":case"polygon":case"extent":case"mesh":return t}return"noneSpecified"}var A=t=>R(t.layer.geometryType??""),s=class extends B{constructor(t){super(t),this._hasRunInitialLoad=!1,this.favoritesEnabled=!1,this.recentlyUsedEnabled=!1,this.hideTemplateDescription=!1,this.filterText="",this.recentFilterText="",this.favoritesFilterText="",this.display="grouped",this.groupBy="layer",this.hideTemplatesMode="never",this.disableTemplatesMode="never",this.sectionSortBy="system",this.templateSortBy="alphabetical",this.sharedTemplatesDisabled=!1,this.excludeTables=!1,this.favorites=new Set,this.fetchingTemplateMetaData=!1,this.recentlyUsed=[]}async handleTemplateSourceDefinitionChanged(){if(this._hasRunInitialLoad=!1,this.applicationTemplates){await this._restore();return}try{this.fetchingTemplateMetaData=!0;let t=this.activeLayers;if(await Promise.allSettled(t.map(e=>e.load())),this.sharedTemplatesDisabled){let e=[];for(let i of t){let o=D(i);o.length>0&&e.push({layer:i,templates:o})}this.mapTemplates=e;return}this.mapTemplates=await E(t,this.view,void 0,{returnVisibleTemplatesOnly:!0}),await this._restore()}catch{this.mapTemplates=[]}finally{this.fetchingTemplateMetaData=!1}}get loading(){return!this._hasRunInitialLoad||this.layers!==void 0||this.applicationTemplates!==void 0||!this.view?.ready}async addFavorite(t){this.favorites.add(t.id),this.favorites=new Set(this.favorites)}async removeFavorite(t){this.favorites.delete(t.id),this.favorites=new Set(this.favorites)}addRecent(t){if(!this.recentlyUsedEnabled)return;let e=this.recentlyUsed.filter(i=>i!==t.id);e.unshift(t.id)>20&&(e.length=20),this.recentlyUsed=e}async removeRecent(t){this.recentlyUsed=this.recentlyUsed.filter(e=>e!==t.id)}async _restore(){try{if(this.favoritesEnabled&&this.restoreFavorites){let t=await this.restoreFavorites();this.favorites=new Set(t??[])}}catch{}try{if(this.recentlyUsedEnabled&&this.restoreRecentlyUsed){let t=await this.restoreRecentlyUsed();this.recentlyUsed=t??[]}}catch{}}_sortTemplates(t){if(this.templateSortByFunction){let e=this.templateSortByFunction(t)??null;return e===null?t:e}return this.templateSortBy==="alphabetical"?t.toSorted((e,i)=>e.label.localeCompare(i.label)):t}_sortSections(t){if(this.sectionSortByFunction){let e=this.sectionSortByFunction(t);e&&(t=e)}else if(this.sectionSortBy==="alphabetical")t=t.toSorted((e,i)=>e.sectionName.localeCompare(i.sectionName));else if(this.groupBy==="geometry"&&!this.groupByFunction){let e={point:1,multipoint:2,polyline:3,polygon:4,extent:5,mesh:6,noneSpecified:7};t=t.toSorted((i,o)=>{let n=e[i.sectionName]??10,p=e[o.sectionName]??10;return n-p})}for(let e of t)e.templates=this._sortTemplates(e.templates);return t}_layerIsVisibleAtCurrentScale(t){if(!this.view)return!0;let e=t;f(t)&&(e=t.parent);let i=this.view.allLayerViews.find(o=>o.layer===e);if(!i)return!0;if(f(t)){let o=this.view.scale;if(i.visibleAtCurrentScale){let n=t.minScale,p=t.maxScale,c=!n,d=!p;return!c&&o<=n&&(c=!0),!d&&o>=p&&(d=!0),c&&d}}return i.visibleAtCurrentScale}get activeLayers(){let t=[];for(let e of this.layers??[])if(m(e))for(let i of e.sublayers)t.push(i);else t.push(e);if(this.layers===void 0||this.layers===null){for(let e of[...this.view?.map?.allLayers?.slice(0).reverse()??[],...this.excludeTables?[]:this.view?.map?.allTables?.slice(0).reverse()??[]])if(e.type==="feature"||e.type==="scene"||e.type==="geojson"||e.type==="oriented-imagery"||e.type==="knowledge-graph")t.push(e);else if(m(e))for(let i of e.sublayers)t.push(i)}return t}get selectedTemplate(){return this.allTemplates.find(t=>t.id===this.selectedTemplateId)}get effectiveTemplates(){return this.templates.map(t=>({...t,templates:t.templates.filter(e=>this.inclusionFilter(e))})).filter(t=>t.templates.length>0)}get templateList(){return this._sortTemplates(this.effectiveTemplates.flatMap(t=>t.templates))}get allTemplates(){return this._sortTemplates(this.templates.flatMap(t=>t.templates))}inclusionFilter(t){if(this.excludeTables&&y(t.layer)||this.applicationFilterFunction?.(t)===!1)return!1;let e=L(t.layer)?.operations;return e?.supportsEditing===!1&&!e?.supportsAdd?!1:y(t.layer)?!0:!(this.hideTemplatesMode==="visible"&&!t.layer.visible||this.hideTemplatesMode==="scale"&&!this._layerIsVisibleAtCurrentScale(t.layer))}get templateSetKey(){return this._sortTemplates(this.allTemplates).map(t=>t.id).join(",")}get disabledTemplates(){let t=new Set;for(let e of this.allTemplates){if(this.applicationDisabledFunction&&this.applicationDisabledFunction(e)){t.add(e);continue}if(!y(e.layer)){if(this.disableTemplatesMode==="visible"&&!e.layer.visible){t.add(e);continue}if(this.disableTemplatesMode==="scale"&&this.view&&!this._layerIsVisibleAtCurrentScale(e.layer)){t.add(e);continue}}}return t}get templates(){return this.applicationTemplates??this.organizedMapTemplates}get organizedMapTemplates(){if(this.groupByFunction||this.groupBy==="geometry"){let t=!this.groupByFunction,e=this.groupByFunction??A,i=new Map;for(let o of this.mapTemplates??[])for(let n of o.templates){let p=new _({template:n,layer:o.layer}),c=e(p);if(c!=null)if(i.has(c))i.get(c)?.templates.push(p);else{let d={sectionName:c,...t?{autoTranslate:!0}:{},templates:[p]};i.set(c,d)}}return this._sortSections(Array.from(i.values()))}return this._sortSections((this.mapTemplates??[]).map(({layer:t,templates:e})=>({sectionName:t.title??"",templates:e.map(i=>new _({layer:t,template:i}))})).filter(t=>t.templates.length>0))}get updating(){return this.fetchingTemplateMetaData}get favoriteTemplates(){let t=[];for(let e of this.effectiveTemplates)for(let i of e.templates)this.favorites.has(i.id)&&t.push(i);return t}get recentTemplates(){let t=new Map;for(let i of this.effectiveTemplates)for(let o of i.templates)t.set(o.id,o);let e=[];for(let i of this.recentlyUsed)t.has(i)&&e.push(t.get(i));return e}};a([l()],s.prototype,"loading",1);a([l()],s.prototype,"_hasRunInitialLoad",2);a([l()],s.prototype,"activeLayers",1);a([l()],s.prototype,"favoritesEnabled",2);a([l()],s.prototype,"recentlyUsedEnabled",2);a([l()],s.prototype,"hideTemplateDescription",2);a([l()],s.prototype,"filterText",2);a([l()],s.prototype,"recentFilterText",2);a([l()],s.prototype,"favoritesFilterText",2);a([l()],s.prototype,"selectedTemplateId",2);a([l()],s.prototype,"selectedTemplate",1);a([l()],s.prototype,"layers",2);a([l()],s.prototype,"restoreFavorites",2);a([l()],s.prototype,"restoreRecentlyUsed",2);a([l()],s.prototype,"applicationDisabledFunction",2);a([l()],s.prototype,"applicationFilterFunction",2);a([l()],s.prototype,"display",2);a([l()],s.prototype,"groupBy",2);a([l()],s.prototype,"hideTemplatesMode",2);a([l()],s.prototype,"disableTemplatesMode",2);a([l()],s.prototype,"groupByFunction",2);a([l()],s.prototype,"sectionSortBy",2);a([l()],s.prototype,"templateSortBy",2);a([l()],s.prototype,"sectionSortByFunction",2);a([l()],s.prototype,"templateSortByFunction",2);a([l()],s.prototype,"sharedTemplatesDisabled",2);a([l()],s.prototype,"excludeTables",2);a([l()],s.prototype,"favorites",2);a([l()],s.prototype,"effectiveTemplates",1);a([l()],s.prototype,"templateList",1);a([l()],s.prototype,"allTemplates",1);a([l()],s.prototype,"templateSetKey",1);a([l()],s.prototype,"disabledTemplates",1);a([l()],s.prototype,"templates",1);a([l()],s.prototype,"mapTemplates",2);a([l()],s.prototype,"organizedMapTemplates",1);a([l()],s.prototype,"fetchingTemplateMetaData",2);a([l()],s.prototype,"updating",1);a([l()],s.prototype,"applicationTemplates",2);a([l()],s.prototype,"favoriteTemplates",1);a([l()],s.prototype,"recentTemplates",1);a([l()],s.prototype,"recentlyUsed",2);a([l()],s.prototype,"view",2);s=a([x("components.feature-templates.FeatureTemplatesViewModel")],s);var N=S(s),u=class extends g{constructor(){super(...arguments),this._messages=F(),this.viewModel=N(this),this.favoritesEnabled=this.viewModel.favoritesEnabled,this.favorites=this.viewModel.favorites,this.restoreFavorites=this.viewModel.restoreFavorites,this.restoreRecentlyUsed=this.viewModel.restoreRecentlyUsed,this.recentlyUsed=this.viewModel.recentlyUsed,this.sharedTemplatesDisabled=this.viewModel.sharedTemplatesDisabled,this.filterText=this.viewModel.filterText,this.recentFilterText=this.viewModel.recentFilterText,this.favoritesFilterText=this.viewModel.favoritesFilterText,this.recentlyUsedEnabled=this.viewModel.recentlyUsedEnabled,this.excludeTables=this.viewModel.excludeTables,this.effectiveTemplates=this.viewModel.effectiveTemplates,this.applicationTemplates=this.viewModel.applicationTemplates,this.selectedTemplateId=this.viewModel.selectedTemplateId,this.selectedTemplate=this.viewModel.selectedTemplate,this.applicationFilterFunction=this.viewModel.applicationFilterFunction,this.applicationDisabledFunction=this.viewModel.applicationDisabledFunction,this.display=this.viewModel.display,this.groupBy=this.viewModel.groupBy,this.sectionSortBy=this.viewModel.sectionSortBy,this.templateSortBy=this.viewModel.templateSortBy,this.templateSortByFunction=this.viewModel.templateSortByFunction,this.sectionSortByFunction=this.viewModel.sectionSortByFunction,this.hideTemplatesMode=this.viewModel.hideTemplatesMode,this.disableTemplatesMode=this.viewModel.disableTemplatesMode,this.groupByFunction=this.viewModel.groupByFunction,this.hideTemplateDescription=this.viewModel.hideTemplateDescription,this.layers=this.viewModel.layers,this.view=M(this),this.autoDestroyDisabled=!1,this.updating=this.viewModel.updating,this.disabled=!1,this.showCollapseButton=!1,this.showFilter=!1,this.arcgisPropertyChange=w()("effectiveTemplates","filterText","recentlyUsed","favorites"),this.arcgisReady=h(),this.arcgisTemplatesChanged=h(),this.arcgisSelectTemplate=h()}static{this.properties={favoritesEnabled:5,favorites:32,restoreFavorites:0,restoreRecentlyUsed:0,recentlyUsed:32,sharedTemplatesDisabled:5,filterText:1,recentFilterText:1,favoritesFilterText:1,recentlyUsedEnabled:5,excludeTables:5,effectiveTemplates:32,applicationTemplates:0,selectedTemplateId:1,selectedTemplate:32,applicationFilterFunction:0,applicationDisabledFunction:0,display:1,groupBy:1,sectionSortBy:1,templateSortBy:1,templateSortByFunction:0,sectionSortByFunction:0,hideTemplatesMode:1,disableTemplatesMode:1,groupByFunction:0,hideTemplateDescription:5,layers:0,view:0,referenceElement:1,autoDestroyDisabled:5,updating:32,disabled:5,showCollapseButton:5,showFilter:5}}static{this.styles=U}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[v(()=>this.view,()=>{this.viewModel.view=this.view},{initial:!0}),v(()=>this.viewModel.templateSetKey,()=>{this.arcgisTemplatesChanged.emit()}),v(()=>[this.viewModel.activeLayers?.map(e=>e.id).join(","),this.viewModel?.applicationTemplates,this.viewModel?.sharedTemplatesDisabled],$(()=>this.viewModel.handleTemplateSourceDefinitionChanged(),10),{initial:!0})])}_handleSelectTemplate(e){this.selectedTemplateId=e.id,this.arcgisSelectTemplate.emit({template:e}),this.viewModel.addRecent(e)}_removeTemplateFromList(e,i){if(i==="favorites"){this.viewModel.removeFavorite(e);return}this.viewModel.removeRecent(e)}_renderTemplates(){return this.effectiveTemplates.length===0?r`<calcite-notice icon=list open class="filter-no-results"><div slot=message>${this._messages.noTemplates}</div></calcite-notice>`:r`<calcite-list .filterPlaceholder=${this._messages.filterPlaceholder??""} .filterText=${this.filterText} .label=${this._messages?.templates??""} .filterEnabled=${this.showFilter} selection-appearance=border selection-mode=single @calciteListFilter=${e=>{this.filterText=e.target.filterText}}>${this.display==="grouped"?this.effectiveTemplates.map(e=>r`<calcite-list-item-group .heading=${e.autoTranslate?this._messages[e.sectionName]??"":e.sectionName}>${e.templates.map(i=>r`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(i)} .label=${i.label} .selected=${i.id===this.selectedTemplateId} .description=${this.hideTemplateDescription?void 0:i.description} .value=${i.id} @calciteListItemSelect=${()=>{this._handleSelectTemplate(i)}}><arcgis-template-image slot=content-start .template=${i}></arcgis-template-image>${this._renderAddFavorite(i)}</calcite-list-item>`)}</calcite-list-item-group>`):this.viewModel.templateList.map(e=>r`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(e)} .label=${e.label} .selected=${e.id===this.selectedTemplateId} .description=${this.hideTemplateDescription?void 0:e.description} .value=${e.id} @calciteListItemSelect=${()=>{this._handleSelectTemplate(e)}}><arcgis-template-image slot=content-start .template=${e}></arcgis-template-image>${this._renderAddFavorite(e)}</calcite-list-item>`)}${this._renderFilteredEmpty()}</calcite-list>`}_renderAddFavorite(e){return this.viewModel.favoritesEnabled?r`<calcite-action slot=actions-end .icon=${this.viewModel.favorites.has(e.id)?"heart-f":"heart"} @click=${()=>{this.viewModel.favorites.has(e.id)?this.viewModel.removeFavorite(e):this.viewModel.addFavorite(e)}} .text=${this._messages.addFavorite??""}></calcite-action>`:""}_renderList(e){let i=e==="favorites"?this.viewModel.favoriteTemplates:this.viewModel.recentTemplates;return i.length===0?r`<calcite-notice icon=list open class="filter-no-results"><div slot=message>${e==="favorites"?this._messages.noFavorites:this._messages.noRecent}</div></calcite-notice>`:r`<calcite-list .filterText=${e==="favorites"?this.favoritesFilterText:this.recentFilterText} .filterPlaceholder=${this._messages.filterPlaceholder??""} .label=${(e==="favorites"?this._messages.favorites:this._messages.recent)??""} .filterEnabled=${this.showFilter} selection-appearance=border selection-mode=single @calciteListFilter=${o=>{this.filterText=o.target.filterText}}>${i.map(o=>r`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(o)} .label=${o.label} .description=${this.hideTemplateDescription?void 0:o.description} .value=${o.id} @calciteListItemSelect=${()=>{this._handleSelectTemplate(o)}}><arcgis-template-image slot=content-start .template=${o}></arcgis-template-image><calcite-action slot=actions-end icon=x @click=${()=>{this._removeTemplateFromList(o,e)}} .text=${(e==="favorites"?this._messages.removeFavorite:this._messages.removeRecent)??""}></calcite-action></calcite-list-item>`)}${this._renderFilteredEmpty()}</calcite-list>`}_renderFilteredEmpty(){return r`<calcite-notice icon=filter slot=filter-no-results open class="filter-no-results"><div slot=message>${this._messages.noMatchingTemplates}</div></calcite-notice>`}_renderContent(){return this.effectiveTemplates.length===0&&this.viewModel.loading?null:this.favoritesEnabled||this.recentlyUsedEnabled?r`<calcite-tabs class="feature-template-tabs"><calcite-tab-nav slot=title-group><calcite-tab-title icon-start=templates selected>${this._messages.templates}</calcite-tab-title>${this.recentlyUsedEnabled?r`<calcite-tab-title icon-start=clock>${this._messages.recent}</calcite-tab-title>`:""}${this.favoritesEnabled?r`<calcite-tab-title icon-start=heart>${this._messages.favorites}</calcite-tab-title>`:""}</calcite-tab-nav><calcite-tab selected>${this._renderTemplates()}</calcite-tab><calcite-tab>${this._renderList("recent")}</calcite-tab><calcite-tab>${this._renderList("favorites")}</calcite-tab></calcite-tabs>`:this._renderTemplates()}render(){return r`<div class="root">${this._renderContent()}${this.viewModel.updating||this.disabled?r`<calcite-scrim><calcite-loader scale=s label .hidden=${!this.viewModel.updating}></calcite-loader></calcite-scrim>`:null}</div>`}};b("arcgis-feature-templates",u);return u},"core/accessorSupport/decorators","core/Accessor","editing/templates/TemplateListItem","applications/Components/templateUtils","applications/Components/layerUtils","core/reactiveUtils",a,c,d,e,f)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as vt}from"./2THVOG4Y.js";import{D as ft,E as q,P as at,R as _t,S as xt,c as M,ga as ct,i as T,j as v,ja as bt,k as D,l as mt,m as ht,n as dt,o as et,qa as ut,ra as lt,sa as kt}from"./6N233F4I.js";import{O as R,a as z,u as w}from"./JQVWY2TG.js";import{a as gt,b as tt,d as A,e as _}from"./AK2M26FE.js";import{W,X as yt,g as Y,o as k}from"./Y3B5PQ5E.js";import"./H6RQVSYM.js";var st=class extends yt{setupDefaultRules(){super.setupDefaultRules();let e=this._root.interfaceColors,t=this.rule.bind(this);t("PercentSeries").setAll({legendLabelText:"{category}",legendValueText:"{valuePercentTotal.formatNumber('0.00p')}",colors:kt.new(this._root,{}),width:A,height:A}),t("PieChart").setAll({radius:tt(80),startAngle:-90,endAngle:270}),t("PieSeries").setAll({alignLabels:!0,startAngle:-90,endAngle:270}),t("PieSeries").states.create("hidden",{endAngle:-90,opacity:0}),t("Slice",["pie"]).setAll({position:"absolute",isMeasured:!1,x:0,y:0,toggleKey:"active",tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}",strokeWidth:1,strokeOpacity:1,role:"figure",lineJoin:"round"}),t("Slice",["pie"]).states.create("active",{shiftRadius:20,scale:1}),t("Slice",["pie"]).states.create("hoverActive",{scale:1.04}),t("Slice",["pie"]).states.create("hover",{scale:1.04}),t("RadialLabel",["pie"]).setAll({textType:"aligned",radius:10,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",paddingTop:5,paddingBottom:5,populateText:!0}),t("Tick",["pie"]).setAll({location:1}),t("SlicedChart").setAll({paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10}),t("FunnelSeries").setAll({startLocation:0,endLocation:1,orientation:"vertical",alignLabels:!0,sequencedInterpolation:!0}),t("FunnelSlice").setAll({interactive:!0,expandDistance:0}),t("FunnelSlice").states.create("hover",{expandDistance:.15}),t("Label",["funnel"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:_}),t("Label",["funnel","horizontal"]).setAll({centerX:0,centerY:_,rotation:-90}),t("Label",["funnel","vertical"]).setAll({centerY:_,centerX:0}),t("Tick",["funnel"]).setAll({location:1}),t("FunnelSlice",["funnel","link"]).setAll({fillOpacity:.5,strokeOpacity:0,expandDistance:-.1}),t("FunnelSlice",["funnel","link","vertical"]).setAll({height:10}),t("FunnelSlice",["funnel","link","horizontal"]).setAll({width:10}),t("PyramidSeries").setAll({valueIs:"area"}),t("FunnelSlice",["pyramid","link"]).setAll({fillOpacity:.5}),t("FunnelSlice",["pyramid","link","vertical"]).setAll({height:0}),t("FunnelSlice",["pyramid","link","horizontal"]).setAll({width:0}),t("FunnelSlice",["pyramid"]).setAll({interactive:!0,expandDistance:0}),t("FunnelSlice",["pyramid"]).states.create("hover",{expandDistance:.15}),t("Label",["pyramid"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:_}),t("Label",["pyramid","horizontal"]).setAll({centerX:0,centerY:_,rotation:-90}),t("Label",["pyramid","vertical"]).setAll({centerY:_,centerX:0}),t("Tick",["pyramid"]).setAll({location:1}),t("FunnelSlice",["pictorial"]).setAll({interactive:!0,tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}"}),t("Label",["pictorial"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:_}),t("Label",["pictorial","horizontal"]).setAll({centerX:0,centerY:_,rotation:-90}),t("Label",["pictorial","vertical"]).setAll({centerY:_,centerX:0}),t("FunnelSlice",["pictorial","link"]).setAll({fillOpacity:.5,width:0,height:0}),t("Tick",["pictorial"]).setAll({location:.5});{let s=t("Graphics",["pictorial","background"]);s.setAll({fillOpacity:.2}),xt(s,"fill",e,"alternativeBackground")}}};var C=class extends ut{_afterNew(){this._defaultThemes.push(st.new(this._root)),super._afterNew(),this.chartContainer.children.push(this.seriesContainer),this.seriesContainer.children.push(this.bulletsContainer)}_processSeries(e){super._processSeries(e),this.seriesContainer.children.moveValue(this.bulletsContainer,this.seriesContainer.children.length-1)}};C.className="PercentChart";C.classNames=ut.classNames.concat([C.className]);var L=class extends ct{constructor(){super(...arguments),this.slicesContainer=this.children.push(at.new(this._root,{position:"absolute",isMeasured:!1})),this.labelsContainer=this.children.push(at.new(this._root,{position:"absolute",isMeasured:!1})),this.ticksContainer=this.children.push(at.new(this._root,{position:"absolute",isMeasured:!1})),this._lLabels=[],this._rLabels=[],this._hLabels=[],this.slices=this.addDisposer(this._makeSlices()),this.labels=this.addDisposer(this._makeLabels()),this.ticks=this.addDisposer(this._makeTicks())}_applyThemes(e=!1){let t=this.get("colors");return t&&t.reset(),super._applyThemes(e)}makeSlice(e){let t=this.slicesContainer.children.push(this.slices.make());return t.on("fill",()=>{this.updateLegendMarker(e)}),t.on("fillPattern",()=>{this.updateLegendMarker(e)}),t.on("stroke",()=>{this.updateLegendMarker(e)}),t._setDataItem(e),e.set("slice",t),this.slices.push(t),t}makeLabel(e){let t=this.labelsContainer.children.push(this.labels.make());return t._setDataItem(e),e.set("label",t),this.labels.push(t),t}_shouldMakeBullet(e){return e.get("value")!=null}makeTick(e){let t=this.ticksContainer.children.push(this.ticks.make());return t._setDataItem(e),e.set("tick",t),this.ticks.push(t),t}_afterNew(){this.fields.push("category","fill"),super._afterNew()}_onDataClear(){let e=this.get("colors");e&&e.reset();let t=this.get("patterns");t&&t.reset()}_prepareChildren(){if(super._prepareChildren(),this._lLabels=[],this._rLabels=[],this._hLabels=[],this._valuesDirty){let e=0,t=0,s=0,i=1/0,a=0;k(this._dataItems,l=>{let r=l.get("valueWorking",0);e+=r,t+=Math.abs(r)}),k(this._dataItems,l=>{let r=l.get("valueWorking",0);r>s&&(s=r),r<i&&(i=r),a++;let n=r/t;t==0&&(n=0),l.setRaw("valuePercentTotal",n*100)}),this.setPrivateRaw("valueLow",i),this.setPrivateRaw("valueHigh",s),this.setPrivateRaw("valueSum",e),this.setPrivateRaw("valueAverage",e/a),this.setPrivateRaw("valueAbsoluteSum",t)}}show(e){let t=Object.create(null,{show:{get:()=>super.show}});return z(this,void 0,void 0,function*(){let s=[];s.push(t.show.call(this,e)),s.push(this._sequencedShowHide(!0,e)),yield Promise.all(s)})}hide(e){let t=Object.create(null,{hide:{get:()=>super.hide}});return z(this,void 0,void 0,function*(){let s=[];s.push(t.hide.call(this,e)),s.push(this._sequencedShowHide(!1,e)),yield Promise.all(s)})}_updateChildren(){super._updateChildren(),this._valuesDirty&&k(this._dataItems,e=>{e.get("label").text.markDirtyText()}),(this.isDirty("legendLabelText")||this.isDirty("legendValueText"))&&k(this._dataItems,e=>{this.updateLegendValue(e)}),this._arrange()}_arrange(){this._arrangeDown(this._lLabels),this._arrangeUp(this._lLabels),this._arrangeDown(this._rLabels),this._arrangeUp(this._rLabels),this._arrangeLeft(this._hLabels),this._arrangeRight(this._hLabels),k(this.dataItems,e=>{this._updateTick(e)})}_afterChanged(){super._afterChanged(),this._arrange()}processDataItem(e){if(super.processDataItem(e),e.get("fill")==null){let t=this.get("colors");t&&e.setRaw("fill",t.next())}if(e.get("fillPattern")==null){let t=this.get("patterns");t&&e.setRaw("fillPattern",t.next())}}showDataItem(e,t){let s=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return z(this,void 0,void 0,function*(){let i=[s.showDataItem.call(this,e,t)];Y(t)||(t=this.get("stateAnimationDuration",0));let a=this.get("stateAnimationEasing"),l=e.get("value"),r=e.animate({key:"valueWorking",to:l,duration:t,easing:a});r&&i.push(r.waitForStop());let n=e.get("tick");n&&i.push(n.show(t));let c=e.get("label");c&&i.push(c.show(t));let o=e.get("slice");o&&i.push(o.show(t)),o.get("active")&&o.states.applyAnimate("active"),yield Promise.all(i)})}hideDataItem(e,t){let s=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return z(this,void 0,void 0,function*(){let i=[s.hideDataItem.call(this,e,t)],a=this.states.create("hidden",{});Y(t)||(t=a.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));let l=a.get("stateAnimationEasing",this.get("stateAnimationEasing")),r=e.animate({key:"valueWorking",to:0,duration:t,easing:l});r&&i.push(r.waitForStop());let n=e.get("tick");n&&i.push(n.hide(t));let c=e.get("label");c&&i.push(c.hide(t));let o=e.get("slice");o.hideTooltip(),o&&i.push(o.hide(t)),yield Promise.all(i)})}disposeDataItem(e){super.disposeDataItem(e);let t=e.get("label");t&&(this.labels.removeValue(t),t.dispose());let s=e.get("tick");s&&(this.ticks.removeValue(s),s.dispose());let i=e.get("slice");i&&(this.slices.removeValue(i),i.dispose())}hoverDataItem(e){let t=e.get("slice");t&&!t.isHidden()&&t.hover()}unhoverDataItem(e){let t=e.get("slice");t&&t.unhover()}updateLegendMarker(e){if(e){let t=e.get("slice");if(t){let s=e.get("legendDataItem");if(s){let i=s.get("markerRectangle");k(ft,a=>{t.get(a)!=null&&i.set(a,t.get(a))})}}}}_arrangeDown(e){if(e){let t=this._getNextDown();e.sort((s,i)=>s.y>i.y?1:s.y<i.y?-1:0),k(e,s=>{let i=s.label.adjustedLocalBounds(),a=i.top;s.y+a<t&&(s.y=t-a),s.label.set("y",s.y),t=s.y+i.bottom})}}_getNextUp(){return this.labelsContainer.maxHeight()}_getNextDown(){return 0}_arrangeUp(e){if(e){let t=this._getNextUp();e.sort((s,i)=>s.y<i.y?1:s.y>i.y?-1:0),k(e,s=>{let i=s.label.adjustedLocalBounds(),a=i.bottom;s.y+a>t&&(s.y=t-a),s.label.set("y",s.y),t=s.y+i.top})}}_arrangeRight(e){if(e){let t=0;e.sort((s,i)=>s.y>i.y?1:s.y<i.y?-1:0),k(e,s=>{let i=s.label.adjustedLocalBounds(),a=i.left;s.y+a<t&&(s.y=t-a),s.label.set("x",s.y),t=s.y+i.right})}}_arrangeLeft(e){if(e){let t=this.labelsContainer.maxWidth();e.sort((s,i)=>s.y<i.y?1:s.y>i.y?-1:0),k(e,s=>{let i=s.label.adjustedLocalBounds(),a=i.right;s.y+a>t&&(s.y=t-a),s.label.set("x",s.y),t=s.y+i.left})}}_updateSize(){super._updateSize(),this.markDirty()}_updateTick(e){}_dispose(){super._dispose();let e=this.chart;e&&e.series.removeValue(this)}};L.className="PercentSeries";L.classNames=ct.classNames.concat([L.className]);var G=class extends C{constructor(){super(...arguments),this._maxRadius=1}_afterNew(){super._afterNew(),this.seriesContainer.setAll({x:_,y:_})}_prepareChildren(){super._prepareChildren();let e=this.chartContainer,t=e.innerWidth(),s=e.innerHeight(),i=this.get("startAngle",0),a=this.get("endAngle",0),l=this.get("innerRadius"),r=ht(0,0,i,a,1),n=t/(r.right-r.left),c=s/(r.bottom-r.top),o={left:0,right:0,top:0,bottom:0};if(l instanceof gt){let p=l.value,g=Math.min(n,c);p=Math.max(g*p,g-Math.min(s,t))/g,o=ht(0,0,i,a,p),this.setPrivateRaw("irModifyer",p/l.value)}r=dt([r,o]);let m=this._maxRadius;this._maxRadius=Math.min(n,c);let h=w(this.get("radius",0),this._maxRadius);this.seriesContainer.setAll({dy:-h*(r.bottom+r.top)/2,dx:-h*(r.right+r.left)/2}),(this.isDirty("startAngle")||this.isDirty("endAngle")||m!=this._maxRadius)&&this.series.each(p=>{p._markDirtyKey("startAngle")}),(this.isDirty("innerRadius")||this.isDirty("radius"))&&this.series.each(p=>{p._markDirtyKey("innerRadius")})}radius(e){let t=w(this.get("radius",0),this._maxRadius),s=w(this.get("innerRadius",0),t);if(e){let i=this.series.indexOf(e),a=this.series.length,l=e.get("radius");return l!=null?s+w(l,t-s):s+(t-s)/a*(i+1)}return t}innerRadius(e){let t=this.radius(),s=w(this.get("innerRadius",0),t);if(s<0&&(s=t+s),e){let i=this.series.indexOf(e),a=this.series.length,l=e.get("innerRadius");return l!=null?s+w(l,t-s):s+(t-s)/a*i}return s}_updateSize(){super._updateSize(),this.markDirtyKey("radius")}};G.className="PieChart";G.classNames=C.classNames.concat([G.className]);var U=class extends L{_makeSlices(){return new M(W.new({}),()=>vt._new(this._root,{themeTags:R(this.slices.template.get("themeTags",[]),["pie","series"])},[this.slices.template]))}_makeLabels(){return new M(W.new({}),()=>bt._new(this._root,{themeTags:R(this.labels.template.get("themeTags",[]),["pie","series"])},[this.labels.template]))}_makeTicks(){return new M(W.new({}),()=>lt._new(this._root,{themeTags:R(this.ticks.template.get("themeTags",[]),["pie","series"])},[this.ticks.template]))}processDataItem(e){super.processDataItem(e);let t=this.makeSlice(e);t.on("scale",()=>{this._updateTick(e)}),t.on("shiftRadius",()=>{this._updateTick(e)}),t.events.on("positionchanged",()=>{this._updateTick(e)});let s=this.makeLabel(e);s.events.on("positionchanged",()=>{this._updateTick(e)}),this.makeTick(e),t.events.on("positionchanged",()=>{s.markDirty()})}_getNextUp(){let e=this.chart;return e?e._maxRadius:this.labelsContainer.maxHeight()/2}_getNextDown(){let e=this.chart;return e?-e._maxRadius:-this.labelsContainer.maxHeight()/2}_prepareChildren(){super._prepareChildren();let e=this.chart;if(e){if(this.isDirty("alignLabels")){let t=this.labels.template;if(this.get("alignLabels"))t.set("textType","aligned");else{let s=t.get("textType");(s==null||s=="aligned")&&t.set("textType","adjusted")}}if(this._valuesDirty||this.isDirty("radius")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("endAngle")||this.isDirty("alignLabels")){this.markDirtyBounds();let t=this.get("startAngle",e.get("startAngle",-90)),i=this.get("endAngle",e.get("endAngle",270))-t,a=t,l=e.radius(this);this.setPrivateRaw("radius",l);let r=e.innerRadius(this)*e.getPrivate("irModifyer",1);r<0&&(r=l+r),k(this._dataItems,n=>{this.updateLegendValue(n);let c=i*n.get("valuePercentTotal")/100,o=n.get("slice");if(o){o.set("radius",l),o.set("innerRadius",r),o.set("startAngle",a),o.set("arc",c);let p=n.get("fill");o._setDefault("fill",p),o._setDefault("stroke",p);let g=n.get("fillPattern");o._setDefault("fillPattern",g)}let m=mt(a+c/2),h=n.get("label");if(h&&(h.setPrivate("radius",l),h.setPrivate("innerRadius",r),h.set("labelAngle",m),h.get("textType")=="aligned")){let p=l+h.get("radius",0),g=l*T(m);m>90&&m<=270?(!h.isHidden()&&!h.isHiding()&&this._lLabels.push({label:h,y:g}),p*=-1,p-=this.labelsContainer.get("paddingLeft",0),h.set("centerX",A),h.setPrivateRaw("left",!0)):(!h.isHidden()&&!h.isHiding()&&this._rLabels.push({label:h,y:g}),p+=this.labelsContainer.get("paddingRight",0),h.set("centerX",0),h.setPrivateRaw("left",!1)),h.set("x",p),h.set("y",l*T(m))}a+=c,this._updateTick(n)})}}}_updateTick(e){let t=e.get("tick"),s=e.get("label"),i=e.get("slice"),a=t.get("location",1);if(t&&s&&i){let l=(i.get("shiftRadius",0)+i.get("radius",0))*i.get("scale",1)*a,r=s.get("labelAngle",0),n=D(r),c=T(r),o=this.labelsContainer,m=o.get("paddingLeft",0),h=o.get("paddingRight",0),p=0,g=0;p=s.x(),g=s.y();let u=[];if(p!=0||g!=0){if(s.get("textType")=="circular"){let y=s.radius()-s.get("paddingBottom",0),x=s.get("labelAngle",0);p=y*D(x),g=y*T(x)}let d=-h;s.getPrivate("left")&&(d=m),u=[{x:i.x()+l*n,y:i.y()+l*c},{x:p+d,y:g},{x:p,y:g}]}t.set("points",u)}}_positionBullet(e){let t=e.get("sprite");if(t){let i=t.dataItem.get("slice");if(i){let a=i.get("innerRadius",0),l=i.get("radius",0),r=i.get("startAngle",0),n=i.get("arc",0),c=e.get("locationX",.5),o=e.get("locationY",.5),m=r+n*c,h=a+(l-a)*o;t.setAll({x:D(m)*h,y:T(m)*h})}}}};U.className="PieSeries";U.classNames=L.classNames.concat([U.className]);var V=class extends q{constructor(){super(...arguments),this._projectionDirty=!1,this._tlx=0,this._tly=0,this._trx=0,this._try=0,this._blx=0,this._bly=0,this._brx=0,this._bry=0,this._cprx=0,this._cplx=0,this._cpry=0,this._cply=0}_afterNew(){super._afterNew(),this.set("draw",e=>{let t=this.width(),s=this.height(),i=Math.min(t,s)/2,a=w(this.get("cornerRadiusTL",0),i),l=w(this.get("cornerRadiusTR",0),i),r=w(this.get("cornerRadiusBR",0),i),n=w(this.get("cornerRadiusBL",0),i),c=this._trx,o=this._try,m=this._tlx,h=this._tly,p=this._brx,g=this._bry,u=this._blx,d=this._bly;o==h&&(o=o-.01),g==d&&(g=g-.01);let y=et({x:m,y:h},{x:c,y:o}),x=et({x:c,y:o},{x:p,y:g}),b=et({x:p,y:g},{x:u,y:d}),f=et({x:u,y:d},{x:m,y:h});this.get("orientation")=="horizontal"?(a=Math.min(a,Math.abs(h-o)/2),l=Math.min(l,Math.abs(h-o)/2),r=Math.min(r,Math.abs(d-g)/2),n=Math.min(n,Math.abs(d-g)/2)):(a=Math.min(a,Math.abs(m-c)/2),l=Math.min(l,Math.abs(m-c)/2),r=Math.min(r,Math.abs(u-p)/2),n=Math.min(n,Math.abs(u-p)/2));let $=m-a*v((y-f)/2)*D(f),P=h-a*v((y-f)/2)*T(f),F=m-a*v((f-y)/2)*D(y),Z=h-a*v((f-y)/2)*T(y),N=c-l*v((x-y)/2)*D(y),nt=o-l*v((x-y)/2)*T(y),B=c-l*v((y-x)/2)*D(x),O=o-l*v((y-x)/2)*T(x),J=p-r*v((b-x)/2)*D(x),j=g-r*v((b-x)/2)*T(x),Q=p-r*v((x-b)/2)*D(b),I=g-r*v((x-b)/2)*T(b),pt=u-n*v((f-b)/2)*D(b),it=d-n*v((f-b)/2)*T(b),ot=u-n*v((b-f)/2)*D(f),Dt=d-n*v((b-f)/2)*T(f);e.moveTo(F,Z),e.lineTo(N,nt),e.arcTo(c,o,B,O,l),e.quadraticCurveTo(this._cprx,this._cpry,J,j),e.arcTo(p,g,Q,I,r),e.lineTo(pt,it),e.arcTo(u,d,ot,Dt,n),e.quadraticCurveTo(this._cplx,this._cply,$,P),e.arcTo(m,h,F,Z,a)})}getPoint(e,t){let s=this.width(),i=this.height(),a=this.get("topWidth",0),l=this.get("bottomWidth",0);if(this.get("orientation")=="vertical"){let r=-a/2,n=a/2,c=l/2,o=-l/2,m=r+(o-r)*t,h=n+(c-n)*t;return{x:m+(h-m)*e,y:i*t}}else{let r=-a/2,n=a/2,c=l/2,o=-l/2,m=r+(o-r)*e,h=n+(c-n)*e;return{x:s*e,y:m+(h-m)*t}}}_changed(){if(this.isDirty("topWidth")||this.isDirty("bottomWidth")||this.isDirty("expandDistance")||this.isDirty("orientation")||this.isDirty("width")||this.isDirty("height")){let e=this.width(),t=this.height(),s=this.get("topWidth",0),i=this.get("bottomWidth",0);this._clear=!0;let a=this.get("expandDistance",0);this.get("orientation")=="vertical"?(this._tlx=-s/2,this._tly=0,this._trx=s/2,this._try=0,this._brx=i/2,this._bry=t,this._blx=-i/2,this._bly=t,this._cprx=this._trx+(this._brx-this._trx)/2+a*t,this._cpry=this._try+.5*t,this._cplx=this._tlx+(this._blx-this._tlx)/2-a*t,this._cply=this._tly+.5*t):(this._tly=s/2,this._tlx=0,this._try=-s/2,this._trx=0,this._bry=-i/2,this._brx=e,this._bly=i/2,this._blx=e,this._cpry=this._try+(this._bry-this._try)/2-a*e,this._cprx=this._trx+.5*e,this._cply=this._tly+(this._bly-this._tly)/2+a*e,this._cplx=this._tlx+.5*e)}super._changed()}};V.className="FunnelSlice";V.classNames=q.classNames.concat([V.className]);var H=class extends L{constructor(){super(...arguments),this._tag="funnel",this.links=this.addDisposer(this._makeLinks()),this._total=0,this._count=0,this._nextCoord=0,this._opposite=!1}_makeSlices(){return new M(W.new({}),()=>V._new(this._root,{themeTags:R(this.slices.template.get("themeTags",[]),[this._tag,"series","slice",this.get("orientation")])},[this.slices.template]))}_makeLabels(){return new M(W.new({}),()=>_t._new(this._root,{themeTags:R(this.labels.template.get("themeTags",[]),[this._tag,"series","label",this.get("orientation")])},[this.labels.template]))}_makeTicks(){return new M(W.new({}),()=>lt._new(this._root,{themeTags:R(this.ticks.template.get("themeTags",[]),[this._tag,"series","tick",this.get("orientation")])},[this.ticks.template]))}_makeLinks(){return new M(W.new({}),()=>V._new(this._root,{themeTags:R(this.links.template.get("themeTags",[]),[this._tag,"series","link",this.get("orientation")])},[this.links.template]))}makeLink(e){let t=this.slicesContainer.children.push(this.links.make());return t._setDataItem(e),e.set("link",t),this.links.push(t),t}_afterNew(){super._afterNew();let e=this.slicesContainer;e.setAll({isMeasured:!0,position:"relative",width:tt(100),height:tt(100)}),e.onPrivate("width",()=>{this.markDirtySize()}),e.onPrivate("height",()=>{this.markDirtySize()}),this.get("orientation")=="vertical"?this.set("layout",this._root.horizontalLayout):this.set("layout",this._root.verticalLayout)}processDataItem(e){super.processDataItem(e);let t=this.makeSlice(e);t._setDataItem(e),e.set("slice",t),this.makeLink(e);let s=this.makeLabel(e);s.on("x",()=>{this._updateTick(e)}),s.on("y",()=>{this._updateTick(e)}),this.makeTick(e),t.events.on("positionchanged",()=>{s.markDirty()}),t.events.on("boundschanged",()=>{let i=t.dataItem;i&&this._updateTick(i)})}_updateChildren(){this._opposite=!1,this.children.indexOf(this.labelsContainer)==0&&(this._opposite=!0);let e=0,t=0;if(k(this.dataItems,s=>{let i=s.get("value");Y(i)&&(t++,i>0?e+=Math.abs(s.get("valueWorking",i)/i):this.get("ignoreZeroValues",!1)||s.isHidden()?t--:e+=1)}),this._total=1/t*e,this._count=t,this.isDirty("alignLabels")&&this._fixLayout(),this._total>0&&(this._valuesDirty||this._sizeDirty)){let s=this.slicesContainer,i;this.get("orientation")=="vertical"?i=s.innerHeight():i=s.innerWidth(),this._nextCoord=this.get("startLocation",0)*i,this.markDirtyBounds();let a=0;k(this._dataItems,l=>{this.updateLegendValue(l),l.set("index",a),a++;let r=l.get("slice"),n=l.get("tick"),c=l.get("label"),o=l.get("link"),m=l.get("fill"),h=l.get("fillPattern");r._setDefault("fill",m),r._setDefault("stroke",m),r._setDefault("fillPattern",h),o._setDefault("fill",m),o._setDefault("stroke",m);let p=l.get("value");Y(p)&&(p==0&&this.get("ignoreZeroValues")?(r.setPrivate("visible",!1),n.setPrivate("visible",!1),c.setPrivate("visible",!1)):(r.setPrivate("visible",!0),n.setPrivate("visible",!0),c.setPrivate("visible",!0),this.decorateSlice(l),this.isLast(l)?o.setPrivate("visible",!1):l.isHidden()||o.setPrivate("visible",!0)))})}super._updateChildren()}_fixLayout(){let e=this.get("orientation"),t=this.labelsContainer,s=this.labels.template;this.get("alignLabels")?(t.set("position","relative"),t.setAll({isMeasured:!0}),e=="vertical"?(this.set("layout",this._root.horizontalLayout),s.setAll({centerX:A,x:A})):(this.set("layout",this._root.verticalLayout),s.setAll({centerX:0,x:0}))):(t.setAll({isMeasured:!1,position:"absolute"}),e=="vertical"?(t.setAll({x:_}),s.setAll({centerX:_,x:0})):(t.setAll({y:_}),s.setAll({centerX:_,y:0}))),this.markDirtySize()}getNextValue(e){let t=e.get("index"),s=e.get("valueWorking",0);if(t<this.dataItems.length-1){let i=this.dataItems[t+1];if(s=i.get("valueWorking",0),i.isHidden()||i.get("value")==0&&this.get("ignoreZeroValues"))return this.getNextValue(i)}return s}isLast(e){let t=e.get("index");if(t==this.dataItems.length-1)return!0;for(let s=t+1;s<this.dataItems.length;s++)if(!this.dataItems[s].isHidden())return!1;return!0}decorateSlice(e){let t=this.get("orientation"),s=e.get("slice"),i=e.get("label"),a=e.get("link"),l=this.slicesContainer,r=l.innerWidth(),n=l.innerHeight(),c=r;t=="horizontal"&&(c=n);let o=this.getNextValue(e),m=e.get("value",0),h=Math.abs(e.get("valueWorking",m)),p=this.get("bottomRatio",0),g=this.getPrivate("valueHigh",0),u=1;m!=0?u=h/Math.abs(m):e.isHidden()&&(u=1e-6),this._nextCoord==1/0&&(this._nextCoord=0);let d=h/g*c,y=(h-(h-o)*p)/g*c;s.setAll({topWidth:d,bottomWidth:y,orientation:t}),a.setAll({topWidth:y,bottomWidth:(h-(h-o))/g*c,orientation:t});let x=this.get("startLocation",0),b=this.get("endLocation",1);if(t=="vertical"){let f=a.height()*u;n=n*(b-x)+f,s.set("y",this._nextCoord);let $=Math.min(1e5,Math.max(0,n/this._count*u/this._total-f));s.setAll({height:$,x:r/2});let P=this._nextCoord+$/2;i.set("y",P),this._nextCoord+=$+f,a.setAll({y:this._nextCoord-f,x:r/2})}else{let f=a.width()*u;r=r*(b-x)+f,s.set("x",this._nextCoord);let $=Math.min(1e5,Math.max(0,r/this._count*u/this._total-f));s.setAll({width:$,y:n/2});let P=this._nextCoord+$/2;i.set("x",P),this._nextCoord+=$+f,a.setAll({x:this._nextCoord-f,y:n/2})}}hideDataItem(e,t){let s=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return z(this,void 0,void 0,function*(){return e.get("link").hide(t),s.hideDataItem.call(this,e,t)})}showDataItem(e,t){let s=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return z(this,void 0,void 0,function*(){return e.get("link").show(t),s.showDataItem.call(this,e,t)})}_updateTick(e){if(this.get("alignLabels")){let t=e.get("tick"),s=e.get("label"),i=e.get("slice");if(t&&i&&s){let a=this.labelsContainer,l=this.slicesContainer,r=t.get("location",.5),n=a.width(),c=a.height(),o=a.get("paddingLeft",0),m=a.get("paddingRight",0),h=a.get("paddingTop",0),p=a.get("paddingBottom",0),g={x:0,y:0},u={x:0,y:0},d={x:0,y:0};this._opposite&&(r=1-r),this.get("orientation")=="vertical"?(g=i.getPoint(r,.5),g.x+=i.x()+l.x(),g.y+=i.y()+l.y(),this._opposite?(u.x=n,u.y=s.y(),d.x=n-o,d.y=u.y):(u.x=l.x()+l.width(),u.y=s.y(),d.x=u.x+n-s.width()-m,d.y=u.y)):(g=i.getPoint(.5,r),g.x+=i.x()+l.x(),g.y+=i.y()+l.y(),this._opposite?(u.y=c,u.x=s.x(),d.y=c-h,d.x=u.x):(u.y=l.y()+l.height(),u.x=s.x(),d.y=u.y+c-s.height()-p,d.x=u.x)),t.set("points",[g,u,d])}}}disposeDataItem(e){super.disposeDataItem(e);let t=e.get("link");t&&(this.links.removeValue(t),t.dispose())}_positionBullet(e){let t=e.get("sprite");if(t){let i=t.dataItem.get("slice");if(i){let a=i.width(),l=i.height(),r=e.get("locationX",.5),n=e.get("locationY",.5),c=0,o=0;this.get("orientation")=="horizontal"?o=l/2:c=a/2,t.setAll({x:i.x()+a*r-c,y:i.y()-o+l*n})}}}};H.className="FunnelSeries";H.classNames=L.classNames.concat([H.className]);var X=class extends H{constructor(){super(...arguments),this._tag="pyramid"}_prepareChildren(){super._prepareChildren(),this._nextSize=void 0}decorateSlice(e){let t=this.get("orientation"),s=this.slicesContainer,i=e.get("slice"),a=e.get("label"),l=e.get("link"),r=this.get("valueIs","area"),n=this.getPrivate("valueAbsoluteSum",0);if(n==0)return;let c=this.get("startLocation",0),o=this.get("endLocation",1),m=this.get("topWidth",0),h=this.get("bottomWidth",A),p=Math.abs(e.get("valueWorking",0)),g=e.get("value",0),u,d,y=s.innerHeight(),x=s.innerWidth(),b=l.width(),f=l.height();t=="horizontal"&&([x,y]=[y,x],[b,f]=[f,b]);let $=x/2,P=1;g!=0?P=p/Math.abs(g):e.isHidden()&&(P=1e-6),f*=P,y=y*(o-c)-f*(this._count*this._total-1);let F=w(m,x);Y(this._nextSize)||(this._nextSize=F);let Z=w(h,x),N=this._nextSize,nt=Math.atan2(y,F-Z),B=Math.tan(Math.PI/2-nt);if(B==0&&(B=1e-8),r=="area"){let it=(F+Z)/2*y*p/n,ot=Math.abs(N*N-2*it*B);u=(N-Math.sqrt(ot))/B,u>0?d=(2*it-u*N)/u:d=N}else u=y*p/n,d=N-u*B;let O=this._nextCoord+u/2,J=$,j=this._nextCoord,Q=$,I=j+u;t=="vertical"?(a.set("y",O),a.get("opacity")>0&&this._rLabels.push({label:a,y:O}),i.set("height",u)):(a.set("x",O),a.get("opacity")>0&&this._hLabels.push({label:a,y:O}),[J,j]=[j,J],[Q,I]=[I,Q],i.set("width",u)),i.setAll({orientation:t,bottomWidth:d,topWidth:N,x:J,y:j}),l.setAll({orientation:t,x:Q,y:I,topWidth:d,bottomWidth:d}),this._nextSize=d,this._nextCoord+=u+f}};X.className="PyramidSeries";X.classNames=H.classNames.concat([X.className]);var K=class extends X{constructor(){super(...arguments),this._tag="pictorial",this.seriesMask=q.new(this._root,{position:"absolute",x:_,y:_,centerX:_,centerY:_}),this.seriesGraphics=this.slicesContainer.children.push(q.new(this._root,{themeTags:["pictorial","background"],position:"absolute",x:_,y:_,centerX:_,centerY:_}))}_afterNew(){super._afterNew(),this.set("topWidth",A),this.set("bottomWidth",A),this.set("valueIs","height"),this.slicesContainer.set("mask",this.seriesMask)}_updateScale(){let e=this.slicesContainer,t=e.innerWidth(),s=e.innerHeight(),i=this.seriesMask,a=this.seriesGraphics,l=i.get("scale",1),r=i.localBounds(),n=r.right-r.left,c=r.bottom-r.top;this.get("orientation")=="horizontal"?l=t/n:l=s/c,l!=1/0&&l!=NaN&&(i.set("scale",l),i.set("x",t/2),i.set("y",s/2),a.set("scale",l),a.set("x",t/2),a.set("y",s/2))}_prepareChildren(){if(super._prepareChildren(),this.isDirty("svgPath")){let e=this.get("svgPath");this.seriesMask.set("svgPath",e),this.seriesGraphics.set("svgPath",e)}this._updateScale()}};K.className="PictorialStackedSeries";K.classNames=X.classNames.concat([K.className]);var E=class extends C{_afterNew(){super._afterNew(),this.seriesContainer.setAll({isMeasured:!0,layout:this._root.horizontalLayout})}};E.className="SlicedChart";E.classNames=C.classNames.concat([E.className]);export{st as DefaultTheme,H as FunnelSeries,V as FunnelSlice,C as PercentChart,L as PercentSeries,K as PictorialStackedSeries,G as PieChart,U as PieSeries,X as PyramidSeries,E as SlicedChart};
|
|
2
|
+
import{a as vt}from"./WA7IUOYU.js";import{D as ft,E as q,P as at,R as _t,S as xt,c as M,ga as ct,i as T,j as v,ja as bt,k as D,l as mt,m as ht,n as dt,o as et,qa as ut,ra as lt,sa as kt}from"./462X4ZCG.js";import{O as R,a as z,u as w}from"./HXDS4O7D.js";import{a as gt,b as tt,d as A,e as _}from"./4XU4I5VY.js";import{W,X as yt,g as Y,o as k}from"./6DVVJ6UQ.js";import"./H6RQVSYM.js";var st=class extends yt{setupDefaultRules(){super.setupDefaultRules();let e=this._root.interfaceColors,t=this.rule.bind(this);t("PercentSeries").setAll({legendLabelText:"{category}",legendValueText:"{valuePercentTotal.formatNumber('0.00p')}",colors:kt.new(this._root,{}),width:A,height:A}),t("PieChart").setAll({radius:tt(80),startAngle:-90,endAngle:270}),t("PieSeries").setAll({alignLabels:!0,startAngle:-90,endAngle:270}),t("PieSeries").states.create("hidden",{endAngle:-90,opacity:0}),t("Slice",["pie"]).setAll({position:"absolute",isMeasured:!1,x:0,y:0,toggleKey:"active",tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}",strokeWidth:1,strokeOpacity:1,role:"figure",lineJoin:"round"}),t("Slice",["pie"]).states.create("active",{shiftRadius:20,scale:1}),t("Slice",["pie"]).states.create("hoverActive",{scale:1.04}),t("Slice",["pie"]).states.create("hover",{scale:1.04}),t("RadialLabel",["pie"]).setAll({textType:"aligned",radius:10,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",paddingTop:5,paddingBottom:5,populateText:!0}),t("Tick",["pie"]).setAll({location:1}),t("SlicedChart").setAll({paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10}),t("FunnelSeries").setAll({startLocation:0,endLocation:1,orientation:"vertical",alignLabels:!0,sequencedInterpolation:!0}),t("FunnelSlice").setAll({interactive:!0,expandDistance:0}),t("FunnelSlice").states.create("hover",{expandDistance:.15}),t("Label",["funnel"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:_}),t("Label",["funnel","horizontal"]).setAll({centerX:0,centerY:_,rotation:-90}),t("Label",["funnel","vertical"]).setAll({centerY:_,centerX:0}),t("Tick",["funnel"]).setAll({location:1}),t("FunnelSlice",["funnel","link"]).setAll({fillOpacity:.5,strokeOpacity:0,expandDistance:-.1}),t("FunnelSlice",["funnel","link","vertical"]).setAll({height:10}),t("FunnelSlice",["funnel","link","horizontal"]).setAll({width:10}),t("PyramidSeries").setAll({valueIs:"area"}),t("FunnelSlice",["pyramid","link"]).setAll({fillOpacity:.5}),t("FunnelSlice",["pyramid","link","vertical"]).setAll({height:0}),t("FunnelSlice",["pyramid","link","horizontal"]).setAll({width:0}),t("FunnelSlice",["pyramid"]).setAll({interactive:!0,expandDistance:0}),t("FunnelSlice",["pyramid"]).states.create("hover",{expandDistance:.15}),t("Label",["pyramid"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:_}),t("Label",["pyramid","horizontal"]).setAll({centerX:0,centerY:_,rotation:-90}),t("Label",["pyramid","vertical"]).setAll({centerY:_,centerX:0}),t("Tick",["pyramid"]).setAll({location:1}),t("FunnelSlice",["pictorial"]).setAll({interactive:!0,tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}"}),t("Label",["pictorial"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:_}),t("Label",["pictorial","horizontal"]).setAll({centerX:0,centerY:_,rotation:-90}),t("Label",["pictorial","vertical"]).setAll({centerY:_,centerX:0}),t("FunnelSlice",["pictorial","link"]).setAll({fillOpacity:.5,width:0,height:0}),t("Tick",["pictorial"]).setAll({location:.5});{let s=t("Graphics",["pictorial","background"]);s.setAll({fillOpacity:.2}),xt(s,"fill",e,"alternativeBackground")}}};var C=class extends ut{_afterNew(){this._defaultThemes.push(st.new(this._root)),super._afterNew(),this.chartContainer.children.push(this.seriesContainer),this.seriesContainer.children.push(this.bulletsContainer)}_processSeries(e){super._processSeries(e),this.seriesContainer.children.moveValue(this.bulletsContainer,this.seriesContainer.children.length-1)}};C.className="PercentChart";C.classNames=ut.classNames.concat([C.className]);var L=class extends ct{constructor(){super(...arguments),this.slicesContainer=this.children.push(at.new(this._root,{position:"absolute",isMeasured:!1})),this.labelsContainer=this.children.push(at.new(this._root,{position:"absolute",isMeasured:!1})),this.ticksContainer=this.children.push(at.new(this._root,{position:"absolute",isMeasured:!1})),this._lLabels=[],this._rLabels=[],this._hLabels=[],this.slices=this.addDisposer(this._makeSlices()),this.labels=this.addDisposer(this._makeLabels()),this.ticks=this.addDisposer(this._makeTicks())}_applyThemes(e=!1){let t=this.get("colors");return t&&t.reset(),super._applyThemes(e)}makeSlice(e){let t=this.slicesContainer.children.push(this.slices.make());return t.on("fill",()=>{this.updateLegendMarker(e)}),t.on("fillPattern",()=>{this.updateLegendMarker(e)}),t.on("stroke",()=>{this.updateLegendMarker(e)}),t._setDataItem(e),e.set("slice",t),this.slices.push(t),t}makeLabel(e){let t=this.labelsContainer.children.push(this.labels.make());return t._setDataItem(e),e.set("label",t),this.labels.push(t),t}_shouldMakeBullet(e){return e.get("value")!=null}makeTick(e){let t=this.ticksContainer.children.push(this.ticks.make());return t._setDataItem(e),e.set("tick",t),this.ticks.push(t),t}_afterNew(){this.fields.push("category","fill"),super._afterNew()}_onDataClear(){let e=this.get("colors");e&&e.reset();let t=this.get("patterns");t&&t.reset()}_prepareChildren(){if(super._prepareChildren(),this._lLabels=[],this._rLabels=[],this._hLabels=[],this._valuesDirty){let e=0,t=0,s=0,i=1/0,a=0;k(this._dataItems,l=>{let r=l.get("valueWorking",0);e+=r,t+=Math.abs(r)}),k(this._dataItems,l=>{let r=l.get("valueWorking",0);r>s&&(s=r),r<i&&(i=r),a++;let n=r/t;t==0&&(n=0),l.setRaw("valuePercentTotal",n*100)}),this.setPrivateRaw("valueLow",i),this.setPrivateRaw("valueHigh",s),this.setPrivateRaw("valueSum",e),this.setPrivateRaw("valueAverage",e/a),this.setPrivateRaw("valueAbsoluteSum",t)}}show(e){let t=Object.create(null,{show:{get:()=>super.show}});return z(this,void 0,void 0,function*(){let s=[];s.push(t.show.call(this,e)),s.push(this._sequencedShowHide(!0,e)),yield Promise.all(s)})}hide(e){let t=Object.create(null,{hide:{get:()=>super.hide}});return z(this,void 0,void 0,function*(){let s=[];s.push(t.hide.call(this,e)),s.push(this._sequencedShowHide(!1,e)),yield Promise.all(s)})}_updateChildren(){super._updateChildren(),this._valuesDirty&&k(this._dataItems,e=>{e.get("label").text.markDirtyText()}),(this.isDirty("legendLabelText")||this.isDirty("legendValueText"))&&k(this._dataItems,e=>{this.updateLegendValue(e)}),this._arrange()}_arrange(){this._arrangeDown(this._lLabels),this._arrangeUp(this._lLabels),this._arrangeDown(this._rLabels),this._arrangeUp(this._rLabels),this._arrangeLeft(this._hLabels),this._arrangeRight(this._hLabels),k(this.dataItems,e=>{this._updateTick(e)})}_afterChanged(){super._afterChanged(),this._arrange()}processDataItem(e){if(super.processDataItem(e),e.get("fill")==null){let t=this.get("colors");t&&e.setRaw("fill",t.next())}if(e.get("fillPattern")==null){let t=this.get("patterns");t&&e.setRaw("fillPattern",t.next())}}showDataItem(e,t){let s=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return z(this,void 0,void 0,function*(){let i=[s.showDataItem.call(this,e,t)];Y(t)||(t=this.get("stateAnimationDuration",0));let a=this.get("stateAnimationEasing"),l=e.get("value"),r=e.animate({key:"valueWorking",to:l,duration:t,easing:a});r&&i.push(r.waitForStop());let n=e.get("tick");n&&i.push(n.show(t));let c=e.get("label");c&&i.push(c.show(t));let o=e.get("slice");o&&i.push(o.show(t)),o.get("active")&&o.states.applyAnimate("active"),yield Promise.all(i)})}hideDataItem(e,t){let s=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return z(this,void 0,void 0,function*(){let i=[s.hideDataItem.call(this,e,t)],a=this.states.create("hidden",{});Y(t)||(t=a.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));let l=a.get("stateAnimationEasing",this.get("stateAnimationEasing")),r=e.animate({key:"valueWorking",to:0,duration:t,easing:l});r&&i.push(r.waitForStop());let n=e.get("tick");n&&i.push(n.hide(t));let c=e.get("label");c&&i.push(c.hide(t));let o=e.get("slice");o.hideTooltip(),o&&i.push(o.hide(t)),yield Promise.all(i)})}disposeDataItem(e){super.disposeDataItem(e);let t=e.get("label");t&&(this.labels.removeValue(t),t.dispose());let s=e.get("tick");s&&(this.ticks.removeValue(s),s.dispose());let i=e.get("slice");i&&(this.slices.removeValue(i),i.dispose())}hoverDataItem(e){let t=e.get("slice");t&&!t.isHidden()&&t.hover()}unhoverDataItem(e){let t=e.get("slice");t&&t.unhover()}updateLegendMarker(e){if(e){let t=e.get("slice");if(t){let s=e.get("legendDataItem");if(s){let i=s.get("markerRectangle");k(ft,a=>{t.get(a)!=null&&i.set(a,t.get(a))})}}}}_arrangeDown(e){if(e){let t=this._getNextDown();e.sort((s,i)=>s.y>i.y?1:s.y<i.y?-1:0),k(e,s=>{let i=s.label.adjustedLocalBounds(),a=i.top;s.y+a<t&&(s.y=t-a),s.label.set("y",s.y),t=s.y+i.bottom})}}_getNextUp(){return this.labelsContainer.maxHeight()}_getNextDown(){return 0}_arrangeUp(e){if(e){let t=this._getNextUp();e.sort((s,i)=>s.y<i.y?1:s.y>i.y?-1:0),k(e,s=>{let i=s.label.adjustedLocalBounds(),a=i.bottom;s.y+a>t&&(s.y=t-a),s.label.set("y",s.y),t=s.y+i.top})}}_arrangeRight(e){if(e){let t=0;e.sort((s,i)=>s.y>i.y?1:s.y<i.y?-1:0),k(e,s=>{let i=s.label.adjustedLocalBounds(),a=i.left;s.y+a<t&&(s.y=t-a),s.label.set("x",s.y),t=s.y+i.right})}}_arrangeLeft(e){if(e){let t=this.labelsContainer.maxWidth();e.sort((s,i)=>s.y<i.y?1:s.y>i.y?-1:0),k(e,s=>{let i=s.label.adjustedLocalBounds(),a=i.right;s.y+a>t&&(s.y=t-a),s.label.set("x",s.y),t=s.y+i.left})}}_updateSize(){super._updateSize(),this.markDirty()}_updateTick(e){}_dispose(){super._dispose();let e=this.chart;e&&e.series.removeValue(this)}};L.className="PercentSeries";L.classNames=ct.classNames.concat([L.className]);var G=class extends C{constructor(){super(...arguments),this._maxRadius=1}_afterNew(){super._afterNew(),this.seriesContainer.setAll({x:_,y:_})}_prepareChildren(){super._prepareChildren();let e=this.chartContainer,t=e.innerWidth(),s=e.innerHeight(),i=this.get("startAngle",0),a=this.get("endAngle",0),l=this.get("innerRadius"),r=ht(0,0,i,a,1),n=t/(r.right-r.left),c=s/(r.bottom-r.top),o={left:0,right:0,top:0,bottom:0};if(l instanceof gt){let p=l.value,g=Math.min(n,c);p=Math.max(g*p,g-Math.min(s,t))/g,o=ht(0,0,i,a,p),this.setPrivateRaw("irModifyer",p/l.value)}r=dt([r,o]);let m=this._maxRadius;this._maxRadius=Math.min(n,c);let h=w(this.get("radius",0),this._maxRadius);this.seriesContainer.setAll({dy:-h*(r.bottom+r.top)/2,dx:-h*(r.right+r.left)/2}),(this.isDirty("startAngle")||this.isDirty("endAngle")||m!=this._maxRadius)&&this.series.each(p=>{p._markDirtyKey("startAngle")}),(this.isDirty("innerRadius")||this.isDirty("radius"))&&this.series.each(p=>{p._markDirtyKey("innerRadius")})}radius(e){let t=w(this.get("radius",0),this._maxRadius),s=w(this.get("innerRadius",0),t);if(e){let i=this.series.indexOf(e),a=this.series.length,l=e.get("radius");return l!=null?s+w(l,t-s):s+(t-s)/a*(i+1)}return t}innerRadius(e){let t=this.radius(),s=w(this.get("innerRadius",0),t);if(s<0&&(s=t+s),e){let i=this.series.indexOf(e),a=this.series.length,l=e.get("innerRadius");return l!=null?s+w(l,t-s):s+(t-s)/a*i}return s}_updateSize(){super._updateSize(),this.markDirtyKey("radius")}};G.className="PieChart";G.classNames=C.classNames.concat([G.className]);var U=class extends L{_makeSlices(){return new M(W.new({}),()=>vt._new(this._root,{themeTags:R(this.slices.template.get("themeTags",[]),["pie","series"])},[this.slices.template]))}_makeLabels(){return new M(W.new({}),()=>bt._new(this._root,{themeTags:R(this.labels.template.get("themeTags",[]),["pie","series"])},[this.labels.template]))}_makeTicks(){return new M(W.new({}),()=>lt._new(this._root,{themeTags:R(this.ticks.template.get("themeTags",[]),["pie","series"])},[this.ticks.template]))}processDataItem(e){super.processDataItem(e);let t=this.makeSlice(e);t.on("scale",()=>{this._updateTick(e)}),t.on("shiftRadius",()=>{this._updateTick(e)}),t.events.on("positionchanged",()=>{this._updateTick(e)});let s=this.makeLabel(e);s.events.on("positionchanged",()=>{this._updateTick(e)}),this.makeTick(e),t.events.on("positionchanged",()=>{s.markDirty()})}_getNextUp(){let e=this.chart;return e?e._maxRadius:this.labelsContainer.maxHeight()/2}_getNextDown(){let e=this.chart;return e?-e._maxRadius:-this.labelsContainer.maxHeight()/2}_prepareChildren(){super._prepareChildren();let e=this.chart;if(e){if(this.isDirty("alignLabels")){let t=this.labels.template;if(this.get("alignLabels"))t.set("textType","aligned");else{let s=t.get("textType");(s==null||s=="aligned")&&t.set("textType","adjusted")}}if(this._valuesDirty||this.isDirty("radius")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("endAngle")||this.isDirty("alignLabels")){this.markDirtyBounds();let t=this.get("startAngle",e.get("startAngle",-90)),i=this.get("endAngle",e.get("endAngle",270))-t,a=t,l=e.radius(this);this.setPrivateRaw("radius",l);let r=e.innerRadius(this)*e.getPrivate("irModifyer",1);r<0&&(r=l+r),k(this._dataItems,n=>{this.updateLegendValue(n);let c=i*n.get("valuePercentTotal")/100,o=n.get("slice");if(o){o.set("radius",l),o.set("innerRadius",r),o.set("startAngle",a),o.set("arc",c);let p=n.get("fill");o._setDefault("fill",p),o._setDefault("stroke",p);let g=n.get("fillPattern");o._setDefault("fillPattern",g)}let m=mt(a+c/2),h=n.get("label");if(h&&(h.setPrivate("radius",l),h.setPrivate("innerRadius",r),h.set("labelAngle",m),h.get("textType")=="aligned")){let p=l+h.get("radius",0),g=l*T(m);m>90&&m<=270?(!h.isHidden()&&!h.isHiding()&&this._lLabels.push({label:h,y:g}),p*=-1,p-=this.labelsContainer.get("paddingLeft",0),h.set("centerX",A),h.setPrivateRaw("left",!0)):(!h.isHidden()&&!h.isHiding()&&this._rLabels.push({label:h,y:g}),p+=this.labelsContainer.get("paddingRight",0),h.set("centerX",0),h.setPrivateRaw("left",!1)),h.set("x",p),h.set("y",l*T(m))}a+=c,this._updateTick(n)})}}}_updateTick(e){let t=e.get("tick"),s=e.get("label"),i=e.get("slice"),a=t.get("location",1);if(t&&s&&i){let l=(i.get("shiftRadius",0)+i.get("radius",0))*i.get("scale",1)*a,r=s.get("labelAngle",0),n=D(r),c=T(r),o=this.labelsContainer,m=o.get("paddingLeft",0),h=o.get("paddingRight",0),p=0,g=0;p=s.x(),g=s.y();let u=[];if(p!=0||g!=0){if(s.get("textType")=="circular"){let y=s.radius()-s.get("paddingBottom",0),x=s.get("labelAngle",0);p=y*D(x),g=y*T(x)}let d=-h;s.getPrivate("left")&&(d=m),u=[{x:i.x()+l*n,y:i.y()+l*c},{x:p+d,y:g},{x:p,y:g}]}t.set("points",u)}}_positionBullet(e){let t=e.get("sprite");if(t){let i=t.dataItem.get("slice");if(i){let a=i.get("innerRadius",0),l=i.get("radius",0),r=i.get("startAngle",0),n=i.get("arc",0),c=e.get("locationX",.5),o=e.get("locationY",.5),m=r+n*c,h=a+(l-a)*o;t.setAll({x:D(m)*h,y:T(m)*h})}}}};U.className="PieSeries";U.classNames=L.classNames.concat([U.className]);var V=class extends q{constructor(){super(...arguments),this._projectionDirty=!1,this._tlx=0,this._tly=0,this._trx=0,this._try=0,this._blx=0,this._bly=0,this._brx=0,this._bry=0,this._cprx=0,this._cplx=0,this._cpry=0,this._cply=0}_afterNew(){super._afterNew(),this.set("draw",e=>{let t=this.width(),s=this.height(),i=Math.min(t,s)/2,a=w(this.get("cornerRadiusTL",0),i),l=w(this.get("cornerRadiusTR",0),i),r=w(this.get("cornerRadiusBR",0),i),n=w(this.get("cornerRadiusBL",0),i),c=this._trx,o=this._try,m=this._tlx,h=this._tly,p=this._brx,g=this._bry,u=this._blx,d=this._bly;o==h&&(o=o-.01),g==d&&(g=g-.01);let y=et({x:m,y:h},{x:c,y:o}),x=et({x:c,y:o},{x:p,y:g}),b=et({x:p,y:g},{x:u,y:d}),f=et({x:u,y:d},{x:m,y:h});this.get("orientation")=="horizontal"?(a=Math.min(a,Math.abs(h-o)/2),l=Math.min(l,Math.abs(h-o)/2),r=Math.min(r,Math.abs(d-g)/2),n=Math.min(n,Math.abs(d-g)/2)):(a=Math.min(a,Math.abs(m-c)/2),l=Math.min(l,Math.abs(m-c)/2),r=Math.min(r,Math.abs(u-p)/2),n=Math.min(n,Math.abs(u-p)/2));let $=m-a*v((y-f)/2)*D(f),N=h-a*v((y-f)/2)*T(f),F=m-a*v((f-y)/2)*D(y),Z=h-a*v((f-y)/2)*T(y),P=c-l*v((x-y)/2)*D(y),nt=o-l*v((x-y)/2)*T(y),B=c-l*v((y-x)/2)*D(x),O=o-l*v((y-x)/2)*T(x),J=p-r*v((b-x)/2)*D(x),j=g-r*v((b-x)/2)*T(x),Q=p-r*v((x-b)/2)*D(b),I=g-r*v((x-b)/2)*T(b),pt=u-n*v((f-b)/2)*D(b),it=d-n*v((f-b)/2)*T(b),ot=u-n*v((b-f)/2)*D(f),Dt=d-n*v((b-f)/2)*T(f);e.moveTo(F,Z),e.lineTo(P,nt),e.arcTo(c,o,B,O,l),e.quadraticCurveTo(this._cprx,this._cpry,J,j),e.arcTo(p,g,Q,I,r),e.lineTo(pt,it),e.arcTo(u,d,ot,Dt,n),e.quadraticCurveTo(this._cplx,this._cply,$,N),e.arcTo(m,h,F,Z,a)})}getPoint(e,t){let s=this.width(),i=this.height(),a=this.get("topWidth",0),l=this.get("bottomWidth",0);if(this.get("orientation")=="vertical"){let r=-a/2,n=a/2,c=l/2,o=-l/2,m=r+(o-r)*t,h=n+(c-n)*t;return{x:m+(h-m)*e,y:i*t}}else{let r=-a/2,n=a/2,c=l/2,o=-l/2,m=r+(o-r)*e,h=n+(c-n)*e;return{x:s*e,y:m+(h-m)*t}}}_changed(){if(this.isDirty("topWidth")||this.isDirty("bottomWidth")||this.isDirty("expandDistance")||this.isDirty("orientation")||this.isDirty("width")||this.isDirty("height")){let e=this.width(),t=this.height(),s=this.get("topWidth",0),i=this.get("bottomWidth",0);this._clear=!0;let a=this.get("expandDistance",0);this.get("orientation")=="vertical"?(this._tlx=-s/2,this._tly=0,this._trx=s/2,this._try=0,this._brx=i/2,this._bry=t,this._blx=-i/2,this._bly=t,this._cprx=this._trx+(this._brx-this._trx)/2+a*t,this._cpry=this._try+.5*t,this._cplx=this._tlx+(this._blx-this._tlx)/2-a*t,this._cply=this._tly+.5*t):(this._tly=s/2,this._tlx=0,this._try=-s/2,this._trx=0,this._bry=-i/2,this._brx=e,this._bly=i/2,this._blx=e,this._cpry=this._try+(this._bry-this._try)/2-a*e,this._cprx=this._trx+.5*e,this._cply=this._tly+(this._bly-this._tly)/2+a*e,this._cplx=this._tlx+.5*e)}super._changed()}};V.className="FunnelSlice";V.classNames=q.classNames.concat([V.className]);var H=class extends L{constructor(){super(...arguments),this._tag="funnel",this.links=this.addDisposer(this._makeLinks()),this._total=0,this._count=0,this._nextCoord=0,this._opposite=!1}_makeSlices(){return new M(W.new({}),()=>V._new(this._root,{themeTags:R(this.slices.template.get("themeTags",[]),[this._tag,"series","slice",this.get("orientation")])},[this.slices.template]))}_makeLabels(){return new M(W.new({}),()=>_t._new(this._root,{themeTags:R(this.labels.template.get("themeTags",[]),[this._tag,"series","label",this.get("orientation")])},[this.labels.template]))}_makeTicks(){return new M(W.new({}),()=>lt._new(this._root,{themeTags:R(this.ticks.template.get("themeTags",[]),[this._tag,"series","tick",this.get("orientation")])},[this.ticks.template]))}_makeLinks(){return new M(W.new({}),()=>V._new(this._root,{themeTags:R(this.links.template.get("themeTags",[]),[this._tag,"series","link",this.get("orientation")])},[this.links.template]))}makeLink(e){let t=this.slicesContainer.children.push(this.links.make());return t._setDataItem(e),e.set("link",t),this.links.push(t),t}_afterNew(){super._afterNew();let e=this.slicesContainer;e.setAll({isMeasured:!0,position:"relative",width:tt(100),height:tt(100)}),e.onPrivate("width",()=>{this.markDirtySize()}),e.onPrivate("height",()=>{this.markDirtySize()}),this.get("orientation")=="vertical"?this.set("layout",this._root.horizontalLayout):this.set("layout",this._root.verticalLayout)}processDataItem(e){super.processDataItem(e);let t=this.makeSlice(e);t._setDataItem(e),e.set("slice",t),this.makeLink(e);let s=this.makeLabel(e);s.on("x",()=>{this._updateTick(e)}),s.on("y",()=>{this._updateTick(e)}),this.makeTick(e),t.events.on("positionchanged",()=>{s.markDirty()}),t.events.on("boundschanged",()=>{let i=t.dataItem;i&&this._updateTick(i)})}_updateChildren(){this._opposite=!1,this.children.indexOf(this.labelsContainer)==0&&(this._opposite=!0);let e=0,t=0;if(k(this.dataItems,s=>{let i=s.get("value");Y(i)&&(t++,i>0?e+=Math.abs(s.get("valueWorking",i)/i):this.get("ignoreZeroValues",!1)||s.isHidden()?t--:e+=1)}),this._total=1/t*e,this._count=t,this.isDirty("alignLabels")&&this._fixLayout(),this._total>0&&(this._valuesDirty||this._sizeDirty)){let s=this.slicesContainer,i;this.get("orientation")=="vertical"?i=s.innerHeight():i=s.innerWidth(),this._nextCoord=this.get("startLocation",0)*i,this.markDirtyBounds();let a=0;k(this._dataItems,l=>{this.updateLegendValue(l),l.set("index",a),a++;let r=l.get("slice"),n=l.get("tick"),c=l.get("label"),o=l.get("link"),m=l.get("fill"),h=l.get("fillPattern");r._setDefault("fill",m),r._setDefault("stroke",m),r._setDefault("fillPattern",h),o._setDefault("fill",m),o._setDefault("stroke",m);let p=l.get("value");Y(p)&&(p==0&&this.get("ignoreZeroValues")?(r.setPrivate("visible",!1),n.setPrivate("visible",!1),c.setPrivate("visible",!1)):(r.setPrivate("visible",!0),n.setPrivate("visible",!0),c.setPrivate("visible",!0),this.decorateSlice(l),this.isLast(l)?o.setPrivate("visible",!1):l.isHidden()||o.setPrivate("visible",!0)))})}super._updateChildren()}_fixLayout(){let e=this.get("orientation"),t=this.labelsContainer,s=this.labels.template;this.get("alignLabels")?(t.set("position","relative"),t.setAll({isMeasured:!0}),e=="vertical"?(this.set("layout",this._root.horizontalLayout),s.setAll({centerX:A,x:A})):(this.set("layout",this._root.verticalLayout),s.setAll({centerX:0,x:0}))):(t.setAll({isMeasured:!1,position:"absolute"}),e=="vertical"?(t.setAll({x:_}),s.setAll({centerX:_,x:0})):(t.setAll({y:_}),s.setAll({centerX:_,y:0}))),this.markDirtySize()}getNextValue(e){let t=e.get("index"),s=e.get("valueWorking",0);if(t<this.dataItems.length-1){let i=this.dataItems[t+1];if(s=i.get("valueWorking",0),i.isHidden()||i.get("value")==0&&this.get("ignoreZeroValues"))return this.getNextValue(i)}return s}isLast(e){let t=e.get("index");if(t==this.dataItems.length-1)return!0;for(let s=t+1;s<this.dataItems.length;s++)if(!this.dataItems[s].isHidden())return!1;return!0}decorateSlice(e){let t=this.get("orientation"),s=e.get("slice"),i=e.get("label"),a=e.get("link"),l=this.slicesContainer,r=l.innerWidth(),n=l.innerHeight(),c=r;t=="horizontal"&&(c=n);let o=this.getNextValue(e),m=e.get("value",0),h=Math.abs(e.get("valueWorking",m)),p=this.get("bottomRatio",0),g=this.getPrivate("valueHigh",0),u=1;m!=0?u=h/Math.abs(m):e.isHidden()&&(u=1e-6),this._nextCoord==1/0&&(this._nextCoord=0);let d=h/g*c,y=(h-(h-o)*p)/g*c;s.setAll({topWidth:d,bottomWidth:y,orientation:t}),a.setAll({topWidth:y,bottomWidth:(h-(h-o))/g*c,orientation:t});let x=this.get("startLocation",0),b=this.get("endLocation",1);if(t=="vertical"){let f=a.height()*u;n=n*(b-x)+f,s.set("y",this._nextCoord);let $=Math.min(1e5,Math.max(0,n/this._count*u/this._total-f));s.setAll({height:$,x:r/2});let N=this._nextCoord+$/2;i.set("y",N),this._nextCoord+=$+f,a.setAll({y:this._nextCoord-f,x:r/2})}else{let f=a.width()*u;r=r*(b-x)+f,s.set("x",this._nextCoord);let $=Math.min(1e5,Math.max(0,r/this._count*u/this._total-f));s.setAll({width:$,y:n/2});let N=this._nextCoord+$/2;i.set("x",N),this._nextCoord+=$+f,a.setAll({x:this._nextCoord-f,y:n/2})}}hideDataItem(e,t){let s=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return z(this,void 0,void 0,function*(){return e.get("link").hide(t),s.hideDataItem.call(this,e,t)})}showDataItem(e,t){let s=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return z(this,void 0,void 0,function*(){return e.get("link").show(t),s.showDataItem.call(this,e,t)})}_updateTick(e){if(this.get("alignLabels")){let t=e.get("tick"),s=e.get("label"),i=e.get("slice");if(t&&i&&s){let a=this.labelsContainer,l=this.slicesContainer,r=t.get("location",.5),n=a.width(),c=a.height(),o=a.get("paddingLeft",0),m=a.get("paddingRight",0),h=a.get("paddingTop",0),p=a.get("paddingBottom",0),g={x:0,y:0},u={x:0,y:0},d={x:0,y:0};this._opposite&&(r=1-r),this.get("orientation")=="vertical"?(g=i.getPoint(r,.5),g.x+=i.x()+l.x(),g.y+=i.y()+l.y(),this._opposite?(u.x=n,u.y=s.y(),d.x=n-o,d.y=u.y):(u.x=l.x()+l.width(),u.y=s.y(),d.x=u.x+n-s.width()-m,d.y=u.y)):(g=i.getPoint(.5,r),g.x+=i.x()+l.x(),g.y+=i.y()+l.y(),this._opposite?(u.y=c,u.x=s.x(),d.y=c-h,d.x=u.x):(u.y=l.y()+l.height(),u.x=s.x(),d.y=u.y+c-s.height()-p,d.x=u.x)),t.set("points",[g,u,d])}}}disposeDataItem(e){super.disposeDataItem(e);let t=e.get("link");t&&(this.links.removeValue(t),t.dispose())}_positionBullet(e){let t=e.get("sprite");if(t){let i=t.dataItem.get("slice");if(i){let a=i.width(),l=i.height(),r=e.get("locationX",.5),n=e.get("locationY",.5),c=0,o=0;this.get("orientation")=="horizontal"?o=l/2:c=a/2,t.setAll({x:i.x()+a*r-c,y:i.y()-o+l*n})}}}};H.className="FunnelSeries";H.classNames=L.classNames.concat([H.className]);var X=class extends H{constructor(){super(...arguments),this._tag="pyramid"}_prepareChildren(){super._prepareChildren(),this._nextSize=void 0}decorateSlice(e){let t=this.get("orientation"),s=this.slicesContainer,i=e.get("slice"),a=e.get("label"),l=e.get("link"),r=this.get("valueIs","area"),n=this.getPrivate("valueAbsoluteSum",0);if(n==0)return;let c=this.get("startLocation",0),o=this.get("endLocation",1),m=this.get("topWidth",0),h=this.get("bottomWidth",A),p=Math.abs(e.get("valueWorking",0)),g=e.get("value",0),u,d,y=s.innerHeight(),x=s.innerWidth(),b=l.width(),f=l.height();t=="horizontal"&&([x,y]=[y,x],[b,f]=[f,b]);let $=x/2,N=1;g!=0?N=p/Math.abs(g):e.isHidden()&&(N=1e-6),f*=N,y=y*(o-c)-f*(this._count*this._total-1);let F=w(m,x);Y(this._nextSize)||(this._nextSize=F);let Z=w(h,x),P=this._nextSize,nt=Math.atan2(y,F-Z),B=Math.tan(Math.PI/2-nt);if(B==0&&(B=1e-8),r=="area"){let it=(F+Z)/2*y*p/n,ot=Math.abs(P*P-2*it*B);u=(P-Math.sqrt(ot))/B,u>0?d=(2*it-u*P)/u:d=P}else u=y*p/n,d=P-u*B;let O=this._nextCoord+u/2,J=$,j=this._nextCoord,Q=$,I=j+u;t=="vertical"?(a.set("y",O),a.get("opacity")>0&&this._rLabels.push({label:a,y:O}),i.set("height",u)):(a.set("x",O),a.get("opacity")>0&&this._hLabels.push({label:a,y:O}),[J,j]=[j,J],[Q,I]=[I,Q],i.set("width",u)),i.setAll({orientation:t,bottomWidth:d,topWidth:P,x:J,y:j}),l.setAll({orientation:t,x:Q,y:I,topWidth:d,bottomWidth:d}),this._nextSize=d,this._nextCoord+=u+f}};X.className="PyramidSeries";X.classNames=H.classNames.concat([X.className]);var K=class extends X{constructor(){super(...arguments),this._tag="pictorial",this.seriesMask=q.new(this._root,{position:"absolute",x:_,y:_,centerX:_,centerY:_}),this.seriesGraphics=this.slicesContainer.children.push(q.new(this._root,{themeTags:["pictorial","background"],position:"absolute",x:_,y:_,centerX:_,centerY:_}))}_afterNew(){super._afterNew(),this.set("topWidth",A),this.set("bottomWidth",A),this.set("valueIs","height"),this.slicesContainer.set("mask",this.seriesMask)}_updateScale(){let e=this.slicesContainer,t=e.innerWidth(),s=e.innerHeight(),i=this.seriesMask,a=this.seriesGraphics,l=i.get("scale",1),r=i.localBounds(),n=r.right-r.left,c=r.bottom-r.top;this.get("orientation")=="horizontal"?l=t/n:l=s/c,l!=1/0&&!Number.isNaN(l)&&(i.set("scale",l),i.set("x",t/2),i.set("y",s/2),a.set("scale",l),a.set("x",t/2),a.set("y",s/2))}_prepareChildren(){if(super._prepareChildren(),this.isDirty("svgPath")){let e=this.get("svgPath");this.seriesMask.set("svgPath",e),this.seriesGraphics.set("svgPath",e)}this._updateScale()}};K.className="PictorialStackedSeries";K.classNames=X.classNames.concat([K.className]);var E=class extends C{_afterNew(){super._afterNew(),this.seriesContainer.setAll({isMeasured:!0,layout:this._root.horizontalLayout})}};E.className="SlicedChart";E.classNames=C.classNames.concat([E.className]);export{st as DefaultTheme,H as FunnelSeries,V as FunnelSlice,C as PercentChart,L as PercentSeries,K as PictorialStackedSeries,G as PieChart,U as PieSeries,X as PyramidSeries,E as SlicedChart};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{X as i}from"./
|
|
2
|
+
import{X as i}from"./6DVVJ6UQ.js";import"./H6RQVSYM.js";var t=class extends i{setupDefaultRules(){super.setupDefaultRules(),this.rule("Component").setAll({interpolationDuration:600}),this.rule("Hierarchy").set("animationDuration",600),this.rule("Scrollbar").set("animationDuration",600),this.rule("Tooltip").set("animationDuration",300),this.rule("MapChart").set("animationDuration",1e3),this.rule("MapChart").set("wheelDuration",300),this.rule("Entity").setAll({stateAnimationDuration:600}),this.rule("Sprite").states.create("default",{stateAnimationDuration:600}),this.rule("Tooltip",["axis"]).setAll({animationDuration:200}),this.rule("WordCloud").set("animationDuration",500),this.rule("Polygon").set("animationDuration",600),this.rule("ArcDiagram").set("animationDuration",600)}};var n=t;export{n as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{E as g,d as l,i as R,k as m,ka as f}from"./
|
|
2
|
+
import{E as g,d as l,i as R,k as m,ka as f}from"./462X4ZCG.js";import{a as o}from"./4XU4I5VY.js";import{g as u}from"./6DVVJ6UQ.js";var n=class extends g{constructor(){super(...arguments),this.ix=0,this.iy=0,this._generator=f()}_getTooltipPoint(){let s=this.get("tooltipX"),t=this.get("tooltipY"),r=0,a=0;u(s)&&(r=s),u(t)&&(a=t);let e=this.get("radius",0),i=this.get("innerRadius",0),d=this.get("dRadius",0),h=this.get("dInnerRadius",0);return e+=d,i+=h,i<0&&(i=e+i),s instanceof o&&(r=this.ix*(i+(e-i)*s.value)),t instanceof o&&(a=this.iy*(i+(e-i)*t.value)),this.get("arc")>=360&&i==0&&(r=0,a=0),{x:r,y:a}}_beforeChanged(){super._beforeChanged(),(this.isDirty("radius")||this.isDirty("arc")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("dRadius")||this.isDirty("dInnerRadius")||this.isDirty("cornerRadius")||this.isDirty("shiftRadius"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){let s=this.get("startAngle",0),t=this.get("arc",0),r=this._generator;t<0&&(s=s+t,t=t*-1),t>.1&&r.cornerRadius(this.get("cornerRadius",0)),r.context(this._display);let a=this.get("radius",0),e=this.get("innerRadius",0),i=this.get("dRadius",0),d=this.get("dInnerRadius",0);a+=i,e+=d,e<0&&(e=a+e),r({innerRadius:e,outerRadius:a,startAngle:(s+90)*l,endAngle:(s+t+90)*l});let h=s+t/2;this.ix=m(h),this.iy=R(h);let c=this.get("shiftRadius",0);this.setRaw("dx",this.ix*c),this.setRaw("dy",this.iy*c),this.markDirtyPosition()}}};n.className="Slice";n.classNames=g.classNames.concat([n.className]);export{n as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{A as Ea,B as Ja,C as Ka,D as La,E as Ma,F as Na,G as Oa,H as Pa,I as Qa,J as Sa,K as Ta,L as Ua,M as Va,N as Wa,O as Xa,P as Ya,a as R,b as T,c as U,d as V,e as W,f as X,g as Y,h as _,i as $,j as aa,k as ba,l as ca,m as fa,n as ga,o as ha,p as ia,q as ja,r as oa,s as pa,t as qa,u as ra,v as va,w as xa,x as ya,y as za,z as Aa}from"./
|
|
2
|
+
import{A as Ea,B as Ja,C as Ka,D as La,E as Ma,F as Na,G as Oa,H as Pa,I as Qa,J as Sa,K as Ta,L as Ua,M as Va,N as Wa,O as Xa,P as Ya,a as R,b as T,c as U,d as V,e as W,f as X,g as Y,h as _,i as $,j as aa,k as ba,l as ca,m as fa,n as ga,o as ha,p as ia,q as ja,r as oa,s as pa,t as qa,u as ra,v as va,w as xa,x as ya,y as za,z as Aa}from"./TQYGI7O4.js";import{a as Fa}from"./WA7IUOYU.js";import{a as da,b as ea,c as sa,d as Da}from"./GX45UPO4.js";import{A as B,B as C,C as D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R as S,U as ka,V as la,W as ma,X as na,c as r,fa as ta,ga as ua,ha as wa,ia as Ba,ja as Ca,pa as Ga,q as s,qa as Ha,ra as Ia,sa as Ra,t,u,v,w,x,y,z as A}from"./462X4ZCG.js";import{Q as o,R as p,S as q,b as n}from"./HXDS4O7D.js";import{a,b,c,d,e}from"./4XU4I5VY.js";import{E as g,L as h,N as i,O as j,P as k,Q as l,R as m,W as z,X as Z,l as f}from"./6DVVJ6UQ.js";import"./H6RQVSYM.js";export{j as ArrayDisposer,D as BlendMode,ca as Bullet,ea as Button,Ta as CSVParser,$ as CanvasLayer,_ as CanvasRenderer,Ga as Chart,ga as Circle,Ma as CirclePattern,q as Color,Ra as ColorSet,na as Component,fa as ConfirmButton,P as Container,m as CounterDisposer,ma as DataItem,Ua as DataProcessor,X as DateFormatter,i as Disposer,Y as DurationFormatter,sa as EditableLabel,ia as Ellipse,y as Entity,pa as Gradient,Ka as GrainPattern,E as Graphics,J as GridLayout,ra as HeatLegend,H as HorizontalLayout,R as InterfaceColors,Sa as JSONParser,la as JsonData,S as Label,G as Layout,va as Legend,wa as Line,Na as LinePattern,qa as LinearGradient,za as Link,ka as ListData,r as ListTemplate,ba as Modal,k as MultiDisposer,l as MutableValueDisposer,V as NumberFormatter,Wa as NumericStepper,ya as OrthogonalLine,Pa as PathPattern,B as Pattern,Qa as PatternSet,a as Percent,Aa as Picture,C as PicturePattern,T as PointedRectangle,ha as Polygon,Xa as ProgressPie,La as RadialGradient,Ca as RadialLabel,Ba as RadialText,F as Rectangle,Oa as RectanglePattern,aa as Root,da as RoundedRectangle,Da as Scrollbar,Ha as SerialChart,ua as Series,Fa as Slice,Ea as Slider,A as Sprite,Va as SpriteResizer,ja as Star,z as Template,Q as Text,K as TextFormatter,Z as Theme,Ia as Tick,W as Timezone,U as Tooltip,xa as Triangle,I as VerticalLayout,Ja as ZoomTools,oa as ZoomableContainer,v as addLicense,g as array,p as color,w as disposeAllRootElements,t as ease,N as getCustomDataValue,x as getRootById,M as getTagValue,O as getTagValueFromObject,s as math,Ya as net,h as object,c as p0,d as p100,e as p50,b as percent,L as populateString,n as ready,u as registry,ta as time,f as type,o as utils};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as R}from"./TAHZPDRF.js";import e from"./AC4VLUR7.js";import{a as L}from"./SWOFXLPC.js";import{a as x}from"./JD74LG7K.js";import d from"./UNGXK2Y7.js";import b from"./M3U7I4H6.js";import{f as F,h as B}from"./UC4ZZXFO.js";import"./JK33HXYG.js";import a from"./5J4YSRUG.js";import{d as O}from"./GFALET66.js";import{N as M,O as A,P as f,Q as S,R as _,U as T,a as k,b as c,x as $}from"./URMAKTOH.js";import"./H6RQVSYM.js";export default $arcgis.t(([N,{property:p,subclass:q},{watch:Z},H,j,D,P,V,,,,W])=>{var I=k`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}:host{width:300px;min-width:180px}.root{position:relative;padding:var(--arcgis-internal-padding);container-type:inline-size;width:100%}.content{display:flex;flex-direction:column;gap:var(--calcite-spacing-lg)}.content.error{visibility:hidden;height:0;overflow:hidden;pointer-events:none}.weather-type-selector{--button-gap: var(--calcite-spacing-sm);--button-size-min: 24px;--button-size-s-max: 32px;--button-size-m-max: 64px;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;min-block-size:var(--button-row-min-height, 0);margin-inline:auto;gap:var(--button-gap);>calcite-button{display:block;position:relative;flex-shrink:0;flex-grow:0;aspect-ratio:1 / 1;height:fit-content;--total-gap: calc((var(--weather-type-count) - 1) * var(--button-gap));--basis: clamp( var(--button-size-min), calc((100% - var(--total-gap)) / var(--weather-type-count)), var(--button-size-m-max) );flex-basis:round(down,var(--basis),1px)}}@container (max-width: 280px){.weather-type-selector{--button-gap: var(--calcite-spacing-xs)}}@container (max-width: 220px){.weather-type-selector{--button-gap: var(--calcite-spacing-xxs)}}.options{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);calcite-label{--calcite-label-margin-bottom: 0}&.hidden{display:none}}.warning-title{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}`,U=Object.defineProperty,G=Object.getOwnPropertyDescriptor,h=(o,e,i,t)=>{for(var r=t>1?void 0:t?G(e,i):e,a=o.length-1,n;a>=0;a--)(n=o[a])&&(r=(t?n(e,i,r):n(r))||r);return t&&r&&U(e,i,r),r},J={sunny:V,cloudy:H,rainy:D,snowy:P,foggy:j},g=Object.keys(J),l=class extends N{constructor(o){super(o),this._settingWeather=!1,this._weatherByType={sunny:new V,cloudy:new H,rainy:new D,snowy:new P,foggy:new j}}initialize(){this.addHandles([Z(()=>this.current,o=>{this._settingWeather||o==null||(this._weatherByType={...this._weatherByType,[o.type]:o})},{sync:!0,initial:!0})])}get state(){return this.view?.ready?this.error!=null?this.error==="not-visible"?"ready":"error":"ready":"disabled"}get disabled(){return this.state==="disabled"}get weatherByType(){return this._weatherByType}get error(){let o=this.view;return o?.ready?o.type!=="3d"?"unsupported-view":o.viewingMode==="local"?"local-scene":o.environment.atmosphereEnabled?o.environment.weatherAvailable?null:"not-visible":"no-atmosphere":null}get current(){return this._environment?.weather??this._weatherByType.sunny}set current(o){let e=this._environment;e&&(e.weather=o)}get _environment(){let o=this.view;return o?.type==="3d"?o.environment:null}setWeatherByType(o){let e=this._environment;e!=null&&(this._settingWeather=!0,e.weather=this._weatherByType[o],this._settingWeather=!1)}setSnowCoverEnabled(o){let e=this.current;"snowCover"in e&&(e.snowCover=o?"enabled":"disabled")}};h([p()],l.prototype,"view",2);h([p()],l.prototype,"state",1);h([p()],l.prototype,"disabled",1);h([p()],l.prototype,"weatherByType",1);h([p()],l.prototype,"error",1);h([p()],l.prototype,"current",1);h([p()],l.prototype,"_weatherByType",2);h([p()],l.prototype,"_environment",1);l=h([q("components.weather.WeatherViewModel")],l);function u({label:o,ariaLabel:e,value:i,disabled:t,onChange:r}){let a=n=>{let s=n.currentTarget.value;r?.(s??0)};return c`<calcite-label .scale=${"m"}><calcite-slider .disabled=${t} .ariaLabel=${e} .labelText=${o} .value=${i} min=0 max=1 step=0.01 .scale=${"m"} @calciteSliderChange=${a} @calciteSliderInput=${a}></calcite-slider></calcite-label>`}var K=W(l),Q={sunny:"brightness",cloudy:"partly-cloudy",rainy:"rain",snowy:"snow",foggy:"fog"},X=16,E=typeof navigator<"u"&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")&&!navigator.userAgent.includes("Chromium")&&!navigator.userAgent.includes("Android")&&!navigator.userAgent.includes("CriOS")&&!navigator.userAgent.includes("FxiOS")&&!navigator.userAgent.includes("Edg"),z=class extends A{constructor(){super(...arguments),this.viewModel=K(this),this.messages=L(),this.direction=F(),this._resizeAnimationFrame=void 0,this._weatherTypeSelector=void 0,this._resizeObserver=new ResizeObserver(e=>{for(let i of e)i.target instanceof HTMLElement&&this._updateButtonScale(i.target,i.contentRect.width)}),this._buttonScale="m",this._buttonRowMinHeight=void 0,this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.headingLevel=4,this.hideHeader=!1,this.icon="partly-cloudy",this.label=this.messages.componentLabel,this.state=this.viewModel.state,this.arcgisPropertyChange=B()("state"),this.arcgisReady=$()}static{this.properties={_buttonScale:16,_buttonRowMinHeight:16,view:0,autoDestroyDisabled:5,headingLevel:9,hideHeader:5,icon:1,label:1,messageOverrides:0,referenceElement:1,state:32}}static{this.styles=I}async destroy(){this._cleanupResizeObserver(),await this.manager.destroy()}_cleanupResizeObserver(){this._resizeObserver.disconnect(),this._weatherTypeSelector=void 0,this._buttonRowMinHeight=void 0,this._resizeAnimationFrame&&(cancelAnimationFrame(this._resizeAnimationFrame),this._resizeAnimationFrame=void 0)}_makeWeatherTypeSelectorRef(){return e=>{e!==this._weatherTypeSelector&&(this._weatherTypeSelector&&this._resizeObserver.unobserve(this._weatherTypeSelector),this._weatherTypeSelector=e,e&&(this._resizeObserver.observe(e),this._updateButtonScale(e,e.clientWidth)))}}_updateButtonScale(e,i){this._resizeAnimationFrame&&cancelAnimationFrame(this._resizeAnimationFrame),this._resizeAnimationFrame=requestAnimationFrame(()=>{let t=getComputedStyle(e),r=Number.parseFloat(t.getPropertyValue("--button-gap")),a=Number.parseFloat(t.getPropertyValue("--button-size-min")),n=Number.parseFloat(t.getPropertyValue("--button-size-s-max")),s=Number.parseFloat(t.getPropertyValue("--button-size-m-max")),m=(g.length-1)*r,v=Math.max(a,Math.min((i-m)/g.length,s)),b=Math.floor(v);if(E){let{_buttonRowMinHeight:d}=this,w=d===void 0?void 0:d*g.length+m,y=w!==void 0&&d!==void 0&&d>=b&&w<=i+X;this._buttonRowMinHeight=y?d:b}else this._buttonRowMinHeight=void 0;this._buttonScale=v<n?"s":v<s?"m":"l",this._resizeAnimationFrame=void 0})}_getWarningMessage(){if(this.viewModel.error==="not-visible"){let{view:e}=this.viewModel;return e?.type==="3d"&&e.environment.atmosphereEnabled?this.messages.error?.notVisible:void 0}else return}_getErrorMessage(){let e=this.messages.error;if(e)switch(this.viewModel.error){case"local-scene":return e.localScene;case"no-atmosphere":return e.noAtmosphere;case"unsupported-view":return e.unsupported;default:return}}render(){return c`<div aria-label=${this.messages.componentLabelAccessible??_} class=${f({root:!0,[x.widget]:!0,[x.widgetDisabled]:this.viewModel.disabled})} role=region>${this._renderContent()}</div>`}_renderContent(){let{headingLevel:e,messages:i,viewModel:t}=this,r=this._getWarningMessage(),a=t.current,n=t.state==="error";return c`${this.hideHeader?void 0:R({level:e,children:i.componentLabel})}${n?c`<div>${this._getErrorMessage()}</div>`:void 0}<div class=${f(O({content:!0,error:n}))}><div .ariaLabel=${i.weatherType} class="weather-type-selector" role=radiogroup style=${S({"--weather-type-count":String(g.length),"--button-row-min-height":E?`${this._buttonRowMinHeight??0}px`:void 0})} ${M(this._makeWeatherTypeSelectorRef())}>${g.map(this._renderWeatherTypeButton,this)}</div>${Object.values(t.weatherByType).map(s=>c`<div class=${f({options:!0,hidden:s.type!==a?.type})}>${this._renderOptions(s)}</div>`)}${r?this._renderWarning(r):void 0}</div>`}_renderWeatherTypeButton(e){let i=this.messages[e]?.label??"",{disabled:t}=this.viewModel,r=!t&&this.viewModel.current.type===e;return c`<calcite-button role=radio .label=${i} .name=${i} .appearance=${r?"solid":"outline"} .ariaChecked=${r?"true":"false"} tabindex=${(r?void 0:-1)??_} .disabled=${t} .iconStart=${Q[e]} .kind=${r?"brand":"neutral"} width=full .scale=${this._buttonScale} @keydown=${a=>{let n=a.key,s=["ArrowRight","ArrowDown"],m=["ArrowLeft","ArrowUp"];if(this.direction==="rtl"){let d=s;s=m,m=d}let v=s.includes(n),b=m.includes(n);if(v||b){a.preventDefault();let d=g.indexOf(e),w=g.length,y=(d+(b?-1:1)+w)%w;this.viewModel.setWeatherByType(g[y]);let C=a.currentTarget.parentElement?.parentElement;C&&Array.from(C.querySelectorAll("calcite-button")??[])[y]?.setFocus()}}} @click=${a=>{if(r)return;this.viewModel.setWeatherByType(e);let n=a.currentTarget;requestAnimationFrame(()=>{this.viewModel.current.type===e&&n.setFocus()})}} title=${i??_}></calcite-button>`}_renderOptions(e){switch(e.type){case"sunny":return this._renderSunnyOptions(e);case"cloudy":return this._renderCloudyOptions(e);case"rainy":return this._renderRainyOptions(e);case"snowy":return this._renderSnowyOptions(e);case"foggy":return this._renderFoggyOptions(e)}}_renderSunnyOptions(e){let i=this.messages.sunny;return u({disabled:this.viewModel.disabled,ariaLabel:i?.cloudCoverAria,label:i?.cloudCover,value:e.cloudCover,onChange:t=>{e.cloudCover=t}})}_renderCloudyOptions(e){let i=this.messages.cloudy;return u({disabled:this.viewModel.disabled,ariaLabel:i?.cloudCoverAria,label:i?.cloudCover,value:e.cloudCover,onChange:t=>{e.cloudCover=t}})}_renderRainyOptions(e){let{disabled:i}=this.viewModel,t=this.messages.rainy;return c`${u({disabled:i,ariaLabel:t?.cloudCoverAria,label:t?.cloudCover,value:e.cloudCover,onChange:r=>{e.cloudCover=r}})}${u({disabled:i,ariaLabel:t?.precipitationAria,label:t?.precipitation,value:e.precipitation,onChange:r=>{e.precipitation=r}})}`}_renderSnowyOptions(e){let{disabled:i}=this.viewModel,t=this.messages.snowy;return c`${u({disabled:i,ariaLabel:t?.cloudCoverAria,label:t?.cloudCover,value:e.cloudCover,onChange:r=>{e.cloudCover=r}})}${u({disabled:i,ariaLabel:t?.precipitationAria,label:t?.precipitation,value:e.precipitation,onChange:r=>{e.precipitation=r}})}<calcite-label layout=inline title=${t?.snowCoverTooltip??_}><calcite-checkbox .checked=${e.snowCover==="enabled"} .disabled=${i} @calciteCheckboxChange=${r=>{this.viewModel.setSnowCoverEnabled(r.currentTarget.checked)}}></calcite-checkbox>${t?.snowCover}</calcite-label>`}_renderFoggyOptions(e){let i=this.messages.foggy;return u({disabled:this.viewModel.disabled,ariaLabel:i?.fogStrengthAria,label:i?.fogStrength,value:e.fogStrength,onChange:t=>{e.fogStrength=t}})}_renderWarning(e){return c`<calcite-notice aria-live=polite open icon=exclamation-mark-triangle-f kind=warning><div slot=title class="warning-title">${this.messages.warningTitle}</div><div slot=message>${e}</div></calcite-notice>`}};T("arcgis-weather",z);return z},"core/Accessor","core/accessorSupport/decorators","core/reactiveUtils","views/3d/environment/CloudyWeather","views/3d/environment/FoggyWeather","views/3d/environment/RainyWeather","views/3d/environment/SnowyWeather","views/3d/environment/SunnyWeather",a,b,d,e)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"componentLabel":"Templates","templates":"Templates","recent":"Recents","favorites":"Favorites","updating":"Updating","point":"Point","multipoint":"Multipoint","polyline":"Polyline","polygon":"Polygon","extent":"Extent","mesh":"Mesh","noneSpecified":"Table","removeFavorite":"Remove","removeRecent":"Remove","addFavorite":"Add favorite","noFavorites":"There are no favorites. Add a favorite to quickly find templates you use regularly.","noTemplates":"There are no templates.","noRecent":"You have not used any templates recently.","noMatchingTemplates":"No templates match the search text."}
|
|
1
|
+
{"componentLabel":"Templates","templates":"Templates","recent":"Recents","favorites":"Favorites","updating":"Updating","point":"Point","multipoint":"Multipoint","polyline":"Polyline","polygon":"Polygon","extent":"Extent","mesh":"Mesh","filterPlaceholder":"Filter types","noneSpecified":"Table","removeFavorite":"Remove","removeRecent":"Remove","addFavorite":"Add favorite","noFavorites":"There are no favorites. Add a favorite to quickly find templates you use regularly.","noTemplates":"There are no templates.","noRecent":"You have not used any templates recently.","noMatchingTemplates":"No templates match the search text."}
|