@ni/nimble-components 20.18.0 → 21.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/dist/all-components-bundle.js +484 -240
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +508 -482
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/label-provider/table/index.d.ts +3 -3
  6. package/dist/esm/label-provider/table/index.js +4 -4
  7. package/dist/esm/label-provider/table/index.js.map +1 -1
  8. package/dist/esm/label-provider/table/label-token-defaults.js +1 -1
  9. package/dist/esm/label-provider/table/label-token-defaults.js.map +1 -1
  10. package/dist/esm/label-provider/table/label-tokens.d.ts +1 -1
  11. package/dist/esm/label-provider/table/label-tokens.js +3 -3
  12. package/dist/esm/label-provider/table/label-tokens.js.map +1 -1
  13. package/dist/esm/table/components/group-row/index.d.ts +1 -1
  14. package/dist/esm/table/components/group-row/index.js +1 -1
  15. package/dist/esm/table/components/group-row/index.js.map +1 -1
  16. package/dist/esm/table/components/group-row/template.js +1 -1
  17. package/dist/esm/table/components/group-row/template.js.map +1 -1
  18. package/dist/esm/table/components/row/index.d.ts +1 -0
  19. package/dist/esm/table/components/row/index.js +6 -0
  20. package/dist/esm/table/components/row/index.js.map +1 -1
  21. package/dist/esm/table/components/row/template.js +1 -1
  22. package/dist/esm/table/components/row/template.js.map +1 -1
  23. package/dist/esm/table/index.d.ts +14 -4
  24. package/dist/esm/table/index.js +105 -77
  25. package/dist/esm/table/index.js.map +1 -1
  26. package/dist/esm/table/models/array-to-tree.d.ts +17 -0
  27. package/dist/esm/table/models/array-to-tree.js +83 -0
  28. package/dist/esm/table/models/array-to-tree.js.map +1 -0
  29. package/dist/esm/table/models/data-hierarchy-manager.d.ts +15 -0
  30. package/dist/esm/table/models/data-hierarchy-manager.js +64 -0
  31. package/dist/esm/table/models/data-hierarchy-manager.js.map +1 -0
  32. package/dist/esm/table/models/expansion-manager.d.ts +25 -0
  33. package/dist/esm/table/models/expansion-manager.js +73 -0
  34. package/dist/esm/table/models/expansion-manager.js.map +1 -0
  35. package/dist/esm/table/models/interactive-selection-manager.d.ts +1 -0
  36. package/dist/esm/table/models/interactive-selection-manager.js +13 -0
  37. package/dist/esm/table/models/interactive-selection-manager.js.map +1 -1
  38. package/dist/esm/table/models/selection-managers/selection-manager-base.js +6 -4
  39. package/dist/esm/table/models/selection-managers/selection-manager-base.js.map +1 -1
  40. package/dist/esm/table/models/table-update-tracker.d.ts +3 -1
  41. package/dist/esm/table/models/table-update-tracker.js +12 -1
  42. package/dist/esm/table/models/table-update-tracker.js.map +1 -1
  43. package/dist/esm/table/models/table-validator.d.ts +5 -3
  44. package/dist/esm/table/models/table-validator.js +14 -7
  45. package/dist/esm/table/models/table-validator.js.map +1 -1
  46. package/dist/esm/table/template.js +12 -8
  47. package/dist/esm/table/template.js.map +1 -1
  48. package/dist/esm/table/testing/table.pageobject.d.ts +4 -0
  49. package/dist/esm/table/testing/table.pageobject.js +24 -0
  50. package/dist/esm/table/testing/table.pageobject.js.map +1 -1
  51. package/dist/esm/table/types.d.ts +6 -3
  52. package/dist/esm/table/types.js.map +1 -1
  53. package/dist/esm/table-column/number-text/index.d.ts +1 -1
  54. package/dist/esm/unit/base/unit.d.ts +1 -1
  55. package/dist/esm/unit/byte/index.js +1 -1
  56. package/dist/esm/unit/byte/index.js.map +1 -1
  57. package/dist/esm/unit/volt/index.js +1 -1
  58. package/dist/esm/unit/volt/index.js.map +1 -1
  59. package/dist/esm/utilities/unit-format/decimal-unit-format.d.ts +2 -2
  60. package/dist/esm/utilities/unit-format/decimal-unit-format.js +1 -1
  61. package/dist/esm/utilities/unit-format/decimal-unit-format.js.map +1 -1
  62. package/dist/esm/utilities/unit-format/default-unit-format.d.ts +1 -1
  63. package/dist/esm/utilities/unit-format/default-unit-format.js +1 -1
  64. package/dist/esm/utilities/unit-format/default-unit-format.js.map +1 -1
  65. package/dist/esm/utilities/unit-format/{unit-scale/base → scaled-unit}/scaled-unit.d.ts +1 -1
  66. package/dist/esm/utilities/unit-format/scaled-unit/scaled-unit.js.map +1 -0
  67. package/dist/esm/utilities/unit-format/scaled-unit-format/intl-number-format-scaled-unit-format.d.ts +11 -0
  68. package/dist/esm/utilities/unit-format/{unit-scale/base → scaled-unit-format}/intl-number-format-scaled-unit-format.js +2 -2
  69. package/dist/esm/utilities/unit-format/scaled-unit-format/intl-number-format-scaled-unit-format.js.map +1 -0
  70. package/dist/esm/utilities/unit-format/scaled-unit-format/manually-translated-scaled-unit-format.d.ts +43 -0
  71. package/dist/esm/utilities/unit-format/{manually-translated-unit-scale/base → scaled-unit-format}/manually-translated-scaled-unit-format.js +27 -14
  72. package/dist/esm/utilities/unit-format/scaled-unit-format/manually-translated-scaled-unit-format.js.map +1 -0
  73. package/dist/esm/utilities/unit-format/{unit-scale/base → scaled-unit-format}/scaled-unit-format.d.ts +1 -1
  74. package/dist/esm/utilities/unit-format/{unit-scale/base → scaled-unit-format}/scaled-unit-format.js.map +1 -1
  75. package/dist/esm/utilities/unit-format/{base/unit-format.d.ts → unit-format.d.ts} +1 -1
  76. package/dist/esm/utilities/unit-format/unit-format.js.map +1 -0
  77. package/dist/esm/utilities/unit-format/unit-scale/byte-1024-unit-scale.d.ts +9 -0
  78. package/dist/esm/utilities/unit-format/unit-scale/byte-1024-unit-scale.js +31 -0
  79. package/dist/esm/utilities/unit-format/unit-scale/byte-1024-unit-scale.js.map +1 -0
  80. package/dist/esm/utilities/unit-format/unit-scale/byte-unit-scale.d.ts +1 -1
  81. package/dist/esm/utilities/unit-format/unit-scale/byte-unit-scale.js +16 -35
  82. package/dist/esm/utilities/unit-format/unit-scale/byte-unit-scale.js.map +1 -1
  83. package/dist/esm/utilities/unit-format/unit-scale/passthrough-unit-scale.d.ts +1 -1
  84. package/dist/esm/utilities/unit-format/unit-scale/passthrough-unit-scale.js +4 -4
  85. package/dist/esm/utilities/unit-format/unit-scale/passthrough-unit-scale.js.map +1 -1
  86. package/dist/esm/utilities/unit-format/unit-scale/{base/unit-scale.d.ts → unit-scale.d.ts} +1 -1
  87. package/dist/esm/utilities/unit-format/unit-scale/unit-scale.js.map +1 -0
  88. package/dist/esm/utilities/unit-format/unit-scale/utilities/metrix-prefixes.d.ts +1 -0
  89. package/dist/esm/utilities/unit-format/unit-scale/utilities/metrix-prefixes.js +17 -0
  90. package/dist/esm/utilities/unit-format/unit-scale/utilities/metrix-prefixes.js.map +1 -0
  91. package/dist/esm/utilities/unit-format/unit-scale/volt-unit-scale.d.ts +9 -0
  92. package/dist/esm/utilities/unit-format/unit-scale/volt-unit-scale.js +24 -0
  93. package/dist/esm/utilities/unit-format/unit-scale/volt-unit-scale.js.map +1 -0
  94. package/package.json +1 -1
  95. package/dist/esm/utilities/unit-format/base/unit-format.js.map +0 -1
  96. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/base/manually-translated-scaled-unit-format.d.ts +0 -18
  97. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/base/manually-translated-scaled-unit-format.js.map +0 -1
  98. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/base/manually-translated-unit-scale.d.ts +0 -10
  99. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/base/manually-translated-unit-scale.js +0 -19
  100. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/base/manually-translated-unit-scale.js.map +0 -1
  101. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/base/unit-prefix.d.ts +0 -10
  102. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/base/unit-prefix.js +0 -17
  103. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/base/unit-prefix.js.map +0 -1
  104. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/base/unit-prefixes-metric.d.ts +0 -5
  105. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/base/unit-prefixes-metric.js +0 -21
  106. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/base/unit-prefixes-metric.js.map +0 -1
  107. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/base/unit-translation.d.ts +0 -9
  108. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/base/unit-translation.js +0 -11
  109. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/base/unit-translation.js.map +0 -1
  110. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/byte-1024-unit-scale.d.ts +0 -9
  111. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/byte-1024-unit-scale.js +0 -26
  112. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/byte-1024-unit-scale.js.map +0 -1
  113. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/volt-unit-scale.d.ts +0 -9
  114. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/volt-unit-scale.js +0 -19
  115. package/dist/esm/utilities/unit-format/manually-translated-unit-scale/volt-unit-scale.js.map +0 -1
  116. package/dist/esm/utilities/unit-format/unit-scale/base/intl-number-format-scaled-unit-format.d.ts +0 -11
  117. package/dist/esm/utilities/unit-format/unit-scale/base/intl-number-format-scaled-unit-format.js.map +0 -1
  118. package/dist/esm/utilities/unit-format/unit-scale/base/scaled-unit.js.map +0 -1
  119. package/dist/esm/utilities/unit-format/unit-scale/base/unit-scale.js.map +0 -1
  120. /package/dist/esm/utilities/unit-format/{unit-scale/base → scaled-unit}/scaled-unit.js +0 -0
  121. /package/dist/esm/utilities/unit-format/{unit-scale/base → scaled-unit-format}/scaled-unit-format.js +0 -0
  122. /package/dist/esm/utilities/unit-format/{base/unit-format.js → unit-format.js} +0 -0
  123. /package/dist/esm/utilities/unit-format/unit-scale/{base/unit-scale.js → unit-scale.js} +0 -0
@@ -3911,8 +3911,8 @@ null==n?t.deleteValueFor(this.themeProvider):t.setValueFor(this.themeProvider,n)
3911
3911
  class wg extends vg{constructor(){super(...arguments),this.supportedLabels=bg}}e([se({attribute:"popup-dismiss"})],wg.prototype,"popupDismiss",void 0),e([se({attribute:"numeric-decrement"})],wg.prototype,"numericDecrement",void 0),e([se({attribute:"numeric-increment"})],wg.prototype,"numericIncrement",void 0),e([se({attribute:"error-icon"})],wg.prototype,"errorIcon",void 0),e([se({attribute:"warning-icon"})],wg.prototype,"warningIcon",void 0),e([se({attribute:"information-icon"})],wg.prototype,"informationIcon",void 0)
3912
3912
  const yg=wg.compose({baseName:"label-provider-core"})
3913
3913
  bi.getOrCreate().withPrefix("nimble").register(yg())
3914
- const xg="Collapse group",kg="Expand group",Cg="Collapse row",Sg="Expand row",$g="Collapse all groups",Mg="Options",_g="Grouped",Eg="Sorted ascending",Ig="Sorted descending",Ag="Select all rows",Og="Select all rows in group",Tg="Select row",Rg="Row operations",Dg=ui.create({name:"table-group-collapse-label",cssCustomPropertyName:null}).withDefault(xg),Ng=ui.create({name:"table-group-expand-label",cssCustomPropertyName:null}).withDefault(kg),Pg=ui.create({name:"table-row-collapse-label",cssCustomPropertyName:null}).withDefault(Cg),zg=ui.create({name:"table-row-expand-label",cssCustomPropertyName:null}).withDefault(Sg),Lg=ui.create({name:"table-groups-collapse-all-label",cssCustomPropertyName:null}).withDefault($g),Fg=ui.create({name:"table-cell-action-menu-label",cssCustomPropertyName:null}).withDefault(Mg),Vg=ui.create({name:"table-column-header-grouped-label",cssCustomPropertyName:null}).withDefault(_g),Hg=ui.create({name:"table-column-header-sorted-ascending-label",cssCustomPropertyName:null}).withDefault(Eg),Bg=ui.create({name:"table-column-header-sorted-descending-label",cssCustomPropertyName:null}).withDefault(Ig),qg=ui.create({name:"table-select-all-label",cssCustomPropertyName:null}).withDefault(Ag),jg=ui.create({name:"table-group-select-all-label",cssCustomPropertyName:null}).withDefault(Og),Ug=ui.create({name:"table-row-select-label",cssCustomPropertyName:null}).withDefault(Tg),Wg=ui.create({name:"table-row-operation-column-label",cssCustomPropertyName:null}).withDefault(Rg),Zg={groupCollapse:Dg,groupExpand:Ng,rowCollapse:Pg,rowExpand:zg,groupsCollapseAll:Lg,cellActionMenu:Fg,columnHeaderGrouped:Vg,columnHeaderSortedAscending:Hg,columnHeaderSortedDescending:Bg,selectAll:qg,groupSelectAll:jg,rowSelect:Ug,rowOperationColumn:Wg}
3915
- class Gg extends vg{constructor(){super(...arguments),this.supportedLabels=Zg}}e([se({attribute:"group-collapse"})],Gg.prototype,"groupCollapse",void 0),e([se({attribute:"group-expand"})],Gg.prototype,"groupExpand",void 0),e([se({attribute:"row-collapse"})],Gg.prototype,"rowCollapse",void 0),e([se({attribute:"row-expand"})],Gg.prototype,"rowExpand",void 0),e([se({attribute:"groups-collapse-all"})],Gg.prototype,"groupsCollapseAll",void 0),e([se({attribute:"cell-action-menu"})],Gg.prototype,"cellActionMenu",void 0),e([se({attribute:"column-header-grouped"})],Gg.prototype,"columnHeaderGrouped",void 0),e([se({attribute:"column-header-sorted-ascending"})],Gg.prototype,"columnHeaderSortedAscending",void 0),e([se({attribute:"column-header-sorted-descending"})],Gg.prototype,"columnHeaderSortedDescending",void 0),e([se({attribute:"select-all"})],Gg.prototype,"selectAll",void 0),e([se({attribute:"group-select-all"})],Gg.prototype,"groupSelectAll",void 0),e([se({attribute:"row-select"})],Gg.prototype,"rowSelect",void 0),e([se({attribute:"row-operation-column"})],Gg.prototype,"rowOperationColumn",void 0)
3914
+ const xg="Collapse group",kg="Expand group",Cg="Collapse row",Sg="Expand row",$g="Collapse all",Mg="Options",_g="Grouped",Eg="Sorted ascending",Ig="Sorted descending",Ag="Select all rows",Og="Select all rows in group",Tg="Select row",Rg="Row operations",Dg=ui.create({name:"table-group-collapse-label",cssCustomPropertyName:null}).withDefault(xg),Ng=ui.create({name:"table-group-expand-label",cssCustomPropertyName:null}).withDefault(kg),Pg=ui.create({name:"table-row-collapse-label",cssCustomPropertyName:null}).withDefault(Cg),zg=ui.create({name:"table-row-expand-label",cssCustomPropertyName:null}).withDefault(Sg),Lg=ui.create({name:"table-collapse-all-label",cssCustomPropertyName:null}).withDefault($g),Fg=ui.create({name:"table-cell-action-menu-label",cssCustomPropertyName:null}).withDefault(Mg),Vg=ui.create({name:"table-column-header-grouped-label",cssCustomPropertyName:null}).withDefault(_g),Hg=ui.create({name:"table-column-header-sorted-ascending-label",cssCustomPropertyName:null}).withDefault(Eg),Bg=ui.create({name:"table-column-header-sorted-descending-label",cssCustomPropertyName:null}).withDefault(Ig),qg=ui.create({name:"table-select-all-label",cssCustomPropertyName:null}).withDefault(Ag),jg=ui.create({name:"table-group-select-all-label",cssCustomPropertyName:null}).withDefault(Og),Ug=ui.create({name:"table-row-select-label",cssCustomPropertyName:null}).withDefault(Tg),Wg=ui.create({name:"table-row-operation-column-label",cssCustomPropertyName:null}).withDefault(Rg),Zg={groupCollapse:Dg,groupExpand:Ng,rowCollapse:Pg,rowExpand:zg,collapseAll:Lg,cellActionMenu:Fg,columnHeaderGrouped:Vg,columnHeaderSortedAscending:Hg,columnHeaderSortedDescending:Bg,selectAll:qg,groupSelectAll:jg,rowSelect:Ug,rowOperationColumn:Wg}
3915
+ class Gg extends vg{constructor(){super(...arguments),this.supportedLabels=Zg}}e([se({attribute:"group-collapse"})],Gg.prototype,"groupCollapse",void 0),e([se({attribute:"group-expand"})],Gg.prototype,"groupExpand",void 0),e([se({attribute:"row-collapse"})],Gg.prototype,"rowCollapse",void 0),e([se({attribute:"row-expand"})],Gg.prototype,"rowExpand",void 0),e([se({attribute:"collapse-all"})],Gg.prototype,"collapseAll",void 0),e([se({attribute:"cell-action-menu"})],Gg.prototype,"cellActionMenu",void 0),e([se({attribute:"column-header-grouped"})],Gg.prototype,"columnHeaderGrouped",void 0),e([se({attribute:"column-header-sorted-ascending"})],Gg.prototype,"columnHeaderSortedAscending",void 0),e([se({attribute:"column-header-sorted-descending"})],Gg.prototype,"columnHeaderSortedDescending",void 0),e([se({attribute:"select-all"})],Gg.prototype,"selectAll",void 0),e([se({attribute:"group-select-all"})],Gg.prototype,"groupSelectAll",void 0),e([se({attribute:"row-select"})],Gg.prototype,"rowSelect",void 0),e([se({attribute:"row-operation-column"})],Gg.prototype,"rowOperationColumn",void 0)
3916
3916
  const Kg=Gg.compose({baseName:"label-provider-table"})
3917
3917
  bi.getOrCreate().withPrefix("nimble").register(Kg())
3918
3918
  const Jg=we`
@@ -9671,16 +9671,17 @@ try{t=document.createElement(e)}catch(e){}if(!(t instanceof VT))throw new Error(
9671
9671
  class BT{constructor(e){this.uniqueId=ma("table-column-slot"),this.validConfiguration=!0,this.sortOperation=PT,this.dataRecordFieldNames=[],this.groupingDisabled=!1,this.fractionalWidth=1,this.minPixelWidth=117,this.currentFractionalWidth=1,this.currentSortDirection=OT.none,this.cellRecordFieldNames=e.cellRecordFieldNames,this.cellViewTemplate=HT(e.cellViewTag),this.groupHeaderViewTemplate=FT(e.groupHeaderViewTag),this.delegatedEvents=e.delegatedEvents,this.sortOperation=e.sortOperation??PT}fractionalWidthChanged(){this.currentFractionalWidth=this.fractionalWidth}pixelWidthChanged(){this.currentPixelWidth=this.pixelWidth}}function qT(e,...t){for(const n of t)if(e===n)return!0
9672
9672
  return!1}e([g],BT.prototype,"columnConfig",void 0),e([g],BT.prototype,"validConfiguration",void 0),e([g],BT.prototype,"operandDataRecordFieldName",void 0),e([g],BT.prototype,"sortOperation",void 0),e([g],BT.prototype,"dataRecordFieldNames",void 0),e([g],BT.prototype,"groupingDisabled",void 0),e([g],BT.prototype,"groupIndex",void 0),e([g],BT.prototype,"pixelWidth",void 0),e([g],BT.prototype,"fractionalWidth",void 0),e([g],BT.prototype,"minPixelWidth",void 0),e([g],BT.prototype,"currentFractionalWidth",void 0),e([g],BT.prototype,"currentPixelWidth",void 0),e([g],BT.prototype,"currentSortIndex",void 0),e([g],BT.prototype,"currentSortDirection",void 0)
9673
9673
  class jT extends Lt{constructor(){super(...arguments),this.columnInternals=new BT(this.getColumnInternalsOptions()),this.columnHidden=!1,this.sortDirection=OT.none,this.sortingDisabled=!1,this.hasOverflow=!1}checkValidity(){return this.columnInternals.validConfiguration}get validity(){return{}}get headerTextContent(){return this.contentSlot.assignedNodes().map((e=>e.textContent?.trim())).join(" ")}connectedCallback(){super.connectedCallback(),this.setAttribute("slot",this.columnInternals.uniqueId)}sortDirectionChanged(){this.sortingDisabled||(this.columnInternals.currentSortDirection=this.sortDirection)}sortIndexChanged(){this.sortingDisabled||(this.columnInternals.currentSortIndex=this.sortIndex)}sortingDisabledChanged(){this.sortingDisabled?(this.columnInternals.currentSortDirection=OT.none,this.columnInternals.currentSortIndex=void 0):(this.columnInternals.currentSortDirection=this.sortDirection,this.columnInternals.currentSortIndex=this.sortIndex)}}e([se({attribute:"column-id"})],jT.prototype,"columnId",void 0),e([se({attribute:"action-menu-slot"})],jT.prototype,"actionMenuSlot",void 0),e([se({attribute:"action-menu-label"})],jT.prototype,"actionMenuLabel",void 0),e([se({attribute:"column-hidden",mode:"boolean"})],jT.prototype,"columnHidden",void 0),e([se({attribute:"sort-index",converter:oe})],jT.prototype,"sortIndex",void 0),e([se({attribute:"sort-direction"})],jT.prototype,"sortDirection",void 0),e([se({attribute:"sorting-disabled",mode:"boolean"})],jT.prototype,"sortingDisabled",void 0),e([g],jT.prototype,"hasOverflow",void 0)
9674
- class UT{constructor(){this.duplicateRecordId=!1,this.missingRecordId=!1,this.invalidRecordId=!1,this.duplicateColumnId=!1,this.missingColumnId=!1,this.duplicateSortIndex=!1,this.duplicateGroupIndex=!1,this.idFieldNameNotConfigured=!1,this.invalidColumnConfiguration=!1,this.recordIds=new Set}getValidity(){return{duplicateRecordId:this.duplicateRecordId,missingRecordId:this.missingRecordId,invalidRecordId:this.invalidRecordId,duplicateColumnId:this.duplicateColumnId,missingColumnId:this.missingColumnId,duplicateSortIndex:this.duplicateSortIndex,duplicateGroupIndex:this.duplicateGroupIndex,idFieldNameNotConfigured:this.idFieldNameNotConfigured,invalidColumnConfiguration:this.invalidColumnConfiguration}}isValid(){return Object.values(this.getValidity()).every((e=>!1===e))}areRecordIdsValid(){const e=this.getValidity()
9675
- return!e.duplicateRecordId&&!e.missingRecordId&&!e.invalidRecordId}validateSelectionMode(e,t){return this.idFieldNameNotConfigured=e!==TT.none&&"string"!=typeof t,!this.idFieldNameNotConfigured}validateRecordIds(e,t){if(this.duplicateRecordId=!1,this.missingRecordId=!1,this.invalidRecordId=!1,this.recordIds.clear(),"string"!=typeof t)return!0
9676
- for(const n of e){if(!Object.prototype.hasOwnProperty.call(n.clientRecord,t)){this.missingRecordId=!0
9677
- continue}const e=n.clientRecord[t]
9674
+ class UT{constructor(){this.duplicateRecordId=!1,this.missingRecordId=!1,this.invalidRecordId=!1,this.duplicateColumnId=!1,this.missingColumnId=!1,this.duplicateSortIndex=!1,this.duplicateGroupIndex=!1,this.idFieldNameNotConfigured=!1,this.invalidColumnConfiguration=!1,this.invalidParentIdConfiguration=!1,this.recordIds=new Set}getValidity(){return{duplicateRecordId:this.duplicateRecordId,missingRecordId:this.missingRecordId,invalidRecordId:this.invalidRecordId,duplicateColumnId:this.duplicateColumnId,missingColumnId:this.missingColumnId,duplicateSortIndex:this.duplicateSortIndex,duplicateGroupIndex:this.duplicateGroupIndex,idFieldNameNotConfigured:this.idFieldNameNotConfigured,invalidColumnConfiguration:this.invalidColumnConfiguration,invalidParentIdConfiguration:this.invalidParentIdConfiguration}}isValid(){return Object.values(this.getValidity()).every((e=>!1===e))}areRecordIdsValid(){const e=this.getValidity()
9675
+ return!e.duplicateRecordId&&!e.missingRecordId&&!e.invalidRecordId}validateIdFieldConfiguration(e,t,n){const i=e!==TT.none||"string"==typeof n
9676
+ return this.idFieldNameNotConfigured=!!i&&"string"!=typeof t,!this.idFieldNameNotConfigured}validateRecordIds(e,t){if(this.duplicateRecordId=!1,this.missingRecordId=!1,this.invalidRecordId=!1,this.recordIds.clear(),"string"!=typeof t)return!0
9677
+ for(const n of e){if(!Object.prototype.hasOwnProperty.call(n,t)){this.missingRecordId=!0
9678
+ continue}const e=n[t]
9678
9679
  "string"==typeof e?(this.recordIds.has(e)&&(this.duplicateRecordId=!0),this.recordIds.add(e)):this.invalidRecordId=!0}return!this.missingRecordId&&!this.invalidRecordId&&!this.duplicateRecordId}validateColumnIds(e){this.missingColumnId=!1,this.duplicateColumnId=!1
9679
9680
  const t=e.some((e=>e))
9680
9681
  if(!t)return!0
9681
9682
  const n=new Set
9682
9683
  for(const t of e)t?(n.has(t)&&(this.duplicateColumnId=!0),n.add(t)):this.missingColumnId=!0
9683
- return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e){return this.duplicateSortIndex=!this.validateIndicesAreUnique(e),!this.duplicateSortIndex}validateColumnGroupIndices(e){return this.duplicateGroupIndex=!this.validateIndicesAreUnique(e),!this.duplicateGroupIndex}validateColumnConfigurations(e){return this.invalidColumnConfiguration=e.some((e=>!e.columnInternals.validConfiguration)),!this.invalidColumnConfiguration}getPresentRecordIds(e){return e.filter((e=>this.recordIds.has(e)))}validateIndicesAreUnique(e){return new Set(e).size===e.length}}const WT=we`
9684
+ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e){return this.duplicateSortIndex=!this.validateIndicesAreUnique(e),!this.duplicateSortIndex}validateColumnGroupIndices(e){return this.duplicateGroupIndex=!this.validateIndicesAreUnique(e),!this.duplicateGroupIndex}validateColumnConfigurations(e){return this.invalidColumnConfiguration=e.some((e=>!e.columnInternals.validConfiguration)),!this.invalidColumnConfiguration}getPresentRecordIds(e){return e.filter((e=>this.recordIds.has(e)))}setParentIdConfigurationValidity(e){this.invalidParentIdConfiguration=!e}validateIndicesAreUnique(e){return new Set(e).size===e.length}}const WT=we`
9684
9685
  ${Oo("flex")}
9685
9686
 
9686
9687
  :host {
@@ -10119,7 +10120,7 @@ const oR="nimble-table-cell",rR=Z`
10119
10120
  `)}
10120
10121
  </span>
10121
10122
  `)}
10122
- <span class="row-front-spacer ${e=>e.isParentRow&&0===e.nestingLevel?"top-level-parent":""}"></span>
10123
+ <span class="row-front-spacer ${e=>e.isTopLevelParentRow?"top-level-parent":""}"></span>
10123
10124
  ${Fe((e=>e.isParentRow),Z`
10124
10125
  <${Rh}
10125
10126
  appearance="${Yd}"
@@ -10165,7 +10166,7 @@ const oR="nimble-table-cell",rR=Z`
10165
10166
  </span>
10166
10167
  </template>
10167
10168
  `
10168
- class sR extends Lt{constructor(){super(...arguments),this.selectable=!1,this.selected=!1,this.hideSelection=!1,this.expanded=!1,this.columnNotifiers=[],this.columns=[],this.nestingLevel=0,this.isParentRow=!1,this.menuOpen=!1,this.rowOperationGridCellHidden=!1,this.cellIndentLevels=[],this.cellStates=[],this.animationClass="",this.ignoreSelectionChangeEvents=!1,this.removeAnimatingClass=()=>{this.animationClass="",this.expandIcon?.removeEventListener("transitionend",this.removeAnimatingClass)}}get ariaSelected(){return this.selectable?this.selected?"true":"false":null}onSelectionChange(e){if(this.ignoreSelectionChangeEvents)return
10169
+ class sR extends Lt{constructor(){super(...arguments),this.selectable=!1,this.selected=!1,this.hideSelection=!1,this.expanded=!1,this.columnNotifiers=[],this.columns=[],this.nestingLevel=0,this.isParentRow=!1,this.menuOpen=!1,this.rowOperationGridCellHidden=!1,this.cellIndentLevels=[],this.cellStates=[],this.animationClass="",this.ignoreSelectionChangeEvents=!1,this.removeAnimatingClass=()=>{this.animationClass="",this.expandIcon?.removeEventListener("transitionend",this.removeAnimatingClass)}}get isTopLevelParentRow(){return this.isParentRow&&0===this.nestingLevel}get ariaSelected(){return this.selectable?this.selected?"true":"false":null}onSelectionChange(e){if(this.ignoreSelectionChangeEvents)return
10169
10170
  const t=e.target.checked
10170
10171
  this.selected=t
10171
10172
  const n={oldState:!t,newState:t}
@@ -10176,7 +10177,7 @@ this.$emit(e,i)}columnsChanged(){this.updateCellIndentLevels(),this.updateCellSt
10176
10177
  return t.subscribe(this),t}))}updateCellStates(){this.cellStates=this.columns.map((e=>{const t=e.columnInternals.dataRecordFieldNames
10177
10178
  let n
10178
10179
  if(this.hasValidFieldNames(t)&&this.dataRecord){const i=t.map((e=>this.dataRecord[e]))
10179
- n={cellRecord:Object.fromEntries(e.columnInternals.cellRecordFieldNames.map(((e,t)=>[e,i[t]]))),columnConfig:e.columnInternals.columnConfig}}return n}))}hasValidFieldNames(e){return e.every((e=>void 0!==e))}selectedChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selected,this.ignoreSelectionChangeEvents=!1)}}e([se({attribute:"record-id"})],sR.prototype,"recordId",void 0),e([se({mode:"boolean"})],sR.prototype,"selectable",void 0),e([se({mode:"boolean"})],sR.prototype,"selected",void 0),e([se({attribute:"hide-selection",mode:"boolean"})],sR.prototype,"hideSelection",void 0),e([se({mode:"boolean"})],sR.prototype,"expanded",void 0),e([g],sR.prototype,"dataRecord",void 0),e([g],sR.prototype,"columns",void 0),e([g],sR.prototype,"currentActionMenuColumn",void 0),e([g],sR.prototype,"nestingLevel",void 0),e([se({attribute:"is-parent-row",mode:"boolean"})],sR.prototype,"isParentRow",void 0),e([se({attribute:"menu-open",mode:"boolean"})],sR.prototype,"menuOpen",void 0),e([se({attribute:"row-operation-grid-cell-hidden",mode:"boolean"})],sR.prototype,"rowOperationGridCellHidden",void 0),e([g],sR.prototype,"cellIndentLevels",void 0),e([g],sR.prototype,"cellStates",void 0),e([g],sR.prototype,"selectionCheckbox",void 0),e([g],sR.prototype,"animationClass",void 0),e([v],sR.prototype,"ariaSelected",null)
10180
+ n={cellRecord:Object.fromEntries(e.columnInternals.cellRecordFieldNames.map(((e,t)=>[e,i[t]]))),columnConfig:e.columnInternals.columnConfig}}return n}))}hasValidFieldNames(e){return e.every((e=>void 0!==e))}selectedChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selected,this.ignoreSelectionChangeEvents=!1)}}e([se({attribute:"record-id"})],sR.prototype,"recordId",void 0),e([se({mode:"boolean"})],sR.prototype,"selectable",void 0),e([se({mode:"boolean"})],sR.prototype,"selected",void 0),e([se({attribute:"hide-selection",mode:"boolean"})],sR.prototype,"hideSelection",void 0),e([se({mode:"boolean"})],sR.prototype,"expanded",void 0),e([g],sR.prototype,"dataRecord",void 0),e([g],sR.prototype,"columns",void 0),e([g],sR.prototype,"currentActionMenuColumn",void 0),e([g],sR.prototype,"nestingLevel",void 0),e([se({attribute:"is-parent-row",mode:"boolean"})],sR.prototype,"isParentRow",void 0),e([se({attribute:"menu-open",mode:"boolean"})],sR.prototype,"menuOpen",void 0),e([se({attribute:"row-operation-grid-cell-hidden",mode:"boolean"})],sR.prototype,"rowOperationGridCellHidden",void 0),e([g],sR.prototype,"cellIndentLevels",void 0),e([g],sR.prototype,"cellStates",void 0),e([g],sR.prototype,"selectionCheckbox",void 0),e([g],sR.prototype,"animationClass",void 0),e([v],sR.prototype,"isTopLevelParentRow",null),e([v],sR.prototype,"ariaSelected",null)
10180
10181
  const aR=sR.compose({baseName:"table-row",template:rR,styles:QT})
10181
10182
  bi.getOrCreate().withPrefix("nimble").register(aR())
10182
10183
  const lR="nimble-table-row",cR=we`
@@ -10300,7 +10301,7 @@ const lR="nimble-table-row",cR=we`
10300
10301
 
10301
10302
  <div class="group-row-header-content">
10302
10303
  ${e=>e.groupColumn?.columnInternals.groupHeaderViewTemplate}
10303
- <span class="group-row-child-count">(${e=>e.leafItemCount})</span>
10304
+ <span class="group-row-child-count">(${e=>e.immediateChildCount})</span>
10304
10305
  </div>
10305
10306
  </template>
10306
10307
  `
@@ -10308,12 +10309,12 @@ class hR extends Lt{constructor(){super(...arguments),this.nestingLevel=0,this.e
10308
10309
  const t=e.target.checked
10309
10310
  this.selectionState=t?DT:RT
10310
10311
  const n={oldState:!t,newState:t}
10311
- this.$emit("group-selection-toggle",n)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===DT,this.selectionCheckbox.indeterminate=this.selectionState===NT,this.ignoreSelectionChangeEvents=!1)}}e([g],hR.prototype,"groupRowValue",void 0),e([g],hR.prototype,"nestingLevel",void 0),e([g],hR.prototype,"leafItemCount",void 0),e([g],hR.prototype,"groupColumn",void 0),e([se({mode:"boolean"})],hR.prototype,"expanded",void 0),e([se({mode:"boolean"})],hR.prototype,"selectable",void 0),e([se({attribute:"selection-state"})],hR.prototype,"selectionState",void 0),e([g],hR.prototype,"selectionCheckbox",void 0),e([g],hR.prototype,"animationClass",void 0)
10312
+ this.$emit("group-selection-toggle",n)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===DT,this.selectionCheckbox.indeterminate=this.selectionState===NT,this.ignoreSelectionChangeEvents=!1)}}e([g],hR.prototype,"groupRowValue",void 0),e([g],hR.prototype,"nestingLevel",void 0),e([g],hR.prototype,"immediateChildCount",void 0),e([g],hR.prototype,"groupColumn",void 0),e([se({mode:"boolean"})],hR.prototype,"expanded",void 0),e([se({mode:"boolean"})],hR.prototype,"selectable",void 0),e([se({attribute:"selection-state"})],hR.prototype,"selectionState",void 0),e([g],hR.prototype,"selectionCheckbox",void 0),e([g],hR.prototype,"animationClass",void 0)
10312
10313
  const uR=hR.compose({baseName:"table-group-row",template:dR,styles:cR})
10313
10314
  bi.getOrCreate().withPrefix("nimble").register(uR())
10314
10315
  const pR="nimble-table-group-row",fR=Z`
10315
10316
  <template
10316
- role="grid"
10317
+ role="treegrid"
10317
10318
  aria-multiselectable="${e=>e.ariaMultiSelectable}"
10318
10319
  ${Xe({property:"childItems",filter:We()})}
10319
10320
  >
@@ -10354,7 +10355,7 @@ const pR="nimble-table-group-row",fR=Z`
10354
10355
  content-hidden
10355
10356
  appearance="${Yd}"
10356
10357
  title="${e=>Lg.getValueFor(e)}"
10357
- @click="${e=>e.handleCollapseAllGroupRows()}"
10358
+ @click="${e=>e.handleCollapseAllRows()}"
10358
10359
  >
10359
10360
  <${mg} slot="start"></${mg}>
10360
10361
  ${e=>Lg.getValueFor(e)}
@@ -10394,13 +10395,13 @@ const pR="nimble-table-group-row",fR=Z`
10394
10395
  role="rowgroup">
10395
10396
  ${Fe((e=>e.columns.length>0&&e.canRenderRows),Z`
10396
10397
  ${Ue((e=>e.virtualizer.visibleItems),Z`
10397
- ${Fe(((e,t)=>t.parent.tableData[e.index]?.isGrouped),Z`
10398
+ ${Fe(((e,t)=>t.parent.tableData[e.index]?.isGroupRow),Z`
10398
10399
  <${pR}
10399
10400
  class="group-row"
10400
10401
  :groupRowValue="${(e,t)=>t.parent.tableData[e.index]?.groupRowValue}"
10401
10402
  ?expanded="${(e,t)=>t.parent.tableData[e.index]?.isExpanded}"
10402
10403
  :nestingLevel="${(e,t)=>t.parent.tableData[e.index]?.nestingLevel}"
10403
- :leafItemCount="${(e,t)=>t.parent.tableData[e.index]?.leafItemCount}"
10404
+ :immediateChildCount="${(e,t)=>t.parent.tableData[e.index]?.immediateChildCount}"
10404
10405
  :groupColumn="${(e,t)=>t.parent.tableData[e.index]?.groupColumn}"
10405
10406
  ?selectable="${(e,t)=>t.parent.selectionMode===TT.multiple}"
10406
10407
  selection-state="${(e,t)=>t.parent.tableData[e.index]?.selectionState}"
@@ -10409,21 +10410,25 @@ const pR="nimble-table-group-row",fR=Z`
10409
10410
  >
10410
10411
  </${pR}>
10411
10412
  `)}
10412
- ${Fe(((e,t)=>!t.parent.tableData[e.index]?.isGrouped),Z`
10413
+ ${Fe(((e,t)=>!t.parent.tableData[e.index]?.isGroupRow),Z`
10413
10414
  <${lR}
10414
10415
  class="row"
10415
10416
  record-id="${(e,t)=>t.parent.tableData[e.index]?.id}"
10416
10417
  ?selectable="${(e,t)=>t.parent.selectionMode!==TT.none}"
10417
10418
  ?selected="${(e,t)=>t.parent.tableData[e.index]?.selectionState===DT}"
10419
+ ?expanded="${(e,t)=>t.parent.tableData[e.index]?.isExpanded}"
10418
10420
  ?hide-selection="${(e,t)=>t.parent.selectionMode!==TT.multiple}"
10419
10421
  :dataRecord="${(e,t)=>t.parent.tableData[e.index]?.record}"
10420
10422
  :columns="${(e,t)=>t.parent.columns}"
10423
+ :isParentRow="${(e,t)=>t.parent.tableData[e.index]?.isParentRow}"
10421
10424
  :nestingLevel="${(e,t)=>t.parent.tableData[e.index]?.nestingLevel}"
10422
10425
  ?row-operation-grid-cell-hidden="${(e,t)=>!t.parent.showRowOperationColumn}"
10423
10426
  @click="${(e,t)=>t.parent.onRowClick(e.index,t.event)}"
10424
10427
  @row-selection-toggle="${(e,t)=>t.parent.onRowSelectionToggle(e.index,t.event)}"
10425
10428
  @row-action-menu-beforetoggle="${(e,t)=>t.parent.onRowActionMenuBeforeToggle(e.index,t.event)}"
10426
10429
  @row-action-menu-toggle="${(e,t)=>t.parent.onRowActionMenuToggle(t.event)}"
10430
+ @row-expand-toggle="${(e,t)=>t.parent.handleRowExpanded(e.index)}"
10431
+ :dataIndex="${e=>e.index}"
10427
10432
  >
10428
10433
  ${Fe(((e,t)=>t.parent.openActionMenuRecordId===t.parent.tableData[e.index]?.id),Z`
10429
10434
  ${Ue(((e,t)=>t.parent.actionMenuSlots),Z`
@@ -10579,15 +10584,15 @@ let n=0
10579
10584
  for(let e=0;e<this.visibleColumns.length&&n<this.gridSizedColumns.length;e++){const i=this.visibleColumns[e]
10580
10585
  i===this.gridSizedColumns[n]&&(n+=1,i.columnInternals.currentFractionalWidth=i.columnInternals.currentPixelWidth/t,i.columnInternals.currentPixelWidth=void 0)}}getVisibleColumns(){return this.table.columns.filter((e=>!e.columnHidden))}getLeftColumnIndexFromDivider(e){return Math.floor(e/2)}}e([g],AR.prototype,"isColumnBeingSized",void 0),e([g],AR.prototype,"activeColumnIndex",void 0)
10581
10586
  class OR{constructor(e){this.trackedItems={},this.trackedItems=e.reduce(((e,t)=>({...e,[t]:!1})),this.trackedItems)}getTrackedItems(){return{...this.trackedItems}}isTracked(e){return this.trackedItems[e]}track(e){this.trackedItems[e]=!0}untrack(e){this.trackedItems[e]=!1}trackAll(){this.setAllKeys(!0)}untrackAll(){this.setAllKeys(!1)}allTracked(){return Object.values(this.trackedItems).every((e=>e))}anyTracked(){return Object.values(this.trackedItems).some((e=>e))}noneTracked(){return Object.values(this.trackedItems).every((e=>!e))}setAllKeys(e){this.trackedItems=Object.keys(this.trackedItems).reduce(((t,n)=>({...t,[n]:e})),this.trackedItems)}}class TR extends OR{}const RR=(e,...t)=>{for(const n of t)if(e===n)return!0
10582
- return!1},DR=["rowIds","groupRows","columnIds","columnSort","columnWidths","columnDefinition","actionMenuSlots","selectionMode"]
10583
- class NR extends TR{constructor(e){super(DR),this.table=e,this.updateQueued=!1}get updateRowIds(){return this.isTracked("rowIds")}get updateGroupRows(){return this.isTracked("groupRows")}get updateColumnIds(){return this.isTracked("columnIds")}get updateColumnSort(){return this.isTracked("columnSort")}get updateColumnWidths(){return this.isTracked("columnWidths")}get updateColumnDefinition(){return this.isTracked("columnDefinition")}get updateActionMenuSlots(){return this.isTracked("actionMenuSlots")}get updateSelectionMode(){return this.isTracked("selectionMode")}get requiresTanStackUpdate(){return this.isTracked("rowIds")||this.isTracked("columnSort")||this.isTracked("columnDefinition")||this.isTracked("groupRows")||this.isTracked("selectionMode")}get requiresTanStackDataReset(){return this.isTracked("rowIds")||this.isTracked("columnDefinition")}trackAllStateChanged(){this.trackAll(),this.queueUpdate()}get hasPendingUpdates(){return this.updateQueued}trackColumnPropertyChanged(e){RR(e,"columnId")?this.track("columnIds"):qT(e,"operandDataRecordFieldName","sortOperation")?this.track("columnDefinition"):RR(e,"sortingDisabled")||qT(e,"currentSortDirection","currentSortIndex")?this.track("columnSort"):RR(e,"columnHidden")||qT(e,"currentFractionalWidth","currentPixelWidth","minPixelWidth")?this.track("columnWidths"):RR(e,"actionMenuSlot")?this.track("actionMenuSlots"):qT(e,"groupIndex","groupingDisabled")&&this.track("groupRows"),this.queueUpdate()}trackColumnInstancesChanged(){this.track("columnIds"),this.track("columnDefinition"),this.track("columnSort"),this.track("columnWidths"),this.track("actionMenuSlots"),this.track("groupRows"),this.queueUpdate()}trackIdFieldNameChanged(){this.track("rowIds"),this.queueUpdate()}trackSelectionModeChanged(){this.track("selectionMode"),this.queueUpdate()}queueUpdate(){this.table.$fastController.isConnected&&(this.updateQueued||(this.updateQueued=!0,u.queueUpdate((()=>{this.table.update(),this.untrackAll(),this.updateQueued=!1}))))}}class PR{constructor(e){this.tanStackTable=e}reset(){}toggleIsRowSelected(e,t){e.isGrouped&&e.selectionState===DT?this.deselectAllLeafRows(e.id):this.tanStackTable.getRow(e.id).toggleSelected(t)}selectSingleRow(e){if(e.isGrouped)throw new Error("function not intended to select grouped rows")
10587
+ return!1},DR=["rowIds","rowParentIds","groupRows","columnIds","columnSort","columnWidths","columnDefinition","actionMenuSlots","selectionMode"]
10588
+ class NR extends TR{constructor(e){super(DR),this.table=e,this.updateQueued=!1}get updateRowIds(){return this.isTracked("rowIds")}get updateRowParentIds(){return this.isTracked("rowParentIds")}get updateGroupRows(){return this.isTracked("groupRows")}get updateColumnIds(){return this.isTracked("columnIds")}get updateColumnSort(){return this.isTracked("columnSort")}get updateColumnWidths(){return this.isTracked("columnWidths")}get updateColumnDefinition(){return this.isTracked("columnDefinition")}get updateActionMenuSlots(){return this.isTracked("actionMenuSlots")}get updateSelectionMode(){return this.isTracked("selectionMode")}get requiresTanStackUpdate(){return this.isTracked("rowIds")||this.isTracked("rowParentIds")||this.isTracked("columnSort")||this.isTracked("columnDefinition")||this.isTracked("groupRows")||this.isTracked("selectionMode")}get requiresTanStackDataReset(){return this.isTracked("rowIds")||this.isTracked("columnDefinition")||this.isTracked("rowParentIds")}trackAllStateChanged(){this.trackAll(),this.queueUpdate()}get hasPendingUpdates(){return this.updateQueued}trackColumnPropertyChanged(e){RR(e,"columnId")?this.track("columnIds"):qT(e,"operandDataRecordFieldName","sortOperation")?this.track("columnDefinition"):RR(e,"sortingDisabled")||qT(e,"currentSortDirection","currentSortIndex")?this.track("columnSort"):RR(e,"columnHidden")||qT(e,"currentFractionalWidth","currentPixelWidth","minPixelWidth")?this.track("columnWidths"):RR(e,"actionMenuSlot")?this.track("actionMenuSlots"):qT(e,"groupIndex","groupingDisabled")&&this.track("groupRows"),this.queueUpdate()}trackColumnInstancesChanged(){this.track("columnIds"),this.track("columnDefinition"),this.track("columnSort"),this.track("columnWidths"),this.track("actionMenuSlots"),this.track("groupRows"),this.queueUpdate()}trackIdFieldNameChanged(){this.track("rowIds"),this.queueUpdate()}trackParentIdFieldNameChanged(){this.track("rowParentIds"),this.queueUpdate()}trackSelectionModeChanged(){this.track("selectionMode"),this.queueUpdate()}queueUpdate(){this.table.$fastController.isConnected&&(this.updateQueued||(this.updateQueued=!0,u.queueUpdate((()=>{this.table.update(),this.untrackAll(),this.updateQueued=!1}))))}}class PR{constructor(e){this.tanStackTable=e}reset(){}toggleIsRowSelected(e,t){e.isGroupRow&&e.selectionState===DT?this.deselectAllLeafRows(e.id):this.tanStackTable.getRow(e.id).toggleSelected(t,{selectChildren:e.isGroupRow})}selectSingleRow(e){if(e.isGroupRow)throw new Error("function not intended to select grouped rows")
10584
10589
  const t=this.tanStackTable.getState().rowSelection,n=[]
10585
10590
  if(Object.entries(t).forEach((([e,t])=>{t&&n.push(e)})),1===n.length&&n[0]===e.id)return!1
10586
10591
  const i={}
10587
10592
  return i[e.id]=!0,this.tanStackTable.setRowSelection(i),!0}deselectAllLeafRows(e){const t=this.tanStackTable.getRow(e),n=this.getAllLeafRowIds(t.id),i=this.tanStackTable.getState().rowSelection
10588
10593
  for(const e of n)delete i[e]
10589
10594
  this.tanStackTable.setRowSelection(i)}getAllLeafRowIds(e){const t=this.tanStackTable.getRowModel().flatRows.find((t=>t.id===e))
10590
- return t?.getIsGrouped()?t.getLeafRows().filter((e=>0===e.getLeafRows().length)).map((e=>e.id)):[]}getAllOrderedRows(){const e=this.tanStackTable.getPreExpandedRowModel().rows
10595
+ return t?.getIsGrouped()?t.getLeafRows().filter((e=>!e.getIsGrouped())).map((e=>e.id)):[]}getAllOrderedRows(){const e=this.tanStackTable.getPreExpandedRowModel().rows
10591
10596
  return this.getOrderedRows(e)}getOrderedRows(e){const t=[]
10592
10597
  for(const n of e)t.push(n),n.subRows?.length&&t.push(...this.getOrderedRows(n.subRows))
10593
10598
  return t}}class zR extends PR{handleRowSelectionToggle(e,t,n){return!1}handleRowClick(e,t,n){return!1}handleActionMenuOpening(e){return!1}}class LR extends PR{handleRowSelectionToggle(e,t,n){return n&&this.tryUpdateRangeSelection(e.id)||(this.shiftSelectStartRowId=e.id,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(e,t)),!0}handleRowClick(e,t,n){return n?(this.shiftSelectStartRowId=e.id,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(e),!0):!(!t||!this.tryUpdateRangeSelection(e.id))||(this.shiftSelectStartRowId=e.id,this.previousShiftSelectRowEndId=void 0,this.selectSingleRow(e))}handleActionMenuOpening(e){return e.selectionState!==DT&&this.selectSingleRow(e)}reset(){this.shiftSelectStartRowId=void 0,this.previousShiftSelectRowEndId=void 0}tryUpdateRangeSelection(e){if(void 0===this.shiftSelectStartRowId)return!1
@@ -10600,12 +10605,28 @@ this.updateSelectionStateForRange(e,n,o,i,!0)}updateSelectionStateForRange(e,t,n
10600
10605
  const r=Math.min(t,n),s=Math.max(t,n)
10601
10606
  for(let t=r;t<=s;t++){const n=i[t]
10602
10607
  n.getIsGrouped()||this.updateSelectionStateForRow(e,n.id,o)}const a=i[n]
10603
- a.getIsGrouped()&&this.getAllLeafRowIds(a.id).forEach((t=>this.updateSelectionStateForRow(e,t,o)))}updateSelectionStateForRow(e,t,n){n?e[t]=!0:delete e[t]}getRowIndexForId(e,t){return e?t.findIndex((t=>t.id===e)):-1}}class FR extends PR{handleRowSelectionToggle(e,t,n){return this.toggleIsRowSelected(e,t),!0}handleRowClick(e,t,n){return this.selectSingleRow(e)}handleActionMenuOpening(e){return this.handleRowClick(e,!1,!1)}}class VR{constructor(e,t){this.tanStackTable=e,this.selectionManager=this.createSelectionManager(t)}handleRowSelectionToggle(e,t,n){return!!e&&this.selectionManager.handleRowSelectionToggle(e,t,n)}handleRowClick(e,t,n){return!!e&&this.selectionManager.handleRowClick(e,t,n)}handleActionMenuOpening(e){return!!e&&this.selectionManager.handleActionMenuOpening(e)}handleSelectionModeChanged(e){this.selectionManager=this.createSelectionManager(e)}handleSelectionReset(){this.selectionManager.reset()}createSelectionManager(e){switch(e){case TT.multiple:return new LR(this.tanStackTable)
10608
+ a.getIsGrouped()&&this.getAllLeafRowIds(a.id).forEach((t=>this.updateSelectionStateForRow(e,t,o)))}updateSelectionStateForRow(e,t,n){n?e[t]=!0:delete e[t]}getRowIndexForId(e,t){return e?t.findIndex((t=>t.id===e)):-1}}class FR extends PR{handleRowSelectionToggle(e,t,n){return this.toggleIsRowSelected(e,t),!0}handleRowClick(e,t,n){return this.selectSingleRow(e)}handleActionMenuOpening(e){return this.handleRowClick(e,!1,!1)}}class VR{constructor(e,t){this.tanStackTable=e,this.selectionManager=this.createSelectionManager(t)}handleRowSelectionToggle(e,t,n){return!!e&&this.selectionManager.handleRowSelectionToggle(e,t,n)}handleRowClick(e,t,n){return!!e&&this.selectionManager.handleRowClick(e,t,n)}handleActionMenuOpening(e){return!!e&&this.selectionManager.handleActionMenuOpening(e)}handleSelectionModeChanged(e){this.selectionManager=this.createSelectionManager(e)}handleSelectionReset(){this.selectionManager.reset()}getCurrentSelectedRecordIds(){const e=this.tanStackTable.options.state.rowSelection
10609
+ if(!e)return[]
10610
+ const t=[]
10611
+ return Object.entries(e).forEach((([e,n])=>{n&&t.push(e)})),t}createSelectionManager(e){switch(e){case TT.multiple:return new LR(this.tanStackTable)
10604
10612
  case TT.single:return new FR(this.tanStackTable)
10605
10613
  case TT.none:return new zR(this.tanStackTable)
10606
- default:throw new Error("unknown selection mode found")}}}class HR extends Lt{constructor(){super(),this.selectionMode=TT.none,this.tableData=[],this.columns=[],this.childItems=[],this.rowElements=[],this.actionMenuSlots=[],this.canRenderRows=!0,this.scrollX=0,this.selectionState=RT,this.showCollapseAll=!1,this.visibleColumns=[],this.tableScrollableMinWidth=0,this.documentShiftKeyDown=!1,this.tableValidator=new UT,this.tableUpdateTracker=new NR(this),this.columnNotifiers=[],this.isInitialized=!1,this.collapsedRows=new Set,this.ignoreSelectionChangeEvents=!1,this.onViewPortScroll=e=>{this.scrollX=e.target.scrollLeft},this.onKeyDown=e=>{e.key===ua&&(this.documentShiftKeyDown=!0)},this.onKeyUp=e=>{e.key===ua&&(this.documentShiftKeyDown=!1)},this.getIsRowExpanded=e=>{if(!e.getIsGrouped())return!1
10607
- const t=this.table.options.state.expanded
10608
- return!0===t||(Object.keys(t??{}).includes(e.id)?t[e.id]:!this.collapsedRows.has(e.id))},this.handleRowSelectionChange=e=>{const t=e instanceof Function?e(this.table.getState().rowSelection):e
10614
+ default:throw new Error("unknown selection mode found")}}}function HR(e,t){const n=t,i=[],o={},r=new Set
10615
+ for(let t=0;t<e.length;t++){const s=e[t],a=s[n.id],l=s[n.parentId]
10616
+ Object.prototype.hasOwnProperty.call(o,a)||(o[a]={subRows:[],clientRecord:void 0,originalIndex:void 0}),r&&r.delete(a),o[a].clientRecord=s
10617
+ const c=o[a]
10618
+ c.originalIndex=t,null==l?i.push(c):(Object.prototype.hasOwnProperty.call(o,l)||(o[l]={subRows:[],clientRecord:void 0,originalIndex:void 0},r&&r.add(l)),o[l].subRows.push(c))}if(r?.size){const e=Array.from(r.values()).join(",")
10619
+ throw new Error(`The items array contains orphans that point to the following parentIds: [${e}]. These parentIds do not exist in the items array.`)}if(BR(i)<Object.keys(o).length)throw new Error("The items array contains nodes with a circular parent/child relationship.")
10620
+ return i}function BR(e){return e.reduce(((e,t)=>e+1+(t.subRows&&BR(t.subRows))),0)}class qR{constructor(e,t,n){if(this.isDataFlat=!1,"string"==typeof t&&"string"==typeof n)try{this._hierarchicalData=HR(e,{id:t,parentId:n}),this.isDataFlat=!1,this._parentIdConfigurationValid=!0}catch{this.isDataFlat=!0,this._hierarchicalData=e.map(((e,t)=>({clientRecord:{...e},originalIndex:t}))),this._parentIdConfigurationValid=!1}else this.isDataFlat=!0,this._hierarchicalData=e.map(((e,t)=>({clientRecord:{...e},originalIndex:t}))),this._parentIdConfigurationValid=!0}get hierarchicalData(){return this._hierarchicalData}get parentIdConfigurationValid(){return this._parentIdConfigurationValid}getAllRecords(e=!1){const t=[]
10621
+ return this.getAllNodes(this._hierarchicalData,t),this.isDataFlat||!e?t.map((e=>e.clientRecord)):t.sort(((e,t)=>e.originalIndex-t.originalIndex)).map((e=>e.clientRecord))}getAllNodes(e,t){for(const n of e)t.push(n),n.subRows&&this.getAllNodes(n.subRows,t)}}class jR{constructor(e){this.tanStackTable=e,this.isInDefaultState=!0,this.collapsedRows=new Set}isRowExpanded(e){return!!this.isRowExpandable(e)&&(this.isInDefaultState||!this.collapsedRows.has(e.id))}toggleRowExpansion(e){if(!this.isRowExpandable(e))return
10622
+ const t=this.isRowExpanded(e)
10623
+ this.isInDefaultState=!1,t?this.collapsedRows.add(e.id):this.collapsedRows.delete(e.id),e.toggleExpanded()}collapseAll(){this.reset(),this.isInDefaultState=!1
10624
+ const e=this.tanStackTable.getRowModel().flatRows
10625
+ for(const t of e)this.isRowExpandable(t)&&this.collapsedRows.add(t.id)
10626
+ this.tanStackTable.toggleAllRowsExpanded(!1)}reset(){this.collapsedRows.clear(),this.isInDefaultState=!0}processDataUpdate(e){if(this.isInDefaultState)return
10627
+ const t=new Set
10628
+ for(const n of e){const e=n.id
10629
+ this.collapsedRows.has(e)&&t.add(e)}this.collapsedRows=t}isRowExpandable(e){return e.getIsGrouped()||e.subRows.length>0}}class UR extends Lt{constructor(){super(),this.selectionMode=TT.none,this.tableData=[],this.columns=[],this.childItems=[],this.rowElements=[],this.actionMenuSlots=[],this.canRenderRows=!0,this.scrollX=0,this.selectionState=RT,this.showCollapseAll=!1,this.visibleColumns=[],this.tableScrollableMinWidth=0,this.documentShiftKeyDown=!1,this.tableValidator=new UT,this.tableUpdateTracker=new NR(this),this.columnNotifiers=[],this.isInitialized=!1,this.ignoreSelectionChangeEvents=!1,this.onViewPortScroll=e=>{this.scrollX=e.target.scrollLeft},this.onKeyDown=e=>{e.key===ua&&(this.documentShiftKeyDown=!0)},this.onKeyUp=e=>{e.key===ua&&(this.documentShiftKeyDown=!1)},this.getIsRowExpanded=e=>this.expansionManager.isRowExpanded(e),this.handleRowSelectionChange=e=>{const t=e instanceof Function?e(this.table.getState().rowSelection):e
10609
10630
  this.updateTableOptions({state:{rowSelection:t}})},this.handleExpandedChange=e=>{const t=e instanceof Function?e(this.table.getState().expanded):e
10610
10631
  this.updateTableOptions({state:{expanded:t}})},this.options={data:[],onStateChange:e=>{},onRowSelectionChange:this.handleRowSelectionChange,onExpandedChange:this.handleExpandedChange,getCoreRowModel:e=>BO((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(t,o,r){void 0===o&&(o=0)
10611
10632
  const s=[]
@@ -10628,22 +10649,22 @@ return{rows:a(n.rows),flatRows:o,rowsById:n.rowsById}}),{key:!1,debug:()=>{var t
10628
10649
  return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getGroupedRowModel:AT(),getExpandedRowModel:e=>BO((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>!t.rows.length||!0!==e&&!Object.keys(null!=e?e:{}).length?t:n?function(e){const t=[],n=e=>{var i
10629
10650
  t.push(e),null!=(i=e.subRows)&&i.length&&e.getIsExpanded()&&e.subRows.forEach(n)}
10630
10651
  return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}(t):t),{key:!1,debug:()=>{var t
10631
- return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getIsRowExpanded:this.getIsRowExpanded,columns:[],state:{rowSelection:{},grouping:[],expanded:!0},enableRowSelection:e=>!e.getIsGrouped(),enableMultiRowSelection:!1,enableSubRowSelection:!1,enableSorting:!0,enableGrouping:!0,renderFallbackValue:null,autoResetAll:!1},this.table=ET(this.options),this.virtualizer=new MR(this,this.table),this.layoutManager=new AR(this),this.layoutManagerNotifier=m.getNotifier(this.layoutManager),this.layoutManagerNotifier.subscribe(this,"isColumnBeingSized"),this.selectionManager=new VR(this.table,this.selectionMode)}get validity(){return this.tableValidator.getValidity()}get showRowOperationColumn(){return this.selectionMode===TT.multiple||this.showCollapseAll}async setData(e){await this.processPendingUpdates()
10632
- const t=e.map((e=>({clientRecord:{...e}}))),n={data:t}
10633
- if(this.validateWithData(t),this.tableValidator.areRecordIdsValid()){const e=await this.getSelectedRecordIds()
10634
- n.state={rowSelection:this.calculateTanStackSelectionState(e)}}this.updateTableOptions(n)}async getSelectedRecordIds(){await this.processPendingUpdates()
10635
- const e=this.options.state.rowSelection
10636
- if(!e)return[]
10637
- const t=[]
10638
- return Object.entries(e).forEach((([e,n])=>{n&&t.push(e)})),t}async setSelectedRecordIds(e){await this.processPendingUpdates(),this.selectionMode!==TT.none&&this.updateTableOptions({state:{rowSelection:this.calculateTanStackSelectionState(e)}})}connectedCallback(){super.connectedCallback(),this.initialize(),this.virtualizer.connect(),this.viewport.addEventListener("scroll",this.onViewPortScroll,{passive:!0}),document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp)}disconnectedCallback(){super.disconnectedCallback(),this.virtualizer.disconnect(),this.viewport.removeEventListener("scroll",this.onViewPortScroll),document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp)}checkValidity(){return this.tableValidator.isValid()}handleChange(e,t){(e instanceof jT||e instanceof BT)&&"string"==typeof t?"validConfiguration"===t?this.tableValidator.validateColumnConfigurations(this.columns):this.tableUpdateTracker.trackColumnPropertyChanged(t):e instanceof AR&&"isColumnBeingSized"===t&&!this.layoutManager.isColumnBeingSized&&this.emitColumnConfigurationChangeEvent()}onRowSelectionToggle(e,t){t.stopImmediatePropagation()
10639
- this.selectionManager.handleRowSelectionToggle(this.tableData[e],t.detail.newState,this.documentShiftKeyDown)&&this.emitSelectionChangeEvent()}onRowClick(e,t){return this.selectionManager.handleRowClick(this.tableData[e],t.shiftKey,t.ctrlKey||t.metaKey)&&this.emitSelectionChangeEvent(),!0}onAllRowsSelectionChange(e){e.stopPropagation(),this.ignoreSelectionChangeEvents||(this.table.toggleAllRowsSelected(this.selectionCheckbox.checked),this.emitSelectionChangeEvent())}onRowActionMenuBeforeToggle(e,t){t.stopImmediatePropagation(),this.handleActionMenuBeforeToggleEvent(e,t)}onRowActionMenuToggle(e){e.stopImmediatePropagation(),this.handleRowActionMenuToggleEvent(e)}handleCollapseAllGroupRows(){this.collapsedRows.clear(),this.table.getRowModel().flatRows.filter((e=>e.getIsGrouped())).forEach((e=>this.collapsedRows.add(e.id))),this.table.toggleAllRowsExpanded(!1)}onRightDividerMouseDown(e,t){0===e.button&&this.layoutManager.beginColumnInteractiveSize(e.clientX,2*t)}onLeftDividerMouseDown(e,t){0===e.button&&this.layoutManager.beginColumnInteractiveSize(e.clientX,2*t-1)}handleGroupRowExpanded(e,t){this.toggleGroupExpanded(e),t.stopPropagation()}toggleColumnSort(e,t){if(e.sortingDisabled)return
10652
+ return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getIsRowExpanded:this.getIsRowExpanded,getSubRows:e=>e.subRows,columns:[],state:{rowSelection:{},grouping:[],expanded:!0},enableRowSelection:e=>!e.getIsGrouped(),enableMultiRowSelection:!1,enableSubRowSelection:!1,enableSorting:!0,enableGrouping:!0,renderFallbackValue:null,autoResetAll:!1},this.table=ET(this.options),this.virtualizer=new MR(this,this.table),this.layoutManager=new AR(this),this.layoutManagerNotifier=m.getNotifier(this.layoutManager),this.layoutManagerNotifier.subscribe(this,"isColumnBeingSized"),this.selectionManager=new VR(this.table,this.selectionMode),this.expansionManager=new jR(this.table)}get validity(){return this.tableValidator.getValidity()}get showRowOperationColumn(){return this.selectionMode===TT.multiple||this.showCollapseAll}async setData(e){await this.processPendingUpdates()
10653
+ const t=this.calculateTanStackData(e)
10654
+ this.updateTableOptions(t)}async getSelectedRecordIds(){return await this.processPendingUpdates(),this.selectionManager.getCurrentSelectedRecordIds()}async setSelectedRecordIds(e){await this.processPendingUpdates(),this.selectionMode!==TT.none&&this.updateTableOptions({state:{rowSelection:this.calculateTanStackSelectionState(e)}})}connectedCallback(){super.connectedCallback(),this.initialize(),this.virtualizer.connect(),this.viewport.addEventListener("scroll",this.onViewPortScroll,{passive:!0}),document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp)}disconnectedCallback(){super.disconnectedCallback(),this.virtualizer.disconnect(),this.viewport.removeEventListener("scroll",this.onViewPortScroll),document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp)}checkValidity(){return this.tableValidator.isValid()}handleChange(e,t){(e instanceof jT||e instanceof BT)&&"string"==typeof t?"validConfiguration"===t?this.tableValidator.validateColumnConfigurations(this.columns):this.tableUpdateTracker.trackColumnPropertyChanged(t):e instanceof AR&&"isColumnBeingSized"===t&&!this.layoutManager.isColumnBeingSized&&this.emitColumnConfigurationChangeEvent()}onRowSelectionToggle(e,t){t.stopImmediatePropagation()
10655
+ this.selectionManager.handleRowSelectionToggle(this.tableData[e],t.detail.newState,this.documentShiftKeyDown)&&this.emitSelectionChangeEvent()}onRowClick(e,t){return this.selectionManager.handleRowClick(this.tableData[e],t.shiftKey,t.ctrlKey||t.metaKey)&&this.emitSelectionChangeEvent(),!0}onAllRowsSelectionChange(e){e.stopPropagation(),this.ignoreSelectionChangeEvents||(this.table.toggleAllRowsSelected(this.selectionCheckbox.checked),this.emitSelectionChangeEvent())}onRowActionMenuBeforeToggle(e,t){t.stopImmediatePropagation(),this.handleActionMenuBeforeToggleEvent(e,t)}onRowActionMenuToggle(e){e.stopImmediatePropagation(),this.handleRowActionMenuToggleEvent(e)}handleCollapseAllRows(){this.expansionManager.collapseAll()}onRightDividerMouseDown(e,t){0===e.button&&this.layoutManager.beginColumnInteractiveSize(e.clientX,2*t)}onLeftDividerMouseDown(e,t){0===e.button&&this.layoutManager.beginColumnInteractiveSize(e.clientX,2*t-1)}handleGroupRowExpanded(e,t){this.toggleRowExpanded(e),t.stopPropagation()}handleRowExpanded(e){this.toggleRowExpanded(e)}toggleColumnSort(e,t){if(e.sortingDisabled)return
10640
10656
  const n=this.getColumnsParticipatingInSorting().sort(((e,t)=>e.columnInternals.currentSortIndex-t.columnInternals.currentSortIndex)),i=n.indexOf(e),o=i>-1,r=e.columnInternals.currentSortDirection
10641
10657
  let s=OT.ascending
10642
10658
  o?r===OT.descending?(n.splice(i,1),s=OT.none,e.columnInternals.currentSortIndex=void 0):s=OT.descending:n.push(e),e.columnInternals.currentSortDirection=s
10643
10659
  for(let i=0;i<n.length;i++){const o=n[i]
10644
- t?n[i].columnInternals.currentSortIndex=i:o===e?o.columnInternals.currentSortIndex=0:(o.columnInternals.currentSortIndex=void 0,o.columnInternals.currentSortDirection=OT.none)}this.emitColumnConfigurationChangeEvent()}update(){this.validate(),this.tableUpdateTracker.requiresTanStackUpdate&&this.updateTanStack(),this.tableUpdateTracker.updateActionMenuSlots&&this.updateActionMenuSlots(),this.tableUpdateTracker.updateColumnWidths&&(this.rowGridColumns=this.layoutManager.getGridTemplateColumns(),this.visibleColumns=this.columns.filter((e=>!e.columnHidden))),this.tableUpdateTracker.updateGroupRows&&(this.showCollapseAll=this.getColumnsParticipatingInGrouping().length>0)}get ariaMultiSelectable(){switch(this.selectionMode){case TT.multiple:return"true"
10660
+ t?n[i].columnInternals.currentSortIndex=i:o===e?o.columnInternals.currentSortIndex=0:(o.columnInternals.currentSortIndex=void 0,o.columnInternals.currentSortDirection=OT.none)}this.emitColumnConfigurationChangeEvent()}update(){this.validate(),this.tableUpdateTracker.requiresTanStackUpdate&&this.updateTanStack(),this.tableUpdateTracker.updateActionMenuSlots&&this.updateActionMenuSlots(),this.tableUpdateTracker.updateColumnWidths&&(this.rowGridColumns=this.layoutManager.getGridTemplateColumns(),this.visibleColumns=this.columns.filter((e=>!e.columnHidden)))}get ariaMultiSelectable(){switch(this.selectionMode){case TT.multiple:return"true"
10645
10661
  case TT.single:return"false"
10646
- default:return null}}getHeaderContainerElements(){return this.columnHeadersContainer.querySelectorAll(".header-container")}selectionModeChanged(e,t){this.$fastController.isConnected&&this.tableUpdateTracker.trackSelectionModeChanged()}idFieldNameChanged(e,t){this.$fastController.isConnected&&this.tableUpdateTracker.trackIdFieldNameChanged()}columnsChanged(e,t){this.$fastController.isConnected&&(this.observeColumns(),this.tableUpdateTracker.trackColumnInstancesChanged())}async handleActionMenuBeforeToggleEvent(e,t){this.selectionManager.handleActionMenuOpening(this.tableData[e])&&await this.emitSelectionChangeEvent(),this.openActionMenuRecordId=t.detail.recordIds[0]
10662
+ default:return null}}getHeaderContainerElements(){return this.columnHeadersContainer.querySelectorAll(".header-container")}calculateTanStackData(e){this.dataHierarchyManager=new qR(e,this.idFieldName,this.parentIdFieldName)
10663
+ const t=this.dataHierarchyManager.hierarchicalData
10664
+ this.tableValidator.setParentIdConfigurationValidity(this.dataHierarchyManager.parentIdConfigurationValid)
10665
+ const n={data:t}
10666
+ if(this.validateWithData(e),this.tableValidator.areRecordIdsValid()){const e=this.selectionManager.getCurrentSelectedRecordIds()
10667
+ n.state={rowSelection:this.calculateTanStackSelectionState(e),expanded:!0}}return n}selectionModeChanged(e,t){this.$fastController.isConnected&&this.tableUpdateTracker.trackSelectionModeChanged()}idFieldNameChanged(e,t){this.$fastController.isConnected&&this.tableUpdateTracker.trackIdFieldNameChanged()}parentIdFieldNameChanged(e,t){this.$fastController.isConnected&&this.tableUpdateTracker.trackParentIdFieldNameChanged()}columnsChanged(e,t){this.$fastController.isConnected&&(this.observeColumns(),this.tableUpdateTracker.trackColumnInstancesChanged())}async handleActionMenuBeforeToggleEvent(e,t){this.selectionManager.handleActionMenuOpening(this.tableData[e])&&await this.emitSelectionChangeEvent(),this.openActionMenuRecordId=t.detail.recordIds[0]
10647
10668
  const n=await this.getActionMenuToggleEventDetail(t)
10648
10669
  this.$emit("action-menu-beforetoggle",n)}async handleRowActionMenuToggleEvent(e){const t=await this.getActionMenuToggleEventDetail(e)
10649
10670
  this.$emit("action-menu-toggle",t),e.detail.newState||(this.openActionMenuRecordId=void 0)}async getActionMenuToggleEventDetail(e){const t=this.selectionMode===TT.multiple?await this.getSelectedRecordIds():[this.openActionMenuRecordId]
@@ -10652,14 +10673,17 @@ for(const e of this.columns){const t=m.getNotifier(e)
10652
10673
  t.subscribe(this),this.columnNotifiers.push(t)
10653
10674
  const n=m.getNotifier(e.columnInternals)
10654
10675
  n.subscribe(this),this.columnNotifiers.push(n)}}getColumnsParticipatingInSorting(){return this.columns.filter((e=>!e.sortingDisabled&&e.columnInternals.currentSortDirection!==OT.none&&"number"==typeof e.columnInternals.currentSortIndex))}getColumnsParticipatingInGrouping(){return this.columns.filter((e=>!e.columnInternals.groupingDisabled&&"number"==typeof e.columnInternals.groupIndex))}childItemsChanged(){this.updateColumnsFromChildItems()}async updateColumnsFromChildItems(){await EE(this.childItems),this.columns=this.childItems.filter((e=>e instanceof jT))}updateTanStack(){const e={state:{}}
10655
- this.tableUpdateTracker.updateColumnSort&&(e.state.sorting=this.calculateTanStackSortState()),this.tableUpdateTracker.updateColumnDefinition&&(e.columns=this.calculateTanStackColumns()),this.tableUpdateTracker.updateRowIds&&(e.getRowId=this.calculateTanStackRowIdFunction(),e.state.rowSelection={},this.selectionManager.handleSelectionReset()),this.tableUpdateTracker.updateSelectionMode&&(e.enableMultiRowSelection=this.selectionMode===TT.multiple,e.enableSubRowSelection=this.selectionMode===TT.multiple,e.state.rowSelection={},this.selectionManager.handleSelectionModeChanged(this.selectionMode)),this.tableUpdateTracker.requiresTanStackDataReset&&(e.data=[...this.table.options.data]),this.tableUpdateTracker.updateGroupRows&&(e.state.grouping=this.calculateTanStackGroupingState(),e.state.expanded=!0,this.collapsedRows.clear()),this.updateTableOptions(e)}updateActionMenuSlots(){const e=new Set
10676
+ if(this.tableUpdateTracker.updateColumnSort&&(e.state.sorting=this.calculateTanStackSortState()),this.tableUpdateTracker.updateColumnDefinition&&(e.columns=this.calculateTanStackColumns()),this.tableUpdateTracker.updateRowIds&&(e.getRowId=this.calculateTanStackRowIdFunction(),e.state.rowSelection={},this.selectionManager.handleSelectionReset()),this.tableUpdateTracker.updateSelectionMode&&(e.enableMultiRowSelection=this.selectionMode===TT.multiple,e.enableSubRowSelection=this.selectionMode===TT.multiple,e.state.rowSelection={},this.selectionManager.handleSelectionModeChanged(this.selectionMode)),this.dataHierarchyManager&&this.tableUpdateTracker.requiresTanStackDataReset)if(this.parentIdFieldName||this.tableUpdateTracker.updateRowParentIds){const t=this.dataHierarchyManager.getAllRecords(!0),n=this.calculateTanStackData(t)
10677
+ n.state&&(e.state.rowSelection=n.state.rowSelection),e.data=n.data}else e.data=[...this.table.options.data]
10678
+ this.tableUpdateTracker.updateGroupRows&&(e.state.grouping=this.calculateTanStackGroupingState()),(this.tableUpdateTracker.updateRowIds||this.tableUpdateTracker.updateRowParentIds||this.tableUpdateTracker.updateGroupRows)&&(e.state.expanded=!0,this.expansionManager.reset()),this.updateTableOptions(e)}updateActionMenuSlots(){const e=new Set
10656
10679
  for(const t of this.columns)t.actionMenuSlot&&e.add(t.actionMenuSlot)
10657
- this.actionMenuSlots=Array.from(e)}validate(){this.tableValidator.validateSelectionMode(this.selectionMode,this.idFieldName),this.tableValidator.validateColumnIds(this.columns.map((e=>e.columnId))),this.tableValidator.validateColumnSortIndices(this.getColumnsParticipatingInSorting().map((e=>e.columnInternals.currentSortIndex))),this.tableValidator.validateColumnGroupIndices(this.getColumnsParticipatingInGrouping().map((e=>e.columnInternals.groupIndex))),this.tableValidator.validateColumnConfigurations(this.columns),this.validateWithData(this.table.options.data)}validateWithData(e){this.tableValidator.validateRecordIds(e,this.idFieldName),this.canRenderRows=this.checkValidity()}emitColumnConfigurationChangeEvent(){const e={columns:this.columns.map((e=>({columnId:e.columnId,sortIndex:e.columnInternals.currentSortIndex??void 0,sortDirection:e.columnInternals.currentSortDirection,groupIndex:e.columnInternals.groupIndex,hidden:e.columnHidden,fractionalWidth:e.columnInternals.currentFractionalWidth,pixelWidth:e.columnInternals.currentPixelWidth})))}
10680
+ this.actionMenuSlots=Array.from(e)}validate(){this.tableValidator.validateIdFieldConfiguration(this.selectionMode,this.idFieldName,this.parentIdFieldName),this.tableValidator.validateColumnIds(this.columns.map((e=>e.columnId))),this.tableValidator.validateColumnSortIndices(this.getColumnsParticipatingInSorting().map((e=>e.columnInternals.currentSortIndex))),this.tableValidator.validateColumnGroupIndices(this.getColumnsParticipatingInGrouping().map((e=>e.columnInternals.groupIndex))),this.tableValidator.validateColumnConfigurations(this.columns),this.dataHierarchyManager&&this.validateWithData(this.dataHierarchyManager.getAllRecords())}validateWithData(e){this.tableValidator.validateRecordIds(e,this.idFieldName),this.canRenderRows=this.checkValidity()}emitColumnConfigurationChangeEvent(){const e={columns:this.columns.map((e=>({columnId:e.columnId,sortIndex:e.columnInternals.currentSortIndex??void 0,sortDirection:e.columnInternals.currentSortDirection,groupIndex:e.columnInternals.groupIndex,hidden:e.columnHidden,fractionalWidth:e.columnInternals.currentFractionalWidth,pixelWidth:e.columnInternals.currentPixelWidth})))}
10658
10681
  this.$emit("column-configuration-change",e)}async emitSelectionChangeEvent(){const e={selectedRecordIds:await this.getSelectedRecordIds()}
10659
10682
  this.$emit("selection-change",e)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===DT,this.selectionCheckbox.indeterminate=this.selectionState===NT,this.ignoreSelectionChangeEvents=!1)}refreshRows(){this.selectionState=this.getTableSelectionState()
10660
- const e=this.table.getRowModel().rows
10661
- this.tableData=e.map((e=>{const t=e.getIsGrouped()
10662
- return{record:e.original.clientRecord,id:e.id,selectionState:this.getRowSelectionState(e),isGrouped:t,isExpanded:e.getIsExpanded(),groupRowValue:t?e.getValue(e.groupingColumnId):void 0,nestingLevel:!t&&e.depth>0?e.depth-1:e.depth,leafItemCount:e.getLeafRows().filter((e=>0===e.getLeafRows().length)).length,groupColumn:this.getGroupRowColumn(e)}})),this.virtualizer.dataChanged()}getTableSelectionState(){return this.table.getIsAllRowsSelected()?DT:this.table.getIsSomeRowsSelected()?NT:RT}getRowSelectionState(e){return e.getIsGrouped()?this.getGroupedRowSelectionState(e):e.getIsSelected()?DT:RT}getGroupedRowSelectionState(e){const t=e.subRows??[]
10683
+ let e=!1
10684
+ const t=this.table.getRowModel().rows
10685
+ this.tableData=t.map((t=>{const n=t.getIsGrouped(),i=!n&&t.getParentRow(),o=void 0!==t.original.subRows&&t.original.subRows.length>0,r=!n&&!o&&!i&&t.depth>0&&!this.parentIdFieldName,s={record:t.original.clientRecord,id:t.id,selectionState:this.getRowSelectionState(t),isGroupRow:n,isExpanded:t.getIsExpanded(),groupRowValue:n?t.getValue(t.groupingColumnId):void 0,nestingLevel:r?t.depth-1:t.depth,isParentRow:o,immediateChildCount:t.subRows.length,groupColumn:this.getGroupRowColumn(t)}
10686
+ return e=e||o,s})),this.showCollapseAll=e||this.getColumnsParticipatingInGrouping().length>0,this.virtualizer.dataChanged()}getTableSelectionState(){return this.table.getIsAllRowsSelected()?DT:this.table.getIsSomeRowsSelected()?NT:RT}getRowSelectionState(e){return e.getIsGrouped()?this.getGroupedRowSelectionState(e):e.getIsSelected()?DT:RT}getGroupedRowSelectionState(e){const t=e.getLeafRows()??[]
10663
10687
  let n=!1,i=!1
10664
10688
  for(const e of t){if(e.getIsGrouped()){switch(this.getGroupedRowSelectionState(e)){case RT:i=!0
10665
10689
  break
@@ -10667,16 +10691,17 @@ case DT:n=!0
10667
10691
  break
10668
10692
  default:return NT}}else e.getIsSelected()?n=!0:i=!0
10669
10693
  if(n&&i)return NT}return n?DT:RT}getGroupRowColumn(e){const t=e.groupingColumnId
10670
- if(void 0!==t)return this.columns.find((e=>e.columnInternals.uniqueId===t))}updateTableOptions(e){this.options={...this.options,...e,state:{...this.options.state,...e.state}},this.table.setOptions(this.options),this.refreshRows()}toggleGroupExpanded(e){const t=this.table.getRowModel().rows[e]
10671
- t.getIsExpanded()?this.collapsedRows.add(t.id):this.collapsedRows.delete(t.id),t.toggleExpanded()}calculateTanStackSortState(){const e=this.getColumnsParticipatingInSorting().sort(((e,t)=>e.columnInternals.currentSortIndex-t.columnInternals.currentSortIndex))
10694
+ if(void 0!==t)return this.columns.find((e=>e.columnInternals.uniqueId===t))}updateTableOptions(e){if(this.options={...this.options,...e,state:{...this.options.state,...e.state}},this.table.setOptions(this.options),e.data){const e=this.table.getRowModel().flatRows
10695
+ this.expansionManager.processDataUpdate(e)}this.refreshRows()}toggleRowExpanded(e){const t=this.table.getRowModel().rows[e]
10696
+ this.expansionManager.toggleRowExpansion(t)}calculateTanStackSortState(){const e=this.getColumnsParticipatingInSorting().sort(((e,t)=>e.columnInternals.currentSortIndex-t.columnInternals.currentSortIndex))
10672
10697
  return this.firstSortedColumn=e.length?e[0]:void 0,e.map((e=>({id:e.columnInternals.uniqueId,desc:e.columnInternals.currentSortDirection===OT.descending})))}calculateTanStackGroupingState(){return this.getColumnsParticipatingInGrouping().sort(((e,t)=>e.columnInternals.groupIndex-t.columnInternals.groupIndex)).map((e=>e.columnInternals.uniqueId))}calculateTanStackRowIdFunction(){return null===this.idFieldName||void 0===this.idFieldName?void 0:e=>e.clientRecord[this.idFieldName]}calculateTanStackColumns(){return this.columns.map((e=>({id:e.columnInternals.uniqueId,accessorFn:t=>{const n=e.columnInternals.operandDataRecordFieldName
10673
10698
  if("string"==typeof n)return t.clientRecord[n]},sortingFn:_R(e.columnInternals.sortOperation),sortUndefined:!1})))}calculateTanStackSelectionState(e){if(this.selectionMode===TT.none)return{}
10674
10699
  const t={},n=this.tableValidator.getPresentRecordIds(e)
10675
10700
  for(const e of n)if(t[e]=!0,this.selectionMode===TT.single)break
10676
- return t}}e([se({attribute:"id-field-name"})],HR.prototype,"idFieldName",void 0),e([se({attribute:"selection-mode"})],HR.prototype,"selectionMode",void 0),e([g],HR.prototype,"tableData",void 0),e([g],HR.prototype,"columns",void 0),e([g],HR.prototype,"childItems",void 0),e([g],HR.prototype,"rowElements",void 0),e([g],HR.prototype,"actionMenuSlots",void 0),e([g],HR.prototype,"openActionMenuRecordId",void 0),e([g],HR.prototype,"canRenderRows",void 0),e([g],HR.prototype,"scrollX",void 0),e([g],HR.prototype,"rowGridColumns",void 0),e([g],HR.prototype,"selectionState",void 0),e([g],HR.prototype,"selectionCheckbox",void 0),e([g],HR.prototype,"showCollapseAll",void 0),e([g],HR.prototype,"firstSortedColumn",void 0),e([g],HR.prototype,"visibleColumns",void 0),e([g],HR.prototype,"tableScrollableMinWidth",void 0),e([g],HR.prototype,"documentShiftKeyDown",void 0)
10677
- const BR=HR.compose({baseName:"table",template:fR,styles:WT})
10678
- bi.getOrCreate().withPrefix("nimble").register(BR())
10679
- const qR=we`
10701
+ return t}}e([se({attribute:"id-field-name"})],UR.prototype,"idFieldName",void 0),e([se({attribute:"parent-id-field-name"})],UR.prototype,"parentIdFieldName",void 0),e([se({attribute:"selection-mode"})],UR.prototype,"selectionMode",void 0),e([g],UR.prototype,"tableData",void 0),e([g],UR.prototype,"columns",void 0),e([g],UR.prototype,"childItems",void 0),e([g],UR.prototype,"rowElements",void 0),e([g],UR.prototype,"actionMenuSlots",void 0),e([g],UR.prototype,"openActionMenuRecordId",void 0),e([g],UR.prototype,"canRenderRows",void 0),e([g],UR.prototype,"scrollX",void 0),e([g],UR.prototype,"rowGridColumns",void 0),e([g],UR.prototype,"selectionState",void 0),e([g],UR.prototype,"selectionCheckbox",void 0),e([g],UR.prototype,"showCollapseAll",void 0),e([g],UR.prototype,"firstSortedColumn",void 0),e([g],UR.prototype,"visibleColumns",void 0),e([g],UR.prototype,"tableScrollableMinWidth",void 0),e([g],UR.prototype,"documentShiftKeyDown",void 0)
10702
+ const WR=UR.compose({baseName:"table",template:fR,styles:WT})
10703
+ bi.getOrCreate().withPrefix("nimble").register(WR())
10704
+ const ZR=we`
10680
10705
  :host {
10681
10706
  display: contents;
10682
10707
  }
@@ -10686,14 +10711,14 @@ const qR=we`
10686
10711
  overflow: hidden;
10687
10712
  text-overflow: ellipsis;
10688
10713
  }
10689
- `,jR=Z`<span
10714
+ `,GR=Z`<span
10690
10715
  ${Wm("hasOverflow")}
10691
10716
  class="header-content"
10692
10717
  title=${e=>e.hasOverflow&&e.headerTextContent?e.headerTextContent:null}
10693
10718
  >
10694
10719
  <slot ${Ne("contentSlot")}></slot>
10695
10720
  </span>`
10696
- function UR(e){class t extends e{fractionalWidthChanged(){"number"==typeof this.fractionalWidth?this.columnInternals.fractionalWidth=this.fractionalWidth:this.columnInternals.fractionalWidth=1}minPixelWidthChanged(){"number"==typeof this.minPixelWidth?this.columnInternals.minPixelWidth=this.minPixelWidth:this.columnInternals.minPixelWidth=117}}return se({attribute:"fractional-width",converter:oe})(t.prototype,"fractionalWidth"),se({attribute:"min-pixel-width",converter:oe})(t.prototype,"minPixelWidth"),t}function WR(e){class t extends e{constructor(){super(...arguments),this.groupingDisabled=!1,this.groupIndex=null}groupingDisabledChanged(){this.columnInternals.groupingDisabled=this.groupingDisabled}groupIndexChanged(){"number"==typeof this.groupIndex?this.columnInternals.groupIndex=this.groupIndex:this.columnInternals.groupIndex=void 0}}return se({attribute:"grouping-disabled",mode:"boolean"})(t.prototype,"groupingDisabled"),se({attribute:"group-index",converter:oe})(t.prototype,"groupIndex"),t}const ZR=we`
10721
+ function KR(e){class t extends e{fractionalWidthChanged(){"number"==typeof this.fractionalWidth?this.columnInternals.fractionalWidth=this.fractionalWidth:this.columnInternals.fractionalWidth=1}minPixelWidthChanged(){"number"==typeof this.minPixelWidth?this.columnInternals.minPixelWidth=this.minPixelWidth:this.columnInternals.minPixelWidth=117}}return se({attribute:"fractional-width",converter:oe})(t.prototype,"fractionalWidth"),se({attribute:"min-pixel-width",converter:oe})(t.prototype,"minPixelWidth"),t}function JR(e){class t extends e{constructor(){super(...arguments),this.groupingDisabled=!1,this.groupIndex=null}groupingDisabledChanged(){this.columnInternals.groupingDisabled=this.groupingDisabled}groupIndexChanged(){"number"==typeof this.groupIndex?this.columnInternals.groupIndex=this.groupIndex:this.columnInternals.groupIndex=void 0}}return se({attribute:"grouping-disabled",mode:"boolean"})(t.prototype,"groupingDisabled"),se({attribute:"group-index",converter:oe})(t.prototype,"groupIndex"),t}const XR=we`
10697
10722
  :host {
10698
10723
  width: fit-content;
10699
10724
  max-width: 100%;
@@ -10714,7 +10739,7 @@ function UR(e){class t extends e{fractionalWidthChanged(){"number"==typeof this.
10714
10739
  overflow: hidden;
10715
10740
  text-overflow: ellipsis;
10716
10741
  }
10717
- `,GR=Z`
10742
+ `,YR=Z`
10718
10743
  <template
10719
10744
  @click="${(e,t)=>("string"==typeof e.cellRecord?.href&&t.event.stopPropagation(),!0)}"
10720
10745
  >
@@ -10745,18 +10770,18 @@ function UR(e){class t extends e{fractionalWidthChanged(){"number"==typeof this.
10745
10770
  </span>`)}
10746
10771
  </template>
10747
10772
  `
10748
- class KR extends VT{constructor(){super(...arguments),this.hasOverflow=!1}get text(){return"string"==typeof this.cellRecord?.label?this.cellRecord.label:"string"==typeof this.cellRecord?.href?this.cellRecord.href:""}focusedRecycleCallback(){this.anchor?.blur()}}e([g],KR.prototype,"hasOverflow",void 0),e([v],KR.prototype,"text",null)
10749
- const JR=KR.compose({baseName:"table-column-anchor-cell-view",template:GR,styles:ZR})
10750
- bi.getOrCreate().withPrefix("nimble").register(JR())
10751
- class XR extends LT{constructor(){super(...arguments),this.hasOverflow=!1,this.text=""}}e([g],XR.prototype,"hasOverflow",void 0),e([g],XR.prototype,"text",void 0)
10752
- const YR=Z`
10773
+ class QR extends VT{constructor(){super(...arguments),this.hasOverflow=!1}get text(){return"string"==typeof this.cellRecord?.label?this.cellRecord.label:"string"==typeof this.cellRecord?.href?this.cellRecord.href:""}focusedRecycleCallback(){this.anchor?.blur()}}e([g],QR.prototype,"hasOverflow",void 0),e([v],QR.prototype,"text",null)
10774
+ const eD=QR.compose({baseName:"table-column-anchor-cell-view",template:YR,styles:XR})
10775
+ bi.getOrCreate().withPrefix("nimble").register(eD())
10776
+ class tD extends LT{constructor(){super(...arguments),this.hasOverflow=!1,this.text=""}}e([g],tD.prototype,"hasOverflow",void 0),e([g],tD.prototype,"text",void 0)
10777
+ const nD=Z`
10753
10778
  <span
10754
10779
  ${Wm("hasOverflow")}
10755
10780
  title="${e=>e.hasOverflow&&e.text?e.text:null}"
10756
10781
  >
10757
10782
  ${e=>e.text}
10758
10783
  </span>
10759
- `,QR=we`
10784
+ `,iD=we`
10760
10785
  span {
10761
10786
  font: ${Rc};
10762
10787
  color: ${Dc};
@@ -10765,19 +10790,19 @@ const YR=Z`
10765
10790
  text-overflow: ellipsis;
10766
10791
  }
10767
10792
  `
10768
- const eD=class extends XR{groupHeaderValueChanged(){this.text="string"==typeof this.groupHeaderValue?this.groupHeaderValue:""}}.compose({baseName:"table-column-text-group-header-view",template:YR,styles:QR})
10769
- bi.getOrCreate().withPrefix("nimble").register(eD())
10770
- const tD="nimble-table-column-text-group-header-view"
10771
- class nD extends(WR(UR(jT))){constructor(){super(...arguments),this.underlineHidden=!1}getColumnInternalsOptions(){return{cellRecordFieldNames:["label","href"],cellViewTag:"nimble-table-column-anchor-cell-view",groupHeaderViewTag:tD,delegatedEvents:["click"],sortOperation:zT}}labelFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName],this.columnInternals.operandDataRecordFieldName=this.labelFieldName}hrefFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName]}appearanceChanged(){this.updateColumnConfig()}underlineHiddenChanged(){this.updateColumnConfig()}hreflangChanged(){this.updateColumnConfig()}pingChanged(){this.updateColumnConfig()}referrerpolicyChanged(){this.updateColumnConfig()}relChanged(){this.updateColumnConfig()}targetChanged(){this.updateColumnConfig()}typeChanged(){this.updateColumnConfig()}downloadChanged(){this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.columnConfig={appearance:this.appearance,underlineHidden:this.underlineHidden,hreflang:this.hreflang,ping:this.ping,referrerpolicy:this.referrerpolicy,rel:this.rel,target:this.target,type:this.type,download:this.download}}}e([se({attribute:"label-field-name"})],nD.prototype,"labelFieldName",void 0),e([se({attribute:"href-field-name"})],nD.prototype,"hrefFieldName",void 0),e([se],nD.prototype,"appearance",void 0),e([se({attribute:"underline-hidden",mode:"boolean"})],nD.prototype,"underlineHidden",void 0),e([se],nD.prototype,"hreflang",void 0),e([se],nD.prototype,"ping",void 0),e([se],nD.prototype,"referrerpolicy",void 0),e([se],nD.prototype,"rel",void 0),e([se],nD.prototype,"target",void 0),e([se],nD.prototype,"type",void 0),e([se],nD.prototype,"download",void 0)
10772
- const iD=nD.compose({baseName:"table-column-anchor",template:jR,styles:qR})
10773
- bi.getOrCreate().withPrefix("nimble").register(iD())
10774
- class oD extends(WR(UR(jT))){fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}}function rD(e,t){if("number"!=typeof t)return""
10775
- try{return e.format(t)}catch(e){return""}}e([se({attribute:"field-name"})],oD.prototype,"fieldName",void 0)
10776
- const sD=class extends XR{columnConfigChanged(){this.updateText()}groupHeaderValueChanged(){this.updateText()}updateText(){this.columnConfig?this.text=rD(this.columnConfig.formatter,this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-date-text-group-header-view",template:YR,styles:QR})
10777
- bi.getOrCreate().withPrefix("nimble").register(sD())
10778
- const aD="left",lD="right",cD=Z`
10793
+ const oD=class extends tD{groupHeaderValueChanged(){this.text="string"==typeof this.groupHeaderValue?this.groupHeaderValue:""}}.compose({baseName:"table-column-text-group-header-view",template:nD,styles:iD})
10794
+ bi.getOrCreate().withPrefix("nimble").register(oD())
10795
+ const rD="nimble-table-column-text-group-header-view"
10796
+ class sD extends(JR(KR(jT))){constructor(){super(...arguments),this.underlineHidden=!1}getColumnInternalsOptions(){return{cellRecordFieldNames:["label","href"],cellViewTag:"nimble-table-column-anchor-cell-view",groupHeaderViewTag:rD,delegatedEvents:["click"],sortOperation:zT}}labelFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName],this.columnInternals.operandDataRecordFieldName=this.labelFieldName}hrefFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName]}appearanceChanged(){this.updateColumnConfig()}underlineHiddenChanged(){this.updateColumnConfig()}hreflangChanged(){this.updateColumnConfig()}pingChanged(){this.updateColumnConfig()}referrerpolicyChanged(){this.updateColumnConfig()}relChanged(){this.updateColumnConfig()}targetChanged(){this.updateColumnConfig()}typeChanged(){this.updateColumnConfig()}downloadChanged(){this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.columnConfig={appearance:this.appearance,underlineHidden:this.underlineHidden,hreflang:this.hreflang,ping:this.ping,referrerpolicy:this.referrerpolicy,rel:this.rel,target:this.target,type:this.type,download:this.download}}}e([se({attribute:"label-field-name"})],sD.prototype,"labelFieldName",void 0),e([se({attribute:"href-field-name"})],sD.prototype,"hrefFieldName",void 0),e([se],sD.prototype,"appearance",void 0),e([se({attribute:"underline-hidden",mode:"boolean"})],sD.prototype,"underlineHidden",void 0),e([se],sD.prototype,"hreflang",void 0),e([se],sD.prototype,"ping",void 0),e([se],sD.prototype,"referrerpolicy",void 0),e([se],sD.prototype,"rel",void 0),e([se],sD.prototype,"target",void 0),e([se],sD.prototype,"type",void 0),e([se],sD.prototype,"download",void 0)
10797
+ const aD=sD.compose({baseName:"table-column-anchor",template:GR,styles:ZR})
10798
+ bi.getOrCreate().withPrefix("nimble").register(aD())
10799
+ class lD extends(JR(KR(jT))){fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}}function cD(e,t){if("number"!=typeof t)return""
10800
+ try{return e.format(t)}catch(e){return""}}e([se({attribute:"field-name"})],lD.prototype,"fieldName",void 0)
10801
+ const dD=class extends tD{columnConfigChanged(){this.updateText()}groupHeaderValueChanged(){this.updateText()}updateText(){this.columnConfig?this.text=cD(this.columnConfig.formatter,this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-date-text-group-header-view",template:nD,styles:iD})
10802
+ bi.getOrCreate().withPrefix("nimble").register(dD())
10803
+ const hD="left",uD="right",pD=Z`
10779
10804
  <template
10780
- class="${e=>e.alignment===lD?"right-align":""}"
10805
+ class="${e=>e.alignment===uD?"right-align":""}"
10781
10806
  >
10782
10807
  <span
10783
10808
  ${Wm("hasOverflow")}
@@ -10786,7 +10811,7 @@ const aD="left",lD="right",cD=Z`
10786
10811
  ${e=>e.text}
10787
10812
  </span>
10788
10813
  </template>
10789
- `,dD=we`
10814
+ `,fD=we`
10790
10815
  :host(.right-align) {
10791
10816
  margin-left: auto;
10792
10817
  }
@@ -10799,22 +10824,22 @@ const aD="left",lD="right",cD=Z`
10799
10824
  text-overflow: ellipsis;
10800
10825
  }
10801
10826
  `
10802
- class hD extends VT{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.alignment=aD}}e([g],hD.prototype,"hasOverflow",void 0),e([g],hD.prototype,"text",void 0),e([g],hD.prototype,"alignment",void 0)
10803
- const uD=class extends hD{columnConfigChanged(){this.updateText()}cellRecordChanged(){this.updateText()}updateText(){this.columnConfig?this.text=rD(this.columnConfig.formatter,this.cellRecord?.value):this.text=""}}.compose({baseName:"table-column-date-text-cell-view",template:cD,styles:dD})
10804
- bi.getOrCreate().withPrefix("nimble").register(uD())
10805
- const pD=void 0
10806
- class fD extends OR{isValid(){return this.noneTracked()}getValidationFlags(){return this.getTrackedItems()}}class mD extends fD{constructor(e,t){super(t),this.columnInternals=e}getValidity(){return this.getValidationFlags()}setConditionValue(e,t){t?this.track(e):this.untrack(e),this.updateColumnInternalsFlag()}updateColumnInternalsFlag(){this.columnInternals.validConfiguration=this.isValid()}}const gD=["invalidCustomOptionsCombination"]
10807
- class vD extends mD{constructor(e){super(e,gD)}setCustomOptionsValidity(e){this.setConditionValue("invalidCustomOptionsCombination",!e)}}const bD={toView:e=>"boolean"==typeof e?e.toString():null,fromView:e=>"true"===e||!0===e||"false"!==e&&!1!==e&&void 0}
10808
- class wD extends oD{constructor(){super(...arguments),this.validator=new vD(this.columnInternals),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),xa.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),xa.unsubscribe(this.langSubscriber,this)}get validity(){return this.validator.getValidity()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-date-text-cell-view",groupHeaderViewTag:"nimble-table-column-date-text-group-header-view",delegatedEvents:[],sortOperation:PT}}formatChanged(){this.updateColumnConfig()}customLocaleMatcherChanged(){this.updateColumnConfig()}customWeekdayChanged(){this.updateColumnConfig()}customEraChanged(){this.updateColumnConfig()}customYearChanged(){this.updateColumnConfig()}customMonthChanged(){this.updateColumnConfig()}customDayChanged(){this.updateColumnConfig()}customHourChanged(){this.updateColumnConfig()}customMinuteChanged(){this.updateColumnConfig()}customSecondChanged(){this.updateColumnConfig()}customTimeZoneNameChanged(){this.updateColumnConfig()}customFormatMatcherChanged(){this.updateColumnConfig()}customHour12Changed(){this.updateColumnConfig()}customTimeZoneChanged(){this.updateColumnConfig()}customCalendarChanged(){this.updateColumnConfig()}customDayPeriodChanged(){this.updateColumnConfig()}customNumberingSystemChanged(){this.updateColumnConfig()}customDateStyleChanged(){this.updateColumnConfig()}customTimeStyleChanged(){this.updateColumnConfig()}customHourCycleChanged(){this.updateColumnConfig()}updateColumnConfig(){const e=this.createFormatter()
10827
+ class mD extends VT{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.alignment=hD}}e([g],mD.prototype,"hasOverflow",void 0),e([g],mD.prototype,"text",void 0),e([g],mD.prototype,"alignment",void 0)
10828
+ const gD=class extends mD{columnConfigChanged(){this.updateText()}cellRecordChanged(){this.updateText()}updateText(){this.columnConfig?this.text=cD(this.columnConfig.formatter,this.cellRecord?.value):this.text=""}}.compose({baseName:"table-column-date-text-cell-view",template:pD,styles:fD})
10829
+ bi.getOrCreate().withPrefix("nimble").register(gD())
10830
+ const vD=void 0
10831
+ class bD extends OR{isValid(){return this.noneTracked()}getValidationFlags(){return this.getTrackedItems()}}class wD extends bD{constructor(e,t){super(t),this.columnInternals=e}getValidity(){return this.getValidationFlags()}setConditionValue(e,t){t?this.track(e):this.untrack(e),this.updateColumnInternalsFlag()}updateColumnInternalsFlag(){this.columnInternals.validConfiguration=this.isValid()}}const yD=["invalidCustomOptionsCombination"]
10832
+ class xD extends wD{constructor(e){super(e,yD)}setCustomOptionsValidity(e){this.setConditionValue("invalidCustomOptionsCombination",!e)}}const kD={toView:e=>"boolean"==typeof e?e.toString():null,fromView:e=>"true"===e||!0===e||"false"!==e&&!1!==e&&void 0}
10833
+ class CD extends lD{constructor(){super(...arguments),this.validator=new xD(this.columnInternals),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),xa.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),xa.unsubscribe(this.langSubscriber,this)}get validity(){return this.validator.getValidity()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-date-text-cell-view",groupHeaderViewTag:"nimble-table-column-date-text-group-header-view",delegatedEvents:[],sortOperation:PT}}formatChanged(){this.updateColumnConfig()}customLocaleMatcherChanged(){this.updateColumnConfig()}customWeekdayChanged(){this.updateColumnConfig()}customEraChanged(){this.updateColumnConfig()}customYearChanged(){this.updateColumnConfig()}customMonthChanged(){this.updateColumnConfig()}customDayChanged(){this.updateColumnConfig()}customHourChanged(){this.updateColumnConfig()}customMinuteChanged(){this.updateColumnConfig()}customSecondChanged(){this.updateColumnConfig()}customTimeZoneNameChanged(){this.updateColumnConfig()}customFormatMatcherChanged(){this.updateColumnConfig()}customHour12Changed(){this.updateColumnConfig()}customTimeZoneChanged(){this.updateColumnConfig()}customCalendarChanged(){this.updateColumnConfig()}customDayPeriodChanged(){this.updateColumnConfig()}customNumberingSystemChanged(){this.updateColumnConfig()}customDateStyleChanged(){this.updateColumnConfig()}customTimeStyleChanged(){this.updateColumnConfig()}customHourCycleChanged(){this.updateColumnConfig()}updateColumnConfig(){const e=this.createFormatter()
10809
10834
  if(e){const t={formatter:e}
10810
10835
  this.columnInternals.columnConfig=t,this.validator.setCustomOptionsValidity(!0)}else this.columnInternals.columnConfig=void 0,this.validator.setCustomOptionsValidity(!1)}createFormatter(){let e
10811
- e=this.format===pD?{dateStyle:"medium",timeStyle:"medium"}:this.getCustomFormattingOptions()
10812
- try{return new Intl.DateTimeFormat(xa.getValueFor(this),e)}catch(e){return}}getCustomFormattingOptions(){return{localeMatcher:this.customLocaleMatcher??void 0,weekday:this.customWeekday??void 0,era:this.customEra??void 0,year:this.customYear??void 0,month:this.customMonth??void 0,day:this.customDay??void 0,hour:this.customHour??void 0,minute:this.customMinute??void 0,second:this.customSecond??void 0,timeZoneName:this.customTimeZoneName??void 0,formatMatcher:this.customFormatMatcher??void 0,hour12:this.customHour12??void 0,timeZone:this.customTimeZone??void 0,calendar:this.customCalendar??void 0,dayPeriod:this.customDayPeriod??void 0,numberingSystem:this.customNumberingSystem??void 0,dateStyle:this.customDateStyle??void 0,timeStyle:this.customTimeStyle??void 0,hourCycle:this.customHourCycle??void 0}}}e([se],wD.prototype,"format",void 0),e([se({attribute:"custom-locale-matcher"})],wD.prototype,"customLocaleMatcher",void 0),e([se({attribute:"custom-weekday"})],wD.prototype,"customWeekday",void 0),e([se({attribute:"custom-era"})],wD.prototype,"customEra",void 0),e([se({attribute:"custom-year"})],wD.prototype,"customYear",void 0),e([se({attribute:"custom-month"})],wD.prototype,"customMonth",void 0),e([se({attribute:"custom-day"})],wD.prototype,"customDay",void 0),e([se({attribute:"custom-hour"})],wD.prototype,"customHour",void 0),e([se({attribute:"custom-minute"})],wD.prototype,"customMinute",void 0),e([se({attribute:"custom-second"})],wD.prototype,"customSecond",void 0),e([se({attribute:"custom-time-zone-name"})],wD.prototype,"customTimeZoneName",void 0),e([se({attribute:"custom-format-matcher"})],wD.prototype,"customFormatMatcher",void 0),e([se({attribute:"custom-hour12",converter:bD})],wD.prototype,"customHour12",void 0),e([se({attribute:"custom-time-zone"})],wD.prototype,"customTimeZone",void 0),e([se({attribute:"custom-calendar"})],wD.prototype,"customCalendar",void 0),e([se({attribute:"custom-day-period"})],wD.prototype,"customDayPeriod",void 0),e([se({attribute:"custom-numbering-system"})],wD.prototype,"customNumberingSystem",void 0),e([se({attribute:"custom-date-style"})],wD.prototype,"customDateStyle",void 0),e([se({attribute:"custom-time-style"})],wD.prototype,"customTimeStyle",void 0),e([se({attribute:"custom-hour-cycle"})],wD.prototype,"customHourCycle",void 0)
10813
- const yD=wD.compose({baseName:"table-column-date-text",template:jR,styles:qR})
10814
- bi.getOrCreate().withPrefix("nimble").register(yD())
10815
- const xD=class extends hD{columnConfigChanged(){this.updateText()}cellRecordChanged(){this.updateText()}updateText(){this.text=this.columnConfig?.formatter.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-duration-text-cell-view",template:cD,styles:dD})
10816
- bi.getOrCreate().withPrefix("nimble").register(xD())
10817
- class kD{constructor(e){this.lang=e,this.daysFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"day"}),this.hoursFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"hour"}),this.minutesFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"minute"}),this.secondsFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"second"}),this.scientificSecondsFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"second",notation:"scientific",maximumFractionDigits:3})}format(e){if("number"!=typeof e||e<0||!Number.isFinite(e))return""
10836
+ e=this.format===vD?{dateStyle:"medium",timeStyle:"medium"}:this.getCustomFormattingOptions()
10837
+ try{return new Intl.DateTimeFormat(xa.getValueFor(this),e)}catch(e){return}}getCustomFormattingOptions(){return{localeMatcher:this.customLocaleMatcher??void 0,weekday:this.customWeekday??void 0,era:this.customEra??void 0,year:this.customYear??void 0,month:this.customMonth??void 0,day:this.customDay??void 0,hour:this.customHour??void 0,minute:this.customMinute??void 0,second:this.customSecond??void 0,timeZoneName:this.customTimeZoneName??void 0,formatMatcher:this.customFormatMatcher??void 0,hour12:this.customHour12??void 0,timeZone:this.customTimeZone??void 0,calendar:this.customCalendar??void 0,dayPeriod:this.customDayPeriod??void 0,numberingSystem:this.customNumberingSystem??void 0,dateStyle:this.customDateStyle??void 0,timeStyle:this.customTimeStyle??void 0,hourCycle:this.customHourCycle??void 0}}}e([se],CD.prototype,"format",void 0),e([se({attribute:"custom-locale-matcher"})],CD.prototype,"customLocaleMatcher",void 0),e([se({attribute:"custom-weekday"})],CD.prototype,"customWeekday",void 0),e([se({attribute:"custom-era"})],CD.prototype,"customEra",void 0),e([se({attribute:"custom-year"})],CD.prototype,"customYear",void 0),e([se({attribute:"custom-month"})],CD.prototype,"customMonth",void 0),e([se({attribute:"custom-day"})],CD.prototype,"customDay",void 0),e([se({attribute:"custom-hour"})],CD.prototype,"customHour",void 0),e([se({attribute:"custom-minute"})],CD.prototype,"customMinute",void 0),e([se({attribute:"custom-second"})],CD.prototype,"customSecond",void 0),e([se({attribute:"custom-time-zone-name"})],CD.prototype,"customTimeZoneName",void 0),e([se({attribute:"custom-format-matcher"})],CD.prototype,"customFormatMatcher",void 0),e([se({attribute:"custom-hour12",converter:kD})],CD.prototype,"customHour12",void 0),e([se({attribute:"custom-time-zone"})],CD.prototype,"customTimeZone",void 0),e([se({attribute:"custom-calendar"})],CD.prototype,"customCalendar",void 0),e([se({attribute:"custom-day-period"})],CD.prototype,"customDayPeriod",void 0),e([se({attribute:"custom-numbering-system"})],CD.prototype,"customNumberingSystem",void 0),e([se({attribute:"custom-date-style"})],CD.prototype,"customDateStyle",void 0),e([se({attribute:"custom-time-style"})],CD.prototype,"customTimeStyle",void 0),e([se({attribute:"custom-hour-cycle"})],CD.prototype,"customHourCycle",void 0)
10838
+ const SD=CD.compose({baseName:"table-column-date-text",template:GR,styles:ZR})
10839
+ bi.getOrCreate().withPrefix("nimble").register(SD())
10840
+ const $D=class extends mD{columnConfigChanged(){this.updateText()}cellRecordChanged(){this.updateText()}updateText(){this.text=this.columnConfig?.formatter.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-duration-text-cell-view",template:pD,styles:fD})
10841
+ bi.getOrCreate().withPrefix("nimble").register($D())
10842
+ class MD{constructor(e){this.lang=e,this.daysFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"day"}),this.hoursFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"hour"}),this.minutesFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"minute"}),this.secondsFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"second"}),this.scientificSecondsFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"second",notation:"scientific",maximumFractionDigits:3})}format(e){if("number"!=typeof e||e<0||!Number.isFinite(e))return""
10818
10843
  const t=[],n=1e3,i=6e4,o=36e5,r=864e5,s=e/r
10819
10844
  let a=e
10820
10845
  const l=Math.floor(s)
@@ -10827,50 +10852,50 @@ if(a-=d*i,d){const e=this.minutesFormatter.format(d)
10827
10852
  t.push(e)}const h=a/n,u=0===h?0:h%60
10828
10853
  if(e<1&&0!==h)return this.scientificSecondsFormatter.format(h)
10829
10854
  if(u>=5e-4||0===u&&0===t.length){const e=this.secondsFormatter.format(u)
10830
- t.push(e)}return t.join(", ")}}const CD=class extends XR{columnConfigChanged(){this.updateText()}groupHeaderValueChanged(){this.updateText()}updateText(){this.columnConfig?this.text=this.columnConfig.formatter.format(this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-duration-text-group-header-view",template:YR,styles:QR})
10831
- bi.getOrCreate().withPrefix("nimble").register(CD())
10832
- const SD=class extends oD{constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),xa.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),xa.unsubscribe(this.langSubscriber,this)}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-duration-text-cell-view",groupHeaderViewTag:"nimble-table-column-duration-text-group-header-view",delegatedEvents:[],sortOperation:PT}}updateColumnConfig(){const e=new kD(xa.getValueFor(this))
10855
+ t.push(e)}return t.join(", ")}}const _D=class extends tD{columnConfigChanged(){this.updateText()}groupHeaderValueChanged(){this.updateText()}updateText(){this.columnConfig?this.text=this.columnConfig.formatter.format(this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-duration-text-group-header-view",template:nD,styles:iD})
10856
+ bi.getOrCreate().withPrefix("nimble").register(_D())
10857
+ const ED=class extends lD{constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),xa.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),xa.unsubscribe(this.langSubscriber,this)}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-duration-text-cell-view",groupHeaderViewTag:"nimble-table-column-duration-text-group-header-view",delegatedEvents:[],sortOperation:PT}}updateColumnConfig(){const e=new MD(xa.getValueFor(this))
10833
10858
  if(e){const t={formatter:e}
10834
- this.columnInternals.columnConfig=t}else this.columnInternals.columnConfig=void 0}}.compose({baseName:"table-column-duration-text",template:jR,styles:qR})
10835
- bi.getOrCreate().withPrefix("nimble").register(SD())
10836
- const $D=(e,t)=>{if("number"===t){const t=oe.fromView(e)
10859
+ this.columnInternals.columnConfig=t}else this.columnInternals.columnConfig=void 0}}.compose({baseName:"table-column-duration-text",template:GR,styles:ZR})
10860
+ bi.getOrCreate().withPrefix("nimble").register(ED())
10861
+ const ID=(e,t)=>{if("number"===t){const t=oe.fromView(e)
10837
10862
  return null===t?void 0:t}return"boolean"===t?!1!==e&&"false"!==e&&(!0===e||"true"===e||void 0):e?.toString()??void 0}
10838
- class MD extends jT{constructor(){super(...arguments),this.validator=this.createValidator(),this.mappingNotifiers=[],this.mappings=[],this.keyType="string"}handleChange(e,t){e instanceof ev&&"string"==typeof t&&this.updateColumnConfig()}updateColumnConfig(){this.validator.validate(this.mappings,this.keyType),this.columnInternals.columnConfig=this.validator.isValid()?this.createColumnConfig(this.getMappingConfigs()):void 0}getMappingConfigs(){const e=new Map
10839
- return this.mappings.forEach((t=>{const n=$D(t.key,this.keyType)
10863
+ class AD extends jT{constructor(){super(...arguments),this.validator=this.createValidator(),this.mappingNotifiers=[],this.mappings=[],this.keyType="string"}handleChange(e,t){e instanceof ev&&"string"==typeof t&&this.updateColumnConfig()}updateColumnConfig(){this.validator.validate(this.mappings,this.keyType),this.columnInternals.columnConfig=this.validator.isValid()?this.createColumnConfig(this.getMappingConfigs()):void 0}getMappingConfigs(){const e=new Map
10864
+ return this.mappings.forEach((t=>{const n=ID(t.key,this.keyType)
10840
10865
  if(void 0===n)throw Error("Key was invalid for type. Validation should have prevented this.")
10841
10866
  const i=this.createMappingConfig(t)
10842
10867
  e.set(n,i)})),e}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}mappingsChanged(){this.updateColumnConfig(),this.observeMappings()}keyTypeChanged(){this.updateColumnConfig()}removeMappingObservers(){this.mappingNotifiers.forEach((e=>{e.unsubscribe(this)})),this.mappingNotifiers=[]}observeMappings(){this.removeMappingObservers()
10843
10868
  for(const e of this.mappings){const t=m.getNotifier(e)
10844
- t.subscribe(this),this.mappingNotifiers.push(t)}}}e([g],MD.prototype,"mappings",void 0),e([se({attribute:"field-name"})],MD.prototype,"fieldName",void 0),e([se({attribute:"key-type"})],MD.prototype,"keyType",void 0)
10845
- const _D=we`
10846
- ${qR}
10869
+ t.subscribe(this),this.mappingNotifiers.push(t)}}}e([g],AD.prototype,"mappings",void 0),e([se({attribute:"field-name"})],AD.prototype,"fieldName",void 0),e([se({attribute:"key-type"})],AD.prototype,"keyType",void 0)
10870
+ const OD=we`
10871
+ ${ZR}
10847
10872
 
10848
10873
  slot[name='mapping'] {
10849
10874
  display: none;
10850
10875
  }
10851
- `,ED=Z`${jR}<slot ${Ke("mappings")} name="mapping"></slot>`,ID=["invalidMappingKeyValueForType","duplicateMappingKey","missingKeyValue"]
10852
- class AD extends mD{constructor(e,t){super(e,t)}validate(e,t){this.untrackAll()
10876
+ `,TD=Z`${GR}<slot ${Ke("mappings")} name="mapping"></slot>`,RD=["invalidMappingKeyValueForType","duplicateMappingKey","missingKeyValue"]
10877
+ class DD extends wD{constructor(e,t){super(e,t)}validate(e,t){this.untrackAll()
10853
10878
  const n=e.map((e=>e.key))
10854
- this.validateKeyValuesForType(n,t),this.validateUniqueKeys(n,t),this.validateNoMissingKeys(e)}validateKeyValuesForType(e,t){const n=e.some((e=>void 0!==e&&void 0===$D(e,t)))
10855
- this.setConditionValue("invalidMappingKeyValueForType",n)}validateUniqueKeys(e,t){const n=e.map((e=>$D(e,t))),i=new Set(n).size!==n.length
10879
+ this.validateKeyValuesForType(n,t),this.validateUniqueKeys(n,t),this.validateNoMissingKeys(e)}validateKeyValuesForType(e,t){const n=e.some((e=>void 0!==e&&void 0===ID(e,t)))
10880
+ this.setConditionValue("invalidMappingKeyValueForType",n)}validateUniqueKeys(e,t){const n=e.map((e=>ID(e,t))),i=new Set(n).size!==n.length
10856
10881
  this.setConditionValue("duplicateMappingKey",i)}validateNoMissingKeys(e){const t=e.some((e=>void 0===e.key))
10857
- this.setConditionValue("missingKeyValue",t)}}const OD=[...ID,"unsupportedMappingType","missingTextValue"]
10858
- class TD extends AD{constructor(e){super(e,OD)}static isSupportedMappingElement(e){return e instanceof nv}validate(e,t){super.validate(e,t),this.validateMappingTypes(e),this.validateNoMissingText(e)}validateNoMissingText(e){const t=e.filter(TD.isSupportedMappingElement).some((e=>void 0===e.text))
10859
- this.setConditionValue("missingTextValue",t)}validateMappingTypes(e){const t=e.every(TD.isSupportedMappingElement)
10860
- this.setConditionValue("unsupportedMappingType",!t)}}class RD{constructor(e){this.text=e}}class DD extends RD{}const ND=class extends hD{columnConfigChanged(){this.updateText()}cellRecordChanged(){this.updateText()}updateText(){const e=this.cellRecord?.value
10882
+ this.setConditionValue("missingKeyValue",t)}}const ND=[...RD,"unsupportedMappingType","missingTextValue"]
10883
+ class PD extends DD{constructor(e){super(e,ND)}static isSupportedMappingElement(e){return e instanceof nv}validate(e,t){super.validate(e,t),this.validateMappingTypes(e),this.validateNoMissingText(e)}validateNoMissingText(e){const t=e.filter(PD.isSupportedMappingElement).some((e=>void 0===e.text))
10884
+ this.setConditionValue("missingTextValue",t)}validateMappingTypes(e){const t=e.every(PD.isSupportedMappingElement)
10885
+ this.setConditionValue("unsupportedMappingType",!t)}}class zD{constructor(e){this.text=e}}class LD extends zD{}const FD=class extends mD{columnConfigChanged(){this.updateText()}cellRecordChanged(){this.updateText()}updateText(){const e=this.cellRecord?.value
10861
10886
  if(null==e)return void(this.text="")
10862
10887
  const t=this.columnConfig?.mappingConfigs.get(e)
10863
- this.text=t instanceof DD&&t.text?t.text:""}}.compose({baseName:"table-column-enum-text-cell-view",template:cD,styles:dD})
10864
- bi.getOrCreate().withPrefix("nimble").register(ND())
10865
- const PD=class extends XR{columnConfigChanged(){this.updateText()}groupHeaderValueChanged(){this.updateText()}updateText(){const e=this.groupHeaderValue
10888
+ this.text=t instanceof LD&&t.text?t.text:""}}.compose({baseName:"table-column-enum-text-cell-view",template:pD,styles:fD})
10889
+ bi.getOrCreate().withPrefix("nimble").register(FD())
10890
+ const VD=class extends tD{columnConfigChanged(){this.updateText()}groupHeaderValueChanged(){this.updateText()}updateText(){const e=this.groupHeaderValue
10866
10891
  if(null==e)return void(this.text="")
10867
10892
  const t=this.columnConfig?.mappingConfigs.get(e)
10868
- this.text=t instanceof DD&&t.text?t.text:""}}.compose({baseName:"table-column-enum-text-group-header-view",template:YR,styles:QR})
10869
- bi.getOrCreate().withPrefix("nimble").register(PD())
10870
- class zD extends(WR(UR(MD))){createValidator(){return new TD(this.columnInternals)}get validity(){return this.validator.getValidity()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-enum-text-cell-view",groupHeaderViewTag:"nimble-table-column-enum-text-group-header-view",delegatedEvents:[],sortOperation:PT}}createColumnConfig(e){return{mappingConfigs:e}}createMappingConfig(e){if(e instanceof nv)return new DD(e.text)
10871
- throw new Error("Unsupported mapping")}}const LD=zD.compose({baseName:"table-column-enum-text",template:ED,styles:_D})
10872
- bi.getOrCreate().withPrefix("nimble").register(LD())
10873
- const FD=Z`<span
10893
+ this.text=t instanceof LD&&t.text?t.text:""}}.compose({baseName:"table-column-enum-text-group-header-view",template:nD,styles:iD})
10894
+ bi.getOrCreate().withPrefix("nimble").register(VD())
10895
+ class HD extends(JR(KR(AD))){createValidator(){return new PD(this.columnInternals)}get validity(){return this.validator.getValidity()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-enum-text-cell-view",groupHeaderViewTag:"nimble-table-column-enum-text-group-header-view",delegatedEvents:[],sortOperation:PT}}createColumnConfig(e){return{mappingConfigs:e}}createMappingConfig(e){if(e instanceof nv)return new LD(e.text)
10896
+ throw new Error("Unsupported mapping")}}const BD=HD.compose({baseName:"table-column-enum-text",template:TD,styles:OD})
10897
+ bi.getOrCreate().withPrefix("nimble").register(BD())
10898
+ const qD=Z`<span
10874
10899
  ${Wm("hasOverflow")}
10875
10900
  class="header-content"
10876
10901
  title=${e=>e.hasOverflow&&e.headerTextContent?e.headerTextContent:null}
@@ -10878,13 +10903,13 @@ const FD=Z`<span
10878
10903
  <slot ${Ne("contentSlot")}></slot>
10879
10904
  <slot ${Ke({property:"unitElements",filter:We()})} name="unit"></slot>
10880
10905
  </span>`
10881
- const VD=class extends XR{columnConfigChanged(){this.updateText()}groupHeaderValueChanged(){this.updateText()}updateText(){this.text=this.columnConfig?.formatter?.format(this.groupHeaderValue)??""}}.compose({baseName:"table-column-number-text-group-header-view",template:YR,styles:QR})
10882
- bi.getOrCreate().withPrefix("nimble").register(VD())
10883
- const HD=class extends hD{columnConfigChanged(){this.updateText(),this.alignment=this.columnConfig?.alignment??aD}cellRecordChanged(){this.updateText()}updateText(){this.text=this.columnConfig?.formatter?.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-number-text-cell-view",template:cD,styles:dD})
10884
- bi.getOrCreate().withPrefix("nimble").register(HD())
10885
- const BD="decimal",qD="left",jD="right"
10886
- class UD{format(e){if("number"!=typeof e)return""
10887
- try{return this.tryFormat(e)}catch{return""}}}class WD{constructor(e){this.locale=e.locale,this.intlNumberFormatOptions=e.intlNumberFormatOptions}}class ZD extends WD{constructor(e,t={}){super(e),this.formatter=new Intl.NumberFormat(this.locale,{...t,...this.intlNumberFormatOptions})}static createFactory(e={}){return t=>new ZD(t,e)}format(e){return this.formatter.format(e)}}class GD{constructor(e,t){this.scaleFactor=e,this.scaledUnitFormatFactory=t}isBase(){return 1===this.scaleFactor}}class KD{constructor(e){this.supportedScaledUnits=e
10906
+ const jD=class extends tD{columnConfigChanged(){this.updateText()}groupHeaderValueChanged(){this.updateText()}updateText(){this.text=this.columnConfig?.formatter?.format(this.groupHeaderValue)??""}}.compose({baseName:"table-column-number-text-group-header-view",template:nD,styles:iD})
10907
+ bi.getOrCreate().withPrefix("nimble").register(jD())
10908
+ const UD=class extends mD{columnConfigChanged(){this.updateText(),this.alignment=this.columnConfig?.alignment??hD}cellRecordChanged(){this.updateText()}updateText(){this.text=this.columnConfig?.formatter?.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-number-text-cell-view",template:pD,styles:fD})
10909
+ bi.getOrCreate().withPrefix("nimble").register(UD())
10910
+ const WD="decimal",ZD="left",GD="right"
10911
+ class KD{format(e){if("number"!=typeof e)return""
10912
+ try{return this.tryFormat(e)}catch{return""}}}class JD{constructor(e){this.locale=e.locale,this.intlNumberFormatOptions=e.intlNumberFormatOptions}}class XD extends JD{constructor(e,t){super(e),this.formatter=new Intl.NumberFormat(this.locale,{...t,...this.intlNumberFormatOptions})}static createFactory(e){return t=>new XD(t,e)}format(e){return this.formatter.format(e)}}class YD{constructor(e,t){this.scaleFactor=e,this.scaledUnitFormatFactory=t}isBase(){return 1===this.scaleFactor}}class QD{constructor(e){this.supportedScaledUnits=e
10888
10913
  const t=e.every(((e,t,n)=>0===t||n[t-1].scaleFactor<e.scaleFactor))
10889
10914
  if(!t)throw new Error("Supported scaled units must have unique and ordered scale factors")
10890
10915
  const n=e.find((e=>e.isBase()))
@@ -10893,8 +10918,8 @@ this.supportedScaledUnits=e,this.baseScaledUnit=n}scaleNumber(e){const t=Math.ab
10893
10918
  if(1===this.supportedScaledUnits.length||0===t||t===1/0||Number.isNaN(t))return{scaledValue:e,scaledUnit:this.baseScaledUnit}
10894
10919
  for(let n=this.supportedScaledUnits.length-1;n>=0;n-=1){const i=this.supportedScaledUnits[n]
10895
10920
  if(t/i.scaleFactor>=1)return{scaledValue:e/i.scaleFactor,scaledUnit:i}}const n=this.supportedScaledUnits[0]
10896
- return{scaledValue:e/n.scaleFactor,scaledUnit:n}}}const JD=new class extends KD{constructor(){super([new GD(1,ZD.createFactory())])}}
10897
- class XD extends UD{constructor(e,{unitScale:t=JD}={unitScale:JD}){super(),this.defaultIntlNumberFormatOptions={maximumSignificantDigits:XD.maximumDigits,useGrouping:!0},this.defaultScaledUnitFormatters=new Map,this.leadingZeroIntlNumberFormatOptions={maximumFractionDigits:XD.maximumDigits-1,useGrouping:!0},this.leadingZeroScaledUnitFormatters=new Map,this.exponentialIntlNumberFormatOptions={maximumSignificantDigits:XD.maximumDigits,notation:"scientific"}
10921
+ return{scaledValue:e/n.scaleFactor,scaledUnit:n}}}const eN=new class extends QD{constructor(){super([new YD(1,XD.createFactory({}))])}}
10922
+ class tN extends KD{constructor(e,{unitScale:t=eN}={unitScale:eN}){super(),this.defaultIntlNumberFormatOptions={maximumSignificantDigits:tN.maximumDigits,useGrouping:!0},this.defaultScaledUnitFormatters=new Map,this.leadingZeroIntlNumberFormatOptions={maximumFractionDigits:tN.maximumDigits-1,useGrouping:!0},this.leadingZeroScaledUnitFormatters=new Map,this.exponentialIntlNumberFormatOptions={maximumSignificantDigits:tN.maximumDigits,notation:"scientific"}
10898
10923
  for(const n of t.supportedScaledUnits)this.defaultScaledUnitFormatters.set(n.scaleFactor,n.scaledUnitFormatFactory({locale:e,intlNumberFormatOptions:this.defaultIntlNumberFormatOptions})),this.leadingZeroScaledUnitFormatters.set(n.scaleFactor,n.scaledUnitFormatFactory({locale:e,intlNumberFormatOptions:this.leadingZeroIntlNumberFormatOptions}))
10899
10924
  this.exponentialScaledUnitFormatter=t.baseScaledUnit.scaledUnitFormatFactory({locale:e,intlNumberFormatOptions:this.exponentialIntlNumberFormatOptions}),this.unitScale=t}resolvedOptions(){return{unitScale:this.unitScale}}tryFormat(e){const t=0===e?0:e,{scaledValue:n,scaledUnit:i}=this.unitScale.scaleNumber(t)
10900
10925
  switch(this.resolveNumberStyle(n)){case"default":return this.defaultScaledUnitFormatters.get(i.scaleFactor).format(n)
@@ -10902,29 +10927,29 @@ case"leadingZero":return this.leadingZeroScaledUnitFormatters.get(i.scaleFactor)
10902
10927
  case"exponential":return this.exponentialScaledUnitFormatter.format(t)
10903
10928
  default:throw new Error("Unexpected number format style")}}resolveNumberStyle(e){if(0===e)return"default"
10904
10929
  const t=Math.abs(e)
10905
- return t>=XD.exponentialUpperBound||t<XD.exponentialLowerBound?"exponential":t<1?"leadingZero":"default"}}XD.maximumDigits=6,XD.exponentialLowerBound=995e-6,XD.exponentialUpperBound=999999.5
10906
- class YD extends UD{constructor(e,{minimumFractionDigits:t=0,maximumFractionDigits:n=Math.max(3,t),unitScale:i=JD}={minimumFractionDigits:0,maximumFractionDigits:3,unitScale:JD}){super(),this.scaledUnitFormatters=new Map
10930
+ return t>=tN.exponentialUpperBound||t<tN.exponentialLowerBound?"exponential":t<1?"leadingZero":"default"}}tN.maximumDigits=6,tN.exponentialLowerBound=995e-6,tN.exponentialUpperBound=999999.5
10931
+ class nN extends KD{constructor(e,{minimumFractionDigits:t=0,maximumFractionDigits:n=Math.max(3,t),unitScale:i=eN}={minimumFractionDigits:0,maximumFractionDigits:3,unitScale:eN}){super(),this.scaledUnitFormatters=new Map
10907
10932
  const o={maximumFractionDigits:n,minimumFractionDigits:t,useGrouping:!0}
10908
10933
  for(const t of i.supportedScaledUnits)this.scaledUnitFormatters.set(t.scaleFactor,t.scaledUnitFormatFactory({locale:e,intlNumberFormatOptions:o}))
10909
10934
  this.tenPowDecimalDigits=10**n,this.unitScale=i,this.minimumFractionDigits=t,this.maximumFractionDigits=n}resolvedOptions(){return{unitScale:this.unitScale,maximumFractionDigits:this.maximumFractionDigits,minimumFractionDigits:this.minimumFractionDigits}}tryFormat(e){const{scaledValue:t,scaledUnit:n}=this.unitScale.scaleNumber(e),i=this.willRoundToZero(t)?0:t
10910
- return this.scaledUnitFormatters.get(n.scaleFactor).format(i)}willRoundToZero(e){return 0===Math.round(e*this.tenPowDecimalDigits)}}const QD=["invalidDecimalDigits","invalidDecimalMaximumDigits","decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits","moreThanOneUnitSpecified"]
10911
- class eN extends mD{constructor(e){super(e,QD)}validateDecimalDigits(e,t){const n=!!(e===BD&&"number"==typeof t)&&this.isInvalidDecimalDigitsValue(t)
10912
- this.setConditionValue("invalidDecimalDigits",n)}validateDecimalMaximumDigits(e,t){const n=!!(e===BD&&"number"==typeof t)&&this.isInvalidDecimalDigitsValue(t)
10913
- this.setConditionValue("invalidDecimalMaximumDigits",n)}validateNoMutuallyExclusiveProperties(e,t,n){const i=!!(e===BD)&&("number"==typeof t&&"number"==typeof n)
10935
+ return this.scaledUnitFormatters.get(n.scaleFactor).format(i)}willRoundToZero(e){return 0===Math.round(e*this.tenPowDecimalDigits)}}const iN=["invalidDecimalDigits","invalidDecimalMaximumDigits","decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits","moreThanOneUnitSpecified"]
10936
+ class oN extends wD{constructor(e){super(e,iN)}validateDecimalDigits(e,t){const n=!!(e===WD&&"number"==typeof t)&&this.isInvalidDecimalDigitsValue(t)
10937
+ this.setConditionValue("invalidDecimalDigits",n)}validateDecimalMaximumDigits(e,t){const n=!!(e===WD&&"number"==typeof t)&&this.isInvalidDecimalDigitsValue(t)
10938
+ this.setConditionValue("invalidDecimalMaximumDigits",n)}validateNoMutuallyExclusiveProperties(e,t,n){const i=!!(e===WD)&&("number"==typeof t&&"number"==typeof n)
10914
10939
  this.setConditionValue("decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits",i)}validateAtMostOneUnit(e){const t=e.length>1
10915
- this.setConditionValue("moreThanOneUnitSpecified",t)}isInvalidDecimalDigitsValue(e){return e<0||e>20}}class tN extends Lt{}e([g],tN.prototype,"resolvedUnitScale",void 0)
10916
- class nN extends oD{constructor(){super(...arguments),this.validator=new eN(this.columnInternals),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}},this.unitSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),xa.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),xa.unsubscribe(this.langSubscriber,this)}get validity(){return this.validator.getValidity()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-number-text-cell-view",groupHeaderViewTag:"nimble-table-column-number-text-group-header-view",delegatedEvents:[],sortOperation:PT}}updateUnitNotifier(){if(this.unitNotifier&&(this.unitNotifier.unsubscribe(this.unitSubscriber),this.unitNotifier=void 0),this.unit){const e=m.getNotifier(this.unit)
10917
- e.subscribe(this.unitSubscriber,"resolvedUnitScale"),this.unitNotifier=e}}formatChanged(){this.updateColumnConfig()}alignmentChanged(){this.updateColumnConfig()}decimalDigitsChanged(){this.updateColumnConfig()}decimalMaximumDigitsChanged(){this.updateColumnConfig()}unitElementsChanged(){this.updateUnit()}async updateUnit(){this.unit=void 0,this.unitElements&&(await EE(this.unitElements),this.unit=this.unitElements.find((e=>e instanceof tN))),this.updateUnitNotifier()}unitChanged(){this.updateColumnConfig()}updateColumnConfig(){if(this.validator.validateDecimalDigits(this.format,this.decimalDigits),this.validator.validateDecimalMaximumDigits(this.format,this.decimalMaximumDigits),this.validator.validateNoMutuallyExclusiveProperties(this.format,this.decimalDigits,this.decimalMaximumDigits),this.validator.validateAtMostOneUnit(this.unitElements??[]),this.validator.isValid()){const e={formatter:this.createFormatter(),alignment:this.determineCellContentAlignment()}
10940
+ this.setConditionValue("moreThanOneUnitSpecified",t)}isInvalidDecimalDigitsValue(e){return e<0||e>20}}class rN extends Lt{}e([g],rN.prototype,"resolvedUnitScale",void 0)
10941
+ class sN extends lD{constructor(){super(...arguments),this.validator=new oN(this.columnInternals),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}},this.unitSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),xa.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),xa.unsubscribe(this.langSubscriber,this)}get validity(){return this.validator.getValidity()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-number-text-cell-view",groupHeaderViewTag:"nimble-table-column-number-text-group-header-view",delegatedEvents:[],sortOperation:PT}}updateUnitNotifier(){if(this.unitNotifier&&(this.unitNotifier.unsubscribe(this.unitSubscriber),this.unitNotifier=void 0),this.unit){const e=m.getNotifier(this.unit)
10942
+ e.subscribe(this.unitSubscriber,"resolvedUnitScale"),this.unitNotifier=e}}formatChanged(){this.updateColumnConfig()}alignmentChanged(){this.updateColumnConfig()}decimalDigitsChanged(){this.updateColumnConfig()}decimalMaximumDigitsChanged(){this.updateColumnConfig()}unitElementsChanged(){this.updateUnit()}async updateUnit(){this.unit=void 0,this.unitElements&&(await EE(this.unitElements),this.unit=this.unitElements.find((e=>e instanceof rN))),this.updateUnitNotifier()}unitChanged(){this.updateColumnConfig()}updateColumnConfig(){if(this.validator.validateDecimalDigits(this.format,this.decimalDigits),this.validator.validateDecimalMaximumDigits(this.format,this.decimalMaximumDigits),this.validator.validateNoMutuallyExclusiveProperties(this.format,this.decimalDigits,this.decimalMaximumDigits),this.validator.validateAtMostOneUnit(this.unitElements??[]),this.validator.isValid()){const e={formatter:this.createFormatter(),alignment:this.determineCellContentAlignment()}
10918
10943
  this.columnInternals.columnConfig=e}else this.columnInternals.columnConfig=void 0}createFormatter(){const e=this.unit?.resolvedUnitScale
10919
- if(this.format===BD){const t="number"==typeof this.decimalMaximumDigits?0:this.decimalDigits??2,n=this.decimalMaximumDigits??this.decimalDigits??2
10920
- return new YD(xa.getValueFor(this),{minimumFractionDigits:t,maximumFractionDigits:n,unitScale:e})}return new XD(xa.getValueFor(this),{unitScale:e})}determineCellContentAlignment(){return this.alignment===qD?aD:this.alignment===jD?lD:this.format!==BD||"number"==typeof this.decimalMaximumDigits||this.unit?aD:lD}}e([se],nN.prototype,"format",void 0),e([se],nN.prototype,"alignment",void 0),e([se({attribute:"decimal-digits",converter:oe})],nN.prototype,"decimalDigits",void 0),e([se({attribute:"decimal-maximum-digits",converter:oe})],nN.prototype,"decimalMaximumDigits",void 0),e([g],nN.prototype,"unitElements",void 0),e([g],nN.prototype,"unit",void 0)
10921
- const iN=nN.compose({baseName:"table-column-number-text",template:FD,styles:qR})
10922
- bi.getOrCreate().withPrefix("nimble").register(iN())
10923
- const oN=[...ID,"unsupportedMappingType","invalidIconName","missingTextValue"]
10924
- class rN extends AD{constructor(e){super(e,oN)}static isIconMappingElement(e){return e instanceof rv}static isSupportedMappingElement(e){return e instanceof rv||e instanceof av}validate(e,t){super.validate(e,t),this.validateMappingTypes(e),this.validateIconNames(e),this.validateNoMissingText(e)}validateIconNames(e){const t=e.filter(rN.isIconMappingElement).some((e=>void 0===e.resolvedIcon))
10925
- this.setConditionValue("invalidIconName",t)}validateNoMissingText(e){const t=e.filter(rN.isSupportedMappingElement).some((e=>void 0===e.text))
10926
- this.setConditionValue("missingTextValue",t)}validateMappingTypes(e){const t=e.every(rN.isSupportedMappingElement)
10927
- this.setConditionValue("unsupportedMappingType",!t)}}const sN=we`
10944
+ if(this.format===WD){const t="number"==typeof this.decimalMaximumDigits?0:this.decimalDigits??2,n=this.decimalMaximumDigits??this.decimalDigits??2
10945
+ return new nN(xa.getValueFor(this),{minimumFractionDigits:t,maximumFractionDigits:n,unitScale:e})}return new tN(xa.getValueFor(this),{unitScale:e})}determineCellContentAlignment(){return this.alignment===ZD?hD:this.alignment===GD?uD:this.format!==WD||"number"==typeof this.decimalMaximumDigits||this.unit?hD:uD}}e([se],sN.prototype,"format",void 0),e([se],sN.prototype,"alignment",void 0),e([se({attribute:"decimal-digits",converter:oe})],sN.prototype,"decimalDigits",void 0),e([se({attribute:"decimal-maximum-digits",converter:oe})],sN.prototype,"decimalMaximumDigits",void 0),e([g],sN.prototype,"unitElements",void 0),e([g],sN.prototype,"unit",void 0)
10946
+ const aN=sN.compose({baseName:"table-column-number-text",template:qD,styles:ZR})
10947
+ bi.getOrCreate().withPrefix("nimble").register(aN())
10948
+ const lN=[...RD,"unsupportedMappingType","invalidIconName","missingTextValue"]
10949
+ class cN extends DD{constructor(e){super(e,lN)}static isIconMappingElement(e){return e instanceof rv}static isSupportedMappingElement(e){return e instanceof rv||e instanceof av}validate(e,t){super.validate(e,t),this.validateMappingTypes(e),this.validateIconNames(e),this.validateNoMissingText(e)}validateIconNames(e){const t=e.filter(cN.isIconMappingElement).some((e=>void 0===e.resolvedIcon))
10950
+ this.setConditionValue("invalidIconName",t)}validateNoMissingText(e){const t=e.filter(cN.isSupportedMappingElement).some((e=>void 0===e.text))
10951
+ this.setConditionValue("missingTextValue",t)}validateMappingTypes(e){const t=e.every(cN.isSupportedMappingElement)
10952
+ this.setConditionValue("unsupportedMappingType",!t)}}const dN=we`
10928
10953
  ${Oo("inline-flex")}
10929
10954
 
10930
10955
  :host {
@@ -10944,7 +10969,7 @@ this.setConditionValue("unsupportedMappingType",!t)}}const sN=we`
10944
10969
  overflow: hidden;
10945
10970
  text-overflow: ellipsis;
10946
10971
  }
10947
- `,aN=Z`
10972
+ `,hN=Z`
10948
10973
  ${Fe((e=>"icon"===e.visual),Z`
10949
10974
  ${e=>e.iconTemplate}
10950
10975
  <span
@@ -10963,7 +10988,7 @@ this.setConditionValue("unsupportedMappingType",!t)}}const sN=we`
10963
10988
  >${e=>e.text}</span>
10964
10989
  `)}
10965
10990
  `
10966
- class lN extends RD{constructor(e,t,n){var i
10991
+ class uN extends zD{constructor(e,t,n){var i
10967
10992
  super(n),this.severity=t,this.iconTemplate=Z`
10968
10993
  <${i=e}
10969
10994
  title="${e=>e.text}"
@@ -10972,14 +10997,14 @@ super(n),this.severity=t,this.iconTemplate=Z`
10972
10997
  severity="${e=>e.severity}"
10973
10998
  class="no-shrink"
10974
10999
  >
10975
- </${i}>`}}class cN extends RD{constructor(e){super(e)}}class dN extends XR{columnConfigChanged(){this.updateState()}groupHeaderValueChanged(){this.updateState()}updateState(){if(this.visual=void 0,!this.columnConfig)return
11000
+ </${i}>`}}class pN extends zD{constructor(e){super(e)}}class fN extends tD{columnConfigChanged(){this.updateState()}groupHeaderValueChanged(){this.updateState()}updateState(){if(this.visual=void 0,!this.columnConfig)return
10976
11001
  const e=this.groupHeaderValue
10977
11002
  if(null==e)return
10978
11003
  const t=this.columnConfig.mappingConfigs.get(e)
10979
- t instanceof lN?(this.visual="icon",this.severity=t.severity,this.text=t.text??"",this.iconTemplate=t.iconTemplate):t instanceof cN&&(this.visual="spinner",this.text=t.text??"")}}e([g],dN.prototype,"severity",void 0),e([g],dN.prototype,"iconTemplate",void 0),e([g],dN.prototype,"visual",void 0)
10980
- const hN=dN.compose({baseName:"table-column-icon-group-header-view",template:aN,styles:sN})
10981
- bi.getOrCreate().withPrefix("nimble").register(hN())
10982
- const uN=Z`
11004
+ t instanceof uN?(this.visual="icon",this.severity=t.severity,this.text=t.text??"",this.iconTemplate=t.iconTemplate):t instanceof pN&&(this.visual="spinner",this.text=t.text??"")}}e([g],fN.prototype,"severity",void 0),e([g],fN.prototype,"iconTemplate",void 0),e([g],fN.prototype,"visual",void 0)
11005
+ const mN=fN.compose({baseName:"table-column-icon-group-header-view",template:hN,styles:dN})
11006
+ bi.getOrCreate().withPrefix("nimble").register(mN())
11007
+ const gN=Z`
10983
11008
  ${Fe((e=>"icon"===e.visual),(e=>e.iconTemplate))}
10984
11009
  ${Fe((e=>"spinner"===e.visual),Z`
10985
11010
  <${AO}
@@ -10989,22 +11014,22 @@ const uN=Z`
10989
11014
  </${AO}>
10990
11015
  `)}
10991
11016
  `
10992
- class pN extends VT{columnConfigChanged(){this.updateState()}cellRecordChanged(){this.updateState()}updateState(){if(this.visual=void 0,!this.columnConfig||!this.cellRecord)return
11017
+ class vN extends VT{columnConfigChanged(){this.updateState()}cellRecordChanged(){this.updateState()}updateState(){if(this.visual=void 0,!this.columnConfig||!this.cellRecord)return
10993
11018
  const e=this.cellRecord.value
10994
11019
  if(null==e)return
10995
11020
  const t=this.columnConfig.mappingConfigs.get(e)
10996
- t instanceof lN?(this.visual="icon",this.severity=t.severity,this.text=t.text,this.iconTemplate=t.iconTemplate):t instanceof cN&&(this.visual="spinner",this.text=t.text)}}e([g],pN.prototype,"severity",void 0),e([g],pN.prototype,"text",void 0),e([g],pN.prototype,"iconTemplate",void 0),e([g],pN.prototype,"visual",void 0)
10997
- const fN=pN.compose({baseName:"table-column-icon-cell-view",template:uN})
10998
- bi.getOrCreate().withPrefix("nimble").register(fN())
10999
- class mN extends(WR(UR(MD))){createValidator(){return new rN(this.columnInternals)}get validity(){return this.validator.getValidity()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-icon-cell-view",groupHeaderViewTag:"nimble-table-column-icon-group-header-view",delegatedEvents:[],sortOperation:PT}}createColumnConfig(e){return{mappingConfigs:e}}createMappingConfig(e){if(e instanceof rv){if(!e.resolvedIcon)throw Error("Unresolved icon")
11000
- return new lN(e.resolvedIcon,e.severity,e.text)}if(e instanceof av)return new cN(e.text)
11001
- throw new Error("Unsupported mapping")}}const gN=mN.compose({baseName:"table-column-icon",template:ED,styles:_D})
11002
- bi.getOrCreate().withPrefix("nimble").register(gN())
11003
- const vN=class extends hD{cellRecordChanged(){this.text="string"==typeof this.cellRecord?.value?this.cellRecord.value:""}}.compose({baseName:"table-column-text-cell-view",template:cD,styles:dD})
11004
- bi.getOrCreate().withPrefix("nimble").register(vN())
11005
- const bN=class extends oD{getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-text-cell-view",groupHeaderViewTag:tD,delegatedEvents:[],sortOperation:zT}}}.compose({baseName:"table-column-text",template:jR,styles:qR})
11021
+ t instanceof uN?(this.visual="icon",this.severity=t.severity,this.text=t.text,this.iconTemplate=t.iconTemplate):t instanceof pN&&(this.visual="spinner",this.text=t.text)}}e([g],vN.prototype,"severity",void 0),e([g],vN.prototype,"text",void 0),e([g],vN.prototype,"iconTemplate",void 0),e([g],vN.prototype,"visual",void 0)
11022
+ const bN=vN.compose({baseName:"table-column-icon-cell-view",template:gN})
11006
11023
  bi.getOrCreate().withPrefix("nimble").register(bN())
11007
- const wN=we`
11024
+ class wN extends(JR(KR(AD))){createValidator(){return new cN(this.columnInternals)}get validity(){return this.validator.getValidity()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-icon-cell-view",groupHeaderViewTag:"nimble-table-column-icon-group-header-view",delegatedEvents:[],sortOperation:PT}}createColumnConfig(e){return{mappingConfigs:e}}createMappingConfig(e){if(e instanceof rv){if(!e.resolvedIcon)throw Error("Unresolved icon")
11025
+ return new uN(e.resolvedIcon,e.severity,e.text)}if(e instanceof av)return new pN(e.text)
11026
+ throw new Error("Unsupported mapping")}}const yN=wN.compose({baseName:"table-column-icon",template:TD,styles:OD})
11027
+ bi.getOrCreate().withPrefix("nimble").register(yN())
11028
+ const xN=class extends mD{cellRecordChanged(){this.text="string"==typeof this.cellRecord?.value?this.cellRecord.value:""}}.compose({baseName:"table-column-text-cell-view",template:pD,styles:fD})
11029
+ bi.getOrCreate().withPrefix("nimble").register(xN())
11030
+ const kN=class extends lD{getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-text-cell-view",groupHeaderViewTag:rD,delegatedEvents:[],sortOperation:zT}}}.compose({baseName:"table-column-text",template:GR,styles:ZR})
11031
+ bi.getOrCreate().withPrefix("nimble").register(kN())
11032
+ const CN=we`
11008
11033
  ${Oo("grid")}
11009
11034
 
11010
11035
  :host {
@@ -11032,7 +11057,7 @@ const wN=we`
11032
11057
  overflow: auto;
11033
11058
  }
11034
11059
  `
11035
- const yN=class extends oo{constructor(){super(),this.activeindicator=!1}}.compose({baseName:"tabs",baseClass:oo,template:(e,t)=>Z`
11060
+ const SN=class extends oo{constructor(){super(),this.activeindicator=!1}}.compose({baseName:"tabs",baseClass:oo,template:(e,t)=>Z`
11036
11061
  <template class="${e=>e.orientation}">
11037
11062
  ${et(0,t)}
11038
11063
  <div class="tablist" part="tablist" role="tablist">
@@ -11051,9 +11076,9 @@ const yN=class extends oo{constructor(){super(),this.activeindicator=!1}}.compos
11051
11076
  <slot name="tabpanel" ${Ke("tabpanels")}></slot>
11052
11077
  </div>
11053
11078
  </template>
11054
- `,styles:wN})
11055
- bi.getOrCreate().withPrefix("nimble").register(yN())
11056
- const xN=we`
11079
+ `,styles:CN})
11080
+ bi.getOrCreate().withPrefix("nimble").register(SN())
11081
+ const $N=we`
11057
11082
  ${Oo("flex")}
11058
11083
 
11059
11084
  :host {
@@ -11071,15 +11096,15 @@ const xN=we`
11071
11096
  rgba(${Na}, 0.3);
11072
11097
  margin: ${tl} ${nl};
11073
11098
  }
11074
- `,kN=Z`
11099
+ `,MN=Z`
11075
11100
  <template slot="end">
11076
11101
  <div class="separator"></div>
11077
11102
  <slot></slot>
11078
11103
  </template>
11079
11104
  `
11080
- const CN=class extends Lt{}.compose({baseName:"tabs-toolbar",template:kN,styles:xN})
11081
- bi.getOrCreate().withPrefix("nimble").register(CN())
11082
- const SN="outline",$N="block",MN=we`
11105
+ const _N=class extends Lt{}.compose({baseName:"tabs-toolbar",template:MN,styles:$N})
11106
+ bi.getOrCreate().withPrefix("nimble").register(_N())
11107
+ const EN="outline",IN="block",AN=we`
11083
11108
  ${Oo("inline-flex")}
11084
11109
  ${qm}
11085
11110
 
@@ -11219,12 +11244,12 @@ const SN="outline",$N="block",MN=we`
11219
11244
  top: ${nl};
11220
11245
  right: var(--ni-private-scrollbar-width);
11221
11246
  }
11222
- `.withBehaviors(th(SN,we`
11247
+ `.withBehaviors(th(EN,we`
11223
11248
  .control {
11224
11249
  border-color: rgba(${Na}, 0.3);
11225
11250
  background-color: transparent;
11226
11251
  }
11227
- `),th($N,we`
11252
+ `),th(IN,we`
11228
11253
  .control {
11229
11254
  background-color: rgba(${Na}, 0.1);
11230
11255
  }
@@ -11242,8 +11267,8 @@ const SN="outline",$N="block",MN=we`
11242
11267
  border-bottom-color: ${Pa};
11243
11268
  }
11244
11269
  `))
11245
- class _N extends lo{constructor(){super(...arguments),this.appearance=SN,this.errorVisible=!1,this.scrollbarWidth=-1,this.updateScrollbarWidthQueued=!1}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver((()=>this.onResize())),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}onTextAreaInput(){this.handleTextInput(),this.queueUpdateScrollbarWidth()}placeholderChanged(){this.queueUpdateScrollbarWidth()}valueChanged(e,t){super.valueChanged(e,t),this.queueUpdateScrollbarWidth()}onResize(){this.scrollbarWidth=this.control.offsetWidth-this.control.clientWidth}queueUpdateScrollbarWidth(){this.$fastController.isConnected&&(this.updateScrollbarWidthQueued||(this.updateScrollbarWidthQueued=!0,u.queueUpdate((()=>this.updateScrollbarWidth()))))}updateScrollbarWidth(){this.updateScrollbarWidthQueued=!1,this.scrollbarWidth=this.control.offsetWidth-this.control.clientWidth}}e([se],_N.prototype,"appearance",void 0),e([se({attribute:"error-text"})],_N.prototype,"errorText",void 0),e([se({attribute:"error-visible",mode:"boolean"})],_N.prototype,"errorVisible",void 0),e([g],_N.prototype,"scrollbarWidth",void 0)
11246
- const EN=_N.compose({baseName:"text-area",baseClass:lo,template:()=>Z`
11270
+ class ON extends lo{constructor(){super(...arguments),this.appearance=EN,this.errorVisible=!1,this.scrollbarWidth=-1,this.updateScrollbarWidthQueued=!1}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver((()=>this.onResize())),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}onTextAreaInput(){this.handleTextInput(),this.queueUpdateScrollbarWidth()}placeholderChanged(){this.queueUpdateScrollbarWidth()}valueChanged(e,t){super.valueChanged(e,t),this.queueUpdateScrollbarWidth()}onResize(){this.scrollbarWidth=this.control.offsetWidth-this.control.clientWidth}queueUpdateScrollbarWidth(){this.$fastController.isConnected&&(this.updateScrollbarWidthQueued||(this.updateScrollbarWidthQueued=!0,u.queueUpdate((()=>this.updateScrollbarWidth()))))}updateScrollbarWidth(){this.updateScrollbarWidthQueued=!1,this.scrollbarWidth=this.control.offsetWidth-this.control.clientWidth}}e([se],ON.prototype,"appearance",void 0),e([se({attribute:"error-text"})],ON.prototype,"errorText",void 0),e([se({attribute:"error-visible",mode:"boolean"})],ON.prototype,"errorVisible",void 0),e([g],ON.prototype,"scrollbarWidth",void 0)
11271
+ const TN=ON.compose({baseName:"text-area",baseClass:lo,template:()=>Z`
11247
11272
  <label
11248
11273
  part="label"
11249
11274
  for="control"
@@ -11300,9 +11325,9 @@ const EN=_N.compose({baseName:"text-area",baseClass:lo,template:()=>Z`
11300
11325
  ></${Yf}>
11301
11326
  ${Pm}
11302
11327
  </div>
11303
- `,styles:MN,shadowOptions:{delegatesFocus:!0}})
11304
- bi.getOrCreate().withPrefix("nimble").register(EN())
11305
- const IN="underline",AN="outline",ON="block",TN="frameless",RN=we`
11328
+ `,styles:AN,shadowOptions:{delegatesFocus:!0}})
11329
+ bi.getOrCreate().withPrefix("nimble").register(TN())
11330
+ const RN="underline",DN="outline",NN="block",PN="frameless",zN=we`
11306
11331
  ${Oo("inline-block")}
11307
11332
  ${qm}
11308
11333
 
@@ -11474,12 +11499,12 @@ const IN="underline",AN="outline",ON="block",TN="frameless",RN=we`
11474
11499
  slot[name='actions']::slotted(*) {
11475
11500
  ${Qa.cssCustomProperty}: 24px;
11476
11501
  }
11477
- `.withBehaviors(th(IN,we`
11502
+ `.withBehaviors(th(RN,we`
11478
11503
  .root {
11479
11504
  border-bottom-width: ${rl};
11480
11505
  padding-bottom: 0;
11481
11506
  }
11482
- `),th(ON,we`
11507
+ `),th(NN,we`
11483
11508
  .root {
11484
11509
  background-color: rgba(${Na}, 0.1);
11485
11510
  }
@@ -11507,12 +11532,12 @@ const IN="underline",AN="outline",ON="block",TN="frameless",RN=we`
11507
11532
  :host([disabled]) .root {
11508
11533
  background-color: rgba(${Na}, 0.07);
11509
11534
  }
11510
- `),th(AN,we`
11535
+ `),th(DN,we`
11511
11536
  .root {
11512
11537
  border-width: ${rl};
11513
11538
  padding: 0;
11514
11539
  }
11515
- `),th(TN,we`
11540
+ `),th(PN,we`
11516
11541
  .control {
11517
11542
  padding-left: ${rl};
11518
11543
  padding-right: ${rl};
@@ -11530,8 +11555,8 @@ const IN="underline",AN="outline",ON="block",TN="frameless",RN=we`
11530
11555
  filter: invert(100%);
11531
11556
  }
11532
11557
  `))
11533
- class DN extends Li{constructor(){super(...arguments),this.appearance=IN,this.errorVisible=!1,this.fullBleed=!1}}e([se],DN.prototype,"appearance",void 0),e([se({attribute:"error-text"})],DN.prototype,"errorText",void 0),e([se({attribute:"error-visible",mode:"boolean"})],DN.prototype,"errorVisible",void 0),e([se({attribute:"full-bleed",mode:"boolean"})],DN.prototype,"fullBleed",void 0)
11534
- const NN=DN.compose({baseName:"text-field",baseClass:Li,template:(e,t)=>Z`
11558
+ class LN extends Li{constructor(){super(...arguments),this.appearance=RN,this.errorVisible=!1,this.fullBleed=!1}}e([se],LN.prototype,"appearance",void 0),e([se({attribute:"error-text"})],LN.prototype,"errorText",void 0),e([se({attribute:"error-visible",mode:"boolean"})],LN.prototype,"errorVisible",void 0),e([se({attribute:"full-bleed",mode:"boolean"})],LN.prototype,"fullBleed",void 0)
11559
+ const FN=LN.compose({baseName:"text-field",baseClass:Li,template:(e,t)=>Z`
11535
11560
  <template
11536
11561
  class="
11537
11562
  ${e=>e.readOnly?"readonly":""}
@@ -11591,7 +11616,7 @@ const NN=DN.compose({baseName:"text-field",baseClass:Li,template:(e,t)=>Z`
11591
11616
  ${Qe(0,t)}
11592
11617
  </div>
11593
11618
  </template>
11594
- `,styles:RN,shadowOptions:{delegatesFocus:!0},end:Z`
11619
+ `,styles:zN,shadowOptions:{delegatesFocus:!0},end:Z`
11595
11620
  <${Yf}
11596
11621
  severity="error"
11597
11622
  class="error-icon"
@@ -11601,8 +11626,8 @@ const NN=DN.compose({baseName:"text-field",baseClass:Li,template:(e,t)=>Z`
11601
11626
  </span>
11602
11627
  ${Pm}
11603
11628
  `})
11604
- bi.getOrCreate().withPrefix("nimble").register(NN())
11605
- const PN=we`
11629
+ bi.getOrCreate().withPrefix("nimble").register(FN())
11630
+ const VN=we`
11606
11631
  ${Oo("inline-flex")}
11607
11632
 
11608
11633
  :host {
@@ -11687,7 +11712,7 @@ const PN=we`
11687
11712
  .status-icon {
11688
11713
  opacity: 0.6;
11689
11714
  }
11690
- `)),zN=Z`
11715
+ `)),HN=Z`
11691
11716
  ${Fe((e=>e.tooltipVisible),Z`
11692
11717
  <${$h}
11693
11718
  class="anchored-region"
@@ -11720,11 +11745,11 @@ const PN=we`
11720
11745
  </${$h}>
11721
11746
  `)}
11722
11747
  `
11723
- class LN extends _o{constructor(){super(...arguments),this.iconVisible=!1}}e([se],LN.prototype,"severity",void 0),e([se({attribute:"icon-visible",mode:"boolean"})],LN.prototype,"iconVisible",void 0)
11724
- const FN=LN.compose({baseName:"tooltip",baseClass:_o,template:zN,styles:PN})
11725
- bi.getOrCreate().withPrefix("nimble").register(FN())
11726
- const VN="group-selected",HN="all",BN="leaves-only",qN="none"
11727
- class jN{constructor(e,t,n){this.ltr=e,this.rtl=t,this.source=n,this.attached=null}handleChange({target:e,token:t}){this.attach(t.getValueFor(e))}attach(e){this.attached!==this[e]&&(null!==this.attached&&this.source.$fastController.removeStyles(this.attached),this.attached=this[e],null!==this.attached&&this.source.$fastController.addStyles(this.attached))}}const UN=we`
11748
+ class BN extends _o{constructor(){super(...arguments),this.iconVisible=!1}}e([se],BN.prototype,"severity",void 0),e([se({attribute:"icon-visible",mode:"boolean"})],BN.prototype,"iconVisible",void 0)
11749
+ const qN=BN.compose({baseName:"tooltip",baseClass:_o,template:HN,styles:VN})
11750
+ bi.getOrCreate().withPrefix("nimble").register(qN())
11751
+ const jN="group-selected",UN="all",WN="leaves-only",ZN="none"
11752
+ class GN{constructor(e,t,n){this.ltr=e,this.rtl=t,this.source=n,this.attached=null}handleChange({target:e,token:t}){this.attach(t.getValueFor(e))}attach(e){this.attached!==this[e]&&(null!==this.attached&&this.source.$fastController.removeStyles(this.attached),this.attached=this[e],null!==this.attached&&this.source.$fastController.addStyles(this.attached))}}const KN=we`
11728
11753
  ${Oo("block")}
11729
11754
 
11730
11755
  :host {
@@ -11745,7 +11770,7 @@ class jN{constructor(e,t,n){this.ltr=e,this.rtl=t,this.source=n,this.attached=nu
11745
11770
  }
11746
11771
 
11747
11772
  ${""}
11748
- :host([${VN}])::after {
11773
+ :host([${jN}])::after {
11749
11774
  background: ${Va};
11750
11775
  border-radius: 0px;
11751
11776
  content: '';
@@ -11767,7 +11792,7 @@ class jN{constructor(e,t,n){this.ltr=e,this.rtl=t,this.source=n,this.attached=nu
11767
11792
  background: ${Ra};
11768
11793
  }
11769
11794
 
11770
- :host([${VN}]) .positioning-region:hover {
11795
+ :host([${jN}]) .positioning-region:hover {
11771
11796
  background: ${Ta};
11772
11797
  }
11773
11798
 
@@ -11873,7 +11898,7 @@ class jN{constructor(e,t,n){this.ltr=e,this.rtl=t,this.source=n,this.attached=nu
11873
11898
  display: block;
11874
11899
  }
11875
11900
  `.withBehaviors(new class{constructor(e,t){this.cache=new WeakMap,this.ltr=e,this.rtl=t}bind(e){this.attach(e)}unbind(e){const t=this.cache.get(e)
11876
- t&&ka.unsubscribe(t)}attach(e){const t=this.cache.get(e)||new jN(this.ltr,this.rtl,e),n=ka.getValueFor(e)
11901
+ t&&ka.unsubscribe(t)}attach(e){const t=this.cache.get(e)||new GN(this.ltr,this.rtl,e),n=ka.getValueFor(e)
11877
11902
  ka.subscribe(t),t.attach(n),this.cache.set(e,t)}}(we`
11878
11903
  .expand-collapse-button {
11879
11904
  left: var(
@@ -11905,8 +11930,8 @@ ka.subscribe(t),t.attach(n),this.cache.set(e,t)}}(we`
11905
11930
  transform: rotate(135deg);
11906
11931
  }
11907
11932
  `))
11908
- class WN extends Io{constructor(){super(...arguments),this.groupSelected=!1}}e([se({attribute:"group-selected",mode:"boolean"})],WN.prototype,"groupSelected",void 0)
11909
- const ZN=WN.compose({baseName:"tree-item",baseClass:Io,template:(e,t)=>Z`
11933
+ class JN extends Io{constructor(){super(...arguments),this.groupSelected=!1}}e([se({attribute:"group-selected",mode:"boolean"})],JN.prototype,"groupSelected",void 0)
11934
+ const XN=JN.compose({baseName:"tree-item",baseClass:Io,template:(e,t)=>Z`
11910
11935
  <template
11911
11936
  role="treeitem"
11912
11937
  slot="${e=>e.isNestedItem()?"item":void 0}"
@@ -11946,9 +11971,9 @@ const ZN=WN.compose({baseName:"tree-item",baseClass:Io,template:(e,t)=>Z`
11946
11971
  </div>
11947
11972
  `)}
11948
11973
  </template>
11949
- `,styles:UN,expandCollapseGlyph:Vh.data})
11950
- bi.getOrCreate().withPrefix("nimble").register(ZN())
11951
- const GN=we`
11974
+ `,styles:KN,expandCollapseGlyph:Vh.data})
11975
+ bi.getOrCreate().withPrefix("nimble").register(XN())
11976
+ const YN=we`
11952
11977
  ${Oo("flex")}
11953
11978
 
11954
11979
  :host {
@@ -11960,7 +11985,7 @@ const GN=we`
11960
11985
  :host(${Do}) {
11961
11986
  outline: none;
11962
11987
  }
11963
- `,KN=Z`
11988
+ `,QN=Z`
11964
11989
  <template
11965
11990
  role="tree"
11966
11991
  ${Ne("treeView")}
@@ -11974,245 +11999,246 @@ const GN=we`
11974
11999
  <slot ${Ke("slottedTreeItems")}></slot>
11975
12000
  </template>
11976
12001
  `
11977
- class JN extends Ao{constructor(){super(...arguments),this.selectionMode=HN,this.selectedItems=[]}handleClick(e){if(e.defaultPrevented)return!1
12002
+ class eP extends Ao{constructor(){super(...arguments),this.selectionMode=UN,this.selectedItems=[]}handleClick(e){if(e.defaultPrevented)return!1
11978
12003
  if(!(e.target instanceof Element&&Eo(e.target)))return!0
11979
12004
  const t=e.target
11980
- return!t.disabled&&(this.canSelect(t)?t.selected=!0:this.itemHasChildren(t)&&(t.expanded=!t.expanded),!0)}canSelect(e){switch(this.selectionMode){case HN:return!0
11981
- case qN:return!1
11982
- case BN:return!this.itemHasChildren(e)
11983
- default:return!0}}itemHasChildren(e){return null!==e.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const e of Array.from(this.children))e instanceof WN&&(e.groupSelected=!1)
12005
+ return!t.disabled&&(this.canSelect(t)?t.selected=!0:this.itemHasChildren(t)&&(t.expanded=!t.expanded),!0)}canSelect(e){switch(this.selectionMode){case UN:return!0
12006
+ case ZN:return!1
12007
+ case WN:return!this.itemHasChildren(e)
12008
+ default:return!0}}itemHasChildren(e){return null!==e.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const e of Array.from(this.children))e instanceof JN&&(e.groupSelected=!1)
11984
12009
  for(let e of this.selectedItems){for(;null!==e.parentElement&&e.parentElement!==this;)e=e.parentElement
11985
- e instanceof WN&&(e.groupSelected=!0)}}}e([se({attribute:"selection-mode"})],JN.prototype,"selectionMode",void 0),e([g],JN.prototype,"selectedItems",void 0)
11986
- const XN=JN.compose({baseName:"tree-view",baseClass:Ao,template:KN,styles:GN})
11987
- bi.getOrCreate().withPrefix("nimble").register(XN())
11988
- const YN=Z`<template slot="unit"></template>`
11989
- class QN extends WD{constructor(e,t,n){super(e),this.unitTranslations=t,this.unitPrefix=n,this.pluralRules=new Intl.PluralRules(this.locale),this.formatter=new Intl.NumberFormat(this.locale,this.intlNumberFormatOptions),this.unitTranslation=this.getTranslationToUse(this.locale)}static createFactory(e,t){return n=>new QN(n,e,t)}format(e){const t=this.formatter.format(e)
11990
- if(!this.unitPrefix.isBase())return`${t} ${this.unitPrefix.text}${this.unitTranslation.symbol}`
11991
- return`${t} ${"one"===this.pluralRules.select(e)?this.unitTranslation.singular:this.unitTranslation.plural}`}getTranslationToUse(e){const t=new Intl.Locale(e??"en"),n=t.language,i=t.region
11992
- return(i?this.unitTranslations.get(`${n}-${i}`):null)??this.unitTranslations.get(n)??this.unitTranslations.get("en")}}class eP extends KD{constructor(e,t){super(eP.createSupportedScaledUnits(e,t))}static createSupportedScaledUnits(e,t){if(!e.get("en"))throw new Error("English translations must exist")
11993
- return t.map((t=>new GD(t.scaleFactor,QN.createFactory(e,t))))}}class tP{constructor(e,t){if(this.scaleFactor=e,this.text=t,1===e&&""!==t)throw new Error("Base scale factor of 1 has unused text and should be empty string")}isBase(){return 1===this.scaleFactor}}class nP{constructor(e,t,n){this.singular=e,this.plural=t,this.symbol=n}}const iP=new class extends eP{constructor(){super(new Map([["en",new nP("byte","bytes","B")],["fr",new nP("octet","octets","o")],["de",new nP("Byte","Byte","B")],["ja",new nP("バイト","バイト","B")],["zh",new nP("字节","字节","B")]]),[new tP(1,""),new tP(1024,"Ki"),new tP(1048576,"Mi"),new tP(1024**3,"Gi"),new tP(1024**4,"Ti"),new tP(1024**5,"Pi")])}}
11994
- const oP=new class extends KD{constructor(){super([new GD(1,ZD.createFactory({style:"unit",unit:"byte",unitDisplay:"long"})),new GD(1e3,ZD.createFactory({style:"unit",unit:"kilobyte",unitDisplay:"short"})),new GD(10**6,ZD.createFactory({style:"unit",unit:"megabyte",unitDisplay:"short"})),new GD(10**9,ZD.createFactory({style:"unit",unit:"gigabyte",unitDisplay:"short"})),new GD(10**12,ZD.createFactory({style:"unit",unit:"terabyte",unitDisplay:"short"})),new GD(10**15,ZD.createFactory({style:"unit",unit:"petabyte",unitDisplay:"short"}))])}}
11995
- class rP extends tN{constructor(){super(),this.binary=!1,this.resolvedUnitScale=oP}binaryChanged(){this.resolvedUnitScale=this.binary?iP:oP}}e([se({mode:"boolean"})],rP.prototype,"binary",void 0)
11996
- const sP=rP.compose({baseName:"unit-byte",template:YN})
11997
- bi.getOrCreate().withPrefix("nimble").register(sP())
11998
- const aP=[new tP(1e-15,"f"),new tP(1e-12,"p"),new tP(1e-9,"n"),new tP(10**-6,"μ"),new tP(.001,"m"),new tP(.01,"c"),new tP(.1,"d"),new tP(1,""),new tP(1e3,"k"),new tP(10**6,"M"),new tP(10**9,"G"),new tP(10**12,"T"),new tP(10**15,"P"),new tP(10**18,"E")]
11999
- const lP=new class extends eP{constructor(){super(new Map([["en",new nP("volt","volts","V")],["fr",new nP("volt","volts","V")],["de",new nP("Volt","Volt","V")],["ja",new nP("ボルト","ボルト","V")],["zh",new nP("伏特","伏特","V")]]),aP)}}
12000
- const cP=class extends tN{constructor(){super(),this.resolvedUnitScale=lP}}.compose({baseName:"unit-volt",template:YN})
12001
- bi.getOrCreate().withPrefix("nimble").register(cP())
12002
- var dP={value:()=>{}}
12003
- function hP(){for(var e,t=0,n=arguments.length,i={};t<n;++t){if(!(e=arguments[t]+"")||e in i||/[\s.]/.test(e))throw new Error("illegal type: "+e)
12004
- i[e]=[]}return new uP(i)}function uP(e){this._=e}function pP(e,t){for(var n,i=0,o=e.length;i<o;++i)if((n=e[i]).name===t)return n.value}function fP(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=dP,e=e.slice(0,i).concat(e.slice(i+1))
12005
- break}return null!=n&&e.push({name:t,value:n}),e}uP.prototype=hP.prototype={constructor:uP,on:function(e,t){var n,i,o=this._,r=(i=o,(e+"").trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".")
12010
+ e instanceof JN&&(e.groupSelected=!0)}}}e([se({attribute:"selection-mode"})],eP.prototype,"selectionMode",void 0),e([g],eP.prototype,"selectedItems",void 0)
12011
+ const tP=eP.compose({baseName:"tree-view",baseClass:Ao,template:QN,styles:YN})
12012
+ bi.getOrCreate().withPrefix("nimble").register(tP())
12013
+ const nP=Z`<template slot="unit"></template>`
12014
+ class iP{constructor(e,t,n){this.singular=e,this.plural=t,this.symbol=n}}class oP extends JD{constructor(e,{unitTranslations:t,scaledPrefixText:n}){if(super(e),!t.get("en"))throw new Error('English translations must exist with locale string "en"')
12015
+ this.pluralRules=new Intl.PluralRules(this.locale),this.formatter=new Intl.NumberFormat(this.locale,this.intlNumberFormatOptions),this.unitTranslation=this.getTranslationToUse(t,this.locale),this.scaledPrefixText=n}static createFactory(e){return t=>new oP(t,e)}format(e){const t=this.formatter.format(e)
12016
+ if(""!==this.scaledPrefixText)return`${t} ${this.scaledPrefixText}${this.unitTranslation.symbol}`
12017
+ return`${t} ${"one"===this.pluralRules.select(e)?this.unitTranslation.singular:this.unitTranslation.plural}`}getTranslationToUse(e,t){const n=new Intl.Locale(t??"en"),i=n.language,o=n.region
12018
+ return(o?e.get(`${i}-${o}`):void 0)??e.get(i)??e.get("en")}}const rP=new Map([["en",new iP("byte","bytes","B")],["fr",new iP("octet","octets","o")],["de",new iP("Byte","Byte","B")],["ja",new iP("バイト","バイト","B")],["zh",new iP("字节","字节","B")]]),sP=[[1,""],[1024,"Ki"],[1048576,"Mi"],[1024**3,"Gi"],[1024**4,"Ti"],[1024**5,"Pi"]]
12019
+ const aP=new class extends QD{constructor(){super(sP.map((([e,t])=>new YD(e,oP.createFactory({unitTranslations:rP,scaledPrefixText:t})))))}},lP=[[1,"byte","long"],[1e3,"kilobyte","short"],[1e6,"megabyte","short"],[1e3**3,"gigabyte","short"],[1e3**4,"terabyte","short"],[1e3**5,"petabyte","short"]]
12020
+ const cP=new class extends QD{constructor(){super(lP.map((([e,t,n])=>new YD(e,XD.createFactory({style:"unit",unit:t,unitDisplay:n})))))}}
12021
+ class dP extends rN{constructor(){super(),this.binary=!1,this.resolvedUnitScale=cP}binaryChanged(){this.resolvedUnitScale=this.binary?aP:cP}}e([se({mode:"boolean"})],dP.prototype,"binary",void 0)
12022
+ const hP=dP.compose({baseName:"unit-byte",template:nP})
12023
+ bi.getOrCreate().withPrefix("nimble").register(hP())
12024
+ const uP=[[1e-15,"f"],[1e-12,"p"],[1e-9,"n"],[10**-6,"μ"],[.001,"m"],[.01,"c"],[.1,"d"],[1,""],[1e3,"k"],[10**6,"M"],[10**9,"G"],[10**12,"T"],[10**15,"P"],[10**18,"E"]],pP=new Map([["en",new iP("volt","volts","V")],["fr",new iP("volt","volts","V")],["de",new iP("Volt","Volt","V")],["ja",new iP("ボルト","ボルト","V")],["zh",new iP("伏特","伏特","V")]])
12025
+ const fP=new class extends QD{constructor(){super(uP.map((([e,t])=>new YD(e,oP.createFactory({unitTranslations:pP,scaledPrefixText:t})))))}}
12026
+ const mP=class extends rN{constructor(){super(),this.resolvedUnitScale=fP}}.compose({baseName:"unit-volt",template:nP})
12027
+ bi.getOrCreate().withPrefix("nimble").register(mP())
12028
+ var gP={value:()=>{}}
12029
+ function vP(){for(var e,t=0,n=arguments.length,i={};t<n;++t){if(!(e=arguments[t]+"")||e in i||/[\s.]/.test(e))throw new Error("illegal type: "+e)
12030
+ i[e]=[]}return new bP(i)}function bP(e){this._=e}function wP(e,t){for(var n,i=0,o=e.length;i<o;++i)if((n=e[i]).name===t)return n.value}function yP(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=gP,e=e.slice(0,i).concat(e.slice(i+1))
12031
+ break}return null!=n&&e.push({name:t,value:n}),e}bP.prototype=vP.prototype={constructor:bP,on:function(e,t){var n,i,o=this._,r=(i=o,(e+"").trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".")
12006
12032
  if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!i.hasOwnProperty(e))throw new Error("unknown type: "+e)
12007
12033
  return{type:e,name:t}}))),s=-1,a=r.length
12008
12034
  if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t)
12009
- for(;++s<a;)if(n=(e=r[s]).type)o[n]=fP(o[n],e.name,t)
12010
- else if(null==t)for(n in o)o[n]=fP(o[n],e.name,null)
12011
- return this}for(;++s<a;)if((n=(e=r[s]).type)&&(n=pP(o[n],e.name)))return n},copy:function(){var e={},t=this._
12035
+ for(;++s<a;)if(n=(e=r[s]).type)o[n]=yP(o[n],e.name,t)
12036
+ else if(null==t)for(n in o)o[n]=yP(o[n],e.name,null)
12037
+ return this}for(;++s<a;)if((n=(e=r[s]).type)&&(n=wP(o[n],e.name)))return n},copy:function(){var e={},t=this._
12012
12038
  for(var n in t)e[n]=t[n].slice()
12013
- return new uP(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,i,o=new Array(n),r=0;r<n;++r)o[r]=arguments[r+2]
12039
+ return new bP(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,i,o=new Array(n),r=0;r<n;++r)o[r]=arguments[r+2]
12014
12040
  if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e)
12015
12041
  for(r=0,n=(i=this._[e]).length;r<n;++r)i[r].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e)
12016
12042
  for(var i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)}}
12017
- var mP="http://www.w3.org/1999/xhtml",gP={svg:"http://www.w3.org/2000/svg",xhtml:mP,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}
12018
- function vP(e){var t=e+="",n=t.indexOf(":")
12019
- return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),gP.hasOwnProperty(t)?{space:gP[t],local:e}:e}function bP(e){return function(){var t=this.ownerDocument,n=this.namespaceURI
12020
- return n===mP&&t.documentElement.namespaceURI===mP?t.createElement(e):t.createElementNS(n,e)}}function wP(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function yP(e){var t=vP(e)
12021
- return(t.local?wP:bP)(t)}function xP(){}function kP(e){return null==e?xP:function(){return this.querySelector(e)}}function CP(){return[]}function SP(e){return null==e?CP:function(){return this.querySelectorAll(e)}}function $P(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t)
12022
- var t}}function MP(e){return function(){return this.matches(e)}}function _P(e){return function(t){return t.matches(e)}}var EP=Array.prototype.find
12023
- function IP(){return this.firstElementChild}var AP=Array.prototype.filter
12024
- function OP(){return Array.from(this.children)}function TP(e){return new Array(e.length)}function RP(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function DP(e,t,n,i,o,r){for(var s,a=0,l=t.length,c=r.length;a<c;++a)(s=t[a])?(s.__data__=r[a],i[a]=s):n[a]=new RP(e,r[a])
12025
- for(;a<l;++a)(s=t[a])&&(o[a]=s)}function NP(e,t,n,i,o,r,s){var a,l,c,d=new Map,h=t.length,u=r.length,p=new Array(h)
12043
+ var xP="http://www.w3.org/1999/xhtml",kP={svg:"http://www.w3.org/2000/svg",xhtml:xP,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}
12044
+ function CP(e){var t=e+="",n=t.indexOf(":")
12045
+ return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),kP.hasOwnProperty(t)?{space:kP[t],local:e}:e}function SP(e){return function(){var t=this.ownerDocument,n=this.namespaceURI
12046
+ return n===xP&&t.documentElement.namespaceURI===xP?t.createElement(e):t.createElementNS(n,e)}}function $P(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function MP(e){var t=CP(e)
12047
+ return(t.local?$P:SP)(t)}function _P(){}function EP(e){return null==e?_P:function(){return this.querySelector(e)}}function IP(){return[]}function AP(e){return null==e?IP:function(){return this.querySelectorAll(e)}}function OP(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t)
12048
+ var t}}function TP(e){return function(){return this.matches(e)}}function RP(e){return function(t){return t.matches(e)}}var DP=Array.prototype.find
12049
+ function NP(){return this.firstElementChild}var PP=Array.prototype.filter
12050
+ function zP(){return Array.from(this.children)}function LP(e){return new Array(e.length)}function FP(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function VP(e,t,n,i,o,r){for(var s,a=0,l=t.length,c=r.length;a<c;++a)(s=t[a])?(s.__data__=r[a],i[a]=s):n[a]=new FP(e,r[a])
12051
+ for(;a<l;++a)(s=t[a])&&(o[a]=s)}function HP(e,t,n,i,o,r,s){var a,l,c,d=new Map,h=t.length,u=r.length,p=new Array(h)
12026
12052
  for(a=0;a<h;++a)(l=t[a])&&(p[a]=c=s.call(l,l.__data__,a,t)+"",d.has(c)?o[a]=l:d.set(c,l))
12027
- for(a=0;a<u;++a)c=s.call(e,r[a],a,r)+"",(l=d.get(c))?(i[a]=l,l.__data__=r[a],d.delete(c)):n[a]=new RP(e,r[a])
12028
- for(a=0;a<h;++a)(l=t[a])&&d.get(p[a])===l&&(o[a]=l)}function PP(e){return e.__data__}function zP(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function LP(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function FP(e){return function(){this.removeAttribute(e)}}function VP(e){return function(){this.removeAttributeNS(e.space,e.local)}}function HP(e,t){return function(){this.setAttribute(e,t)}}function BP(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function qP(e,t){return function(){var n=t.apply(this,arguments)
12029
- null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function jP(e,t){return function(){var n=t.apply(this,arguments)
12030
- null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function UP(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function WP(e){return function(){this.style.removeProperty(e)}}function ZP(e,t,n){return function(){this.style.setProperty(e,t,n)}}function GP(e,t,n){return function(){var i=t.apply(this,arguments)
12031
- null==i?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function KP(e,t){return e.style.getPropertyValue(t)||UP(e).getComputedStyle(e,null).getPropertyValue(t)}function JP(e){return function(){delete this[e]}}function XP(e,t){return function(){this[e]=t}}function YP(e,t){return function(){var n=t.apply(this,arguments)
12032
- null==n?delete this[e]:this[e]=n}}function QP(e){return e.trim().split(/^|\s+/)}function ez(e){return e.classList||new tz(e)}function tz(e){this._node=e,this._names=QP(e.getAttribute("class")||"")}function nz(e,t){for(var n=ez(e),i=-1,o=t.length;++i<o;)n.add(t[i])}function iz(e,t){for(var n=ez(e),i=-1,o=t.length;++i<o;)n.remove(t[i])}function oz(e){return function(){nz(this,e)}}function rz(e){return function(){iz(this,e)}}function sz(e,t){return function(){(t.apply(this,arguments)?nz:iz)(this,e)}}function az(){this.textContent=""}function lz(e){return function(){this.textContent=e}}function cz(e){return function(){var t=e.apply(this,arguments)
12033
- this.textContent=null==t?"":t}}function dz(){this.innerHTML=""}function hz(e){return function(){this.innerHTML=e}}function uz(e){return function(){var t=e.apply(this,arguments)
12034
- this.innerHTML=null==t?"":t}}function pz(){this.nextSibling&&this.parentNode.appendChild(this)}function fz(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mz(){return null}function gz(){var e=this.parentNode
12035
- e&&e.removeChild(this)}function vz(){var e=this.cloneNode(!1),t=this.parentNode
12036
- return t?t.insertBefore(e,this.nextSibling):e}function bz(){var e=this.cloneNode(!0),t=this.parentNode
12037
- return t?t.insertBefore(e,this.nextSibling):e}function wz(e){return function(){var t=this.__on
12038
- if(t){for(var n,i=0,o=-1,r=t.length;i<r;++i)n=t[i],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function yz(e,t,n){return function(){var i,o=this.__on,r=function(e){return function(t){e.call(this,t,this.__data__)}}(t)
12053
+ for(a=0;a<u;++a)c=s.call(e,r[a],a,r)+"",(l=d.get(c))?(i[a]=l,l.__data__=r[a],d.delete(c)):n[a]=new FP(e,r[a])
12054
+ for(a=0;a<h;++a)(l=t[a])&&d.get(p[a])===l&&(o[a]=l)}function BP(e){return e.__data__}function qP(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function jP(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function UP(e){return function(){this.removeAttribute(e)}}function WP(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ZP(e,t){return function(){this.setAttribute(e,t)}}function GP(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function KP(e,t){return function(){var n=t.apply(this,arguments)
12055
+ null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function JP(e,t){return function(){var n=t.apply(this,arguments)
12056
+ null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function XP(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function YP(e){return function(){this.style.removeProperty(e)}}function QP(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ez(e,t,n){return function(){var i=t.apply(this,arguments)
12057
+ null==i?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function tz(e,t){return e.style.getPropertyValue(t)||XP(e).getComputedStyle(e,null).getPropertyValue(t)}function nz(e){return function(){delete this[e]}}function iz(e,t){return function(){this[e]=t}}function oz(e,t){return function(){var n=t.apply(this,arguments)
12058
+ null==n?delete this[e]:this[e]=n}}function rz(e){return e.trim().split(/^|\s+/)}function sz(e){return e.classList||new az(e)}function az(e){this._node=e,this._names=rz(e.getAttribute("class")||"")}function lz(e,t){for(var n=sz(e),i=-1,o=t.length;++i<o;)n.add(t[i])}function cz(e,t){for(var n=sz(e),i=-1,o=t.length;++i<o;)n.remove(t[i])}function dz(e){return function(){lz(this,e)}}function hz(e){return function(){cz(this,e)}}function uz(e,t){return function(){(t.apply(this,arguments)?lz:cz)(this,e)}}function pz(){this.textContent=""}function fz(e){return function(){this.textContent=e}}function mz(e){return function(){var t=e.apply(this,arguments)
12059
+ this.textContent=null==t?"":t}}function gz(){this.innerHTML=""}function vz(e){return function(){this.innerHTML=e}}function bz(e){return function(){var t=e.apply(this,arguments)
12060
+ this.innerHTML=null==t?"":t}}function wz(){this.nextSibling&&this.parentNode.appendChild(this)}function yz(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function xz(){return null}function kz(){var e=this.parentNode
12061
+ e&&e.removeChild(this)}function Cz(){var e=this.cloneNode(!1),t=this.parentNode
12062
+ return t?t.insertBefore(e,this.nextSibling):e}function Sz(){var e=this.cloneNode(!0),t=this.parentNode
12063
+ return t?t.insertBefore(e,this.nextSibling):e}function $z(e){return function(){var t=this.__on
12064
+ if(t){for(var n,i=0,o=-1,r=t.length;i<r;++i)n=t[i],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function Mz(e,t,n){return function(){var i,o=this.__on,r=function(e){return function(t){e.call(this,t,this.__data__)}}(t)
12039
12065
  if(o)for(var s=0,a=o.length;s<a;++s)if((i=o[s]).type===e.type&&i.name===e.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=r,i.options=n),void(i.value=t)
12040
- this.addEventListener(e.type,r,n),i={type:e.type,name:e.name,value:t,listener:r,options:n},o?o.push(i):this.__on=[i]}}function xz(e,t,n){var i=UP(e),o=i.CustomEvent
12041
- "function"==typeof o?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function kz(e,t){return function(){return xz(this,e,t)}}function Cz(e,t){return function(){return xz(this,e,t.apply(this,arguments))}}RP.prototype={constructor:RP,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},tz.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e)
12066
+ this.addEventListener(e.type,r,n),i={type:e.type,name:e.name,value:t,listener:r,options:n},o?o.push(i):this.__on=[i]}}function _z(e,t,n){var i=XP(e),o=i.CustomEvent
12067
+ "function"==typeof o?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Ez(e,t){return function(){return _z(this,e,t)}}function Iz(e,t){return function(){return _z(this,e,t.apply(this,arguments))}}FP.prototype={constructor:FP,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},az.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e)
12042
12068
  t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}
12043
- var Sz=[null]
12044
- function $z(e,t){this._groups=e,this._parents=t}function Mz(){return new $z([[document.documentElement]],Sz)}function _z(e){return"string"==typeof e?new $z([[document.querySelector(e)]],[document.documentElement]):new $z([[e]],Sz)}function Ez(e,t){if(e=function(e){let t
12069
+ var Az=[null]
12070
+ function Oz(e,t){this._groups=e,this._parents=t}function Tz(){return new Oz([[document.documentElement]],Az)}function Rz(e){return"string"==typeof e?new Oz([[document.querySelector(e)]],[document.documentElement]):new Oz([[e]],Az)}function Dz(e,t){if(e=function(e){let t
12045
12071
  for(;t=e.sourceEvent;)e=t
12046
12072
  return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t
12047
12073
  if(n.createSVGPoint){var i=n.createSVGPoint()
12048
12074
  return i.x=e.clientX,i.y=e.clientY,[(i=i.matrixTransform(t.getScreenCTM().inverse())).x,i.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect()
12049
- return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}$z.prototype=Mz.prototype={constructor:$z,select:function(e){"function"!=typeof e&&(e=kP(e))
12075
+ return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}Oz.prototype=Tz.prototype={constructor:Oz,select:function(e){"function"!=typeof e&&(e=EP(e))
12050
12076
  for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r,s,a=t[o],l=a.length,c=i[o]=new Array(l),d=0;d<l;++d)(r=a[d])&&(s=e.call(r,r.__data__,d,a))&&("__data__"in r&&(s.__data__=r.__data__),c[d]=s)
12051
- return new $z(i,this._parents)},selectAll:function(e){e="function"==typeof e?$P(e):SP(e)
12077
+ return new Oz(i,this._parents)},selectAll:function(e){e="function"==typeof e?OP(e):AP(e)
12052
12078
  for(var t=this._groups,n=t.length,i=[],o=[],r=0;r<n;++r)for(var s,a=t[r],l=a.length,c=0;c<l;++c)(s=a[c])&&(i.push(e.call(s,s.__data__,c,a)),o.push(s))
12053
- return new $z(i,o)},selectChild:function(e){return this.select(null==e?IP:function(e){return function(){return EP.call(this.children,e)}}("function"==typeof e?e:_P(e)))},selectChildren:function(e){return this.selectAll(null==e?OP:function(e){return function(){return AP.call(this.children,e)}}("function"==typeof e?e:_P(e)))},filter:function(e){"function"!=typeof e&&(e=MP(e))
12079
+ return new Oz(i,o)},selectChild:function(e){return this.select(null==e?NP:function(e){return function(){return DP.call(this.children,e)}}("function"==typeof e?e:RP(e)))},selectChildren:function(e){return this.selectAll(null==e?zP:function(e){return function(){return PP.call(this.children,e)}}("function"==typeof e?e:RP(e)))},filter:function(e){"function"!=typeof e&&(e=TP(e))
12054
12080
  for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r,s=t[o],a=s.length,l=i[o]=[],c=0;c<a;++c)(r=s[c])&&e.call(r,r.__data__,c,s)&&l.push(r)
12055
- return new $z(i,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,PP)
12056
- var n,i=t?NP:DP,o=this._parents,r=this._groups
12081
+ return new Oz(i,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,BP)
12082
+ var n,i=t?HP:VP,o=this._parents,r=this._groups
12057
12083
  "function"!=typeof e&&(n=e,e=function(){return n})
12058
- for(var s=r.length,a=new Array(s),l=new Array(s),c=new Array(s),d=0;d<s;++d){var h=o[d],u=r[d],p=u.length,f=zP(e.call(h,h&&h.__data__,d,o)),m=f.length,g=l[d]=new Array(m),v=a[d]=new Array(m)
12084
+ for(var s=r.length,a=new Array(s),l=new Array(s),c=new Array(s),d=0;d<s;++d){var h=o[d],u=r[d],p=u.length,f=qP(e.call(h,h&&h.__data__,d,o)),m=f.length,g=l[d]=new Array(m),v=a[d]=new Array(m)
12059
12085
  i(h,u,g,v,c[d]=new Array(p),f,t)
12060
- for(var b,w,y=0,x=0;y<m;++y)if(b=g[y]){for(y>=x&&(x=y+1);!(w=v[x])&&++x<m;);b._next=w||null}}return(a=new $z(a,o))._enter=l,a._exit=c,a},enter:function(){return new $z(this._enter||this._groups.map(TP),this._parents)},exit:function(){return new $z(this._exit||this._groups.map(TP),this._parents)},join:function(e,t,n){var i=this.enter(),o=this,r=this.exit()
12086
+ for(var b,w,y=0,x=0;y<m;++y)if(b=g[y]){for(y>=x&&(x=y+1);!(w=v[x])&&++x<m;);b._next=w||null}}return(a=new Oz(a,o))._enter=l,a._exit=c,a},enter:function(){return new Oz(this._enter||this._groups.map(LP),this._parents)},exit:function(){return new Oz(this._exit||this._groups.map(LP),this._parents)},join:function(e,t,n){var i=this.enter(),o=this,r=this.exit()
12061
12087
  return"function"==typeof e?(i=e(i))&&(i=i.selection()):i=i.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?r.remove():n(r),i&&o?i.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,o=n.length,r=i.length,s=Math.min(o,r),a=new Array(o),l=0;l<s;++l)for(var c,d=n[l],h=i[l],u=d.length,p=a[l]=new Array(u),f=0;f<u;++f)(c=d[f]||h[f])&&(p[f]=c)
12062
12088
  for(;l<o;++l)a[l]=n[l]
12063
- return new $z(a,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i,o=e[t],r=o.length-1,s=o[r];--r>=0;)(i=o[r])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i)
12064
- return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=LP)
12089
+ return new Oz(a,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i,o=e[t],r=o.length-1,s=o[r];--r>=0;)(i=o[r])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i)
12090
+ return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=jP)
12065
12091
  for(var n=this._groups,i=n.length,o=new Array(i),r=0;r<i;++r){for(var s,a=n[r],l=a.length,c=o[r]=new Array(l),d=0;d<l;++d)(s=a[d])&&(c[d]=s)
12066
- c.sort(t)}return new $z(o,this._parents).order()},call:function(){var e=arguments[0]
12092
+ c.sort(t)}return new Oz(o,this._parents).order()},call:function(){var e=arguments[0]
12067
12093
  return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,r=i.length;o<r;++o){var s=i[o]
12068
12094
  if(s)return s}return null},size:function(){let e=0
12069
12095
  for(const t of this)++e
12070
12096
  return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var o,r=t[n],s=0,a=r.length;s<a;++s)(o=r[s])&&e.call(o,o.__data__,s,r)
12071
- return this},attr:function(e,t){var n=vP(e)
12097
+ return this},attr:function(e,t){var n=CP(e)
12072
12098
  if(arguments.length<2){var i=this.node()
12073
- return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==t?n.local?VP:FP:"function"==typeof t?n.local?jP:qP:n.local?BP:HP)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?WP:"function"==typeof t?GP:ZP)(e,t,null==n?"":n)):KP(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?JP:"function"==typeof t?YP:XP)(e,t)):this.node()[e]},classed:function(e,t){var n=QP(e+"")
12074
- if(arguments.length<2){for(var i=ez(this.node()),o=-1,r=n.length;++o<r;)if(!i.contains(n[o]))return!1
12075
- return!0}return this.each(("function"==typeof t?sz:t?oz:rz)(n,t))},text:function(e){return arguments.length?this.each(null==e?az:("function"==typeof e?cz:lz)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?dz:("function"==typeof e?uz:hz)(e)):this.node().innerHTML},raise:function(){return this.each(pz)},lower:function(){return this.each(fz)},append:function(e){var t="function"==typeof e?e:yP(e)
12076
- return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:yP(e),i=null==t?mz:"function"==typeof t?t:kP(t)
12077
- return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(gz)},clone:function(e){return this.select(e?bz:vz)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var i,o,r=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".")
12099
+ return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==t?n.local?WP:UP:"function"==typeof t?n.local?JP:KP:n.local?GP:ZP)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?YP:"function"==typeof t?ez:QP)(e,t,null==n?"":n)):tz(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?nz:"function"==typeof t?oz:iz)(e,t)):this.node()[e]},classed:function(e,t){var n=rz(e+"")
12100
+ if(arguments.length<2){for(var i=sz(this.node()),o=-1,r=n.length;++o<r;)if(!i.contains(n[o]))return!1
12101
+ return!0}return this.each(("function"==typeof t?uz:t?dz:hz)(n,t))},text:function(e){return arguments.length?this.each(null==e?pz:("function"==typeof e?mz:fz)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?gz:("function"==typeof e?bz:vz)(e)):this.node().innerHTML},raise:function(){return this.each(wz)},lower:function(){return this.each(yz)},append:function(e){var t="function"==typeof e?e:MP(e)
12102
+ return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:MP(e),i=null==t?xz:"function"==typeof t?t:EP(t)
12103
+ return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(kz)},clone:function(e){return this.select(e?Sz:Cz)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var i,o,r=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".")
12078
12104
  return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),s=r.length
12079
- if(!(arguments.length<2)){for(a=t?yz:wz,i=0;i<s;++i)this.each(a(r[i],t,n))
12105
+ if(!(arguments.length<2)){for(a=t?Mz:$z,i=0;i<s;++i)this.each(a(r[i],t,n))
12080
12106
  return this}var a=this.node().__on
12081
- if(a)for(var l,c=0,d=a.length;c<d;++c)for(i=0,l=a[c];i<s;++i)if((o=r[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?Cz:kz)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i,o=e[t],r=0,s=o.length;r<s;++r)(i=o[r])&&(yield i)}}
12082
- const Iz={capture:!0,passive:!1}
12083
- function Az(e){e.preventDefault(),e.stopImmediatePropagation()}function Oz(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Tz(e,t){var n=Object.create(e.prototype)
12107
+ if(a)for(var l,c=0,d=a.length;c<d;++c)for(i=0,l=a[c];i<s;++i)if((o=r[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?Iz:Ez)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i,o=e[t],r=0,s=o.length;r<s;++r)(i=o[r])&&(yield i)}}
12108
+ const Nz={capture:!0,passive:!1}
12109
+ function Pz(e){e.preventDefault(),e.stopImmediatePropagation()}function zz(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Lz(e,t){var n=Object.create(e.prototype)
12084
12110
  for(var i in t)n[i]=t[i]
12085
- return n}function Rz(){}var Dz=.7,Nz=1/Dz,Pz="\\s*([+-]?\\d+)\\s*",zz="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Lz="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fz=/^#([0-9a-f]{3,8})$/,Vz=new RegExp(`^rgb\\(${Pz},${Pz},${Pz}\\)$`),Hz=new RegExp(`^rgb\\(${Lz},${Lz},${Lz}\\)$`),Bz=new RegExp(`^rgba\\(${Pz},${Pz},${Pz},${zz}\\)$`),qz=new RegExp(`^rgba\\(${Lz},${Lz},${Lz},${zz}\\)$`),jz=new RegExp(`^hsl\\(${zz},${Lz},${Lz}\\)$`),Uz=new RegExp(`^hsla\\(${zz},${Lz},${Lz},${zz}\\)$`),Wz={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074}
12086
- function Zz(){return this.rgb().formatHex()}function Gz(){return this.rgb().formatRgb()}function Kz(e){var t,n
12087
- return e=(e+"").trim().toLowerCase(),(t=Fz.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Jz(t):3===n?new Qz(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Xz(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Xz(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Vz.exec(e))?new Qz(t[1],t[2],t[3],1):(t=Hz.exec(e))?new Qz(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Bz.exec(e))?Xz(t[1],t[2],t[3],t[4]):(t=qz.exec(e))?Xz(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=jz.exec(e))?rL(t[1],t[2]/100,t[3]/100,1):(t=Uz.exec(e))?rL(t[1],t[2]/100,t[3]/100,t[4]):Wz.hasOwnProperty(e)?Jz(Wz[e]):"transparent"===e?new Qz(NaN,NaN,NaN,0):null}function Jz(e){return new Qz(e>>16&255,e>>8&255,255&e,1)}function Xz(e,t,n,i){return i<=0&&(e=t=n=NaN),new Qz(e,t,n,i)}function Yz(e,t,n,i){return 1===arguments.length?((o=e)instanceof Rz||(o=Kz(o)),o?new Qz((o=o.rgb()).r,o.g,o.b,o.opacity):new Qz):new Qz(e,t,n,null==i?1:i)
12088
- var o}function Qz(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function eL(){return`#${oL(this.r)}${oL(this.g)}${oL(this.b)}`}function tL(){const e=nL(this.opacity)
12089
- return`${1===e?"rgb(":"rgba("}${iL(this.r)}, ${iL(this.g)}, ${iL(this.b)}${1===e?")":`, ${e})`}`}function nL(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function iL(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function oL(e){return((e=iL(e))<16?"0":"")+e.toString(16)}function rL(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new aL(e,t,n,i)}function sL(e){if(e instanceof aL)return new aL(e.h,e.s,e.l,e.opacity)
12090
- if(e instanceof Rz||(e=Kz(e)),!e)return new aL
12091
- if(e instanceof aL)return e
12111
+ return n}function Fz(){}var Vz=.7,Hz=1/Vz,Bz="\\s*([+-]?\\d+)\\s*",qz="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",jz="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Uz=/^#([0-9a-f]{3,8})$/,Wz=new RegExp(`^rgb\\(${Bz},${Bz},${Bz}\\)$`),Zz=new RegExp(`^rgb\\(${jz},${jz},${jz}\\)$`),Gz=new RegExp(`^rgba\\(${Bz},${Bz},${Bz},${qz}\\)$`),Kz=new RegExp(`^rgba\\(${jz},${jz},${jz},${qz}\\)$`),Jz=new RegExp(`^hsl\\(${qz},${jz},${jz}\\)$`),Xz=new RegExp(`^hsla\\(${qz},${jz},${jz},${qz}\\)$`),Yz={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074}
12112
+ function Qz(){return this.rgb().formatHex()}function eL(){return this.rgb().formatRgb()}function tL(e){var t,n
12113
+ return e=(e+"").trim().toLowerCase(),(t=Uz.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?nL(t):3===n?new rL(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?iL(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?iL(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Wz.exec(e))?new rL(t[1],t[2],t[3],1):(t=Zz.exec(e))?new rL(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Gz.exec(e))?iL(t[1],t[2],t[3],t[4]):(t=Kz.exec(e))?iL(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Jz.exec(e))?hL(t[1],t[2]/100,t[3]/100,1):(t=Xz.exec(e))?hL(t[1],t[2]/100,t[3]/100,t[4]):Yz.hasOwnProperty(e)?nL(Yz[e]):"transparent"===e?new rL(NaN,NaN,NaN,0):null}function nL(e){return new rL(e>>16&255,e>>8&255,255&e,1)}function iL(e,t,n,i){return i<=0&&(e=t=n=NaN),new rL(e,t,n,i)}function oL(e,t,n,i){return 1===arguments.length?((o=e)instanceof Fz||(o=tL(o)),o?new rL((o=o.rgb()).r,o.g,o.b,o.opacity):new rL):new rL(e,t,n,null==i?1:i)
12114
+ var o}function rL(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function sL(){return`#${dL(this.r)}${dL(this.g)}${dL(this.b)}`}function aL(){const e=lL(this.opacity)
12115
+ return`${1===e?"rgb(":"rgba("}${cL(this.r)}, ${cL(this.g)}, ${cL(this.b)}${1===e?")":`, ${e})`}`}function lL(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function cL(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function dL(e){return((e=cL(e))<16?"0":"")+e.toString(16)}function hL(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new pL(e,t,n,i)}function uL(e){if(e instanceof pL)return new pL(e.h,e.s,e.l,e.opacity)
12116
+ if(e instanceof Fz||(e=tL(e)),!e)return new pL
12117
+ if(e instanceof pL)return e
12092
12118
  var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),r=Math.max(t,n,i),s=NaN,a=r-o,l=(r+o)/2
12093
- return a?(s=t===r?(n-i)/a+6*(n<i):n===r?(i-t)/a+2:(t-n)/a+4,a/=l<.5?r+o:2-r-o,s*=60):a=l>0&&l<1?0:s,new aL(s,a,l,e.opacity)}function aL(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function lL(e){return(e=(e||0)%360)<0?e+360:e}function cL(e){return Math.max(0,Math.min(1,e||0))}function dL(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Oz(Rz,Kz,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Zz,formatHex:Zz,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return sL(this).formatHsl()},formatRgb:Gz,toString:Gz}),Oz(Qz,Yz,Tz(Rz,{brighter(e){return e=null==e?Nz:Math.pow(Nz,e),new Qz(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Dz:Math.pow(Dz,e),new Qz(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Qz(iL(this.r),iL(this.g),iL(this.b),nL(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:eL,formatHex:eL,formatHex8:function(){return`#${oL(this.r)}${oL(this.g)}${oL(this.b)}${oL(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:tL,toString:tL})),Oz(aL,(function(e,t,n,i){return 1===arguments.length?sL(e):new aL(e,t,n,null==i?1:i)}),Tz(Rz,{brighter(e){return e=null==e?Nz:Math.pow(Nz,e),new aL(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Dz:Math.pow(Dz,e),new aL(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,o=2*n-i
12094
- return new Qz(dL(e>=240?e-240:e+120,o,i),dL(e,o,i),dL(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new aL(lL(this.h),cL(this.s),cL(this.l),nL(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=nL(this.opacity)
12095
- return`${1===e?"hsl(":"hsla("}${lL(this.h)}, ${100*cL(this.s)}%, ${100*cL(this.l)}%${1===e?")":`, ${e})`}`}}))
12096
- var hL=e=>()=>e
12097
- function uL(e){return 1==(e=+e)?pL:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}(t,n,e):hL(isNaN(t)?n:t)}}function pL(e,t){var n=t-e
12098
- return n?function(e,t){return function(n){return e+n*t}}(e,n):hL(isNaN(e)?t:e)}var fL=function e(t){var n=uL(t)
12099
- function i(e,t){var i=n((e=Yz(e)).r,(t=Yz(t)).r),o=n(e.g,t.g),r=n(e.b,t.b),s=pL(e.opacity,t.opacity)
12119
+ return a?(s=t===r?(n-i)/a+6*(n<i):n===r?(i-t)/a+2:(t-n)/a+4,a/=l<.5?r+o:2-r-o,s*=60):a=l>0&&l<1?0:s,new pL(s,a,l,e.opacity)}function pL(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function fL(e){return(e=(e||0)%360)<0?e+360:e}function mL(e){return Math.max(0,Math.min(1,e||0))}function gL(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}zz(Fz,tL,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Qz,formatHex:Qz,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return uL(this).formatHsl()},formatRgb:eL,toString:eL}),zz(rL,oL,Lz(Fz,{brighter(e){return e=null==e?Hz:Math.pow(Hz,e),new rL(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Vz:Math.pow(Vz,e),new rL(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new rL(cL(this.r),cL(this.g),cL(this.b),lL(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:sL,formatHex:sL,formatHex8:function(){return`#${dL(this.r)}${dL(this.g)}${dL(this.b)}${dL(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:aL,toString:aL})),zz(pL,(function(e,t,n,i){return 1===arguments.length?uL(e):new pL(e,t,n,null==i?1:i)}),Lz(Fz,{brighter(e){return e=null==e?Hz:Math.pow(Hz,e),new pL(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Vz:Math.pow(Vz,e),new pL(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,o=2*n-i
12120
+ return new rL(gL(e>=240?e-240:e+120,o,i),gL(e,o,i),gL(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new pL(fL(this.h),mL(this.s),mL(this.l),lL(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=lL(this.opacity)
12121
+ return`${1===e?"hsl(":"hsla("}${fL(this.h)}, ${100*mL(this.s)}%, ${100*mL(this.l)}%${1===e?")":`, ${e})`}`}}))
12122
+ var vL=e=>()=>e
12123
+ function bL(e){return 1==(e=+e)?wL:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}(t,n,e):vL(isNaN(t)?n:t)}}function wL(e,t){var n=t-e
12124
+ return n?function(e,t){return function(n){return e+n*t}}(e,n):vL(isNaN(e)?t:e)}var yL=function e(t){var n=bL(t)
12125
+ function i(e,t){var i=n((e=oL(e)).r,(t=oL(t)).r),o=n(e.g,t.g),r=n(e.b,t.b),s=wL(e.opacity,t.opacity)
12100
12126
  return function(t){return e.r=i(t),e.g=o(t),e.b=r(t),e.opacity=s(t),e+""}}return i.gamma=e,i}(1)
12101
- function mL(e,t){t||(t=[])
12127
+ function xL(e,t){t||(t=[])
12102
12128
  var n,i=e?Math.min(t.length,e.length):0,o=t.slice()
12103
12129
  return function(r){for(n=0;n<i;++n)o[n]=e[n]*(1-r)+t[n]*r
12104
- return o}}function gL(e,t){var n,i=t?t.length:0,o=e?Math.min(i,e.length):0,r=new Array(o),s=new Array(i)
12105
- for(n=0;n<o;++n)r[n]=CL(e[n],t[n])
12130
+ return o}}function kL(e,t){var n,i=t?t.length:0,o=e?Math.min(i,e.length):0,r=new Array(o),s=new Array(i)
12131
+ for(n=0;n<o;++n)r[n]=IL(e[n],t[n])
12106
12132
  for(;n<i;++n)s[n]=t[n]
12107
12133
  return function(e){for(n=0;n<o;++n)s[n]=r[n](e)
12108
- return s}}function vL(e,t){var n=new Date
12109
- return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function bL(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function wL(e,t){var n,i={},o={}
12110
- for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?i[n]=CL(e[n],t[n]):o[n]=t[n]
12134
+ return s}}function CL(e,t){var n=new Date
12135
+ return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function SL(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function $L(e,t){var n,i={},o={}
12136
+ for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?i[n]=IL(e[n],t[n]):o[n]=t[n]
12111
12137
  return function(e){for(n in i)o[n]=i[n](e)
12112
- return o}}var yL=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xL=new RegExp(yL.source,"g")
12113
- function kL(e,t){var n,i,o,r=yL.lastIndex=xL.lastIndex=0,s=-1,a=[],l=[]
12114
- for(e+="",t+="";(n=yL.exec(e))&&(i=xL.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),a[s]?a[s]+=o:a[++s]=o),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:bL(n,i)})),r=xL.lastIndex
12138
+ return o}}var ML=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_L=new RegExp(ML.source,"g")
12139
+ function EL(e,t){var n,i,o,r=ML.lastIndex=_L.lastIndex=0,s=-1,a=[],l=[]
12140
+ for(e+="",t+="";(n=ML.exec(e))&&(i=_L.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),a[s]?a[s]+=o:a[++s]=o),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:SL(n,i)})),r=_L.lastIndex
12115
12141
  return r<t.length&&(o=t.slice(r),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,i=0;i<t;++i)a[(n=l[i]).i]=n.x(e)
12116
- return a.join("")})}function CL(e,t){var n,i,o=typeof t
12117
- return null==t||"boolean"===o?hL(t):("number"===o?bL:"string"===o?(n=Kz(t))?(t=n,fL):kL:t instanceof Kz?fL:t instanceof Date?vL:(i=t,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(t)?gL:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?wL:bL:mL))(e,t)}function SL(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var $L,ML=180/Math.PI,_L={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}
12118
- function EL(e,t,n,i,o,r){var s,a,l
12119
- return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*i)&&(n-=e*l,i-=t*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),e*i<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:o,translateY:r,rotate:Math.atan2(t,e)*ML,skewX:Math.atan(l)*ML,scaleX:s,scaleY:a}}function IL(e,t,n,i){function o(e){return e.length?e.pop()+" ":""}return function(r,s){var a=[],l=[]
12142
+ return a.join("")})}function IL(e,t){var n,i,o=typeof t
12143
+ return null==t||"boolean"===o?vL(t):("number"===o?SL:"string"===o?(n=tL(t))?(t=n,yL):EL:t instanceof tL?yL:t instanceof Date?CL:(i=t,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(t)?kL:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?$L:SL:xL))(e,t)}function AL(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var OL,TL=180/Math.PI,RL={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}
12144
+ function DL(e,t,n,i,o,r){var s,a,l
12145
+ return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*i)&&(n-=e*l,i-=t*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),e*i<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:o,translateY:r,rotate:Math.atan2(t,e)*TL,skewX:Math.atan(l)*TL,scaleX:s,scaleY:a}}function NL(e,t,n,i){function o(e){return e.length?e.pop()+" ":""}return function(r,s){var a=[],l=[]
12120
12146
  return r=e(r),s=e(s),function(e,i,o,r,s,a){if(e!==o||i!==r){var l=s.push("translate(",null,t,null,n)
12121
- a.push({i:l-4,x:bL(e,o)},{i:l-2,x:bL(i,r)})}else(o||r)&&s.push("translate("+o+t+r+n)}(r.translateX,r.translateY,s.translateX,s.translateY,a,l),function(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(o(n)+"rotate(",null,i)-2,x:bL(e,t)})):t&&n.push(o(n)+"rotate("+t+i)}(r.rotate,s.rotate,a,l),function(e,t,n,r){e!==t?r.push({i:n.push(o(n)+"skewX(",null,i)-2,x:bL(e,t)}):t&&n.push(o(n)+"skewX("+t+i)}(r.skewX,s.skewX,a,l),function(e,t,n,i,r,s){if(e!==n||t!==i){var a=r.push(o(r)+"scale(",null,",",null,")")
12122
- s.push({i:a-4,x:bL(e,n)},{i:a-2,x:bL(t,i)})}else 1===n&&1===i||r.push(o(r)+"scale("+n+","+i+")")}(r.scaleX,r.scaleY,s.scaleX,s.scaleY,a,l),r=s=null,function(e){for(var t,n=-1,i=l.length;++n<i;)a[(t=l[n]).i]=t.x(e)
12123
- return a.join("")}}}var AL=IL((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"")
12124
- return t.isIdentity?_L:EL(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),OL=IL((function(e){return null==e?_L:($L||($L=document.createElementNS("http://www.w3.org/2000/svg","g")),$L.setAttribute("transform",e),(e=$L.transform.baseVal.consolidate())?EL((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):_L)}),", ",")",")")
12125
- function TL(e){return((e=Math.exp(e))+1/e)/2}var RL,DL,NL=function e(t,n,i){function o(e,o){var r,s,a=e[0],l=e[1],c=e[2],d=o[0],h=o[1],u=o[2],p=d-a,f=h-l,m=p*p+f*f
12147
+ a.push({i:l-4,x:SL(e,o)},{i:l-2,x:SL(i,r)})}else(o||r)&&s.push("translate("+o+t+r+n)}(r.translateX,r.translateY,s.translateX,s.translateY,a,l),function(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(o(n)+"rotate(",null,i)-2,x:SL(e,t)})):t&&n.push(o(n)+"rotate("+t+i)}(r.rotate,s.rotate,a,l),function(e,t,n,r){e!==t?r.push({i:n.push(o(n)+"skewX(",null,i)-2,x:SL(e,t)}):t&&n.push(o(n)+"skewX("+t+i)}(r.skewX,s.skewX,a,l),function(e,t,n,i,r,s){if(e!==n||t!==i){var a=r.push(o(r)+"scale(",null,",",null,")")
12148
+ s.push({i:a-4,x:SL(e,n)},{i:a-2,x:SL(t,i)})}else 1===n&&1===i||r.push(o(r)+"scale("+n+","+i+")")}(r.scaleX,r.scaleY,s.scaleX,s.scaleY,a,l),r=s=null,function(e){for(var t,n=-1,i=l.length;++n<i;)a[(t=l[n]).i]=t.x(e)
12149
+ return a.join("")}}}var PL=NL((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"")
12150
+ return t.isIdentity?RL:DL(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),zL=NL((function(e){return null==e?RL:(OL||(OL=document.createElementNS("http://www.w3.org/2000/svg","g")),OL.setAttribute("transform",e),(e=OL.transform.baseVal.consolidate())?DL((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):RL)}),", ",")",")")
12151
+ function LL(e){return((e=Math.exp(e))+1/e)/2}var FL,VL,HL=function e(t,n,i){function o(e,o){var r,s,a=e[0],l=e[1],c=e[2],d=o[0],h=o[1],u=o[2],p=d-a,f=h-l,m=p*p+f*f
12126
12152
  if(m<1e-12)s=Math.log(u/c)/t,r=function(e){return[a+e*p,l+e*f,c*Math.exp(t*e*s)]}
12127
12153
  else{var g=Math.sqrt(m),v=(u*u-c*c+i*m)/(2*c*n*g),b=(u*u-c*c-i*m)/(2*u*n*g),w=Math.log(Math.sqrt(v*v+1)-v),y=Math.log(Math.sqrt(b*b+1)-b)
12128
- s=(y-w)/t,r=function(e){var i,o=e*s,r=TL(w),d=c/(n*g)*(r*(i=t*o+w,((i=Math.exp(2*i))-1)/(i+1))-function(e){return((e=Math.exp(e))-1/e)/2}(w))
12129
- return[a+d*p,l+d*f,c*r/TL(t*o+w)]}}return r.duration=1e3*s*t/Math.SQRT2,r}return o.rho=function(t){var n=Math.max(.001,+t),i=n*n
12130
- return e(n,i,i*i)},o}(Math.SQRT2,2,4),PL=0,zL=0,LL=0,FL=1e3,VL=0,HL=0,BL=0,qL="object"==typeof performance&&performance.now?performance:Date,jL="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)}
12131
- function UL(){return HL||(jL(WL),HL=qL.now()+BL)}function WL(){HL=0}function ZL(){this._call=this._time=this._next=null}function GL(e,t,n){var i=new ZL
12132
- return i.restart(e,t,n),i}function KL(){HL=(VL=qL.now())+BL,PL=zL=0
12133
- try{!function(){UL(),++PL
12134
- for(var e,t=RL;t;)(e=HL-t._time)>=0&&t._call.call(void 0,e),t=t._next;--PL}()}finally{PL=0,function(){var e,t,n=RL,i=1/0
12135
- for(;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:RL=t)
12136
- DL=e,XL(i)}(),HL=0}}function JL(){var e=qL.now(),t=e-VL
12137
- t>FL&&(BL-=t,VL=e)}function XL(e){PL||(zL&&(zL=clearTimeout(zL)),e-HL>24?(e<1/0&&(zL=setTimeout(KL,e-qL.now()-BL)),LL&&(LL=clearInterval(LL))):(LL||(VL=qL.now(),LL=setInterval(JL,FL)),PL=1,jL(KL)))}function YL(e,t,n){var i=new ZL
12138
- return t=null==t?0:+t,i.restart((n=>{i.stop(),e(n+t)}),t,n),i}ZL.prototype=GL.prototype={constructor:ZL,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function")
12139
- n=(null==n?UL():+n)+(null==t?0:+t),this._next||DL===this||(DL?DL._next=this:RL=this,DL=this),this._call=e,this._time=n,XL()},stop:function(){this._call&&(this._call=null,this._time=1/0,XL())}}
12140
- var QL=hP("start","end","cancel","interrupt"),eF=[],tF=0,nF=1,iF=2,oF=3,rF=4,sF=5,aF=6
12141
- function lF(e,t,n,i,o,r){var s=e.__transition
12154
+ s=(y-w)/t,r=function(e){var i,o=e*s,r=LL(w),d=c/(n*g)*(r*(i=t*o+w,((i=Math.exp(2*i))-1)/(i+1))-function(e){return((e=Math.exp(e))-1/e)/2}(w))
12155
+ return[a+d*p,l+d*f,c*r/LL(t*o+w)]}}return r.duration=1e3*s*t/Math.SQRT2,r}return o.rho=function(t){var n=Math.max(.001,+t),i=n*n
12156
+ return e(n,i,i*i)},o}(Math.SQRT2,2,4),BL=0,qL=0,jL=0,UL=1e3,WL=0,ZL=0,GL=0,KL="object"==typeof performance&&performance.now?performance:Date,JL="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)}
12157
+ function XL(){return ZL||(JL(YL),ZL=KL.now()+GL)}function YL(){ZL=0}function QL(){this._call=this._time=this._next=null}function eF(e,t,n){var i=new QL
12158
+ return i.restart(e,t,n),i}function tF(){ZL=(WL=KL.now())+GL,BL=qL=0
12159
+ try{!function(){XL(),++BL
12160
+ for(var e,t=FL;t;)(e=ZL-t._time)>=0&&t._call.call(void 0,e),t=t._next;--BL}()}finally{BL=0,function(){var e,t,n=FL,i=1/0
12161
+ for(;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:FL=t)
12162
+ VL=e,iF(i)}(),ZL=0}}function nF(){var e=KL.now(),t=e-WL
12163
+ t>UL&&(GL-=t,WL=e)}function iF(e){BL||(qL&&(qL=clearTimeout(qL)),e-ZL>24?(e<1/0&&(qL=setTimeout(tF,e-KL.now()-GL)),jL&&(jL=clearInterval(jL))):(jL||(WL=KL.now(),jL=setInterval(nF,UL)),BL=1,JL(tF)))}function oF(e,t,n){var i=new QL
12164
+ return t=null==t?0:+t,i.restart((n=>{i.stop(),e(n+t)}),t,n),i}QL.prototype=eF.prototype={constructor:QL,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function")
12165
+ n=(null==n?XL():+n)+(null==t?0:+t),this._next||VL===this||(VL?VL._next=this:FL=this,VL=this),this._call=e,this._time=n,iF()},stop:function(){this._call&&(this._call=null,this._time=1/0,iF())}}
12166
+ var rF=vP("start","end","cancel","interrupt"),sF=[],aF=0,lF=1,cF=2,dF=3,hF=4,uF=5,pF=6
12167
+ function fF(e,t,n,i,o,r){var s=e.__transition
12142
12168
  if(s){if(n in s)return}else e.__transition={}
12143
12169
  !function(e,t,n){var i,o=e.__transition
12144
- function r(e){n.state=nF,n.timer.restart(s,n.delay,n.time),n.delay<=e&&s(e-n.delay)}function s(r){var c,d,h,u
12145
- if(n.state!==nF)return l()
12146
- for(c in o)if((u=o[c]).name===n.name){if(u.state===oF)return YL(s)
12147
- u.state===rF?(u.state=aF,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete o[c]):+c<t&&(u.state=aF,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete o[c])}if(YL((function(){n.state===oF&&(n.state=rF,n.timer.restart(a,n.delay,n.time),a(r))})),n.state=iF,n.on.call("start",e,e.__data__,n.index,n.group),n.state===iF){for(n.state=oF,i=new Array(h=n.tween.length),c=0,d=-1;c<h;++c)(u=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=u)
12148
- i.length=d+1}}function a(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=sF,1),r=-1,s=i.length;++r<s;)i[r].call(e,o)
12149
- n.state===sF&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var i in n.state=aF,n.timer.stop(),delete o[t],o)return
12150
- delete e.__transition}o[t]=n,n.timer=GL(r,0,n.time)}(e,n,{name:t,index:i,group:o,on:QL,tween:eF,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:tF})}function cF(e,t){var n=hF(e,t)
12151
- if(n.state>tF)throw new Error("too late; already scheduled")
12152
- return n}function dF(e,t){var n=hF(e,t)
12153
- if(n.state>oF)throw new Error("too late; already running")
12154
- return n}function hF(e,t){var n=e.__transition
12170
+ function r(e){n.state=lF,n.timer.restart(s,n.delay,n.time),n.delay<=e&&s(e-n.delay)}function s(r){var c,d,h,u
12171
+ if(n.state!==lF)return l()
12172
+ for(c in o)if((u=o[c]).name===n.name){if(u.state===dF)return oF(s)
12173
+ u.state===hF?(u.state=pF,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete o[c]):+c<t&&(u.state=pF,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete o[c])}if(oF((function(){n.state===dF&&(n.state=hF,n.timer.restart(a,n.delay,n.time),a(r))})),n.state=cF,n.on.call("start",e,e.__data__,n.index,n.group),n.state===cF){for(n.state=dF,i=new Array(h=n.tween.length),c=0,d=-1;c<h;++c)(u=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=u)
12174
+ i.length=d+1}}function a(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=uF,1),r=-1,s=i.length;++r<s;)i[r].call(e,o)
12175
+ n.state===uF&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var i in n.state=pF,n.timer.stop(),delete o[t],o)return
12176
+ delete e.__transition}o[t]=n,n.timer=eF(r,0,n.time)}(e,n,{name:t,index:i,group:o,on:rF,tween:sF,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:aF})}function mF(e,t){var n=vF(e,t)
12177
+ if(n.state>aF)throw new Error("too late; already scheduled")
12178
+ return n}function gF(e,t){var n=vF(e,t)
12179
+ if(n.state>dF)throw new Error("too late; already running")
12180
+ return n}function vF(e,t){var n=e.__transition
12155
12181
  if(!n||!(n=n[t]))throw new Error("transition not found")
12156
- return n}function uF(e,t){var n,i,o,r=e.__transition,s=!0
12157
- if(r){for(o in t=null==t?null:t+"",r)(n=r[o]).name===t?(i=n.state>iF&&n.state<sF,n.state=aF,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[o]):s=!1
12158
- s&&delete e.__transition}}function pF(e,t){var n,i
12159
- return function(){var o=dF(this,e),r=o.tween
12182
+ return n}function bF(e,t){var n,i,o,r=e.__transition,s=!0
12183
+ if(r){for(o in t=null==t?null:t+"",r)(n=r[o]).name===t?(i=n.state>cF&&n.state<uF,n.state=pF,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[o]):s=!1
12184
+ s&&delete e.__transition}}function wF(e,t){var n,i
12185
+ return function(){var o=gF(this,e),r=o.tween
12160
12186
  if(r!==n)for(var s=0,a=(i=n=r).length;s<a;++s)if(i[s].name===t){(i=i.slice()).splice(s,1)
12161
- break}o.tween=i}}function fF(e,t,n){var i,o
12187
+ break}o.tween=i}}function yF(e,t,n){var i,o
12162
12188
  if("function"!=typeof n)throw new Error
12163
- return function(){var r=dF(this,e),s=r.tween
12189
+ return function(){var r=gF(this,e),s=r.tween
12164
12190
  if(s!==i){o=(i=s).slice()
12165
12191
  for(var a={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=a
12166
- break}l===c&&o.push(a)}r.tween=o}}function mF(e,t,n){var i=e._id
12167
- return e.each((function(){var e=dF(this,i);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return hF(e,i).value[t]}}function gF(e,t){var n
12168
- return("number"==typeof t?bL:t instanceof Kz?fL:(n=Kz(t))?(t=n,fL):kL)(e,t)}function vF(e){return function(){this.removeAttribute(e)}}function bF(e){return function(){this.removeAttributeNS(e.space,e.local)}}function wF(e,t,n){var i,o,r=n+""
12192
+ break}l===c&&o.push(a)}r.tween=o}}function xF(e,t,n){var i=e._id
12193
+ return e.each((function(){var e=gF(this,i);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return vF(e,i).value[t]}}function kF(e,t){var n
12194
+ return("number"==typeof t?SL:t instanceof tL?yL:(n=tL(t))?(t=n,yL):EL)(e,t)}function CF(e){return function(){this.removeAttribute(e)}}function SF(e){return function(){this.removeAttributeNS(e.space,e.local)}}function $F(e,t,n){var i,o,r=n+""
12169
12195
  return function(){var s=this.getAttribute(e)
12170
- return s===r?null:s===i?o:o=t(i=s,n)}}function yF(e,t,n){var i,o,r=n+""
12196
+ return s===r?null:s===i?o:o=t(i=s,n)}}function MF(e,t,n){var i,o,r=n+""
12171
12197
  return function(){var s=this.getAttributeNS(e.space,e.local)
12172
- return s===r?null:s===i?o:o=t(i=s,n)}}function xF(e,t,n){var i,o,r
12198
+ return s===r?null:s===i?o:o=t(i=s,n)}}function _F(e,t,n){var i,o,r
12173
12199
  return function(){var s,a,l=n(this)
12174
12200
  if(null!=l)return(s=this.getAttribute(e))===(a=l+"")?null:s===i&&a===o?r:(o=a,r=t(i=s,l))
12175
- this.removeAttribute(e)}}function kF(e,t,n){var i,o,r
12201
+ this.removeAttribute(e)}}function EF(e,t,n){var i,o,r
12176
12202
  return function(){var s,a,l=n(this)
12177
12203
  if(null!=l)return(s=this.getAttributeNS(e.space,e.local))===(a=l+"")?null:s===i&&a===o?r:(o=a,r=t(i=s,l))
12178
- this.removeAttributeNS(e.space,e.local)}}function CF(e,t){var n,i
12204
+ this.removeAttributeNS(e.space,e.local)}}function IF(e,t){var n,i
12179
12205
  function o(){var o=t.apply(this,arguments)
12180
- return o!==i&&(n=(i=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function SF(e,t){var n,i
12206
+ return o!==i&&(n=(i=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function AF(e,t){var n,i
12181
12207
  function o(){var o=t.apply(this,arguments)
12182
- return o!==i&&(n=(i=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function $F(e,t){return function(){cF(this,e).delay=+t.apply(this,arguments)}}function MF(e,t){return t=+t,function(){cF(this,e).delay=t}}function _F(e,t){return function(){dF(this,e).duration=+t.apply(this,arguments)}}function EF(e,t){return t=+t,function(){dF(this,e).duration=t}}var IF=Mz.prototype.constructor
12183
- function AF(e){return function(){this.style.removeProperty(e)}}var OF=0
12184
- function TF(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function RF(){return++OF}var DF=Mz.prototype
12185
- TF.prototype={constructor:TF,select:function(e){var t=this._name,n=this._id
12186
- "function"!=typeof e&&(e=kP(e))
12187
- for(var i=this._groups,o=i.length,r=new Array(o),s=0;s<o;++s)for(var a,l,c=i[s],d=c.length,h=r[s]=new Array(d),u=0;u<d;++u)(a=c[u])&&(l=e.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),h[u]=l,lF(h[u],t,n,u,h,hF(a,n)))
12188
- return new TF(r,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id
12189
- "function"!=typeof e&&(e=SP(e))
12190
- for(var i=this._groups,o=i.length,r=[],s=[],a=0;a<o;++a)for(var l,c=i[a],d=c.length,h=0;h<d;++h)if(l=c[h]){for(var u,p=e.call(l,l.__data__,h,c),f=hF(l,n),m=0,g=p.length;m<g;++m)(u=p[m])&&lF(u,t,n,m,p,f)
12191
- r.push(p),s.push(l)}return new TF(r,s,t,n)},selectChild:DF.selectChild,selectChildren:DF.selectChildren,filter:function(e){"function"!=typeof e&&(e=MP(e))
12208
+ return o!==i&&(n=(i=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function OF(e,t){return function(){mF(this,e).delay=+t.apply(this,arguments)}}function TF(e,t){return t=+t,function(){mF(this,e).delay=t}}function RF(e,t){return function(){gF(this,e).duration=+t.apply(this,arguments)}}function DF(e,t){return t=+t,function(){gF(this,e).duration=t}}var NF=Tz.prototype.constructor
12209
+ function PF(e){return function(){this.style.removeProperty(e)}}var zF=0
12210
+ function LF(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function FF(){return++zF}var VF=Tz.prototype
12211
+ LF.prototype={constructor:LF,select:function(e){var t=this._name,n=this._id
12212
+ "function"!=typeof e&&(e=EP(e))
12213
+ for(var i=this._groups,o=i.length,r=new Array(o),s=0;s<o;++s)for(var a,l,c=i[s],d=c.length,h=r[s]=new Array(d),u=0;u<d;++u)(a=c[u])&&(l=e.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),h[u]=l,fF(h[u],t,n,u,h,vF(a,n)))
12214
+ return new LF(r,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id
12215
+ "function"!=typeof e&&(e=AP(e))
12216
+ for(var i=this._groups,o=i.length,r=[],s=[],a=0;a<o;++a)for(var l,c=i[a],d=c.length,h=0;h<d;++h)if(l=c[h]){for(var u,p=e.call(l,l.__data__,h,c),f=vF(l,n),m=0,g=p.length;m<g;++m)(u=p[m])&&fF(u,t,n,m,p,f)
12217
+ r.push(p),s.push(l)}return new LF(r,s,t,n)},selectChild:VF.selectChild,selectChildren:VF.selectChildren,filter:function(e){"function"!=typeof e&&(e=TP(e))
12192
12218
  for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r,s=t[o],a=s.length,l=i[o]=[],c=0;c<a;++c)(r=s[c])&&e.call(r,r.__data__,c,s)&&l.push(r)
12193
- return new TF(i,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error
12219
+ return new LF(i,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error
12194
12220
  for(var t=this._groups,n=e._groups,i=t.length,o=n.length,r=Math.min(i,o),s=new Array(i),a=0;a<r;++a)for(var l,c=t[a],d=n[a],h=c.length,u=s[a]=new Array(h),p=0;p<h;++p)(l=c[p]||d[p])&&(u[p]=l)
12195
12221
  for(;a<i;++a)s[a]=t[a]
12196
- return new TF(s,this._parents,this._name,this._id)},selection:function(){return new IF(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=RF(),i=this._groups,o=i.length,r=0;r<o;++r)for(var s,a=i[r],l=a.length,c=0;c<l;++c)if(s=a[c]){var d=hF(s,t)
12197
- lF(s,e,n,c,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new TF(i,this._parents,e,n)},call:DF.call,nodes:DF.nodes,node:DF.node,size:DF.size,empty:DF.empty,each:DF.each,on:function(e,t){var n=this._id
12198
- return arguments.length<2?hF(this.node(),n).on.on(e):this.each(function(e,t,n){var i,o,r=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".")
12199
- return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?cF:dF
12222
+ return new LF(s,this._parents,this._name,this._id)},selection:function(){return new NF(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=FF(),i=this._groups,o=i.length,r=0;r<o;++r)for(var s,a=i[r],l=a.length,c=0;c<l;++c)if(s=a[c]){var d=vF(s,t)
12223
+ fF(s,e,n,c,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new LF(i,this._parents,e,n)},call:VF.call,nodes:VF.nodes,node:VF.node,size:VF.size,empty:VF.empty,each:VF.each,on:function(e,t){var n=this._id
12224
+ return arguments.length<2?vF(this.node(),n).on.on(e):this.each(function(e,t,n){var i,o,r=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".")
12225
+ return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?mF:gF
12200
12226
  return function(){var s=r(this,e),a=s.on
12201
- a!==i&&(o=(i=a).copy()).on(t,n),s.on=o}}(n,e,t))},attr:function(e,t){var n=vP(e),i="transform"===n?OL:gF
12202
- return this.attrTween(e,"function"==typeof t?(n.local?kF:xF)(n,i,mF(this,"attr."+e,t)):null==t?(n.local?bF:vF)(n):(n.local?yF:wF)(n,i,t))},attrTween:function(e,t){var n="attr."+e
12227
+ a!==i&&(o=(i=a).copy()).on(t,n),s.on=o}}(n,e,t))},attr:function(e,t){var n=CP(e),i="transform"===n?zL:kF
12228
+ return this.attrTween(e,"function"==typeof t?(n.local?EF:_F)(n,i,xF(this,"attr."+e,t)):null==t?(n.local?SF:CF)(n):(n.local?MF:$F)(n,i,t))},attrTween:function(e,t){var n="attr."+e
12203
12229
  if(arguments.length<2)return(n=this.tween(n))&&n._value
12204
12230
  if(null==t)return this.tween(n,null)
12205
12231
  if("function"!=typeof t)throw new Error
12206
- var i=vP(e)
12207
- return this.tween(n,(i.local?CF:SF)(i,t))},style:function(e,t,n){var i="transform"==(e+="")?AL:gF
12232
+ var i=CP(e)
12233
+ return this.tween(n,(i.local?IF:AF)(i,t))},style:function(e,t,n){var i="transform"==(e+="")?PL:kF
12208
12234
  return null==t?this.styleTween(e,function(e,t){var n,i,o
12209
- return function(){var r=KP(this,e),s=(this.style.removeProperty(e),KP(this,e))
12210
- return r===s?null:r===n&&s===i?o:o=t(n=r,i=s)}}(e,i)).on("end.style."+e,AF(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var i,o,r
12211
- return function(){var s=KP(this,e),a=n(this),l=a+""
12212
- return null==a&&(this.style.removeProperty(e),l=a=KP(this,e)),s===l?null:s===i&&l===o?r:(o=l,r=t(i=s,a))}}(e,i,mF(this,"style."+e,t))).each(function(e,t){var n,i,o,r,s="style."+t,a="end."+s
12213
- return function(){var l=dF(this,e),c=l.on,d=null==l.value[s]?r||(r=AF(t)):void 0
12235
+ return function(){var r=tz(this,e),s=(this.style.removeProperty(e),tz(this,e))
12236
+ return r===s?null:r===n&&s===i?o:o=t(n=r,i=s)}}(e,i)).on("end.style."+e,PF(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var i,o,r
12237
+ return function(){var s=tz(this,e),a=n(this),l=a+""
12238
+ return null==a&&(this.style.removeProperty(e),l=a=tz(this,e)),s===l?null:s===i&&l===o?r:(o=l,r=t(i=s,a))}}(e,i,xF(this,"style."+e,t))).each(function(e,t){var n,i,o,r,s="style."+t,a="end."+s
12239
+ return function(){var l=gF(this,e),c=l.on,d=null==l.value[s]?r||(r=PF(t)):void 0
12214
12240
  c===n&&o===d||(i=(n=c).copy()).on(a,o=d),l.on=i}}(this._id,e)):this.styleTween(e,function(e,t,n){var i,o,r=n+""
12215
- return function(){var s=KP(this,e)
12241
+ return function(){var s=tz(this,e)
12216
12242
  return s===r?null:s===i?o:o=t(i=s,n)}}(e,i,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var i="style."+(e+="")
12217
12243
  if(arguments.length<2)return(i=this.tween(i))&&i._value
12218
12244
  if(null==t)return this.tween(i,null)
@@ -12220,7 +12246,7 @@ if("function"!=typeof t)throw new Error
12220
12246
  return this.tween(i,function(e,t,n){var i,o
12221
12247
  function r(){var r=t.apply(this,arguments)
12222
12248
  return r!==o&&(i=(o=r)&&function(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}(e,r,n)),i}return r._value=t,r}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this)
12223
- this.textContent=null==t?"":t}}(mF(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text"
12249
+ this.textContent=null==t?"":t}}(xF(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text"
12224
12250
  if(arguments.length<1)return(t=this.tween(t))&&t._value
12225
12251
  if(null==e)return this.tween(t,null)
12226
12252
  if("function"!=typeof e)throw new Error
@@ -12229,60 +12255,60 @@ function i(){var i=e.apply(this,arguments)
12229
12255
  return i!==n&&(t=(n=i)&&function(e){return function(t){this.textContent=e.call(this,t)}}(i)),t}return i._value=e,i}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode
12230
12256
  for(var n in this.__transition)if(+n!==e)return
12231
12257
  t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id
12232
- if(e+="",arguments.length<2){for(var i,o=hF(this.node(),n).tween,r=0,s=o.length;r<s;++r)if((i=o[r]).name===e)return i.value
12233
- return null}return this.each((null==t?pF:fF)(n,e,t))},delay:function(e){var t=this._id
12234
- return arguments.length?this.each(("function"==typeof e?$F:MF)(t,e)):hF(this.node(),t).delay},duration:function(e){var t=this._id
12235
- return arguments.length?this.each(("function"==typeof e?_F:EF)(t,e)):hF(this.node(),t).duration},ease:function(e){var t=this._id
12258
+ if(e+="",arguments.length<2){for(var i,o=vF(this.node(),n).tween,r=0,s=o.length;r<s;++r)if((i=o[r]).name===e)return i.value
12259
+ return null}return this.each((null==t?wF:yF)(n,e,t))},delay:function(e){var t=this._id
12260
+ return arguments.length?this.each(("function"==typeof e?OF:TF)(t,e)):vF(this.node(),t).delay},duration:function(e){var t=this._id
12261
+ return arguments.length?this.each(("function"==typeof e?RF:DF)(t,e)):vF(this.node(),t).duration},ease:function(e){var t=this._id
12236
12262
  return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error
12237
- return function(){dF(this,e).ease=t}}(t,e)):hF(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error
12263
+ return function(){gF(this,e).ease=t}}(t,e)):vF(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error
12238
12264
  return this.each(function(e,t){return function(){var n=t.apply(this,arguments)
12239
12265
  if("function"!=typeof n)throw new Error
12240
- dF(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,i=n._id,o=n.size()
12266
+ gF(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,i=n._id,o=n.size()
12241
12267
  return new Promise((function(r,s){var a={value:s},l={value:function(){0==--o&&r()}}
12242
- n.each((function(){var n=dF(this,i),o=n.on
12243
- o!==e&&((t=(e=o).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),n.on=t})),0===o&&r()}))},[Symbol.iterator]:DF[Symbol.iterator]}
12244
- var NF={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}}
12245
- function PF(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`)
12246
- return n}Mz.prototype.interrupt=function(e){return this.each((function(){uF(this,e)}))},Mz.prototype.transition=function(e){var t,n
12247
- e instanceof TF?(t=e._id,e=e._name):(t=RF(),(n=NF).time=UL(),e=null==e?null:e+"")
12248
- for(var i=this._groups,o=i.length,r=0;r<o;++r)for(var s,a=i[r],l=a.length,c=0;c<l;++c)(s=a[c])&&lF(s,e,t,c,a,n||PF(s,t))
12249
- return new TF(i,this._parents,e,t)}
12250
- var zF=e=>()=>e
12251
- function LF(e,{sourceEvent:t,target:n,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function FF(e,t,n){this.k=e,this.x=t,this.y=n}FF.prototype={constructor:FF,scale:function(e){return 1===e?this:new FF(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new FF(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}}
12252
- var VF=new FF(1,0,0)
12253
- function HF(e){for(;!e.__zoom;)if(!(e=e.parentNode))return VF
12254
- return e.__zoom}function BF(e){e.stopImmediatePropagation()}function qF(e){e.preventDefault(),e.stopImmediatePropagation()}function jF(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function UF(){var e=this
12255
- return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function WF(){return this.__zoom||VF}function ZF(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function GF(){return navigator.maxTouchPoints||"ontouchstart"in this}function KF(e,t,n){var i=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1]
12256
- return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}function JF(){var e,t,n,i=jF,o=UF,r=KF,s=ZF,a=GF,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,h=NL,u=hP("start","zoom","end"),p=500,f=150,m=0,g=10
12257
- function v(e){e.property("__zoom",WF).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",$).on("dblclick.zoom",M).filter(a).on("touchstart.zoom",_).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",I).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new FF(t,e.x,e.y)}function w(e,t,n){var i=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k
12258
- return i===e.x&&o===e.y?e:new FF(e.k,i,o)}function y(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function x(e,t,n,i){e.on("start.zoom",(function(){k(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){k(this,arguments).event(i).end()})).tween("zoom",(function(){var e=this,r=arguments,s=k(e,r).event(i),a=o.apply(e,r),l=null==n?y(a):"function"==typeof n?n.apply(e,r):n,c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),d=e.__zoom,u="function"==typeof t?t.apply(e,r):t,p=h(d.invert(l).concat(c/d.k),u.invert(l).concat(c/u.k))
12268
+ n.each((function(){var n=gF(this,i),o=n.on
12269
+ o!==e&&((t=(e=o).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),n.on=t})),0===o&&r()}))},[Symbol.iterator]:VF[Symbol.iterator]}
12270
+ var HF={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}}
12271
+ function BF(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`)
12272
+ return n}Tz.prototype.interrupt=function(e){return this.each((function(){bF(this,e)}))},Tz.prototype.transition=function(e){var t,n
12273
+ e instanceof LF?(t=e._id,e=e._name):(t=FF(),(n=HF).time=XL(),e=null==e?null:e+"")
12274
+ for(var i=this._groups,o=i.length,r=0;r<o;++r)for(var s,a=i[r],l=a.length,c=0;c<l;++c)(s=a[c])&&fF(s,e,t,c,a,n||BF(s,t))
12275
+ return new LF(i,this._parents,e,t)}
12276
+ var qF=e=>()=>e
12277
+ function jF(e,{sourceEvent:t,target:n,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function UF(e,t,n){this.k=e,this.x=t,this.y=n}UF.prototype={constructor:UF,scale:function(e){return 1===e?this:new UF(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new UF(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}}
12278
+ var WF=new UF(1,0,0)
12279
+ function ZF(e){for(;!e.__zoom;)if(!(e=e.parentNode))return WF
12280
+ return e.__zoom}function GF(e){e.stopImmediatePropagation()}function KF(e){e.preventDefault(),e.stopImmediatePropagation()}function JF(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function XF(){var e=this
12281
+ return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function YF(){return this.__zoom||WF}function QF(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function eV(){return navigator.maxTouchPoints||"ontouchstart"in this}function tV(e,t,n){var i=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1]
12282
+ return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}function nV(){var e,t,n,i=JF,o=XF,r=tV,s=QF,a=eV,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,h=HL,u=vP("start","zoom","end"),p=500,f=150,m=0,g=10
12283
+ function v(e){e.property("__zoom",YF).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",$).on("dblclick.zoom",M).filter(a).on("touchstart.zoom",_).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",I).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new UF(t,e.x,e.y)}function w(e,t,n){var i=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k
12284
+ return i===e.x&&o===e.y?e:new UF(e.k,i,o)}function y(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function x(e,t,n,i){e.on("start.zoom",(function(){k(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){k(this,arguments).event(i).end()})).tween("zoom",(function(){var e=this,r=arguments,s=k(e,r).event(i),a=o.apply(e,r),l=null==n?y(a):"function"==typeof n?n.apply(e,r):n,c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),d=e.__zoom,u="function"==typeof t?t.apply(e,r):t,p=h(d.invert(l).concat(c/d.k),u.invert(l).concat(c/u.k))
12259
12285
  return function(e){if(1===e)e=u
12260
12286
  else{var t=p(e),n=c/t[2]
12261
- e=new FF(n,l[0]-t[0]*n,l[1]-t[1]*n)}s.zoom(null,e)}}))}function k(e,t,n){return!n&&e.__zooming||new C(e,t)}function C(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,t),this.taps=0}function S(e,...t){if(i.apply(this,arguments)){var n=k(this,t).event(e),o=this.__zoom,a=Math.max(l[0],Math.min(l[1],o.k*Math.pow(2,s.apply(this,arguments)))),d=Ez(e)
12287
+ e=new UF(n,l[0]-t[0]*n,l[1]-t[1]*n)}s.zoom(null,e)}}))}function k(e,t,n){return!n&&e.__zooming||new C(e,t)}function C(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,t),this.taps=0}function S(e,...t){if(i.apply(this,arguments)){var n=k(this,t).event(e),o=this.__zoom,a=Math.max(l[0],Math.min(l[1],o.k*Math.pow(2,s.apply(this,arguments)))),d=Dz(e)
12262
12288
  if(n.wheel)n.mouse[0][0]===d[0]&&n.mouse[0][1]===d[1]||(n.mouse[1]=o.invert(n.mouse[0]=d)),clearTimeout(n.wheel)
12263
12289
  else{if(o.k===a)return
12264
- n.mouse=[d,o.invert(d)],uF(this),n.start()}qF(e),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),f),n.zoom("mouse",r(w(b(o,a),n.mouse[0],n.mouse[1]),n.extent,c))}}function $(e,...t){if(!n&&i.apply(this,arguments)){var o=e.currentTarget,s=k(this,t,!0).event(e),a=_z(e.view).on("mousemove.zoom",(function(e){if(qF(e),!s.moved){var t=e.clientX-d,n=e.clientY-h
12265
- s.moved=t*t+n*n>m}s.event(e).zoom("mouse",r(w(s.that.__zoom,s.mouse[0]=Ez(e,o),s.mouse[1]),s.extent,c))}),!0).on("mouseup.zoom",(function(e){a.on("mousemove.zoom mouseup.zoom",null),function(e,t){var n=e.document.documentElement,i=_z(e).on("dragstart.drag",null)
12266
- t&&(i.on("click.drag",Az,Iz),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(e.view,s.moved),qF(e),s.event(e).end()}),!0),l=Ez(e,o),d=e.clientX,h=e.clientY
12267
- !function(e){var t=e.document.documentElement,n=_z(e).on("dragstart.drag",Az,Iz)
12268
- "onselectstart"in t?n.on("selectstart.drag",Az,Iz):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}(e.view),BF(e),s.mouse=[l,this.__zoom.invert(l)],uF(this),s.start()}}function M(e,...t){if(i.apply(this,arguments)){var n=this.__zoom,s=Ez(e.changedTouches?e.changedTouches[0]:e,this),a=n.invert(s),l=n.k*(e.shiftKey?.5:2),h=r(w(b(n,l),s,a),o.apply(this,t),c)
12269
- qF(e),d>0?_z(this).transition().duration(d).call(x,h,s,e):_z(this).call(v.transform,h,s,e)}}function _(n,...o){if(i.apply(this,arguments)){var r,s,a,l,c=n.touches,d=c.length,h=k(this,o,n.changedTouches.length===d).event(n)
12270
- for(BF(n),s=0;s<d;++s)l=[l=Ez(a=c[s],this),this.__zoom.invert(l),a.identifier],h.touch0?h.touch1||h.touch0[2]===l[2]||(h.touch1=l,h.taps=0):(h.touch0=l,r=!0,h.taps=1+!!e)
12271
- e&&(e=clearTimeout(e)),r&&(h.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),p)),uF(this),h.start())}}function E(e,...t){if(this.__zooming){var n,i,o,s,a=k(this,t).event(e),l=e.changedTouches,d=l.length
12272
- for(qF(e),n=0;n<d;++n)o=Ez(i=l[n],this),a.touch0&&a.touch0[2]===i.identifier?a.touch0[0]=o:a.touch1&&a.touch1[2]===i.identifier&&(a.touch1[0]=o)
12290
+ n.mouse=[d,o.invert(d)],bF(this),n.start()}KF(e),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),f),n.zoom("mouse",r(w(b(o,a),n.mouse[0],n.mouse[1]),n.extent,c))}}function $(e,...t){if(!n&&i.apply(this,arguments)){var o=e.currentTarget,s=k(this,t,!0).event(e),a=Rz(e.view).on("mousemove.zoom",(function(e){if(KF(e),!s.moved){var t=e.clientX-d,n=e.clientY-h
12291
+ s.moved=t*t+n*n>m}s.event(e).zoom("mouse",r(w(s.that.__zoom,s.mouse[0]=Dz(e,o),s.mouse[1]),s.extent,c))}),!0).on("mouseup.zoom",(function(e){a.on("mousemove.zoom mouseup.zoom",null),function(e,t){var n=e.document.documentElement,i=Rz(e).on("dragstart.drag",null)
12292
+ t&&(i.on("click.drag",Pz,Nz),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(e.view,s.moved),KF(e),s.event(e).end()}),!0),l=Dz(e,o),d=e.clientX,h=e.clientY
12293
+ !function(e){var t=e.document.documentElement,n=Rz(e).on("dragstart.drag",Pz,Nz)
12294
+ "onselectstart"in t?n.on("selectstart.drag",Pz,Nz):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}(e.view),GF(e),s.mouse=[l,this.__zoom.invert(l)],bF(this),s.start()}}function M(e,...t){if(i.apply(this,arguments)){var n=this.__zoom,s=Dz(e.changedTouches?e.changedTouches[0]:e,this),a=n.invert(s),l=n.k*(e.shiftKey?.5:2),h=r(w(b(n,l),s,a),o.apply(this,t),c)
12295
+ KF(e),d>0?Rz(this).transition().duration(d).call(x,h,s,e):Rz(this).call(v.transform,h,s,e)}}function _(n,...o){if(i.apply(this,arguments)){var r,s,a,l,c=n.touches,d=c.length,h=k(this,o,n.changedTouches.length===d).event(n)
12296
+ for(GF(n),s=0;s<d;++s)l=[l=Dz(a=c[s],this),this.__zoom.invert(l),a.identifier],h.touch0?h.touch1||h.touch0[2]===l[2]||(h.touch1=l,h.taps=0):(h.touch0=l,r=!0,h.taps=1+!!e)
12297
+ e&&(e=clearTimeout(e)),r&&(h.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),p)),bF(this),h.start())}}function E(e,...t){if(this.__zooming){var n,i,o,s,a=k(this,t).event(e),l=e.changedTouches,d=l.length
12298
+ for(KF(e),n=0;n<d;++n)o=Dz(i=l[n],this),a.touch0&&a.touch0[2]===i.identifier?a.touch0[0]=o:a.touch1&&a.touch1[2]===i.identifier&&(a.touch1[0]=o)
12273
12299
  if(i=a.that.__zoom,a.touch1){var h=a.touch0[0],u=a.touch0[1],p=a.touch1[0],f=a.touch1[1],m=(m=p[0]-h[0])*m+(m=p[1]-h[1])*m,g=(g=f[0]-u[0])*g+(g=f[1]-u[1])*g
12274
12300
  i=b(i,Math.sqrt(m/g)),o=[(h[0]+p[0])/2,(h[1]+p[1])/2],s=[(u[0]+f[0])/2,(u[1]+f[1])/2]}else{if(!a.touch0)return
12275
12301
  o=a.touch0[0],s=a.touch0[1]}a.zoom("touch",r(w(i,o,s),a.extent,c))}}function I(e,...i){if(this.__zooming){var o,r,s=k(this,i).event(e),a=e.changedTouches,l=a.length
12276
- for(BF(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),p),o=0;o<l;++o)r=a[o],s.touch0&&s.touch0[2]===r.identifier?delete s.touch0:s.touch1&&s.touch1[2]===r.identifier&&delete s.touch1
12302
+ for(GF(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),p),o=0;o<l;++o)r=a[o],s.touch0&&s.touch0[2]===r.identifier?delete s.touch0:s.touch1&&s.touch1[2]===r.identifier&&delete s.touch1
12277
12303
  if(s.touch1&&!s.touch0&&(s.touch0=s.touch1,delete s.touch1),s.touch0)s.touch0[1]=this.__zoom.invert(s.touch0[0])
12278
- else if(s.end(),2===s.taps&&(r=Ez(r,this),Math.hypot(t[0]-r[0],t[1]-r[1])<g)){var c=_z(this).on("dblclick.zoom")
12304
+ else if(s.end(),2===s.taps&&(r=Dz(r,this),Math.hypot(t[0]-r[0],t[1]-r[1])<g)){var c=Rz(this).on("dblclick.zoom")
12279
12305
  c&&c.apply(this,arguments)}}}return v.transform=function(e,t,n,i){var o=e.selection?e.selection():e
12280
- o.property("__zoom",WF),e!==o?x(e,t,n,i):o.interrupt().each((function(){k(this,arguments).event(i).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()}))},v.scaleBy=function(e,t,n,i){v.scaleTo(e,(function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)}),n,i)},v.scaleTo=function(e,t,n,i){v.transform(e,(function(){var e=o.apply(this,arguments),i=this.__zoom,s=null==n?y(e):"function"==typeof n?n.apply(this,arguments):n,a=i.invert(s),l="function"==typeof t?t.apply(this,arguments):t
12306
+ o.property("__zoom",YF),e!==o?x(e,t,n,i):o.interrupt().each((function(){k(this,arguments).event(i).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()}))},v.scaleBy=function(e,t,n,i){v.scaleTo(e,(function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)}),n,i)},v.scaleTo=function(e,t,n,i){v.transform(e,(function(){var e=o.apply(this,arguments),i=this.__zoom,s=null==n?y(e):"function"==typeof n?n.apply(this,arguments):n,a=i.invert(s),l="function"==typeof t?t.apply(this,arguments):t
12281
12307
  return r(w(b(i,l),s,a),e,c)}),n,i)},v.translateBy=function(e,t,n,i){v.transform(e,(function(){return r(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),c)}),null,i)},v.translateTo=function(e,t,n,i,s){v.transform(e,(function(){var e=o.apply(this,arguments),s=this.__zoom,a=null==i?y(e):"function"==typeof i?i.apply(this,arguments):i
12282
- return r(VF.translate(a[0],a[1]).scale(s.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,c)}),i,s)},C.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=_z(this.that).datum()
12283
- u.call(e,this.that,new LF(e,{sourceEvent:this.sourceEvent,target:v,type:e,transform:this.that.__zoom,dispatch:u}),t)}},v.wheelDelta=function(e){return arguments.length?(s="function"==typeof e?e:zF(+e),v):s},v.filter=function(e){return arguments.length?(i="function"==typeof e?e:zF(!!e),v):i},v.touchable=function(e){return arguments.length?(a="function"==typeof e?e:zF(!!e),v):a},v.extent=function(e){return arguments.length?(o="function"==typeof e?e:zF([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),v):o},v.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],v):[l[0],l[1]]},v.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],v):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},v.constrain=function(e){return arguments.length?(r=e,v):r},v.duration=function(e){return arguments.length?(d=+e,v):d},v.interpolate=function(e){return arguments.length?(h=e,v):h},v.on=function(){var e=u.on.apply(u,arguments)
12284
- return e===u?v:e},v.clickDistance=function(e){return arguments.length?(m=(e=+e)*e,v):Math.sqrt(m)},v.tapDistance=function(e){return arguments.length?(g=+e,v):g},v}HF.prototype=FF.prototype
12285
- const XF=Z`
12308
+ return r(WF.translate(a[0],a[1]).scale(s.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,c)}),i,s)},C.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=Rz(this.that).datum()
12309
+ u.call(e,this.that,new jF(e,{sourceEvent:this.sourceEvent,target:v,type:e,transform:this.that.__zoom,dispatch:u}),t)}},v.wheelDelta=function(e){return arguments.length?(s="function"==typeof e?e:qF(+e),v):s},v.filter=function(e){return arguments.length?(i="function"==typeof e?e:qF(!!e),v):i},v.touchable=function(e){return arguments.length?(a="function"==typeof e?e:qF(!!e),v):a},v.extent=function(e){return arguments.length?(o="function"==typeof e?e:qF([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),v):o},v.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],v):[l[0],l[1]]},v.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],v):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},v.constrain=function(e){return arguments.length?(r=e,v):r},v.duration=function(e){return arguments.length?(d=+e,v):d},v.interpolate=function(e){return arguments.length?(h=e,v):h},v.on=function(){var e=u.on.apply(u,arguments)
12310
+ return e===u?v:e},v.clickDistance=function(e){return arguments.length?(m=(e=+e)*e,v):Math.sqrt(m)},v.tapDistance=function(e){return arguments.length?(g=+e,v):g},v}ZF.prototype=UF.prototype
12311
+ const iV=Z`
12286
12312
  <div class="wafer-map-container">
12287
12313
  <svg class="svg-root">
12288
12314
  <g ${Ne("zoomContainer")} transform=${e=>e.transform.toString()}>
@@ -12312,7 +12338,7 @@ const XF=Z`
12312
12338
  />
12313
12339
  </svg>
12314
12340
  </div>
12315
- `,YF=we`
12341
+ `,oV=we`
12316
12342
  :host {
12317
12343
  display: inline-block;
12318
12344
  width: 500px;
@@ -12396,68 +12422,68 @@ const XF=Z`
12396
12422
  outline-width: 0px;
12397
12423
  }
12398
12424
  `
12399
- function QF(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function eV(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tV(e){let t,n,i
12425
+ function rV(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function sV(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function aV(e){let t,n,i
12400
12426
  function o(e,i,o=0,r=e.length){if(o<r){if(0!==t(i,i))return r
12401
12427
  do{const t=o+r>>>1
12402
- n(e[t],i)<0?o=t+1:r=t}while(o<r)}return o}return 2!==e.length?(t=QF,n=(t,n)=>QF(e(t),n),i=(t,n)=>e(t)-n):(t=e===QF||e===eV?e:nV,n=e,i=e),{left:o,center:function(e,t,n=0,r=e.length){const s=o(e,t,n,r-1)
12428
+ n(e[t],i)<0?o=t+1:r=t}while(o<r)}return o}return 2!==e.length?(t=rV,n=(t,n)=>rV(e(t),n),i=(t,n)=>e(t)-n):(t=e===rV||e===sV?e:lV,n=e,i=e),{left:o,center:function(e,t,n=0,r=e.length){const s=o(e,t,n,r-1)
12403
12429
  return s>n&&i(e[s-1],t)>-i(e[s],t)?s-1:s},right:function(e,i,o=0,r=e.length){if(o<r){if(0!==t(i,i))return r
12404
12430
  do{const t=o+r>>>1
12405
- n(e[t],i)<=0?o=t+1:r=t}while(o<r)}return o}}}function nV(){return 0}function iV(e){return null===e?NaN:+e}const oV=tV(QF).right
12406
- tV(iV).center
12407
- var rV=oV
12408
- class sV extends Map{constructor(e,t=lV){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(aV(this,e))}has(e){return super.has(aV(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const i=t(n)
12431
+ n(e[t],i)<=0?o=t+1:r=t}while(o<r)}return o}}}function lV(){return 0}function cV(e){return null===e?NaN:+e}const dV=aV(rV).right
12432
+ aV(cV).center
12433
+ var hV=dV
12434
+ class uV extends Map{constructor(e,t=fV){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(pV(this,e))}has(e){return super.has(pV(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const i=t(n)
12409
12435
  return e.has(i)?e.get(i):(e.set(i,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const i=t(n)
12410
12436
  e.has(i)&&(n=e.get(i),e.delete(i))
12411
- return n}(this,e))}}function aV({_intern:e,_key:t},n){const i=t(n)
12412
- return e.has(i)?e.get(i):n}function lV(e){return null!==e&&"object"==typeof e?e.valueOf():e}const cV=Math.sqrt(50),dV=Math.sqrt(10),hV=Math.sqrt(2)
12413
- function uV(e,t,n){const i=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(i)),r=i/Math.pow(10,o),s=r>=cV?10:r>=dV?5:r>=hV?2:1
12437
+ return n}(this,e))}}function pV({_intern:e,_key:t},n){const i=t(n)
12438
+ return e.has(i)?e.get(i):n}function fV(e){return null!==e&&"object"==typeof e?e.valueOf():e}const mV=Math.sqrt(50),gV=Math.sqrt(10),vV=Math.sqrt(2)
12439
+ function bV(e,t,n){const i=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(i)),r=i/Math.pow(10,o),s=r>=mV?10:r>=gV?5:r>=vV?2:1
12414
12440
  let a,l,c
12415
- return o<0?(c=Math.pow(10,-o)/s,a=Math.round(e*c),l=Math.round(t*c),a/c<e&&++a,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*s,a=Math.round(e/c),l=Math.round(t/c),a*c<e&&++a,l*c>t&&--l),l<a&&.5<=n&&n<2?uV(e,t,2*n):[a,l,c]}function pV(e,t,n){return uV(e=+e,t=+t,n=+n)[2]}function fV(e,t,n=iV){if((i=e.length)&&!isNaN(t=+t)){if(t<=0||i<2)return+n(e[0],0,e)
12441
+ return o<0?(c=Math.pow(10,-o)/s,a=Math.round(e*c),l=Math.round(t*c),a/c<e&&++a,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*s,a=Math.round(e/c),l=Math.round(t/c),a*c<e&&++a,l*c>t&&--l),l<a&&.5<=n&&n<2?bV(e,t,2*n):[a,l,c]}function wV(e,t,n){return bV(e=+e,t=+t,n=+n)[2]}function yV(e,t,n=cV){if((i=e.length)&&!isNaN(t=+t)){if(t<=0||i<2)return+n(e[0],0,e)
12416
12442
  if(t>=1)return+n(e[i-1],i-1,e)
12417
12443
  var i,o=(i-1)*t,r=Math.floor(o),s=+n(e[r],r,e)
12418
- return s+(+n(e[r+1],r+1,e)-s)*(o-r)}}function mV(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n
12444
+ return s+(+n(e[r+1],r+1,e)-s)*(o-r)}}function xV(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n
12419
12445
  for(var i=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),r=new Array(o);++i<o;)r[i]=e+i*n
12420
- return r}function gV(e,t){switch(arguments.length){case 0:break
12446
+ return r}function kV(e,t){switch(arguments.length){case 0:break
12421
12447
  case 1:this.range(e)
12422
12448
  break
12423
- default:this.range(t).domain(e)}return this}const vV=Symbol("implicit")
12424
- function bV(){var e=new sV,t=[],n=[],i=vV
12449
+ default:this.range(t).domain(e)}return this}const CV=Symbol("implicit")
12450
+ function SV(){var e=new uV,t=[],n=[],i=CV
12425
12451
  function o(o){let r=e.get(o)
12426
- if(void 0===r){if(i!==vV)return i
12452
+ if(void 0===r){if(i!==CV)return i
12427
12453
  e.set(o,r=t.push(o)-1)}return n[r%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice()
12428
- t=[],e=new sV
12454
+ t=[],e=new uV
12429
12455
  for(const i of n)e.has(i)||e.set(i,t.push(i)-1)
12430
- return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(i=e,o):i},o.copy=function(){return bV(t,n).unknown(i)},gV.apply(o,arguments),o}function wV(){var e,t,n=bV().unknown(void 0),i=n.domain,o=n.range,r=0,s=1,a=!1,l=0,c=0,d=.5
12456
+ return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(i=e,o):i},o.copy=function(){return SV(t,n).unknown(i)},kV.apply(o,arguments),o}function $V(){var e,t,n=SV().unknown(void 0),i=n.domain,o=n.range,r=0,s=1,a=!1,l=0,c=0,d=.5
12431
12457
  function h(){var n=i().length,h=s<r,u=h?s:r,p=h?r:s
12432
12458
  e=(p-u)/Math.max(1,n-l+2*c),a&&(e=Math.floor(e)),u+=(p-u-e*(n-l))*d,t=e*(1-l),a&&(u=Math.round(u),t=Math.round(t))
12433
- var f=mV(n).map((function(t){return u+e*t}))
12434
- return o(h?f.reverse():f)}return delete n.unknown,n.domain=function(e){return arguments.length?(i(e),h()):i()},n.range=function(e){return arguments.length?([r,s]=e,r=+r,s=+s,h()):[r,s]},n.rangeRound=function(e){return[r,s]=e,r=+r,s=+s,a=!0,h()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(a=!!e,h()):a},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),h()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),h()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,h()):c},n.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),h()):d},n.copy=function(){return wV(i(),[r,s]).round(a).paddingInner(l).paddingOuter(c).align(d)},gV.apply(h(),arguments)}function yV(e){return+e}var xV=[0,1]
12435
- function kV(e){return e}function CV(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n})
12436
- var n}function SV(e,t,n){var i=e[0],o=e[1],r=t[0],s=t[1]
12437
- return o<i?(i=CV(o,i),r=n(s,r)):(i=CV(i,o),r=n(r,s)),function(e){return r(i(e))}}function $V(e,t,n){var i=Math.min(e.length,t.length)-1,o=new Array(i),r=new Array(i),s=-1
12438
- for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<i;)o[s]=CV(e[s],e[s+1]),r[s]=n(t[s],t[s+1])
12439
- return function(t){var n=rV(e,t,1,i)-1
12440
- return r[n](o[n](t))}}function MV(){var e,t,n,i,o,r,s=xV,a=xV,l=CL,c=kV
12459
+ var f=xV(n).map((function(t){return u+e*t}))
12460
+ return o(h?f.reverse():f)}return delete n.unknown,n.domain=function(e){return arguments.length?(i(e),h()):i()},n.range=function(e){return arguments.length?([r,s]=e,r=+r,s=+s,h()):[r,s]},n.rangeRound=function(e){return[r,s]=e,r=+r,s=+s,a=!0,h()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(a=!!e,h()):a},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),h()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),h()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,h()):c},n.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),h()):d},n.copy=function(){return $V(i(),[r,s]).round(a).paddingInner(l).paddingOuter(c).align(d)},kV.apply(h(),arguments)}function MV(e){return+e}var _V=[0,1]
12461
+ function EV(e){return e}function IV(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n})
12462
+ var n}function AV(e,t,n){var i=e[0],o=e[1],r=t[0],s=t[1]
12463
+ return o<i?(i=IV(o,i),r=n(s,r)):(i=IV(i,o),r=n(r,s)),function(e){return r(i(e))}}function OV(e,t,n){var i=Math.min(e.length,t.length)-1,o=new Array(i),r=new Array(i),s=-1
12464
+ for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<i;)o[s]=IV(e[s],e[s+1]),r[s]=n(t[s],t[s+1])
12465
+ return function(t){var n=hV(e,t,1,i)-1
12466
+ return r[n](o[n](t))}}function TV(){var e,t,n,i,o,r,s=_V,a=_V,l=IL,c=EV
12441
12467
  function d(){var e,t,n,l=Math.min(s.length,a.length)
12442
- return c!==kV&&(e=s[0],t=s[l-1],e>t&&(n=e,e=t,t=n),c=function(n){return Math.max(e,Math.min(t,n))}),i=l>2?$V:SV,o=r=null,h}function h(t){return null==t||isNaN(t=+t)?n:(o||(o=i(s.map(e),a,l)))(e(c(t)))}return h.invert=function(n){return c(t((r||(r=i(a,s.map(e),bL)))(n)))},h.domain=function(e){return arguments.length?(s=Array.from(e,yV),d()):s.slice()},h.range=function(e){return arguments.length?(a=Array.from(e),d()):a.slice()},h.rangeRound=function(e){return a=Array.from(e),l=SL,d()},h.clamp=function(e){return arguments.length?(c=!!e||kV,d()):c!==kV},h.interpolate=function(e){return arguments.length?(l=e,d()):l},h.unknown=function(e){return arguments.length?(n=e,h):n},function(n,i){return e=n,t=i,d()}}function _V(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null
12468
+ return c!==EV&&(e=s[0],t=s[l-1],e>t&&(n=e,e=t,t=n),c=function(n){return Math.max(e,Math.min(t,n))}),i=l>2?OV:AV,o=r=null,h}function h(t){return null==t||isNaN(t=+t)?n:(o||(o=i(s.map(e),a,l)))(e(c(t)))}return h.invert=function(n){return c(t((r||(r=i(a,s.map(e),SL)))(n)))},h.domain=function(e){return arguments.length?(s=Array.from(e,MV),d()):s.slice()},h.range=function(e){return arguments.length?(a=Array.from(e),d()):a.slice()},h.rangeRound=function(e){return a=Array.from(e),l=AL,d()},h.clamp=function(e){return arguments.length?(c=!!e||EV,d()):c!==EV},h.interpolate=function(e){return arguments.length?(l=e,d()):l},h.unknown=function(e){return arguments.length?(n=e,h):n},function(n,i){return e=n,t=i,d()}}function RV(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null
12443
12469
  var n,i=e.slice(0,n)
12444
- return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function EV(e){return(e=_V(Math.abs(e)))?e[1]:NaN}var IV,AV=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i
12445
- function OV(e){if(!(t=AV.exec(e)))throw new Error("invalid format: "+e)
12470
+ return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function DV(e){return(e=RV(Math.abs(e)))?e[1]:NaN}var NV,PV=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i
12471
+ function zV(e){if(!(t=PV.exec(e)))throw new Error("invalid format: "+e)
12446
12472
  var t
12447
- return new TV({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function TV(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function RV(e,t){var n=_V(e,t)
12473
+ return new LV({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function LV(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function FV(e,t){var n=RV(e,t)
12448
12474
  if(!n)return e+""
12449
12475
  var i=n[0],o=n[1]
12450
- return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}OV.prototype=TV.prototype,TV.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type}
12451
- var DV={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>RV(100*e,t),r:RV,s:function(e,t){var n=_V(e,t)
12476
+ return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}zV.prototype=LV.prototype,LV.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type}
12477
+ var VV={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>FV(100*e,t),r:FV,s:function(e,t){var n=RV(e,t)
12452
12478
  if(!n)return e+""
12453
- var i=n[0],o=n[1],r=o-(IV=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=i.length
12454
- return r===s?i:r>s?i+new Array(r-s+1).join("0"):r>0?i.slice(0,r)+"."+i.slice(r):"0."+new Array(1-r).join("0")+_V(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)}
12455
- function NV(e){return e}var PV,zV,LV,FV=Array.prototype.map,VV=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]
12456
- function HV(e){var t,n,i=void 0===e.grouping||void 0===e.thousands?NV:(t=FV.call(e.grouping,Number),n=e.thousands+"",function(e,i){for(var o=e.length,r=[],s=0,a=t[0],l=0;o>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),r.push(e.substring(o-=a,o+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length]
12457
- return r.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?NV:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(FV.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",d=void 0===e.nan?"NaN":e.nan+""
12458
- function h(e){var t=(e=OV(e)).fill,n=e.align,h=e.sign,u=e.symbol,p=e.zero,f=e.width,m=e.comma,g=e.precision,v=e.trim,b=e.type
12459
- "n"===b?(m=!0,b="g"):DV[b]||(void 0===g&&(g=12),v=!0,b="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=")
12460
- var w="$"===u?o:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",y="$"===u?r:/[%p]/.test(b)?l:"",x=DV[b],k=/[defgprs%]/.test(b)
12479
+ var i=n[0],o=n[1],r=o-(NV=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=i.length
12480
+ return r===s?i:r>s?i+new Array(r-s+1).join("0"):r>0?i.slice(0,r)+"."+i.slice(r):"0."+new Array(1-r).join("0")+RV(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)}
12481
+ function HV(e){return e}var BV,qV,jV,UV=Array.prototype.map,WV=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]
12482
+ function ZV(e){var t,n,i=void 0===e.grouping||void 0===e.thousands?HV:(t=UV.call(e.grouping,Number),n=e.thousands+"",function(e,i){for(var o=e.length,r=[],s=0,a=t[0],l=0;o>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),r.push(e.substring(o-=a,o+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length]
12483
+ return r.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?HV:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(UV.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",d=void 0===e.nan?"NaN":e.nan+""
12484
+ function h(e){var t=(e=zV(e)).fill,n=e.align,h=e.sign,u=e.symbol,p=e.zero,f=e.width,m=e.comma,g=e.precision,v=e.trim,b=e.type
12485
+ "n"===b?(m=!0,b="g"):VV[b]||(void 0===g&&(g=12),v=!0,b="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=")
12486
+ var w="$"===u?o:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",y="$"===u?r:/[%p]/.test(b)?l:"",x=VV[b],k=/[defgprs%]/.test(b)
12461
12487
  function C(e){var o,r,l,u=w,C=y
12462
12488
  if("c"===b)C=x(e)+C,e=""
12463
12489
  else{var S=(e=+e)<0||1/e<0
@@ -12466,7 +12492,7 @@ break
12466
12492
  case"0":0===o&&(o=i),t=i
12467
12493
  break
12468
12494
  default:if(!+e[i])break e
12469
- o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==h&&(S=!1),u=(S?"("===h?h:c:"-"===h||"("===h?"":h)+u,C=("s"===b?VV[8+IV/3]:"")+C+(S&&"("===h?")":""),k)for(o=-1,r=e.length;++o<r;)if(48>(l=e.charCodeAt(o))||l>57){C=(46===l?s+e.slice(o+1):e.slice(o))+C,e=e.slice(0,o)
12495
+ o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==h&&(S=!1),u=(S?"("===h?h:c:"-"===h||"("===h?"":h)+u,C=("s"===b?WV[8+NV/3]:"")+C+(S&&"("===h?")":""),k)for(o=-1,r=e.length;++o<r;)if(48>(l=e.charCodeAt(o))||l>57){C=(46===l?s+e.slice(o+1):e.slice(o))+C,e=e.slice(0,o)
12470
12496
  break}}m&&!p&&(e=i(e,1/0))
12471
12497
  var $=u.length+e.length+C.length,M=$<f?new Array(f-$+1).join(t):""
12472
12498
  switch(m&&p&&(e=i(M+e,M.length?f-C.length:1/0),M=""),n){case"<":e=u+e+C+M
@@ -12475,19 +12501,19 @@ case"=":e=u+M+e+C
12475
12501
  break
12476
12502
  case"^":e=M.slice(0,$=M.length>>1)+u+e+C+M.slice($)
12477
12503
  break
12478
- default:e=M+u+e+C}return a(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return e+""},C}return{format:h,formatPrefix:function(e,t){var n=h(((e=OV(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(EV(t)/3))),o=Math.pow(10,-i),r=VV[8+i/3]
12479
- return function(e){return n(o*e)+r}}}}function BV(e,t,n,i){var o,r=function(e,t,n){n=+n
12480
- const i=(t=+t)<(e=+e),o=i?pV(t,e,n):pV(e,t,n)
12504
+ default:e=M+u+e+C}return a(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return e+""},C}return{format:h,formatPrefix:function(e,t){var n=h(((e=zV(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(DV(t)/3))),o=Math.pow(10,-i),r=WV[8+i/3]
12505
+ return function(e){return n(o*e)+r}}}}function GV(e,t,n,i){var o,r=function(e,t,n){n=+n
12506
+ const i=(t=+t)<(e=+e),o=i?wV(t,e,n):wV(e,t,n)
12481
12507
  return(i?-1:1)*(o<0?1/-o:o)}(e,t,n)
12482
- switch((i=OV(null==i?",f":i)).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t))
12483
- return null!=i.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(EV(t)/3)))-EV(Math.abs(e)))}(r,s))||(i.precision=o),LV(i,s)
12484
- case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,EV(t)-EV(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(i.precision=o-("e"===i.type))
12508
+ switch((i=zV(null==i?",f":i)).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t))
12509
+ return null!=i.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(DV(t)/3)))-DV(Math.abs(e)))}(r,s))||(i.precision=o),jV(i,s)
12510
+ case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,DV(t)-DV(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(i.precision=o-("e"===i.type))
12485
12511
  break
12486
- case"f":case"%":null!=i.precision||isNaN(o=function(e){return Math.max(0,-EV(Math.abs(e)))}(r))||(i.precision=o-2*("%"===i.type))}return zV(i)}function qV(e){var t=e.domain
12512
+ case"f":case"%":null!=i.precision||isNaN(o=function(e){return Math.max(0,-DV(Math.abs(e)))}(r))||(i.precision=o-2*("%"===i.type))}return qV(i)}function KV(e){var t=e.domain
12487
12513
  return e.ticks=function(e){var n=t()
12488
12514
  return function(e,t,n){if(!((n=+n)>0))return[]
12489
12515
  if((e=+e)==(t=+t))return[e]
12490
- const i=t<e,[o,r,s]=i?uV(t,e,n):uV(e,t,n)
12516
+ const i=t<e,[o,r,s]=i?bV(t,e,n):bV(e,t,n)
12491
12517
  if(!(r>=o))return[]
12492
12518
  const a=r-o+1,l=new Array(a)
12493
12519
  if(i)if(s<0)for(let e=0;e<a;++e)l[e]=(r-e)/-s
@@ -12495,23 +12521,23 @@ else for(let e=0;e<a;++e)l[e]=(r-e)*s
12495
12521
  else if(s<0)for(let e=0;e<a;++e)l[e]=(o+e)/-s
12496
12522
  else for(let e=0;e<a;++e)l[e]=(o+e)*s
12497
12523
  return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var i=t()
12498
- return BV(i[0],i[i.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10)
12524
+ return GV(i[0],i[i.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10)
12499
12525
  var i,o,r=t(),s=0,a=r.length-1,l=r[s],c=r[a],d=10
12500
- for(c<l&&(o=l,l=c,c=o,o=s,s=a,a=o);d-- >0;){if((o=pV(l,c,n))===i)return r[s]=l,r[a]=c,t(r)
12526
+ for(c<l&&(o=l,l=c,c=o,o=s,s=a,a=o);d-- >0;){if((o=wV(l,c,n))===i)return r[s]=l,r[a]=c,t(r)
12501
12527
  if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o
12502
12528
  else{if(!(o<0))break
12503
- l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}i=o}return e},e}function jV(){var e=MV()(kV,kV)
12504
- return e.copy=function(){return t=e,jV().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())
12505
- var t},gV.apply(e,arguments),qV(e)}function UV(){var e,t=[],n=[],i=[]
12529
+ l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}i=o}return e},e}function JV(){var e=TV()(EV,EV)
12530
+ return e.copy=function(){return t=e,JV().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())
12531
+ var t},kV.apply(e,arguments),KV(e)}function XV(){var e,t=[],n=[],i=[]
12506
12532
  function o(){var e=0,o=Math.max(1,n.length)
12507
- for(i=new Array(o-1);++e<o;)i[e-1]=fV(t,e/o)
12508
- return r}function r(t){return null==t||isNaN(t=+t)?e:n[rV(i,t)]}return r.invertExtent=function(e){var o=n.indexOf(e)
12533
+ for(i=new Array(o-1);++e<o;)i[e-1]=yV(t,e/o)
12534
+ return r}function r(t){return null==t||isNaN(t=+t)?e:n[hV(i,t)]}return r.invertExtent=function(e){var o=n.indexOf(e)
12509
12535
  return o<0?[NaN,NaN]:[o>0?i[o-1]:t[0],o<i.length?i[o]:t[t.length-1]]},r.domain=function(e){if(!arguments.length)return t.slice()
12510
12536
  t=[]
12511
12537
  for(let n of e)null==n||isNaN(n=+n)||t.push(n)
12512
- return t.sort(QF),o()},r.range=function(e){return arguments.length?(n=Array.from(e),o()):n.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.quantiles=function(){return i.slice()},r.copy=function(){return UV().domain(t).range(n).unknown(e)},gV.apply(r,arguments)}PV=HV({thousands:",",grouping:[3],currency:["$",""]}),zV=PV.format,LV=PV.formatPrefix
12513
- const WV="bottom-left",ZV="bottom-right",GV="top-left",KV="top",JV="show",XV="hide",YV="linear",QV="ordinal"
12514
- class eH{constructor(e){this.wafermap=e,this.defaultPadding=0,this.baseMarginPercentage=.04}get containerDimensions(){return this._containerDimensions}get dieDimensions(){return this._dieDimensions}get radius(){return this._radius}get margin(){return this._margin}get horizontalScale(){return this._horizontalScale}get verticalScale(){return this._verticalScale}get invertedHorizontalScale(){return this._invertedHorizontalScale}get invertedVerticalScale(){return this._invertedVerticalScale}updateContainerDimensions(){const e={width:this.wafermap.canvasWidth,height:this.wafermap.canvasHeight},t=Math.min(e.width,e.height),n={top:(e.height-t)/2,right:(e.width-t)/2,bottom:(e.height-t)/2,left:(e.width-t)/2},i={top:t*this.baseMarginPercentage,right:t*this.baseMarginPercentage,bottom:t*this.baseMarginPercentage,left:t*this.baseMarginPercentage}
12538
+ return t.sort(rV),o()},r.range=function(e){return arguments.length?(n=Array.from(e),o()):n.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.quantiles=function(){return i.slice()},r.copy=function(){return XV().domain(t).range(n).unknown(e)},kV.apply(r,arguments)}BV=ZV({thousands:",",grouping:[3],currency:["$",""]}),qV=BV.format,jV=BV.formatPrefix
12539
+ const YV="bottom-left",QV="bottom-right",eH="top-left",tH="top",nH="show",iH="hide",oH="linear",rH="ordinal"
12540
+ class sH{constructor(e){this.wafermap=e,this.defaultPadding=0,this.baseMarginPercentage=.04}get containerDimensions(){return this._containerDimensions}get dieDimensions(){return this._dieDimensions}get radius(){return this._radius}get margin(){return this._margin}get horizontalScale(){return this._horizontalScale}get verticalScale(){return this._verticalScale}get invertedHorizontalScale(){return this._invertedHorizontalScale}get invertedVerticalScale(){return this._invertedVerticalScale}updateContainerDimensions(){const e={width:this.wafermap.canvasWidth,height:this.wafermap.canvasHeight},t=Math.min(e.width,e.height),n={top:(e.height-t)/2,right:(e.width-t)/2,bottom:(e.height-t)/2,left:(e.width-t)/2},i={top:t*this.baseMarginPercentage,right:t*this.baseMarginPercentage,bottom:t*this.baseMarginPercentage,left:t*this.baseMarginPercentage}
12515
12541
  this._margin=this.calculateMarginAddition(i,n),this._containerDimensions=this.calculateContainerDimensions(e,this._margin)
12516
12542
  const o=Math.min(this._containerDimensions.width,this._containerDimensions.height)
12517
12543
  this._radius=o/2,this.updateScales()}updateScales(){const e=Math.min(this._containerDimensions.width,this._containerDimensions.height),t=this.gridDimensionsValidAndDefined()?this.calculateGridDimensionsFromBoundingBox():this.calculateGridDimensionsFromDies(this.wafermap.dies),n=this.wafermap.originLocation
@@ -12519,19 +12545,19 @@ this._horizontalScale=this.createHorizontalScale(n,t,e),this._invertedHorizontal
12519
12545
  return"number"==typeof this.wafermap.gridMaxY&&"number"==typeof this.wafermap.gridMinY&&"number"==typeof this.wafermap.gridMaxX&&"number"==typeof this.wafermap.gridMinX&&(e.origin.x=this.wafermap.gridMinX,e.origin.y=this.wafermap.gridMinY,e.rows=this.wafermap.gridMaxY-this.wafermap.gridMinY+1,e.cols=this.wafermap.gridMaxX-this.wafermap.gridMinX+1),e}calculateGridDimensionsFromDies(e){if(0===e.length||void 0===e[0])return{origin:{x:0,y:0},rows:0,cols:0}
12520
12546
  const t={x:e[0].x,y:e[0].y},n={x:e[0].x,y:e[0].y}
12521
12547
  for(const i of e)i.x<t.x&&(t.x=i.x),i.y<t.y&&(t.y=i.y),i.x>n.x&&(n.x=i.x),i.y>n.y&&(n.y=i.y)
12522
- return{origin:t,rows:n.y-t.y+1,cols:n.x-t.x+1}}calculateContainerDimensions(e,t){return{width:e.width-t.left-t.right,height:e.height-t.top-t.bottom}}createHorizontalScale(e,t,n){const i=wV().domain(mV(t.origin.x,t.origin.x+t.cols)).paddingInner(0).paddingOuter(0).align(0).round(!1)
12523
- return e===WV||e===GV?i.range([0,n]):i.range([n,0])}createInvertedHorizontalScale(e,t,n){const i=UV().domain([0,n])
12524
- return e===WV||e===GV?i.range(mV(t.origin.x,t.origin.x+t.cols)):i.range(mV(t.origin.x,t.origin.x+t.cols).reverse())}createVerticalScale(e,t,n){const i=wV().domain(mV(t.origin.y,t.origin.y+t.rows)).paddingInner(this.defaultPadding).paddingOuter(0).align(0).round(!1)
12525
- return e===WV||e===ZV?i.range([n,0]):i.range([0,n])}createInvertedVerticalScale(e,t,n){const i=UV().domain([0,n])
12526
- return e===WV||e===ZV?i.range(mV(t.origin.y,t.origin.y+t.rows).reverse()):i.range(mV(t.origin.y,t.origin.y+t.rows))}calculateMarginAddition(e,t){return{top:e.top+t.top,right:e.right+t.right,bottom:e.bottom+t.bottom,left:e.left+t.left}}}class tH{constructor(e,t){this.wafermap=e,this.dataManager=t,this.fontSizeFactor=.8,this.nonHighlightedOpacity=.3,this.emptyDieColor="rgba(218,223,236,1)",this.nanDieColor="rgba(122,122,122,1)"}get labelsFontSize(){return this._labelsFontSize}get diesRenderInfo(){return this._diesRenderInfo}updateLabelsFontSize(){this._labelsFontSize=this.calculateLabelsFontSize(this.dataManager.dieDimensions,this.wafermap.maxCharacters),this.updateDiesRenderInfo()}updateDiesRenderInfo(){this.d3ColorScale=this.createD3ColorScale(this.wafermap.colorScale,this.wafermap.colorScaleMode),this._diesRenderInfo=this.wafermap.dies.map((e=>this.computeDieRenderInfo(e))).filter((e=>null!==e))}computeDieRenderInfo(e){const t=this.dataManager.margin,n=this.dataManager.horizontalScale(e.x),i=this.dataManager.verticalScale(e.y)
12527
- return void 0===n||void 0===i?null:{x:n+t.right,y:i+t.top,fillStyle:this.calculateFillStyle(e.value,this.wafermap.colorScaleMode,this.wafermap.highlightedTags,e.tags),text:this.buildLabel(e.value,this.wafermap.maxCharacters,this.wafermap.dieLabelsHidden,this.wafermap.dieLabelsSuffix)}}calculateLabelsFontSize(e,t){return Math.min(e.height,e.width/(.5*Math.max(2,t))*this.fontSizeFactor)}createD3ColorScale(e,t){return this.isColorScaleLinear(t)?jV().domain(e.values.map((e=>+e))).range(e.colors):bV().domain(e.values).range(e.colors)}dieHasData(e){return null!=e&&""!==e}buildLabel(e,t,n,i){if(n||!this.dieHasData(e))return""
12548
+ return{origin:t,rows:n.y-t.y+1,cols:n.x-t.x+1}}calculateContainerDimensions(e,t){return{width:e.width-t.left-t.right,height:e.height-t.top-t.bottom}}createHorizontalScale(e,t,n){const i=$V().domain(xV(t.origin.x,t.origin.x+t.cols)).paddingInner(0).paddingOuter(0).align(0).round(!1)
12549
+ return e===YV||e===eH?i.range([0,n]):i.range([n,0])}createInvertedHorizontalScale(e,t,n){const i=XV().domain([0,n])
12550
+ return e===YV||e===eH?i.range(xV(t.origin.x,t.origin.x+t.cols)):i.range(xV(t.origin.x,t.origin.x+t.cols).reverse())}createVerticalScale(e,t,n){const i=$V().domain(xV(t.origin.y,t.origin.y+t.rows)).paddingInner(this.defaultPadding).paddingOuter(0).align(0).round(!1)
12551
+ return e===YV||e===QV?i.range([n,0]):i.range([0,n])}createInvertedVerticalScale(e,t,n){const i=XV().domain([0,n])
12552
+ return e===YV||e===QV?i.range(xV(t.origin.y,t.origin.y+t.rows).reverse()):i.range(xV(t.origin.y,t.origin.y+t.rows))}calculateMarginAddition(e,t){return{top:e.top+t.top,right:e.right+t.right,bottom:e.bottom+t.bottom,left:e.left+t.left}}}class aH{constructor(e,t){this.wafermap=e,this.dataManager=t,this.fontSizeFactor=.8,this.nonHighlightedOpacity=.3,this.emptyDieColor="rgba(218,223,236,1)",this.nanDieColor="rgba(122,122,122,1)"}get labelsFontSize(){return this._labelsFontSize}get diesRenderInfo(){return this._diesRenderInfo}updateLabelsFontSize(){this._labelsFontSize=this.calculateLabelsFontSize(this.dataManager.dieDimensions,this.wafermap.maxCharacters),this.updateDiesRenderInfo()}updateDiesRenderInfo(){this.d3ColorScale=this.createD3ColorScale(this.wafermap.colorScale,this.wafermap.colorScaleMode),this._diesRenderInfo=this.wafermap.dies.map((e=>this.computeDieRenderInfo(e))).filter((e=>null!==e))}computeDieRenderInfo(e){const t=this.dataManager.margin,n=this.dataManager.horizontalScale(e.x),i=this.dataManager.verticalScale(e.y)
12553
+ return void 0===n||void 0===i?null:{x:n+t.right,y:i+t.top,fillStyle:this.calculateFillStyle(e.value,this.wafermap.colorScaleMode,this.wafermap.highlightedTags,e.tags),text:this.buildLabel(e.value,this.wafermap.maxCharacters,this.wafermap.dieLabelsHidden,this.wafermap.dieLabelsSuffix)}}calculateLabelsFontSize(e,t){return Math.min(e.height,e.width/(.5*Math.max(2,t))*this.fontSizeFactor)}createD3ColorScale(e,t){return this.isColorScaleLinear(t)?JV().domain(e.values.map((e=>+e))).range(e.colors):SV().domain(e.values).range(e.colors)}dieHasData(e){return null!=e&&""!==e}buildLabel(e,t,n,i){if(n||!this.dieHasData(e))return""
12528
12554
  const o=`${e}${i}`
12529
12555
  return o.length>t?`${o.substring(0,t)}…`:o}calculateOpacity(e,t){if(!t||0===t.length)return 1
12530
12556
  const n=new Set(t)
12531
- return e?.some((e=>n.has(e)))?1:this.nonHighlightedOpacity}isColorScaleLinear(e){return e===YV}isColorScaleOrdinal(e){return e===QV}calculateFillStyle(e,t,n,i){let o=this.emptyDieColor
12557
+ return e?.some((e=>n.has(e)))?1:this.nonHighlightedOpacity}isColorScaleLinear(e){return e===oH}isColorScaleOrdinal(e){return e===rH}calculateFillStyle(e,t,n,i){let o=this.emptyDieColor
12532
12558
  if(this.dieHasData(e)&&(isNaN(+e)?o=this.nanDieColor:this.isColorScaleLinear(t)?o=this.d3ColorScale(+e):this.isColorScaleOrdinal(t)&&(o=this.d3ColorScale(e))),void 0===o)return this.emptyDieColor
12533
12559
  let r=Zo(o)
12534
- return null===r?this.emptyDieColor:(r=new Fo(r.r,r.g,r.b,this.calculateOpacity(i,n)),r.toStringWebRGBA())}}class nH{constructor(e){this.wafermap=e,this.computations=new eH(e),this.prerendering=new tH(e,this)}get containerDimensions(){return this.computations.containerDimensions}get dieDimensions(){return this.computations.dieDimensions}get radius(){return this.computations.radius}get margin(){return this.computations.margin}get horizontalScale(){return this.computations.horizontalScale}get invertedHorizontalScale(){return this.computations.invertedHorizontalScale}get verticalScale(){return this.computations.verticalScale}get invertedVerticalScale(){return this.computations.invertedVerticalScale}get labelsFontSize(){return this.prerendering.labelsFontSize}get diesRenderInfo(){return this.prerendering.diesRenderInfo}get data(){return this.dataMap}updateContainerDimensions(){this.computations.updateContainerDimensions(),this.updateDataMap(),this.updateLabelsFontSize()}updateScales(){this.computations.updateScales(),this.updateDataMap(),this.updateLabelsFontSize()}updateLabelsFontSize(){this.prerendering.updateLabelsFontSize()}updateDiesRenderInfo(){this.prerendering.updateDiesRenderInfo()}getWaferMapDie(e){return this.dataMap.get(`${e.x}_${e.y}`)}updateDataMap(){this.dataMap=new Map(this.wafermap.dies.map((e=>[`${e.x}_${e.y}`,e])))}}class iH{constructor(e){this.wafermap=e,this.minDieDim=50}updateSortedDiesAndDrawWafer(){this.dies=this.wafermap.dataManager.diesRenderInfo.sort(((e,t)=>e.fillStyle>t.fillStyle?1:t.fillStyle>e.fillStyle?-1:0)),this.drawWafer()}drawWafer(){this.wafermap.canvasContext.save(),this.clearCanvas(),this.scaleCanvas(),this.renderDies(),this.renderText(),this.wafermap.canvasContext.restore(),this.renderHover()}renderHover(){this.wafermap.hoverWidth=this.wafermap.dataManager.dieDimensions.width*this.wafermap.transform.k,this.wafermap.hoverHeight=this.wafermap.dataManager.dieDimensions.height*this.wafermap.transform.k,this.wafermap.hoverOpacity=void 0===this.wafermap.hoverDie?XV:JV,this.wafermap.hoverTransform=this.calculateHoverTransform()}calculateHoverTransform(){if(void 0!==this.wafermap.hoverDie){const e=this.wafermap.dataManager.horizontalScale(this.wafermap.hoverDie.x)
12560
+ return null===r?this.emptyDieColor:(r=new Fo(r.r,r.g,r.b,this.calculateOpacity(i,n)),r.toStringWebRGBA())}}class lH{constructor(e){this.wafermap=e,this.computations=new sH(e),this.prerendering=new aH(e,this)}get containerDimensions(){return this.computations.containerDimensions}get dieDimensions(){return this.computations.dieDimensions}get radius(){return this.computations.radius}get margin(){return this.computations.margin}get horizontalScale(){return this.computations.horizontalScale}get invertedHorizontalScale(){return this.computations.invertedHorizontalScale}get verticalScale(){return this.computations.verticalScale}get invertedVerticalScale(){return this.computations.invertedVerticalScale}get labelsFontSize(){return this.prerendering.labelsFontSize}get diesRenderInfo(){return this.prerendering.diesRenderInfo}get data(){return this.dataMap}updateContainerDimensions(){this.computations.updateContainerDimensions(),this.updateDataMap(),this.updateLabelsFontSize()}updateScales(){this.computations.updateScales(),this.updateDataMap(),this.updateLabelsFontSize()}updateLabelsFontSize(){this.prerendering.updateLabelsFontSize()}updateDiesRenderInfo(){this.prerendering.updateDiesRenderInfo()}getWaferMapDie(e){return this.dataMap.get(`${e.x}_${e.y}`)}updateDataMap(){this.dataMap=new Map(this.wafermap.dies.map((e=>[`${e.x}_${e.y}`,e])))}}class cH{constructor(e){this.wafermap=e,this.minDieDim=50}updateSortedDiesAndDrawWafer(){this.dies=this.wafermap.dataManager.diesRenderInfo.sort(((e,t)=>e.fillStyle>t.fillStyle?1:t.fillStyle>e.fillStyle?-1:0)),this.drawWafer()}drawWafer(){this.wafermap.canvasContext.save(),this.clearCanvas(),this.scaleCanvas(),this.renderDies(),this.renderText(),this.wafermap.canvasContext.restore(),this.renderHover()}renderHover(){this.wafermap.hoverWidth=this.wafermap.dataManager.dieDimensions.width*this.wafermap.transform.k,this.wafermap.hoverHeight=this.wafermap.dataManager.dieDimensions.height*this.wafermap.transform.k,this.wafermap.hoverOpacity=void 0===this.wafermap.hoverDie?iH:nH,this.wafermap.hoverTransform=this.calculateHoverTransform()}calculateHoverTransform(){if(void 0!==this.wafermap.hoverDie){const e=this.wafermap.dataManager.horizontalScale(this.wafermap.hoverDie.x)
12535
12561
  if(void 0===e)return""
12536
12562
  const t=this.wafermap.dataManager.verticalScale(this.wafermap.hoverDie.y)
12537
12563
  if(void 0===t)return""
@@ -12544,19 +12570,19 @@ if(e*t*(this.wafermap.transform.k||1)>=this.minDieDim){const n=this.wafermap.dat
12544
12570
  i.font=`${n.toString()}px sans-serif`,i.fillStyle="#ffffff",i.textAlign="center",i.lineCap="butt"
12545
12571
  const o=i.measureText("M"),r=this.wafermap.transform.invert([0,0]),s=this.wafermap.transform.invert([this.wafermap.canvas.width,this.wafermap.canvas.height])
12546
12572
  r[0]-=e,r[1]-=t
12547
- for(const n of this.dies)this.isDieVisible(n,r,s)&&i.fillText(n.text,n.x+e/2,n.y+t/2+o.width/2,e-e/100*20)}}clearCanvas(){this.wafermap.canvasContext.clearRect(0,0,this.wafermap.canvas.width,this.wafermap.canvas.height)}scaleCanvas(){this.wafermap.canvasContext.translate(this.wafermap.transform.x,this.wafermap.transform.y),this.wafermap.canvasContext.scale(this.wafermap.transform.k,this.wafermap.transform.k)}isDieVisible(e,t,n){return e.x>=t[0]&&e.x<n[0]&&e.y>=t[1]&&e.y<n[1]}}class oH{constructor(e){this.wafermap=e,this.zoomTransform=VF,this.minScale=1.1,this.minExtentPoint=[-100,-100],this.extentPadding=100}createZoomBehavior(){this.zoomBehavior=JF().scaleExtent([1.1,this.getZoomMax(this.wafermap.canvasWidth*this.wafermap.canvasHeight,this.wafermap.dataManager.containerDimensions.width*this.wafermap.dataManager.containerDimensions.height)]).translateExtent([this.minExtentPoint,[this.wafermap.canvasWidth+this.extentPadding,this.wafermap.canvasHeight+this.extentPadding]]).filter((e=>HF(this.wafermap.canvas).k>=this.minScale||"wheel"===e.type)).on("zoom",(e=>{this.rescale(e)})),this.zoomBehavior(_z(this.wafermap.canvas))}rescale(e){const t=e.transform
12548
- t.k===this.minScale?(this.zoomTransform=VF,this.zoomBehavior.transform(_z(this.wafermap.canvas),VF)):this.zoomTransform=t,this.wafermap.transform=this.zoomTransform}getZoomMax(e,t){return Math.ceil(t/e*100)}}class rH{constructor(e){this.wafermap=e}mousemove(e){const t={x:e.offsetX,y:e.offsetY}
12573
+ for(const n of this.dies)this.isDieVisible(n,r,s)&&i.fillText(n.text,n.x+e/2,n.y+t/2+o.width/2,e-e/100*20)}}clearCanvas(){this.wafermap.canvasContext.clearRect(0,0,this.wafermap.canvas.width,this.wafermap.canvas.height)}scaleCanvas(){this.wafermap.canvasContext.translate(this.wafermap.transform.x,this.wafermap.transform.y),this.wafermap.canvasContext.scale(this.wafermap.transform.k,this.wafermap.transform.k)}isDieVisible(e,t,n){return e.x>=t[0]&&e.x<n[0]&&e.y>=t[1]&&e.y<n[1]}}class dH{constructor(e){this.wafermap=e,this.zoomTransform=WF,this.minScale=1.1,this.minExtentPoint=[-100,-100],this.extentPadding=100}createZoomBehavior(){this.zoomBehavior=nV().scaleExtent([1.1,this.getZoomMax(this.wafermap.canvasWidth*this.wafermap.canvasHeight,this.wafermap.dataManager.containerDimensions.width*this.wafermap.dataManager.containerDimensions.height)]).translateExtent([this.minExtentPoint,[this.wafermap.canvasWidth+this.extentPadding,this.wafermap.canvasHeight+this.extentPadding]]).filter((e=>ZF(this.wafermap.canvas).k>=this.minScale||"wheel"===e.type)).on("zoom",(e=>{this.rescale(e)})),this.zoomBehavior(Rz(this.wafermap.canvas))}rescale(e){const t=e.transform
12574
+ t.k===this.minScale?(this.zoomTransform=WF,this.zoomBehavior.transform(Rz(this.wafermap.canvas),WF)):this.zoomTransform=t,this.wafermap.transform=this.zoomTransform}getZoomMax(e,t){return Math.ceil(t/e*100)}}class hH{constructor(e){this.wafermap=e}mousemove(e){const t={x:e.offsetX,y:e.offsetY}
12549
12575
  if(!this.hoversOverDie(this.wafermap,t))return void(this.wafermap.hoverDie=void 0)
12550
12576
  const n=this.wafermap.transform.invert([t.x,t.y]),i=this.calculateDieCoordinates(this.wafermap,{x:n[0],y:n[1]})
12551
- this.wafermap.hoverDie=this.wafermap.dataManager.getWaferMapDie(i)}mouseout(){this.wafermap.hoverDie=void 0}calculateDieCoordinates(e,t){const n=e.originLocation,i=n===WV||n===GV?Math.floor:Math.ceil,o=n===WV||n===ZV?Math.floor:Math.ceil
12577
+ this.wafermap.hoverDie=this.wafermap.dataManager.getWaferMapDie(i)}mouseout(){this.wafermap.hoverDie=void 0}calculateDieCoordinates(e,t){const n=e.originLocation,i=n===YV||n===eH?Math.floor:Math.ceil,o=n===YV||n===QV?Math.floor:Math.ceil
12552
12578
  return{x:i(e.dataManager.invertedHorizontalScale(t.x-e.dataManager.margin.left)),y:o(e.dataManager.invertedVerticalScale(t.y-e.dataManager.margin.top))}}hoversOverDie(e,t){const n=e.canvasContext.getImageData(t.x,t.y,1,1).data
12553
12579
  let i=0
12554
12580
  for(const e of n)i+=e
12555
- return i>0}}class sH{constructor(e){this.wafermap=e,this.onWheelMove=e=>{e.preventDefault()},this.onMouseMove=e=>{this.hoverHandler.mousemove(e)},this.onMouseOut=()=>{this.hoverHandler.mouseout()},this.zoomHandler=new oH(e),this.hoverHandler=new rH(e)}attachEvents(){this.zoomHandler.createZoomBehavior(),this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut),this.wafermap.canvas.addEventListener("wheel",this.onWheelMove,{passive:!1})}detachEvents(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut),this.wafermap.canvas.removeEventListener("wheel",this.onWheelMove)}}const aH=["highlightedTags","canvasWidth","canvasHeight","originLocation","gridMinX","gridMaxX","gridMinY","gridMaxY","dies","maxCharacters","colorScale","colorScaleMode","dieLabelsHidden","dieLabelsSuffix","transform","hoverDie"]
12556
- class lH extends TR{constructor(e){super(aH),this.wafermap=e,this.updateQueued=!1}get requiresEventsUpdate(){return this.isTracked("highlightedTags")||this.isTracked("canvasWidth")||this.isTracked("canvasHeight")||this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")||this.isTracked("maxCharacters")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")||this.isTracked("transform")}get requiresContainerDimensionsUpdate(){return this.isTracked("canvasWidth")||this.isTracked("canvasHeight")}get requiresScalesUpdate(){return this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")}get requiresLabelsFontSizeUpdate(){return this.isTracked("maxCharacters")}get requiresDiesRenderInfoUpdate(){return this.isTracked("highlightedTags")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")}get requiresDrawnWaferUpdate(){return this.isTracked("transform")}get requiresRenderHoverUpdate(){return this.isTracked("hoverDie")}queueUpdate(){this.wafermap.$fastController.isConnected&&(this.updateQueued||(this.updateQueued=!0,u.queueUpdate((()=>{this.wafermap.update(),this.untrackAll(),this.updateQueued=!1}))))}}class cH{constructor(e){this.wafermap=e,this.invalidGridDimensions=!1}getValidity(){return{invalidGridDimensions:this.invalidGridDimensions}}isValid(){return Object.values(this.getValidity()).every((e=>!1===e))}validateGridDimensions(){return this.invalidGridDimensions=!1,void 0===this.wafermap.gridMinX&&void 0===this.wafermap.gridMaxX&&void 0===this.wafermap.gridMinY&&void 0===this.wafermap.gridMaxY?this.invalidGridDimensions=!1:("number"!=typeof this.wafermap.gridMinX||"number"!=typeof this.wafermap.gridMaxX||"number"!=typeof this.wafermap.gridMinY||"number"!=typeof this.wafermap.gridMaxY||this.wafermap.gridMaxX<this.wafermap.gridMinX||this.wafermap.gridMaxY<this.wafermap.gridMinY)&&(this.invalidGridDimensions=!0),!this.invalidGridDimensions}}class dH extends Lt{constructor(){super(...arguments),this.waferMapUpdateTracker=new lH(this),this.originLocation=WV,this.gridMinX=void 0,this.gridMaxX=void 0,this.gridMinY=void 0,this.gridMaxY=void 0,this.orientation=KV,this.maxCharacters=4,this.dieLabelsHidden=!1,this.dieLabelsSuffix="",this.colorScaleMode=YV,this.dataManager=new nH(this),this.renderer=new iH(this),this.renderQueued=!1,this.transform=VF,this.hoverTransform="",this.hoverOpacity=XV,this.hoverWidth=0,this.hoverHeight=0,this.highlightedTags=[],this.dies=[],this.colorScale={colors:[],values:[]},this.eventCoordinator=new sH(this),this.resizeObserver=this.createResizeObserver(),this.waferMapValidator=new cH(this)}get validity(){return this.waferMapValidator.getValidity()}connectedCallback(){super.connectedCallback(),this.canvasContext=this.canvas.getContext("2d",{willReadFrequently:!0}),this.resizeObserver.observe(this),this.waferMapUpdateTracker.trackAll()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this)}update(){this.waferMapUpdateTracker.requiresEventsUpdate?(this.eventCoordinator.detachEvents(),this.waferMapValidator.validateGridDimensions(),this.waferMapUpdateTracker.requiresContainerDimensionsUpdate?(this.dataManager.updateContainerDimensions(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresScalesUpdate?(this.dataManager.updateScales(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresLabelsFontSizeUpdate?(this.dataManager.updateLabelsFontSize(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresDiesRenderInfoUpdate?(this.dataManager.updateDiesRenderInfo(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresDrawnWaferUpdate&&this.renderer.drawWafer(),this.eventCoordinator.attachEvents()):this.waferMapUpdateTracker.requiresRenderHoverUpdate&&this.renderer.renderHover()}createResizeObserver(){return new ResizeObserver((e=>{const t=e[0]
12581
+ return i>0}}class uH{constructor(e){this.wafermap=e,this.onWheelMove=e=>{e.preventDefault()},this.onMouseMove=e=>{this.hoverHandler.mousemove(e)},this.onMouseOut=()=>{this.hoverHandler.mouseout()},this.zoomHandler=new dH(e),this.hoverHandler=new hH(e)}attachEvents(){this.zoomHandler.createZoomBehavior(),this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut),this.wafermap.canvas.addEventListener("wheel",this.onWheelMove,{passive:!1})}detachEvents(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut),this.wafermap.canvas.removeEventListener("wheel",this.onWheelMove)}}const pH=["highlightedTags","canvasWidth","canvasHeight","originLocation","gridMinX","gridMaxX","gridMinY","gridMaxY","dies","maxCharacters","colorScale","colorScaleMode","dieLabelsHidden","dieLabelsSuffix","transform","hoverDie"]
12582
+ class fH extends TR{constructor(e){super(pH),this.wafermap=e,this.updateQueued=!1}get requiresEventsUpdate(){return this.isTracked("highlightedTags")||this.isTracked("canvasWidth")||this.isTracked("canvasHeight")||this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")||this.isTracked("maxCharacters")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")||this.isTracked("transform")}get requiresContainerDimensionsUpdate(){return this.isTracked("canvasWidth")||this.isTracked("canvasHeight")}get requiresScalesUpdate(){return this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")}get requiresLabelsFontSizeUpdate(){return this.isTracked("maxCharacters")}get requiresDiesRenderInfoUpdate(){return this.isTracked("highlightedTags")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")}get requiresDrawnWaferUpdate(){return this.isTracked("transform")}get requiresRenderHoverUpdate(){return this.isTracked("hoverDie")}queueUpdate(){this.wafermap.$fastController.isConnected&&(this.updateQueued||(this.updateQueued=!0,u.queueUpdate((()=>{this.wafermap.update(),this.untrackAll(),this.updateQueued=!1}))))}}class mH{constructor(e){this.wafermap=e,this.invalidGridDimensions=!1}getValidity(){return{invalidGridDimensions:this.invalidGridDimensions}}isValid(){return Object.values(this.getValidity()).every((e=>!1===e))}validateGridDimensions(){return this.invalidGridDimensions=!1,void 0===this.wafermap.gridMinX&&void 0===this.wafermap.gridMaxX&&void 0===this.wafermap.gridMinY&&void 0===this.wafermap.gridMaxY?this.invalidGridDimensions=!1:("number"!=typeof this.wafermap.gridMinX||"number"!=typeof this.wafermap.gridMaxX||"number"!=typeof this.wafermap.gridMinY||"number"!=typeof this.wafermap.gridMaxY||this.wafermap.gridMaxX<this.wafermap.gridMinX||this.wafermap.gridMaxY<this.wafermap.gridMinY)&&(this.invalidGridDimensions=!0),!this.invalidGridDimensions}}class gH extends Lt{constructor(){super(...arguments),this.waferMapUpdateTracker=new fH(this),this.originLocation=YV,this.gridMinX=void 0,this.gridMaxX=void 0,this.gridMinY=void 0,this.gridMaxY=void 0,this.orientation=tH,this.maxCharacters=4,this.dieLabelsHidden=!1,this.dieLabelsSuffix="",this.colorScaleMode=oH,this.dataManager=new lH(this),this.renderer=new cH(this),this.renderQueued=!1,this.transform=WF,this.hoverTransform="",this.hoverOpacity=iH,this.hoverWidth=0,this.hoverHeight=0,this.highlightedTags=[],this.dies=[],this.colorScale={colors:[],values:[]},this.eventCoordinator=new uH(this),this.resizeObserver=this.createResizeObserver(),this.waferMapValidator=new mH(this)}get validity(){return this.waferMapValidator.getValidity()}connectedCallback(){super.connectedCallback(),this.canvasContext=this.canvas.getContext("2d",{willReadFrequently:!0}),this.resizeObserver.observe(this),this.waferMapUpdateTracker.trackAll()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this)}update(){this.waferMapUpdateTracker.requiresEventsUpdate?(this.eventCoordinator.detachEvents(),this.waferMapValidator.validateGridDimensions(),this.waferMapUpdateTracker.requiresContainerDimensionsUpdate?(this.dataManager.updateContainerDimensions(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresScalesUpdate?(this.dataManager.updateScales(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresLabelsFontSizeUpdate?(this.dataManager.updateLabelsFontSize(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresDiesRenderInfoUpdate?(this.dataManager.updateDiesRenderInfo(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresDrawnWaferUpdate&&this.renderer.drawWafer(),this.eventCoordinator.attachEvents()):this.waferMapUpdateTracker.requiresRenderHoverUpdate&&this.renderer.renderHover()}createResizeObserver(){return new ResizeObserver((e=>{const t=e[0]
12557
12583
  if(void 0===t)return
12558
12584
  const{height:n,width:i}=t.contentRect
12559
- this.canvas.width=i,this.canvas.height=n,this.canvasWidth=i,this.canvasHeight=n}))}originLocationChanged(){this.waferMapUpdateTracker.track("originLocation"),this.waferMapUpdateTracker.queueUpdate()}gridMinXChanged(){this.waferMapUpdateTracker.track("gridMinX"),this.waferMapUpdateTracker.queueUpdate()}gridMaxXChanged(){this.waferMapUpdateTracker.track("gridMaxX"),this.waferMapUpdateTracker.queueUpdate()}gridMinYChanged(){this.waferMapUpdateTracker.track("gridMinY"),this.waferMapUpdateTracker.queueUpdate()}gridMaxYChanged(){this.waferMapUpdateTracker.track("gridMaxY"),this.waferMapUpdateTracker.queueUpdate()}maxCharactersChanged(){this.waferMapUpdateTracker.track("maxCharacters"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsHiddenChanged(){this.waferMapUpdateTracker.track("dieLabelsHidden"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsSuffixChanged(){this.waferMapUpdateTracker.track("dieLabelsSuffix"),this.waferMapUpdateTracker.queueUpdate()}colorScaleModeChanged(){this.waferMapUpdateTracker.track("colorScaleMode"),this.waferMapUpdateTracker.queueUpdate()}highlightedTagsChanged(){this.waferMapUpdateTracker.track("highlightedTags"),this.waferMapUpdateTracker.queueUpdate()}diesChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}colorScaleChanged(){this.waferMapUpdateTracker.track("colorScale"),this.waferMapUpdateTracker.queueUpdate()}transformChanged(){this.waferMapUpdateTracker.track("transform"),this.waferMapUpdateTracker.queueUpdate()}canvasWidthChanged(){this.waferMapUpdateTracker.track("canvasWidth"),this.waferMapUpdateTracker.queueUpdate()}canvasHeightChanged(){this.waferMapUpdateTracker.track("canvasHeight"),this.waferMapUpdateTracker.queueUpdate()}hoverDieChanged(){this.$emit("die-hover",{currentDie:this.hoverDie}),this.waferMapUpdateTracker.track("hoverDie"),this.waferMapUpdateTracker.queueUpdate()}}e([se({attribute:"origin-location"})],dH.prototype,"originLocation",void 0),e([se({attribute:"grid-min-x",converter:oe})],dH.prototype,"gridMinX",void 0),e([se({attribute:"grid-max-x",converter:oe})],dH.prototype,"gridMaxX",void 0),e([se({attribute:"grid-min-y",converter:oe})],dH.prototype,"gridMinY",void 0),e([se({attribute:"grid-max-y",converter:oe})],dH.prototype,"gridMaxY",void 0),e([se],dH.prototype,"orientation",void 0),e([se({attribute:"max-characters",converter:oe})],dH.prototype,"maxCharacters",void 0),e([se({attribute:"die-labels-hidden",mode:"boolean"})],dH.prototype,"dieLabelsHidden",void 0),e([se({attribute:"die-labels-suffix"})],dH.prototype,"dieLabelsSuffix",void 0),e([se({attribute:"color-scale-mode"})],dH.prototype,"colorScaleMode",void 0),e([g],dH.prototype,"canvasWidth",void 0),e([g],dH.prototype,"canvasHeight",void 0),e([g],dH.prototype,"transform",void 0),e([g],dH.prototype,"hoverTransform",void 0),e([g],dH.prototype,"hoverOpacity",void 0),e([g],dH.prototype,"hoverWidth",void 0),e([g],dH.prototype,"hoverHeight",void 0),e([g],dH.prototype,"hoverDie",void 0),e([g],dH.prototype,"highlightedTags",void 0),e([g],dH.prototype,"dies",void 0),e([g],dH.prototype,"colorScale",void 0)
12560
- const hH=dH.compose({baseName:"wafer-map",template:XF,styles:YF})
12561
- bi.getOrCreate().withPrefix("nimble").register(hH())}()
12585
+ this.canvas.width=i,this.canvas.height=n,this.canvasWidth=i,this.canvasHeight=n}))}originLocationChanged(){this.waferMapUpdateTracker.track("originLocation"),this.waferMapUpdateTracker.queueUpdate()}gridMinXChanged(){this.waferMapUpdateTracker.track("gridMinX"),this.waferMapUpdateTracker.queueUpdate()}gridMaxXChanged(){this.waferMapUpdateTracker.track("gridMaxX"),this.waferMapUpdateTracker.queueUpdate()}gridMinYChanged(){this.waferMapUpdateTracker.track("gridMinY"),this.waferMapUpdateTracker.queueUpdate()}gridMaxYChanged(){this.waferMapUpdateTracker.track("gridMaxY"),this.waferMapUpdateTracker.queueUpdate()}maxCharactersChanged(){this.waferMapUpdateTracker.track("maxCharacters"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsHiddenChanged(){this.waferMapUpdateTracker.track("dieLabelsHidden"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsSuffixChanged(){this.waferMapUpdateTracker.track("dieLabelsSuffix"),this.waferMapUpdateTracker.queueUpdate()}colorScaleModeChanged(){this.waferMapUpdateTracker.track("colorScaleMode"),this.waferMapUpdateTracker.queueUpdate()}highlightedTagsChanged(){this.waferMapUpdateTracker.track("highlightedTags"),this.waferMapUpdateTracker.queueUpdate()}diesChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}colorScaleChanged(){this.waferMapUpdateTracker.track("colorScale"),this.waferMapUpdateTracker.queueUpdate()}transformChanged(){this.waferMapUpdateTracker.track("transform"),this.waferMapUpdateTracker.queueUpdate()}canvasWidthChanged(){this.waferMapUpdateTracker.track("canvasWidth"),this.waferMapUpdateTracker.queueUpdate()}canvasHeightChanged(){this.waferMapUpdateTracker.track("canvasHeight"),this.waferMapUpdateTracker.queueUpdate()}hoverDieChanged(){this.$emit("die-hover",{currentDie:this.hoverDie}),this.waferMapUpdateTracker.track("hoverDie"),this.waferMapUpdateTracker.queueUpdate()}}e([se({attribute:"origin-location"})],gH.prototype,"originLocation",void 0),e([se({attribute:"grid-min-x",converter:oe})],gH.prototype,"gridMinX",void 0),e([se({attribute:"grid-max-x",converter:oe})],gH.prototype,"gridMaxX",void 0),e([se({attribute:"grid-min-y",converter:oe})],gH.prototype,"gridMinY",void 0),e([se({attribute:"grid-max-y",converter:oe})],gH.prototype,"gridMaxY",void 0),e([se],gH.prototype,"orientation",void 0),e([se({attribute:"max-characters",converter:oe})],gH.prototype,"maxCharacters",void 0),e([se({attribute:"die-labels-hidden",mode:"boolean"})],gH.prototype,"dieLabelsHidden",void 0),e([se({attribute:"die-labels-suffix"})],gH.prototype,"dieLabelsSuffix",void 0),e([se({attribute:"color-scale-mode"})],gH.prototype,"colorScaleMode",void 0),e([g],gH.prototype,"canvasWidth",void 0),e([g],gH.prototype,"canvasHeight",void 0),e([g],gH.prototype,"transform",void 0),e([g],gH.prototype,"hoverTransform",void 0),e([g],gH.prototype,"hoverOpacity",void 0),e([g],gH.prototype,"hoverWidth",void 0),e([g],gH.prototype,"hoverHeight",void 0),e([g],gH.prototype,"hoverDie",void 0),e([g],gH.prototype,"highlightedTags",void 0),e([g],gH.prototype,"dies",void 0),e([g],gH.prototype,"colorScale",void 0)
12586
+ const vH=gH.compose({baseName:"wafer-map",template:iV,styles:oV})
12587
+ bi.getOrCreate().withPrefix("nimble").register(vH())}()
12562
12588
  //# sourceMappingURL=all-components-bundle.min.js.map