@ni/nimble-components 19.6.3 → 19.8.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.
- package/dist/all-components-bundle.js +53 -5
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +617 -600
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/spinner/index.d.ts +7 -0
- package/dist/esm/spinner/index.js +15 -0
- package/dist/esm/spinner/index.js.map +1 -1
- package/dist/esm/spinner/styles.js +16 -2
- package/dist/esm/spinner/styles.js.map +1 -1
- package/dist/esm/spinner/types.d.ts +9 -0
- package/dist/esm/spinner/types.js +9 -0
- package/dist/esm/spinner/types.js.map +1 -0
- package/dist/esm/src/spinner/index.d.ts +7 -0
- package/dist/esm/src/spinner/types.d.ts +9 -0
- package/dist/esm/src/table/components/cell/index.d.ts +1 -0
- package/dist/esm/src/table-column/base/cell-view/index.d.ts +1 -0
- package/dist/esm/src/table-column/base/types.d.ts +1 -0
- package/dist/esm/table/components/cell/index.d.ts +1 -0
- package/dist/esm/table/components/cell/index.js +3 -0
- package/dist/esm/table/components/cell/index.js.map +1 -1
- package/dist/esm/table/components/row/template.js +1 -0
- package/dist/esm/table/components/row/template.js.map +1 -1
- package/dist/esm/table-column/base/cell-view/index.d.ts +1 -0
- package/dist/esm/table-column/base/cell-view/index.js +11 -3
- package/dist/esm/table-column/base/cell-view/index.js.map +1 -1
- package/dist/esm/table-column/base/cell-view/template.js +1 -0
- package/dist/esm/table-column/base/cell-view/template.js.map +1 -1
- package/dist/esm/table-column/base/types.d.ts +1 -0
- package/dist/esm/table-column/base/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -4808,6 +4808,10 @@ const Tb=fe`
|
|
|
4808
4808
|
opacity: 0.6;
|
|
4809
4809
|
}
|
|
4810
4810
|
|
|
4811
|
+
:host([appearance='accent']) div.container {
|
|
4812
|
+
opacity: 1;
|
|
4813
|
+
}
|
|
4814
|
+
|
|
4811
4815
|
div.bit1,
|
|
4812
4816
|
div.bit2 {
|
|
4813
4817
|
background: var(--ni-private-spinner-bits-background-color);
|
|
@@ -4919,15 +4923,25 @@ const Tb=fe`
|
|
|
4919
4923
|
}
|
|
4920
4924
|
`.withBehaviors(wd(gs,fe`
|
|
4921
4925
|
:host {
|
|
4922
|
-
--ni-private-spinner-bits-background-color: ${Xn}
|
|
4926
|
+
--ni-private-spinner-bits-background-color: ${Xn};
|
|
4927
|
+
}
|
|
4928
|
+
:host([appearance='accent']) {
|
|
4929
|
+
--ni-private-spinner-bits-background-color: ${Qn};
|
|
4930
|
+
}
|
|
4923
4931
|
`),wd(vs,fe`
|
|
4924
4932
|
:host {
|
|
4925
4933
|
--ni-private-spinner-bits-background-color: ${qn};
|
|
4926
4934
|
}
|
|
4935
|
+
:host([appearance='accent']) {
|
|
4936
|
+
--ni-private-spinner-bits-background-color: ${os};
|
|
4937
|
+
}
|
|
4927
4938
|
`),wd(ms,fe`
|
|
4928
4939
|
:host {
|
|
4929
4940
|
--ni-private-spinner-bits-background-color: ${Un};
|
|
4930
4941
|
}
|
|
4942
|
+
:host([appearance='accent']) {
|
|
4943
|
+
--ni-private-spinner-bits-background-color: ${os};
|
|
4944
|
+
}
|
|
4931
4945
|
`)),Db=G`
|
|
4932
4946
|
<template role="progressbar">
|
|
4933
4947
|
<div class="container">
|
|
@@ -4935,10 +4949,11 @@ const Tb=fe`
|
|
|
4935
4949
|
<div class="bit2"></div>
|
|
4936
4950
|
</div>
|
|
4937
4951
|
</template>
|
|
4938
|
-
|
|
4939
|
-
class
|
|
4940
|
-
|
|
4941
|
-
|
|
4952
|
+
`,Lb={default:void 0,accent:"accent"}
|
|
4953
|
+
class zb extends Rt{constructor(){super(...arguments),this.appearance=Lb.default}}e([ne],zb.prototype,"appearance",void 0)
|
|
4954
|
+
const Bb=zb.compose({baseName:"spinner",template:Db,styles:Tb})
|
|
4955
|
+
ai.getOrCreate().withPrefix("nimble").register(Bb()),ai.tagFor(zb)
|
|
4956
|
+
const Nb=fe`
|
|
4942
4957
|
${xn("inline-flex")}
|
|
4943
4958
|
|
|
4944
4959
|
:host {
|
|
@@ -5098,7 +5113,7 @@ const Bb=fe`
|
|
|
5098
5113
|
--ni-private-switch-indicator-border-color: ${Un};
|
|
5099
5114
|
--ni-private-switch-indicator-border-disabled-color: ${cs(Un,.3)};
|
|
5100
5115
|
}
|
|
5101
|
-
`)),
|
|
5116
|
+
`)),Zb=G`
|
|
5102
5117
|
<template
|
|
5103
5118
|
role="switch"
|
|
5104
5119
|
aria-checked="${e=>e.checked}"
|
|
@@ -5133,15 +5148,15 @@ const Bb=fe`
|
|
|
5133
5148
|
</div>
|
|
5134
5149
|
</template>
|
|
5135
5150
|
`
|
|
5136
|
-
class
|
|
5137
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
5138
|
-
class
|
|
5151
|
+
class qb extends Zi{}const jb=qb.compose({baseClass:Zi,baseName:"switch",template:Zb,styles:Nb})
|
|
5152
|
+
ai.getOrCreate().withPrefix("nimble").register(jb()),ai.tagFor(qb)
|
|
5153
|
+
class Ub extends ji{}const Gb=Ub.compose({baseName:"tab",baseClass:ji,template:(e,t)=>G`
|
|
5139
5154
|
<template slot="tab" role="tab" aria-disabled="${e=>e.disabled}">
|
|
5140
5155
|
<slot></slot>
|
|
5141
5156
|
</template>
|
|
5142
5157
|
`,styles:od})
|
|
5143
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
5144
|
-
const
|
|
5158
|
+
ai.getOrCreate().withPrefix("nimble").register(Gb()),ai.tagFor(Ub)
|
|
5159
|
+
const Wb=fe`
|
|
5145
5160
|
${xn("block")}
|
|
5146
5161
|
|
|
5147
5162
|
:host {
|
|
@@ -5151,11 +5166,11 @@ const Gb=fe`
|
|
|
5151
5166
|
padding-top: ${la};
|
|
5152
5167
|
}
|
|
5153
5168
|
`
|
|
5154
|
-
class
|
|
5169
|
+
class Kb extends qi{}const Xb=Kb.compose({baseName:"tab-panel",baseClass:qi,template:(e,t)=>G`
|
|
5155
5170
|
<template slot="tabpanel" role="tabpanel">
|
|
5156
5171
|
<slot></slot>
|
|
5157
5172
|
</template>
|
|
5158
|
-
`,styles:
|
|
5173
|
+
`,styles:Wb})
|
|
5159
5174
|
|
|
5160
5175
|
;/**
|
|
5161
5176
|
* table-core
|
|
@@ -5167,10 +5182,10 @@ class Wb extends qi{}const Kb=Wb.compose({baseName:"tab-panel",baseClass:qi,temp
|
|
|
5167
5182
|
*
|
|
5168
5183
|
* @license MIT
|
|
5169
5184
|
*/
|
|
5170
|
-
function
|
|
5185
|
+
function Yb(e,t){return"function"==typeof e?e(t):e}function Qb(e,t){return o=>{t.setState((t=>({...t,[e]:Yb(o,t[e])})))}}function Jb(e){return e instanceof Function}function ew(e,t){const o=[],i=e=>{e.forEach((e=>{o.push(e)
|
|
5171
5186
|
const n=t(e)
|
|
5172
5187
|
null!=n&&n.length&&i(n)}))}
|
|
5173
|
-
return i(e),o}function
|
|
5188
|
+
return i(e),o}function tw(e,t,o){let i,n=[]
|
|
5174
5189
|
return()=>{let s
|
|
5175
5190
|
o.key&&o.debug&&(s=Date.now())
|
|
5176
5191
|
const r=e()
|
|
@@ -5178,36 +5193,36 @@ if(!(r.length!==n.length||r.some(((e,t)=>n[t]!==e))))return i
|
|
|
5178
5193
|
let a
|
|
5179
5194
|
if(n=r,o.key&&o.debug&&(a=Date.now()),i=t(...r),null==o||null==o.onChange||o.onChange(i),o.key&&o.debug&&null!=o&&o.debug()){const e=Math.round(100*(Date.now()-s))/100,t=Math.round(100*(Date.now()-a))/100,i=t/16,n=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e
|
|
5180
5195
|
return e}
|
|
5181
|
-
console.info(`%c⏱ ${n(t,5)} /${n(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*i,120))}deg 100% 31%);`,null==o?void 0:o.key)}return i}}function
|
|
5196
|
+
console.info(`%c⏱ ${n(t,5)} /${n(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*i,120))}deg 100% 31%);`,null==o?void 0:o.key)}return i}}function ow(e,t,o){var i
|
|
5182
5197
|
let n={id:null!=(i=o.id)?i:t.id,column:t,index:o.index,isPlaceholder:!!o.isPlaceholder,placeholderId:o.placeholderId,depth:o.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=o=>{o.subHeaders&&o.subHeaders.length&&o.subHeaders.map(t),e.push(o)}
|
|
5183
5198
|
return t(n),e},getContext:()=>({table:e,header:n,column:t})}
|
|
5184
|
-
return e._features.forEach((t=>{Object.assign(n,null==t.createHeader?void 0:t.createHeader(n,e))})),n}ai.getOrCreate().withPrefix("nimble").register(
|
|
5185
|
-
const
|
|
5199
|
+
return e._features.forEach((t=>{Object.assign(n,null==t.createHeader?void 0:t.createHeader(n,e))})),n}ai.getOrCreate().withPrefix("nimble").register(Xb()),ai.tagFor(Kb)
|
|
5200
|
+
const iw={createTable:e=>({getHeaderGroups:tw((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,o,i,n)=>{var s,r
|
|
5186
5201
|
const a=null!=(s=null==i?void 0:i.map((e=>o.find((t=>t.id===e)))).filter(Boolean))?s:[],l=null!=(r=null==n?void 0:n.map((e=>o.find((t=>t.id===e)))).filter(Boolean))?r:[]
|
|
5187
|
-
return
|
|
5188
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterHeaderGroups:
|
|
5189
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftHeaderGroups:
|
|
5190
|
-
return
|
|
5191
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightHeaderGroups:
|
|
5192
|
-
return
|
|
5193
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFooterGroups:
|
|
5194
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFooterGroups:
|
|
5195
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFooterGroups:
|
|
5196
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFooterGroups:
|
|
5197
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFlatHeaders:
|
|
5198
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFlatHeaders:
|
|
5199
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFlatHeaders:
|
|
5200
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFlatHeaders:
|
|
5201
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterLeafHeaders:
|
|
5202
|
+
return nw(t,[...a,...o.filter((e=>!(null!=i&&i.includes(e.id)||null!=n&&n.includes(e.id)))),...l],e)}),{key:!1,debug:()=>{var t
|
|
5203
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterHeaderGroups:tw((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,o,i,n)=>nw(t,o=o.filter((e=>!(null!=i&&i.includes(e.id)||null!=n&&n.includes(e.id)))),e,"center")),{key:!1,debug:()=>{var t
|
|
5204
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftHeaderGroups:tw((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,o,i)=>{var n
|
|
5205
|
+
return nw(t,null!=(n=null==i?void 0:i.map((e=>o.find((t=>t.id===e)))).filter(Boolean))?n:[],e,"left")}),{key:!1,debug:()=>{var t
|
|
5206
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightHeaderGroups:tw((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,o,i)=>{var n
|
|
5207
|
+
return nw(t,null!=(n=null==i?void 0:i.map((e=>o.find((t=>t.id===e)))).filter(Boolean))?n:[],e,"right")}),{key:!1,debug:()=>{var t
|
|
5208
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFooterGroups:tw((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t
|
|
5209
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFooterGroups:tw((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t
|
|
5210
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFooterGroups:tw((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t
|
|
5211
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFooterGroups:tw((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t
|
|
5212
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFlatHeaders:tw((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t
|
|
5213
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFlatHeaders:tw((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t
|
|
5214
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFlatHeaders:tw((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t
|
|
5215
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFlatHeaders:tw((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t
|
|
5216
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterLeafHeaders:tw((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t
|
|
5202
5217
|
return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t
|
|
5203
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftLeafHeaders:
|
|
5218
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftLeafHeaders:tw((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t
|
|
5204
5219
|
return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t
|
|
5205
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightLeafHeaders:
|
|
5220
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightLeafHeaders:tw((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t
|
|
5206
5221
|
return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t
|
|
5207
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeafHeaders:
|
|
5222
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeafHeaders:tw((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,o)=>{var i,n,s,r,a,l
|
|
5208
5223
|
return[...null!=(i=null==(n=e[0])?void 0:n.headers)?i:[],...null!=(s=null==(r=t[0])?void 0:r.headers)?s:[],...null!=(a=null==(l=o[0])?void 0:l.headers)?a:[]].map((e=>e.getLeafHeaders())).flat()}),{key:!1,debug:()=>{var t
|
|
5209
5224
|
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}})})}
|
|
5210
|
-
function
|
|
5225
|
+
function nw(e,t,o,i){var n,s
|
|
5211
5226
|
let r=0
|
|
5212
5227
|
const a=function(e,t){void 0===t&&(t=1),r=Math.max(r,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var o
|
|
5213
5228
|
null!=(o=e.columns)&&o.length&&a(e.columns,t+1)}),0)}
|
|
@@ -5217,16 +5232,16 @@ const c=(e,t)=>{const n={depth:t,id:[i,`${t}`].filter(Boolean).join("_"),headers
|
|
|
5217
5232
|
e.forEach((e=>{const r=[...s].reverse()[0]
|
|
5218
5233
|
let a,l=!1
|
|
5219
5234
|
if(e.column.depth===n.depth&&e.column.parent?a=e.column.parent:(a=e.column,l=!0),r&&(null==r?void 0:r.column)===a)r.subHeaders.push(e)
|
|
5220
|
-
else{const n=
|
|
5221
|
-
n.subHeaders.push(e),s.push(n)}n.headers.push(e),e.headerGroup=n})),l.push(n),t>0&&c(s,t-1)},d=t.map(((e,t)=>
|
|
5235
|
+
else{const n=ow(o,a,{id:[i,t,a.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:l,placeholderId:l?`${s.filter((e=>e.column===a)).length}`:void 0,depth:t,index:s.length})
|
|
5236
|
+
n.subHeaders.push(e),s.push(n)}n.headers.push(e),e.headerGroup=n})),l.push(n),t>0&&c(s,t-1)},d=t.map(((e,t)=>ow(o,e,{depth:r,index:t})))
|
|
5222
5237
|
c(d,r-1),l.reverse()
|
|
5223
5238
|
const h=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,o=0,i=[0]
|
|
5224
5239
|
e.subHeaders&&e.subHeaders.length?(i=[],h(e.subHeaders).forEach((e=>{let{colSpan:o,rowSpan:n}=e
|
|
5225
5240
|
t+=o,i.push(n)}))):t=1
|
|
5226
5241
|
return o+=Math.min(...i),e.colSpan=t,e.rowSpan=o,{colSpan:t,rowSpan:o}}))
|
|
5227
|
-
return h(null!=(n=null==(s=l[0])?void 0:s.headers)?n:[]),l}const
|
|
5242
|
+
return h(null!=(n=null==(s=l[0])?void 0:s.headers)?n:[]),l}const sw={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},rw={getDefaultColumnDef:()=>sw,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:Qb("columnSizing",e),onColumnSizingInfoChange:Qb("columnSizingInfo",e)}),createColumn:(e,t)=>({getSize:()=>{var o,i,n
|
|
5228
5243
|
const s=t.getState().columnSizing[e.id]
|
|
5229
|
-
return Math.min(Math.max(null!=(o=e.columnDef.minSize)?o:
|
|
5244
|
+
return Math.min(Math.max(null!=(o=e.columnDef.minSize)?o:sw.minSize,null!=(i=null!=s?s:e.columnDef.size)?i:sw.size),null!=(n=e.columnDef.maxSize)?n:sw.maxSize)},getStart:o=>{const i=o?"left"===o?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns(),n=i.findIndex((t=>t.id===e.id))
|
|
5230
5245
|
if(n>0){const e=i[n-1]
|
|
5231
5246
|
return e.getStart(o)+e.getSize()}return 0},resetSize:()=>{t.setColumnSizing((t=>{let{[e.id]:o,...i}=t
|
|
5232
5247
|
return i}))},getCanResize:()=>{var o,i
|
|
@@ -5236,24 +5251,24 @@ e.subHeaders.length?e.subHeaders.forEach(o):t+=null!=(i=e.column.getSize())?i:0}
|
|
|
5236
5251
|
return o(e),t},getStart:()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1]
|
|
5237
5252
|
return t.getStart()+t.getSize()}return 0},getResizeHandler:()=>{const o=t.getColumn(e.column.id),i=null==o?void 0:o.getCanResize()
|
|
5238
5253
|
return n=>{if(!o||!i)return
|
|
5239
|
-
if(null==n.persist||n.persist(),
|
|
5240
|
-
const s=e.getSize(),r=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[o.id,o.getSize()]],a=
|
|
5254
|
+
if(null==n.persist||n.persist(),lw(n)&&n.touches&&n.touches.length>1)return
|
|
5255
|
+
const s=e.getSize(),r=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[o.id,o.getSize()]],a=lw(n)?Math.round(n.touches[0].clientX):n.clientX,l={},c=(e,o)=>{"number"==typeof o&&(t.setColumnSizingInfo((e=>{var t,i
|
|
5241
5256
|
const n=o-(null!=(t=null==e?void 0:e.startOffset)?t:0),s=Math.max(n/(null!=(i=null==e?void 0:e.startSize)?i:0),-.999999)
|
|
5242
5257
|
return e.columnSizingStart.forEach((e=>{let[t,o]=e
|
|
5243
5258
|
l[t]=Math.round(100*Math.max(o+o*s,0))/100})),{...e,deltaOffset:n,deltaPercentage:s}})),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing((e=>({...e,...l}))))},d=e=>c("move",e),h=e=>{c("end",e),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},u={moveHandler:e=>d(e.clientX),upHandler:e=>{document.removeEventListener("mousemove",u.moveHandler),document.removeEventListener("mouseup",u.upHandler),h(e.clientX)}},p={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(e.touches[0].clientX),!1),upHandler:e=>{var t
|
|
5244
|
-
document.removeEventListener("touchmove",p.moveHandler),document.removeEventListener("touchend",p.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),h(null==(t=e.touches[0])?void 0:t.clientX)}},g=!!function(){if("boolean"==typeof
|
|
5259
|
+
document.removeEventListener("touchmove",p.moveHandler),document.removeEventListener("touchend",p.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),h(null==(t=e.touches[0])?void 0:t.clientX)}},g=!!function(){if("boolean"==typeof aw)return aw
|
|
5245
5260
|
let e=!1
|
|
5246
5261
|
try{const t={get passive(){return e=!0,!1}},o=()=>{}
|
|
5247
|
-
window.addEventListener("test",o,t),window.removeEventListener("test",o)}catch(t){e=!1}return
|
|
5248
|
-
|
|
5262
|
+
window.addEventListener("test",o,t),window.removeEventListener("test",o)}catch(t){e=!1}return aw=e,aw}()&&{passive:!1}
|
|
5263
|
+
lw(n)?(document.addEventListener("touchmove",p.moveHandler,g),document.addEventListener("touchend",p.upHandler,g)):(document.addEventListener("mousemove",u.moveHandler,g),document.addEventListener("mouseup",u.upHandler,g)),t.setColumnSizingInfo((e=>({...e,startOffset:a,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:r,isResizingColumn:o.id})))}}}),createTable:e=>({setColumnSizing:t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),setColumnSizingInfo:t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),resetColumnSizing:t=>{var o
|
|
5249
5264
|
e.setColumnSizing(t?{}:null!=(o=e.initialState.columnSizing)?o:{})},resetHeaderSizeInfo:t=>{var o
|
|
5250
5265
|
e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(o=e.initialState.columnSizingInfo)?o:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},getTotalSize:()=>{var t,o
|
|
5251
5266
|
return null!=(t=null==(o=e.getHeaderGroups()[0])?void 0:o.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},getLeftTotalSize:()=>{var t,o
|
|
5252
5267
|
return null!=(t=null==(o=e.getLeftHeaderGroups()[0])?void 0:o.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},getCenterTotalSize:()=>{var t,o
|
|
5253
5268
|
return null!=(t=null==(o=e.getCenterHeaderGroups()[0])?void 0:o.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},getRightTotalSize:()=>{var t,o
|
|
5254
5269
|
return null!=(t=null==(o=e.getRightHeaderGroups()[0])?void 0:o.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}})}
|
|
5255
|
-
let
|
|
5256
|
-
function
|
|
5270
|
+
let aw=null
|
|
5271
|
+
function lw(e){return"touchstart"===e.type}const cw={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Qb("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,o=!1
|
|
5257
5272
|
return{_autoResetExpanded:()=>{var i,n
|
|
5258
5273
|
if(t){if(null!=(i=null!=(n=e.options.autoResetAll)?n:e.options.autoResetExpanded)?i:!e.options.manualExpanding){if(o)return
|
|
5259
5274
|
o=!0,e._queue((()=>{e.resetExpanded(),o=!1}))}}else e._queue((()=>{t=!0}))},setExpanded:t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),toggleAllRowsExpanded:t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},resetExpanded:t=>{var o,i
|
|
@@ -5270,57 +5285,57 @@ return o}return i}))},getIsExpanded:()=>{var o
|
|
|
5270
5285
|
const i=t.getState().expanded
|
|
5271
5286
|
return!!(null!=(o=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?o:!0===i||(null==i?void 0:i[e.id]))},getCanExpand:()=>{var o,i,n
|
|
5272
5287
|
return null!=(o=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?o:(null==(i=t.options.enableExpanding)||i)&&!(null==(n=e.subRows)||!n.length)},getToggleExpandedHandler:()=>{const t=e.getCanExpand()
|
|
5273
|
-
return()=>{t&&e.toggleExpanded()}}})},
|
|
5288
|
+
return()=>{t&&e.toggleExpanded()}}})},dw=(e,t,o)=>{var i
|
|
5274
5289
|
const n=o.toLowerCase()
|
|
5275
5290
|
return Boolean(null==(i=e.getValue(t))?void 0:i.toLowerCase().includes(n))}
|
|
5276
|
-
|
|
5277
|
-
const dw=(e,t,o)=>{var i
|
|
5278
|
-
return Boolean(null==(i=e.getValue(t))?void 0:i.includes(o))}
|
|
5279
|
-
dw.autoRemove=e=>ww(e)
|
|
5291
|
+
dw.autoRemove=e=>xw(e)
|
|
5280
5292
|
const hw=(e,t,o)=>{var i
|
|
5281
|
-
return(null==(i=e.getValue(t))?void 0:i.
|
|
5282
|
-
hw.autoRemove=e=>
|
|
5293
|
+
return Boolean(null==(i=e.getValue(t))?void 0:i.includes(o))}
|
|
5294
|
+
hw.autoRemove=e=>xw(e)
|
|
5283
5295
|
const uw=(e,t,o)=>{var i
|
|
5296
|
+
return(null==(i=e.getValue(t))?void 0:i.toLowerCase())===o.toLowerCase()}
|
|
5297
|
+
uw.autoRemove=e=>xw(e)
|
|
5298
|
+
const pw=(e,t,o)=>{var i
|
|
5284
5299
|
return null==(i=e.getValue(t))?void 0:i.includes(o)}
|
|
5285
|
-
|
|
5286
|
-
const
|
|
5300
|
+
pw.autoRemove=e=>xw(e)||!(null!=e&&e.length)
|
|
5301
|
+
const gw=(e,t,o)=>!o.some((o=>{var i
|
|
5287
5302
|
return!(null!=(i=e.getValue(t))&&i.includes(o))}))
|
|
5288
|
-
|
|
5289
|
-
const
|
|
5303
|
+
gw.autoRemove=e=>xw(e)||!(null!=e&&e.length)
|
|
5304
|
+
const vw=(e,t,o)=>o.some((o=>{var i
|
|
5290
5305
|
return null==(i=e.getValue(t))?void 0:i.includes(o)}))
|
|
5291
|
-
|
|
5292
|
-
const
|
|
5293
|
-
|
|
5294
|
-
const
|
|
5295
|
-
|
|
5296
|
-
const
|
|
5306
|
+
vw.autoRemove=e=>xw(e)||!(null!=e&&e.length)
|
|
5307
|
+
const mw=(e,t,o)=>e.getValue(t)===o
|
|
5308
|
+
mw.autoRemove=e=>xw(e)
|
|
5309
|
+
const fw=(e,t,o)=>e.getValue(t)==o
|
|
5310
|
+
fw.autoRemove=e=>xw(e)
|
|
5311
|
+
const bw=(e,t,o)=>{let[i,n]=o
|
|
5297
5312
|
const s=e.getValue(t)
|
|
5298
5313
|
return s>=i&&s<=n}
|
|
5299
|
-
|
|
5314
|
+
bw.resolveFilterValue=e=>{let[t,o]=e,i="number"!=typeof t?parseFloat(t):t,n="number"!=typeof o?parseFloat(o):o,s=null===t||Number.isNaN(i)?-1/0:i,r=null===o||Number.isNaN(n)?1/0:n
|
|
5300
5315
|
if(s>r){const e=s
|
|
5301
|
-
s=r,r=e}return[s,r]},
|
|
5302
|
-
const
|
|
5303
|
-
function
|
|
5316
|
+
s=r,r=e}return[s,r]},bw.autoRemove=e=>xw(e)||xw(e[0])&&xw(e[1])
|
|
5317
|
+
const ww={includesString:dw,includesStringSensitive:hw,equalsString:uw,arrIncludes:pw,arrIncludesAll:gw,arrIncludesSome:vw,equals:mw,weakEquals:fw,inNumberRange:bw}
|
|
5318
|
+
function xw(e){return null==e||""===e}const yw={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:Qb("columnFilters",e),onGlobalFilterChange:Qb("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var o,i
|
|
5304
5319
|
const n=null==(o=e.getCoreRowModel().flatRows[0])||null==(i=o._getAllCellsByColumnId()[t.id])?void 0:i.getValue()
|
|
5305
5320
|
return"string"==typeof n||"number"==typeof n}}),createColumn:(e,t)=>({getAutoFilterFn:()=>{const o=t.getCoreRowModel().flatRows[0],i=null==o?void 0:o.getValue(e.id)
|
|
5306
|
-
return"string"==typeof i?
|
|
5307
|
-
return
|
|
5321
|
+
return"string"==typeof i?ww.includesString:"number"==typeof i?ww.inNumberRange:"boolean"==typeof i||null!==i&&"object"==typeof i?ww.equals:Array.isArray(i)?ww.arrIncludes:ww.weakEquals},getFilterFn:()=>{var o,i
|
|
5322
|
+
return Jb(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(o=null==(i=t.options.filterFns)?void 0:i[e.columnDef.filterFn])?o:ww[e.columnDef.filterFn]},getCanFilter:()=>{var o,i,n
|
|
5308
5323
|
return(null==(o=e.columnDef.enableColumnFilter)||o)&&(null==(i=t.options.enableColumnFilters)||i)&&(null==(n=t.options.enableFilters)||n)&&!!e.accessorFn},getCanGlobalFilter:()=>{var o,i,n,s
|
|
5309
5324
|
return(null==(o=e.columnDef.enableGlobalFilter)||o)&&(null==(i=t.options.enableGlobalFilter)||i)&&(null==(n=t.options.enableFilters)||n)&&(null==(s=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||s)&&!!e.accessorFn},getIsFiltered:()=>e.getFilterIndex()>-1,getFilterValue:()=>{var o,i
|
|
5310
5325
|
return null==(o=t.getState().columnFilters)||null==(i=o.find((t=>t.id===e.id)))?void 0:i.value},getFilterIndex:()=>{var o,i
|
|
5311
|
-
return null!=(o=null==(i=t.getState().columnFilters)?void 0:i.findIndex((t=>t.id===e.id)))?o:-1},setFilterValue:o=>{t.setColumnFilters((t=>{const i=e.getFilterFn(),n=null==t?void 0:t.find((t=>t.id===e.id)),s=
|
|
5326
|
+
return null!=(o=null==(i=t.getState().columnFilters)?void 0:i.findIndex((t=>t.id===e.id)))?o:-1},setFilterValue:o=>{t.setColumnFilters((t=>{const i=e.getFilterFn(),n=null==t?void 0:t.find((t=>t.id===e.id)),s=Yb(o,n?n.value:void 0)
|
|
5312
5327
|
var r
|
|
5313
|
-
if(
|
|
5328
|
+
if($w(i,s,e))return null!=(r=null==t?void 0:t.filter((t=>t.id!==e.id)))?r:[]
|
|
5314
5329
|
const a={id:e.id,value:s}
|
|
5315
5330
|
var l
|
|
5316
|
-
return n?null!=(l=null==t?void 0:t.map((t=>t.id===e.id?a:t)))?l:[]:null!=t&&t.length?[...t,a]:[a]}))},_getFacetedRowModel:t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),getFacetedRowModel:()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),_getFacetedUniqueValues:t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),getFacetedUniqueValues:()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,_getFacetedMinMaxValues:t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),getFacetedMinMaxValues:()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}),createRow:(e,t)=>({columnFilters:{},columnFiltersMeta:{}}),createTable:e=>({getGlobalAutoFilterFn:()=>
|
|
5331
|
+
return n?null!=(l=null==t?void 0:t.map((t=>t.id===e.id?a:t)))?l:[]:null!=t&&t.length?[...t,a]:[a]}))},_getFacetedRowModel:t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),getFacetedRowModel:()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),_getFacetedUniqueValues:t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),getFacetedUniqueValues:()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,_getFacetedMinMaxValues:t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),getFacetedMinMaxValues:()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}),createRow:(e,t)=>({columnFilters:{},columnFiltersMeta:{}}),createTable:e=>({getGlobalAutoFilterFn:()=>ww.includesString,getGlobalFilterFn:()=>{var t,o
|
|
5317
5332
|
const{globalFilterFn:i}=e.options
|
|
5318
|
-
return
|
|
5333
|
+
return Jb(i)?i:"auto"===i?e.getGlobalAutoFilterFn():null!=(t=null==(o=e.options.filterFns)?void 0:o[i])?t:ww[i]},setColumnFilters:t=>{const o=e.getAllLeafColumns()
|
|
5319
5334
|
null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var i
|
|
5320
|
-
return null==(i=
|
|
5321
|
-
if(t){if(
|
|
5335
|
+
return null==(i=Yb(t,e))?void 0:i.filter((e=>{const t=o.find((t=>t.id===e.id))
|
|
5336
|
+
if(t){if($w(t.getFilterFn(),e.value,t))return!1}return!0}))}))},setGlobalFilter:t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},resetGlobalFilter:t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},resetColumnFilters:t=>{var o,i
|
|
5322
5337
|
e.setColumnFilters(t?[]:null!=(o=null==(i=e.initialState)?void 0:i.columnFilters)?o:[])},getPreFilteredRowModel:()=>e.getCoreRowModel(),getFilteredRowModel:()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel()),_getGlobalFacetedRowModel:e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),getGlobalFacetedRowModel:()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),_getGlobalFacetedUniqueValues:e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),getGlobalFacetedUniqueValues:()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,_getGlobalFacetedMinMaxValues:e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),getGlobalFacetedMinMaxValues:()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}})}
|
|
5323
|
-
function
|
|
5338
|
+
function $w(e,t,o){return!(!e||!e.autoRemove)&&e.autoRemove(t,o)||void 0===t||"string"==typeof t&&!t}const Cw={sum:(e,t,o)=>o.reduce(((t,o)=>{const i=o.getValue(e)
|
|
5324
5339
|
return t+("number"==typeof i?i:0)}),0),min:(e,t,o)=>{let i
|
|
5325
5340
|
return o.forEach((t=>{const o=t.getValue(e)
|
|
5326
5341
|
null!=o&&(i>o||void 0===i&&o>=o)&&(i=o)})),i},max:(e,t,o)=>{let i
|
|
@@ -5333,13 +5348,13 @@ null!=n&&(n=+n)>=n&&(++o,i+=n)})),o)return i/o},median:(e,t)=>{if(!t.length)retu
|
|
|
5333
5348
|
let o=0,i=0
|
|
5334
5349
|
return t.forEach((t=>{let n=t.getValue(e)
|
|
5335
5350
|
"number"==typeof n&&(o=Math.min(o,n),i=Math.max(i,n))})),(o+i)/2},unique:(e,t)=>Array.from(new Set(t.map((t=>t.getValue(e)))).values()),uniqueCount:(e,t)=>new Set(t.map((t=>t.getValue(e)))).size,count:(e,t)=>t.length}
|
|
5336
|
-
const
|
|
5351
|
+
const kw={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Qb("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>({setRowSelection:t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),resetRowSelection:t=>{var o
|
|
5337
5352
|
return e.setRowSelection(t?{}:null!=(o=e.initialState.rowSelection)?o:{})},toggleAllRowsSelected:t=>{e.setRowSelection((o=>{t=void 0!==t?t:!e.getIsAllRowsSelected()
|
|
5338
5353
|
const i={...o},n=e.getPreGroupedRowModel().flatRows
|
|
5339
5354
|
return t?n.forEach((e=>{e.getCanSelect()&&(i[e.id]=!0)})):n.forEach((e=>{delete i[e.id]})),i}))},toggleAllPageRowsSelected:t=>e.setRowSelection((o=>{const i=void 0!==t?t:!e.getIsAllPageRowsSelected(),n={...o}
|
|
5340
|
-
return e.getRowModel().rows.forEach((t=>{
|
|
5341
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredSelectedRowModel:
|
|
5342
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getGroupedSelectedRowModel:
|
|
5355
|
+
return e.getRowModel().rows.forEach((t=>{Sw(n,t.id,i,e)})),n})),getPreSelectedRowModel:()=>e.getCoreRowModel(),getSelectedRowModel:tw((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,o)=>Object.keys(t).length?_w(e,o):{rows:[],flatRows:[],rowsById:{}}),{key:!1,debug:()=>{var t
|
|
5356
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredSelectedRowModel:tw((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,o)=>Object.keys(t).length?_w(e,o):{rows:[],flatRows:[],rowsById:{}}),{key:"getFilteredSelectedRowModel",debug:()=>{var t
|
|
5357
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getGroupedSelectedRowModel:tw((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,o)=>Object.keys(t).length?_w(e,o):{rows:[],flatRows:[],rowsById:{}}),{key:"getGroupedSelectedRowModel",debug:()=>{var t
|
|
5343
5358
|
return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getIsAllRowsSelected:()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:o}=e.getState()
|
|
5344
5359
|
let i=Boolean(t.length&&Object.keys(o).length)
|
|
5345
5360
|
return i&&t.some((e=>e.getCanSelect()&&!o[e.id]))&&(i=!1),i},getIsAllPageRowsSelected:()=>{const t=e.getPaginationRowModel().flatRows,{rowSelection:o}=e.getState()
|
|
@@ -5350,71 +5365,71 @@ return o>0&&o<e.getFilteredRowModel().flatRows.length},getIsSomePageRowsSelected
|
|
|
5350
5365
|
return!e.getIsAllPageRowsSelected()&&t.some((e=>e.getIsSelected()||e.getIsSomeSelected()))},getToggleAllRowsSelectedHandler:()=>t=>{e.toggleAllRowsSelected(t.target.checked)},getToggleAllPageRowsSelectedHandler:()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}}),createRow:(e,t)=>({toggleSelected:o=>{const i=e.getIsSelected()
|
|
5351
5366
|
t.setRowSelection((n=>{if(i===(o=void 0!==o?o:!i))return n
|
|
5352
5367
|
const s={...n}
|
|
5353
|
-
return
|
|
5354
|
-
return
|
|
5355
|
-
return"some"===
|
|
5356
|
-
return"all"===
|
|
5368
|
+
return Sw(s,e.id,o,t),s}))},getIsSelected:()=>{const{rowSelection:o}=t.getState()
|
|
5369
|
+
return Iw(e,o)},getIsSomeSelected:()=>{const{rowSelection:o}=t.getState()
|
|
5370
|
+
return"some"===Rw(e,o)},getIsAllSubRowsSelected:()=>{const{rowSelection:o}=t.getState()
|
|
5371
|
+
return"all"===Rw(e,o)},getCanSelect:()=>{var o
|
|
5357
5372
|
return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(o=t.options.enableRowSelection)||o},getCanSelectSubRows:()=>{var o
|
|
5358
5373
|
return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(o=t.options.enableSubRowSelection)||o},getCanMultiSelect:()=>{var o
|
|
5359
5374
|
return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(o=t.options.enableMultiRowSelection)||o},getToggleSelectedHandler:()=>{const t=e.getCanSelect()
|
|
5360
5375
|
return o=>{var i
|
|
5361
|
-
t&&e.toggleSelected(null==(i=o.target)?void 0:i.checked)}}})},
|
|
5376
|
+
t&&e.toggleSelected(null==(i=o.target)?void 0:i.checked)}}})},Sw=(e,t,o,i)=>{var n
|
|
5362
5377
|
const s=i.getRow(t)
|
|
5363
|
-
o?(s.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),s.getCanSelect()&&(e[t]=!0)):delete e[t],null!=(n=s.subRows)&&n.length&&s.getCanSelectSubRows()&&s.subRows.forEach((t=>
|
|
5364
|
-
function
|
|
5365
|
-
const r=
|
|
5378
|
+
o?(s.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),s.getCanSelect()&&(e[t]=!0)):delete e[t],null!=(n=s.subRows)&&n.length&&s.getCanSelectSubRows()&&s.subRows.forEach((t=>Sw(e,t.id,o,i)))}
|
|
5379
|
+
function _w(e,t){const o=e.getState().rowSelection,i=[],n={},s=function(e,t){return e.map((e=>{var t
|
|
5380
|
+
const r=Iw(e,o)
|
|
5366
5381
|
if(r&&(i.push(e),n[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:s(e.subRows)}),r)return e})).filter(Boolean)}
|
|
5367
|
-
return{rows:s(t.rows),flatRows:i,rowsById:n}}function
|
|
5368
|
-
return null!=(o=t[e.id])&&o}function
|
|
5369
|
-
return e.subRows.forEach((e=>{i&&!o||(
|
|
5370
|
-
function
|
|
5382
|
+
return{rows:s(t.rows),flatRows:i,rowsById:n}}function Iw(e,t){var o
|
|
5383
|
+
return null!=(o=t[e.id])&&o}function Rw(e,t,o){if(e.subRows&&e.subRows.length){let o=!0,i=!1
|
|
5384
|
+
return e.subRows.forEach((e=>{i&&!o||(Iw(e,t)?i=!0:o=!1)})),o?"all":!!i&&"some"}return!1}const Mw=/([0-9]+)/gm
|
|
5385
|
+
function Aw(e,t){return e===t?0:e>t?1:-1}function Ew(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function Ow(e,t){const o=e.split(Mw).filter(Boolean),i=t.split(Mw).filter(Boolean)
|
|
5371
5386
|
for(;o.length&&i.length;){const e=o.shift(),t=i.shift(),n=parseInt(e,10),s=parseInt(t,10),r=[n,s].sort()
|
|
5372
5387
|
if(isNaN(r[0])){if(e>t)return 1
|
|
5373
5388
|
if(t>e)return-1}else{if(isNaN(r[1]))return isNaN(n)?-1:1
|
|
5374
5389
|
if(n>s)return 1
|
|
5375
|
-
if(s>n)return-1}}return o.length-i.length}const
|
|
5376
|
-
return i>n?1:i<n?-1:0},basic:(e,t,o)=>
|
|
5390
|
+
if(s>n)return-1}}return o.length-i.length}const Fw={alphanumeric:(e,t,o)=>Ow(Ew(e.getValue(o)).toLowerCase(),Ew(t.getValue(o)).toLowerCase()),alphanumericCaseSensitive:(e,t,o)=>Ow(Ew(e.getValue(o)),Ew(t.getValue(o))),text:(e,t,o)=>Aw(Ew(e.getValue(o)).toLowerCase(),Ew(t.getValue(o)).toLowerCase()),textCaseSensitive:(e,t,o)=>Aw(Ew(e.getValue(o)),Ew(t.getValue(o))),datetime:(e,t,o)=>{const i=e.getValue(o),n=t.getValue(o)
|
|
5391
|
+
return i>n?1:i<n?-1:0},basic:(e,t,o)=>Aw(e.getValue(o),t.getValue(o))},Vw=[iw,{getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Qb("columnVisibility",e)}),createColumn:(e,t)=>({toggleVisibility:o=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:null!=o?o:!e.getIsVisible()})))},getIsVisible:()=>{var o,i
|
|
5377
5392
|
return null==(o=null==(i=t.getState().columnVisibility)?void 0:i[e.id])||o},getCanHide:()=>{var o,i
|
|
5378
|
-
return(null==(o=e.columnDef.enableHiding)||o)&&(null==(i=t.options.enableHiding)||i)},getToggleVisibilityHandler:()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}}),createRow:(e,t)=>({_getAllVisibleCells:
|
|
5379
|
-
return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getVisibleCells:
|
|
5380
|
-
return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createTable:e=>{const t=(t,o)=>
|
|
5393
|
+
return(null==(o=e.columnDef.enableHiding)||o)&&(null==(i=t.options.enableHiding)||i)},getToggleVisibilityHandler:()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}}),createRow:(e,t)=>({_getAllVisibleCells:tw((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),{key:"row._getAllVisibleCells",debug:()=>{var e
|
|
5394
|
+
return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getVisibleCells:tw((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,o)=>[...e,...t,...o]),{key:!1,debug:()=>{var e
|
|
5395
|
+
return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createTable:e=>{const t=(t,o)=>tw((()=>[o(),o().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),{key:t,debug:()=>{var t
|
|
5381
5396
|
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})
|
|
5382
5397
|
return{getVisibleFlatColumns:t("getVisibleFlatColumns",(()=>e.getAllFlatColumns())),getVisibleLeafColumns:t("getVisibleLeafColumns",(()=>e.getAllLeafColumns())),getLeftVisibleLeafColumns:t("getLeftVisibleLeafColumns",(()=>e.getLeftLeafColumns())),getRightVisibleLeafColumns:t("getRightVisibleLeafColumns",(()=>e.getRightLeafColumns())),getCenterVisibleLeafColumns:t("getCenterVisibleLeafColumns",(()=>e.getCenterLeafColumns())),setColumnVisibility:t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),resetColumnVisibility:t=>{var o
|
|
5383
5398
|
e.setColumnVisibility(t?{}:null!=(o=e.initialState.columnVisibility)?o:{})},toggleAllColumnsVisible:t=>{var o
|
|
5384
5399
|
t=null!=(o=t)?o:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,o)=>({...e,[o.id]:t||!(null!=o.getCanHide&&o.getCanHide())})),{}))},getIsAllColumnsVisible:()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),getIsSomeColumnsVisible:()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),getToggleAllColumnsVisibilityHandler:()=>t=>{var o
|
|
5385
|
-
e.toggleAllColumnsVisible(null==(o=t.target)?void 0:o.checked)}}}},{getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:
|
|
5386
|
-
e.setColumnOrder(t?[]:null!=(o=e.initialState.columnOrder)?o:[])},_getOrderColumnsFn:
|
|
5400
|
+
e.toggleAllColumnsVisible(null==(o=t.target)?void 0:o.checked)}}}},{getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Qb("columnOrder",e)}),createTable:e=>({setColumnOrder:t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),resetColumnOrder:t=>{var o
|
|
5401
|
+
e.setColumnOrder(t?[]:null!=(o=e.initialState.columnOrder)?o:[])},_getOrderColumnsFn:tw((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,o)=>i=>{let n=[]
|
|
5387
5402
|
if(null!=e&&e.length){const t=[...e],o=[...i]
|
|
5388
5403
|
for(;o.length&&t.length;){const e=t.shift(),i=o.findIndex((t=>t.id===e))
|
|
5389
5404
|
i>-1&&n.push(o.splice(i,1)[0])}n=[...n,...o]}else n=i
|
|
5390
5405
|
return function(e,t,o){if(null==t||!t.length||!o)return e
|
|
5391
5406
|
const i=e.filter((e=>!t.includes(e.id)))
|
|
5392
|
-
return"remove"===o?i:[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...i]}(n,t,o)}),{key:!1})})},{getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:
|
|
5407
|
+
return"remove"===o?i:[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...i]}(n,t,o)}),{key:!1})})},{getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:Qb("columnPinning",e)}),createColumn:(e,t)=>({pin:o=>{const i=e.getLeafColumns().map((e=>e.id)).filter(Boolean)
|
|
5393
5408
|
t.setColumnPinning((e=>{var t,n,s,r,a,l
|
|
5394
5409
|
return"right"===o?{left:(null!=(s=null==e?void 0:e.left)?s:[]).filter((e=>!(null!=i&&i.includes(e)))),right:[...(null!=(r=null==e?void 0:e.right)?r:[]).filter((e=>!(null!=i&&i.includes(e)))),...i]}:"left"===o?{left:[...(null!=(a=null==e?void 0:e.left)?a:[]).filter((e=>!(null!=i&&i.includes(e)))),...i],right:(null!=(l=null==e?void 0:e.right)?l:[]).filter((e=>!(null!=i&&i.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=i&&i.includes(e)))),right:(null!=(n=null==e?void 0:e.right)?n:[]).filter((e=>!(null!=i&&i.includes(e))))}}))},getCanPin:()=>e.getLeafColumns().some((e=>{var o,i
|
|
5395
5410
|
return(null==(o=e.columnDef.enablePinning)||o)&&(null==(i=t.options.enablePinning)||i)})),getIsPinned:()=>{const o=e.getLeafColumns().map((e=>e.id)),{left:i,right:n}=t.getState().columnPinning,s=o.some((e=>null==i?void 0:i.includes(e))),r=o.some((e=>null==n?void 0:n.includes(e)))
|
|
5396
5411
|
return s?"left":!!r&&"right"},getPinnedIndex:()=>{var o,i,n
|
|
5397
5412
|
const s=e.getIsPinned()
|
|
5398
|
-
return s?null!=(o=null==(i=t.getState().columnPinning)||null==(n=i[s])?void 0:n.indexOf(e.id))?o:-1:0}}),createRow:(e,t)=>({getCenterVisibleCells:
|
|
5413
|
+
return s?null!=(o=null==(i=t.getState().columnPinning)||null==(n=i[s])?void 0:n.indexOf(e.id))?o:-1:0}}),createRow:(e,t)=>({getCenterVisibleCells:tw((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,o)=>{const i=[...null!=t?t:[],...null!=o?o:[]]
|
|
5399
5414
|
return e.filter((e=>!i.includes(e.column.id)))}),{key:"row.getCenterVisibleCells",debug:()=>{var e
|
|
5400
|
-
return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getLeftVisibleCells:
|
|
5401
|
-
return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getRightVisibleCells:
|
|
5415
|
+
return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getLeftVisibleCells:tw((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,,]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),{key:"row.getLeftVisibleCells",debug:()=>{var e
|
|
5416
|
+
return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getRightVisibleCells:tw((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"right"})))),{key:"row.getRightVisibleCells",debug:()=>{var e
|
|
5402
5417
|
return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createTable:e=>({setColumnPinning:t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),resetColumnPinning:t=>{var o,i
|
|
5403
5418
|
return e.setColumnPinning(t?{left:[],right:[]}:null!=(o=null==(i=e.initialState)?void 0:i.columnPinning)?o:{left:[],right:[]})},getIsSomeColumnsPinned:t=>{var o
|
|
5404
5419
|
const i=e.getState().columnPinning
|
|
5405
5420
|
var n,s
|
|
5406
|
-
return t?Boolean(null==(o=i[t])?void 0:o.length):Boolean((null==(n=i.left)?void 0:n.length)||(null==(s=i.right)?void 0:s.length))},getLeftLeafColumns:
|
|
5407
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getRightLeafColumns:
|
|
5408
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getCenterLeafColumns:
|
|
5421
|
+
return t?Boolean(null==(o=i[t])?void 0:o.length):Boolean((null==(n=i.left)?void 0:n.length)||(null==(s=i.right)?void 0:s.length))},getLeftLeafColumns:tw((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:!1,debug:()=>{var t
|
|
5422
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getRightLeafColumns:tw((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:!1,debug:()=>{var t
|
|
5423
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getCenterLeafColumns:tw((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,o)=>{const i=[...null!=t?t:[],...null!=o?o:[]]
|
|
5409
5424
|
return e.filter((e=>!i.includes(e.id)))}),{key:!1,debug:()=>{var t
|
|
5410
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})})},
|
|
5425
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})})},yw,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto"}),getDefaultOptions:e=>({onSortingChange:Qb("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>({getAutoSortingFn:()=>{const o=t.getFilteredRowModel().flatRows.slice(10)
|
|
5411
5426
|
let i=!1
|
|
5412
5427
|
for(const t of o){const o=null==t?void 0:t.getValue(e.id)
|
|
5413
|
-
if("[object Date]"===Object.prototype.toString.call(o))return
|
|
5414
|
-
if("string"==typeof o&&(i=!0,o.split(
|
|
5428
|
+
if("[object Date]"===Object.prototype.toString.call(o))return Fw.datetime
|
|
5429
|
+
if("string"==typeof o&&(i=!0,o.split(Mw).length>1))return Fw.alphanumeric}return i?Fw.text:Fw.basic},getAutoSortDir:()=>{const o=t.getFilteredRowModel().flatRows[0]
|
|
5415
5430
|
return"string"==typeof(null==o?void 0:o.getValue(e.id))?"asc":"desc"},getSortingFn:()=>{var o,i
|
|
5416
5431
|
if(!e)throw new Error
|
|
5417
|
-
return
|
|
5432
|
+
return Jb(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(o=null==(i=t.options.sortingFns)?void 0:i[e.columnDef.sortingFn])?o:Fw[e.columnDef.sortingFn]},toggleSorting:(o,i)=>{const n=e.getNextSortingOrder(),s=null!=o
|
|
5418
5433
|
t.setSorting((r=>{const a=null==r?void 0:r.find((t=>t.id===e.id)),l=null==r?void 0:r.findIndex((t=>t.id===e.id))
|
|
5419
5434
|
let c,d=[],h=s?o:"desc"===n
|
|
5420
5435
|
var u;(c=null!=r&&r.length&&e.getCanMultiSort()&&i?a?"toggle":"add":null!=r&&r.length&&l!==r.length-1?"replace":a?"toggle":"replace","toggle"===c&&(s||n||(c="remove")),"add"===c)?(d=[...r,{id:e.id,desc:h}],d.splice(0,d.length-(null!=(u=t.options.maxMultiSortColCount)?u:Number.MAX_SAFE_INTEGER))):d="toggle"===c?r.map((t=>t.id===e.id?{...t,desc:h}:t)):"remove"===c?r.filter((t=>t.id!==e.id)):[{id:e.id,desc:h}]
|
|
@@ -5429,86 +5444,86 @@ return!!i&&(i.desc?"desc":"asc")},getSortIndex:()=>{var o,i
|
|
|
5429
5444
|
return null!=(o=null==(i=t.getState().sorting)?void 0:i.findIndex((t=>t.id===e.id)))?o:-1},clearSorting:()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},getToggleSortingHandler:()=>{const o=e.getCanSort()
|
|
5430
5445
|
return i=>{o&&(null==i.persist||i.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(i))))}}}),createTable:e=>({setSorting:t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),resetSorting:t=>{var o,i
|
|
5431
5446
|
e.setSorting(t?[]:null!=(o=null==(i=e.initialState)?void 0:i.sorting)?o:[])},getPreSortedRowModel:()=>e.getGroupedRowModel(),getSortedRowModel:()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())})},{getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,o
|
|
5432
|
-
return null!=(t=null==(o=e.getValue())||null==o.toString?void 0:o.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:
|
|
5447
|
+
return null!=(t=null==(o=e.getValue())||null==o.toString?void 0:o.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Qb("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>({toggleGrouping:()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...null!=t?t:[],e.id]))},getCanGroup:()=>{var o,i,n,s
|
|
5433
5448
|
return null!=(o=null==(i=null!=(n=null==(s=e.columnDef.enableGrouping)||s)?n:t.options.enableGrouping)||i)?o:!!e.accessorFn},getIsGrouped:()=>{var o
|
|
5434
5449
|
return null==(o=t.getState().grouping)?void 0:o.includes(e.id)},getGroupedIndex:()=>{var o
|
|
5435
5450
|
return null==(o=t.getState().grouping)?void 0:o.indexOf(e.id)},getToggleGroupingHandler:()=>{const t=e.getCanGroup()
|
|
5436
5451
|
return()=>{t&&e.toggleGrouping()}},getAutoAggregationFn:()=>{const o=t.getCoreRowModel().flatRows[0],i=null==o?void 0:o.getValue(e.id)
|
|
5437
|
-
return"number"==typeof i
|
|
5452
|
+
return"number"==typeof i?Cw.sum:"[object Date]"===Object.prototype.toString.call(i)?Cw.extent:void 0},getAggregationFn:()=>{var o,i
|
|
5438
5453
|
if(!e)throw new Error
|
|
5439
|
-
return
|
|
5454
|
+
return Jb(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(o=null==(i=t.options.aggregationFns)?void 0:i[e.columnDef.aggregationFn])?o:Cw[e.columnDef.aggregationFn]}}),createTable:e=>({setGrouping:t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),resetGrouping:t=>{var o,i
|
|
5440
5455
|
e.setGrouping(t?[]:null!=(o=null==(i=e.initialState)?void 0:i.grouping)?o:[])},getPreGroupedRowModel:()=>e.getFilteredRowModel(),getGroupedRowModel:()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())}),createRow:e=>({getIsGrouped:()=>!!e.groupingColumnId,_groupingValuesCache:{}}),createCell:(e,t,o,i)=>({getIsGrouped:()=>t.getIsGrouped()&&t.id===o.groupingColumnId,getIsPlaceholder:()=>!e.getIsGrouped()&&t.getIsGrouped(),getIsAggregated:()=>{var t
|
|
5441
|
-
return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=o.subRows)||!t.length)}})},
|
|
5456
|
+
return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=o.subRows)||!t.length)}})},cw,{getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Qb("pagination",e)}),createTable:e=>{let t=!1,o=!1
|
|
5442
5457
|
return{_autoResetPageIndex:()=>{var i,n
|
|
5443
5458
|
if(t){if(null!=(i=null!=(n=e.options.autoResetAll)?n:e.options.autoResetPageIndex)?i:!e.options.manualPagination){if(o)return
|
|
5444
|
-
o=!0,e._queue((()=>{e.resetPageIndex(),o=!1}))}}else e._queue((()=>{t=!0}))},setPagination:t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>
|
|
5445
|
-
e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(o=e.initialState.pagination)?o:{pageIndex:0,pageSize:10})},setPageIndex:t=>{e.setPagination((o=>{let i=
|
|
5459
|
+
o=!0,e._queue((()=>{e.resetPageIndex(),o=!1}))}}else e._queue((()=>{t=!0}))},setPagination:t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>Yb(t,e))),resetPagination:t=>{var o
|
|
5460
|
+
e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(o=e.initialState.pagination)?o:{pageIndex:0,pageSize:10})},setPageIndex:t=>{e.setPagination((o=>{let i=Yb(t,o.pageIndex)
|
|
5446
5461
|
const n=void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1
|
|
5447
5462
|
return i=Math.max(0,Math.min(i,n)),{...o,pageIndex:i}}))},resetPageIndex:t=>{var o,i,n
|
|
5448
5463
|
e.setPageIndex(t?0:null!=(o=null==(i=e.initialState)||null==(n=i.pagination)?void 0:n.pageIndex)?o:0)},resetPageSize:t=>{var o,i,n
|
|
5449
|
-
e.setPageSize(t?10:null!=(o=null==(i=e.initialState)||null==(n=i.pagination)?void 0:n.pageSize)?o:10)},setPageSize:t=>{e.setPagination((e=>{const o=Math.max(1,
|
|
5464
|
+
e.setPageSize(t?10:null!=(o=null==(i=e.initialState)||null==(n=i.pagination)?void 0:n.pageSize)?o:10)},setPageSize:t=>{e.setPagination((e=>{const o=Math.max(1,Yb(t,e.pageSize)),i=e.pageSize*e.pageIndex,n=Math.floor(i/o)
|
|
5450
5465
|
return{...e,pageIndex:n,pageSize:o}}))},setPageCount:t=>e.setPagination((o=>{var i
|
|
5451
|
-
let n=
|
|
5452
|
-
return"number"==typeof n&&(n=Math.max(-1,n)),{...o,pageCount:n}})),getPageOptions:
|
|
5466
|
+
let n=Yb(t,null!=(i=e.options.pageCount)?i:-1)
|
|
5467
|
+
return"number"==typeof n&&(n=Math.max(-1,n)),{...o,pageCount:n}})),getPageOptions:tw((()=>[e.getPageCount()]),(e=>{let t=[]
|
|
5453
5468
|
return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),{key:!1,debug:()=>{var t
|
|
5454
5469
|
return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getCanPreviousPage:()=>e.getState().pagination.pageIndex>0,getCanNextPage:()=>{const{pageIndex:t}=e.getState().pagination,o=e.getPageCount()
|
|
5455
5470
|
return-1===o||0!==o&&t<o-1},previousPage:()=>e.setPageIndex((e=>e-1)),nextPage:()=>e.setPageIndex((e=>e+1)),getPrePaginationRowModel:()=>e.getExpandedRowModel(),getPaginationRowModel:()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),getPageCount:()=>{var t
|
|
5456
|
-
return null!=(t=e.options.pageCount)?t:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}}},
|
|
5457
|
-
function
|
|
5458
|
-
let o={_features:
|
|
5471
|
+
return null!=(t=e.options.pageCount)?t:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}}},kw,rw]
|
|
5472
|
+
function Hw(e){var t;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...")
|
|
5473
|
+
let o={_features:Vw}
|
|
5459
5474
|
const i=o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(o))),{})
|
|
5460
5475
|
let n={...null!=(t=e.initialState)?t:{}}
|
|
5461
5476
|
o._features.forEach((e=>{var t
|
|
5462
5477
|
n=null!=(t=null==e.getInitialState?void 0:e.getInitialState(n))?t:n}))
|
|
5463
5478
|
const s=[]
|
|
5464
5479
|
let r=!1
|
|
5465
|
-
const a={_features:
|
|
5466
|
-
r=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{o.setState(o.initialState)},setOptions:e=>{const t=
|
|
5480
|
+
const a={_features:Vw,options:{...i,...e},initialState:n,_queue:e=>{s.push(e),r||(r=!0,Promise.resolve().then((()=>{for(;s.length;)s.shift()()
|
|
5481
|
+
r=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{o.setState(o.initialState)},setOptions:e=>{const t=Yb(e,o.options)
|
|
5467
5482
|
o.options=(e=>o.options.mergeOptions?o.options.mergeOptions(i,e):{...i,...e})(t)},getState:()=>o.options.state,setState:e=>{null==o.options.onStateChange||o.options.onStateChange(e)},_getRowId:(e,t,i)=>{var n
|
|
5468
5483
|
return null!=(n=null==o.options.getRowId?void 0:o.options.getRowId(e,t,i))?n:`${i?[i.id,t].join("."):t}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:e=>{const t=o.getRowModel().rowsById[e]
|
|
5469
5484
|
if(!t)throw new Error
|
|
5470
|
-
return t},_getDefaultColumnDef:
|
|
5485
|
+
return t},_getDefaultColumnDef:tw((()=>[o.options.defaultColumn]),(e=>{var t
|
|
5471
5486
|
return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef
|
|
5472
5487
|
return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,o
|
|
5473
5488
|
return null!=(t=null==(o=e.renderValue())||null==o.toString?void 0:o.toString())?t:null},...o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),{debug:()=>{var e
|
|
5474
|
-
return null!=(e=o.options.debugAll)?e:o.options.debugColumns},key:!1}),_getColumnDefs:()=>o.options.columns,getAllColumns:
|
|
5489
|
+
return null!=(e=o.options.debugAll)?e:o.options.debugColumns},key:!1}),_getColumnDefs:()=>o.options.columns,getAllColumns:tw((()=>[o._getColumnDefs()]),(e=>{const t=function(e,i,n){return void 0===n&&(n=0),e.map((e=>{const s=function(e,t,o,i){var n,s
|
|
5475
5490
|
const r={...e._getDefaultColumnDef(),...t},a=r.accessorKey
|
|
5476
5491
|
let l,c=null!=(n=null!=(s=r.id)?s:a?a.replace(".","_"):void 0)?n:"string"==typeof r.header?r.header:void 0
|
|
5477
5492
|
if(r.accessorFn?l=r.accessorFn:a&&(l=a.includes(".")?e=>{let t=e
|
|
5478
5493
|
for(const e of a.split(".")){var o
|
|
5479
5494
|
t=null==(o=t)?void 0:o[e]}return t}:e=>e[r.accessorKey]),!c)throw new Error
|
|
5480
|
-
let d={id:`${String(c)}`,accessorFn:l,parent:i,depth:o,columnDef:r,columns:[],getFlatColumns:
|
|
5495
|
+
let d={id:`${String(c)}`,accessorFn:l,parent:i,depth:o,columnDef:r,columns:[],getFlatColumns:tw((()=>[!0]),(()=>{var e
|
|
5481
5496
|
return[d,...null==(e=d.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),{key:"column.getFlatColumns",debug:()=>{var t
|
|
5482
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:
|
|
5497
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:tw((()=>[e._getOrderColumnsFn()]),(e=>{var t
|
|
5483
5498
|
if(null!=(t=d.columns)&&t.length){let t=d.columns.flatMap((e=>e.getLeafColumns()))
|
|
5484
5499
|
return e(t)}return[d]}),{key:"column.getLeafColumns",debug:()=>{var t
|
|
5485
5500
|
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})}
|
|
5486
5501
|
return d=e._features.reduce(((t,o)=>Object.assign(t,null==o.createColumn?void 0:o.createColumn(d,e))),d),d}(o,e,n,i),r=e
|
|
5487
5502
|
return s.columns=r.columns?t(r.columns,s,n+1):[],s}))}
|
|
5488
5503
|
return t(e)}),{key:!1,debug:()=>{var e
|
|
5489
|
-
return null!=(e=o.options.debugAll)?e:o.options.debugColumns}}),getAllFlatColumns:
|
|
5490
|
-
return null!=(e=o.options.debugAll)?e:o.options.debugColumns}}),_getAllFlatColumnsById:
|
|
5491
|
-
return null!=(e=o.options.debugAll)?e:o.options.debugColumns}}),getAllLeafColumns:
|
|
5504
|
+
return null!=(e=o.options.debugAll)?e:o.options.debugColumns}}),getAllFlatColumns:tw((()=>[o.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),{key:!1,debug:()=>{var e
|
|
5505
|
+
return null!=(e=o.options.debugAll)?e:o.options.debugColumns}}),_getAllFlatColumnsById:tw((()=>[o.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),{key:!1,debug:()=>{var e
|
|
5506
|
+
return null!=(e=o.options.debugAll)?e:o.options.debugColumns}}),getAllLeafColumns:tw((()=>[o.getAllColumns(),o._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),{key:!1,debug:()=>{var e
|
|
5492
5507
|
return null!=(e=o.options.debugAll)?e:o.options.debugColumns}}),getColumn:e=>o._getAllFlatColumnsById()[e]}
|
|
5493
|
-
return Object.assign(o,a),o._features.forEach((e=>Object.assign(o,null==e.createTable?void 0:e.createTable(o)))),o}const
|
|
5508
|
+
return Object.assign(o,a),o._features.forEach((e=>Object.assign(o,null==e.createTable?void 0:e.createTable(o)))),o}const Pw=(e,t,o,i,n,s)=>{let r={id:t,index:i,original:o,depth:n,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(r._valuesCache.hasOwnProperty(t))return r._valuesCache[t]
|
|
5494
5509
|
const o=e.getColumn(t)
|
|
5495
5510
|
return null!=o&&o.accessorFn?(r._valuesCache[t]=o.accessorFn(r.original,i),r._valuesCache[t]):void 0},getUniqueValues:t=>{if(r._uniqueValuesCache.hasOwnProperty(t))return r._uniqueValuesCache[t]
|
|
5496
5511
|
const o=e.getColumn(t)
|
|
5497
5512
|
return null!=o&&o.accessorFn?o.columnDef.getUniqueValues?(r._uniqueValuesCache[t]=o.columnDef.getUniqueValues(r.original,i),r._uniqueValuesCache[t]):(r._uniqueValuesCache[t]=[r.getValue(t)],r._uniqueValuesCache[t]):void 0},renderValue:t=>{var o
|
|
5498
|
-
return null!=(o=r.getValue(t))?o:e.options.renderFallbackValue},subRows:null!=s?s:[],getLeafRows:()=>
|
|
5499
|
-
return null!=(t=n.getValue())?t:e.options.renderFallbackValue},getContext:
|
|
5513
|
+
return null!=(o=r.getValue(t))?o:e.options.renderFallbackValue},subRows:null!=s?s:[],getLeafRows:()=>ew(r.subRows,(e=>e.subRows)),getAllCells:tw((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,o,i){const n={id:`${t.id}_${o.id}`,row:t,column:o,getValue:()=>t.getValue(i),renderValue:()=>{var t
|
|
5514
|
+
return null!=(t=n.getValue())?t:e.options.renderFallbackValue},getContext:tw((()=>[e,o,t,n]),((e,t,o,i)=>({table:e,column:t,row:o,cell:i,getValue:i.getValue,renderValue:i.renderValue})),{key:!1,debug:()=>e.options.debugAll})}
|
|
5500
5515
|
return e._features.forEach((i=>{Object.assign(n,null==i.createCell?void 0:i.createCell(n,o,t,e))}),{}),n}(e,r,t,t.id)))),{key:!1,debug:()=>{var t
|
|
5501
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),_getAllCellsByColumnId:
|
|
5516
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),_getAllCellsByColumnId:tw((()=>[r.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),{key:"row.getAllCellsByColumnId",debug:()=>{var t
|
|
5502
5517
|
return null!=(t=e.options.debugAll)?t:e.options.debugRows}})}
|
|
5503
5518
|
for(let t=0;t<e._features.length;t++){const o=e._features[t]
|
|
5504
5519
|
Object.assign(r,null==o||null==o.createRow?void 0:o.createRow(r,e))}return r}
|
|
5505
|
-
function
|
|
5520
|
+
function Tw(){return e=>tw((()=>[e.getState().grouping,e.getPreGroupedRowModel()]),((t,o)=>{if(!o.rows.length||!t.length)return o
|
|
5506
5521
|
const i=t.filter((t=>e.getColumn(t))),n=[],s={},r=function(t,o,a){if(void 0===o&&(o=0),o>=i.length)return t.map((e=>(e.depth=o,n.push(e),s[e.id]=e,e.subRows&&(e.subRows=r(e.subRows,o+1)),e)))
|
|
5507
5522
|
const l=i[o],c=function(e,t){const o=new Map
|
|
5508
5523
|
return e.reduce(((e,o)=>{const i=`${o.getValue(t)}`,n=e.get(i)
|
|
5509
5524
|
return n?n.push(o):e.set(i,[o]),e}),o)}(t,l),d=Array.from(c.entries()).map(((t,c)=>{let[d,h]=t,u=`${l}:${d}`
|
|
5510
5525
|
u=a?`${a}>${u}`:u
|
|
5511
|
-
const p=r(h,o+1,u),g=o?
|
|
5526
|
+
const p=r(h,o+1,u),g=o?ew(h,(e=>e.subRows)):h,v=Pw(e,u,g[0].original,c,o)
|
|
5512
5527
|
return Object.assign(v,{groupingColumnId:l,groupingValue:d,subRows:p,leafRows:g,getValue:t=>{if(i.includes(t)){if(v._valuesCache.hasOwnProperty(t))return v._valuesCache[t]
|
|
5513
5528
|
var o
|
|
5514
5529
|
if(h[0])v._valuesCache[t]=null!=(o=h[0].getValue(t))?o:void 0
|
|
@@ -5517,10 +5532,10 @@ const n=e.getColumn(t),s=null==n?void 0:n.getAggregationFn()
|
|
|
5517
5532
|
return s?(v._groupingValuesCache[t]=s(t,g,h),v._groupingValuesCache[t]):void 0}}),p.forEach((e=>{n.push(e),s[e.id]=e})),v}))
|
|
5518
5533
|
return d},a=r(o.rows,0,"")
|
|
5519
5534
|
return a.forEach((e=>{n.push(e),s[e.id]=e})),{rows:a,flatRows:n,rowsById:s}}),{key:!1,debug:()=>{var t
|
|
5520
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._queue((()=>{e._autoResetExpanded(),e._autoResetPageIndex()}))}})}const
|
|
5521
|
-
class
|
|
5522
|
-
const
|
|
5523
|
-
try{t=document.createElement(e)}catch(e){}if(!(t instanceof
|
|
5535
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._queue((()=>{e._autoResetExpanded(),e._autoResetPageIndex()}))}})}const Dw={none:void 0,ascending:"ascending",descending:"descending"},Lw={none:void 0,single:"single",multiple:"multiple"},zw="notSelected",Bw="selected",Nw="partiallySelected",Zw="basic",qw="localeAwareCaseSensitive"
|
|
5536
|
+
class jw extends Rt{}e([m],jw.prototype,"groupHeaderValue",void 0),e([m],jw.prototype,"columnConfig",void 0)
|
|
5537
|
+
const Uw=e=>((e=>{let t
|
|
5538
|
+
try{t=document.createElement(e)}catch(e){}if(!(t instanceof jw))throw new Error(`Group header view tag name (${e}) must evaluate to an element extending TableGroupHeaderView`)})(e),G`
|
|
5524
5539
|
<${e}
|
|
5525
5540
|
:groupHeaderValue="${e=>e.groupRowValue}"
|
|
5526
5541
|
:columnConfig="${e=>e.groupColumn?.columnInternals.columnConfig}"
|
|
@@ -5528,23 +5543,24 @@ try{t=document.createElement(e)}catch(e){}if(!(t instanceof qw))throw new Error(
|
|
|
5528
5543
|
>
|
|
5529
5544
|
</${e}>
|
|
5530
5545
|
`)
|
|
5531
|
-
class
|
|
5532
|
-
if(this.delegatedEvents=[],this.delegatedEventHandler=()=>{},this.column){this.delegatedEvents=this.column.columnInternals.delegatedEvents,this.delegatedEventHandler=e=>{this.column?.dispatchEvent(new CustomEvent("delegated-event",{detail:{originalEvent:e}}))}
|
|
5533
|
-
for(const e of this.delegatedEvents)this.addEventListener(e,this.delegatedEventHandler)}}}e([m],
|
|
5534
|
-
const
|
|
5535
|
-
try{t=document.createElement(e)}catch(e){}if(!(t instanceof
|
|
5546
|
+
class Gw extends Rt{constructor(){super(...arguments),this.delegatedEvents=[],this.delegatedEventHandler=()=>{}}focusedRecycleCallback(){}columnChanged(){for(const e of this.delegatedEvents)this.removeEventListener(e,this.delegatedEventHandler)
|
|
5547
|
+
if(this.delegatedEvents=[],this.delegatedEventHandler=()=>{},this.column){this.delegatedEvents=this.column.columnInternals.delegatedEvents,this.delegatedEventHandler=e=>{this.recordId&&this.column?.dispatchEvent(new CustomEvent("delegated-event",{detail:{originalEvent:e,recordId:this.recordId}}))}
|
|
5548
|
+
for(const e of this.delegatedEvents)this.addEventListener(e,this.delegatedEventHandler)}}}e([m],Gw.prototype,"cellRecord",void 0),e([m],Gw.prototype,"columnConfig",void 0),e([m],Gw.prototype,"column",void 0),e([m],Gw.prototype,"recordId",void 0)
|
|
5549
|
+
const Ww=e=>((e=>{let t
|
|
5550
|
+
try{t=document.createElement(e)}catch(e){}if(!(t instanceof Gw))throw new Error(`Cell view tag name (${e}) must evaluate to an element extending TableCellView`)})(e),G`
|
|
5536
5551
|
<${e}
|
|
5537
5552
|
:cellRecord="${e=>e.cellState?.cellRecord}"
|
|
5538
5553
|
:columnConfig="${e=>e.cellState?.columnConfig}"
|
|
5539
5554
|
:column="${e=>e.column}"
|
|
5555
|
+
:recordId="${e=>e.recordId}"
|
|
5540
5556
|
class="cell-view"
|
|
5541
5557
|
>
|
|
5542
5558
|
</${e}>
|
|
5543
5559
|
`)
|
|
5544
|
-
class
|
|
5545
|
-
class
|
|
5546
|
-
class
|
|
5547
|
-
return!e.duplicateRecordId&&!e.missingRecordId&&!e.invalidRecordId}validateSelectionMode(e,t){return this.idFieldNameNotConfigured=e!==
|
|
5560
|
+
class Kw{constructor(e){this.uniqueId=Hr("table-column-slot"),this.validConfiguration=!0,this.sortOperation=Zw,this.dataRecordFieldNames=[],this.groupingDisabled=!1,this.fractionalWidth=1,this.minPixelWidth=117,this.currentFractionalWidth=1,this.currentSortDirection=Dw.none,this.cellRecordFieldNames=e.cellRecordFieldNames,this.cellViewTemplate=Ww(e.cellViewTag),this.groupHeaderViewTemplate=Uw(e.groupHeaderViewTag),this.delegatedEvents=e.delegatedEvents,this.sortOperation=e.sortOperation??Zw}fractionalWidthChanged(){this.currentFractionalWidth=this.fractionalWidth}pixelWidthChanged(){this.currentPixelWidth=this.pixelWidth}}e([m],Kw.prototype,"columnConfig",void 0),e([m],Kw.prototype,"validConfiguration",void 0),e([m],Kw.prototype,"operandDataRecordFieldName",void 0),e([m],Kw.prototype,"sortOperation",void 0),e([m],Kw.prototype,"dataRecordFieldNames",void 0),e([m],Kw.prototype,"groupingDisabled",void 0),e([m],Kw.prototype,"groupIndex",void 0),e([m],Kw.prototype,"pixelWidth",void 0),e([m],Kw.prototype,"fractionalWidth",void 0),e([m],Kw.prototype,"minPixelWidth",void 0),e([m],Kw.prototype,"currentFractionalWidth",void 0),e([m],Kw.prototype,"currentPixelWidth",void 0),e([m],Kw.prototype,"currentSortIndex",void 0),e([m],Kw.prototype,"currentSortDirection",void 0)
|
|
5561
|
+
class Xw extends Rt{constructor(){super(...arguments),this.columnInternals=new Kw(this.getColumnInternalsOptions()),this.columnHidden=!1,this.sortDirection=Dw.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(" ")}sortDirectionChanged(){this.sortingDisabled||(this.columnInternals.currentSortDirection=this.sortDirection)}sortIndexChanged(){this.sortingDisabled||(this.columnInternals.currentSortIndex=this.sortIndex)}sortingDisabledChanged(){this.sortingDisabled?(this.columnInternals.currentSortDirection=Dw.none,this.columnInternals.currentSortIndex=void 0):(this.columnInternals.currentSortDirection=this.sortDirection,this.columnInternals.currentSortIndex=this.sortIndex)}}e([ne({attribute:"column-id"})],Xw.prototype,"columnId",void 0),e([ne({attribute:"action-menu-slot"})],Xw.prototype,"actionMenuSlot",void 0),e([ne({attribute:"action-menu-label"})],Xw.prototype,"actionMenuLabel",void 0),e([ne({attribute:"column-hidden",mode:"boolean"})],Xw.prototype,"columnHidden",void 0),e([ne({attribute:"sort-index",converter:oe})],Xw.prototype,"sortIndex",void 0),e([ne({attribute:"sort-direction"})],Xw.prototype,"sortDirection",void 0),e([ne({attribute:"sorting-disabled",mode:"boolean"})],Xw.prototype,"sortingDisabled",void 0),e([m],Xw.prototype,"hasOverflow",void 0)
|
|
5562
|
+
class Yw{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()
|
|
5563
|
+
return!e.duplicateRecordId&&!e.missingRecordId&&!e.invalidRecordId}validateSelectionMode(e,t){return this.idFieldNameNotConfigured=e!==Lw.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
|
|
5548
5564
|
for(const o of e){if(!Object.prototype.hasOwnProperty.call(o,t)){this.missingRecordId=!0
|
|
5549
5565
|
continue}const e=o[t]
|
|
5550
5566
|
"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
|
|
@@ -5552,7 +5568,7 @@ const t=e.some((e=>e))
|
|
|
5552
5568
|
if(!t)return!0
|
|
5553
5569
|
const o=new Set
|
|
5554
5570
|
for(const t of e)t?(o.has(t)&&(this.duplicateColumnId=!0),o.add(t)):this.missingColumnId=!0
|
|
5555
|
-
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
|
|
5571
|
+
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 Qw=fe`
|
|
5556
5572
|
${xn("flex")}
|
|
5557
5573
|
|
|
5558
5574
|
:host {
|
|
@@ -5661,7 +5677,7 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e
|
|
|
5661
5677
|
background-color: ${cs(Un,.1)};
|
|
5662
5678
|
position: absolute;
|
|
5663
5679
|
}
|
|
5664
|
-
`)),
|
|
5680
|
+
`)),Jw=fe`
|
|
5665
5681
|
${xn("flex")}
|
|
5666
5682
|
|
|
5667
5683
|
:host {
|
|
@@ -5680,7 +5696,7 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e
|
|
|
5680
5696
|
.grouped-indicator {
|
|
5681
5697
|
flex: 0 0 auto;
|
|
5682
5698
|
}
|
|
5683
|
-
`,
|
|
5699
|
+
`,ex=G`
|
|
5684
5700
|
<template role="columnheader"
|
|
5685
5701
|
aria-sort="${e=>e.ariaSort}"
|
|
5686
5702
|
${""}
|
|
@@ -5688,10 +5704,10 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e
|
|
|
5688
5704
|
>
|
|
5689
5705
|
<slot></slot>
|
|
5690
5706
|
${""}
|
|
5691
|
-
${Me((e=>e.sortDirection===
|
|
5707
|
+
${Me((e=>e.sortDirection===Dw.ascending),G`
|
|
5692
5708
|
<${Gg} class="sort-indicator" aria-hidden="true"></${Gg}>
|
|
5693
5709
|
`)}
|
|
5694
|
-
${Me((e=>e.sortDirection===
|
|
5710
|
+
${Me((e=>e.sortDirection===Dw.descending),G`
|
|
5695
5711
|
<${Hg} class="sort-indicator" aria-hidden="true"></${Hg}>
|
|
5696
5712
|
`)}
|
|
5697
5713
|
${Me((e=>e.isGrouped),G`
|
|
@@ -5699,10 +5715,10 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e
|
|
|
5699
5715
|
`)}
|
|
5700
5716
|
</template>
|
|
5701
5717
|
`
|
|
5702
|
-
class
|
|
5703
|
-
const tx
|
|
5704
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
5705
|
-
const
|
|
5718
|
+
class tx extends Rt{constructor(){super(...arguments),this.sortDirection=Dw.none,this.firstSortedColumn=!1,this.isGrouped=!1}sortDirectionChanged(e,t){this.updateAriaSort()}firstSortedColumnChanged(e,t){this.updateAriaSort()}updateAriaSort(){this.firstSortedColumn&&this.sortDirection!==Dw.none?this.sortDirection===Dw.ascending?this.ariaSort="ascending":this.ariaSort="descending":this.ariaSort=null}}e([ne({attribute:"sort-direction"})],tx.prototype,"sortDirection",void 0),e([ne({attribute:"first-sorted-column",mode:"boolean"})],tx.prototype,"firstSortedColumn",void 0),e([m],tx.prototype,"isGrouped",void 0)
|
|
5719
|
+
const ox=tx.compose({baseName:"table-header",template:ex,styles:Jw})
|
|
5720
|
+
ai.getOrCreate().withPrefix("nimble").register(ox())
|
|
5721
|
+
const ix=ai.tagFor(tx),nx=fe`
|
|
5706
5722
|
${xn("flex")}
|
|
5707
5723
|
|
|
5708
5724
|
:host {
|
|
@@ -5789,7 +5805,7 @@ const ox=ai.tagFor(ex),ix=fe`
|
|
|
5789
5805
|
:host([selected]:hover)::before {
|
|
5790
5806
|
background-color: ${cs(Un,.2)};
|
|
5791
5807
|
}
|
|
5792
|
-
`)),
|
|
5808
|
+
`)),sx=fe`
|
|
5793
5809
|
${xn("flex")}
|
|
5794
5810
|
|
|
5795
5811
|
:host {
|
|
@@ -5819,7 +5835,7 @@ const ox=ai.tagFor(ex),ix=fe`
|
|
|
5819
5835
|
height: ${ra};
|
|
5820
5836
|
align-self: center;
|
|
5821
5837
|
}
|
|
5822
|
-
`,
|
|
5838
|
+
`,rx=G`
|
|
5823
5839
|
<template role="cell" style="--ni-private-table-cell-nesting-level: ${e=>e.nestingLevel}">
|
|
5824
5840
|
${e=>e.cellViewTemplate}
|
|
5825
5841
|
${Me((e=>e.hasActionMenu),G`
|
|
@@ -5838,10 +5854,10 @@ const ox=ai.tagFor(ex),ix=fe`
|
|
|
5838
5854
|
`)}
|
|
5839
5855
|
</template>
|
|
5840
5856
|
`
|
|
5841
|
-
class
|
|
5842
|
-
const ax
|
|
5843
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
5844
|
-
const
|
|
5857
|
+
class ax extends Rt{constructor(){super(...arguments),this.hasActionMenu=!1,this.menuOpen=!1,this.nestingLevel=0}onActionMenuBeforeToggle(e){this.$emit("cell-action-menu-beforetoggle",e.detail)}onActionMenuToggle(e){this.menuOpen=e.detail.newState,this.$emit("cell-action-menu-toggle",e.detail)}}e([m],ax.prototype,"cellState",void 0),e([m],ax.prototype,"column",void 0),e([m],ax.prototype,"recordId",void 0),e([ne({attribute:"has-action-menu",mode:"boolean"})],ax.prototype,"hasActionMenu",void 0),e([ne({attribute:"menu-open",mode:"boolean"})],ax.prototype,"menuOpen",void 0),e([ne({attribute:"action-menu-label"})],ax.prototype,"actionMenuLabel",void 0),e([m],ax.prototype,"cellViewTemplate",void 0),e([m],ax.prototype,"nestingLevel",void 0)
|
|
5858
|
+
const lx=ax.compose({baseName:"table-cell",template:rx,styles:sx})
|
|
5859
|
+
ai.getOrCreate().withPrefix("nimble").register(lx())
|
|
5860
|
+
const cx=ai.tagFor(ax),dx=G`
|
|
5845
5861
|
<template role="row" aria-selected=${e=>e.ariaSelected}>
|
|
5846
5862
|
${Me((e=>e.selectable&&!e.hideSelection),G`
|
|
5847
5863
|
<span role="gridcell" class="checkbox-container">
|
|
@@ -5860,11 +5876,12 @@ const lx=ai.tagFor(rx),cx=G`
|
|
|
5860
5876
|
<span ${Re("cellContainer")} class="cell-container">
|
|
5861
5877
|
${He((e=>e.columnStates),G`
|
|
5862
5878
|
${Me((e=>!e.column.columnHidden),G`
|
|
5863
|
-
<${
|
|
5879
|
+
<${cx}
|
|
5864
5880
|
class="cell"
|
|
5865
5881
|
:cellState="${e=>e.cellState}"
|
|
5866
5882
|
:cellViewTemplate="${e=>e.column.columnInternals.cellViewTemplate}"
|
|
5867
5883
|
:column="${e=>e.column}"
|
|
5884
|
+
:recordId="${(e,t)=>t.parent.recordId}"
|
|
5868
5885
|
?has-action-menu="${e=>!!e.column.actionMenuSlot}"
|
|
5869
5886
|
action-menu-label="${e=>e.column.actionMenuLabel}"
|
|
5870
5887
|
@cell-action-menu-beforetoggle="${(e,t)=>t.parent.onCellActionMenuBeforeToggle(t.event,e.column)}"
|
|
@@ -5878,13 +5895,13 @@ const lx=ai.tagFor(rx),cx=G`
|
|
|
5878
5895
|
slot="cellActionMenu"
|
|
5879
5896
|
></slot>
|
|
5880
5897
|
`)}
|
|
5881
|
-
</${
|
|
5898
|
+
</${cx}>
|
|
5882
5899
|
`)}
|
|
5883
5900
|
`)}
|
|
5884
5901
|
</span>
|
|
5885
5902
|
</template>
|
|
5886
5903
|
`
|
|
5887
|
-
class
|
|
5904
|
+
class hx extends Rt{constructor(){super(...arguments),this.selectable=!1,this.selected=!1,this.hideSelection=!1,this.columns=[],this.nestingLevel=0,this.menuOpen=!1,this.ignoreSelectionChangeEvents=!1}get columnStates(){return this.columns.map(((e,t)=>{const o=e.columnInternals.dataRecordFieldNames
|
|
5888
5905
|
let i
|
|
5889
5906
|
if(this.hasValidFieldNames(o)&&this.dataRecord){const t=o.map((e=>this.dataRecord[e]))
|
|
5890
5907
|
i={cellRecord:Object.fromEntries(e.columnInternals.cellRecordFieldNames.map(((e,o)=>[e,t[o]]))),columnConfig:e.columnInternals.columnConfig??{}}}else i={cellRecord:{},columnConfig:{}}
|
|
@@ -5892,12 +5909,12 @@ return{column:e,cellState:i,cellIndentLevel:0===t&&this.nestingLevel>0?this.nest
|
|
|
5892
5909
|
const t=e.target.checked
|
|
5893
5910
|
this.selected=t
|
|
5894
5911
|
const o={oldState:!t,newState:t}
|
|
5895
|
-
this.$emit("row-selection-toggle",o)}onCellActionMenuBeforeToggle(e,t){this.currentActionMenuColumn=t,this.emitActionMenuToggleEvent("row-action-menu-beforetoggle",e.detail,t)}onCellActionMenuToggle(e,t){this.menuOpen=e.detail.newState,this.emitActionMenuToggleEvent("row-action-menu-toggle",e.detail,t)}closeOpenActionMenus(){if(this.menuOpen){const e=Array.from(this.cellContainer.children).find((e=>e instanceof
|
|
5912
|
+
this.$emit("row-selection-toggle",o)}onCellActionMenuBeforeToggle(e,t){this.currentActionMenuColumn=t,this.emitActionMenuToggleEvent("row-action-menu-beforetoggle",e.detail,t)}onCellActionMenuToggle(e,t){this.menuOpen=e.detail.newState,this.emitActionMenuToggleEvent("row-action-menu-toggle",e.detail,t)}closeOpenActionMenus(){if(this.menuOpen){const e=Array.from(this.cellContainer.children).find((e=>e instanceof ax&&e.menuOpen))
|
|
5896
5913
|
e?.actionMenuButton?.open&&e.actionMenuButton.toggleButton.control.click()}}emitActionMenuToggleEvent(e,t,o){const i={newState:t.newState,oldState:t.oldState,recordIds:[this.recordId],columnId:o.columnId}
|
|
5897
|
-
this.$emit(e,i)}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([ne({attribute:"record-id"})],
|
|
5898
|
-
const hx
|
|
5899
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
5900
|
-
const
|
|
5914
|
+
this.$emit(e,i)}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([ne({attribute:"record-id"})],hx.prototype,"recordId",void 0),e([ne({mode:"boolean"})],hx.prototype,"selectable",void 0),e([ne({mode:"boolean"})],hx.prototype,"selected",void 0),e([ne({attribute:"hide-selection",mode:"boolean"})],hx.prototype,"hideSelection",void 0),e([m],hx.prototype,"dataRecord",void 0),e([m],hx.prototype,"columns",void 0),e([m],hx.prototype,"currentActionMenuColumn",void 0),e([m],hx.prototype,"nestingLevel",void 0),e([ne({attribute:"menu-open",mode:"boolean"})],hx.prototype,"menuOpen",void 0),e([m],hx.prototype,"selectionCheckbox",void 0),e([f],hx.prototype,"columnStates",null),e([f],hx.prototype,"ariaSelected",null)
|
|
5915
|
+
const ux=hx.compose({baseName:"table-row",template:dx,styles:nx})
|
|
5916
|
+
ai.getOrCreate().withPrefix("nimble").register(ux())
|
|
5917
|
+
const px=ai.tagFor(hx),gx=fe`
|
|
5901
5918
|
${xn("grid")}
|
|
5902
5919
|
|
|
5903
5920
|
:host {
|
|
@@ -6002,7 +6019,7 @@ const ux=ai.tagFor(dx),px=fe`
|
|
|
6002
6019
|
:host(:hover)::before {
|
|
6003
6020
|
background-color: ${cs(Un,.1)};
|
|
6004
6021
|
}
|
|
6005
|
-
`)),
|
|
6022
|
+
`)),vx=G`
|
|
6006
6023
|
<template
|
|
6007
6024
|
role="row"
|
|
6008
6025
|
@click=${e=>e.onGroupExpandToggle()}
|
|
@@ -6038,14 +6055,14 @@ const ux=ai.tagFor(dx),px=fe`
|
|
|
6038
6055
|
</div>
|
|
6039
6056
|
</template>
|
|
6040
6057
|
`
|
|
6041
|
-
class
|
|
6058
|
+
class mx extends Rt{constructor(){super(...arguments),this.nestingLevel=0,this.expanded=!1,this.selectable=!1,this.selectionState=zw,this.animationClass="",this.ignoreSelectionChangeEvents=!1,this.removeAnimatingClass=()=>{this.animationClass="",this.expandIcon.removeEventListener("transitionend",this.removeAnimatingClass)}}onGroupExpandToggle(){this.$emit("group-expand-toggle"),this.animationClass="animating",this.expandIcon.addEventListener("transitionend",this.removeAnimatingClass)}onSelectionChange(e){if(this.ignoreSelectionChangeEvents)return
|
|
6042
6059
|
const t=e.target.checked
|
|
6043
|
-
this.selectionState=t?zw
|
|
6060
|
+
this.selectionState=t?Bw:zw
|
|
6044
6061
|
const o={oldState:!t,newState:t}
|
|
6045
|
-
this.$emit("group-selection-toggle",o)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===
|
|
6046
|
-
const mx
|
|
6047
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
6048
|
-
const
|
|
6062
|
+
this.$emit("group-selection-toggle",o)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===Bw,this.selectionCheckbox.indeterminate=this.selectionState===Nw,this.ignoreSelectionChangeEvents=!1)}}e([m],mx.prototype,"groupRowValue",void 0),e([m],mx.prototype,"nestingLevel",void 0),e([m],mx.prototype,"leafItemCount",void 0),e([m],mx.prototype,"groupColumn",void 0),e([ne({mode:"boolean"})],mx.prototype,"expanded",void 0),e([ne({mode:"boolean"})],mx.prototype,"selectable",void 0),e([ne({attribute:"selection-state"})],mx.prototype,"selectionState",void 0),e([m],mx.prototype,"selectionCheckbox",void 0),e([m],mx.prototype,"animationClass",void 0)
|
|
6063
|
+
const fx=mx.compose({baseName:"table-group-row",template:vx,styles:gx})
|
|
6064
|
+
ai.getOrCreate().withPrefix("nimble").register(fx())
|
|
6065
|
+
const bx=ai.tagFor(mx),wx=G`
|
|
6049
6066
|
<template
|
|
6050
6067
|
role="grid"
|
|
6051
6068
|
aria-multiselectable="${e=>e.ariaMultiSelectable}"
|
|
@@ -6061,7 +6078,7 @@ const fx=ai.tagFor(vx),bx=G`
|
|
|
6061
6078
|
">
|
|
6062
6079
|
<div role="rowgroup" class="header-container">
|
|
6063
6080
|
<div class="header-row" role="row">
|
|
6064
|
-
${Me((e=>e.selectionMode===
|
|
6081
|
+
${Me((e=>e.selectionMode===Lw.multiple),G`
|
|
6065
6082
|
<span role="columnheader" class="checkbox-container">
|
|
6066
6083
|
<${sg}
|
|
6067
6084
|
${Re("selectionCheckbox")}
|
|
@@ -6086,15 +6103,15 @@ const fx=ai.tagFor(vx),bx=G`
|
|
|
6086
6103
|
<span class="column-header-container">
|
|
6087
6104
|
${He((e=>e.columns),G`
|
|
6088
6105
|
${Me((e=>!e.columnHidden),G`
|
|
6089
|
-
<${
|
|
6106
|
+
<${ix}
|
|
6090
6107
|
class="header"
|
|
6091
|
-
sort-direction="${e=>"number"==typeof e.columnInternals.currentSortIndex?e.columnInternals.currentSortDirection:
|
|
6108
|
+
sort-direction="${e=>"number"==typeof e.columnInternals.currentSortIndex?e.columnInternals.currentSortDirection:Dw.none}"
|
|
6092
6109
|
?first-sorted-column="${(e,t)=>e===t.parent.firstSortedColumn}"
|
|
6093
6110
|
@click="${(e,t)=>t.parent.toggleColumnSort(e,t.event.shiftKey)}"
|
|
6094
6111
|
:isGrouped=${e=>"number"==typeof e.columnInternals.groupIndex&&!e.columnInternals.groupingDisabled}
|
|
6095
6112
|
>
|
|
6096
6113
|
<slot name="${e=>e.slot}"></slot>
|
|
6097
|
-
</${
|
|
6114
|
+
</${ix}>
|
|
6098
6115
|
`)}
|
|
6099
6116
|
`)}
|
|
6100
6117
|
<div class="header-scrollbar-spacer"></div>
|
|
@@ -6103,32 +6120,32 @@ const fx=ai.tagFor(vx),bx=G`
|
|
|
6103
6120
|
</div>
|
|
6104
6121
|
<div class="table-viewport" ${Re("viewport")}>
|
|
6105
6122
|
<div class="table-scroll"></div>
|
|
6106
|
-
<div class="table-row-container" ${Be({property:"rowElements",filter:Pe(
|
|
6123
|
+
<div class="table-row-container" ${Be({property:"rowElements",filter:Pe(px)})}
|
|
6107
6124
|
role="rowgroup">
|
|
6108
6125
|
${Me((e=>e.columns.length>0&&e.canRenderRows),G`
|
|
6109
6126
|
${He((e=>e.virtualizer.visibleItems),G`
|
|
6110
6127
|
${Me(((e,t)=>t.parent.tableData[e.index]?.isGrouped),G`
|
|
6111
|
-
<${
|
|
6128
|
+
<${bx}
|
|
6112
6129
|
class="group-row"
|
|
6113
6130
|
:groupRowValue="${(e,t)=>t.parent.tableData[e.index]?.groupRowValue}"
|
|
6114
6131
|
?expanded="${(e,t)=>t.parent.tableData[e.index]?.isExpanded}"
|
|
6115
6132
|
:nestingLevel="${(e,t)=>t.parent.tableData[e.index]?.nestingLevel}"
|
|
6116
6133
|
:leafItemCount="${(e,t)=>t.parent.tableData[e.index]?.leafItemCount}"
|
|
6117
6134
|
:groupColumn="${(e,t)=>t.parent.tableData[e.index]?.groupColumn}"
|
|
6118
|
-
?selectable="${(e,t)=>t.parent.selectionMode===
|
|
6135
|
+
?selectable="${(e,t)=>t.parent.selectionMode===Lw.multiple}"
|
|
6119
6136
|
selection-state="${(e,t)=>t.parent.tableData[e.index]?.selectionState}"
|
|
6120
6137
|
@group-selection-toggle="${(e,t)=>t.parent.onRowSelectionToggle(e.index,t.event)}"
|
|
6121
6138
|
@group-expand-toggle="${(e,t)=>t.parent.handleGroupRowExpanded(e.index,t.event)}"
|
|
6122
6139
|
>
|
|
6123
|
-
</${
|
|
6140
|
+
</${bx}>
|
|
6124
6141
|
`)}
|
|
6125
6142
|
${Me(((e,t)=>!t.parent.tableData[e.index]?.isGrouped),G`
|
|
6126
|
-
<${
|
|
6143
|
+
<${px}
|
|
6127
6144
|
class="row"
|
|
6128
6145
|
record-id="${(e,t)=>t.parent.tableData[e.index]?.id}"
|
|
6129
|
-
?selectable="${(e,t)=>t.parent.selectionMode!==
|
|
6130
|
-
?selected="${(e,t)=>t.parent.tableData[e.index]?.selectionState===
|
|
6131
|
-
?hide-selection="${(e,t)=>t.parent.selectionMode!==
|
|
6146
|
+
?selectable="${(e,t)=>t.parent.selectionMode!==Lw.none}"
|
|
6147
|
+
?selected="${(e,t)=>t.parent.tableData[e.index]?.selectionState===Bw}"
|
|
6148
|
+
?hide-selection="${(e,t)=>t.parent.selectionMode!==Lw.multiple}"
|
|
6132
6149
|
:dataRecord="${(e,t)=>t.parent.tableData[e.index]?.record}"
|
|
6133
6150
|
:columns="${(e,t)=>t.parent.columns}"
|
|
6134
6151
|
:nestingLevel="${(e,t)=>t.parent.tableData[e.index]?.nestingLevel}"
|
|
@@ -6145,7 +6162,7 @@ const fx=ai.tagFor(vx),bx=G`
|
|
|
6145
6162
|
</slot>
|
|
6146
6163
|
`)}
|
|
6147
6164
|
`)}
|
|
6148
|
-
</${
|
|
6165
|
+
</${px}>
|
|
6149
6166
|
`)}
|
|
6150
6167
|
`)}
|
|
6151
6168
|
`)}
|
|
@@ -6164,8 +6181,8 @@ const fx=ai.tagFor(vx),bx=G`
|
|
|
6164
6181
|
*
|
|
6165
6182
|
* @license MIT
|
|
6166
6183
|
*/
|
|
6167
|
-
function
|
|
6168
|
-
for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},
|
|
6184
|
+
function xx(){return xx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]
|
|
6185
|
+
for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},xx.apply(this,arguments)}
|
|
6169
6186
|
/**
|
|
6170
6187
|
* virtual-core
|
|
6171
6188
|
*
|
|
@@ -6175,42 +6192,42 @@ for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},
|
|
|
6175
6192
|
* LICENSE.md file in the root directory of this source tree.
|
|
6176
6193
|
*
|
|
6177
6194
|
* @license MIT
|
|
6178
|
-
*/function
|
|
6195
|
+
*/function yx(e,t,o){var i,n,s=null!=(i=o.initialDeps)?i:[]
|
|
6179
6196
|
return function(){var i
|
|
6180
6197
|
o.key&&null!=o.debug&&o.debug()&&(i=Date.now())
|
|
6181
6198
|
var r,a=e()
|
|
6182
6199
|
if(!(a.length!==s.length||a.some((function(e,t){return s[t]!==e}))))return n
|
|
6183
6200
|
if(s=a,o.key&&null!=o.debug&&o.debug()&&(r=Date.now()),n=t.apply(void 0,a),o.key&&null!=o.debug&&o.debug()){var l=Math.round(100*(Date.now()-i))/100,c=Math.round(100*(Date.now()-r))/100,d=c/16,h=function(e,t){for(e=String(e);e.length<t;)e=" "+e
|
|
6184
6201
|
return e}
|
|
6185
|
-
console.info("%c⏱ "+h(c,5)+" /"+h(l,5)+" ms","\n font-size: .6rem;\n font-weight: bold;\n color: hsl("+Math.max(0,Math.min(120-120*d,120))+"deg 100% 31%);",null==o?void 0:o.key)}return null==o||null==o.onChange||o.onChange(n),n}}var
|
|
6186
|
-
return i},
|
|
6202
|
+
console.info("%c⏱ "+h(c,5)+" /"+h(l,5)+" ms","\n font-size: .6rem;\n font-weight: bold;\n color: hsl("+Math.max(0,Math.min(120-120*d,120))+"deg 100% 31%);",null==o?void 0:o.key)}return null==o||null==o.onChange||o.onChange(n),n}}var $x,Cx=function(e){return e},kx=function(e){for(var t=Math.max(e.startIndex-e.overscan,0),o=Math.min(e.endIndex+e.overscan,e.count-1),i=[],n=t;n<=o;n++)i.push(n)
|
|
6203
|
+
return i},Sx=function(e,t){var o=new ResizeObserver((function(e){var o=e[0]
|
|
6187
6204
|
if(o){var i=o.contentRect,n=i.width,s=i.height
|
|
6188
6205
|
t({width:Math.round(n),height:Math.round(s)})}else t({width:0,height:0})}))
|
|
6189
|
-
if(e.scrollElement)return t(e.scrollElement.getBoundingClientRect()),o.observe(e.scrollElement),function(){o.unobserve(e.scrollElement)}},
|
|
6206
|
+
if(e.scrollElement)return t(e.scrollElement.getBoundingClientRect()),o.observe(e.scrollElement),function(){o.unobserve(e.scrollElement)}},_x={element:["scrollLeft","scrollTop"],window:["scrollX","scrollY"]},Ix=($x="element",function(e,t){if(e.scrollElement){var o=_x[$x][0],i=_x[$x][1],n=e.scrollElement[o],s=e.scrollElement[i],r=function(){var n=e.scrollElement[e.options.horizontal?o:i]
|
|
6190
6207
|
t(n)}
|
|
6191
6208
|
r()
|
|
6192
6209
|
var a=function(t){var a=t.currentTarget,l=a[o],c=a[i];(e.options.horizontal?n-l:s-c)&&r(),n=l,s=c}
|
|
6193
|
-
return e.scrollElement.addEventListener("scroll",a,{capture:!1,passive:!0}),function(){e.scrollElement.removeEventListener("scroll",a)}}}),
|
|
6194
|
-
null==(i=o.scrollElement)||null==i.scrollTo||i.scrollTo(((n={})[o.options.horizontal?"left":"top"]=l,n.behavior=a,n))},
|
|
6210
|
+
return e.scrollElement.addEventListener("scroll",a,{capture:!1,passive:!0}),function(){e.scrollElement.removeEventListener("scroll",a)}}}),Rx=function(e,t){return Math.round(e.getBoundingClientRect()[t.options.horizontal?"width":"height"])},Mx=function(e,t,o){var i,n,s=t.adjustments,r=void 0===s?0:s,a=t.behavior,l=e+r
|
|
6211
|
+
null==(i=o.scrollElement)||null==i.scrollTo||i.scrollTo(((n={})[o.options.horizontal?"left":"top"]=l,n.behavior=a,n))},Ax=function(e){var t,o=this
|
|
6195
6212
|
this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache={},this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache={},this.getResizeObserver=(t=null,function(){return t||("undefined"!=typeof ResizeObserver?t=new ResizeObserver((function(e){e.forEach((function(e){o._measureElement(e.target,!1)}))})):null)}),this.range={startIndex:0,endIndex:0},this.setOptions=function(e){Object.entries(e).forEach((function(t){var o=t[0]
|
|
6196
|
-
void 0===t[1]&&delete e[o]})),o.options=
|
|
6213
|
+
void 0===t[1]&&delete e[o]})),o.options=xx({debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Cx,rangeExtractor:kx,onChange:function(){},measureElement:Rx,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[]},e)},this.notify=function(){null==o.options.onChange||o.options.onChange(o)},this.cleanup=function(){o.unsubs.filter(Boolean).forEach((function(e){return e()})),o.unsubs=[],o.scrollElement=null},this._didMount=function(){var e=o.getResizeObserver()
|
|
6197
6214
|
return Object.values(o.measureElementCache).forEach((function(t){return null==e?void 0:e.observe(t)})),function(){null==e||e.disconnect(),o.cleanup()}},this._willUpdate=function(){var e=o.options.getScrollElement()
|
|
6198
|
-
o.scrollElement!==e&&(o.cleanup(),o.scrollElement=e,o._scrollToOffset(o.scrollOffset,{adjustments:void 0,behavior:void 0}),o.unsubs.push(o.options.observeElementRect(o,(function(e){o.scrollRect=e,o.maybeNotify()}))),o.unsubs.push(o.options.observeElementOffset(o,(function(e){o.scrollAdjustments=0,o.scrollOffset!==e&&(null!==o.isScrollingTimeoutId&&(clearTimeout(o.isScrollingTimeoutId),o.isScrollingTimeoutId=null),o.isScrolling=!0,o.scrollDirection=o.scrollOffset<e?"forward":"backward",o.scrollOffset=e,o.maybeNotify(),o.isScrollingTimeoutId=setTimeout((function(){o.isScrollingTimeoutId=null,o.isScrolling=!1,o.scrollDirection=null,o.maybeNotify()}),o.options.scrollingDelay))}))))},this.getSize=function(){return o.scrollRect[o.options.horizontal?"width":"height"]},this.getMeasurements=
|
|
6215
|
+
o.scrollElement!==e&&(o.cleanup(),o.scrollElement=e,o._scrollToOffset(o.scrollOffset,{adjustments:void 0,behavior:void 0}),o.unsubs.push(o.options.observeElementRect(o,(function(e){o.scrollRect=e,o.maybeNotify()}))),o.unsubs.push(o.options.observeElementOffset(o,(function(e){o.scrollAdjustments=0,o.scrollOffset!==e&&(null!==o.isScrollingTimeoutId&&(clearTimeout(o.isScrollingTimeoutId),o.isScrollingTimeoutId=null),o.isScrolling=!0,o.scrollDirection=o.scrollOffset<e?"forward":"backward",o.scrollOffset=e,o.maybeNotify(),o.isScrollingTimeoutId=setTimeout((function(){o.isScrollingTimeoutId=null,o.isScrolling=!1,o.scrollDirection=null,o.maybeNotify()}),o.options.scrollingDelay))}))))},this.getSize=function(){return o.scrollRect[o.options.horizontal?"width":"height"]},this.getMeasurements=yx((function(){return[o.options.count,o.options.paddingStart,o.options.scrollMargin,o.options.getItemKey,o.itemSizeCache]}),(function(e,t,i,n,s){var r=o.pendingMeasuredCacheIndexes.length>0?Math.min.apply(Math,o.pendingMeasuredCacheIndexes):0
|
|
6199
6216
|
o.pendingMeasuredCacheIndexes=[]
|
|
6200
6217
|
for(var a=o.measurementsCache.slice(0,r),l=r;l<e;l++){var c=n(l),d=s[c],h=a[l-1]?a[l-1].end:t+i,u="number"==typeof d?d:o.options.estimateSize(l),p=h+u
|
|
6201
|
-
a[l]={index:l,start:h,size:u,end:p,key:c}}return o.measurementsCache=a,a}),{key:!1,debug:function(){return o.options.debug}}),this.calculateRange=
|
|
6218
|
+
a[l]={index:l,start:h,size:u,end:p,key:c}}return o.measurementsCache=a,a}),{key:!1,debug:function(){return o.options.debug}}),this.calculateRange=yx((function(){return[o.getMeasurements(),o.getSize(),o.scrollOffset]}),(function(e,t,i){return o.range=function(e){var t=e.measurements,o=e.outerSize,i=e.scrollOffset,n=t.length-1,s=function(e){return t[e].start},r=function(e,t,o,i){for(;e<=t;){var n=(e+t)/2|0,s=o(n)
|
|
6202
6219
|
if(s<i)e=n+1
|
|
6203
6220
|
else{if(!(s>i))return n
|
|
6204
6221
|
t=n-1}}return e>0?e-1:0}(0,n,s,i),a=r
|
|
6205
6222
|
for(;a<n&&t[a].end<i+o;)a++
|
|
6206
|
-
return{startIndex:r,endIndex:a}}({measurements:e,outerSize:t,scrollOffset:i})}),{key:!1,debug:function(){return o.options.debug}}),this.maybeNotify=
|
|
6223
|
+
return{startIndex:r,endIndex:a}}({measurements:e,outerSize:t,scrollOffset:i})}),{key:!1,debug:function(){return o.options.debug}}),this.maybeNotify=yx((function(){return[].concat(Object.values(o.calculateRange()),[o.isScrolling])}),(function(){o.notify()}),{key:!1,debug:function(){return o.options.debug},initialDeps:[].concat(Object.values(this.range),[this.isScrolling])}),this.getIndexes=yx((function(){return[o.options.rangeExtractor,o.calculateRange(),o.options.overscan,o.options.count]}),(function(e,t,o,i){return e(xx({},t,{overscan:o,count:i}))}),{key:!1,debug:function(){return o.options.debug}}),this.indexFromElement=function(e){var t=o.options.indexAttribute,i=e.getAttribute(t)
|
|
6207
6224
|
return i?parseInt(i,10):(console.warn("Missing attribute name '"+t+"={index}' on measured element."),-1)},this._measureElement=function(e,t){var i,n=o.indexFromElement(e),s=o.measurementsCache[n]
|
|
6208
6225
|
if(s){var r=o.measureElementCache[s.key],a=o.getResizeObserver()
|
|
6209
6226
|
if(!e.isConnected)return null==a||a.unobserve(e),void(e===r&&delete o.measureElementCache[s.key])
|
|
6210
6227
|
if(r!==e)r&&(null==a||a.unobserve(r)),null==a||a.observe(e),o.measureElementCache[s.key]=e
|
|
6211
6228
|
else if(!t&&!r.__virtualizerSkipFirstNotSync)return void(r.__virtualizerSkipFirstNotSync=!0)
|
|
6212
6229
|
var l,c=o.options.measureElement(e,o),d=c-(null!=(i=o.itemSizeCache[s.key])?i:s.size)
|
|
6213
|
-
if(0!==d)s.start<o.scrollOffset&&o._scrollToOffset(o.scrollOffset,{adjustments:o.scrollAdjustments+=d,behavior:void 0}),o.pendingMeasuredCacheIndexes.push(n),o.itemSizeCache=
|
|
6230
|
+
if(0!==d)s.start<o.scrollOffset&&o._scrollToOffset(o.scrollOffset,{adjustments:o.scrollAdjustments+=d,behavior:void 0}),o.pendingMeasuredCacheIndexes.push(n),o.itemSizeCache=xx({},o.itemSizeCache,((l={})[s.key]=c,l)),o.notify()}},this.measureElement=function(e){e&&o._measureElement(e,!0)},this.getVirtualItems=yx((function(){return[o.getIndexes(),o.getMeasurements()]}),(function(e,t){for(var o=[],i=0,n=e.length;i<n;i++){var s=t[e[i]]
|
|
6214
6231
|
o.push(s)}return o}),{key:!1,debug:function(){return o.options.debug}}),this.getOffsetForAlignment=function(e,t){var i=o.getSize()
|
|
6215
6232
|
"auto"===t&&(t=e<=o.scrollOffset?"start":e>=o.scrollOffset+i?"end":"start"),"start"===t||("end"===t?e-=i:"center"===t&&(e-=i/2))
|
|
6216
6233
|
var n=o.options.horizontal?"scrollWidth":"scrollHeight",s=(o.scrollElement?"document"in o.scrollElement?o.scrollElement.document.documentElement[n]:o.scrollElement[n]:0)-o.getSize()
|
|
@@ -6240,25 +6257,25 @@ o.options.scrollToFn(e,{behavior:n,adjustments:i},o)},this.measure=function(){o.
|
|
|
6240
6257
|
* LICENSE.md file in the root directory of this source tree.
|
|
6241
6258
|
*
|
|
6242
6259
|
* @license MIT
|
|
6243
|
-
*/class
|
|
6260
|
+
*/class Ex{constructor(e,t){this.visibleItems=[],this.allRowsHeight=0,this.headerContainerMarginRight=0,this.rowContainerYOffset=0,this.table=e,this.tanStackTable=t,this.viewportResizeObserver=new ResizeObserver((e=>{const t=e[0]?.borderBoxSize[0]
|
|
6244
6261
|
if(t){const e=t.inlineSize
|
|
6245
6262
|
this.headerContainerMarginRight=e-this.table.viewport.clientWidth}}))}connectedCallback(){this.viewportResizeObserver.observe(this.table.viewport),this.updateVirtualizer()}disconnectedCallback(){this.viewportResizeObserver.disconnect()}dataChanged(){this.table.$fastController.isConnected&&this.updateVirtualizer()}updateVirtualizer(){const e=this.createVirtualizerOptions()
|
|
6246
|
-
this.virtualizer?this.virtualizer.setOptions(e):this.virtualizer=new
|
|
6247
|
-
return{count:this.tanStackTable.getRowModel().rows.length,getScrollElement:()=>this.table.viewport,estimateSize:t=>e,enableSmoothScroll:!0,overscan:3,scrollingDelay:5,scrollToFn:
|
|
6263
|
+
this.virtualizer?this.virtualizer.setOptions(e):this.virtualizer=new Ax(e),this.virtualizer._willUpdate(),this.handleVirtualizerChange()}createVirtualizerOptions(){const e=parseFloat(sa.getValueFor(this.table))+2*parseFloat(ca.getValueFor(this.table))
|
|
6264
|
+
return{count:this.tanStackTable.getRowModel().rows.length,getScrollElement:()=>this.table.viewport,estimateSize:t=>e,enableSmoothScroll:!0,overscan:3,scrollingDelay:5,scrollToFn:Mx,observeElementOffset:Ix,observeElementRect:Sx,onChange:()=>this.handleVirtualizerChange()}}handleVirtualizerChange(){this.notifyFocusedCellRecycling()
|
|
6248
6265
|
const e=this.virtualizer
|
|
6249
6266
|
this.visibleItems=e.getVirtualItems(),this.allRowsHeight=e.getTotalSize()
|
|
6250
6267
|
let t=0
|
|
6251
6268
|
if(this.visibleItems.length>0){t=this.visibleItems[0].start}this.rowContainerYOffset=t}notifyFocusedCellRecycling(){let e=this.table.shadowRoot.activeElement
|
|
6252
|
-
for(;null!==e&&!(e instanceof
|
|
6253
|
-
if(e instanceof
|
|
6254
|
-
case
|
|
6255
|
-
default:return
|
|
6256
|
-
return"string"==typeof i&&"string"==typeof n?i.localeCompare(n):i===n?0:void 0===i||null===i&&void 0!==n?-1:1}e([m],
|
|
6257
|
-
class
|
|
6258
|
-
return!1},
|
|
6259
|
-
return!1},
|
|
6260
|
-
class
|
|
6261
|
-
if(o){return`${Math.max(t,o)}px`}return`minmax(${t}px, ${i}fr)`})).join(" ")}}class
|
|
6269
|
+
for(;null!==e&&!(e instanceof Gw)&&e.shadowRoot;)e=e.shadowRoot.activeElement
|
|
6270
|
+
if(e instanceof Gw&&e.focusedRecycleCallback(),void 0!==this.table.openActionMenuRecordId){this.table.rowElements.find((e=>e.recordId===this.table.openActionMenuRecordId))?.closeOpenActionMenus()}}}function Ox(e){switch(e){case Zw:return Fw.basic
|
|
6271
|
+
case qw:return Fx
|
|
6272
|
+
default:return Fw.basic}}function Fx(e,t,o){const i=e.getValue(o),n=t.getValue(o)
|
|
6273
|
+
return"string"==typeof i&&"string"==typeof n?i.localeCompare(n):i===n?0:void 0===i||null===i&&void 0!==n?-1:1}e([m],Ex.prototype,"visibleItems",void 0),e([m],Ex.prototype,"allRowsHeight",void 0),e([m],Ex.prototype,"headerContainerMarginRight",void 0),e([m],Ex.prototype,"rowContainerYOffset",void 0)
|
|
6274
|
+
class Vx{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,o)=>({...t,[o]:e})),this.trackedItems)}}class Hx extends Vx{}const Px=(e,...t)=>{for(const o of t)if(e===o)return!0
|
|
6275
|
+
return!1},Tx=(e,...t)=>{for(const o of t)if(e===o)return!0
|
|
6276
|
+
return!1},Dx=["rowIds","groupRows","columnIds","columnSort","columnWidths","columnDefinition","actionMenuSlots","selectionMode"]
|
|
6277
|
+
class Lx extends Hx{constructor(e){super(Dx),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){Px(e,"columnId")?this.track("columnIds"):Tx(e,"operandDataRecordFieldName","sortOperation")?this.track("columnDefinition"):Px(e,"sortingDisabled")||Tx(e,"currentSortDirection","currentSortIndex")?this.track("columnSort"):Px(e,"columnHidden")||Tx(e,"currentFractionalWidth","currentPixelWidth","minPixelWidth")?this.track("columnWidths"):Px(e,"actionMenuSlot")?this.track("actionMenuSlots"):Tx(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 zx{static getGridTemplateColumns(e){return e?.filter((e=>!e.columnHidden)).map((e=>{const{minPixelWidth:t,currentPixelWidth:o,currentFractionalWidth:i}=e.columnInternals
|
|
6278
|
+
if(o){return`${Math.max(t,o)}px`}return`minmax(${t}px, ${i}fr)`})).join(" ")}}class Bx{constructor(e){this.tanStackTable=e}reset(){}toggleIsRowSelected(e,t){e.isGrouped&&e.selectionState===Bw?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")
|
|
6262
6279
|
const t=this.tanStackTable.getState().rowSelection,o=[]
|
|
6263
6280
|
if(Object.entries(t).forEach((([e,t])=>{t&&o.push(e)})),1===o.length&&o[0]===e.id)return!1
|
|
6264
6281
|
const i={}
|
|
@@ -6268,7 +6285,7 @@ this.tanStackTable.setRowSelection(i)}getAllLeafRowIds(e){const t=this.tanStackT
|
|
|
6268
6285
|
return t?.getIsGrouped()?t.getLeafRows().filter((e=>0===e.getLeafRows().length)).map((e=>e.id)):[]}getAllOrderedRows(){const e=this.tanStackTable.getPreExpandedRowModel().rows
|
|
6269
6286
|
return this.getOrderedRows(e)}getOrderedRows(e){const t=[]
|
|
6270
6287
|
for(const o of e)t.push(o),o.subRows?.length&&t.push(...this.getOrderedRows(o.subRows))
|
|
6271
|
-
return t}}class
|
|
6288
|
+
return t}}class Nx extends Bx{handleRowSelectionToggle(e,t,o){return!1}handleRowClick(e,t,o){return!1}handleActionMenuOpening(e){return!1}}class Zx extends Bx{handleRowSelectionToggle(e,t,o){return o&&this.tryUpdateRangeSelection(e.id)||(this.shiftSelectStartRowId=e.id,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(e,t)),!0}handleRowClick(e,t,o){return o?(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!==Bw&&this.selectSingleRow(e)}reset(){this.shiftSelectStartRowId=void 0,this.previousShiftSelectRowEndId=void 0}tryUpdateRangeSelection(e){if(void 0===this.shiftSelectStartRowId)return!1
|
|
6272
6289
|
const t=this.getAllOrderedRows(),o=this.getRowIndexForId(this.shiftSelectStartRowId,t)
|
|
6273
6290
|
if(-1===o)return!1
|
|
6274
6291
|
const i=this.tanStackTable.getState().rowSelection
|
|
@@ -6278,20 +6295,20 @@ this.updateSelectionStateForRange(e,o,n,i,!0)}updateSelectionStateForRange(e,t,o
|
|
|
6278
6295
|
const s=Math.min(t,o),r=Math.max(t,o)
|
|
6279
6296
|
for(let t=s;t<=r;t++){const o=i[t]
|
|
6280
6297
|
o.getIsGrouped()||this.updateSelectionStateForRow(e,o.id,n)}const a=i[o]
|
|
6281
|
-
a.getIsGrouped()&&this.getAllLeafRowIds(a.id).forEach((t=>this.updateSelectionStateForRow(e,t,n)))}updateSelectionStateForRow(e,t,o){o?e[t]=!0:delete e[t]}getRowIndexForId(e,t){return e?t.findIndex((t=>t.id===e)):-1}}class
|
|
6282
|
-
case
|
|
6283
|
-
case
|
|
6284
|
-
default:throw new Error("unknown selection mode found")}}}class
|
|
6298
|
+
a.getIsGrouped()&&this.getAllLeafRowIds(a.id).forEach((t=>this.updateSelectionStateForRow(e,t,n)))}updateSelectionStateForRow(e,t,o){o?e[t]=!0:delete e[t]}getRowIndexForId(e,t){return e?t.findIndex((t=>t.id===e)):-1}}class qx extends Bx{handleRowSelectionToggle(e,t,o){return this.toggleIsRowSelected(e,t),!0}handleRowClick(e,t,o){return this.selectSingleRow(e)}handleActionMenuOpening(e){return this.handleRowClick(e,!1,!1)}}class jx{constructor(e,t){this.tanStackTable=e,this.selectionManager=this.createSelectionManager(t)}handleRowSelectionToggle(e,t,o){return!!e&&this.selectionManager.handleRowSelectionToggle(e,t,o)}handleRowClick(e,t,o){return!!e&&this.selectionManager.handleRowClick(e,t,o)}handleActionMenuOpening(e){return!!e&&this.selectionManager.handleActionMenuOpening(e)}handleSelectionModeChanged(e){this.selectionManager=this.createSelectionManager(e)}handleSelectionReset(){this.selectionManager.reset()}createSelectionManager(e){switch(e){case Lw.multiple:return new Zx(this.tanStackTable)
|
|
6299
|
+
case Lw.single:return new qx(this.tanStackTable)
|
|
6300
|
+
case Lw.none:return new Nx(this.tanStackTable)
|
|
6301
|
+
default:throw new Error("unknown selection mode found")}}}class Ux extends Rt{constructor(){super(),this.selectionMode=Lw.none,this.tableData=[],this.columns=[],this.childItems=[],this.rowElements=[],this.actionMenuSlots=[],this.canRenderRows=!0,this.scrollX=0,this.selectionState=zw,this.showCollapseAll=!1,this.documentShiftKeyDown=!1,this.tableValidator=new Yw,this.tableUpdateTracker=new Lx(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===Or&&(this.documentShiftKeyDown=!0)},this.onKeyUp=e=>{e.key===Or&&(this.documentShiftKeyDown=!1)},this.getIsRowExpanded=e=>{if(!e.getIsGrouped())return!1
|
|
6285
6302
|
const t=this.table.options.state.expanded
|
|
6286
6303
|
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
|
|
6287
6304
|
this.updateTableOptions({state:{rowSelection:t}})},this.handleExpandedChange=e=>{const t=e instanceof Function?e(this.table.getState().expanded):e
|
|
6288
|
-
this.updateTableOptions({state:{expanded:t}})},this.options={data:[],onStateChange:e=>{},onRowSelectionChange:this.handleRowSelectionChange,onExpandedChange:this.handleExpandedChange,getCoreRowModel:e=>
|
|
6305
|
+
this.updateTableOptions({state:{expanded:t}})},this.options={data:[],onStateChange:e=>{},onRowSelectionChange:this.handleRowSelectionChange,onExpandedChange:this.handleExpandedChange,getCoreRowModel:e=>tw((()=>[e.options.data]),(t=>{const o={rows:[],flatRows:[],rowsById:{}},i=function(t,n,s){void 0===n&&(n=0)
|
|
6289
6306
|
const r=[]
|
|
6290
|
-
for(let l=0;l<t.length;l++){const c=
|
|
6307
|
+
for(let l=0;l<t.length;l++){const c=Pw(e,e._getRowId(t[l],l,s),t[l],l,n)
|
|
6291
6308
|
var a
|
|
6292
6309
|
o.flatRows.push(c),o.rowsById[c.id]=c,r.push(c),e.options.getSubRows&&(c.originalSubRows=e.options.getSubRows(t[l],l),null!=(a=c.originalSubRows)&&a.length&&(c.subRows=i(c.originalSubRows,n+1,c)))}return r}
|
|
6293
6310
|
return o.rows=i(t),o}),{key:!1,debug:()=>{var t
|
|
6294
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getSortedRowModel:e=>
|
|
6311
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getSortedRowModel:e=>tw((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,o)=>{if(!o.rows.length||null==t||!t.length)return o
|
|
6295
6312
|
const i=e.getState().sorting,n=[],s=i.filter((t=>{var o
|
|
6296
6313
|
return null==(o=e.getColumn(t.id))?void 0:o.getCanSort()})),r={}
|
|
6297
6314
|
s.forEach((t=>{const o=e.getColumn(t.id)
|
|
@@ -6304,57 +6321,57 @@ if(o||i)return o&&i?0:o?a.sortUndefined:-a.sortUndefined}let c=a.sortingFn(e,t,n
|
|
|
6304
6321
|
if(0!==c)return l&&(c*=-1),a.invertSorting&&(c*=-1),c}return e.index-t.index})),t.forEach((e=>{var t
|
|
6305
6322
|
n.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=a(e.subRows))})),t}
|
|
6306
6323
|
return{rows:a(o.rows),flatRows:n,rowsById:o.rowsById}}),{key:!1,debug:()=>{var t
|
|
6307
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getGroupedRowModel:
|
|
6324
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getGroupedRowModel:Tw(),getExpandedRowModel:e=>tw((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,o)=>!t.rows.length||!0!==e&&!Object.keys(null!=e?e:{}).length?t:o?function(e){const t=[],o=e=>{var i
|
|
6308
6325
|
t.push(e),null!=(i=e.subRows)&&i.length&&e.getIsExpanded()&&e.subRows.forEach(o)}
|
|
6309
6326
|
return e.rows.forEach(o),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}(t):t),{key:!1,debug:()=>{var t
|
|
6310
|
-
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=
|
|
6327
|
+
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=Hw(this.options),this.virtualizer=new Ex(this,this.table),this.selectionManager=new jx(this.table,this.selectionMode)}get validity(){return this.tableValidator.getValidity()}async setData(e){await this.processPendingUpdates()
|
|
6311
6328
|
const t=e.map((e=>({...e}))),o={data:t}
|
|
6312
6329
|
if(this.validateWithData(t),this.tableValidator.areRecordIdsValid()){const e=await this.getSelectedRecordIds()
|
|
6313
6330
|
o.state={rowSelection:this.calculateTanStackSelectionState(e)}}this.updateTableOptions(o)}async getSelectedRecordIds(){await this.processPendingUpdates()
|
|
6314
6331
|
const e=this.options.state.rowSelection
|
|
6315
6332
|
if(!e)return[]
|
|
6316
6333
|
const t=[]
|
|
6317
|
-
return Object.entries(e).forEach((([e,o])=>{o&&t.push(e)})),t}async setSelectedRecordIds(e){await this.processPendingUpdates(),this.selectionMode!==
|
|
6334
|
+
return Object.entries(e).forEach((([e,o])=>{o&&t.push(e)})),t}async setSelectedRecordIds(e){await this.processPendingUpdates(),this.selectionMode!==Lw.none&&this.updateTableOptions({state:{rowSelection:this.calculateTanStackSelectionState(e)}})}connectedCallback(){super.connectedCallback(),this.initialize(),this.virtualizer.connectedCallback(),this.viewport.addEventListener("scroll",this.onViewPortScroll,{passive:!0}),document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp)}disconnectedCallback(){super.disconnectedCallback(),this.virtualizer.disconnectedCallback(),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 Xw||e instanceof Kw)&&"string"==typeof t&&("validConfiguration"===t?this.tableValidator.validateColumnConfigurations(this.columns):this.tableUpdateTracker.trackColumnPropertyChanged(t))}onRowSelectionToggle(e,t){t.stopImmediatePropagation()
|
|
6318
6335
|
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)}handleGroupRowExpanded(e,t){this.toggleGroupExpanded(e),t.stopPropagation()}toggleColumnSort(e,t){if(e.sortingDisabled)return
|
|
6319
6336
|
const o=this.getColumnsParticipatingInSorting().sort(((e,t)=>e.columnInternals.currentSortIndex-t.columnInternals.currentSortIndex)),i=o.indexOf(e),n=i>-1,s=e.columnInternals.currentSortDirection
|
|
6320
|
-
let r=
|
|
6321
|
-
n?s===
|
|
6337
|
+
let r=Dw.ascending
|
|
6338
|
+
n?s===Dw.descending?(o.splice(i,1),r=Dw.none,e.columnInternals.currentSortIndex=void 0):r=Dw.descending:o.push(e),e.columnInternals.currentSortDirection=r
|
|
6322
6339
|
for(let i=0;i<o.length;i++){const n=o[i]
|
|
6323
|
-
t?o[i].columnInternals.currentSortIndex=i:n===e?n.columnInternals.currentSortIndex=0:(n.columnInternals.currentSortIndex=void 0,n.columnInternals.currentSortDirection=
|
|
6324
|
-
case
|
|
6340
|
+
t?o[i].columnInternals.currentSortIndex=i:n===e?n.columnInternals.currentSortIndex=0:(n.columnInternals.currentSortIndex=void 0,n.columnInternals.currentSortDirection=Dw.none)}this.emitColumnConfigurationChangeEvent()}update(){this.validate(),this.tableUpdateTracker.requiresTanStackUpdate&&this.updateTanStack(),this.tableUpdateTracker.updateActionMenuSlots&&this.updateActionMenuSlots(),this.tableUpdateTracker.updateColumnWidths&&this.updateRowGridColumns(),this.tableUpdateTracker.updateGroupRows&&(this.showCollapseAll=this.getColumnsParticipatingInGrouping().length>0)}get ariaMultiSelectable(){switch(this.selectionMode){case Lw.multiple:return"true"
|
|
6341
|
+
case Lw.single:return"false"
|
|
6325
6342
|
default:return null}}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]
|
|
6326
6343
|
const o=await this.getActionMenuToggleEventDetail(t)
|
|
6327
6344
|
this.$emit("action-menu-beforetoggle",o)}async handleRowActionMenuToggleEvent(e){const t=await this.getActionMenuToggleEventDetail(e)
|
|
6328
|
-
this.$emit("action-menu-toggle",t),e.detail.newState||(this.openActionMenuRecordId=void 0)}async getActionMenuToggleEventDetail(e){const t=this.selectionMode===
|
|
6345
|
+
this.$emit("action-menu-toggle",t),e.detail.newState||(this.openActionMenuRecordId=void 0)}async getActionMenuToggleEventDetail(e){const t=this.selectionMode===Lw.multiple?await this.getSelectedRecordIds():[this.openActionMenuRecordId]
|
|
6329
6346
|
return{...e.detail,recordIds:t}}removeColumnObservers(){this.columnNotifiers.forEach((e=>{e.unsubscribe(this)})),this.columnNotifiers=[]}initialize(){this.isInitialized||(this.isInitialized=!0,this.$fastController.onConnectedCallback(),this.tableUpdateTracker.trackAllStateChanged(),this.observeColumns())}async processPendingUpdates(){if(this.initialize(),await u.nextUpdate(),this.tableUpdateTracker.hasPendingUpdates)throw new Error("Expected pending updates to be resolved")}observeColumns(){this.removeColumnObservers()
|
|
6330
6347
|
for(const e of this.columns){const t=v.getNotifier(e)
|
|
6331
6348
|
t.subscribe(this),this.columnNotifiers.push(t)
|
|
6332
|
-
v.getNotifier(e.columnInternals).subscribe(this),this.columnNotifiers.push(t)}}getColumnsParticipatingInSorting(){return this.columns.filter((e=>!e.sortingDisabled&&e.columnInternals.currentSortDirection!==
|
|
6333
|
-
await Promise.all(e),this.columns=this.childItems.filter((e=>e instanceof
|
|
6334
|
-
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===
|
|
6349
|
+
v.getNotifier(e.columnInternals).subscribe(this),this.columnNotifiers.push(t)}}getColumnsParticipatingInSorting(){return this.columns.filter((e=>!e.sortingDisabled&&e.columnInternals.currentSortDirection!==Dw.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(){const e=this.childItems.map((async e=>e.matches(":not(:defined)")?customElements.whenDefined(e.localName):Promise.resolve()))
|
|
6350
|
+
await Promise.all(e),this.columns=this.childItems.filter((e=>e instanceof Xw))}updateTanStack(){const e={state:{}}
|
|
6351
|
+
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===Lw.multiple,e.enableSubRowSelection=this.selectionMode===Lw.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
|
|
6335
6352
|
for(const t of this.columns)t.actionMenuSlot&&e.add(t.actionMenuSlot)
|
|
6336
|
-
this.actionMenuSlots=Array.from(e)}updateRowGridColumns(){this.rowGridColumns=
|
|
6353
|
+
this.actionMenuSlots=Array.from(e)}updateRowGridColumns(){this.rowGridColumns=zx.getGridTemplateColumns(this.columns)}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})))}
|
|
6337
6354
|
this.$emit("column-configuration-change",e)}async emitSelectionChangeEvent(){const e={selectedRecordIds:await this.getSelectedRecordIds()}
|
|
6338
|
-
this.$emit("selection-change",e)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===
|
|
6355
|
+
this.$emit("selection-change",e)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===Bw,this.selectionCheckbox.indeterminate=this.selectionState===Nw,this.ignoreSelectionChangeEvents=!1)}refreshRows(){this.selectionState=this.getTableSelectionState()
|
|
6339
6356
|
const e=this.table.getRowModel().rows
|
|
6340
|
-
this.tableData=e.map((e=>({record:e.original,id:e.id,selectionState:this.getRowSelectionState(e),isGrouped:e.getIsGrouped(),isExpanded:e.getIsExpanded(),groupRowValue:e.getIsGrouped()?e.getValue(e.groupingColumnId):void 0,nestingLevel:e.depth,leafItemCount:e.getLeafRows().filter((e=>0===e.getLeafRows().length)).length,groupColumn:this.getGroupRowColumn(e)}))),this.virtualizer.dataChanged()}getTableSelectionState(){return this.table.getIsAllRowsSelected()?
|
|
6357
|
+
this.tableData=e.map((e=>({record:e.original,id:e.id,selectionState:this.getRowSelectionState(e),isGrouped:e.getIsGrouped(),isExpanded:e.getIsExpanded(),groupRowValue:e.getIsGrouped()?e.getValue(e.groupingColumnId):void 0,nestingLevel:e.depth,leafItemCount:e.getLeafRows().filter((e=>0===e.getLeafRows().length)).length,groupColumn:this.getGroupRowColumn(e)}))),this.virtualizer.dataChanged()}getTableSelectionState(){return this.table.getIsAllRowsSelected()?Bw:this.table.getIsSomeRowsSelected()?Nw:zw}getRowSelectionState(e){return e.getIsGrouped()?this.getGroupedRowSelectionState(e):e.getIsSelected()?Bw:zw}getGroupedRowSelectionState(e){const t=e.subRows??[]
|
|
6341
6358
|
let o=!1,i=!1
|
|
6342
|
-
for(const e of t){if(e.getIsGrouped()){switch(this.getGroupedRowSelectionState(e)){case
|
|
6359
|
+
for(const e of t){if(e.getIsGrouped()){switch(this.getGroupedRowSelectionState(e)){case zw:i=!0
|
|
6343
6360
|
break
|
|
6344
|
-
case
|
|
6361
|
+
case Bw:o=!0
|
|
6345
6362
|
break
|
|
6346
|
-
default:return
|
|
6347
|
-
if(o&&i)return
|
|
6363
|
+
default:return Nw}}else e.getIsSelected()?o=!0:i=!0
|
|
6364
|
+
if(o&&i)return Nw}return o?Bw:zw}getGroupRowColumn(e){const t=e.groupingColumnId
|
|
6348
6365
|
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]
|
|
6349
6366
|
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))
|
|
6350
|
-
return this.firstSortedColumn=e.length?e[0]:void 0,e.map((e=>({id:e.columnInternals.uniqueId,desc:e.columnInternals.currentSortDirection===
|
|
6351
|
-
if("string"==typeof o)return t[o]},sortingFn:
|
|
6367
|
+
return this.firstSortedColumn=e.length?e[0]:void 0,e.map((e=>({id:e.columnInternals.uniqueId,desc:e.columnInternals.currentSortDirection===Dw.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[this.idFieldName]}calculateTanStackColumns(){return this.columns.map((e=>({id:e.columnInternals.uniqueId,accessorFn:t=>{const o=e.columnInternals.operandDataRecordFieldName
|
|
6368
|
+
if("string"==typeof o)return t[o]},sortingFn:Ox(e.columnInternals.sortOperation)})))}calculateTanStackSelectionState(e){if(this.selectionMode===Lw.none)return{}
|
|
6352
6369
|
const t={},o=this.tableValidator.getPresentRecordIds(e)
|
|
6353
|
-
for(const e of o)if(t[e]=!0,this.selectionMode===
|
|
6354
|
-
return t}}e([ne({attribute:"id-field-name"})],
|
|
6355
|
-
const Ux
|
|
6356
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
6357
|
-
const
|
|
6370
|
+
for(const e of o)if(t[e]=!0,this.selectionMode===Lw.single)break
|
|
6371
|
+
return t}}e([ne({attribute:"id-field-name"})],Ux.prototype,"idFieldName",void 0),e([ne({attribute:"selection-mode"})],Ux.prototype,"selectionMode",void 0),e([m],Ux.prototype,"tableData",void 0),e([m],Ux.prototype,"columns",void 0),e([m],Ux.prototype,"childItems",void 0),e([m],Ux.prototype,"rowElements",void 0),e([m],Ux.prototype,"actionMenuSlots",void 0),e([m],Ux.prototype,"openActionMenuRecordId",void 0),e([m],Ux.prototype,"canRenderRows",void 0),e([m],Ux.prototype,"scrollX",void 0),e([m],Ux.prototype,"rowGridColumns",void 0),e([m],Ux.prototype,"selectionState",void 0),e([m],Ux.prototype,"selectionCheckbox",void 0),e([m],Ux.prototype,"showCollapseAll",void 0),e([m],Ux.prototype,"firstSortedColumn",void 0),e([m],Ux.prototype,"documentShiftKeyDown",void 0)
|
|
6372
|
+
const Gx=Ux.compose({baseName:"table",template:wx,styles:Qw})
|
|
6373
|
+
ai.getOrCreate().withPrefix("nimble").register(Gx()),ai.tagFor(Ux)
|
|
6374
|
+
const Wx=fe`
|
|
6358
6375
|
:host {
|
|
6359
6376
|
display: contents;
|
|
6360
6377
|
}
|
|
@@ -6365,11 +6382,11 @@ const Gx=fe`
|
|
|
6365
6382
|
text-overflow: ellipsis;
|
|
6366
6383
|
}
|
|
6367
6384
|
`
|
|
6368
|
-
class
|
|
6369
|
-
this.setSourceValue(e)},this.mouseOutHandler=()=>{this.setSourceValue(!1)},this.target.addEventListener("mouseover",this.mouseOverHandler),this.target.addEventListener("mouseout",this.mouseOutHandler)}unbind(){this.source=void 0,this.target.removeEventListener("mouseover",this.mouseOverHandler),this.target.removeEventListener("mouseout",this.mouseOutHandler)}setSourceValue(e){this.source[this.propertyName]=e}}function
|
|
6385
|
+
class Kx{constructor(e,t){this.target=e,this.propertyName=t}bind(e){this.source=e,this.setSourceValue(!1),this.mouseOverHandler=()=>{const e=this.target.offsetWidth<this.target.scrollWidth
|
|
6386
|
+
this.setSourceValue(e)},this.mouseOutHandler=()=>{this.setSourceValue(!1)},this.target.addEventListener("mouseover",this.mouseOverHandler),this.target.addEventListener("mouseout",this.mouseOutHandler)}unbind(){this.source=void 0,this.target.removeEventListener("mouseover",this.mouseOverHandler),this.target.removeEventListener("mouseout",this.mouseOutHandler)}setSourceValue(e){this.source[this.propertyName]=e}}function Xx(e){return new C("nimble-overflow",Kx,e)}const Yx=G`
|
|
6370
6387
|
<template slot="${e=>e.columnInternals.uniqueId}">
|
|
6371
6388
|
<span
|
|
6372
|
-
${
|
|
6389
|
+
${Xx("hasOverflow")}
|
|
6373
6390
|
class="header-content"
|
|
6374
6391
|
title=${e=>e.hasOverflow&&e.headerTextContent?e.headerTextContent:null}
|
|
6375
6392
|
>
|
|
@@ -6377,7 +6394,7 @@ this.setSourceValue(e)},this.mouseOutHandler=()=>{this.setSourceValue(!1)},this.
|
|
|
6377
6394
|
</span>
|
|
6378
6395
|
</template>
|
|
6379
6396
|
`
|
|
6380
|
-
function
|
|
6397
|
+
function Qx(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 ne({attribute:"fractional-width",converter:oe})(t.prototype,"fractionalWidth"),ne({attribute:"min-pixel-width",converter:oe})(t.prototype,"minPixelWidth"),t}function Jx(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 ne({attribute:"grouping-disabled",mode:"boolean"})(t.prototype,"groupingDisabled"),ne({attribute:"group-index",converter:oe})(t.prototype,"groupIndex"),t}const ey=fe`
|
|
6381
6398
|
:host {
|
|
6382
6399
|
width: fit-content;
|
|
6383
6400
|
max-width: 100%;
|
|
@@ -6402,14 +6419,14 @@ function Yx(e){class t extends e{fractionalWidthChanged(){"number"==typeof this.
|
|
|
6402
6419
|
.placeholder {
|
|
6403
6420
|
color: ${Nl};
|
|
6404
6421
|
}
|
|
6405
|
-
`,
|
|
6422
|
+
`,ty=G`
|
|
6406
6423
|
<template
|
|
6407
6424
|
@click="${(e,t)=>("string"==typeof e.cellRecord.href&&t.event.stopPropagation(),!0)}"
|
|
6408
6425
|
>
|
|
6409
6426
|
${Me((e=>"string"==typeof e.cellRecord.href),G`
|
|
6410
6427
|
<${Bc}
|
|
6411
6428
|
${Re("anchor")}
|
|
6412
|
-
${
|
|
6429
|
+
${Xx("hasOverflow")}
|
|
6413
6430
|
href="${e=>e.cellRecord.href}"
|
|
6414
6431
|
hreflang="${e=>e.columnConfig.hreflang}"
|
|
6415
6432
|
ping="${e=>e.columnConfig.ping}"
|
|
@@ -6426,7 +6443,7 @@ function Yx(e){class t extends e{fractionalWidthChanged(){"number"==typeof this.
|
|
|
6426
6443
|
</${Bc}>`)}
|
|
6427
6444
|
${Me((e=>"string"!=typeof e.cellRecord.href),G`
|
|
6428
6445
|
<span
|
|
6429
|
-
${
|
|
6446
|
+
${Xx("hasOverflow")}
|
|
6430
6447
|
class="${e=>"string"==typeof e.cellRecord.label?"":"placeholder"}"
|
|
6431
6448
|
title=${e=>e.hasOverflow&&e.content?e.content:null}
|
|
6432
6449
|
>
|
|
@@ -6434,20 +6451,20 @@ function Yx(e){class t extends e{fractionalWidthChanged(){"number"==typeof this.
|
|
|
6434
6451
|
</span>`)}
|
|
6435
6452
|
</template>
|
|
6436
6453
|
`
|
|
6437
|
-
class
|
|
6438
|
-
const oy
|
|
6439
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
6440
|
-
const
|
|
6441
|
-
class
|
|
6442
|
-
const
|
|
6454
|
+
class oy extends Gw{constructor(){super(...arguments),this.hasOverflow=!1}get content(){return"string"==typeof this.cellRecord.label?this.cellRecord.label:"string"==typeof this.cellRecord.href?this.cellRecord.href:this.columnConfig.placeholder}focusedRecycleCallback(){this.anchor?.blur()}}e([m],oy.prototype,"hasOverflow",void 0),e([f],oy.prototype,"content",null)
|
|
6455
|
+
const iy=oy.compose({baseName:"table-column-anchor-cell-view",template:ty,styles:ey})
|
|
6456
|
+
ai.getOrCreate().withPrefix("nimble").register(iy())
|
|
6457
|
+
const ny=ai.tagFor(oy)
|
|
6458
|
+
class sy extends jw{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.placeholder="",this.shouldUsePlaceholder=!0}get content(){return this.shouldUsePlaceholder?this.placeholder:this.text}}e([m],sy.prototype,"hasOverflow",void 0),e([m],sy.prototype,"text",void 0),e([m],sy.prototype,"placeholder",void 0),e([m],sy.prototype,"shouldUsePlaceholder",void 0),e([f],sy.prototype,"content",null)
|
|
6459
|
+
const ry=G`
|
|
6443
6460
|
<span
|
|
6444
|
-
${
|
|
6461
|
+
${Xx("hasOverflow")}
|
|
6445
6462
|
class="${e=>e.shouldUsePlaceholder?"placeholder":""}"
|
|
6446
6463
|
title="${e=>e.hasOverflow&&e.content?e.content:void 0}"
|
|
6447
6464
|
>
|
|
6448
6465
|
${e=>e.content}
|
|
6449
6466
|
</span>
|
|
6450
|
-
`,
|
|
6467
|
+
`,ay=fe`
|
|
6451
6468
|
span {
|
|
6452
6469
|
font: ${Sl};
|
|
6453
6470
|
color: ${_l};
|
|
@@ -6460,22 +6477,22 @@ const sy=G`
|
|
|
6460
6477
|
color: ${Nl};
|
|
6461
6478
|
}
|
|
6462
6479
|
`
|
|
6463
|
-
class
|
|
6464
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
6465
|
-
const
|
|
6466
|
-
class
|
|
6467
|
-
const hy
|
|
6468
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
6469
|
-
class
|
|
6470
|
-
const
|
|
6480
|
+
class ly extends sy{columnConfigChanged(){this.placeholder=this.columnConfig?.placeholder??""}groupHeaderValueChanged(){"string"==typeof this.groupHeaderValue?(this.text=this.groupHeaderValue,this.shouldUsePlaceholder=!1):(this.text="",this.shouldUsePlaceholder=!0)}}const cy=ly.compose({baseName:"table-column-text-group-header",template:ry,styles:ay})
|
|
6481
|
+
ai.getOrCreate().withPrefix("nimble").register(cy())
|
|
6482
|
+
const dy=ai.tagFor(ly)
|
|
6483
|
+
class hy extends(Jx(Qx(Xw))){constructor(){super(...arguments),this.underlineHidden=!1}getColumnInternalsOptions(){return{cellRecordFieldNames:["label","href"],cellViewTag:ny,groupHeaderViewTag:dy,delegatedEvents:["click"],sortOperation:qw}}labelFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName],this.columnInternals.operandDataRecordFieldName=this.labelFieldName}hrefFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName]}placeholderChanged(){this.updateColumnConfig()}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={placeholder:this.placeholder??"",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([ne({attribute:"label-field-name"})],hy.prototype,"labelFieldName",void 0),e([ne({attribute:"href-field-name"})],hy.prototype,"hrefFieldName",void 0),e([ne],hy.prototype,"placeholder",void 0),e([ne],hy.prototype,"appearance",void 0),e([ne({attribute:"underline-hidden",mode:"boolean"})],hy.prototype,"underlineHidden",void 0),e([ne],hy.prototype,"hreflang",void 0),e([ne],hy.prototype,"ping",void 0),e([ne],hy.prototype,"referrerpolicy",void 0),e([ne],hy.prototype,"rel",void 0),e([ne],hy.prototype,"target",void 0),e([ne],hy.prototype,"type",void 0),e([ne],hy.prototype,"download",void 0)
|
|
6484
|
+
const uy=hy.compose({baseName:"table-column-anchor",template:Yx,styles:Wx})
|
|
6485
|
+
ai.getOrCreate().withPrefix("nimble").register(uy()),ai.tagFor(hy)
|
|
6486
|
+
class py extends(Jx(Qx(Xw))){fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}placeholderChanged(){this.columnInternals.columnConfig={placeholder:this.placeholder??""}}}e([ne({attribute:"field-name"})],py.prototype,"fieldName",void 0),e([ne],py.prototype,"placeholder",void 0)
|
|
6487
|
+
const gy=G`
|
|
6471
6488
|
<span
|
|
6472
|
-
${
|
|
6489
|
+
${Xx("hasOverflow")}
|
|
6473
6490
|
class="${e=>e.shouldUsePlaceholder?"placeholder":""}"
|
|
6474
6491
|
title=${e=>e.hasOverflow&&e.content?e.content:null}
|
|
6475
6492
|
>
|
|
6476
6493
|
${e=>e.content}
|
|
6477
6494
|
</span>
|
|
6478
|
-
`,
|
|
6495
|
+
`,vy=fe`
|
|
6479
6496
|
span {
|
|
6480
6497
|
font: ${Sl};
|
|
6481
6498
|
color: ${_l};
|
|
@@ -6488,13 +6505,13 @@ const py=G`
|
|
|
6488
6505
|
color: ${Nl};
|
|
6489
6506
|
}
|
|
6490
6507
|
`
|
|
6491
|
-
class
|
|
6492
|
-
class
|
|
6493
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
6494
|
-
const
|
|
6495
|
-
class
|
|
6496
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
6497
|
-
const
|
|
6508
|
+
class my extends Gw{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.placeholder="",this.shouldUsePlaceholder=!0}get content(){return this.shouldUsePlaceholder?this.placeholder:this.text}}e([m],my.prototype,"hasOverflow",void 0),e([m],my.prototype,"text",void 0),e([m],my.prototype,"placeholder",void 0),e([m],my.prototype,"shouldUsePlaceholder",void 0),e([f],my.prototype,"content",null)
|
|
6509
|
+
class fy extends my{columnConfigChanged(){this.placeholder=this.columnConfig.placeholder}cellRecordChanged(){"string"==typeof this.cellRecord.value?(this.text=this.cellRecord.value,this.shouldUsePlaceholder=!1):(this.text="",this.shouldUsePlaceholder=!0)}}const by=fy.compose({baseName:"table-column-text-cell-view",template:gy,styles:vy})
|
|
6510
|
+
ai.getOrCreate().withPrefix("nimble").register(by())
|
|
6511
|
+
const wy=ai.tagFor(fy)
|
|
6512
|
+
class xy extends py{getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:wy,groupHeaderViewTag:dy,delegatedEvents:[],sortOperation:qw}}}const yy=xy.compose({baseName:"table-column-text",template:Yx,styles:Wx})
|
|
6513
|
+
ai.getOrCreate().withPrefix("nimble").register(yy()),ai.tagFor(xy)
|
|
6514
|
+
const $y=fe`
|
|
6498
6515
|
${xn("grid")}
|
|
6499
6516
|
|
|
6500
6517
|
:host {
|
|
@@ -6522,7 +6539,7 @@ const yy=fe`
|
|
|
6522
6539
|
overflow: auto;
|
|
6523
6540
|
}
|
|
6524
6541
|
`
|
|
6525
|
-
class
|
|
6542
|
+
class Cy extends Gi{constructor(){super(),this.activeindicator=!1}}const ky=Cy.compose({baseName:"tabs",baseClass:Gi,template:(e,t)=>G`
|
|
6526
6543
|
<template class="${e=>e.orientation}">
|
|
6527
6544
|
${qe(0,t)}
|
|
6528
6545
|
<div class="tablist" part="tablist" role="tablist">
|
|
@@ -6541,9 +6558,9 @@ class $y extends Gi{constructor(){super(),this.activeindicator=!1}}const Cy=$y.c
|
|
|
6541
6558
|
<slot name="tabpanel" part="tabpanel" ${Le("tabpanels")}></slot>
|
|
6542
6559
|
</div>
|
|
6543
6560
|
</template>
|
|
6544
|
-
`,styles
|
|
6545
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
6546
|
-
const
|
|
6561
|
+
`,styles:$y})
|
|
6562
|
+
ai.getOrCreate().withPrefix("nimble").register(ky()),ai.tagFor(Cy)
|
|
6563
|
+
const Sy=fe`
|
|
6547
6564
|
${xn("flex")}
|
|
6548
6565
|
|
|
6549
6566
|
:host {
|
|
@@ -6561,15 +6578,15 @@ const ky=fe`
|
|
|
6561
6578
|
rgba(${Xr}, 0.3);
|
|
6562
6579
|
margin: calc(${la} / 4) calc(${la} / 2);
|
|
6563
6580
|
}
|
|
6564
|
-
`,
|
|
6581
|
+
`,_y=G`
|
|
6565
6582
|
<template slot="end">
|
|
6566
6583
|
<div class="separator"></div>
|
|
6567
6584
|
<slot></slot>
|
|
6568
6585
|
</template>
|
|
6569
6586
|
`
|
|
6570
|
-
class
|
|
6571
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
6572
|
-
const
|
|
6587
|
+
class Iy extends Rt{}const Ry=Iy.compose({baseName:"tabs-toolbar",template:_y,styles:Sy})
|
|
6588
|
+
ai.getOrCreate().withPrefix("nimble").register(Ry()),ai.tagFor(Iy)
|
|
6589
|
+
const My="outline",Ay="block",Ey=fe`
|
|
6573
6590
|
${xn("inline-flex")}
|
|
6574
6591
|
${bg}
|
|
6575
6592
|
|
|
@@ -6709,12 +6726,12 @@ const Ry="outline",My="block",Ay=fe`
|
|
|
6709
6726
|
top: calc(${la} / 2);
|
|
6710
6727
|
right: var(--ni-private-scrollbar-width);
|
|
6711
6728
|
}
|
|
6712
|
-
`.withBehaviors(Uc(
|
|
6729
|
+
`.withBehaviors(Uc(My,fe`
|
|
6713
6730
|
.control {
|
|
6714
6731
|
border-color: rgba(${Xr}, 0.3);
|
|
6715
6732
|
background-color: transparent;
|
|
6716
6733
|
}
|
|
6717
|
-
`),Uc(
|
|
6734
|
+
`),Uc(Ay,fe`
|
|
6718
6735
|
.control {
|
|
6719
6736
|
background-color: rgba(${Xr}, 0.1);
|
|
6720
6737
|
}
|
|
@@ -6732,8 +6749,8 @@ const Ry="outline",My="block",Ay=fe`
|
|
|
6732
6749
|
border-bottom-color: ${Yr};
|
|
6733
6750
|
}
|
|
6734
6751
|
`))
|
|
6735
|
-
class
|
|
6736
|
-
const Oy
|
|
6752
|
+
class Oy extends Yi{constructor(){super(...arguments),this.appearance=My,this.errorVisible=!1,this.scrollbarWidth=-1,this.updateScrollbarWidthQueued=!1}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver((()=>this.onResize())),this.resizeObserver.observe(this)}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([ne],Oy.prototype,"appearance",void 0),e([ne({attribute:"error-text"})],Oy.prototype,"errorText",void 0),e([ne({attribute:"error-visible",mode:"boolean"})],Oy.prototype,"errorVisible",void 0),e([m],Oy.prototype,"scrollbarWidth",void 0)
|
|
6753
|
+
const Fy=Oy.compose({baseName:"text-area",baseClass:Yi,template:()=>G`
|
|
6737
6754
|
<label
|
|
6738
6755
|
part="label"
|
|
6739
6756
|
for="control"
|
|
@@ -6790,9 +6807,9 @@ const Oy=Ey.compose({baseName:"text-area",baseClass:Yi,template:()=>G`
|
|
|
6790
6807
|
></${Ap}>
|
|
6791
6808
|
${dg}
|
|
6792
6809
|
</div>
|
|
6793
|
-
`,styles:
|
|
6794
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
6795
|
-
const
|
|
6810
|
+
`,styles:Ey,shadowOptions:{delegatesFocus:!0}})
|
|
6811
|
+
ai.getOrCreate().withPrefix("nimble").register(Fy()),ai.tagFor(Oy)
|
|
6812
|
+
const Vy="underline",Hy="outline",Py="block",Ty="frameless",Dy=fe`
|
|
6796
6813
|
${xn("inline-block")}
|
|
6797
6814
|
${bg}
|
|
6798
6815
|
|
|
@@ -6963,12 +6980,12 @@ const Fy="underline",Vy="outline",Hy="block",Py="frameless",Ty=fe`
|
|
|
6963
6980
|
slot[name='actions']::slotted(*) {
|
|
6964
6981
|
${sa.cssCustomProperty}: 24px;
|
|
6965
6982
|
}
|
|
6966
|
-
`.withBehaviors(Uc(
|
|
6983
|
+
`.withBehaviors(Uc(Vy,fe`
|
|
6967
6984
|
.root {
|
|
6968
6985
|
border-bottom-width: ${ca};
|
|
6969
6986
|
padding-bottom: 0;
|
|
6970
6987
|
}
|
|
6971
|
-
`),Uc(
|
|
6988
|
+
`),Uc(Py,fe`
|
|
6972
6989
|
.root {
|
|
6973
6990
|
background-color: rgba(${Xr}, 0.1);
|
|
6974
6991
|
}
|
|
@@ -6996,12 +7013,12 @@ const Fy="underline",Vy="outline",Hy="block",Py="frameless",Ty=fe`
|
|
|
6996
7013
|
:host([disabled]) .root {
|
|
6997
7014
|
background-color: rgba(${Xr}, 0.07);
|
|
6998
7015
|
}
|
|
6999
|
-
`),Uc(
|
|
7016
|
+
`),Uc(Hy,fe`
|
|
7000
7017
|
.root {
|
|
7001
7018
|
border-width: ${ca};
|
|
7002
7019
|
padding: 0;
|
|
7003
7020
|
}
|
|
7004
|
-
`),Uc(
|
|
7021
|
+
`),Uc(Ty,fe`
|
|
7005
7022
|
.control {
|
|
7006
7023
|
padding-left: ${ca};
|
|
7007
7024
|
padding-right: ${ca};
|
|
@@ -7019,8 +7036,8 @@ const Fy="underline",Vy="outline",Hy="block",Py="frameless",Ty=fe`
|
|
|
7019
7036
|
filter: invert(100%);
|
|
7020
7037
|
}
|
|
7021
7038
|
`))
|
|
7022
|
-
class
|
|
7023
|
-
const Ly
|
|
7039
|
+
class Ly extends Ii{constructor(){super(...arguments),this.appearance=Vy,this.errorVisible=!1,this.fullBleed=!1}}e([ne],Ly.prototype,"appearance",void 0),e([ne({attribute:"error-text"})],Ly.prototype,"errorText",void 0),e([ne({attribute:"error-visible",mode:"boolean"})],Ly.prototype,"errorVisible",void 0),e([ne({attribute:"full-bleed",mode:"boolean"})],Ly.prototype,"fullBleed",void 0)
|
|
7040
|
+
const zy=Ly.compose({baseName:"text-field",baseClass:Ii,template:(e,t)=>G`
|
|
7024
7041
|
<template
|
|
7025
7042
|
class="
|
|
7026
7043
|
${e=>e.readOnly?"readonly":""}
|
|
@@ -7080,7 +7097,7 @@ const Ly=Dy.compose({baseName:"text-field",baseClass:Ii,template:(e,t)=>G`
|
|
|
7080
7097
|
${Ze(0,t)}
|
|
7081
7098
|
</div>
|
|
7082
7099
|
</template>
|
|
7083
|
-
`,styles:
|
|
7100
|
+
`,styles:Dy,shadowOptions:{delegatesFocus:!0},end:G`
|
|
7084
7101
|
<${Ap}
|
|
7085
7102
|
severity="error"
|
|
7086
7103
|
class="error-icon"
|
|
@@ -7090,8 +7107,8 @@ const Ly=Dy.compose({baseName:"text-field",baseClass:Ii,template:(e,t)=>G`
|
|
|
7090
7107
|
</span>
|
|
7091
7108
|
${dg}
|
|
7092
7109
|
`})
|
|
7093
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
7094
|
-
const
|
|
7110
|
+
ai.getOrCreate().withPrefix("nimble").register(zy()),ai.tagFor(Ly)
|
|
7111
|
+
const By=fe`
|
|
7095
7112
|
.positioning-region {
|
|
7096
7113
|
display: flex;
|
|
7097
7114
|
padding: ${aa} ${la};
|
|
@@ -7116,7 +7133,7 @@ const zy=fe`
|
|
|
7116
7133
|
margin-left: auto;
|
|
7117
7134
|
}
|
|
7118
7135
|
`
|
|
7119
|
-
class
|
|
7136
|
+
class Ny extends Ji{}const Zy=Ny.compose({baseName:"toolbar",baseClass:Ji,template:(e,t)=>G`
|
|
7120
7137
|
<template
|
|
7121
7138
|
aria-label="${e=>e.ariaLabel}"
|
|
7122
7139
|
aria-labelledby="${e=>e.ariaLabelledby}"
|
|
@@ -7137,9 +7154,9 @@ class By extends Ji{}const Ny=By.compose({baseName:"toolbar",baseClass:Ji,templa
|
|
|
7137
7154
|
${Ze(0,t)}
|
|
7138
7155
|
</div>
|
|
7139
7156
|
</template>
|
|
7140
|
-
`,styles:
|
|
7141
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
7142
|
-
const
|
|
7157
|
+
`,styles:By,shadowOptions:{delegatesFocus:!0}})
|
|
7158
|
+
ai.getOrCreate().withPrefix("nimble").register(Zy()),ai.tagFor(Ny)
|
|
7159
|
+
const qy=fe`
|
|
7143
7160
|
${xn("inline-flex")}
|
|
7144
7161
|
|
|
7145
7162
|
:host {
|
|
@@ -7224,7 +7241,7 @@ const Zy=fe`
|
|
|
7224
7241
|
.status-icon {
|
|
7225
7242
|
opacity: 0.6;
|
|
7226
7243
|
}
|
|
7227
|
-
`)),
|
|
7244
|
+
`)),jy=G`
|
|
7228
7245
|
${Me((e=>e.tooltipVisible),G`
|
|
7229
7246
|
<${md}
|
|
7230
7247
|
class="anchored-region"
|
|
@@ -7257,11 +7274,11 @@ const Zy=fe`
|
|
|
7257
7274
|
</${md}>
|
|
7258
7275
|
`)}
|
|
7259
7276
|
`
|
|
7260
|
-
class
|
|
7261
|
-
const Uy
|
|
7262
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
7263
|
-
const
|
|
7264
|
-
class
|
|
7277
|
+
class Uy extends mn{constructor(){super(...arguments),this.iconVisible=!1}}e([ne],Uy.prototype,"severity",void 0),e([ne({attribute:"icon-visible",mode:"boolean"})],Uy.prototype,"iconVisible",void 0)
|
|
7278
|
+
const Gy=Uy.compose({baseName:"tooltip",baseClass:mn,template:jy,styles:qy})
|
|
7279
|
+
ai.getOrCreate().withPrefix("nimble").register(Gy()),ai.tagFor(Uy)
|
|
7280
|
+
const Wy="group-selected",Ky="all",Xy="leaves-only",Yy="none"
|
|
7281
|
+
class Qy{constructor(e,t,o){this.ltr=e,this.rtl=t,this.source=o,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 Jy=fe`
|
|
7265
7282
|
${xn("block")}
|
|
7266
7283
|
|
|
7267
7284
|
:host {
|
|
@@ -7277,7 +7294,7 @@ class Yy{constructor(e,t,o){this.ltr=e,this.rtl=t,this.source=o,this.attached=nu
|
|
|
7277
7294
|
}
|
|
7278
7295
|
|
|
7279
7296
|
${""}
|
|
7280
|
-
:host([${
|
|
7297
|
+
:host([${Wy}])::after {
|
|
7281
7298
|
background: ${ta};
|
|
7282
7299
|
border-radius: 0px;
|
|
7283
7300
|
content: '';
|
|
@@ -7299,7 +7316,7 @@ class Yy{constructor(e,t,o){this.ltr=e,this.rtl=t,this.source=o,this.attached=nu
|
|
|
7299
7316
|
background: ${Wr};
|
|
7300
7317
|
}
|
|
7301
7318
|
|
|
7302
|
-
:host([${
|
|
7319
|
+
:host([${Wy}]) .positioning-region:hover {
|
|
7303
7320
|
background: ${Gr};
|
|
7304
7321
|
}
|
|
7305
7322
|
|
|
@@ -7407,7 +7424,7 @@ class Yy{constructor(e,t,o){this.ltr=e,this.rtl=t,this.source=o,this.attached=nu
|
|
|
7407
7424
|
display: block;
|
|
7408
7425
|
}
|
|
7409
7426
|
`.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)
|
|
7410
|
-
t&&Dr.unsubscribe(t)}attach(e){const t=this.cache.get(e)||new
|
|
7427
|
+
t&&Dr.unsubscribe(t)}attach(e){const t=this.cache.get(e)||new Qy(this.ltr,this.rtl,e),o=Dr.getValueFor(e)
|
|
7411
7428
|
Dr.subscribe(t),t.attach(o),this.cache.set(e,t)}}(fe`
|
|
7412
7429
|
.expand-collapse-button {
|
|
7413
7430
|
left: var(
|
|
@@ -7439,8 +7456,8 @@ Dr.subscribe(t),t.attach(o),this.cache.set(e,t)}}(fe`
|
|
|
7439
7456
|
transform: rotate(135deg);
|
|
7440
7457
|
}
|
|
7441
7458
|
`))
|
|
7442
|
-
class
|
|
7443
|
-
const e
|
|
7459
|
+
class e$ extends bn{constructor(){super(...arguments),this.groupSelected=!1}}e([ne({attribute:"group-selected",mode:"boolean"})],e$.prototype,"groupSelected",void 0)
|
|
7460
|
+
const t$=e$.compose({baseName:"tree-item",baseClass:bn,template:(e,t)=>G`
|
|
7444
7461
|
<template
|
|
7445
7462
|
role="treeitem"
|
|
7446
7463
|
slot="${e=>e.isNestedItem()?"item":void 0}"
|
|
@@ -7480,9 +7497,9 @@ const e$=Jy.compose({baseName:"tree-item",baseClass:bn,template:(e,t)=>G`
|
|
|
7480
7497
|
</div>
|
|
7481
7498
|
`)}
|
|
7482
7499
|
</template>
|
|
7483
|
-
`,styles:
|
|
7484
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
7485
|
-
const
|
|
7500
|
+
`,styles:Jy,expandCollapseGlyph:Ed.data})
|
|
7501
|
+
ai.getOrCreate().withPrefix("nimble").register(t$()),ai.tagFor(e$)
|
|
7502
|
+
const o$=fe`
|
|
7486
7503
|
${xn("flex")}
|
|
7487
7504
|
|
|
7488
7505
|
:host {
|
|
@@ -7494,7 +7511,7 @@ const t$=fe`
|
|
|
7494
7511
|
:host(${Cn}) {
|
|
7495
7512
|
outline: none;
|
|
7496
7513
|
}
|
|
7497
|
-
`,
|
|
7514
|
+
`,i$=G`
|
|
7498
7515
|
<template
|
|
7499
7516
|
role="tree"
|
|
7500
7517
|
${Re("treeView")}
|
|
@@ -7508,273 +7525,273 @@ const t$=fe`
|
|
|
7508
7525
|
<slot ${Le("slottedTreeItems")}></slot>
|
|
7509
7526
|
</template>
|
|
7510
7527
|
`
|
|
7511
|
-
class
|
|
7528
|
+
class n$ extends wn{constructor(){super(...arguments),this.selectionMode=Ky,this.selectedItems=[]}handleClick(e){if(e.defaultPrevented)return!1
|
|
7512
7529
|
if(!(e.target instanceof Element&&fn(e.target)))return!0
|
|
7513
7530
|
const t=e.target
|
|
7514
|
-
return!t.disabled&&(this.canSelect(t)?t.selected=!0:this.itemHasChildren(t)&&(t.expanded=!t.expanded),!0)}canSelect(e){switch(this.selectionMode){case
|
|
7515
|
-
case
|
|
7516
|
-
case
|
|
7517
|
-
default:return!0}}itemHasChildren(e){return null!==e.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const e of Array.from(this.children))e instanceof
|
|
7531
|
+
return!t.disabled&&(this.canSelect(t)?t.selected=!0:this.itemHasChildren(t)&&(t.expanded=!t.expanded),!0)}canSelect(e){switch(this.selectionMode){case Ky:return!0
|
|
7532
|
+
case Yy:return!1
|
|
7533
|
+
case Xy:return!this.itemHasChildren(e)
|
|
7534
|
+
default:return!0}}itemHasChildren(e){return null!==e.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const e of Array.from(this.children))e instanceof e$&&(e.groupSelected=!1)
|
|
7518
7535
|
for(let e of this.selectedItems){for(;null!==e.parentElement&&e.parentElement!==this;)e=e.parentElement
|
|
7519
|
-
e instanceof
|
|
7520
|
-
const n
|
|
7521
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
7522
|
-
var
|
|
7523
|
-
function
|
|
7524
|
-
i[e]=[]}return new
|
|
7536
|
+
e instanceof e$&&(e.groupSelected=!0)}}}e([ne({attribute:"selection-mode"})],n$.prototype,"selectionMode",void 0),e([m],n$.prototype,"selectedItems",void 0)
|
|
7537
|
+
const s$=n$.compose({baseName:"tree-view",baseClass:wn,template:i$,styles:o$})
|
|
7538
|
+
ai.getOrCreate().withPrefix("nimble").register(s$()),ai.tagFor(n$)
|
|
7539
|
+
var r$={value:()=>{}}
|
|
7540
|
+
function a$(){for(var e,t=0,o=arguments.length,i={};t<o;++t){if(!(e=arguments[t]+"")||e in i||/[\s.]/.test(e))throw new Error("illegal type: "+e)
|
|
7541
|
+
i[e]=[]}return new l$(i)}function l$(e){this._=e}function c$(e,t){return e.trim().split(/^|\s+/).map((function(e){var o="",i=e.indexOf(".")
|
|
7525
7542
|
if(i>=0&&(o=e.slice(i+1),e=e.slice(0,i)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e)
|
|
7526
|
-
return{type:e,name:o}}))}function
|
|
7527
|
-
break}return null!=o&&e.push({name:t,value:o}),e}
|
|
7543
|
+
return{type:e,name:o}}))}function d$(e,t){for(var o,i=0,n=e.length;i<n;++i)if((o=e[i]).name===t)return o.value}function h$(e,t,o){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=r$,e=e.slice(0,i).concat(e.slice(i+1))
|
|
7544
|
+
break}return null!=o&&e.push({name:t,value:o}),e}l$.prototype=a$.prototype={constructor:l$,on:function(e,t){var o,i=this._,n=c$(e+"",i),s=-1,r=n.length
|
|
7528
7545
|
if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t)
|
|
7529
|
-
for(;++s<r;)if(o=(e=n[s]).type)i[o]=
|
|
7530
|
-
else if(null==t)for(o in i)i[o]=
|
|
7531
|
-
return this}for(;++s<r;)if((o=(e=n[s]).type)&&(o=
|
|
7546
|
+
for(;++s<r;)if(o=(e=n[s]).type)i[o]=h$(i[o],e.name,t)
|
|
7547
|
+
else if(null==t)for(o in i)i[o]=h$(i[o],e.name,null)
|
|
7548
|
+
return this}for(;++s<r;)if((o=(e=n[s]).type)&&(o=d$(i[o],e.name)))return o},copy:function(){var e={},t=this._
|
|
7532
7549
|
for(var o in t)e[o]=t[o].slice()
|
|
7533
|
-
return new
|
|
7550
|
+
return new l$(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var o,i,n=new Array(o),s=0;s<o;++s)n[s]=arguments[s+2]
|
|
7534
7551
|
if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e)
|
|
7535
7552
|
for(s=0,o=(i=this._[e]).length;s<o;++s)i[s].value.apply(t,n)},apply:function(e,t,o){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e)
|
|
7536
7553
|
for(var i=this._[e],n=0,s=i.length;n<s;++n)i[n].value.apply(t,o)}}
|
|
7537
|
-
var
|
|
7538
|
-
function
|
|
7539
|
-
return o>=0&&"xmlns"!==(t=e.slice(0,o))&&(e=e.slice(o+1)),
|
|
7540
|
-
return o===
|
|
7541
|
-
return(t.local?v
|
|
7542
|
-
function
|
|
7543
|
-
function
|
|
7544
|
-
for(;a<l;++a)(r=t[a])&&(n[a]=r)}function
|
|
7554
|
+
var u$="http://www.w3.org/1999/xhtml",p$={svg:"http://www.w3.org/2000/svg",xhtml:u$,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}
|
|
7555
|
+
function g$(e){var t=e+="",o=t.indexOf(":")
|
|
7556
|
+
return o>=0&&"xmlns"!==(t=e.slice(0,o))&&(e=e.slice(o+1)),p$.hasOwnProperty(t)?{space:p$[t],local:e}:e}function v$(e){return function(){var t=this.ownerDocument,o=this.namespaceURI
|
|
7557
|
+
return o===u$&&t.documentElement.namespaceURI===u$?t.createElement(e):t.createElementNS(o,e)}}function m$(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function f$(e){var t=g$(e)
|
|
7558
|
+
return(t.local?m$:v$)(t)}function b$(){}function w$(e){return null==e?b$:function(){return this.querySelector(e)}}function x$(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}function y$(){return[]}function $$(e){return null==e?y$:function(){return this.querySelectorAll(e)}}function C$(e){return function(){return this.matches(e)}}function k$(e){return function(t){return t.matches(e)}}var S$=Array.prototype.find
|
|
7559
|
+
function _$(){return this.firstElementChild}var I$=Array.prototype.filter
|
|
7560
|
+
function R$(){return Array.from(this.children)}function M$(e){return new Array(e.length)}function A$(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function E$(e){return function(){return e}}function O$(e,t,o,i,n,s){for(var r,a=0,l=t.length,c=s.length;a<c;++a)(r=t[a])?(r.__data__=s[a],i[a]=r):o[a]=new A$(e,s[a])
|
|
7561
|
+
for(;a<l;++a)(r=t[a])&&(n[a]=r)}function F$(e,t,o,i,n,s,r){var a,l,c,d=new Map,h=t.length,u=s.length,p=new Array(h)
|
|
7545
7562
|
for(a=0;a<h;++a)(l=t[a])&&(p[a]=c=r.call(l,l.__data__,a,t)+"",d.has(c)?n[a]=l:d.set(c,l))
|
|
7546
|
-
for(a=0;a<u;++a)c=r.call(e,s[a],a,s)+"",(l=d.get(c))?(i[a]=l,l.__data__=s[a],d.delete(c)):o[a]=new
|
|
7547
|
-
for(a=0;a<h;++a)(l=t[a])&&d.get(p[a])===l&&(n[a]=l)}function
|
|
7548
|
-
null==o?this.removeAttribute(e):this.setAttribute(e,o)}}function
|
|
7549
|
-
null==o?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,o)}}function
|
|
7550
|
-
null==i?this.style.removeProperty(e):this.style.setProperty(e,i,o)}}function
|
|
7551
|
-
null==o?delete this[e]:this[e]=o}}function
|
|
7552
|
-
this.textContent=null==t?"":t}}function
|
|
7553
|
-
this.innerHTML=null==t?"":t}}function
|
|
7554
|
-
e&&e.removeChild(this)}function
|
|
7555
|
-
return t?t.insertBefore(e,this.nextSibling):e}function
|
|
7556
|
-
return t?t.insertBefore(e,this.nextSibling):e}function
|
|
7557
|
-
return o>=0&&(t=e.slice(o+1),e=e.slice(0,o)),{type:e,name:t}}))}function
|
|
7558
|
-
if(t){for(var o,i=0,n=-1,s=t.length;i<s;++i)o=t[i],e.type&&o.type!==e.type||o.name!==e.name?t[++n]=o:this.removeEventListener(o.type,o.listener,o.options);++n?t.length=n:delete this.__on}}}function
|
|
7563
|
+
for(a=0;a<u;++a)c=r.call(e,s[a],a,s)+"",(l=d.get(c))?(i[a]=l,l.__data__=s[a],d.delete(c)):o[a]=new A$(e,s[a])
|
|
7564
|
+
for(a=0;a<h;++a)(l=t[a])&&d.get(p[a])===l&&(n[a]=l)}function V$(e){return e.__data__}function H$(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function P$(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function T$(e){return function(){this.removeAttribute(e)}}function D$(e){return function(){this.removeAttributeNS(e.space,e.local)}}function L$(e,t){return function(){this.setAttribute(e,t)}}function z$(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function B$(e,t){return function(){var o=t.apply(this,arguments)
|
|
7565
|
+
null==o?this.removeAttribute(e):this.setAttribute(e,o)}}function N$(e,t){return function(){var o=t.apply(this,arguments)
|
|
7566
|
+
null==o?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,o)}}function Z$(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function q$(e){return function(){this.style.removeProperty(e)}}function j$(e,t,o){return function(){this.style.setProperty(e,t,o)}}function U$(e,t,o){return function(){var i=t.apply(this,arguments)
|
|
7567
|
+
null==i?this.style.removeProperty(e):this.style.setProperty(e,i,o)}}function G$(e,t){return e.style.getPropertyValue(t)||Z$(e).getComputedStyle(e,null).getPropertyValue(t)}function W$(e){return function(){delete this[e]}}function K$(e,t){return function(){this[e]=t}}function X$(e,t){return function(){var o=t.apply(this,arguments)
|
|
7568
|
+
null==o?delete this[e]:this[e]=o}}function Y$(e){return e.trim().split(/^|\s+/)}function Q$(e){return e.classList||new J$(e)}function J$(e){this._node=e,this._names=Y$(e.getAttribute("class")||"")}function eC(e,t){for(var o=Q$(e),i=-1,n=t.length;++i<n;)o.add(t[i])}function tC(e,t){for(var o=Q$(e),i=-1,n=t.length;++i<n;)o.remove(t[i])}function oC(e){return function(){eC(this,e)}}function iC(e){return function(){tC(this,e)}}function nC(e,t){return function(){(t.apply(this,arguments)?eC:tC)(this,e)}}function sC(){this.textContent=""}function rC(e){return function(){this.textContent=e}}function aC(e){return function(){var t=e.apply(this,arguments)
|
|
7569
|
+
this.textContent=null==t?"":t}}function lC(){this.innerHTML=""}function cC(e){return function(){this.innerHTML=e}}function dC(e){return function(){var t=e.apply(this,arguments)
|
|
7570
|
+
this.innerHTML=null==t?"":t}}function hC(){this.nextSibling&&this.parentNode.appendChild(this)}function uC(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function pC(){return null}function gC(){var e=this.parentNode
|
|
7571
|
+
e&&e.removeChild(this)}function vC(){var e=this.cloneNode(!1),t=this.parentNode
|
|
7572
|
+
return t?t.insertBefore(e,this.nextSibling):e}function mC(){var e=this.cloneNode(!0),t=this.parentNode
|
|
7573
|
+
return t?t.insertBefore(e,this.nextSibling):e}function fC(e){return e.trim().split(/^|\s+/).map((function(e){var t="",o=e.indexOf(".")
|
|
7574
|
+
return o>=0&&(t=e.slice(o+1),e=e.slice(0,o)),{type:e,name:t}}))}function bC(e){return function(){var t=this.__on
|
|
7575
|
+
if(t){for(var o,i=0,n=-1,s=t.length;i<s;++i)o=t[i],e.type&&o.type!==e.type||o.name!==e.name?t[++n]=o:this.removeEventListener(o.type,o.listener,o.options);++n?t.length=n:delete this.__on}}}function wC(e,t,o){return function(){var i,n=this.__on,s=function(e){return function(t){e.call(this,t,this.__data__)}}(t)
|
|
7559
7576
|
if(n)for(var r=0,a=n.length;r<a;++r)if((i=n[r]).type===e.type&&i.name===e.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=o),void(i.value=t)
|
|
7560
|
-
this.addEventListener(e.type,s,o),i={type:e.type,name:e.name,value:t,listener:s,options:o},n?n.push(i):this.__on=[i]}}function
|
|
7561
|
-
"function"==typeof n?n=new n(t,o):(n=i.document.createEvent("Event"),o?(n.initEvent(t,o.bubbles,o.cancelable),n.detail=o.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function
|
|
7577
|
+
this.addEventListener(e.type,s,o),i={type:e.type,name:e.name,value:t,listener:s,options:o},n?n.push(i):this.__on=[i]}}function xC(e,t,o){var i=Z$(e),n=i.CustomEvent
|
|
7578
|
+
"function"==typeof n?n=new n(t,o):(n=i.document.createEvent("Event"),o?(n.initEvent(t,o.bubbles,o.cancelable),n.detail=o.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function yC(e,t){return function(){return xC(this,e,t)}}function $C(e,t){return function(){return xC(this,e,t.apply(this,arguments))}}A$.prototype={constructor:A$,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)}},J$.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)
|
|
7562
7579
|
t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}
|
|
7563
|
-
var
|
|
7564
|
-
function
|
|
7580
|
+
var CC=[null]
|
|
7581
|
+
function kC(e,t){this._groups=e,this._parents=t}function SC(){return new kC([[document.documentElement]],CC)}function _C(e){return"string"==typeof e?new kC([[document.querySelector(e)]],[document.documentElement]):new kC([[e]],CC)}function IC(e,t){if(e=function(e){let t
|
|
7565
7582
|
for(;t=e.sourceEvent;)e=t
|
|
7566
7583
|
return e}(e),void 0===t&&(t=e.currentTarget),t){var o=t.ownerSVGElement||t
|
|
7567
7584
|
if(o.createSVGPoint){var i=o.createSVGPoint()
|
|
7568
7585
|
return i.x=e.clientX,i.y=e.clientY,[(i=i.matrixTransform(t.getScreenCTM().inverse())).x,i.y]}if(t.getBoundingClientRect){var n=t.getBoundingClientRect()
|
|
7569
|
-
return[e.clientX-n.left-t.clientLeft,e.clientY-n.top-t.clientTop]}}return[e.pageX,e.pageY]}
|
|
7586
|
+
return[e.clientX-n.left-t.clientLeft,e.clientY-n.top-t.clientTop]}}return[e.pageX,e.pageY]}kC.prototype=SC.prototype={constructor:kC,select:function(e){"function"!=typeof e&&(e=w$(e))
|
|
7570
7587
|
for(var t=this._groups,o=t.length,i=new Array(o),n=0;n<o;++n)for(var s,r,a=t[n],l=a.length,c=i[n]=new Array(l),d=0;d<l;++d)(s=a[d])&&(r=e.call(s,s.__data__,d,a))&&("__data__"in s&&(r.__data__=s.__data__),c[d]=r)
|
|
7571
|
-
return new
|
|
7588
|
+
return new kC(i,this._parents)},selectAll:function(e){e="function"==typeof e?function(e){return function(){return x$(e.apply(this,arguments))}}(e):$$(e)
|
|
7572
7589
|
for(var t=this._groups,o=t.length,i=[],n=[],s=0;s<o;++s)for(var r,a=t[s],l=a.length,c=0;c<l;++c)(r=a[c])&&(i.push(e.call(r,r.__data__,c,a)),n.push(r))
|
|
7573
|
-
return new
|
|
7590
|
+
return new kC(i,n)},selectChild:function(e){return this.select(null==e?_$:function(e){return function(){return S$.call(this.children,e)}}("function"==typeof e?e:k$(e)))},selectChildren:function(e){return this.selectAll(null==e?R$:function(e){return function(){return I$.call(this.children,e)}}("function"==typeof e?e:k$(e)))},filter:function(e){"function"!=typeof e&&(e=C$(e))
|
|
7574
7591
|
for(var t=this._groups,o=t.length,i=new Array(o),n=0;n<o;++n)for(var s,r=t[n],a=r.length,l=i[n]=[],c=0;c<a;++c)(s=r[c])&&e.call(s,s.__data__,c,r)&&l.push(s)
|
|
7575
|
-
return new
|
|
7576
|
-
var o=t?O
|
|
7577
|
-
"function"!=typeof e&&(e=
|
|
7578
|
-
for(var s=n.length,r=new Array(s),a=new Array(s),l=new Array(s),c=0;c<s;++c){var d=i[c],h=n[c],u=h.length,p=
|
|
7592
|
+
return new kC(i,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,V$)
|
|
7593
|
+
var o=t?F$:O$,i=this._parents,n=this._groups
|
|
7594
|
+
"function"!=typeof e&&(e=E$(e))
|
|
7595
|
+
for(var s=n.length,r=new Array(s),a=new Array(s),l=new Array(s),c=0;c<s;++c){var d=i[c],h=n[c],u=h.length,p=H$(e.call(d,d&&d.__data__,c,i)),g=p.length,v=a[c]=new Array(g),m=r[c]=new Array(g),f=l[c]=new Array(u)
|
|
7579
7596
|
o(d,h,v,m,f,p,t)
|
|
7580
|
-
for(var b,w,x=0,y=0;x<g;++x)if(b=v[x]){for(x>=y&&(y=x+1);!(w=m[y])&&++y<g;);b._next=w||null}}return(r=new
|
|
7597
|
+
for(var b,w,x=0,y=0;x<g;++x)if(b=v[x]){for(x>=y&&(y=x+1);!(w=m[y])&&++y<g;);b._next=w||null}}return(r=new kC(r,i))._enter=a,r._exit=l,r},enter:function(){return new kC(this._enter||this._groups.map(M$),this._parents)},exit:function(){return new kC(this._exit||this._groups.map(M$),this._parents)},join:function(e,t,o){var i=this.enter(),n=this,s=this.exit()
|
|
7581
7598
|
return"function"==typeof e?(i=e(i))&&(i=i.selection()):i=i.append(e+""),null!=t&&(n=t(n))&&(n=n.selection()),null==o?s.remove():o(s),i&&n?i.merge(n).order():n},merge:function(e){for(var t=e.selection?e.selection():e,o=this._groups,i=t._groups,n=o.length,s=i.length,r=Math.min(n,s),a=new Array(n),l=0;l<r;++l)for(var c,d=o[l],h=i[l],u=d.length,p=a[l]=new Array(u),g=0;g<u;++g)(c=d[g]||h[g])&&(p[g]=c)
|
|
7582
7599
|
for(;l<n;++l)a[l]=o[l]
|
|
7583
|
-
return new
|
|
7584
|
-
return this},sort:function(e){function t(t,o){return t&&o?e(t.__data__,o.__data__):!t-!o}e||(e=
|
|
7600
|
+
return new kC(a,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,o=e.length;++t<o;)for(var i,n=e[t],s=n.length-1,r=n[s];--s>=0;)(i=n[s])&&(r&&4^i.compareDocumentPosition(r)&&r.parentNode.insertBefore(i,r),r=i)
|
|
7601
|
+
return this},sort:function(e){function t(t,o){return t&&o?e(t.__data__,o.__data__):!t-!o}e||(e=P$)
|
|
7585
7602
|
for(var o=this._groups,i=o.length,n=new Array(i),s=0;s<i;++s){for(var r,a=o[s],l=a.length,c=n[s]=new Array(l),d=0;d<l;++d)(r=a[d])&&(c[d]=r)
|
|
7586
|
-
c.sort(t)}return new
|
|
7603
|
+
c.sort(t)}return new kC(n,this._parents).order()},call:function(){var e=arguments[0]
|
|
7587
7604
|
return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,o=e.length;t<o;++t)for(var i=e[t],n=0,s=i.length;n<s;++n){var r=i[n]
|
|
7588
7605
|
if(r)return r}return null},size:function(){let e=0
|
|
7589
7606
|
for(const t of this)++e
|
|
7590
7607
|
return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,o=0,i=t.length;o<i;++o)for(var n,s=t[o],r=0,a=s.length;r<a;++r)(n=s[r])&&e.call(n,n.__data__,r,s)
|
|
7591
|
-
return this},attr:function(e,t){var o=
|
|
7608
|
+
return this},attr:function(e,t){var o=g$(e)
|
|
7592
7609
|
if(arguments.length<2){var i=this.node()
|
|
7593
|
-
return o.local?i.getAttributeNS(o.space,o.local):i.getAttribute(o)}return this.each((null==t?o.local?T$:
|
|
7594
|
-
if(arguments.length<2){for(var i=
|
|
7595
|
-
return!0}return this.each(("function"==typeof t?
|
|
7596
|
-
return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var o="function"==typeof e?e:
|
|
7597
|
-
return this.select((function(){return this.insertBefore(o.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(
|
|
7598
|
-
if(!(arguments.length<2)){for(a=t?bC
|
|
7610
|
+
return o.local?i.getAttributeNS(o.space,o.local):i.getAttribute(o)}return this.each((null==t?o.local?D$:T$:"function"==typeof t?o.local?N$:B$:o.local?z$:L$)(o,t))},style:function(e,t,o){return arguments.length>1?this.each((null==t?q$:"function"==typeof t?U$:j$)(e,t,null==o?"":o)):G$(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?W$:"function"==typeof t?X$:K$)(e,t)):this.node()[e]},classed:function(e,t){var o=Y$(e+"")
|
|
7611
|
+
if(arguments.length<2){for(var i=Q$(this.node()),n=-1,s=o.length;++n<s;)if(!i.contains(o[n]))return!1
|
|
7612
|
+
return!0}return this.each(("function"==typeof t?nC:t?oC:iC)(o,t))},text:function(e){return arguments.length?this.each(null==e?sC:("function"==typeof e?aC:rC)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?lC:("function"==typeof e?dC:cC)(e)):this.node().innerHTML},raise:function(){return this.each(hC)},lower:function(){return this.each(uC)},append:function(e){var t="function"==typeof e?e:f$(e)
|
|
7613
|
+
return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var o="function"==typeof e?e:f$(e),i=null==t?pC:"function"==typeof t?t:w$(t)
|
|
7614
|
+
return this.select((function(){return this.insertBefore(o.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(gC)},clone:function(e){return this.select(e?mC:vC)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,o){var i,n,s=fC(e+""),r=s.length
|
|
7615
|
+
if(!(arguments.length<2)){for(a=t?wC:bC,i=0;i<r;++i)this.each(a(s[i],t,o))
|
|
7599
7616
|
return this}var a=this.node().__on
|
|
7600
|
-
if(a)for(var l,c=0,d=a.length;c<d;++c)for(i=0,l=a[c];i<r;++i)if((n=s[i]).type===l.type&&n.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t
|
|
7601
|
-
const
|
|
7602
|
-
function
|
|
7603
|
-
"onselectstart"in t?o.on("selectstart.drag",RC
|
|
7604
|
-
t&&(i.on("click.drag",RC
|
|
7617
|
+
if(a)for(var l,c=0,d=a.length;c<d;++c)for(i=0,l=a[c];i<r;++i)if((n=s[i]).type===l.type&&n.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?$C:yC)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,o=e.length;t<o;++t)for(var i,n=e[t],s=0,r=n.length;s<r;++s)(i=n[s])&&(yield i)}}
|
|
7618
|
+
const RC={capture:!0,passive:!1}
|
|
7619
|
+
function MC(e){e.preventDefault(),e.stopImmediatePropagation()}function AC(e){var t=e.document.documentElement,o=_C(e).on("dragstart.drag",MC,RC)
|
|
7620
|
+
"onselectstart"in t?o.on("selectstart.drag",MC,RC):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function EC(e,t){var o=e.document.documentElement,i=_C(e).on("dragstart.drag",null)
|
|
7621
|
+
t&&(i.on("click.drag",MC,RC),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in o?i.on("selectstart.drag",null):(o.style.MozUserSelect=o.__noselect,delete o.__noselect)}function OC(e,t,o){e.prototype=t.prototype=o,o.constructor=e}function FC(e,t){var o=Object.create(e.prototype)
|
|
7605
7622
|
for(var i in t)o[i]=t[i]
|
|
7606
|
-
return o}function
|
|
7607
|
-
function
|
|
7608
|
-
return e=(e+"").trim().toLowerCase(),(t=
|
|
7609
|
-
return`${1===e?"rgb(":"rgba("}${
|
|
7610
|
-
if(e instanceof
|
|
7611
|
-
if(e instanceof
|
|
7623
|
+
return o}function VC(){}var HC=.7,PC=1/HC,TC="\\s*([+-]?\\d+)\\s*",DC="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",LC="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zC=/^#([0-9a-f]{3,8})$/,BC=new RegExp(`^rgb\\(${TC},${TC},${TC}\\)$`),NC=new RegExp(`^rgb\\(${LC},${LC},${LC}\\)$`),ZC=new RegExp(`^rgba\\(${TC},${TC},${TC},${DC}\\)$`),qC=new RegExp(`^rgba\\(${LC},${LC},${LC},${DC}\\)$`),jC=new RegExp(`^hsl\\(${DC},${LC},${LC}\\)$`),UC=new RegExp(`^hsla\\(${DC},${LC},${LC},${DC}\\)$`),GC={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}
|
|
7624
|
+
function WC(){return this.rgb().formatHex()}function KC(){return this.rgb().formatRgb()}function XC(e){var t,o
|
|
7625
|
+
return e=(e+"").trim().toLowerCase(),(t=zC.exec(e))?(o=t[1].length,t=parseInt(t[1],16),6===o?YC(t):3===o?new tk(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===o?QC(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===o?QC(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=BC.exec(e))?new tk(t[1],t[2],t[3],1):(t=NC.exec(e))?new tk(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ZC.exec(e))?QC(t[1],t[2],t[3],t[4]):(t=qC.exec(e))?QC(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=jC.exec(e))?ak(t[1],t[2]/100,t[3]/100,1):(t=UC.exec(e))?ak(t[1],t[2]/100,t[3]/100,t[4]):GC.hasOwnProperty(e)?YC(GC[e]):"transparent"===e?new tk(NaN,NaN,NaN,0):null}function YC(e){return new tk(e>>16&255,e>>8&255,255&e,1)}function QC(e,t,o,i){return i<=0&&(e=t=o=NaN),new tk(e,t,o,i)}function JC(e){return e instanceof VC||(e=XC(e)),e?new tk((e=e.rgb()).r,e.g,e.b,e.opacity):new tk}function ek(e,t,o,i){return 1===arguments.length?JC(e):new tk(e,t,o,null==i?1:i)}function tk(e,t,o,i){this.r=+e,this.g=+t,this.b=+o,this.opacity=+i}function ok(){return`#${rk(this.r)}${rk(this.g)}${rk(this.b)}`}function ik(){const e=nk(this.opacity)
|
|
7626
|
+
return`${1===e?"rgb(":"rgba("}${sk(this.r)}, ${sk(this.g)}, ${sk(this.b)}${1===e?")":`, ${e})`}`}function nk(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function sk(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function rk(e){return((e=sk(e))<16?"0":"")+e.toString(16)}function ak(e,t,o,i){return i<=0?e=t=o=NaN:o<=0||o>=1?e=t=NaN:t<=0&&(e=NaN),new ck(e,t,o,i)}function lk(e){if(e instanceof ck)return new ck(e.h,e.s,e.l,e.opacity)
|
|
7627
|
+
if(e instanceof VC||(e=XC(e)),!e)return new ck
|
|
7628
|
+
if(e instanceof ck)return e
|
|
7612
7629
|
var t=(e=e.rgb()).r/255,o=e.g/255,i=e.b/255,n=Math.min(t,o,i),s=Math.max(t,o,i),r=NaN,a=s-n,l=(s+n)/2
|
|
7613
|
-
return a?(r=t===s?(o-i)/a+6*(o<i):o===s?(i-t)/a+2:(t-o)/a+4,a/=l<.5?s+n:2-s-n,r*=60):a=l>0&&l<1?0:r,new
|
|
7614
|
-
return new
|
|
7615
|
-
return`${1===e?"hsl(":"hsla("}${
|
|
7616
|
-
var
|
|
7617
|
-
function
|
|
7618
|
-
return o?function(e,t){return function(o){return e+o*t}}(e,o):
|
|
7619
|
-
function i(e,t){var i=o((e=
|
|
7630
|
+
return a?(r=t===s?(o-i)/a+6*(o<i):o===s?(i-t)/a+2:(t-o)/a+4,a/=l<.5?s+n:2-s-n,r*=60):a=l>0&&l<1?0:r,new ck(r,a,l,e.opacity)}function ck(e,t,o,i){this.h=+e,this.s=+t,this.l=+o,this.opacity=+i}function dk(e){return(e=(e||0)%360)<0?e+360:e}function hk(e){return Math.max(0,Math.min(1,e||0))}function uk(e,t,o){return 255*(e<60?t+(o-t)*e/60:e<180?o:e<240?t+(o-t)*(240-e)/60:t)}OC(VC,XC,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:WC,formatHex:WC,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return lk(this).formatHsl()},formatRgb:KC,toString:KC}),OC(tk,ek,FC(VC,{brighter(e){return e=null==e?PC:Math.pow(PC,e),new tk(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?HC:Math.pow(HC,e),new tk(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tk(sk(this.r),sk(this.g),sk(this.b),nk(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:ok,formatHex:ok,formatHex8:function(){return`#${rk(this.r)}${rk(this.g)}${rk(this.b)}${rk(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ik,toString:ik})),OC(ck,(function(e,t,o,i){return 1===arguments.length?lk(e):new ck(e,t,o,null==i?1:i)}),FC(VC,{brighter(e){return e=null==e?PC:Math.pow(PC,e),new ck(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?HC:Math.pow(HC,e),new ck(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,o=this.l,i=o+(o<.5?o:1-o)*t,n=2*o-i
|
|
7631
|
+
return new tk(uk(e>=240?e-240:e+120,n,i),uk(e,n,i),uk(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new ck(dk(this.h),hk(this.s),hk(this.l),nk(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=nk(this.opacity)
|
|
7632
|
+
return`${1===e?"hsl(":"hsla("}${dk(this.h)}, ${100*hk(this.s)}%, ${100*hk(this.l)}%${1===e?")":`, ${e})`}`}}))
|
|
7633
|
+
var pk=e=>()=>e
|
|
7634
|
+
function gk(e){return 1==(e=+e)?vk:function(t,o){return o-t?function(e,t,o){return e=Math.pow(e,o),t=Math.pow(t,o)-e,o=1/o,function(i){return Math.pow(e+i*t,o)}}(t,o,e):pk(isNaN(t)?o:t)}}function vk(e,t){var o=t-e
|
|
7635
|
+
return o?function(e,t){return function(o){return e+o*t}}(e,o):pk(isNaN(e)?t:e)}var mk=function e(t){var o=gk(t)
|
|
7636
|
+
function i(e,t){var i=o((e=ek(e)).r,(t=ek(t)).r),n=o(e.g,t.g),s=o(e.b,t.b),r=vk(e.opacity,t.opacity)
|
|
7620
7637
|
return function(t){return e.r=i(t),e.g=n(t),e.b=s(t),e.opacity=r(t),e+""}}return i.gamma=e,i}(1)
|
|
7621
|
-
function
|
|
7638
|
+
function fk(e,t){t||(t=[])
|
|
7622
7639
|
var o,i=e?Math.min(t.length,e.length):0,n=t.slice()
|
|
7623
7640
|
return function(s){for(o=0;o<i;++o)n[o]=e[o]*(1-s)+t[o]*s
|
|
7624
|
-
return n}}function
|
|
7625
|
-
for(o=0;o<n;++o)s[o]=
|
|
7641
|
+
return n}}function bk(e,t){var o,i=t?t.length:0,n=e?Math.min(i,e.length):0,s=new Array(n),r=new Array(i)
|
|
7642
|
+
for(o=0;o<n;++o)s[o]=Sk(e[o],t[o])
|
|
7626
7643
|
for(;o<i;++o)r[o]=t[o]
|
|
7627
7644
|
return function(e){for(o=0;o<n;++o)r[o]=s[o](e)
|
|
7628
|
-
return r}}function
|
|
7629
|
-
return e=+e,t=+t,function(i){return o.setTime(e*(1-i)+t*i),o}}function
|
|
7630
|
-
for(o in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)o in e?i[o]=
|
|
7645
|
+
return r}}function wk(e,t){var o=new Date
|
|
7646
|
+
return e=+e,t=+t,function(i){return o.setTime(e*(1-i)+t*i),o}}function xk(e,t){return e=+e,t=+t,function(o){return e*(1-o)+t*o}}function yk(e,t){var o,i={},n={}
|
|
7647
|
+
for(o in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)o in e?i[o]=Sk(e[o],t[o]):n[o]=t[o]
|
|
7631
7648
|
return function(e){for(o in i)n[o]=i[o](e)
|
|
7632
|
-
return n}}var
|
|
7633
|
-
function
|
|
7634
|
-
for(e+="",t+="";(o
|
|
7649
|
+
return n}}var $k=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ck=new RegExp($k.source,"g")
|
|
7650
|
+
function kk(e,t){var o,i,n,s=$k.lastIndex=Ck.lastIndex=0,r=-1,a=[],l=[]
|
|
7651
|
+
for(e+="",t+="";(o=$k.exec(e))&&(i=Ck.exec(t));)(n=i.index)>s&&(n=t.slice(s,n),a[r]?a[r]+=n:a[++r]=n),(o=o[0])===(i=i[0])?a[r]?a[r]+=i:a[++r]=i:(a[++r]=null,l.push({i:r,x:xk(o,i)})),s=Ck.lastIndex
|
|
7635
7652
|
return s<t.length&&(n=t.slice(s),a[r]?a[r]+=n:a[++r]=n),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 o,i=0;i<t;++i)a[(o=l[i]).i]=o.x(e)
|
|
7636
|
-
return a.join("")})}function
|
|
7637
|
-
return null==t||"boolean"===n?
|
|
7638
|
-
function
|
|
7639
|
-
return(r=Math.sqrt(e*e+t*t))&&(e/=r,t/=r),(l=e*o+t*i)&&(o-=e*l,i-=t*l),(a=Math.sqrt(o*o+i*i))&&(o/=a,i/=a,l/=a),e*i<t*o&&(e=-e,t=-t,l=-l,r=-r),{translateX:n,translateY:s,rotate:Math.atan2(t,e)*
|
|
7653
|
+
return a.join("")})}function Sk(e,t){var o,i,n=typeof t
|
|
7654
|
+
return null==t||"boolean"===n?pk(t):("number"===n?xk:"string"===n?(o=XC(t))?(t=o,mk):kk:t instanceof XC?mk:t instanceof Date?wk:(i=t,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(t)?bk:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?yk:xk:fk))(e,t)}function _k(e,t){return e=+e,t=+t,function(o){return Math.round(e*(1-o)+t*o)}}var Ik,Rk=180/Math.PI,Mk={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}
|
|
7655
|
+
function Ak(e,t,o,i,n,s){var r,a,l
|
|
7656
|
+
return(r=Math.sqrt(e*e+t*t))&&(e/=r,t/=r),(l=e*o+t*i)&&(o-=e*l,i-=t*l),(a=Math.sqrt(o*o+i*i))&&(o/=a,i/=a,l/=a),e*i<t*o&&(e=-e,t=-t,l=-l,r=-r),{translateX:n,translateY:s,rotate:Math.atan2(t,e)*Rk,skewX:Math.atan(l)*Rk,scaleX:r,scaleY:a}}function Ek(e,t,o,i){function n(e){return e.length?e.pop()+" ":""}return function(s,r){var a=[],l=[]
|
|
7640
7657
|
return s=e(s),r=e(r),function(e,i,n,s,r,a){if(e!==n||i!==s){var l=r.push("translate(",null,t,null,o)
|
|
7641
|
-
a.push({i:l-4,x:
|
|
7642
|
-
r.push({i:a-4,x:
|
|
7643
|
-
return a.join("")}}}var Ek
|
|
7644
|
-
return t.isIdentity?
|
|
7645
|
-
function
|
|
7658
|
+
a.push({i:l-4,x:xk(e,n)},{i:l-2,x:xk(i,s)})}else(n||s)&&r.push("translate("+n+t+s+o)}(s.translateX,s.translateY,r.translateX,r.translateY,a,l),function(e,t,o,s){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),s.push({i:o.push(n(o)+"rotate(",null,i)-2,x:xk(e,t)})):t&&o.push(n(o)+"rotate("+t+i)}(s.rotate,r.rotate,a,l),function(e,t,o,s){e!==t?s.push({i:o.push(n(o)+"skewX(",null,i)-2,x:xk(e,t)}):t&&o.push(n(o)+"skewX("+t+i)}(s.skewX,r.skewX,a,l),function(e,t,o,i,s,r){if(e!==o||t!==i){var a=s.push(n(s)+"scale(",null,",",null,")")
|
|
7659
|
+
r.push({i:a-4,x:xk(e,o)},{i:a-2,x:xk(t,i)})}else 1===o&&1===i||s.push(n(s)+"scale("+o+","+i+")")}(s.scaleX,s.scaleY,r.scaleX,r.scaleY,a,l),s=r=null,function(e){for(var t,o=-1,i=l.length;++o<i;)a[(t=l[o]).i]=t.x(e)
|
|
7660
|
+
return a.join("")}}}var Ok=Ek((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"")
|
|
7661
|
+
return t.isIdentity?Mk:Ak(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),Fk=Ek((function(e){return null==e?Mk:(Ik||(Ik=document.createElementNS("http://www.w3.org/2000/svg","g")),Ik.setAttribute("transform",e),(e=Ik.transform.baseVal.consolidate())?Ak((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):Mk)}),", ",")",")")
|
|
7662
|
+
function Vk(e){return((e=Math.exp(e))+1/e)/2}var Hk,Pk,Tk=function e(t,o,i){function n(e,n){var s,r,a=e[0],l=e[1],c=e[2],d=n[0],h=n[1],u=n[2],p=d-a,g=h-l,v=p*p+g*g
|
|
7646
7663
|
if(v<1e-12)r=Math.log(u/c)/t,s=function(e){return[a+e*p,l+e*g,c*Math.exp(t*e*r)]}
|
|
7647
7664
|
else{var m=Math.sqrt(v),f=(u*u-c*c+i*v)/(2*c*o*m),b=(u*u-c*c-i*v)/(2*u*o*m),w=Math.log(Math.sqrt(f*f+1)-f),x=Math.log(Math.sqrt(b*b+1)-b)
|
|
7648
|
-
r=(x-w)/t,s=function(e){var i,n=e*r,s=
|
|
7649
|
-
return[a+d*p,l+d*g,c*s/
|
|
7650
|
-
return e(o,i,i*i)},n}(Math.SQRT2,2,4),
|
|
7651
|
-
function
|
|
7652
|
-
return i.restart(e,t,o),i}function
|
|
7653
|
-
try{!function(){
|
|
7654
|
-
for(var e,t=
|
|
7655
|
-
for(;o;)o._call?(i>o._time&&(i=o._time),e=o,o=o._next):(t=o._next,o._next=null,o=e?e._next=t:
|
|
7656
|
-
|
|
7657
|
-
t>1e3&&(
|
|
7658
|
-
return t=null==t?0:+t,i.restart((o=>{i.stop(),e(o+t)}),t,o),i}
|
|
7659
|
-
o=(null==o?
|
|
7660
|
-
var
|
|
7661
|
-
function
|
|
7665
|
+
r=(x-w)/t,s=function(e){var i,n=e*r,s=Vk(w),d=c/(o*m)*(s*(i=t*n+w,((i=Math.exp(2*i))-1)/(i+1))-function(e){return((e=Math.exp(e))-1/e)/2}(w))
|
|
7666
|
+
return[a+d*p,l+d*g,c*s/Vk(t*n+w)]}}return s.duration=1e3*r*t/Math.SQRT2,s}return n.rho=function(t){var o=Math.max(.001,+t),i=o*o
|
|
7667
|
+
return e(o,i,i*i)},n}(Math.SQRT2,2,4),Dk=0,Lk=0,zk=0,Bk=0,Nk=0,Zk=0,qk="object"==typeof performance&&performance.now?performance:Date,jk="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)}
|
|
7668
|
+
function Uk(){return Nk||(jk(Gk),Nk=qk.now()+Zk)}function Gk(){Nk=0}function Wk(){this._call=this._time=this._next=null}function Kk(e,t,o){var i=new Wk
|
|
7669
|
+
return i.restart(e,t,o),i}function Xk(){Nk=(Bk=qk.now())+Zk,Dk=Lk=0
|
|
7670
|
+
try{!function(){Uk(),++Dk
|
|
7671
|
+
for(var e,t=Hk;t;)(e=Nk-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Dk}()}finally{Dk=0,function(){var e,t,o=Hk,i=1/0
|
|
7672
|
+
for(;o;)o._call?(i>o._time&&(i=o._time),e=o,o=o._next):(t=o._next,o._next=null,o=e?e._next=t:Hk=t)
|
|
7673
|
+
Pk=e,Qk(i)}(),Nk=0}}function Yk(){var e=qk.now(),t=e-Bk
|
|
7674
|
+
t>1e3&&(Zk-=t,Bk=e)}function Qk(e){Dk||(Lk&&(Lk=clearTimeout(Lk)),e-Nk>24?(e<1/0&&(Lk=setTimeout(Xk,e-qk.now()-Zk)),zk&&(zk=clearInterval(zk))):(zk||(Bk=qk.now(),zk=setInterval(Yk,1e3)),Dk=1,jk(Xk)))}function Jk(e,t,o){var i=new Wk
|
|
7675
|
+
return t=null==t?0:+t,i.restart((o=>{i.stop(),e(o+t)}),t,o),i}Wk.prototype=Kk.prototype={constructor:Wk,restart:function(e,t,o){if("function"!=typeof e)throw new TypeError("callback is not a function")
|
|
7676
|
+
o=(null==o?Uk():+o)+(null==t?0:+t),this._next||Pk===this||(Pk?Pk._next=this:Hk=this,Pk=this),this._call=e,this._time=o,Qk()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qk())}}
|
|
7677
|
+
var eS=a$("start","end","cancel","interrupt"),tS=[]
|
|
7678
|
+
function oS(e,t,o,i,n,s){var r=e.__transition
|
|
7662
7679
|
if(r){if(o in r)return}else e.__transition={}
|
|
7663
7680
|
!function(e,t,o){var i,n=e.__transition
|
|
7664
7681
|
function s(e){o.state=1,o.timer.restart(r,o.delay,o.time),o.delay<=e&&r(e-o.delay)}function r(s){var c,d,h,u
|
|
7665
7682
|
if(1!==o.state)return l()
|
|
7666
|
-
for(c in n)if((u=n[c]).name===o.name){if(3===u.state)return
|
|
7667
|
-
4===u.state?(u.state=6,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete n[c]):+c<t&&(u.state=6,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete n[c])}if(
|
|
7683
|
+
for(c in n)if((u=n[c]).name===o.name){if(3===u.state)return Jk(r)
|
|
7684
|
+
4===u.state?(u.state=6,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete n[c]):+c<t&&(u.state=6,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete n[c])}if(Jk((function(){3===o.state&&(o.state=4,o.timer.restart(a,o.delay,o.time),a(s))})),o.state=2,o.on.call("start",e,e.__data__,o.index,o.group),2===o.state){for(o.state=3,i=new Array(h=o.tween.length),c=0,d=-1;c<h;++c)(u=o.tween[c].value.call(e,e.__data__,o.index,o.group))&&(i[++d]=u)
|
|
7668
7685
|
i.length=d+1}}function a(t){for(var n=t<o.duration?o.ease.call(null,t/o.duration):(o.timer.restart(l),o.state=5,1),s=-1,r=i.length;++s<r;)i[s].call(e,n)
|
|
7669
7686
|
5===o.state&&(o.on.call("end",e,e.__data__,o.index,o.group),l())}function l(){for(var i in o.state=6,o.timer.stop(),delete n[t],n)return
|
|
7670
|
-
delete e.__transition}n[t]=o,o.timer=
|
|
7687
|
+
delete e.__transition}n[t]=o,o.timer=Kk(s,0,o.time)}(e,o,{name:t,index:i,group:n,on:eS,tween:tS,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:0})}function iS(e,t){var o=sS(e,t)
|
|
7671
7688
|
if(o.state>0)throw new Error("too late; already scheduled")
|
|
7672
|
-
return o}function
|
|
7689
|
+
return o}function nS(e,t){var o=sS(e,t)
|
|
7673
7690
|
if(o.state>3)throw new Error("too late; already running")
|
|
7674
|
-
return o}function
|
|
7691
|
+
return o}function sS(e,t){var o=e.__transition
|
|
7675
7692
|
if(!o||!(o=o[t]))throw new Error("transition not found")
|
|
7676
|
-
return o}function
|
|
7693
|
+
return o}function rS(e,t){var o,i,n,s=e.__transition,r=!0
|
|
7677
7694
|
if(s){for(n in t=null==t?null:t+"",s)(o=s[n]).name===t?(i=o.state>2&&o.state<5,o.state=6,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete s[n]):r=!1
|
|
7678
|
-
r&&delete e.__transition}}function
|
|
7679
|
-
return function(){var n=
|
|
7695
|
+
r&&delete e.__transition}}function aS(e,t){var o,i
|
|
7696
|
+
return function(){var n=nS(this,e),s=n.tween
|
|
7680
7697
|
if(s!==o)for(var r=0,a=(i=o=s).length;r<a;++r)if(i[r].name===t){(i=i.slice()).splice(r,1)
|
|
7681
|
-
break}n.tween=i}}function
|
|
7698
|
+
break}n.tween=i}}function lS(e,t,o){var i,n
|
|
7682
7699
|
if("function"!=typeof o)throw new Error
|
|
7683
|
-
return function(){var s=
|
|
7700
|
+
return function(){var s=nS(this,e),r=s.tween
|
|
7684
7701
|
if(r!==i){n=(i=r).slice()
|
|
7685
7702
|
for(var a={name:t,value:o},l=0,c=n.length;l<c;++l)if(n[l].name===t){n[l]=a
|
|
7686
|
-
break}l===c&&n.push(a)}s.tween=n}}function
|
|
7687
|
-
return e.each((function(){var e=
|
|
7688
|
-
return("number"==typeof t?
|
|
7703
|
+
break}l===c&&n.push(a)}s.tween=n}}function cS(e,t,o){var i=e._id
|
|
7704
|
+
return e.each((function(){var e=nS(this,i);(e.value||(e.value={}))[t]=o.apply(this,arguments)})),function(e){return sS(e,i).value[t]}}function dS(e,t){var o
|
|
7705
|
+
return("number"==typeof t?xk:t instanceof XC?mk:(o=XC(t))?(t=o,mk):kk)(e,t)}function hS(e){return function(){this.removeAttribute(e)}}function uS(e){return function(){this.removeAttributeNS(e.space,e.local)}}function pS(e,t,o){var i,n,s=o+""
|
|
7689
7706
|
return function(){var r=this.getAttribute(e)
|
|
7690
|
-
return r===s?null:r===i?n:n=t(i=r,o)}}function
|
|
7707
|
+
return r===s?null:r===i?n:n=t(i=r,o)}}function gS(e,t,o){var i,n,s=o+""
|
|
7691
7708
|
return function(){var r=this.getAttributeNS(e.space,e.local)
|
|
7692
|
-
return r===s?null:r===i?n:n=t(i=r,o)}}function
|
|
7709
|
+
return r===s?null:r===i?n:n=t(i=r,o)}}function vS(e,t,o){var i,n,s
|
|
7693
7710
|
return function(){var r,a,l=o(this)
|
|
7694
7711
|
if(null!=l)return(r=this.getAttribute(e))===(a=l+"")?null:r===i&&a===n?s:(n=a,s=t(i=r,l))
|
|
7695
|
-
this.removeAttribute(e)}}function
|
|
7712
|
+
this.removeAttribute(e)}}function mS(e,t,o){var i,n,s
|
|
7696
7713
|
return function(){var r,a,l=o(this)
|
|
7697
7714
|
if(null!=l)return(r=this.getAttributeNS(e.space,e.local))===(a=l+"")?null:r===i&&a===n?s:(n=a,s=t(i=r,l))
|
|
7698
|
-
this.removeAttributeNS(e.space,e.local)}}function
|
|
7715
|
+
this.removeAttributeNS(e.space,e.local)}}function fS(e,t){return function(o){this.setAttribute(e,t.call(this,o))}}function bS(e,t){return function(o){this.setAttributeNS(e.space,e.local,t.call(this,o))}}function wS(e,t){var o,i
|
|
7699
7716
|
function n(){var n=t.apply(this,arguments)
|
|
7700
|
-
return n!==i&&(o=(i=n)&&
|
|
7717
|
+
return n!==i&&(o=(i=n)&&bS(e,n)),o}return n._value=t,n}function xS(e,t){var o,i
|
|
7701
7718
|
function n(){var n=t.apply(this,arguments)
|
|
7702
|
-
return n!==i&&(o=(i=n)&&
|
|
7703
|
-
return function(){
|
|
7704
|
-
return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?
|
|
7719
|
+
return n!==i&&(o=(i=n)&&fS(e,n)),o}return n._value=t,n}function yS(e,t){return function(){iS(this,e).delay=+t.apply(this,arguments)}}function $S(e,t){return t=+t,function(){iS(this,e).delay=t}}function CS(e,t){return function(){nS(this,e).duration=+t.apply(this,arguments)}}function kS(e,t){return t=+t,function(){nS(this,e).duration=t}}function SS(e,t){if("function"!=typeof t)throw new Error
|
|
7720
|
+
return function(){nS(this,e).ease=t}}function _S(e,t,o){var i,n,s=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".")
|
|
7721
|
+
return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?iS:nS
|
|
7705
7722
|
return function(){var r=s(this,e),a=r.on
|
|
7706
|
-
a!==i&&(n=(i=a).copy()).on(t,o),r.on=n}}var
|
|
7707
|
-
function
|
|
7723
|
+
a!==i&&(n=(i=a).copy()).on(t,o),r.on=n}}var IS=SC.prototype.constructor
|
|
7724
|
+
function RS(e){return function(){this.style.removeProperty(e)}}function MS(e,t,o){return function(i){this.style.setProperty(e,t.call(this,i),o)}}function AS(e,t,o){var i,n
|
|
7708
7725
|
function s(){var s=t.apply(this,arguments)
|
|
7709
|
-
return s!==n&&(i=(n=s)&&
|
|
7726
|
+
return s!==n&&(i=(n=s)&&MS(e,s,o)),i}return s._value=t,s}function ES(e){return function(t){this.textContent=e.call(this,t)}}function OS(e){var t,o
|
|
7710
7727
|
function i(){var i=e.apply(this,arguments)
|
|
7711
|
-
return i!==o&&(t=(o=i)&&
|
|
7712
|
-
function
|
|
7713
|
-
|
|
7714
|
-
"function"!=typeof e&&(e=
|
|
7715
|
-
for(var i=this._groups,n=i.length,s=new Array(n),r=0;r<n;++r)for(var a,l,c=i[r],d=c.length,h=s[r]=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,
|
|
7716
|
-
return new
|
|
7717
|
-
"function"!=typeof e&&(e
|
|
7718
|
-
for(var i=this._groups,n=i.length,s=[],r=[],a=0;a<n;++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),g=
|
|
7719
|
-
s.push(p),r.push(l)}return new
|
|
7728
|
+
return i!==o&&(t=(o=i)&&ES(i)),t}return i._value=e,i}var FS=0
|
|
7729
|
+
function VS(e,t,o,i){this._groups=e,this._parents=t,this._name=o,this._id=i}function HS(){return++FS}var PS=SC.prototype
|
|
7730
|
+
VS.prototype={constructor:VS,select:function(e){var t=this._name,o=this._id
|
|
7731
|
+
"function"!=typeof e&&(e=w$(e))
|
|
7732
|
+
for(var i=this._groups,n=i.length,s=new Array(n),r=0;r<n;++r)for(var a,l,c=i[r],d=c.length,h=s[r]=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,oS(h[u],t,o,u,h,sS(a,o)))
|
|
7733
|
+
return new VS(s,this._parents,t,o)},selectAll:function(e){var t=this._name,o=this._id
|
|
7734
|
+
"function"!=typeof e&&(e=$$(e))
|
|
7735
|
+
for(var i=this._groups,n=i.length,s=[],r=[],a=0;a<n;++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),g=sS(l,o),v=0,m=p.length;v<m;++v)(u=p[v])&&oS(u,t,o,v,p,g)
|
|
7736
|
+
s.push(p),r.push(l)}return new VS(s,r,t,o)},selectChild:PS.selectChild,selectChildren:PS.selectChildren,filter:function(e){"function"!=typeof e&&(e=C$(e))
|
|
7720
7737
|
for(var t=this._groups,o=t.length,i=new Array(o),n=0;n<o;++n)for(var s,r=t[n],a=r.length,l=i[n]=[],c=0;c<a;++c)(s=r[c])&&e.call(s,s.__data__,c,r)&&l.push(s)
|
|
7721
|
-
return new
|
|
7738
|
+
return new VS(i,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error
|
|
7722
7739
|
for(var t=this._groups,o=e._groups,i=t.length,n=o.length,s=Math.min(i,n),r=new Array(i),a=0;a<s;++a)for(var l,c=t[a],d=o[a],h=c.length,u=r[a]=new Array(h),p=0;p<h;++p)(l=c[p]||d[p])&&(u[p]=l)
|
|
7723
7740
|
for(;a<i;++a)r[a]=t[a]
|
|
7724
|
-
return new
|
|
7725
|
-
|
|
7726
|
-
return arguments.length<2?
|
|
7727
|
-
return this.attrTween(e,"function"==typeof t?(o.local?vS
|
|
7741
|
+
return new VS(r,this._parents,this._name,this._id)},selection:function(){return new IS(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,o=HS(),i=this._groups,n=i.length,s=0;s<n;++s)for(var r,a=i[s],l=a.length,c=0;c<l;++c)if(r=a[c]){var d=sS(r,t)
|
|
7742
|
+
oS(r,e,o,c,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new VS(i,this._parents,e,o)},call:PS.call,nodes:PS.nodes,node:PS.node,size:PS.size,empty:PS.empty,each:PS.each,on:function(e,t){var o=this._id
|
|
7743
|
+
return arguments.length<2?sS(this.node(),o).on.on(e):this.each(_S(o,e,t))},attr:function(e,t){var o=g$(e),i="transform"===o?Fk:dS
|
|
7744
|
+
return this.attrTween(e,"function"==typeof t?(o.local?mS:vS)(o,i,cS(this,"attr."+e,t)):null==t?(o.local?uS:hS)(o):(o.local?gS:pS)(o,i,t))},attrTween:function(e,t){var o="attr."+e
|
|
7728
7745
|
if(arguments.length<2)return(o=this.tween(o))&&o._value
|
|
7729
7746
|
if(null==t)return this.tween(o,null)
|
|
7730
7747
|
if("function"!=typeof t)throw new Error
|
|
7731
|
-
var i=
|
|
7732
|
-
return this.tween(o,(i.local?
|
|
7748
|
+
var i=g$(e)
|
|
7749
|
+
return this.tween(o,(i.local?wS:xS)(i,t))},style:function(e,t,o){var i="transform"==(e+="")?Ok:dS
|
|
7733
7750
|
return null==t?this.styleTween(e,function(e,t){var o,i,n
|
|
7734
|
-
return function(){var s=
|
|
7735
|
-
return s===r?null:s===o&&r===i?n:n=t(o=s,i=r)}}(e,i)).on("end.style."+e,
|
|
7736
|
-
return function(){var r=
|
|
7737
|
-
return null==a&&(this.style.removeProperty(e),l=a=
|
|
7738
|
-
return function(){var l=
|
|
7751
|
+
return function(){var s=G$(this,e),r=(this.style.removeProperty(e),G$(this,e))
|
|
7752
|
+
return s===r?null:s===o&&r===i?n:n=t(o=s,i=r)}}(e,i)).on("end.style."+e,RS(e)):"function"==typeof t?this.styleTween(e,function(e,t,o){var i,n,s
|
|
7753
|
+
return function(){var r=G$(this,e),a=o(this),l=a+""
|
|
7754
|
+
return null==a&&(this.style.removeProperty(e),l=a=G$(this,e)),r===l?null:r===i&&l===n?s:(n=l,s=t(i=r,a))}}(e,i,cS(this,"style."+e,t))).each(function(e,t){var o,i,n,s,r="style."+t,a="end."+r
|
|
7755
|
+
return function(){var l=nS(this,e),c=l.on,d=null==l.value[r]?s||(s=RS(t)):void 0
|
|
7739
7756
|
c===o&&n===d||(i=(o=c).copy()).on(a,n=d),l.on=i}}(this._id,e)):this.styleTween(e,function(e,t,o){var i,n,s=o+""
|
|
7740
|
-
return function(){var r=
|
|
7757
|
+
return function(){var r=G$(this,e)
|
|
7741
7758
|
return r===s?null:r===i?n:n=t(i=r,o)}}(e,i,t),o).on("end.style."+e,null)},styleTween:function(e,t,o){var i="style."+(e+="")
|
|
7742
7759
|
if(arguments.length<2)return(i=this.tween(i))&&i._value
|
|
7743
7760
|
if(null==t)return this.tween(i,null)
|
|
7744
7761
|
if("function"!=typeof t)throw new Error
|
|
7745
|
-
return this.tween(i,
|
|
7746
|
-
this.textContent=null==t?"":t}}(
|
|
7762
|
+
return this.tween(i,AS(e,t,null==o?"":o))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this)
|
|
7763
|
+
this.textContent=null==t?"":t}}(cS(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text"
|
|
7747
7764
|
if(arguments.length<1)return(t=this.tween(t))&&t._value
|
|
7748
7765
|
if(null==e)return this.tween(t,null)
|
|
7749
7766
|
if("function"!=typeof e)throw new Error
|
|
7750
|
-
return this.tween(t,
|
|
7767
|
+
return this.tween(t,OS(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode
|
|
7751
7768
|
for(var o in this.__transition)if(+o!==e)return
|
|
7752
7769
|
t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var o=this._id
|
|
7753
|
-
if(e+="",arguments.length<2){for(var i,n=
|
|
7754
|
-
return null}return this.each((null==t?
|
|
7755
|
-
return arguments.length?this.each(("function"==typeof e?
|
|
7756
|
-
return arguments.length?this.each(("function"==typeof e
|
|
7757
|
-
return arguments.length?this.each(
|
|
7770
|
+
if(e+="",arguments.length<2){for(var i,n=sS(this.node(),o).tween,s=0,r=n.length;s<r;++s)if((i=n[s]).name===e)return i.value
|
|
7771
|
+
return null}return this.each((null==t?aS:lS)(o,e,t))},delay:function(e){var t=this._id
|
|
7772
|
+
return arguments.length?this.each(("function"==typeof e?yS:$S)(t,e)):sS(this.node(),t).delay},duration:function(e){var t=this._id
|
|
7773
|
+
return arguments.length?this.each(("function"==typeof e?CS:kS)(t,e)):sS(this.node(),t).duration},ease:function(e){var t=this._id
|
|
7774
|
+
return arguments.length?this.each(SS(t,e)):sS(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error
|
|
7758
7775
|
return this.each(function(e,t){return function(){var o=t.apply(this,arguments)
|
|
7759
7776
|
if("function"!=typeof o)throw new Error
|
|
7760
|
-
|
|
7777
|
+
nS(this,e).ease=o}}(this._id,e))},end:function(){var e,t,o=this,i=o._id,n=o.size()
|
|
7761
7778
|
return new Promise((function(s,r){var a={value:r},l={value:function(){0==--n&&s()}}
|
|
7762
|
-
o.each((function(){var o=
|
|
7763
|
-
n!==e&&((t=(e=n).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),o.on=t})),0===n&&s()}))},[Symbol.iterator]:
|
|
7764
|
-
var
|
|
7765
|
-
function
|
|
7766
|
-
return o}
|
|
7767
|
-
e instanceof
|
|
7768
|
-
for(var i=this._groups,n=i.length,s=0;s<n;++s)for(var r,a=i[s],l=a.length,c=0;c<l;++c)(r=a[c])&&
|
|
7769
|
-
return new
|
|
7770
|
-
var
|
|
7771
|
-
function
|
|
7772
|
-
var
|
|
7773
|
-
function
|
|
7774
|
-
return e.__zoom}function
|
|
7775
|
-
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
|
|
7776
|
-
return e.translate(n>i?(i+n)/2:Math.min(0,i)||Math.max(0,n),r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r))}
|
|
7777
|
-
const
|
|
7779
|
+
o.each((function(){var o=nS(this,i),n=o.on
|
|
7780
|
+
n!==e&&((t=(e=n).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),o.on=t})),0===n&&s()}))},[Symbol.iterator]:PS[Symbol.iterator]}
|
|
7781
|
+
var TS={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}}
|
|
7782
|
+
function DS(e,t){for(var o;!(o=e.__transition)||!(o=o[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`)
|
|
7783
|
+
return o}SC.prototype.interrupt=function(e){return this.each((function(){rS(this,e)}))},SC.prototype.transition=function(e){var t,o
|
|
7784
|
+
e instanceof VS?(t=e._id,e=e._name):(t=HS(),(o=TS).time=Uk(),e=null==e?null:e+"")
|
|
7785
|
+
for(var i=this._groups,n=i.length,s=0;s<n;++s)for(var r,a=i[s],l=a.length,c=0;c<l;++c)(r=a[c])&&oS(r,e,t,c,a,o||DS(r,t))
|
|
7786
|
+
return new VS(i,this._parents,e,t)}
|
|
7787
|
+
var LS=e=>()=>e
|
|
7788
|
+
function zS(e,{sourceEvent:t,target:o,transform:i,dispatch:n}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:n}})}function BS(e,t,o){this.k=e,this.x=t,this.y=o}BS.prototype={constructor:BS,scale:function(e){return 1===e?this:new BS(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new BS(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+")"}}
|
|
7789
|
+
var NS=new BS(1,0,0)
|
|
7790
|
+
function ZS(e){for(;!e.__zoom;)if(!(e=e.parentNode))return NS
|
|
7791
|
+
return e.__zoom}function qS(e){e.stopImmediatePropagation()}function jS(e){e.preventDefault(),e.stopImmediatePropagation()}function US(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function GS(){var e=this
|
|
7792
|
+
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 WS(){return this.__zoom||NS}function KS(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function XS(){return navigator.maxTouchPoints||"ontouchstart"in this}function YS(e,t,o){var i=e.invertX(t[0][0])-o[0][0],n=e.invertX(t[1][0])-o[1][0],s=e.invertY(t[0][1])-o[0][1],r=e.invertY(t[1][1])-o[1][1]
|
|
7793
|
+
return e.translate(n>i?(i+n)/2:Math.min(0,i)||Math.max(0,n),r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r))}ZS.prototype=BS.prototype
|
|
7794
|
+
const QS=G`
|
|
7778
7795
|
<div class="wafer-map-container">
|
|
7779
7796
|
<svg class="svg-root">
|
|
7780
7797
|
<g ${Re("zoomContainer")} transform=${e=>e.transform.toString()}>
|
|
@@ -7804,7 +7821,7 @@ const YS=G`
|
|
|
7804
7821
|
/>
|
|
7805
7822
|
</svg>
|
|
7806
7823
|
</div>
|
|
7807
|
-
`,
|
|
7824
|
+
`,JS=fe`
|
|
7808
7825
|
:host {
|
|
7809
7826
|
display: inline-block;
|
|
7810
7827
|
width: 500px;
|
|
@@ -7888,68 +7905,68 @@ const YS=G`
|
|
|
7888
7905
|
outline-width: 0px;
|
|
7889
7906
|
}
|
|
7890
7907
|
`
|
|
7891
|
-
function
|
|
7908
|
+
function e_(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function t_(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function o_(e){let t,o,i
|
|
7892
7909
|
function n(e,i,n=0,s=e.length){if(n<s){if(0!==t(i,i))return s
|
|
7893
7910
|
do{const t=n+s>>>1
|
|
7894
|
-
o(e[t],i)<0?n=t+1:s=t}while(n<s)}return n}return 2!==e.length?(t=
|
|
7911
|
+
o(e[t],i)<0?n=t+1:s=t}while(n<s)}return n}return 2!==e.length?(t=e_,o=(t,o)=>e_(e(t),o),i=(t,o)=>e(t)-o):(t=e===e_||e===t_?e:i_,o=e,i=e),{left:n,center:function(e,t,o=0,s=e.length){const r=n(e,t,o,s-1)
|
|
7895
7912
|
return r>o&&i(e[r-1],t)>-i(e[r],t)?r-1:r},right:function(e,i,n=0,s=e.length){if(n<s){if(0!==t(i,i))return s
|
|
7896
7913
|
do{const t=n+s>>>1
|
|
7897
|
-
o(e[t],i)<=0?n=t+1:s=t}while(n<s)}return n}}}function
|
|
7898
|
-
|
|
7899
|
-
var s_
|
|
7900
|
-
class
|
|
7914
|
+
o(e[t],i)<=0?n=t+1:s=t}while(n<s)}return n}}}function i_(){return 0}function n_(e){return null===e?NaN:+e}const s_=o_(e_).right
|
|
7915
|
+
o_(n_).center
|
|
7916
|
+
var r_=s_
|
|
7917
|
+
class a_ extends Map{constructor(e,t=c_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,o]of e)this.set(t,o)}get(e){return super.get(l_(this,e))}has(e){return super.has(l_(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},o){const i=t(o)
|
|
7901
7918
|
return e.has(i)?e.get(i):(e.set(i,o),o)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},o){const i=t(o)
|
|
7902
7919
|
e.has(i)&&(o=e.get(i),e.delete(i))
|
|
7903
|
-
return o}(this,e))}}function
|
|
7904
|
-
return e.has(i)?e.get(i):o}function
|
|
7905
|
-
function
|
|
7920
|
+
return o}(this,e))}}function l_({_intern:e,_key:t},o){const i=t(o)
|
|
7921
|
+
return e.has(i)?e.get(i):o}function c_(e){return null!==e&&"object"==typeof e?e.valueOf():e}const d_=Math.sqrt(50),h_=Math.sqrt(10),u_=Math.sqrt(2)
|
|
7922
|
+
function p_(e,t,o){const i=(t-e)/Math.max(0,o),n=Math.floor(Math.log10(i)),s=i/Math.pow(10,n),r=s>=d_?10:s>=h_?5:s>=u_?2:1
|
|
7906
7923
|
let a,l,c
|
|
7907
|
-
return n<0?(c=Math.pow(10,-n)/r,a=Math.round(e*c),l=Math.round(t*c),a/c<e&&++a,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*r,a=Math.round(e/c),l=Math.round(t/c),a*c<e&&++a,l*c>t&&--l),l<a&&.5<=o&&o<2?
|
|
7924
|
+
return n<0?(c=Math.pow(10,-n)/r,a=Math.round(e*c),l=Math.round(t*c),a/c<e&&++a,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*r,a=Math.round(e/c),l=Math.round(t/c),a*c<e&&++a,l*c>t&&--l),l<a&&.5<=o&&o<2?p_(e,t,2*o):[a,l,c]}function g_(e,t,o){return p_(e=+e,t=+t,o=+o)[2]}function v_(e,t,o=n_){if((i=e.length)&&!isNaN(t=+t)){if(t<=0||i<2)return+o(e[0],0,e)
|
|
7908
7925
|
if(t>=1)return+o(e[i-1],i-1,e)
|
|
7909
7926
|
var i,n=(i-1)*t,s=Math.floor(n),r=+o(e[s],s,e)
|
|
7910
|
-
return r+(+o(e[s+1],s+1,e)-r)*(n-s)}}function
|
|
7927
|
+
return r+(+o(e[s+1],s+1,e)-r)*(n-s)}}function m_(e,t,o){e=+e,t=+t,o=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+o
|
|
7911
7928
|
for(var i=-1,n=0|Math.max(0,Math.ceil((t-e)/o)),s=new Array(n);++i<n;)s[i]=e+i*o
|
|
7912
|
-
return s}function
|
|
7929
|
+
return s}function f_(e,t){switch(arguments.length){case 0:break
|
|
7913
7930
|
case 1:this.range(e)
|
|
7914
7931
|
break
|
|
7915
|
-
default:this.range(t).domain(e)}return this}const
|
|
7916
|
-
function
|
|
7932
|
+
default:this.range(t).domain(e)}return this}const b_=Symbol("implicit")
|
|
7933
|
+
function w_(){var e=new a_,t=[],o=[],i=b_
|
|
7917
7934
|
function n(n){let s=e.get(n)
|
|
7918
|
-
if(void 0===s){if(i!==
|
|
7935
|
+
if(void 0===s){if(i!==b_)return i
|
|
7919
7936
|
e.set(n,s=t.push(n)-1)}return o[s%o.length]}return n.domain=function(o){if(!arguments.length)return t.slice()
|
|
7920
|
-
t=[],e=new
|
|
7937
|
+
t=[],e=new a_
|
|
7921
7938
|
for(const i of o)e.has(i)||e.set(i,t.push(i)-1)
|
|
7922
|
-
return n},n.range=function(e){return arguments.length?(o=Array.from(e),n):o.slice()},n.unknown=function(e){return arguments.length?(i=e,n):i},n.copy=function(){return
|
|
7939
|
+
return n},n.range=function(e){return arguments.length?(o=Array.from(e),n):o.slice()},n.unknown=function(e){return arguments.length?(i=e,n):i},n.copy=function(){return w_(t,o).unknown(i)},f_.apply(n,arguments),n}function x_(){var e,t,o=w_().unknown(void 0),i=o.domain,n=o.range,s=0,r=1,a=!1,l=0,c=0,d=.5
|
|
7923
7940
|
function h(){var o=i().length,h=r<s,u=h?r:s,p=h?s:r
|
|
7924
7941
|
e=(p-u)/Math.max(1,o-l+2*c),a&&(e=Math.floor(e)),u+=(p-u-e*(o-l))*d,t=e*(1-l),a&&(u=Math.round(u),t=Math.round(t))
|
|
7925
|
-
var g=
|
|
7926
|
-
return n(h?g.reverse():g)}return delete o.unknown,o.domain=function(e){return arguments.length?(i(e),h()):i()},o.range=function(e){return arguments.length?([s,r]=e,s=+s,r=+r,h()):[s,r]},o.rangeRound=function(e){return[s,r]=e,s=+s,r=+r,a=!0,h()},o.bandwidth=function(){return t},o.step=function(){return e},o.round=function(e){return arguments.length?(a=!!e,h()):a},o.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),h()):l},o.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),h()):l},o.paddingOuter=function(e){return arguments.length?(c=+e,h()):c},o.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),h()):d},o.copy=function(){return
|
|
7927
|
-
function
|
|
7928
|
-
var o}function
|
|
7929
|
-
return n<i?(i=
|
|
7930
|
-
for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++r<i;)n[r]=
|
|
7931
|
-
return function(t){var o=
|
|
7932
|
-
return s[o](n[o](t))}}function
|
|
7942
|
+
var g=m_(o).map((function(t){return u+e*t}))
|
|
7943
|
+
return n(h?g.reverse():g)}return delete o.unknown,o.domain=function(e){return arguments.length?(i(e),h()):i()},o.range=function(e){return arguments.length?([s,r]=e,s=+s,r=+r,h()):[s,r]},o.rangeRound=function(e){return[s,r]=e,s=+s,r=+r,a=!0,h()},o.bandwidth=function(){return t},o.step=function(){return e},o.round=function(e){return arguments.length?(a=!!e,h()):a},o.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),h()):l},o.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),h()):l},o.paddingOuter=function(e){return arguments.length?(c=+e,h()):c},o.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),h()):d},o.copy=function(){return x_(i(),[s,r]).round(a).paddingInner(l).paddingOuter(c).align(d)},f_.apply(h(),arguments)}function y_(e){return+e}var $_=[0,1]
|
|
7944
|
+
function C_(e){return e}function k_(e,t){return(t-=e=+e)?function(o){return(o-e)/t}:(o=isNaN(t)?NaN:.5,function(){return o})
|
|
7945
|
+
var o}function S_(e,t,o){var i=e[0],n=e[1],s=t[0],r=t[1]
|
|
7946
|
+
return n<i?(i=k_(n,i),s=o(r,s)):(i=k_(i,n),s=o(s,r)),function(e){return s(i(e))}}function __(e,t,o){var i=Math.min(e.length,t.length)-1,n=new Array(i),s=new Array(i),r=-1
|
|
7947
|
+
for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++r<i;)n[r]=k_(e[r],e[r+1]),s[r]=o(t[r],t[r+1])
|
|
7948
|
+
return function(t){var o=r_(e,t,1,i)-1
|
|
7949
|
+
return s[o](n[o](t))}}function I_(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function R_(){var e,t,o,i,n,s,r=$_,a=$_,l=Sk,c=C_
|
|
7933
7950
|
function d(){var e,t,o,l=Math.min(r.length,a.length)
|
|
7934
|
-
return c
|
|
7951
|
+
return c!==C_&&(e=r[0],t=r[l-1],e>t&&(o=e,e=t,t=o),c=function(o){return Math.max(e,Math.min(t,o))}),i=l>2?__:S_,n=s=null,h}function h(t){return null==t||isNaN(t=+t)?o:(n||(n=i(r.map(e),a,l)))(e(c(t)))}return h.invert=function(o){return c(t((s||(s=i(a,r.map(e),xk)))(o)))},h.domain=function(e){return arguments.length?(r=Array.from(e,y_),d()):r.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=_k,d()},h.clamp=function(e){return arguments.length?(c=!!e||C_,d()):c!==C_},h.interpolate=function(e){return arguments.length?(l=e,d()):l},h.unknown=function(e){return arguments.length?(o=e,h):o},function(o,i){return e=o,t=i,d()}}function M_(){return R_()(C_,C_)}function A_(e,t){if((o=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null
|
|
7935
7952
|
var o,i=e.slice(0,o)
|
|
7936
|
-
return[i.length>1?i[0]+i.slice(2):i,+e.slice(o+1)]}function
|
|
7937
|
-
function
|
|
7953
|
+
return[i.length>1?i[0]+i.slice(2):i,+e.slice(o+1)]}function E_(e){return(e=A_(Math.abs(e)))?e[1]:NaN}var O_,F_=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i
|
|
7954
|
+
function V_(e){if(!(t=F_.exec(e)))throw new Error("invalid format: "+e)
|
|
7938
7955
|
var t
|
|
7939
|
-
return new
|
|
7956
|
+
return new H_({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 H_(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 P_(e,t){var o=A_(e,t)
|
|
7940
7957
|
if(!o)return e+""
|
|
7941
7958
|
var i=o[0],n=o[1]
|
|
7942
|
-
return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}
|
|
7943
|
-
var
|
|
7959
|
+
return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}V_.prototype=H_.prototype,H_.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}
|
|
7960
|
+
var T_={"%":(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)=>P_(100*e,t),r:P_,s:function(e,t){var o=A_(e,t)
|
|
7944
7961
|
if(!o)return e+""
|
|
7945
|
-
var i=o[0],n=o[1],s=n-(
|
|
7946
|
-
return s===r?i:s>r?i+new Array(s-r+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+
|
|
7947
|
-
function
|
|
7948
|
-
function
|
|
7949
|
-
return s.reverse().join(o)}),n=void 0===e.currency?"":e.currency[0]+"",s=void 0===e.currency?"":e.currency[1]+"",r=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?
|
|
7950
|
-
function h(e){var t=(e=
|
|
7951
|
-
"n"===b?(v=!0,b="g"):
|
|
7952
|
-
var w="$"===u?n:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===u?s:/[%p]/.test(b)?l:"",y=
|
|
7962
|
+
var i=o[0],n=o[1],s=n-(O_=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,r=i.length
|
|
7963
|
+
return s===r?i:s>r?i+new Array(s-r+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+A_(e,Math.max(0,t+s-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)}
|
|
7964
|
+
function D_(e){return e}var L_,z_,B_,N_=Array.prototype.map,Z_=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]
|
|
7965
|
+
function q_(e){var t,o,i=void 0===e.grouping||void 0===e.thousands?D_:(t=N_.call(e.grouping,Number),o=e.thousands+"",function(e,i){for(var n=e.length,s=[],r=0,a=t[0],l=0;n>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),s.push(e.substring(n-=a,n+a)),!((l+=a+1)>i));)a=t[r=(r+1)%t.length]
|
|
7966
|
+
return s.reverse().join(o)}),n=void 0===e.currency?"":e.currency[0]+"",s=void 0===e.currency?"":e.currency[1]+"",r=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?D_:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(N_.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+""
|
|
7967
|
+
function h(e){var t=(e=V_(e)).fill,o=e.align,h=e.sign,u=e.symbol,p=e.zero,g=e.width,v=e.comma,m=e.precision,f=e.trim,b=e.type
|
|
7968
|
+
"n"===b?(v=!0,b="g"):T_[b]||(void 0===m&&(m=12),f=!0,b="g"),(p||"0"===t&&"="===o)&&(p=!0,t="0",o="=")
|
|
7969
|
+
var w="$"===u?n:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===u?s:/[%p]/.test(b)?l:"",y=T_[b],$=/[defgprs%]/.test(b)
|
|
7953
7970
|
function C(e){var n,s,l,u=w,C=x
|
|
7954
7971
|
if("c"===b)C=y(e)+C,e=""
|
|
7955
7972
|
else{var k=(e=+e)<0||1/e<0
|
|
@@ -7958,7 +7975,7 @@ break
|
|
|
7958
7975
|
case"0":0===n&&(n=i),t=i
|
|
7959
7976
|
break
|
|
7960
7977
|
default:if(!+e[i])break e
|
|
7961
|
-
n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0==+e&&"+"!==h&&(k=!1),u=(k?"("===h?h:c:"-"===h||"("===h?"":h)+u,C=("s"===b?
|
|
7978
|
+
n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0==+e&&"+"!==h&&(k=!1),u=(k?"("===h?h:c:"-"===h||"("===h?"":h)+u,C=("s"===b?Z_[8+O_/3]:"")+C+(k&&"("===h?")":""),$)for(n=-1,s=e.length;++n<s;)if(48>(l=e.charCodeAt(n))||l>57){C=(46===l?r+e.slice(n+1):e.slice(n))+C,e=e.slice(0,n)
|
|
7962
7979
|
break}}v&&!p&&(e=i(e,1/0))
|
|
7963
7980
|
var S=u.length+e.length+C.length,_=S<g?new Array(g-S+1).join(t):""
|
|
7964
7981
|
switch(v&&p&&(e=i(_+e,_.length?g-C.length:1/0),_=""),o){case"<":e=u+e+C+_
|
|
@@ -7967,19 +7984,19 @@ case"=":e=u+_+e+C
|
|
|
7967
7984
|
break
|
|
7968
7985
|
case"^":e=_.slice(0,S=_.length>>1)+u+e+C+_.slice(S)
|
|
7969
7986
|
break
|
|
7970
|
-
default:e=_+u+e+C}return a(e)}return m=void 0===m?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),C.toString=function(){return e+""},C}return{format:h,formatPrefix:function(e,t){var o=h(((e=
|
|
7971
|
-
return function(e){return o(n*e)+s}}}}function
|
|
7972
|
-
const i=(t=+t)<(e=+e),n=i?
|
|
7987
|
+
default:e=_+u+e+C}return a(e)}return m=void 0===m?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),C.toString=function(){return e+""},C}return{format:h,formatPrefix:function(e,t){var o=h(((e=V_(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(E_(t)/3))),n=Math.pow(10,-i),s=Z_[8+i/3]
|
|
7988
|
+
return function(e){return o(n*e)+s}}}}function j_(e,t,o,i){var n,s=function(e,t,o){o=+o
|
|
7989
|
+
const i=(t=+t)<(e=+e),n=i?g_(t,e,o):g_(e,t,o)
|
|
7973
7990
|
return(i?-1:1)*(n<0?1/-n:n)}(e,t,o)
|
|
7974
|
-
switch((i=
|
|
7975
|
-
return null!=i.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(
|
|
7976
|
-
case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,
|
|
7991
|
+
switch((i=V_(null==i?",f":i)).type){case"s":var r=Math.max(Math.abs(e),Math.abs(t))
|
|
7992
|
+
return null!=i.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(E_(t)/3)))-E_(Math.abs(e)))}(s,r))||(i.precision=n),B_(i,r)
|
|
7993
|
+
case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,E_(t)-E_(e))+1}(s,Math.max(Math.abs(e),Math.abs(t))))||(i.precision=n-("e"===i.type))
|
|
7977
7994
|
break
|
|
7978
|
-
case"f":case"%":null!=i.precision||isNaN(n=function(e){return Math.max(0,-
|
|
7995
|
+
case"f":case"%":null!=i.precision||isNaN(n=function(e){return Math.max(0,-E_(Math.abs(e)))}(s))||(i.precision=n-2*("%"===i.type))}return z_(i)}function U_(e){var t=e.domain
|
|
7979
7996
|
return e.ticks=function(e){var o=t()
|
|
7980
7997
|
return function(e,t,o){if(!((o=+o)>0))return[]
|
|
7981
7998
|
if((e=+e)==(t=+t))return[e]
|
|
7982
|
-
const i=t<e,[n,s,r]=i?
|
|
7999
|
+
const i=t<e,[n,s,r]=i?p_(t,e,o):p_(e,t,o)
|
|
7983
8000
|
if(!(s>=n))return[]
|
|
7984
8001
|
const a=s-n+1,l=new Array(a)
|
|
7985
8002
|
if(i)if(r<0)for(let e=0;e<a;++e)l[e]=(s-e)/-r
|
|
@@ -7987,85 +8004,85 @@ else for(let e=0;e<a;++e)l[e]=(s-e)*r
|
|
|
7987
8004
|
else if(r<0)for(let e=0;e<a;++e)l[e]=(n+e)/-r
|
|
7988
8005
|
else for(let e=0;e<a;++e)l[e]=(n+e)*r
|
|
7989
8006
|
return l}(o[0],o[o.length-1],null==e?10:e)},e.tickFormat=function(e,o){var i=t()
|
|
7990
|
-
return
|
|
8007
|
+
return j_(i[0],i[i.length-1],null==e?10:e,o)},e.nice=function(o){null==o&&(o=10)
|
|
7991
8008
|
var i,n,s=t(),r=0,a=s.length-1,l=s[r],c=s[a],d=10
|
|
7992
|
-
for(c<l&&(n=l,l=c,c=n,n=r,r=a,a=n);d-- >0;){if((n=
|
|
8009
|
+
for(c<l&&(n=l,l=c,c=n,n=r,r=a,a=n);d-- >0;){if((n=g_(l,c,o))===i)return s[r]=l,s[a]=c,t(s)
|
|
7993
8010
|
if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n
|
|
7994
8011
|
else{if(!(n<0))break
|
|
7995
|
-
l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}i=n}return e},e}function
|
|
7996
|
-
return e.copy=function(){return
|
|
8012
|
+
l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}i=n}return e},e}function G_(){var e=M_()
|
|
8013
|
+
return e.copy=function(){return I_(e,G_())},f_.apply(e,arguments),U_(e)}function W_(){var e,t=[],o=[],i=[]
|
|
7997
8014
|
function n(){var e=0,n=Math.max(1,o.length)
|
|
7998
|
-
for(i=new Array(n-1);++e<n;)i[e-1]=
|
|
7999
|
-
return s}function s(t){return null==t||isNaN(t=+t)?e:o[
|
|
8015
|
+
for(i=new Array(n-1);++e<n;)i[e-1]=v_(t,e/n)
|
|
8016
|
+
return s}function s(t){return null==t||isNaN(t=+t)?e:o[r_(i,t)]}return s.invertExtent=function(e){var n=o.indexOf(e)
|
|
8000
8017
|
return n<0?[NaN,NaN]:[n>0?i[n-1]:t[0],n<i.length?i[n]:t[t.length-1]]},s.domain=function(e){if(!arguments.length)return t.slice()
|
|
8001
8018
|
t=[]
|
|
8002
8019
|
for(let o of e)null==o||isNaN(o=+o)||t.push(o)
|
|
8003
|
-
return t.sort(
|
|
8004
|
-
const
|
|
8005
|
-
class
|
|
8020
|
+
return t.sort(e_),n()},s.range=function(e){return arguments.length?(o=Array.from(e),n()):o.slice()},s.unknown=function(t){return arguments.length?(e=t,s):e},s.quantiles=function(){return i.slice()},s.copy=function(){return W_().domain(t).range(o).unknown(e)},f_.apply(s,arguments)}L_=q_({thousands:",",grouping:[3],currency:["$",""]}),z_=L_.format,B_=L_.formatPrefix
|
|
8021
|
+
const K_="bottom-left",X_="bottom-right",Y_="top-left",Q_="top-right",J_="top",eI="show",tI="hide",oI="linear",iI="ordinal"
|
|
8022
|
+
class nI{constructor(e){this.defaultPadding=0,this.baseMarginPercentage=.04
|
|
8006
8023
|
const t={width:e.canvasWidth,height:e.canvasHeight},o=this.calculateGridDimensions(e.dies),i=Math.min(t.width,t.height),n={top:(t.height-i)/2,right:(t.width-i)/2,bottom:(t.height-i)/2,left:(t.width-i)/2},s={top:i*this.baseMarginPercentage,right:i*this.baseMarginPercentage,bottom:i*this.baseMarginPercentage,left:i*this.baseMarginPercentage}
|
|
8007
8024
|
this.margin=this.calculateMarginAddition(s,n),this.containerDimensions=this.calculateContainerDimensions(t,this.margin)
|
|
8008
8025
|
const r=Math.min(this.containerDimensions.width,this.containerDimensions.height)
|
|
8009
8026
|
this.horizontalScale=this.createHorizontalScale(e.quadrant,o,r),this.invertedHorizontalScale=this.createInvertedHorizontalScale(e.quadrant,o,r),this.verticalScale=this.createVerticalScale(e.quadrant,o,r),this.invertedVerticalScale=this.createInvertedVerticalScale(e.quadrant,o,r),this.dieDimensions={width:this.horizontalScale.bandwidth(),height:this.verticalScale.bandwidth()},this.radius=r/2}calculateGridDimensions(e){if(0===e.length||void 0===e[0])return{origin:{x:0,y:0},rows:0,cols:0}
|
|
8010
8027
|
const t={x:e[0].x,y:e[0].y},o={x:e[0].x,y:e[0].y}
|
|
8011
8028
|
for(const i of e)i.x<t.x&&(t.x=i.x),i.y<t.y&&(t.y=i.y),i.x>o.x&&(o.x=i.x),i.y>o.y&&(o.y=i.y)
|
|
8012
|
-
return{origin:t,rows:o.y-t.y+1,cols:o.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,o){const i=
|
|
8013
|
-
return e===
|
|
8014
|
-
return e===
|
|
8015
|
-
return e===
|
|
8016
|
-
return e===
|
|
8029
|
+
return{origin:t,rows:o.y-t.y+1,cols:o.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,o){const i=x_().domain(m_(t.origin.x,t.origin.x+t.cols)).paddingInner(0).paddingOuter(0).align(0).round(!1)
|
|
8030
|
+
return e===K_||e===Y_?i.range([0,o]):i.range([o,0])}createInvertedHorizontalScale(e,t,o){const i=W_().domain([0,o])
|
|
8031
|
+
return e===K_||e===Y_?i.range(m_(t.origin.x,t.origin.x+t.cols)):i.range(m_(t.origin.x,t.origin.x+t.cols).reverse())}createVerticalScale(e,t,o){const i=x_().domain(m_(t.origin.y,t.origin.y+t.rows)).paddingInner(this.defaultPadding).paddingOuter(0).align(0).round(!1)
|
|
8032
|
+
return e===K_||e===X_?i.range([o,0]):i.range([0,o])}createInvertedVerticalScale(e,t,o){const i=W_().domain([0,o])
|
|
8033
|
+
return e===K_||e===X_?i.range(m_(t.origin.y,t.origin.y+t.rows).reverse()):i.range(m_(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 sI{constructor(e,t,o,i,n){this.fontSizeFactor=.8,this.nonHighlightedOpacity=.3,this.emptyDieColor="rgba(218,223,236,1)",this.nanDieColor="rgba(122,122,122,1)",this.d3ColorScale=this.createD3ColorScale(e.colorScale,e.colorScaleMode),this.labelsFontSize=this.calculateLabelsFontSize(i,e.maxCharacters),this.diesRenderInfo=[]
|
|
8017
8034
|
for(const i of e.dies){const s=t(i.x)??0,r=o(i.y)??0
|
|
8018
|
-
this.diesRenderInfo.push({x:s+n.right,y:r+n.top,fillStyle:this.calculateFillStyle(i.value,e.colorScaleMode,e.highlightedValues),text:this.buildLabel(i.value,e.maxCharacters,e.dieLabelsHidden,e.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)?
|
|
8035
|
+
this.diesRenderInfo.push({x:s+n.right,y:r+n.top,fillStyle:this.calculateFillStyle(i.value,e.colorScaleMode,e.highlightedValues),text:this.buildLabel(i.value,e.maxCharacters,e.dieLabelsHidden,e.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)?G_().domain(e.values.map((e=>+e))).range(e.colors):w_().domain(e.values).range(e.colors)}dieHasData(e){return null!=e&&""!==e}buildLabel(e,t,o,i){if(o||!this.dieHasData(e))return""
|
|
8019
8036
|
const n=`${e}${i}`
|
|
8020
|
-
return n.length>t?`${n.substring(0,t)}…`:n}calculateOpacity(e,t){return t.length>0&&!t.some((t=>t===e))?this.nonHighlightedOpacity:1}isColorScaleLinear(e){return e===
|
|
8037
|
+
return n.length>t?`${n.substring(0,t)}…`:n}calculateOpacity(e,t){return t.length>0&&!t.some((t=>t===e))?this.nonHighlightedOpacity:1}isColorScaleLinear(e){return e===oI}isColorScaleOrdinal(e){return e===iI}calculateFillStyle(e,t,o){let i=this.emptyDieColor
|
|
8021
8038
|
if(this.dieHasData(e)&&(isNaN(+e)?i=this.nanDieColor:this.isColorScaleLinear(t)?i=this.d3ColorScale(+e):this.isColorScaleOrdinal(t)&&(i=this.d3ColorScale(e))),void 0===i)return this.emptyDieColor
|
|
8022
8039
|
let n=Pn(i)
|
|
8023
|
-
return null===n?this.emptyDieColor:(n=new Rn(n.r,n.g,n.b,this.calculateOpacity(e,o)),n.toStringWebRGBA())}}class
|
|
8040
|
+
return null===n?this.emptyDieColor:(n=new Rn(n.r,n.g,n.b,this.calculateOpacity(e,o)),n.toStringWebRGBA())}}class rI{constructor(e){this.computations=new nI(e),this.prerendering=new sI(e,this.horizontalScale,this.verticalScale,this.dieDimensions,this.margin),this.dataMap=new Map(e.dies.map((e=>[`${e.x}_${e.y}`,e])))}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}getWaferMapDie(e){return this.dataMap.get(`${e.x}_${e.y}`)}}class aI{constructor(e){this.wafermap=e,this.dies=e.dataManager.diesRenderInfo,this.dimensions=e.dataManager.dieDimensions,this.labelFontSize=e.dataManager.labelsFontSize}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?tI:eI,this.wafermap.hoverTransform=this.calculateHoverTransform()}calculateHoverTransform(){if(void 0!==this.wafermap.hoverDie){const e=this.wafermap.dataManager.horizontalScale(this.wafermap.hoverDie.x),t=this.wafermap.dataManager.verticalScale(this.wafermap.hoverDie.y),o=this.wafermap.transform.apply([e+this.wafermap.dataManager.margin.left,t+this.wafermap.dataManager.margin.top])
|
|
8024
8041
|
return`translate(${o[0]}, ${o[1]})`}return""}renderDies(){let e
|
|
8025
8042
|
this.dies.sort(((e,t)=>e.fillStyle>t.fillStyle?1:t.fillStyle>e.fillStyle?-1:0))
|
|
8026
8043
|
for(const t of this.dies)e||(this.wafermap.canvasContext.fillStyle=t.fillStyle),e&&t.fillStyle!==e.fillStyle&&t.fillStyle&&(this.wafermap.canvasContext.fillStyle=t.fillStyle),this.wafermap.canvasContext.fillRect(t.x,t.y,this.dimensions.width,this.dimensions.height),e=t}renderText(){const e=this.dimensions.width*this.dimensions.height*(this.wafermap.transform.k||1),t=this.labelFontSize
|
|
8027
8044
|
this.wafermap.canvasContext.font=`${t.toString()}px sans-serif`,this.wafermap.canvasContext.fillStyle="#ffffff",this.wafermap.canvasContext.textAlign="center",this.wafermap.canvasContext.lineCap="butt"
|
|
8028
8045
|
const o=this.wafermap.canvasContext.measureText("M")
|
|
8029
|
-
if(e>=50)for(const e of this.dies)this.wafermap.canvasContext.fillText(e.text,e.x+this.dimensions.width/2,e.y+this.dimensions.height/2+o.width/2,this.dimensions.width-this.dimensions.width/100*20)}clearCanvas(){this.wafermap.canvasContext.clearRect(0,0,this.wafermap.canvasWidth*this.wafermap.transform.k,this.wafermap.canvasHeight*this.wafermap.transform.k)}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)}}class
|
|
8030
|
-
t.k===this.minScale?(this.zoomTransform=
|
|
8031
|
-
function m(e){e.property("__zoom",
|
|
8032
|
-
return i===e.x&&n===e.y?e:new
|
|
8046
|
+
if(e>=50)for(const e of this.dies)this.wafermap.canvasContext.fillText(e.text,e.x+this.dimensions.width/2,e.y+this.dimensions.height/2+o.width/2,this.dimensions.width-this.dimensions.width/100*20)}clearCanvas(){this.wafermap.canvasContext.clearRect(0,0,this.wafermap.canvasWidth*this.wafermap.transform.k,this.wafermap.canvasHeight*this.wafermap.transform.k)}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)}}class lI{constructor(e){this.wafermap=e,this.zoomTransform=NS,this.minScale=1.1,this.minExtentPoint=[-100,-100],this.extentPadding=100,this.zoomBehavior=this.createZoomBehavior(),this.zoomBehavior(_C(this.wafermap.canvas))}rescale(e){const t=e.transform
|
|
8047
|
+
t.k===this.minScale?(this.zoomTransform=NS,this.zoomBehavior.transform(_C(this.wafermap.canvas),NS)):this.zoomTransform=t,this.wafermap.transform=this.zoomTransform}createZoomBehavior(){const e=function(){var e,t,o,i=US,n=GS,s=YS,r=KS,a=XS,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,h=Tk,u=a$("start","zoom","end"),p=500,g=0,v=10
|
|
8048
|
+
function m(e){e.property("__zoom",WS).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",S).filter(a).on("touchstart.zoom",_).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",R).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new BS(t,e.x,e.y)}function b(e,t,o){var i=t[0]-o[0]*e.k,n=t[1]-o[1]*e.k
|
|
8049
|
+
return i===e.x&&n===e.y?e:new BS(e.k,i,n)}function w(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function x(e,t,o,i){e.on("start.zoom",(function(){y(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){y(this,arguments).event(i).end()})).tween("zoom",(function(){var e=this,s=arguments,r=y(e,s).event(i),a=n.apply(e,s),l=null==o?w(a):"function"==typeof o?o.apply(e,s):o,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,s):t,p=h(d.invert(l).concat(c/d.k),u.invert(l).concat(c/u.k))
|
|
8033
8050
|
return function(e){if(1===e)e=u
|
|
8034
8051
|
else{var t=p(e),o=c/t[2]
|
|
8035
|
-
e=new
|
|
8052
|
+
e=new BS(o,l[0]-t[0]*o,l[1]-t[1]*o)}r.zoom(null,e)}}))}function y(e,t,o){return!o&&e.__zooming||new $(e,t)}function $(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=n.apply(e,t),this.taps=0}function C(e,...t){if(i.apply(this,arguments)){var o=y(this,t).event(e),n=this.__zoom,a=Math.max(l[0],Math.min(l[1],n.k*Math.pow(2,r.apply(this,arguments)))),d=IC(e)
|
|
8036
8053
|
if(o.wheel)o.mouse[0][0]===d[0]&&o.mouse[0][1]===d[1]||(o.mouse[1]=n.invert(o.mouse[0]=d)),clearTimeout(o.wheel)
|
|
8037
8054
|
else{if(n.k===a)return
|
|
8038
|
-
o.mouse=[d,n.invert(d)],
|
|
8039
|
-
|
|
8040
|
-
r.moved=t*t+o*o>g}r.event(e).zoom("mouse",s(b(r.that.__zoom,r.mouse[0]=
|
|
8041
|
-
|
|
8042
|
-
for(
|
|
8043
|
-
e&&(e=clearTimeout(e)),s&&(h.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),p)),
|
|
8044
|
-
for(
|
|
8055
|
+
o.mouse=[d,n.invert(d)],rS(this),o.start()}jS(e),o.wheel=setTimeout(h,150),o.zoom("mouse",s(b(f(n,a),o.mouse[0],o.mouse[1]),o.extent,c))}function h(){o.wheel=null,o.end()}}function k(e,...t){if(!o&&i.apply(this,arguments)){var n=e.currentTarget,r=y(this,t,!0).event(e),a=_C(e.view).on("mousemove.zoom",u,!0).on("mouseup.zoom",p,!0),l=IC(e,n),d=e.clientX,h=e.clientY
|
|
8056
|
+
AC(e.view),qS(e),r.mouse=[l,this.__zoom.invert(l)],rS(this),r.start()}function u(e){if(jS(e),!r.moved){var t=e.clientX-d,o=e.clientY-h
|
|
8057
|
+
r.moved=t*t+o*o>g}r.event(e).zoom("mouse",s(b(r.that.__zoom,r.mouse[0]=IC(e,n),r.mouse[1]),r.extent,c))}function p(e){a.on("mousemove.zoom mouseup.zoom",null),EC(e.view,r.moved),jS(e),r.event(e).end()}}function S(e,...t){if(i.apply(this,arguments)){var o=this.__zoom,r=IC(e.changedTouches?e.changedTouches[0]:e,this),a=o.invert(r),l=o.k*(e.shiftKey?.5:2),h=s(b(f(o,l),r,a),n.apply(this,t),c)
|
|
8058
|
+
jS(e),d>0?_C(this).transition().duration(d).call(x,h,r,e):_C(this).call(m.transform,h,r,e)}}function _(o,...n){if(i.apply(this,arguments)){var s,r,a,l,c=o.touches,d=c.length,h=y(this,n,o.changedTouches.length===d).event(o)
|
|
8059
|
+
for(qS(o),r=0;r<d;++r)l=[l=IC(a=c[r],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,s=!0,h.taps=1+!!e)
|
|
8060
|
+
e&&(e=clearTimeout(e)),s&&(h.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),p)),rS(this),h.start())}}function I(e,...t){if(this.__zooming){var o,i,n,r,a=y(this,t).event(e),l=e.changedTouches,d=l.length
|
|
8061
|
+
for(jS(e),o=0;o<d;++o)n=IC(i=l[o],this),a.touch0&&a.touch0[2]===i.identifier?a.touch0[0]=n:a.touch1&&a.touch1[2]===i.identifier&&(a.touch1[0]=n)
|
|
8045
8062
|
if(i=a.that.__zoom,a.touch1){var h=a.touch0[0],u=a.touch0[1],p=a.touch1[0],g=a.touch1[1],v=(v=p[0]-h[0])*v+(v=p[1]-h[1])*v,m=(m=g[0]-u[0])*m+(m=g[1]-u[1])*m
|
|
8046
8063
|
i=f(i,Math.sqrt(v/m)),n=[(h[0]+p[0])/2,(h[1]+p[1])/2],r=[(u[0]+g[0])/2,(u[1]+g[1])/2]}else{if(!a.touch0)return
|
|
8047
8064
|
n=a.touch0[0],r=a.touch0[1]}a.zoom("touch",s(b(i,n,r),a.extent,c))}}function R(e,...i){if(this.__zooming){var n,s,r=y(this,i).event(e),a=e.changedTouches,l=a.length
|
|
8048
|
-
for(
|
|
8065
|
+
for(qS(e),o&&clearTimeout(o),o=setTimeout((function(){o=null}),p),n=0;n<l;++n)s=a[n],r.touch0&&r.touch0[2]===s.identifier?delete r.touch0:r.touch1&&r.touch1[2]===s.identifier&&delete r.touch1
|
|
8049
8066
|
if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0])
|
|
8050
|
-
else if(r.end(),2===r.taps&&(s=
|
|
8067
|
+
else if(r.end(),2===r.taps&&(s=IC(s,this),Math.hypot(t[0]-s[0],t[1]-s[1])<v)){var c=_C(this).on("dblclick.zoom")
|
|
8051
8068
|
c&&c.apply(this,arguments)}}}return m.transform=function(e,t,o,i){var n=e.selection?e.selection():e
|
|
8052
|
-
n.property("__zoom",
|
|
8069
|
+
n.property("__zoom",WS),e!==n?x(e,t,o,i):n.interrupt().each((function(){y(this,arguments).event(i).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()}))},m.scaleBy=function(e,t,o,i){m.scaleTo(e,(function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)}),o,i)},m.scaleTo=function(e,t,o,i){m.transform(e,(function(){var e=n.apply(this,arguments),i=this.__zoom,r=null==o?w(e):"function"==typeof o?o.apply(this,arguments):o,a=i.invert(r),l="function"==typeof t?t.apply(this,arguments):t
|
|
8053
8070
|
return s(b(f(i,l),r,a),e,c)}),o,i)},m.translateBy=function(e,t,o,i){m.transform(e,(function(){return s(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof o?o.apply(this,arguments):o),n.apply(this,arguments),c)}),null,i)},m.translateTo=function(e,t,o,i,r){m.transform(e,(function(){var e=n.apply(this,arguments),r=this.__zoom,a=null==i?w(e):"function"==typeof i?i.apply(this,arguments):i
|
|
8054
|
-
return s(
|
|
8055
|
-
u.call(e,this.that,new
|
|
8056
|
-
return e===u?m:e},m.clickDistance=function(e){return arguments.length?(g=(e=+e)*e,m):Math.sqrt(g)},m.tapDistance=function(e){return arguments.length?(v=+e,m):v},m}().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=>
|
|
8057
|
-
return e}getZoomMax(e,t){return Math.ceil(t/e*100)}}class
|
|
8071
|
+
return s(NS.translate(a[0],a[1]).scale(r.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof o?-o.apply(this,arguments):-o),e,c)}),i,r)},$.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=_C(this.that).datum()
|
|
8072
|
+
u.call(e,this.that,new zS(e,{sourceEvent:this.sourceEvent,target:m,type:e,transform:this.that.__zoom,dispatch:u}),t)}},m.wheelDelta=function(e){return arguments.length?(r="function"==typeof e?e:LS(+e),m):r},m.filter=function(e){return arguments.length?(i="function"==typeof e?e:LS(!!e),m):i},m.touchable=function(e){return arguments.length?(a="function"==typeof e?e:LS(!!e),m):a},m.extent=function(e){return arguments.length?(n="function"==typeof e?e:LS([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),m):n},m.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],m):[l[0],l[1]]},m.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],m):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},m.constrain=function(e){return arguments.length?(s=e,m):s},m.duration=function(e){return arguments.length?(d=+e,m):d},m.interpolate=function(e){return arguments.length?(h=e,m):h},m.on=function(){var e=u.on.apply(u,arguments)
|
|
8073
|
+
return e===u?m:e},m.clickDistance=function(e){return arguments.length?(g=(e=+e)*e,m):Math.sqrt(g)},m.tapDistance=function(e){return arguments.length?(v=+e,m):v},m}().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=>ZS(this.wafermap.canvas).k>=this.minScale||"wheel"===e.type)).on("zoom",(e=>{this.rescale(e)}))
|
|
8074
|
+
return e}getZoomMax(e,t){return Math.ceil(t/e*100)}}class cI{constructor(e){this.wafermap=e}mousemove(e){const t={x:e.offsetX,y:e.offsetY}
|
|
8058
8075
|
if(!this.hoversOverDie(t))return void(this.wafermap.hoverDie=void 0)
|
|
8059
8076
|
const o=this.wafermap.transform.invert([t.x,t.y]),i=this.calculateDieCoordinates({x:o[0],y:o[1]})
|
|
8060
|
-
this.wafermap.hoverDie=this.wafermap.dataManager.getWaferMapDie(i)}mouseout(e){this.wafermap.hoverDie=void 0}calculateDieCoordinates(e){const t=this.wafermap.quadrant,o=t===
|
|
8077
|
+
this.wafermap.hoverDie=this.wafermap.dataManager.getWaferMapDie(i)}mouseout(e){this.wafermap.hoverDie=void 0}calculateDieCoordinates(e){const t=this.wafermap.quadrant,o=t===K_||t===Y_?Math.floor:Math.ceil,i=t===Y_||t===Q_?Math.floor:Math.ceil
|
|
8061
8078
|
return{x:o(this.wafermap.dataManager.invertedHorizontalScale(e.x-this.wafermap.dataManager.margin.left)),y:i(this.wafermap.dataManager.invertedVerticalScale(e.y-this.wafermap.dataManager.margin.top))}}hoversOverDie(e){const t=this.wafermap.canvasContext.getImageData(e.x,e.y,1,1).data
|
|
8062
8079
|
let o=0
|
|
8063
8080
|
for(const e of t)o+=e
|
|
8064
|
-
return o>0}}class
|
|
8081
|
+
return o>0}}class dI{constructor(e){this.wafermap=e,this.onWheelMove=e=>{e.preventDefault()},this.onMouseMove=e=>{this.hoverHandler.mousemove(e)},this.onMouseOut=e=>{this.hoverHandler.mouseout(e)},this.zoomHandler=new lI(e),this.hoverHandler=new cI(e),this.attachEvents()}detachEvents(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut),this.wafermap.canvas.removeEventListener("wheel",this.onWheelMove)}attachEvents(){this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut),this.wafermap.canvas.addEventListener("wheel",this.onWheelMove,{passive:!1})}}class hI extends Rt{constructor(){super(...arguments),this.quadrant=Y_,this.orientation=J_,this.maxCharacters=4,this.dieLabelsHidden=!1,this.dieLabelsSuffix="",this.colorScaleMode=oI,this.renderQueued=!1,this.transform=NS,this.hoverTransform="",this.hoverOpacity=tI,this.hoverWidth=0,this.hoverHeight=0,this.highlightedValues=[],this.dies=[],this.colorScale={colors:[],values:[]}}connectedCallback(){super.connectedCallback(),this.canvasContext=this.canvas.getContext("2d",{willReadFrequently:!0}),this.resizeObserver=this.createResizeObserver()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this)}render(){this.renderQueued=!1,this.initializeInternalModules(),this.renderer?.drawWafer()}queueRender(){this.$fastController.isConnected&&(this.renderQueued||(this.renderQueued=!0,u.queueUpdate((()=>this.render()))))}queueRenderHover(){this.$fastController.isConnected&&u.queueUpdate((()=>this.renderer?.renderHover()))}initializeInternalModules(){this.eventCoordinator?.detachEvents(),this.dataManager=new rI(this),this.renderer=new aI(this),this.eventCoordinator=new dI(this)}createResizeObserver(){const e=new ResizeObserver((e=>{const t=e[0]
|
|
8065
8082
|
if(void 0===t)return
|
|
8066
8083
|
const{height:o,width:i}=t.contentRect
|
|
8067
8084
|
this.canvas.width=i,this.canvas.height=o,this.canvasWidth=i,this.canvasHeight=o}))
|
|
8068
|
-
return e.observe(this),e}quadrantChanged(){this.queueRender()}orientationChanged(){this.queueRender()}maxCharactersChanged(){this.queueRender()}dieLabelsHiddenChanged(){this.queueRender()}dieLabelsSuffixChanged(){this.queueRender()}colorScaleModeChanged(){this.queueRender()}highlightedValuesChanged(){this.queueRender()}diesChanged(){this.queueRender()}colorScaleChanged(){this.queueRender()}transformChanged(){this.queueRender()}canvasWidthChanged(){this.queueRender()}canvasHeightChanged(){this.queueRender()}hoverDieChanged(){this.$emit("die-hover",{currentDie:this.hoverDie}),this.queueRenderHover()}}e([ne],
|
|
8069
|
-
const hI
|
|
8070
|
-
ai.getOrCreate().withPrefix("nimble").register(
|
|
8085
|
+
return e.observe(this),e}quadrantChanged(){this.queueRender()}orientationChanged(){this.queueRender()}maxCharactersChanged(){this.queueRender()}dieLabelsHiddenChanged(){this.queueRender()}dieLabelsSuffixChanged(){this.queueRender()}colorScaleModeChanged(){this.queueRender()}highlightedValuesChanged(){this.queueRender()}diesChanged(){this.queueRender()}colorScaleChanged(){this.queueRender()}transformChanged(){this.queueRender()}canvasWidthChanged(){this.queueRender()}canvasHeightChanged(){this.queueRender()}hoverDieChanged(){this.$emit("die-hover",{currentDie:this.hoverDie}),this.queueRenderHover()}}e([ne],hI.prototype,"quadrant",void 0),e([ne],hI.prototype,"orientation",void 0),e([ne({attribute:"max-characters",converter:oe})],hI.prototype,"maxCharacters",void 0),e([ne({attribute:"die-labels-hidden",mode:"boolean"})],hI.prototype,"dieLabelsHidden",void 0),e([ne({attribute:"die-labels-suffix"})],hI.prototype,"dieLabelsSuffix",void 0),e([ne({attribute:"color-scale-mode"})],hI.prototype,"colorScaleMode",void 0),e([m],hI.prototype,"canvasWidth",void 0),e([m],hI.prototype,"canvasHeight",void 0),e([m],hI.prototype,"transform",void 0),e([m],hI.prototype,"hoverTransform",void 0),e([m],hI.prototype,"hoverOpacity",void 0),e([m],hI.prototype,"hoverWidth",void 0),e([m],hI.prototype,"hoverHeight",void 0),e([m],hI.prototype,"hoverDie",void 0),e([m],hI.prototype,"highlightedValues",void 0),e([m],hI.prototype,"dies",void 0),e([m],hI.prototype,"colorScale",void 0)
|
|
8086
|
+
const uI=hI.compose({baseName:"wafer-map",template:QS,styles:JS})
|
|
8087
|
+
ai.getOrCreate().withPrefix("nimble").register(uI()),ai.tagFor(hI)}()
|
|
8071
8088
|
//# sourceMappingURL=all-components-bundle.min.js.map
|