@ni/nimble-components 18.12.4 → 18.12.5
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 +82 -14
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +679 -646
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/table/components/cell/styles.js +3 -6
- package/dist/esm/table/components/cell/styles.js.map +1 -1
- package/dist/esm/table/components/header/index.d.ts +1 -0
- package/dist/esm/table/components/header/index.js +5 -1
- package/dist/esm/table/components/header/index.js.map +1 -1
- package/dist/esm/table/components/header/styles.js +4 -2
- package/dist/esm/table/components/header/styles.js.map +1 -1
- package/dist/esm/table/components/header/template.js +4 -0
- package/dist/esm/table/components/header/template.js.map +1 -1
- package/dist/esm/table/components/row/index.js +1 -1
- package/dist/esm/table/components/row/index.js.map +1 -1
- package/dist/esm/table/components/row/styles.js +5 -0
- package/dist/esm/table/components/row/styles.js.map +1 -1
- package/dist/esm/table/components/row/template.js +3 -0
- package/dist/esm/table/components/row/template.js.map +1 -1
- package/dist/esm/table/index.d.ts +7 -1
- package/dist/esm/table/index.js +19 -0
- package/dist/esm/table/index.js.map +1 -1
- package/dist/esm/table/styles.js +13 -1
- package/dist/esm/table/styles.js.map +1 -1
- package/dist/esm/table/template.js +15 -2
- package/dist/esm/table/template.js.map +1 -1
- package/dist/esm/table-column/base/types.d.ts +1 -1
- package/dist/esm/table-column/base/types.js +14 -1
- package/dist/esm/table-column/base/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -3751,23 +3751,25 @@ class qf extends vp{constructor(){super(ju)}}fp("icon-tile-size",qf),no.tagFor(q
|
|
|
3751
3751
|
class jf extends vp{constructor(){super(Uu)}}fp("icon-times",jf),no.tagFor(jf)
|
|
3752
3752
|
class Uf extends vp{constructor(){super(Gu)}}fp("icon-trash",Uf),no.tagFor(Uf)
|
|
3753
3753
|
class Gf extends vp{constructor(){super(Wu)}}fp("icon-triangle",Gf),no.tagFor(Gf)
|
|
3754
|
-
class Wf extends vp{constructor(){super(Ku)}}fp("icon-triangle-two-lines-horizontal",Wf)
|
|
3755
|
-
|
|
3756
|
-
class Kf extends vp{constructor(){super(
|
|
3757
|
-
class Yf extends vp{constructor(){super(
|
|
3758
|
-
|
|
3759
|
-
class Jf extends vp{constructor(){super(
|
|
3760
|
-
class em extends vp{constructor(){super(
|
|
3761
|
-
class tm extends vp{constructor(){super(
|
|
3762
|
-
class im extends vp{constructor(){super(
|
|
3763
|
-
class om extends vp{constructor(){super(
|
|
3764
|
-
class nm extends vp{constructor(){super(
|
|
3765
|
-
class sm extends vp{constructor(){super(
|
|
3766
|
-
class rm extends vp{constructor(){super(
|
|
3767
|
-
class am extends vp{constructor(){super(
|
|
3768
|
-
class lm extends vp{constructor(){super(
|
|
3769
|
-
class cm extends vp{constructor(){super(
|
|
3770
|
-
|
|
3754
|
+
class Wf extends vp{constructor(){super(Ku)}}fp("icon-triangle-two-lines-horizontal",Wf)
|
|
3755
|
+
const Xf=no.tagFor(Wf)
|
|
3756
|
+
class Kf extends vp{constructor(){super(Yu)}}fp("icon-true-false-rectangle",Kf),no.tagFor(Kf)
|
|
3757
|
+
class Yf extends vp{constructor(){super(Qu)}}fp("icon-two-squares-in-brackets",Yf)
|
|
3758
|
+
const Qf=no.tagFor(Yf)
|
|
3759
|
+
class Jf extends vp{constructor(){super(Ju)}}fp("icon-two-triangles-between-lines",Jf),no.tagFor(Jf)
|
|
3760
|
+
class em extends vp{constructor(){super(ep)}}fp("icon-unlink",em),no.tagFor(em)
|
|
3761
|
+
class tm extends vp{constructor(){super(tp)}}fp("icon-unlock",tm),no.tagFor(tm)
|
|
3762
|
+
class im extends vp{constructor(){super(ip)}}fp("icon-upload",im),no.tagFor(im)
|
|
3763
|
+
class om extends vp{constructor(){super(op)}}fp("icon-user",om),no.tagFor(om)
|
|
3764
|
+
class nm extends vp{constructor(){super(np)}}fp("icon-watch",nm),no.tagFor(nm)
|
|
3765
|
+
class sm extends vp{constructor(){super(sp)}}fp("icon-waveform",sm),no.tagFor(sm)
|
|
3766
|
+
class rm extends vp{constructor(){super(rp)}}fp("icon-webvi-custom",rm),no.tagFor(rm)
|
|
3767
|
+
class am extends vp{constructor(){super(ap)}}fp("icon-webvi-host",am),no.tagFor(am)
|
|
3768
|
+
class lm extends vp{constructor(){super(lp)}}fp("icon-window-code",lm),no.tagFor(lm)
|
|
3769
|
+
class cm extends vp{constructor(){super(cp)}}fp("icon-window-text",cm),no.tagFor(cm)
|
|
3770
|
+
class dm extends vp{constructor(){super(dp)}}fp("icon-wrench-hammer",dm),no.tagFor(dm)
|
|
3771
|
+
class hm extends vp{constructor(){super(up)}}fp("icon-xmark-check",hm),no.tagFor(hm)
|
|
3772
|
+
const um=fe`
|
|
3771
3773
|
${bn("flex")}
|
|
3772
3774
|
|
|
3773
3775
|
:host {
|
|
@@ -3822,7 +3824,7 @@ const dm=fe`
|
|
|
3822
3824
|
outline: none;
|
|
3823
3825
|
}
|
|
3824
3826
|
`
|
|
3825
|
-
class
|
|
3827
|
+
class pm extends yi{get value(){return super.value}set value(e){super.value=`${e}`,this.$fastController.isConnected&&this.setAttribute("value",this.value)}connectedCallback(){super.connectedCallback(),this.setAttribute("value",this.value)}}const gm=pm.compose({baseName:"list-option",baseClass:yi,template:(e,t)=>G`
|
|
3826
3828
|
<template
|
|
3827
3829
|
aria-checked="${e=>e.ariaChecked}"
|
|
3828
3830
|
aria-disabled="${e=>e.ariaDisabled}"
|
|
@@ -3838,9 +3840,9 @@ class hm extends yi{get value(){return super.value}set value(e){super.value=`${e
|
|
|
3838
3840
|
</span>
|
|
3839
3841
|
${Be(0,t)}
|
|
3840
3842
|
</template>
|
|
3841
|
-
`,styles:
|
|
3842
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
3843
|
-
const
|
|
3843
|
+
`,styles:um})
|
|
3844
|
+
no.getOrCreate().withPrefix("nimble").register(gm()),no.tagFor(pm)
|
|
3845
|
+
const vm=fe`
|
|
3844
3846
|
${bn("grid")}
|
|
3845
3847
|
|
|
3846
3848
|
:host {
|
|
@@ -3888,7 +3890,7 @@ const pm=fe`
|
|
|
3888
3890
|
background: ${as(qn,.15)};
|
|
3889
3891
|
}
|
|
3890
3892
|
`))
|
|
3891
|
-
class
|
|
3893
|
+
class fm extends yo{}const mm=fm.compose({baseName:"menu",baseClass:yo,template:(e,t)=>G`
|
|
3892
3894
|
<template
|
|
3893
3895
|
slot="${e=>e.slot?e.slot:e.isNestedMenu()?"submenu":void 0}"
|
|
3894
3896
|
role="menu"
|
|
@@ -3897,9 +3899,9 @@ class gm extends yo{}const vm=gm.compose({baseName:"menu",baseClass:yo,template:
|
|
|
3897
3899
|
>
|
|
3898
3900
|
<slot ${Te("items")}></slot>
|
|
3899
3901
|
</template>
|
|
3900
|
-
`,styles:
|
|
3901
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
3902
|
-
const
|
|
3902
|
+
`,styles:vm})
|
|
3903
|
+
no.getOrCreate().withPrefix("nimble").register(mm()),no.tagFor(fm)
|
|
3904
|
+
const bm=fe`
|
|
3903
3905
|
${bn("inline-block")}
|
|
3904
3906
|
|
|
3905
3907
|
:host {
|
|
@@ -3915,7 +3917,7 @@ const fm=fe`
|
|
|
3915
3917
|
margin-top: ${ia};
|
|
3916
3918
|
margin-bottom: ${ia};
|
|
3917
3919
|
}
|
|
3918
|
-
`,
|
|
3920
|
+
`,wm=G`
|
|
3919
3921
|
<template
|
|
3920
3922
|
?open="${e=>e.open}"
|
|
3921
3923
|
@focusout="${(e,t)=>e.focusoutHandler(t.event)}"
|
|
@@ -3956,8 +3958,8 @@ const fm=fe`
|
|
|
3956
3958
|
</${cd}>
|
|
3957
3959
|
`)}
|
|
3958
3960
|
</template>
|
|
3959
|
-
`,
|
|
3960
|
-
class
|
|
3961
|
+
`,xm="auto"
|
|
3962
|
+
class ym extends _t{constructor(){super(...arguments),this.appearance=Pc,this.disabled=!1,this.contentHidden=!1,this.open=!1,this.position=xm,this.focusLastItemWhenOpened=!1,this.menuChangeHandler=()=>{this.setOpen(!1),this.toggleButton.focus()}}disconnectedCallback(){super.disconnectedCallback(),this.region&&this.region.removeEventListener(kr,this.menuChangeHandler)}toggleButtonChanged(e,t){this.region&&this.toggleButton&&(this.region.anchorElement=this.toggleButton)}regionChanged(e,t){e&&e.removeEventListener(kr,this.menuChangeHandler),this.region&&(this.toggleButton&&(this.region.anchorElement=this.toggleButton),this.region.addEventListener(kr,this.menuChangeHandler,{capture:!0}))}openChanged(e,t){if(this.toggleButton&&(this.toggleButton.checked=this.open),!this.open){const e={oldState:!0,newState:!1}
|
|
3961
3963
|
this.$emit("toggle",e)}}regionLoadedHandler(){this.focusLastItemWhenOpened?(this.focusLastMenuItem(),this.focusLastItemWhenOpened=!1):this.focusMenu()
|
|
3962
3964
|
this.$emit("toggle",{oldState:!1,newState:!0})}focusoutHandler(e){if(!this.open)return!0
|
|
3963
3965
|
const t=e.relatedTarget
|
|
@@ -3971,10 +3973,10 @@ for(;e;){if("menu"===e.getAttribute("role"))return e
|
|
|
3971
3973
|
if(!this.isSlotElement(e))return
|
|
3972
3974
|
{const t=e.assignedNodes()[0]
|
|
3973
3975
|
e=t instanceof HTMLElement?t:void 0}}}isSlotElement(e){return"SLOT"===e?.nodeName}focusMenu(){this.getMenu()?.focus()}focusLastMenuItem(){const e=this.getMenu()?.querySelectorAll("[role=menuitem]")
|
|
3974
|
-
if(e?.length){e[e.length-1].focus()}}}e([ne],
|
|
3975
|
-
const
|
|
3976
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
3977
|
-
const
|
|
3976
|
+
if(e?.length){e[e.length-1].focus()}}}e([ne],ym.prototype,"appearance",void 0),e([ne({mode:"boolean"})],ym.prototype,"disabled",void 0),e([ne({attribute:"content-hidden",mode:"boolean"})],ym.prototype,"contentHidden",void 0),e([ne({mode:"boolean"})],ym.prototype,"open",void 0),e([ne({attribute:"position"})],ym.prototype,"position",void 0),e([f],ym.prototype,"toggleButton",void 0),e([f],ym.prototype,"region",void 0),e([f],ym.prototype,"slottedMenus",void 0)
|
|
3977
|
+
const $m=ym.compose({baseName:"menu-button",template:wm,styles:bm,shadowOptions:{delegatesFocus:!0}})
|
|
3978
|
+
no.getOrCreate().withPrefix("nimble").register($m())
|
|
3979
|
+
const Cm=no.tagFor(ym),km=fe`
|
|
3978
3980
|
${bn("grid")}
|
|
3979
3981
|
|
|
3980
3982
|
:host {
|
|
@@ -4053,7 +4055,7 @@ const ym=no.tagFor(wm),$m=fe`
|
|
|
4053
4055
|
grid-column: 3;
|
|
4054
4056
|
}
|
|
4055
4057
|
`
|
|
4056
|
-
class
|
|
4058
|
+
class Sm extends xo{}const _m=Sm.compose({baseName:"menu-item",baseClass:xo,template:(e,t)=>G`
|
|
4057
4059
|
<template
|
|
4058
4060
|
role="${e=>e.role}"
|
|
4059
4061
|
aria-haspopup="${e=>e.hasSubmenu?"menu":void 0}"
|
|
@@ -4120,9 +4122,9 @@ class Cm extends xo{}const km=Cm.compose({baseName:"menu-item",baseClass:xo,temp
|
|
|
4120
4122
|
</${e.tagFor(oi)}>
|
|
4121
4123
|
`)}
|
|
4122
4124
|
</template>
|
|
4123
|
-
`,styles
|
|
4124
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
4125
|
-
const
|
|
4125
|
+
`,styles:km,expandCollapseGlyph:Cd.data})
|
|
4126
|
+
no.getOrCreate().withPrefix("nimble").register(_m()),no.tagFor(Sm)
|
|
4127
|
+
const Im="underline",Rm="outline",Mm="block",Am=fe`
|
|
4126
4128
|
${bn("inline-block")}
|
|
4127
4129
|
${Jp}
|
|
4128
4130
|
|
|
@@ -4270,12 +4272,12 @@ const Sm="underline",_m="outline",Im="block",Rm=fe`
|
|
|
4270
4272
|
order: 1;
|
|
4271
4273
|
padding-right: calc(${oa} / 4);
|
|
4272
4274
|
}
|
|
4273
|
-
`.withBehaviors(zc(
|
|
4275
|
+
`.withBehaviors(zc(Im,fe`
|
|
4274
4276
|
.root {
|
|
4275
4277
|
border-bottom-width: ${na};
|
|
4276
4278
|
padding-bottom: 0;
|
|
4277
4279
|
}
|
|
4278
|
-
`),zc(
|
|
4280
|
+
`),zc(Mm,fe`
|
|
4279
4281
|
.root {
|
|
4280
4282
|
background-color: rgba(${jr}, 0.1);
|
|
4281
4283
|
}
|
|
@@ -4293,14 +4295,14 @@ const Sm="underline",_m="outline",Im="block",Rm=fe`
|
|
|
4293
4295
|
:host([disabled]) .root {
|
|
4294
4296
|
background-color: rgba(${jr}, 0.07);
|
|
4295
4297
|
}
|
|
4296
|
-
`),zc(
|
|
4298
|
+
`),zc(Rm,fe`
|
|
4297
4299
|
.root {
|
|
4298
4300
|
border-width: ${na};
|
|
4299
4301
|
padding: 0;
|
|
4300
4302
|
}
|
|
4301
4303
|
`))
|
|
4302
|
-
class
|
|
4303
|
-
const
|
|
4304
|
+
class Om extends Mo{constructor(){super(...arguments),this.appearance=Im,this.errorVisible=!1}connectedCallback(){super.connectedCallback(),this.control.setAttribute("role","spinbutton")}}e([ne],Om.prototype,"appearance",void 0),e([ne({attribute:"error-text"})],Om.prototype,"errorText",void 0),e([ne({attribute:"error-visible",mode:"boolean"})],Om.prototype,"errorVisible",void 0)
|
|
4305
|
+
const Em=Om.compose({baseName:"number-field",baseClass:Mo,template:(e,t)=>G`
|
|
4304
4306
|
<template class="${e=>e.readOnly?"readonly":""}">
|
|
4305
4307
|
<label
|
|
4306
4308
|
part="label"
|
|
@@ -4375,7 +4377,7 @@ const Am=Mm.compose({baseName:"number-field",baseClass:Mo,template:(e,t)=>G`
|
|
|
4375
4377
|
${Be(0,t)}
|
|
4376
4378
|
</div>
|
|
4377
4379
|
</template>
|
|
4378
|
-
`,styles:
|
|
4380
|
+
`,styles:Am,shadowOptions:{delegatesFocus:!0},stepDownGlyph:G`
|
|
4379
4381
|
<${md}
|
|
4380
4382
|
class="step-up-down-button"
|
|
4381
4383
|
appearance="ghost"
|
|
@@ -4407,8 +4409,8 @@ const Am=Mm.compose({baseName:"number-field",baseClass:Mo,template:(e,t)=>G`
|
|
|
4407
4409
|
></${bp}>
|
|
4408
4410
|
${Up}
|
|
4409
4411
|
`})
|
|
4410
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
4411
|
-
const
|
|
4412
|
+
no.getOrCreate().withPrefix("nimble").register(Em()),no.tagFor(Om)
|
|
4413
|
+
const Vm=fe`
|
|
4412
4414
|
${bn("inline-flex")}
|
|
4413
4415
|
|
|
4414
4416
|
:host {
|
|
@@ -4495,7 +4497,7 @@ const Om=fe`
|
|
|
4495
4497
|
fill: rgba(${jr}, 0.3);
|
|
4496
4498
|
}
|
|
4497
4499
|
`
|
|
4498
|
-
class
|
|
4500
|
+
class Fm extends Vo{}const Hm=Fm.compose({baseName:"radio",baseClass:Vo,template:(e,t)=>G`
|
|
4499
4501
|
<template
|
|
4500
4502
|
role="radio"
|
|
4501
4503
|
class="${e=>e.checked?"checked":""} ${e=>e.readOnly?"readonly":""}"
|
|
@@ -4518,9 +4520,9 @@ class Em extends Vo{}const Vm=Em.compose({baseName:"radio",baseClass:Vo,template
|
|
|
4518
4520
|
<slot ${Te("defaultSlottedNodes")}></slot>
|
|
4519
4521
|
</label>
|
|
4520
4522
|
</template>
|
|
4521
|
-
`,styles:
|
|
4522
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
4523
|
-
const
|
|
4523
|
+
`,styles:Vm,checkedIndicator:Kd.data})
|
|
4524
|
+
no.getOrCreate().withPrefix("nimble").register(Hm()),no.tagFor(Fm)
|
|
4525
|
+
const Pm=fe`
|
|
4524
4526
|
${bn("inline-block")}
|
|
4525
4527
|
|
|
4526
4528
|
.positioning-region {
|
|
@@ -4545,7 +4547,7 @@ const Fm=fe`
|
|
|
4545
4547
|
color: ${Ll};
|
|
4546
4548
|
}
|
|
4547
4549
|
`
|
|
4548
|
-
class
|
|
4550
|
+
class Tm extends Ao{}const Lm=Tm.compose({baseName:"radio-group",baseClass:Ao,template:(e,t)=>G`
|
|
4549
4551
|
<template
|
|
4550
4552
|
role="radiogroup"
|
|
4551
4553
|
aria-disabled="${e=>e.disabled}"
|
|
@@ -4564,9 +4566,9 @@ class Hm extends Ao{}const Pm=Hm.compose({baseName:"radio-group",baseClass:Ao,te
|
|
|
4564
4566
|
></slot>
|
|
4565
4567
|
</div>
|
|
4566
4568
|
</template>
|
|
4567
|
-
`,styles:
|
|
4568
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
4569
|
-
const
|
|
4569
|
+
`,styles:Pm,shadowOptions:{delegatesFocus:!0}})
|
|
4570
|
+
no.getOrCreate().withPrefix("nimble").register(Lm()),no.tagFor(Tm)
|
|
4571
|
+
const Dm=fe`
|
|
4570
4572
|
${Qp}
|
|
4571
4573
|
${Jp}
|
|
4572
4574
|
|
|
@@ -4592,9 +4594,9 @@ const Tm=fe`
|
|
|
4592
4594
|
padding-bottom: 0;
|
|
4593
4595
|
}
|
|
4594
4596
|
`))
|
|
4595
|
-
class
|
|
4596
|
-
super.slottedOptionsChanged(e,t),i&&(this.value=i)}maxHeightChanged(){this.updateListboxMaxHeightCssVariable()}updateListboxMaxHeightCssVariable(){this.listbox&&this.listbox.style.setProperty("--ni-private-select-max-height",`${this.maxHeight}px`)}}e([ne],
|
|
4597
|
-
const
|
|
4597
|
+
class zm extends To{constructor(){super(...arguments),this.appearance=Xp,this.errorVisible=!1}setPositioning(){this.$fastController.isConnected&&(super.setPositioning(),this.updateListboxMaxHeightCssVariable())}slottedOptionsChanged(e,t){const i=this.value
|
|
4598
|
+
super.slottedOptionsChanged(e,t),i&&(this.value=i)}maxHeightChanged(){this.updateListboxMaxHeightCssVariable()}updateListboxMaxHeightCssVariable(){this.listbox&&this.listbox.style.setProperty("--ni-private-select-max-height",`${this.maxHeight}px`)}}e([ne],zm.prototype,"appearance",void 0),e([ne({attribute:"error-text"})],zm.prototype,"errorText",void 0),e([ne({attribute:"error-visible",mode:"boolean"})],zm.prototype,"errorVisible",void 0)
|
|
4599
|
+
const Bm=zm.compose({baseName:"select",baseClass:To,template:(e,t)=>G`
|
|
4598
4600
|
<template
|
|
4599
4601
|
class="${e=>[e.collapsible&&"collapsible",e.collapsible&&e.open&&"open",e.disabled&&"disabled",e.collapsible&&e.position].filter(Boolean).join(" ")}"
|
|
4600
4602
|
aria-activedescendant="${e=>e.ariaActiveDescendant}"
|
|
@@ -4647,15 +4649,15 @@ const Dm=Lm.compose({baseName:"select",baseClass:To,template:(e,t)=>G`
|
|
|
4647
4649
|
></slot>
|
|
4648
4650
|
</div>
|
|
4649
4651
|
</template>
|
|
4650
|
-
`,styles:
|
|
4652
|
+
`,styles:Dm,indicator:yd.data,end:G`
|
|
4651
4653
|
<${bp}
|
|
4652
4654
|
severity="error"
|
|
4653
4655
|
class="error-icon"
|
|
4654
4656
|
></${bp}>
|
|
4655
4657
|
${Up}
|
|
4656
4658
|
`})
|
|
4657
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
4658
|
-
const
|
|
4659
|
+
no.getOrCreate().withPrefix("nimble").register(Bm()),no.tagFor(zm)
|
|
4660
|
+
const Nm=fe`
|
|
4659
4661
|
${bn("inline-flex")}
|
|
4660
4662
|
|
|
4661
4663
|
:host {
|
|
@@ -4789,7 +4791,7 @@ const zm=fe`
|
|
|
4789
4791
|
:host {
|
|
4790
4792
|
--ni-private-spinner-bits-background-color: ${qn};
|
|
4791
4793
|
}
|
|
4792
|
-
`)),
|
|
4794
|
+
`)),Zm=G`
|
|
4793
4795
|
<template role="progressbar">
|
|
4794
4796
|
<div class="container">
|
|
4795
4797
|
<div class="bit1"></div>
|
|
@@ -4797,9 +4799,9 @@ const zm=fe`
|
|
|
4797
4799
|
</div>
|
|
4798
4800
|
</template>
|
|
4799
4801
|
`
|
|
4800
|
-
class
|
|
4801
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
4802
|
-
const
|
|
4802
|
+
class qm extends _t{}const jm=qm.compose({baseName:"spinner",template:Zm,styles:Nm})
|
|
4803
|
+
no.getOrCreate().withPrefix("nimble").register(jm()),no.tagFor(qm)
|
|
4804
|
+
const Um=fe`
|
|
4803
4805
|
${bn("inline-flex")}
|
|
4804
4806
|
|
|
4805
4807
|
:host {
|
|
@@ -4959,7 +4961,7 @@ const qm=fe`
|
|
|
4959
4961
|
--ni-private-switch-indicator-border-color: ${qn};
|
|
4960
4962
|
--ni-private-switch-indicator-border-disabled-color: ${as(qn,.3)};
|
|
4961
4963
|
}
|
|
4962
|
-
`)),
|
|
4964
|
+
`)),Gm=G`
|
|
4963
4965
|
<template
|
|
4964
4966
|
role="switch"
|
|
4965
4967
|
aria-checked="${e=>e.checked}"
|
|
@@ -4994,15 +4996,15 @@ const qm=fe`
|
|
|
4994
4996
|
</div>
|
|
4995
4997
|
</template>
|
|
4996
4998
|
`
|
|
4997
|
-
class
|
|
4998
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
4999
|
-
class
|
|
4999
|
+
class Wm extends Bo{}const Xm=Wm.compose({baseClass:Bo,baseName:"switch",template:Gm,styles:Um})
|
|
5000
|
+
no.getOrCreate().withPrefix("nimble").register(Xm()),no.tagFor(Wm)
|
|
5001
|
+
class Km extends Zo{}const Ym=Km.compose({baseName:"tab",baseClass:Zo,template:(e,t)=>G`
|
|
5000
5002
|
<template slot="tab" role="tab" aria-disabled="${e=>e.disabled}">
|
|
5001
5003
|
<slot></slot>
|
|
5002
5004
|
</template>
|
|
5003
5005
|
`,styles:Kc})
|
|
5004
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
5005
|
-
const
|
|
5006
|
+
no.getOrCreate().withPrefix("nimble").register(Ym()),no.tagFor(Km)
|
|
5007
|
+
const Qm=fe`
|
|
5006
5008
|
${bn("block")}
|
|
5007
5009
|
|
|
5008
5010
|
:host {
|
|
@@ -5012,11 +5014,11 @@ const Km=fe`
|
|
|
5012
5014
|
padding-top: ${oa};
|
|
5013
5015
|
}
|
|
5014
5016
|
`
|
|
5015
|
-
class
|
|
5017
|
+
class Jm extends No{}const eb=Jm.compose({baseName:"tab-panel",baseClass:No,template:(e,t)=>G`
|
|
5016
5018
|
<template slot="tabpanel" role="tabpanel">
|
|
5017
5019
|
<slot></slot>
|
|
5018
5020
|
</template>
|
|
5019
|
-
`,styles:
|
|
5021
|
+
`,styles:Qm})
|
|
5020
5022
|
|
|
5021
5023
|
;/**
|
|
5022
5024
|
* table-core
|
|
@@ -5028,10 +5030,10 @@ class Ym extends No{}const Qm=Ym.compose({baseName:"tab-panel",baseClass:No,temp
|
|
|
5028
5030
|
*
|
|
5029
5031
|
* @license MIT
|
|
5030
5032
|
*/
|
|
5031
|
-
function
|
|
5033
|
+
function tb(e,t){return"function"==typeof e?e(t):e}function ib(e,t){return i=>{t.setState((t=>({...t,[e]:tb(i,t[e])})))}}function ob(e){return e instanceof Function}function nb(e,t){const i=[],o=e=>{e.forEach((e=>{i.push(e)
|
|
5032
5034
|
const n=t(e)
|
|
5033
5035
|
null!=n&&n.length&&o(n)}))}
|
|
5034
|
-
return o(e),i}function
|
|
5036
|
+
return o(e),i}function sb(e,t,i){let o,n=[]
|
|
5035
5037
|
return()=>{let s
|
|
5036
5038
|
i.key&&i.debug&&(s=Date.now())
|
|
5037
5039
|
const r=e()
|
|
@@ -5039,36 +5041,36 @@ if(!(r.length!==n.length||r.some(((e,t)=>n[t]!==e))))return o
|
|
|
5039
5041
|
let a
|
|
5040
5042
|
if(n=r,i.key&&i.debug&&(a=Date.now()),o=t(...r),null==i||null==i.onChange||i.onChange(o),i.key&&i.debug&&null!=i&&i.debug()){const e=Math.round(100*(Date.now()-s))/100,t=Math.round(100*(Date.now()-a))/100,o=t/16,n=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e
|
|
5041
5043
|
return e}
|
|
5042
|
-
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*o,120))}deg 100% 31%);`,null==i?void 0:i.key)}return o}}function
|
|
5044
|
+
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*o,120))}deg 100% 31%);`,null==i?void 0:i.key)}return o}}function rb(e,t,i){var o
|
|
5043
5045
|
let n={id:null!=(o=i.id)?o:t.id,column:t,index:i.index,isPlaceholder:!!i.isPlaceholder,placeholderId:i.placeholderId,depth:i.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=i=>{i.subHeaders&&i.subHeaders.length&&i.subHeaders.map(t),e.push(i)}
|
|
5044
5046
|
return t(n),e},getContext:()=>({table:e,header:n,column:t})}
|
|
5045
|
-
return e._features.forEach((t=>{Object.assign(n,null==t.createHeader?void 0:t.createHeader(n,e))})),n}no.getOrCreate().withPrefix("nimble").register(
|
|
5046
|
-
const
|
|
5047
|
+
return e._features.forEach((t=>{Object.assign(n,null==t.createHeader?void 0:t.createHeader(n,e))})),n}no.getOrCreate().withPrefix("nimble").register(eb()),no.tagFor(Jm)
|
|
5048
|
+
const ab={createTable:e=>({getHeaderGroups:sb((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,i,o,n)=>{var s,r
|
|
5047
5049
|
const a=null!=(s=null==o?void 0:o.map((e=>i.find((t=>t.id===e)))).filter(Boolean))?s:[],l=null!=(r=null==n?void 0:n.map((e=>i.find((t=>t.id===e)))).filter(Boolean))?r:[]
|
|
5048
|
-
return
|
|
5049
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterHeaderGroups:
|
|
5050
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftHeaderGroups:
|
|
5051
|
-
return
|
|
5052
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightHeaderGroups:
|
|
5053
|
-
return
|
|
5054
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFooterGroups:
|
|
5055
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFooterGroups:
|
|
5056
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFooterGroups:
|
|
5057
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFooterGroups:
|
|
5058
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFlatHeaders:
|
|
5059
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFlatHeaders:
|
|
5060
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFlatHeaders:
|
|
5061
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFlatHeaders:
|
|
5062
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterLeafHeaders:
|
|
5050
|
+
return lb(t,[...a,...i.filter((e=>!(null!=o&&o.includes(e.id)||null!=n&&n.includes(e.id)))),...l],e)}),{key:!1,debug:()=>{var t
|
|
5051
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterHeaderGroups:sb((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,i,o,n)=>lb(t,i=i.filter((e=>!(null!=o&&o.includes(e.id)||null!=n&&n.includes(e.id)))),e,"center")),{key:!1,debug:()=>{var t
|
|
5052
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftHeaderGroups:sb((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,i,o)=>{var n
|
|
5053
|
+
return lb(t,null!=(n=null==o?void 0:o.map((e=>i.find((t=>t.id===e)))).filter(Boolean))?n:[],e,"left")}),{key:!1,debug:()=>{var t
|
|
5054
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightHeaderGroups:sb((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,i,o)=>{var n
|
|
5055
|
+
return lb(t,null!=(n=null==o?void 0:o.map((e=>i.find((t=>t.id===e)))).filter(Boolean))?n:[],e,"right")}),{key:!1,debug:()=>{var t
|
|
5056
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFooterGroups:sb((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t
|
|
5057
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFooterGroups:sb((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t
|
|
5058
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFooterGroups:sb((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t
|
|
5059
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFooterGroups:sb((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t
|
|
5060
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFlatHeaders:sb((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t
|
|
5061
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFlatHeaders:sb((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t
|
|
5062
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFlatHeaders:sb((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t
|
|
5063
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFlatHeaders:sb((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t
|
|
5064
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterLeafHeaders:sb((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t
|
|
5063
5065
|
return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t
|
|
5064
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftLeafHeaders:
|
|
5066
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftLeafHeaders:sb((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t
|
|
5065
5067
|
return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t
|
|
5066
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightLeafHeaders:
|
|
5068
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightLeafHeaders:sb((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t
|
|
5067
5069
|
return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t
|
|
5068
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeafHeaders:
|
|
5070
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeafHeaders:sb((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,i)=>{var o,n,s,r,a,l
|
|
5069
5071
|
return[...null!=(o=null==(n=e[0])?void 0:n.headers)?o:[],...null!=(s=null==(r=t[0])?void 0:r.headers)?s:[],...null!=(a=null==(l=i[0])?void 0:l.headers)?a:[]].map((e=>e.getLeafHeaders())).flat()}),{key:!1,debug:()=>{var t
|
|
5070
5072
|
return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}})})}
|
|
5071
|
-
function
|
|
5073
|
+
function lb(e,t,i,o){var n,s
|
|
5072
5074
|
let r=0
|
|
5073
5075
|
const a=function(e,t){void 0===t&&(t=1),r=Math.max(r,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var i
|
|
5074
5076
|
null!=(i=e.columns)&&i.length&&a(e.columns,t+1)}),0)}
|
|
@@ -5078,16 +5080,16 @@ const c=(e,t)=>{const n={depth:t,id:[o,`${t}`].filter(Boolean).join("_"),headers
|
|
|
5078
5080
|
e.forEach((e=>{const r=[...s].reverse()[0]
|
|
5079
5081
|
let a,l=!1
|
|
5080
5082
|
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)
|
|
5081
|
-
else{const n=
|
|
5082
|
-
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)=>
|
|
5083
|
+
else{const n=rb(i,a,{id:[o,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})
|
|
5084
|
+
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)=>rb(i,e,{depth:r,index:t})))
|
|
5083
5085
|
c(d,r-1),l.reverse()
|
|
5084
5086
|
const h=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,i=0,o=[0]
|
|
5085
5087
|
e.subHeaders&&e.subHeaders.length?(o=[],h(e.subHeaders).forEach((e=>{let{colSpan:i,rowSpan:n}=e
|
|
5086
5088
|
t+=i,o.push(n)}))):t=1
|
|
5087
5089
|
return i+=Math.min(...o),e.colSpan=t,e.rowSpan=i,{colSpan:t,rowSpan:i}}))
|
|
5088
|
-
return h(null!=(n=null==(s=l[0])?void 0:s.headers)?n:[]),l}const
|
|
5090
|
+
return h(null!=(n=null==(s=l[0])?void 0:s.headers)?n:[]),l}const cb={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},db={getDefaultColumnDef:()=>cb,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:ib("columnSizing",e),onColumnSizingInfoChange:ib("columnSizingInfo",e)}),createColumn:(e,t)=>({getSize:()=>{var i,o,n
|
|
5089
5091
|
const s=t.getState().columnSizing[e.id]
|
|
5090
|
-
return Math.min(Math.max(null!=(i=e.columnDef.minSize)?i:
|
|
5092
|
+
return Math.min(Math.max(null!=(i=e.columnDef.minSize)?i:cb.minSize,null!=(o=null!=s?s:e.columnDef.size)?o:cb.size),null!=(n=e.columnDef.maxSize)?n:cb.maxSize)},getStart:i=>{const o=i?"left"===i?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns(),n=o.findIndex((t=>t.id===e.id))
|
|
5091
5093
|
if(n>0){const e=o[n-1]
|
|
5092
5094
|
return e.getStart(i)+e.getSize()}return 0},resetSize:()=>{t.setColumnSizing((t=>{let{[e.id]:i,...o}=t
|
|
5093
5095
|
return o}))},getCanResize:()=>{var i,o
|
|
@@ -5097,24 +5099,24 @@ e.subHeaders.length?e.subHeaders.forEach(i):t+=null!=(o=e.column.getSize())?o:0}
|
|
|
5097
5099
|
return i(e),t},getStart:()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1]
|
|
5098
5100
|
return t.getStart()+t.getSize()}return 0},getResizeHandler:()=>{const i=t.getColumn(e.column.id),o=null==i?void 0:i.getCanResize()
|
|
5099
5101
|
return n=>{if(!i||!o)return
|
|
5100
|
-
if(null==n.persist||n.persist(),
|
|
5101
|
-
const s=e.getSize(),r=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[i.id,i.getSize()]],a=
|
|
5102
|
+
if(null==n.persist||n.persist(),ub(n)&&n.touches&&n.touches.length>1)return
|
|
5103
|
+
const s=e.getSize(),r=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[i.id,i.getSize()]],a=ub(n)?Math.round(n.touches[0].clientX):n.clientX,l={},c=(e,i)=>{"number"==typeof i&&(t.setColumnSizingInfo((e=>{var t,o
|
|
5102
5104
|
const n=i-(null!=(t=null==e?void 0:e.startOffset)?t:0),s=Math.max(n/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999)
|
|
5103
5105
|
return e.columnSizingStart.forEach((e=>{let[t,i]=e
|
|
5104
5106
|
l[t]=Math.round(100*Math.max(i+i*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
|
|
5105
|
-
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
|
|
5107
|
+
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 hb)return hb
|
|
5106
5108
|
let e=!1
|
|
5107
5109
|
try{const t={get passive(){return e=!0,!1}},i=()=>{}
|
|
5108
|
-
window.addEventListener("test",i,t),window.removeEventListener("test",i)}catch(t){e=!1}return
|
|
5109
|
-
|
|
5110
|
+
window.addEventListener("test",i,t),window.removeEventListener("test",i)}catch(t){e=!1}return hb=e,hb}()&&{passive:!1}
|
|
5111
|
+
ub(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:i.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 i
|
|
5110
5112
|
e.setColumnSizing(t?{}:null!=(i=e.initialState.columnSizing)?i:{})},resetHeaderSizeInfo:t=>{var i
|
|
5111
5113
|
e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(i=e.initialState.columnSizingInfo)?i:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},getTotalSize:()=>{var t,i
|
|
5112
5114
|
return null!=(t=null==(i=e.getHeaderGroups()[0])?void 0:i.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},getLeftTotalSize:()=>{var t,i
|
|
5113
5115
|
return null!=(t=null==(i=e.getLeftHeaderGroups()[0])?void 0:i.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},getCenterTotalSize:()=>{var t,i
|
|
5114
5116
|
return null!=(t=null==(i=e.getCenterHeaderGroups()[0])?void 0:i.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},getRightTotalSize:()=>{var t,i
|
|
5115
5117
|
return null!=(t=null==(i=e.getRightHeaderGroups()[0])?void 0:i.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}})}
|
|
5116
|
-
let
|
|
5117
|
-
function
|
|
5118
|
+
let hb=null
|
|
5119
|
+
function ub(e){return"touchstart"===e.type}const pb={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:ib("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,i=!1
|
|
5118
5120
|
return{_autoResetExpanded:()=>{var o,n
|
|
5119
5121
|
if(t){if(null!=(o=null!=(n=e.options.autoResetAll)?n:e.options.autoResetExpanded)?o:!e.options.manualExpanding){if(i)return
|
|
5120
5122
|
i=!0,e._queue((()=>{e.resetExpanded(),i=!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 i,o
|
|
@@ -5131,57 +5133,57 @@ return i}return o}))},getIsExpanded:()=>{var i
|
|
|
5131
5133
|
const o=t.getState().expanded
|
|
5132
5134
|
return!!(null!=(i=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?i:!0===o||(null==o?void 0:o[e.id]))},getCanExpand:()=>{var i,o,n
|
|
5133
5135
|
return null!=(i=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?i:(null==(o=t.options.enableExpanding)||o)&&!(null==(n=e.subRows)||!n.length)},getToggleExpandedHandler:()=>{const t=e.getCanExpand()
|
|
5134
|
-
return()=>{t&&e.toggleExpanded()}}})},
|
|
5136
|
+
return()=>{t&&e.toggleExpanded()}}})},gb=(e,t,i)=>{var o
|
|
5135
5137
|
const n=i.toLowerCase()
|
|
5136
5138
|
return Boolean(null==(o=e.getValue(t))?void 0:o.toLowerCase().includes(n))}
|
|
5137
|
-
|
|
5138
|
-
const
|
|
5139
|
+
gb.autoRemove=e=>kb(e)
|
|
5140
|
+
const vb=(e,t,i)=>{var o
|
|
5139
5141
|
return Boolean(null==(o=e.getValue(t))?void 0:o.includes(i))}
|
|
5140
|
-
|
|
5141
|
-
const
|
|
5142
|
+
vb.autoRemove=e=>kb(e)
|
|
5143
|
+
const fb=(e,t,i)=>{var o
|
|
5142
5144
|
return(null==(o=e.getValue(t))?void 0:o.toLowerCase())===i.toLowerCase()}
|
|
5143
|
-
|
|
5144
|
-
const
|
|
5145
|
+
fb.autoRemove=e=>kb(e)
|
|
5146
|
+
const mb=(e,t,i)=>{var o
|
|
5145
5147
|
return null==(o=e.getValue(t))?void 0:o.includes(i)}
|
|
5146
|
-
|
|
5147
|
-
const
|
|
5148
|
+
mb.autoRemove=e=>kb(e)||!(null!=e&&e.length)
|
|
5149
|
+
const bb=(e,t,i)=>!i.some((i=>{var o
|
|
5148
5150
|
return!(null!=(o=e.getValue(t))&&o.includes(i))}))
|
|
5149
|
-
|
|
5150
|
-
const
|
|
5151
|
+
bb.autoRemove=e=>kb(e)||!(null!=e&&e.length)
|
|
5152
|
+
const wb=(e,t,i)=>i.some((i=>{var o
|
|
5151
5153
|
return null==(o=e.getValue(t))?void 0:o.includes(i)}))
|
|
5152
|
-
|
|
5153
|
-
const
|
|
5154
|
-
|
|
5155
|
-
const
|
|
5156
|
-
|
|
5157
|
-
const
|
|
5154
|
+
wb.autoRemove=e=>kb(e)||!(null!=e&&e.length)
|
|
5155
|
+
const xb=(e,t,i)=>e.getValue(t)===i
|
|
5156
|
+
xb.autoRemove=e=>kb(e)
|
|
5157
|
+
const yb=(e,t,i)=>e.getValue(t)==i
|
|
5158
|
+
yb.autoRemove=e=>kb(e)
|
|
5159
|
+
const $b=(e,t,i)=>{let[o,n]=i
|
|
5158
5160
|
const s=e.getValue(t)
|
|
5159
5161
|
return s>=o&&s<=n}
|
|
5160
|
-
|
|
5162
|
+
$b.resolveFilterValue=e=>{let[t,i]=e,o="number"!=typeof t?parseFloat(t):t,n="number"!=typeof i?parseFloat(i):i,s=null===t||Number.isNaN(o)?-1/0:o,r=null===i||Number.isNaN(n)?1/0:n
|
|
5161
5163
|
if(s>r){const e=s
|
|
5162
|
-
s=r,r=e}return[s,r]}
|
|
5163
|
-
const
|
|
5164
|
-
function
|
|
5164
|
+
s=r,r=e}return[s,r]},$b.autoRemove=e=>kb(e)||kb(e[0])&&kb(e[1])
|
|
5165
|
+
const Cb={includesString:gb,includesStringSensitive:vb,equalsString:fb,arrIncludes:mb,arrIncludesAll:bb,arrIncludesSome:wb,equals:xb,weakEquals:yb,inNumberRange:$b}
|
|
5166
|
+
function kb(e){return null==e||""===e}const Sb={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:ib("columnFilters",e),onGlobalFilterChange:ib("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var i,o
|
|
5165
5167
|
const n=null==(i=e.getCoreRowModel().flatRows[0])||null==(o=i._getAllCellsByColumnId()[t.id])?void 0:o.getValue()
|
|
5166
5168
|
return"string"==typeof n||"number"==typeof n}}),createColumn:(e,t)=>({getAutoFilterFn:()=>{const i=t.getCoreRowModel().flatRows[0],o=null==i?void 0:i.getValue(e.id)
|
|
5167
|
-
return"string"==typeof o?
|
|
5168
|
-
return
|
|
5169
|
+
return"string"==typeof o?Cb.includesString:"number"==typeof o?Cb.inNumberRange:"boolean"==typeof o||null!==o&&"object"==typeof o?Cb.equals:Array.isArray(o)?Cb.arrIncludes:Cb.weakEquals},getFilterFn:()=>{var i,o
|
|
5170
|
+
return ob(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(i=null==(o=t.options.filterFns)?void 0:o[e.columnDef.filterFn])?i:Cb[e.columnDef.filterFn]},getCanFilter:()=>{var i,o,n
|
|
5169
5171
|
return(null==(i=e.columnDef.enableColumnFilter)||i)&&(null==(o=t.options.enableColumnFilters)||o)&&(null==(n=t.options.enableFilters)||n)&&!!e.accessorFn},getCanGlobalFilter:()=>{var i,o,n,s
|
|
5170
5172
|
return(null==(i=e.columnDef.enableGlobalFilter)||i)&&(null==(o=t.options.enableGlobalFilter)||o)&&(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 i,o
|
|
5171
5173
|
return null==(i=t.getState().columnFilters)||null==(o=i.find((t=>t.id===e.id)))?void 0:o.value},getFilterIndex:()=>{var i,o
|
|
5172
|
-
return null!=(i=null==(o=t.getState().columnFilters)?void 0:o.findIndex((t=>t.id===e.id)))?i:-1},setFilterValue:i=>{t.setColumnFilters((t=>{const o=e.getFilterFn(),n=null==t?void 0:t.find((t=>t.id===e.id)),s=
|
|
5174
|
+
return null!=(i=null==(o=t.getState().columnFilters)?void 0:o.findIndex((t=>t.id===e.id)))?i:-1},setFilterValue:i=>{t.setColumnFilters((t=>{const o=e.getFilterFn(),n=null==t?void 0:t.find((t=>t.id===e.id)),s=tb(i,n?n.value:void 0)
|
|
5173
5175
|
var r
|
|
5174
|
-
if(
|
|
5176
|
+
if(_b(o,s,e))return null!=(r=null==t?void 0:t.filter((t=>t.id!==e.id)))?r:[]
|
|
5175
5177
|
const a={id:e.id,value:s}
|
|
5176
5178
|
var l
|
|
5177
|
-
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:()=>
|
|
5179
|
+
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:()=>Cb.includesString,getGlobalFilterFn:()=>{var t,i
|
|
5178
5180
|
const{globalFilterFn:o}=e.options
|
|
5179
|
-
return
|
|
5181
|
+
return ob(o)?o:"auto"===o?e.getGlobalAutoFilterFn():null!=(t=null==(i=e.options.filterFns)?void 0:i[o])?t:Cb[o]},setColumnFilters:t=>{const i=e.getAllLeafColumns()
|
|
5180
5182
|
null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var o
|
|
5181
|
-
return null==(o=
|
|
5182
|
-
if(t){if(
|
|
5183
|
+
return null==(o=tb(t,e))?void 0:o.filter((e=>{const t=i.find((t=>t.id===e.id))
|
|
5184
|
+
if(t){if(_b(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 i,o
|
|
5183
5185
|
e.setColumnFilters(t?[]:null!=(i=null==(o=e.initialState)?void 0:o.columnFilters)?i:[])},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()}})}
|
|
5184
|
-
function
|
|
5186
|
+
function _b(e,t,i){return!(!e||!e.autoRemove)&&e.autoRemove(t,i)||void 0===t||"string"==typeof t&&!t}const Ib={sum:(e,t,i)=>i.reduce(((t,i)=>{const o=i.getValue(e)
|
|
5185
5187
|
return t+("number"==typeof o?o:0)}),0),min:(e,t,i)=>{let o
|
|
5186
5188
|
return i.forEach((t=>{const i=t.getValue(e)
|
|
5187
5189
|
null!=i&&(o>i||void 0===o&&i>=i)&&(o=i)})),o},max:(e,t,i)=>{let o
|
|
@@ -5194,13 +5196,13 @@ null!=n&&(n=+n)>=n&&(++i,o+=n)})),i)return o/i},median:(e,t)=>{if(!t.length)retu
|
|
|
5194
5196
|
let i=0,o=0
|
|
5195
5197
|
return t.forEach((t=>{let n=t.getValue(e)
|
|
5196
5198
|
"number"==typeof n&&(i=Math.min(i,n),o=Math.max(o,n))})),(i+o)/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}
|
|
5197
|
-
const
|
|
5199
|
+
const Rb={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:ib("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 i
|
|
5198
5200
|
return e.setRowSelection(t?{}:null!=(i=e.initialState.rowSelection)?i:{})},toggleAllRowsSelected:t=>{e.setRowSelection((i=>{t=void 0!==t?t:!e.getIsAllRowsSelected()
|
|
5199
5201
|
const o={...i},n=e.getPreGroupedRowModel().flatRows
|
|
5200
5202
|
return t?n.forEach((e=>{e.getCanSelect()&&(o[e.id]=!0)})):n.forEach((e=>{delete o[e.id]})),o}))},toggleAllPageRowsSelected:t=>e.setRowSelection((i=>{const o=void 0!==t?t:!e.getIsAllPageRowsSelected(),n={...i}
|
|
5201
|
-
return e.getRowModel().rows.forEach((t=>{
|
|
5202
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredSelectedRowModel:
|
|
5203
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getGroupedSelectedRowModel:
|
|
5203
|
+
return e.getRowModel().rows.forEach((t=>{Mb(n,t.id,o,e)})),n})),getPreSelectedRowModel:()=>e.getCoreRowModel(),getSelectedRowModel:sb((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,i)=>Object.keys(t).length?Ab(e,i):{rows:[],flatRows:[],rowsById:{}}),{key:!1,debug:()=>{var t
|
|
5204
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredSelectedRowModel:sb((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,i)=>Object.keys(t).length?Ab(e,i):{rows:[],flatRows:[],rowsById:{}}),{key:"getFilteredSelectedRowModel",debug:()=>{var t
|
|
5205
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getGroupedSelectedRowModel:sb((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,i)=>Object.keys(t).length?Ab(e,i):{rows:[],flatRows:[],rowsById:{}}),{key:"getGroupedSelectedRowModel",debug:()=>{var t
|
|
5204
5206
|
return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getIsAllRowsSelected:()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:i}=e.getState()
|
|
5205
5207
|
let o=Boolean(t.length&&Object.keys(i).length)
|
|
5206
5208
|
return o&&t.some((e=>e.getCanSelect()&&!i[e.id]))&&(o=!1),o},getIsAllPageRowsSelected:()=>{const t=e.getPaginationRowModel().flatRows,{rowSelection:i}=e.getState()
|
|
@@ -5211,71 +5213,71 @@ return i>0&&i<e.getFilteredRowModel().flatRows.length},getIsSomePageRowsSelected
|
|
|
5211
5213
|
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:i=>{const o=e.getIsSelected()
|
|
5212
5214
|
t.setRowSelection((n=>{if(o===(i=void 0!==i?i:!o))return n
|
|
5213
5215
|
const s={...n}
|
|
5214
|
-
return
|
|
5215
|
-
return
|
|
5216
|
-
return"some"===
|
|
5217
|
-
return"all"===
|
|
5216
|
+
return Mb(s,e.id,i,t),s}))},getIsSelected:()=>{const{rowSelection:i}=t.getState()
|
|
5217
|
+
return Ob(e,i)},getIsSomeSelected:()=>{const{rowSelection:i}=t.getState()
|
|
5218
|
+
return"some"===Eb(e,i)},getIsAllSubRowsSelected:()=>{const{rowSelection:i}=t.getState()
|
|
5219
|
+
return"all"===Eb(e,i)},getCanSelect:()=>{var i
|
|
5218
5220
|
return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(i=t.options.enableRowSelection)||i},getCanSelectSubRows:()=>{var i
|
|
5219
5221
|
return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(i=t.options.enableSubRowSelection)||i},getCanMultiSelect:()=>{var i
|
|
5220
5222
|
return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(i=t.options.enableMultiRowSelection)||i},getToggleSelectedHandler:()=>{const t=e.getCanSelect()
|
|
5221
5223
|
return i=>{var o
|
|
5222
|
-
t&&e.toggleSelected(null==(o=i.target)?void 0:o.checked)}}})},
|
|
5224
|
+
t&&e.toggleSelected(null==(o=i.target)?void 0:o.checked)}}})},Mb=(e,t,i,o)=>{var n
|
|
5223
5225
|
const s=o.getRow(t)
|
|
5224
|
-
i?(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=>
|
|
5225
|
-
function
|
|
5226
|
-
const r=
|
|
5226
|
+
i?(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=>Mb(e,t.id,i,o)))}
|
|
5227
|
+
function Ab(e,t){const i=e.getState().rowSelection,o=[],n={},s=function(e,t){return e.map((e=>{var t
|
|
5228
|
+
const r=Ob(e,i)
|
|
5227
5229
|
if(r&&(o.push(e),n[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:s(e.subRows)}),r)return e})).filter(Boolean)}
|
|
5228
|
-
return{rows:s(t.rows),flatRows:o,rowsById:n}}function
|
|
5229
|
-
return null!=(i=t[e.id])&&i}function
|
|
5230
|
-
return e.subRows.forEach((e=>{o&&!i||(
|
|
5231
|
-
function
|
|
5230
|
+
return{rows:s(t.rows),flatRows:o,rowsById:n}}function Ob(e,t){var i
|
|
5231
|
+
return null!=(i=t[e.id])&&i}function Eb(e,t,i){if(e.subRows&&e.subRows.length){let i=!0,o=!1
|
|
5232
|
+
return e.subRows.forEach((e=>{o&&!i||(Ob(e,t)?o=!0:i=!1)})),i?"all":!!o&&"some"}return!1}const Vb=/([0-9]+)/gm
|
|
5233
|
+
function Fb(e,t){return e===t?0:e>t?1:-1}function Hb(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function Pb(e,t){const i=e.split(Vb).filter(Boolean),o=t.split(Vb).filter(Boolean)
|
|
5232
5234
|
for(;i.length&&o.length;){const e=i.shift(),t=o.shift(),n=parseInt(e,10),s=parseInt(t,10),r=[n,s].sort()
|
|
5233
5235
|
if(isNaN(r[0])){if(e>t)return 1
|
|
5234
5236
|
if(t>e)return-1}else{if(isNaN(r[1]))return isNaN(n)?-1:1
|
|
5235
5237
|
if(n>s)return 1
|
|
5236
|
-
if(s>n)return-1}}return i.length-o.length}const
|
|
5237
|
-
return o>n?1:o<n?-1:0},basic:(e,t,i)=>
|
|
5238
|
+
if(s>n)return-1}}return i.length-o.length}const Tb={alphanumeric:(e,t,i)=>Pb(Hb(e.getValue(i)).toLowerCase(),Hb(t.getValue(i)).toLowerCase()),alphanumericCaseSensitive:(e,t,i)=>Pb(Hb(e.getValue(i)),Hb(t.getValue(i))),text:(e,t,i)=>Fb(Hb(e.getValue(i)).toLowerCase(),Hb(t.getValue(i)).toLowerCase()),textCaseSensitive:(e,t,i)=>Fb(Hb(e.getValue(i)),Hb(t.getValue(i))),datetime:(e,t,i)=>{const o=e.getValue(i),n=t.getValue(i)
|
|
5239
|
+
return o>n?1:o<n?-1:0},basic:(e,t,i)=>Fb(e.getValue(i),t.getValue(i))},Lb=[ab,{getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:ib("columnVisibility",e)}),createColumn:(e,t)=>({toggleVisibility:i=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:null!=i?i:!e.getIsVisible()})))},getIsVisible:()=>{var i,o
|
|
5238
5240
|
return null==(i=null==(o=t.getState().columnVisibility)?void 0:o[e.id])||i},getCanHide:()=>{var i,o
|
|
5239
|
-
return(null==(i=e.columnDef.enableHiding)||i)&&(null==(o=t.options.enableHiding)||o)},getToggleVisibilityHandler:()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}}),createRow:(e,t)=>({_getAllVisibleCells:
|
|
5240
|
-
return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getVisibleCells:
|
|
5241
|
-
return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createTable:e=>{const t=(t,i)=>
|
|
5241
|
+
return(null==(i=e.columnDef.enableHiding)||i)&&(null==(o=t.options.enableHiding)||o)},getToggleVisibilityHandler:()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}}),createRow:(e,t)=>({_getAllVisibleCells:sb((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),{key:"row._getAllVisibleCells",debug:()=>{var e
|
|
5242
|
+
return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getVisibleCells:sb((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,i)=>[...e,...t,...i]),{key:!1,debug:()=>{var e
|
|
5243
|
+
return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createTable:e=>{const t=(t,i)=>sb((()=>[i(),i().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
|
|
5242
5244
|
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})
|
|
5243
5245
|
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 i
|
|
5244
5246
|
e.setColumnVisibility(t?{}:null!=(i=e.initialState.columnVisibility)?i:{})},toggleAllColumnsVisible:t=>{var i
|
|
5245
5247
|
t=null!=(i=t)?i:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,i)=>({...e,[i.id]:t||!(null!=i.getCanHide&&i.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 i
|
|
5246
|
-
e.toggleAllColumnsVisible(null==(i=t.target)?void 0:i.checked)}}}},{getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:
|
|
5247
|
-
e.setColumnOrder(t?[]:null!=(i=e.initialState.columnOrder)?i:[])},_getOrderColumnsFn:
|
|
5248
|
+
e.toggleAllColumnsVisible(null==(i=t.target)?void 0:i.checked)}}}},{getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:ib("columnOrder",e)}),createTable:e=>({setColumnOrder:t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),resetColumnOrder:t=>{var i
|
|
5249
|
+
e.setColumnOrder(t?[]:null!=(i=e.initialState.columnOrder)?i:[])},_getOrderColumnsFn:sb((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,i)=>o=>{let n=[]
|
|
5248
5250
|
if(null!=e&&e.length){const t=[...e],i=[...o]
|
|
5249
5251
|
for(;i.length&&t.length;){const e=t.shift(),o=i.findIndex((t=>t.id===e))
|
|
5250
5252
|
o>-1&&n.push(i.splice(o,1)[0])}n=[...n,...i]}else n=o
|
|
5251
5253
|
return function(e,t,i){if(null==t||!t.length||!i)return e
|
|
5252
5254
|
const o=e.filter((e=>!t.includes(e.id)))
|
|
5253
|
-
return"remove"===i?o:[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...o]}(n,t,i)}),{key:!1})})},{getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:
|
|
5255
|
+
return"remove"===i?o:[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...o]}(n,t,i)}),{key:!1})})},{getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:ib("columnPinning",e)}),createColumn:(e,t)=>({pin:i=>{const o=e.getLeafColumns().map((e=>e.id)).filter(Boolean)
|
|
5254
5256
|
t.setColumnPinning((e=>{var t,n,s,r,a,l
|
|
5255
5257
|
return"right"===i?{left:(null!=(s=null==e?void 0:e.left)?s:[]).filter((e=>!(null!=o&&o.includes(e)))),right:[...(null!=(r=null==e?void 0:e.right)?r:[]).filter((e=>!(null!=o&&o.includes(e)))),...o]}:"left"===i?{left:[...(null!=(a=null==e?void 0:e.left)?a:[]).filter((e=>!(null!=o&&o.includes(e)))),...o],right:(null!=(l=null==e?void 0:e.right)?l:[]).filter((e=>!(null!=o&&o.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=o&&o.includes(e)))),right:(null!=(n=null==e?void 0:e.right)?n:[]).filter((e=>!(null!=o&&o.includes(e))))}}))},getCanPin:()=>e.getLeafColumns().some((e=>{var i,o
|
|
5256
5258
|
return(null==(i=e.columnDef.enablePinning)||i)&&(null==(o=t.options.enablePinning)||o)})),getIsPinned:()=>{const i=e.getLeafColumns().map((e=>e.id)),{left:o,right:n}=t.getState().columnPinning,s=i.some((e=>null==o?void 0:o.includes(e))),r=i.some((e=>null==n?void 0:n.includes(e)))
|
|
5257
5259
|
return s?"left":!!r&&"right"},getPinnedIndex:()=>{var i,o,n
|
|
5258
5260
|
const s=e.getIsPinned()
|
|
5259
|
-
return s?null!=(i=null==(o=t.getState().columnPinning)||null==(n=o[s])?void 0:n.indexOf(e.id))?i:-1:0}}),createRow:(e,t)=>({getCenterVisibleCells:
|
|
5261
|
+
return s?null!=(i=null==(o=t.getState().columnPinning)||null==(n=o[s])?void 0:n.indexOf(e.id))?i:-1:0}}),createRow:(e,t)=>({getCenterVisibleCells:sb((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,i)=>{const o=[...null!=t?t:[],...null!=i?i:[]]
|
|
5260
5262
|
return e.filter((e=>!o.includes(e.column.id)))}),{key:"row.getCenterVisibleCells",debug:()=>{var e
|
|
5261
|
-
return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getLeftVisibleCells:
|
|
5262
|
-
return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getRightVisibleCells:
|
|
5263
|
+
return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getLeftVisibleCells:sb((()=>[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
|
|
5264
|
+
return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getRightVisibleCells:sb((()=>[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
|
|
5263
5265
|
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 i,o
|
|
5264
5266
|
return e.setColumnPinning(t?{left:[],right:[]}:null!=(i=null==(o=e.initialState)?void 0:o.columnPinning)?i:{left:[],right:[]})},getIsSomeColumnsPinned:t=>{var i
|
|
5265
5267
|
const o=e.getState().columnPinning
|
|
5266
5268
|
var n,s
|
|
5267
|
-
return t?Boolean(null==(i=o[t])?void 0:i.length):Boolean((null==(n=o.left)?void 0:n.length)||(null==(s=o.right)?void 0:s.length))},getLeftLeafColumns:
|
|
5268
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getRightLeafColumns:
|
|
5269
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getCenterLeafColumns:
|
|
5269
|
+
return t?Boolean(null==(i=o[t])?void 0:i.length):Boolean((null==(n=o.left)?void 0:n.length)||(null==(s=o.right)?void 0:s.length))},getLeftLeafColumns:sb((()=>[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
|
|
5270
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getRightLeafColumns:sb((()=>[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
|
|
5271
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getCenterLeafColumns:sb((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,i)=>{const o=[...null!=t?t:[],...null!=i?i:[]]
|
|
5270
5272
|
return e.filter((e=>!o.includes(e.id)))}),{key:!1,debug:()=>{var t
|
|
5271
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})})},
|
|
5273
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})})},Sb,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto"}),getDefaultOptions:e=>({onSortingChange:ib("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>({getAutoSortingFn:()=>{const i=t.getFilteredRowModel().flatRows.slice(10)
|
|
5272
5274
|
let o=!1
|
|
5273
5275
|
for(const t of i){const i=null==t?void 0:t.getValue(e.id)
|
|
5274
|
-
if("[object Date]"===Object.prototype.toString.call(i))return
|
|
5275
|
-
if("string"==typeof i&&(o=!0,i.split(
|
|
5276
|
+
if("[object Date]"===Object.prototype.toString.call(i))return Tb.datetime
|
|
5277
|
+
if("string"==typeof i&&(o=!0,i.split(Vb).length>1))return Tb.alphanumeric}return o?Tb.text:Tb.basic},getAutoSortDir:()=>{const i=t.getFilteredRowModel().flatRows[0]
|
|
5276
5278
|
return"string"==typeof(null==i?void 0:i.getValue(e.id))?"asc":"desc"},getSortingFn:()=>{var i,o
|
|
5277
5279
|
if(!e)throw new Error
|
|
5278
|
-
return
|
|
5280
|
+
return ob(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(i=null==(o=t.options.sortingFns)?void 0:o[e.columnDef.sortingFn])?i:Tb[e.columnDef.sortingFn]},toggleSorting:(i,o)=>{const n=e.getNextSortingOrder(),s=null!=i
|
|
5279
5281
|
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))
|
|
5280
5282
|
let c,d=[],h=s?i:"desc"===n
|
|
5281
5283
|
var u;(c=null!=r&&r.length&&e.getCanMultiSort()&&o?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}]
|
|
@@ -5290,86 +5292,86 @@ return!!o&&(o.desc?"desc":"asc")},getSortIndex:()=>{var i,o
|
|
|
5290
5292
|
return null!=(i=null==(o=t.getState().sorting)?void 0:o.findIndex((t=>t.id===e.id)))?i:-1},clearSorting:()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},getToggleSortingHandler:()=>{const i=e.getCanSort()
|
|
5291
5293
|
return o=>{i&&(null==o.persist||o.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(o))))}}}),createTable:e=>({setSorting:t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),resetSorting:t=>{var i,o
|
|
5292
5294
|
e.setSorting(t?[]:null!=(i=null==(o=e.initialState)?void 0:o.sorting)?i:[])},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,i
|
|
5293
|
-
return null!=(t=null==(i=e.getValue())||null==i.toString?void 0:i.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:
|
|
5295
|
+
return null!=(t=null==(i=e.getValue())||null==i.toString?void 0:i.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:ib("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 i,o,n,s
|
|
5294
5296
|
return null!=(i=null==(o=null!=(n=null==(s=e.columnDef.enableGrouping)||s)?n:t.options.enableGrouping)||o)?i:!!e.accessorFn},getIsGrouped:()=>{var i
|
|
5295
5297
|
return null==(i=t.getState().grouping)?void 0:i.includes(e.id)},getGroupedIndex:()=>{var i
|
|
5296
5298
|
return null==(i=t.getState().grouping)?void 0:i.indexOf(e.id)},getToggleGroupingHandler:()=>{const t=e.getCanGroup()
|
|
5297
5299
|
return()=>{t&&e.toggleGrouping()}},getAutoAggregationFn:()=>{const i=t.getCoreRowModel().flatRows[0],o=null==i?void 0:i.getValue(e.id)
|
|
5298
|
-
return"number"==typeof o?
|
|
5300
|
+
return"number"==typeof o?Ib.sum:"[object Date]"===Object.prototype.toString.call(o)?Ib.extent:void 0},getAggregationFn:()=>{var i,o
|
|
5299
5301
|
if(!e)throw new Error
|
|
5300
|
-
return
|
|
5302
|
+
return ob(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(i=null==(o=t.options.aggregationFns)?void 0:o[e.columnDef.aggregationFn])?i:Ib[e.columnDef.aggregationFn]}}),createTable:e=>({setGrouping:t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),resetGrouping:t=>{var i,o
|
|
5301
5303
|
e.setGrouping(t?[]:null!=(i=null==(o=e.initialState)?void 0:o.grouping)?i:[])},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,i,o)=>({getIsGrouped:()=>t.getIsGrouped()&&t.id===i.groupingColumnId,getIsPlaceholder:()=>!e.getIsGrouped()&&t.getIsGrouped(),getIsAggregated:()=>{var t
|
|
5302
|
-
return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=i.subRows)||!t.length)}})},
|
|
5304
|
+
return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=i.subRows)||!t.length)}})},pb,{getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:ib("pagination",e)}),createTable:e=>{let t=!1,i=!1
|
|
5303
5305
|
return{_autoResetPageIndex:()=>{var o,n
|
|
5304
5306
|
if(t){if(null!=(o=null!=(n=e.options.autoResetAll)?n:e.options.autoResetPageIndex)?o:!e.options.manualPagination){if(i)return
|
|
5305
|
-
i=!0,e._queue((()=>{e.resetPageIndex(),i=!1}))}}else e._queue((()=>{t=!0}))},setPagination:t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>
|
|
5306
|
-
e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(i=e.initialState.pagination)?i:{pageIndex:0,pageSize:10})},setPageIndex:t=>{e.setPagination((i=>{let o=
|
|
5307
|
+
i=!0,e._queue((()=>{e.resetPageIndex(),i=!1}))}}else e._queue((()=>{t=!0}))},setPagination:t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>tb(t,e))),resetPagination:t=>{var i
|
|
5308
|
+
e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(i=e.initialState.pagination)?i:{pageIndex:0,pageSize:10})},setPageIndex:t=>{e.setPagination((i=>{let o=tb(t,i.pageIndex)
|
|
5307
5309
|
const n=void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1
|
|
5308
5310
|
return o=Math.max(0,Math.min(o,n)),{...i,pageIndex:o}}))},resetPageIndex:t=>{var i,o,n
|
|
5309
5311
|
e.setPageIndex(t?0:null!=(i=null==(o=e.initialState)||null==(n=o.pagination)?void 0:n.pageIndex)?i:0)},resetPageSize:t=>{var i,o,n
|
|
5310
|
-
e.setPageSize(t?10:null!=(i=null==(o=e.initialState)||null==(n=o.pagination)?void 0:n.pageSize)?i:10)},setPageSize:t=>{e.setPagination((e=>{const i=Math.max(1,
|
|
5312
|
+
e.setPageSize(t?10:null!=(i=null==(o=e.initialState)||null==(n=o.pagination)?void 0:n.pageSize)?i:10)},setPageSize:t=>{e.setPagination((e=>{const i=Math.max(1,tb(t,e.pageSize)),o=e.pageSize*e.pageIndex,n=Math.floor(o/i)
|
|
5311
5313
|
return{...e,pageIndex:n,pageSize:i}}))},setPageCount:t=>e.setPagination((i=>{var o
|
|
5312
|
-
let n=
|
|
5313
|
-
return"number"==typeof n&&(n=Math.max(-1,n)),{...i,pageCount:n}})),getPageOptions:
|
|
5314
|
+
let n=tb(t,null!=(o=e.options.pageCount)?o:-1)
|
|
5315
|
+
return"number"==typeof n&&(n=Math.max(-1,n)),{...i,pageCount:n}})),getPageOptions:sb((()=>[e.getPageCount()]),(e=>{let t=[]
|
|
5314
5316
|
return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),{key:!1,debug:()=>{var t
|
|
5315
5317
|
return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getCanPreviousPage:()=>e.getState().pagination.pageIndex>0,getCanNextPage:()=>{const{pageIndex:t}=e.getState().pagination,i=e.getPageCount()
|
|
5316
5318
|
return-1===i||0!==i&&t<i-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
|
|
5317
|
-
return null!=(t=e.options.pageCount)?t:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}}},
|
|
5318
|
-
function
|
|
5319
|
-
let i={_features:
|
|
5319
|
+
return null!=(t=e.options.pageCount)?t:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}}},Rb,db]
|
|
5320
|
+
function Db(e){var t;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...")
|
|
5321
|
+
let i={_features:Lb}
|
|
5320
5322
|
const o=i._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(i))),{})
|
|
5321
5323
|
let n={...null!=(t=e.initialState)?t:{}}
|
|
5322
5324
|
i._features.forEach((e=>{var t
|
|
5323
5325
|
n=null!=(t=null==e.getInitialState?void 0:e.getInitialState(n))?t:n}))
|
|
5324
5326
|
const s=[]
|
|
5325
5327
|
let r=!1
|
|
5326
|
-
const a={_features:
|
|
5327
|
-
r=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{i.setState(i.initialState)},setOptions:e=>{const t=
|
|
5328
|
+
const a={_features:Lb,options:{...o,...e},initialState:n,_queue:e=>{s.push(e),r||(r=!0,Promise.resolve().then((()=>{for(;s.length;)s.shift()()
|
|
5329
|
+
r=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{i.setState(i.initialState)},setOptions:e=>{const t=tb(e,i.options)
|
|
5328
5330
|
i.options=(e=>i.options.mergeOptions?i.options.mergeOptions(o,e):{...o,...e})(t)},getState:()=>i.options.state,setState:e=>{null==i.options.onStateChange||i.options.onStateChange(e)},_getRowId:(e,t,o)=>{var n
|
|
5329
5331
|
return null!=(n=null==i.options.getRowId?void 0:i.options.getRowId(e,t,o))?n:`${o?[o.id,t].join("."):t}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:e=>{const t=i.getRowModel().rowsById[e]
|
|
5330
5332
|
if(!t)throw new Error
|
|
5331
|
-
return t},_getDefaultColumnDef:
|
|
5333
|
+
return t},_getDefaultColumnDef:sb((()=>[i.options.defaultColumn]),(e=>{var t
|
|
5332
5334
|
return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef
|
|
5333
5335
|
return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,i
|
|
5334
5336
|
return null!=(t=null==(i=e.renderValue())||null==i.toString?void 0:i.toString())?t:null},...i._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),{debug:()=>{var e
|
|
5335
|
-
return null!=(e=i.options.debugAll)?e:i.options.debugColumns},key:!1}),_getColumnDefs:()=>i.options.columns,getAllColumns:
|
|
5337
|
+
return null!=(e=i.options.debugAll)?e:i.options.debugColumns},key:!1}),_getColumnDefs:()=>i.options.columns,getAllColumns:sb((()=>[i._getColumnDefs()]),(e=>{const t=function(e,o,n){return void 0===n&&(n=0),e.map((e=>{const s=function(e,t,i,o){var n,s
|
|
5336
5338
|
const r={...e._getDefaultColumnDef(),...t},a=r.accessorKey
|
|
5337
5339
|
let l,c=null!=(n=null!=(s=r.id)?s:a?a.replace(".","_"):void 0)?n:"string"==typeof r.header?r.header:void 0
|
|
5338
5340
|
if(r.accessorFn?l=r.accessorFn:a&&(l=a.includes(".")?e=>{let t=e
|
|
5339
5341
|
for(const e of a.split(".")){var i
|
|
5340
5342
|
t=null==(i=t)?void 0:i[e]}return t}:e=>e[r.accessorKey]),!c)throw new Error
|
|
5341
|
-
let d={id:`${String(c)}`,accessorFn:l,parent:o,depth:i,columnDef:r,columns:[],getFlatColumns:
|
|
5343
|
+
let d={id:`${String(c)}`,accessorFn:l,parent:o,depth:i,columnDef:r,columns:[],getFlatColumns:sb((()=>[!0]),(()=>{var e
|
|
5342
5344
|
return[d,...null==(e=d.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),{key:"column.getFlatColumns",debug:()=>{var t
|
|
5343
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:
|
|
5345
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:sb((()=>[e._getOrderColumnsFn()]),(e=>{var t
|
|
5344
5346
|
if(null!=(t=d.columns)&&t.length){let t=d.columns.flatMap((e=>e.getLeafColumns()))
|
|
5345
5347
|
return e(t)}return[d]}),{key:"column.getLeafColumns",debug:()=>{var t
|
|
5346
5348
|
return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})}
|
|
5347
5349
|
return d=e._features.reduce(((t,i)=>Object.assign(t,null==i.createColumn?void 0:i.createColumn(d,e))),d),d}(i,e,n,o),r=e
|
|
5348
5350
|
return s.columns=r.columns?t(r.columns,s,n+1):[],s}))}
|
|
5349
5351
|
return t(e)}),{key:!1,debug:()=>{var e
|
|
5350
|
-
return null!=(e=i.options.debugAll)?e:i.options.debugColumns}}),getAllFlatColumns:
|
|
5351
|
-
return null!=(e=i.options.debugAll)?e:i.options.debugColumns}}),_getAllFlatColumnsById:
|
|
5352
|
-
return null!=(e=i.options.debugAll)?e:i.options.debugColumns}}),getAllLeafColumns:
|
|
5352
|
+
return null!=(e=i.options.debugAll)?e:i.options.debugColumns}}),getAllFlatColumns:sb((()=>[i.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),{key:!1,debug:()=>{var e
|
|
5353
|
+
return null!=(e=i.options.debugAll)?e:i.options.debugColumns}}),_getAllFlatColumnsById:sb((()=>[i.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),{key:!1,debug:()=>{var e
|
|
5354
|
+
return null!=(e=i.options.debugAll)?e:i.options.debugColumns}}),getAllLeafColumns:sb((()=>[i.getAllColumns(),i._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),{key:!1,debug:()=>{var e
|
|
5353
5355
|
return null!=(e=i.options.debugAll)?e:i.options.debugColumns}}),getColumn:e=>i._getAllFlatColumnsById()[e]}
|
|
5354
|
-
return Object.assign(i,a),i._features.forEach((e=>Object.assign(i,null==e.createTable?void 0:e.createTable(i)))),i}const
|
|
5356
|
+
return Object.assign(i,a),i._features.forEach((e=>Object.assign(i,null==e.createTable?void 0:e.createTable(i)))),i}const zb=(e,t,i,o,n,s)=>{let r={id:t,index:o,original:i,depth:n,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(r._valuesCache.hasOwnProperty(t))return r._valuesCache[t]
|
|
5355
5357
|
const i=e.getColumn(t)
|
|
5356
5358
|
return null!=i&&i.accessorFn?(r._valuesCache[t]=i.accessorFn(r.original,o),r._valuesCache[t]):void 0},getUniqueValues:t=>{if(r._uniqueValuesCache.hasOwnProperty(t))return r._uniqueValuesCache[t]
|
|
5357
5359
|
const i=e.getColumn(t)
|
|
5358
5360
|
return null!=i&&i.accessorFn?i.columnDef.getUniqueValues?(r._uniqueValuesCache[t]=i.columnDef.getUniqueValues(r.original,o),r._uniqueValuesCache[t]):(r._uniqueValuesCache[t]=[r.getValue(t)],r._uniqueValuesCache[t]):void 0},renderValue:t=>{var i
|
|
5359
|
-
return null!=(i=r.getValue(t))?i:e.options.renderFallbackValue},subRows:null!=s?s:[],getLeafRows:()=>
|
|
5360
|
-
return null!=(t=n.getValue())?t:e.options.renderFallbackValue},getContext:
|
|
5361
|
+
return null!=(i=r.getValue(t))?i:e.options.renderFallbackValue},subRows:null!=s?s:[],getLeafRows:()=>nb(r.subRows,(e=>e.subRows)),getAllCells:sb((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,i,o){const n={id:`${t.id}_${i.id}`,row:t,column:i,getValue:()=>t.getValue(o),renderValue:()=>{var t
|
|
5362
|
+
return null!=(t=n.getValue())?t:e.options.renderFallbackValue},getContext:sb((()=>[e,i,t,n]),((e,t,i,o)=>({table:e,column:t,row:i,cell:o,getValue:o.getValue,renderValue:o.renderValue})),{key:!1,debug:()=>e.options.debugAll})}
|
|
5361
5363
|
return e._features.forEach((o=>{Object.assign(n,null==o.createCell?void 0:o.createCell(n,i,t,e))}),{}),n}(e,r,t,t.id)))),{key:!1,debug:()=>{var t
|
|
5362
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),_getAllCellsByColumnId:
|
|
5364
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),_getAllCellsByColumnId:sb((()=>[r.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),{key:"row.getAllCellsByColumnId",debug:()=>{var t
|
|
5363
5365
|
return null!=(t=e.options.debugAll)?t:e.options.debugRows}})}
|
|
5364
5366
|
for(let t=0;t<e._features.length;t++){const i=e._features[t]
|
|
5365
5367
|
Object.assign(r,null==i||null==i.createRow?void 0:i.createRow(r,e))}return r}
|
|
5366
|
-
function
|
|
5368
|
+
function Bb(){return e=>sb((()=>[e.getState().grouping,e.getPreGroupedRowModel()]),((t,i)=>{if(!i.rows.length||!t.length)return i
|
|
5367
5369
|
const o=t.filter((t=>e.getColumn(t))),n=[],s={},r=function(t,i,a){if(void 0===i&&(i=0),i>=o.length)return t.map((e=>(e.depth=i,n.push(e),s[e.id]=e,e.subRows&&(e.subRows=r(e.subRows,i+1)),e)))
|
|
5368
5370
|
const l=o[i],c=function(e,t){const i=new Map
|
|
5369
5371
|
return e.reduce(((e,i)=>{const o=`${i.getValue(t)}`,n=e.get(o)
|
|
5370
5372
|
return n?n.push(i):e.set(o,[i]),e}),i)}(t,l),d=Array.from(c.entries()).map(((t,c)=>{let[d,h]=t,u=`${l}:${d}`
|
|
5371
5373
|
u=a?`${a}>${u}`:u
|
|
5372
|
-
const p=r(h,i+1,u),g=i?
|
|
5374
|
+
const p=r(h,i+1,u),g=i?nb(h,(e=>e.subRows)):h,v=zb(e,u,g[0].original,c,i)
|
|
5373
5375
|
return Object.assign(v,{groupingColumnId:l,groupingValue:d,subRows:p,leafRows:g,getValue:t=>{if(o.includes(t)){if(v._valuesCache.hasOwnProperty(t))return v._valuesCache[t]
|
|
5374
5376
|
var i
|
|
5375
5377
|
if(h[0])v._valuesCache[t]=null!=(i=h[0].getValue(t))?i:void 0
|
|
@@ -5378,10 +5380,10 @@ const n=e.getColumn(t),s=null==n?void 0:n.getAggregationFn()
|
|
|
5378
5380
|
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}))
|
|
5379
5381
|
return d},a=r(i.rows,0,"")
|
|
5380
5382
|
return a.forEach((e=>{n.push(e),s[e.id]=e})),{rows:a,flatRows:n,rowsById:s}}),{key:!1,debug:()=>{var t
|
|
5381
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._queue((()=>{e._autoResetExpanded(),e._autoResetPageIndex()}))}})}const
|
|
5382
|
-
class
|
|
5383
|
-
const
|
|
5384
|
-
try{t=document.createElement(e)}catch(e){}if(!(t instanceof
|
|
5383
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._queue((()=>{e._autoResetExpanded(),e._autoResetPageIndex()}))}})}const Nb={none:void 0,ascending:"ascending",descending:"descending"},Zb={none:void 0,single:"single",multiple:"multiple"},qb="notSelected",jb="selected",Ub="partiallySelected",Gb="basic",Wb="localeAwareCaseSensitive"
|
|
5384
|
+
class Xb extends _t{}e([f],Xb.prototype,"groupHeaderValue",void 0),e([f],Xb.prototype,"columnConfig",void 0)
|
|
5385
|
+
const Kb=e=>((e=>{let t
|
|
5386
|
+
try{t=document.createElement(e)}catch(e){}if(!(t instanceof Xb))throw new Error(`Group header view tag name (${e}) must evaluate to an element extending TableGroupHeaderView`)})(e),G`
|
|
5385
5387
|
<${e}
|
|
5386
5388
|
:groupHeaderValue="${e=>e.groupRowValue}"
|
|
5387
5389
|
:columnConfig="${e=>e.groupColumn?.columnInternals.columnConfig}"
|
|
@@ -5389,9 +5391,9 @@ try{t=document.createElement(e)}catch(e){}if(!(t instanceof Gb))throw new Error(
|
|
|
5389
5391
|
>
|
|
5390
5392
|
</${e}>
|
|
5391
5393
|
`)
|
|
5392
|
-
class
|
|
5393
|
-
const
|
|
5394
|
-
try{t=document.createElement(e)}catch(e){}if(!(t instanceof
|
|
5394
|
+
class Yb extends _t{focusedRecycleCallback(){}}e([f],Yb.prototype,"cellRecord",void 0),e([f],Yb.prototype,"columnConfig",void 0)
|
|
5395
|
+
const Qb=e=>((e=>{let t
|
|
5396
|
+
try{t=document.createElement(e)}catch(e){}if(!(t instanceof Yb))throw new Error(`Cell view tag name (${e}) must evaluate to an element extending TableCellView`)})(e),G`
|
|
5395
5397
|
<${e}
|
|
5396
5398
|
:cellRecord="${e=>e.cellState?.cellRecord}"
|
|
5397
5399
|
:columnConfig="${e=>e.cellState?.columnConfig}"
|
|
@@ -5399,11 +5401,11 @@ try{t=document.createElement(e)}catch(e){}if(!(t instanceof Xb))throw new Error(
|
|
|
5399
5401
|
>
|
|
5400
5402
|
</${e}>
|
|
5401
5403
|
`)
|
|
5402
|
-
class
|
|
5403
|
-
class
|
|
5404
|
-
this.columnInternals=new
|
|
5405
|
-
class
|
|
5406
|
-
return!e.duplicateRecordId&&!e.missingRecordId&&!e.invalidRecordId}validateSelectionMode(e,t){return this.idFieldNameNotConfigured=e!==
|
|
5404
|
+
class Jb{constructor(e){this.uniqueId=Or("table-column-slot"),this.sortOperation=Gb,this.dataRecordFieldNames=[],this.groupingDisabled=!1,this.fractionalWidth=1,this.minPixelWidth=117,this.currentFractionalWidth=1,this.cellRecordFieldNames=e.cellRecordFieldNames,this.cellViewTemplate=Qb(e.cellViewTag),this.groupHeaderViewTemplate=Kb(e.groupHeaderViewTag)}fractionalWidthChanged(){this.currentFractionalWidth=this.fractionalWidth}pixelWidthChanged(){this.currentPixelWidth=this.pixelWidth}}e([f],Jb.prototype,"columnConfig",void 0),e([f],Jb.prototype,"operandDataRecordFieldName",void 0),e([f],Jb.prototype,"sortOperation",void 0),e([f],Jb.prototype,"dataRecordFieldNames",void 0),e([f],Jb.prototype,"groupingDisabled",void 0),e([f],Jb.prototype,"groupIndex",void 0),e([f],Jb.prototype,"pixelWidth",void 0),e([f],Jb.prototype,"fractionalWidth",void 0),e([f],Jb.prototype,"minPixelWidth",void 0),e([f],Jb.prototype,"currentFractionalWidth",void 0),e([f],Jb.prototype,"currentPixelWidth",void 0)
|
|
5405
|
+
class ew extends _t{constructor(e){if(super(),this.columnHidden=!1,this.sortDirection=Nb.none,!e)throw new Error("ColumnInternalsOptions must be provided to constructor")
|
|
5406
|
+
this.columnInternals=new Jb(e)}}e([ne({attribute:"column-id"})],ew.prototype,"columnId",void 0),e([ne({attribute:"action-menu-slot"})],ew.prototype,"actionMenuSlot",void 0),e([ne({attribute:"action-menu-label"})],ew.prototype,"actionMenuLabel",void 0),e([ne({attribute:"column-hidden",mode:"boolean"})],ew.prototype,"columnHidden",void 0),e([ne({attribute:"sort-index",converter:ie})],ew.prototype,"sortIndex",void 0),e([ne({attribute:"sort-direction"})],ew.prototype,"sortDirection",void 0)
|
|
5407
|
+
class tw{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.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}}isValid(){return Object.values(this.getValidity()).every((e=>!1===e))}areRecordIdsValid(){const e=this.getValidity()
|
|
5408
|
+
return!e.duplicateRecordId&&!e.missingRecordId&&!e.invalidRecordId}validateSelectionMode(e,t){return this.idFieldNameNotConfigured=e!==Zb.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
|
|
5407
5409
|
for(const i of e){if(!Object.prototype.hasOwnProperty.call(i,t)){this.missingRecordId=!0
|
|
5408
5410
|
continue}const e=i[t]
|
|
5409
5411
|
"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
|
|
@@ -5411,7 +5413,7 @@ const t=e.some((e=>e))
|
|
|
5411
5413
|
if(!t)return!0
|
|
5412
5414
|
const i=new Set
|
|
5413
5415
|
for(const t of e)t?(i.has(t)&&(this.duplicateColumnId=!0),i.add(t)):this.missingColumnId=!0
|
|
5414
|
-
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}getPresentRecordIds(e){return e.filter((e=>this.recordIds.has(e)))}validateIndicesAreUnique(e){return new Set(e).size===e.length}}const
|
|
5416
|
+
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}getPresentRecordIds(e){return e.filter((e=>this.recordIds.has(e)))}validateIndicesAreUnique(e){return new Set(e).size===e.length}}const iw=fe`
|
|
5415
5417
|
${bn("flex")}
|
|
5416
5418
|
|
|
5417
5419
|
:host {
|
|
@@ -5461,6 +5463,7 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e
|
|
|
5461
5463
|
width: fit-content;
|
|
5462
5464
|
min-width: 100%;
|
|
5463
5465
|
left: var(--ni-private-table-scroll-x);
|
|
5466
|
+
align-items: center;
|
|
5464
5467
|
}
|
|
5465
5468
|
|
|
5466
5469
|
.column-header-container {
|
|
@@ -5469,6 +5472,17 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e
|
|
|
5469
5472
|
grid-template-columns: var(--ni-private-table-row-grid-columns) auto;
|
|
5470
5473
|
}
|
|
5471
5474
|
|
|
5475
|
+
.collapse-all-button {
|
|
5476
|
+
width: ${ta};
|
|
5477
|
+
height: ${ta};
|
|
5478
|
+
margin-left: calc(${ia} * 2);
|
|
5479
|
+
visibility: hidden;
|
|
5480
|
+
}
|
|
5481
|
+
|
|
5482
|
+
.collapse-all-button.visible {
|
|
5483
|
+
visibility: visible;
|
|
5484
|
+
}
|
|
5485
|
+
|
|
5472
5486
|
.header-scrollbar-spacer {
|
|
5473
5487
|
width: var(--ni-private-table-header-scrollbar-spacer-width);
|
|
5474
5488
|
}
|
|
@@ -5504,7 +5518,7 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e
|
|
|
5504
5518
|
background-color: ${as(qn,.1)};
|
|
5505
5519
|
position: absolute;
|
|
5506
5520
|
}
|
|
5507
|
-
`)),
|
|
5521
|
+
`)),ow=fe`
|
|
5508
5522
|
${bn("flex")}
|
|
5509
5523
|
|
|
5510
5524
|
:host {
|
|
@@ -5515,27 +5529,32 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e
|
|
|
5515
5529
|
color: ${vc};
|
|
5516
5530
|
${Yr.cssCustomProperty}: ${vc};
|
|
5517
5531
|
text-transform: uppercase;
|
|
5532
|
+
gap: calc(${oa} / 2);
|
|
5518
5533
|
}
|
|
5519
5534
|
|
|
5520
|
-
.sort-indicator
|
|
5521
|
-
|
|
5535
|
+
.sort-indicator,
|
|
5536
|
+
.grouped-indicator {
|
|
5537
|
+
flex: 0 0 auto;
|
|
5522
5538
|
}
|
|
5523
|
-
`,
|
|
5539
|
+
`,nw=G`
|
|
5524
5540
|
<template role="columnheader" aria-sort="${e=>e.ariaSort}">
|
|
5525
5541
|
<slot></slot>
|
|
5526
5542
|
|
|
5527
|
-
${Ie((e=>e.sortDirection===
|
|
5543
|
+
${Ie((e=>e.sortDirection===Nb.ascending),G`
|
|
5528
5544
|
<${Rg} class="sort-indicator" aria-hidden="true"></${Rg}>
|
|
5529
5545
|
`)}
|
|
5530
|
-
${Ie((e=>e.sortDirection===
|
|
5546
|
+
${Ie((e=>e.sortDirection===Nb.descending),G`
|
|
5531
5547
|
<${fg} class="sort-indicator" aria-hidden="true"></${fg}>
|
|
5532
5548
|
`)}
|
|
5549
|
+
${Ie((e=>e.isGrouped),G`
|
|
5550
|
+
<${Qf} class="grouped-indicator"></${Qf}>
|
|
5551
|
+
`)}
|
|
5533
5552
|
</template>
|
|
5534
5553
|
`
|
|
5535
|
-
class
|
|
5536
|
-
const
|
|
5537
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
5538
|
-
const
|
|
5554
|
+
class sw extends _t{constructor(){super(...arguments),this.sortDirection=Nb.none,this.firstSortedColumn=!1,this.isGrouped=!1}sortDirectionChanged(e,t){this.updateAriaSort()}firstSortedColumnChanged(e,t){this.updateAriaSort()}updateAriaSort(){this.firstSortedColumn&&this.sortDirection!==Nb.none?this.sortDirection===Nb.ascending?this.ariaSort="ascending":this.ariaSort="descending":this.ariaSort=null}}e([ne({attribute:"sort-direction"})],sw.prototype,"sortDirection",void 0),e([ne({attribute:"first-sorted-column",mode:"boolean"})],sw.prototype,"firstSortedColumn",void 0),e([f],sw.prototype,"isGrouped",void 0)
|
|
5555
|
+
const rw=sw.compose({baseName:"table-header",template:nw,styles:ow})
|
|
5556
|
+
no.getOrCreate().withPrefix("nimble").register(rw())
|
|
5557
|
+
const aw=no.tagFor(sw),lw=fe`
|
|
5539
5558
|
${bn("flex")}
|
|
5540
5559
|
|
|
5541
5560
|
:host {
|
|
@@ -5582,6 +5601,11 @@ const sw=no.tagFor(ow),rw=fe`
|
|
|
5582
5601
|
padding-left: 0px;
|
|
5583
5602
|
}
|
|
5584
5603
|
|
|
5604
|
+
.row-front-spacer {
|
|
5605
|
+
width: ${ea};
|
|
5606
|
+
flex: 0 0 auto;
|
|
5607
|
+
}
|
|
5608
|
+
|
|
5585
5609
|
.cell-container {
|
|
5586
5610
|
display: grid;
|
|
5587
5611
|
width: 100%;
|
|
@@ -5617,18 +5641,15 @@ const sw=no.tagFor(ow),rw=fe`
|
|
|
5617
5641
|
:host([selected]:hover)::before {
|
|
5618
5642
|
background-color: ${as(qn,.2)};
|
|
5619
5643
|
}
|
|
5620
|
-
`)),
|
|
5644
|
+
`)),cw=fe`
|
|
5621
5645
|
${bn("grid")}
|
|
5622
5646
|
|
|
5623
5647
|
:host {
|
|
5624
5648
|
--ni-private-table-cell-nesting-level: 0;
|
|
5625
5649
|
padding: 0px calc(${oa} / 2);
|
|
5626
5650
|
padding-left: calc(
|
|
5627
|
-
${oa}
|
|
5628
|
-
(
|
|
5629
|
-
var(--ni-private-table-cell-nesting-level) *
|
|
5630
|
-
${oa} * 2
|
|
5631
|
-
)
|
|
5651
|
+
${ia} * 2 + ${oa} * 2 *
|
|
5652
|
+
var(--ni-private-table-cell-nesting-level)
|
|
5632
5653
|
);
|
|
5633
5654
|
align-self: center;
|
|
5634
5655
|
height: 100%;
|
|
@@ -5646,11 +5667,11 @@ const sw=no.tagFor(ow),rw=fe`
|
|
|
5646
5667
|
.action-menu {
|
|
5647
5668
|
display: var(--ni-private-table-cell-action-menu-display);
|
|
5648
5669
|
}
|
|
5649
|
-
`,
|
|
5670
|
+
`,dw=G`
|
|
5650
5671
|
<template role="cell" style="--ni-private-table-cell-nesting-level: ${e=>e.nestingLevel}">
|
|
5651
5672
|
${e=>e.cellViewTemplate}
|
|
5652
5673
|
${Ie((e=>e.hasActionMenu),G`
|
|
5653
|
-
<${
|
|
5674
|
+
<${Cm} ${_e("actionMenuButton")}
|
|
5654
5675
|
content-hidden
|
|
5655
5676
|
appearance="${Tc}"
|
|
5656
5677
|
@beforetoggle="${(e,t)=>e.onActionMenuBeforeToggle(t.event)}"
|
|
@@ -5661,14 +5682,14 @@ const sw=no.tagFor(ow),rw=fe`
|
|
|
5661
5682
|
<${Bf} slot="start"></${Bf}>
|
|
5662
5683
|
${e=>e.actionMenuLabel}
|
|
5663
5684
|
<slot name="cellActionMenu" slot="menu"></slot>
|
|
5664
|
-
</${
|
|
5685
|
+
</${Cm}>
|
|
5665
5686
|
`)}
|
|
5666
5687
|
</template>
|
|
5667
5688
|
`
|
|
5668
|
-
class
|
|
5669
|
-
const
|
|
5670
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
5671
|
-
const
|
|
5689
|
+
class hw extends _t{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([f],hw.prototype,"cellState",void 0),e([ne({attribute:"has-action-menu",mode:"boolean"})],hw.prototype,"hasActionMenu",void 0),e([ne({attribute:"menu-open",mode:"boolean"})],hw.prototype,"menuOpen",void 0),e([ne({attribute:"action-menu-label"})],hw.prototype,"actionMenuLabel",void 0),e([f],hw.prototype,"cellViewTemplate",void 0),e([f],hw.prototype,"nestingLevel",void 0)
|
|
5690
|
+
const uw=hw.compose({baseName:"table-cell",template:dw,styles:cw})
|
|
5691
|
+
no.getOrCreate().withPrefix("nimble").register(uw())
|
|
5692
|
+
const pw=no.tagFor(hw),gw=G`
|
|
5672
5693
|
<template role="row" aria-selected=${e=>e.ariaSelected}>
|
|
5673
5694
|
${Ie((e=>e.selectable&&!e.hideSelection),G`
|
|
5674
5695
|
<span role="gridcell" class="checkbox-container">
|
|
@@ -5682,11 +5703,13 @@ const hw=no.tagFor(cw),uw=G`
|
|
|
5682
5703
|
</${Bp}>
|
|
5683
5704
|
</span>
|
|
5684
5705
|
`)}
|
|
5706
|
+
${""}
|
|
5707
|
+
<span class="row-front-spacer"></span>
|
|
5685
5708
|
|
|
5686
5709
|
<span ${_e("cellContainer")} class="cell-container">
|
|
5687
5710
|
${Ve((e=>e.columnStates),G`
|
|
5688
5711
|
${Ie((e=>!e.column.columnHidden),G`
|
|
5689
|
-
<${
|
|
5712
|
+
<${pw}
|
|
5690
5713
|
class="cell"
|
|
5691
5714
|
:cellState="${e=>e.cellState}"
|
|
5692
5715
|
:cellViewTemplate="${e=>e.column.columnInternals.cellViewTemplate}"
|
|
@@ -5703,24 +5726,24 @@ const hw=no.tagFor(cw),uw=G`
|
|
|
5703
5726
|
slot="cellActionMenu"
|
|
5704
5727
|
></slot>
|
|
5705
5728
|
`)}
|
|
5706
|
-
</${
|
|
5729
|
+
</${pw}>
|
|
5707
5730
|
`)}
|
|
5708
5731
|
`)}
|
|
5709
5732
|
</span>
|
|
5710
5733
|
</template>
|
|
5711
5734
|
`
|
|
5712
|
-
class
|
|
5735
|
+
class vw extends _t{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 i=e.columnInternals.dataRecordFieldNames
|
|
5713
5736
|
let o
|
|
5714
5737
|
if(this.hasValidFieldNames(i)&&this.dataRecord){const t=i.map((e=>this.dataRecord[e]))
|
|
5715
5738
|
o={cellRecord:Object.fromEntries(e.columnInternals.cellRecordFieldNames.map(((e,i)=>[e,t[i]]))),columnConfig:e.columnInternals.columnConfig??{}}}else o={cellRecord:{},columnConfig:{}}
|
|
5716
|
-
return{column:e,cellState:o,cellIndentLevel:0===t?this.nestingLevel:0}}))}get ariaSelected(){return this.selectable?this.selected?"true":"false":null}onSelectionChange(e){if(this.ignoreSelectionChangeEvents)return
|
|
5739
|
+
return{column:e,cellState:o,cellIndentLevel:0===t&&this.nestingLevel>0?this.nestingLevel-1:0}}))}get ariaSelected(){return this.selectable?this.selected?"true":"false":null}onSelectionChange(e){if(this.ignoreSelectionChangeEvents)return
|
|
5717
5740
|
const t=e.target,i={oldState:!t.checked,newState:t.checked}
|
|
5718
|
-
this.$emit("row-selection-toggle",i)}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
|
|
5741
|
+
this.$emit("row-selection-toggle",i)}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 hw&&e.menuOpen))
|
|
5719
5742
|
e?.actionMenuButton?.open&&e.actionMenuButton.toggleButton.control.click()}}emitActionMenuToggleEvent(e,t,i){const o={newState:t.newState,oldState:t.oldState,recordIds:[this.recordId],columnId:i.columnId}
|
|
5720
|
-
this.$emit(e,o)}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"})],
|
|
5721
|
-
const
|
|
5722
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
5723
|
-
const
|
|
5743
|
+
this.$emit(e,o)}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"})],vw.prototype,"recordId",void 0),e([ne({mode:"boolean"})],vw.prototype,"selectable",void 0),e([ne({mode:"boolean"})],vw.prototype,"selected",void 0),e([ne({attribute:"hide-selection",mode:"boolean"})],vw.prototype,"hideSelection",void 0),e([f],vw.prototype,"dataRecord",void 0),e([f],vw.prototype,"columns",void 0),e([f],vw.prototype,"currentActionMenuColumn",void 0),e([f],vw.prototype,"nestingLevel",void 0),e([ne({attribute:"menu-open",mode:"boolean"})],vw.prototype,"menuOpen",void 0),e([f],vw.prototype,"selectionCheckbox",void 0),e([m],vw.prototype,"columnStates",null),e([m],vw.prototype,"ariaSelected",null)
|
|
5744
|
+
const fw=vw.compose({baseName:"table-row",template:gw,styles:lw})
|
|
5745
|
+
no.getOrCreate().withPrefix("nimble").register(fw())
|
|
5746
|
+
const mw=no.tagFor(vw),bw=fe`
|
|
5724
5747
|
${bn("flex")}
|
|
5725
5748
|
|
|
5726
5749
|
:host {
|
|
@@ -5809,7 +5832,7 @@ const vw=no.tagFor(pw),fw=fe`
|
|
|
5809
5832
|
:host(:hover)::before {
|
|
5810
5833
|
background-color: ${as(qn,.1)};
|
|
5811
5834
|
}
|
|
5812
|
-
`)),
|
|
5835
|
+
`)),ww=G`
|
|
5813
5836
|
<template
|
|
5814
5837
|
role="row"
|
|
5815
5838
|
@click=${e=>e.onGroupExpandToggle()}
|
|
@@ -5844,12 +5867,12 @@ const vw=no.tagFor(pw),fw=fe`
|
|
|
5844
5867
|
</div>
|
|
5845
5868
|
</template>
|
|
5846
5869
|
`
|
|
5847
|
-
class
|
|
5870
|
+
class xw extends _t{constructor(){super(...arguments),this.nestingLevel=0,this.expanded=!1,this.selectable=!1,this.selectionState=qb,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
|
|
5848
5871
|
const t=e.target,i={oldState:!t.checked,newState:t.checked}
|
|
5849
|
-
this.$emit("group-selection-toggle",i)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===
|
|
5850
|
-
const
|
|
5851
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
5852
|
-
const
|
|
5872
|
+
this.$emit("group-selection-toggle",i)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===jb,this.selectionCheckbox.indeterminate=this.selectionState===Ub,this.ignoreSelectionChangeEvents=!1)}}e([f],xw.prototype,"groupRowValue",void 0),e([f],xw.prototype,"nestingLevel",void 0),e([f],xw.prototype,"leafItemCount",void 0),e([f],xw.prototype,"groupColumn",void 0),e([ne({mode:"boolean"})],xw.prototype,"expanded",void 0),e([ne({mode:"boolean"})],xw.prototype,"selectable",void 0),e([ne({attribute:"selection-state"})],xw.prototype,"selectionState",void 0),e([f],xw.prototype,"selectionCheckbox",void 0),e([f],xw.prototype,"animationClass",void 0)
|
|
5873
|
+
const yw=xw.compose({baseName:"table-group-row",template:ww,styles:bw})
|
|
5874
|
+
no.getOrCreate().withPrefix("nimble").register(yw())
|
|
5875
|
+
const $w=no.tagFor(xw),Cw=G`
|
|
5853
5876
|
<template
|
|
5854
5877
|
role="grid"
|
|
5855
5878
|
aria-multiselectable="${e=>e.ariaMultiSelectable}"
|
|
@@ -5860,11 +5883,11 @@ const xw=no.tagFor(bw),yw=G`
|
|
|
5860
5883
|
--ni-private-table-header-scrollbar-spacer-width: ${e=>e.virtualizer.headerContainerMarginRight}px;
|
|
5861
5884
|
--ni-private-table-scroll-height: ${e=>e.virtualizer.allRowsHeight}px;
|
|
5862
5885
|
--ni-private-table-row-container-top: ${e=>e.virtualizer.rowContainerYOffset}px;
|
|
5863
|
-
--ni-private-table-row-grid-columns: ${e=>e.rowGridColumns??""}
|
|
5886
|
+
--ni-private-table-row-grid-columns: ${e=>e.rowGridColumns??""};
|
|
5864
5887
|
">
|
|
5865
5888
|
<div role="rowgroup" class="header-container">
|
|
5866
5889
|
<div class="header-row" role="row">
|
|
5867
|
-
${Ie((e=>e.selectionMode===
|
|
5890
|
+
${Ie((e=>e.selectionMode===Zb.multiple),G`
|
|
5868
5891
|
<span role="columnheader" class="checkbox-container">
|
|
5869
5892
|
<${Bp}
|
|
5870
5893
|
${_e("selectionCheckbox")}
|
|
@@ -5874,17 +5897,27 @@ const xw=no.tagFor(bw),yw=G`
|
|
|
5874
5897
|
</${Bp}>
|
|
5875
5898
|
</span>
|
|
5876
5899
|
`)}
|
|
5877
|
-
|
|
5900
|
+
<span role="gridcell">
|
|
5901
|
+
<${md}
|
|
5902
|
+
class="collapse-all-button ${e=>""+(e.showCollapseAll?"visible":"")}"
|
|
5903
|
+
content-hidden
|
|
5904
|
+
appearance="${Tc}"
|
|
5905
|
+
@click="${e=>e.handleCollapseAllGroupRows()}"
|
|
5906
|
+
>
|
|
5907
|
+
<${Xf} slot="start"></${Xf}>
|
|
5908
|
+
</${md}>
|
|
5909
|
+
</span>
|
|
5878
5910
|
<span class="column-header-container">
|
|
5879
5911
|
${Ve((e=>e.columns),G`
|
|
5880
5912
|
${Ie((e=>!e.columnHidden),G`
|
|
5881
|
-
<${
|
|
5913
|
+
<${aw}
|
|
5882
5914
|
class="header"
|
|
5883
|
-
sort-direction="${e=>"number"==typeof e.sortIndex?e.sortDirection:
|
|
5915
|
+
sort-direction="${e=>"number"==typeof e.sortIndex?e.sortDirection:Nb.none}"
|
|
5884
5916
|
?first-sorted-column="${(e,t)=>e===t.parent.firstSortedColumn}"
|
|
5917
|
+
:isGrouped=${e=>"number"==typeof e.columnInternals.groupIndex&&!e.columnInternals.groupingDisabled}
|
|
5885
5918
|
>
|
|
5886
5919
|
<slot name="${e=>e.slot}"></slot>
|
|
5887
|
-
</${
|
|
5920
|
+
</${aw}>
|
|
5888
5921
|
`)}
|
|
5889
5922
|
`)}
|
|
5890
5923
|
<div class="header-scrollbar-spacer"></div>
|
|
@@ -5893,32 +5926,32 @@ const xw=no.tagFor(bw),yw=G`
|
|
|
5893
5926
|
</div>
|
|
5894
5927
|
<div class="table-viewport" ${_e("viewport")}>
|
|
5895
5928
|
<div class="table-scroll"></div>
|
|
5896
|
-
<div class="table-row-container" ${De({property:"rowElements",filter:Fe(
|
|
5929
|
+
<div class="table-row-container" ${De({property:"rowElements",filter:Fe(mw)})}
|
|
5897
5930
|
role="rowgroup">
|
|
5898
5931
|
${Ie((e=>e.columns.length>0&&e.canRenderRows),G`
|
|
5899
5932
|
${Ve((e=>e.virtualizer.visibleItems),G`
|
|
5900
5933
|
${Ie(((e,t)=>t.parent.tableData[e.index]?.isGrouped),G`
|
|
5901
|
-
<${
|
|
5934
|
+
<${$w}
|
|
5902
5935
|
class="group-row"
|
|
5903
5936
|
:groupRowValue="${(e,t)=>t.parent.tableData[e.index]?.groupRowValue}"
|
|
5904
5937
|
?expanded="${(e,t)=>t.parent.tableData[e.index]?.isExpanded}"
|
|
5905
5938
|
:nestingLevel="${(e,t)=>t.parent.tableData[e.index]?.nestingLevel}"
|
|
5906
5939
|
:leafItemCount="${(e,t)=>t.parent.tableData[e.index]?.leafItemCount}"
|
|
5907
5940
|
:groupColumn="${(e,t)=>t.parent.tableData[e.index]?.groupColumn}"
|
|
5908
|
-
?selectable="${(e,t)=>t.parent.selectionMode===
|
|
5941
|
+
?selectable="${(e,t)=>t.parent.selectionMode===Zb.multiple}"
|
|
5909
5942
|
selection-state="${(e,t)=>t.parent.tableData[e.index]?.selectionState}"
|
|
5910
5943
|
@group-selection-toggle="${async(e,t)=>t.parent.onRowSelectionToggle(e.index,t.event)}"
|
|
5911
5944
|
@group-expand-toggle="${(e,t)=>t.parent.handleGroupRowExpanded(e.index,t.event)}"
|
|
5912
5945
|
>
|
|
5913
|
-
</${
|
|
5946
|
+
</${$w}>
|
|
5914
5947
|
`)}
|
|
5915
5948
|
${Ie(((e,t)=>!t.parent.tableData[e.index]?.isGrouped),G`
|
|
5916
|
-
<${
|
|
5949
|
+
<${mw}
|
|
5917
5950
|
class="row"
|
|
5918
5951
|
record-id="${(e,t)=>t.parent.tableData[e.index]?.id}"
|
|
5919
|
-
?selectable="${(e,t)=>t.parent.selectionMode!==
|
|
5920
|
-
?selected="${(e,t)=>t.parent.tableData[e.index]?.selectionState===
|
|
5921
|
-
?hide-selection="${(e,t)=>t.parent.selectionMode!==
|
|
5952
|
+
?selectable="${(e,t)=>t.parent.selectionMode!==Zb.none}"
|
|
5953
|
+
?selected="${(e,t)=>t.parent.tableData[e.index]?.selectionState===jb}"
|
|
5954
|
+
?hide-selection="${(e,t)=>t.parent.selectionMode!==Zb.multiple}"
|
|
5922
5955
|
:dataRecord="${(e,t)=>t.parent.tableData[e.index]?.record}"
|
|
5923
5956
|
:columns="${(e,t)=>t.parent.columns}"
|
|
5924
5957
|
:nestingLevel="${(e,t)=>t.parent.tableData[e.index]?.nestingLevel}"
|
|
@@ -5935,7 +5968,7 @@ const xw=no.tagFor(bw),yw=G`
|
|
|
5935
5968
|
</slot>
|
|
5936
5969
|
`)}
|
|
5937
5970
|
`)}
|
|
5938
|
-
</${
|
|
5971
|
+
</${mw}>
|
|
5939
5972
|
`)}
|
|
5940
5973
|
`)}
|
|
5941
5974
|
`)}
|
|
@@ -5954,8 +5987,8 @@ const xw=no.tagFor(bw),yw=G`
|
|
|
5954
5987
|
*
|
|
5955
5988
|
* @license MIT
|
|
5956
5989
|
*/
|
|
5957
|
-
function
|
|
5958
|
-
for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e}
|
|
5990
|
+
function kw(){return kw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]
|
|
5991
|
+
for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e},kw.apply(this,arguments)}
|
|
5959
5992
|
/**
|
|
5960
5993
|
* virtual-core
|
|
5961
5994
|
*
|
|
@@ -5965,42 +5998,42 @@ for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e},
|
|
|
5965
5998
|
* LICENSE.md file in the root directory of this source tree.
|
|
5966
5999
|
*
|
|
5967
6000
|
* @license MIT
|
|
5968
|
-
*/function
|
|
6001
|
+
*/function Sw(e,t,i){var o,n,s=null!=(o=i.initialDeps)?o:[]
|
|
5969
6002
|
return function(){var o
|
|
5970
6003
|
i.key&&null!=i.debug&&i.debug()&&(o=Date.now())
|
|
5971
6004
|
var r,a=e()
|
|
5972
6005
|
if(!(a.length!==s.length||a.some((function(e,t){return s[t]!==e}))))return n
|
|
5973
6006
|
if(s=a,i.key&&null!=i.debug&&i.debug()&&(r=Date.now()),n=t.apply(void 0,a),i.key&&null!=i.debug&&i.debug()){var l=Math.round(100*(Date.now()-o))/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
|
|
5974
6007
|
return e}
|
|
5975
|
-
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==i?void 0:i.key)}return null==i||null==i.onChange||i.onChange(n),n}}var
|
|
5976
|
-
return o},
|
|
6008
|
+
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==i?void 0:i.key)}return null==i||null==i.onChange||i.onChange(n),n}}var _w,Iw=function(e){return e},Rw=function(e){for(var t=Math.max(e.startIndex-e.overscan,0),i=Math.min(e.endIndex+e.overscan,e.count-1),o=[],n=t;n<=i;n++)o.push(n)
|
|
6009
|
+
return o},Mw=function(e,t){var i=new ResizeObserver((function(e){var i=e[0]
|
|
5977
6010
|
if(i){var o=i.contentRect,n=o.width,s=o.height
|
|
5978
6011
|
t({width:Math.round(n),height:Math.round(s)})}else t({width:0,height:0})}))
|
|
5979
|
-
if(e.scrollElement)return t(e.scrollElement.getBoundingClientRect()),i.observe(e.scrollElement),function(){i.unobserve(e.scrollElement)}},
|
|
6012
|
+
if(e.scrollElement)return t(e.scrollElement.getBoundingClientRect()),i.observe(e.scrollElement),function(){i.unobserve(e.scrollElement)}},Aw={element:["scrollLeft","scrollTop"],window:["scrollX","scrollY"]},Ow=(_w="element",function(e,t){if(e.scrollElement){var i=Aw[_w][0],o=Aw[_w][1],n=e.scrollElement[i],s=e.scrollElement[o],r=function(){var n=e.scrollElement[e.options.horizontal?i:o]
|
|
5980
6013
|
t(n)}
|
|
5981
6014
|
r()
|
|
5982
6015
|
var a=function(t){var a=t.currentTarget,l=a[i],c=a[o];(e.options.horizontal?n-l:s-c)&&r(),n=l,s=c}
|
|
5983
|
-
return e.scrollElement.addEventListener("scroll",a,{capture:!1,passive:!0}),function(){e.scrollElement.removeEventListener("scroll",a)}}}),
|
|
5984
|
-
null==(o=i.scrollElement)||null==o.scrollTo||o.scrollTo(((n={})[i.options.horizontal?"left":"top"]=l,n.behavior=a,n))},
|
|
6016
|
+
return e.scrollElement.addEventListener("scroll",a,{capture:!1,passive:!0}),function(){e.scrollElement.removeEventListener("scroll",a)}}}),Ew=function(e,t){return Math.round(e.getBoundingClientRect()[t.options.horizontal?"width":"height"])},Vw=function(e,t,i){var o,n,s=t.adjustments,r=void 0===s?0:s,a=t.behavior,l=e+r
|
|
6017
|
+
null==(o=i.scrollElement)||null==o.scrollTo||o.scrollTo(((n={})[i.options.horizontal?"left":"top"]=l,n.behavior=a,n))},Fw=function(e){var t,i=this
|
|
5985
6018
|
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){i._measureElement(e.target,!1)}))})):null)}),this.range={startIndex:0,endIndex:0},this.setOptions=function(e){Object.entries(e).forEach((function(t){var i=t[0]
|
|
5986
|
-
void 0===t[1]&&delete e[i]})),i.options
|
|
6019
|
+
void 0===t[1]&&delete e[i]})),i.options=kw({debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Iw,rangeExtractor:Rw,onChange:function(){},measureElement:Ew,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[]},e)},this.notify=function(){null==i.options.onChange||i.options.onChange(i)},this.cleanup=function(){i.unsubs.filter(Boolean).forEach((function(e){return e()})),i.unsubs=[],i.scrollElement=null},this._didMount=function(){var e=i.getResizeObserver()
|
|
5987
6020
|
return Object.values(i.measureElementCache).forEach((function(t){return null==e?void 0:e.observe(t)})),function(){null==e||e.disconnect(),i.cleanup()}},this._willUpdate=function(){var e=i.options.getScrollElement()
|
|
5988
|
-
i.scrollElement!==e&&(i.cleanup(),i.scrollElement=e,i._scrollToOffset(i.scrollOffset,{adjustments:void 0,behavior:void 0}),i.unsubs.push(i.options.observeElementRect(i,(function(e){i.scrollRect=e,i.maybeNotify()}))),i.unsubs.push(i.options.observeElementOffset(i,(function(e){i.scrollAdjustments=0,i.scrollOffset!==e&&(null!==i.isScrollingTimeoutId&&(clearTimeout(i.isScrollingTimeoutId),i.isScrollingTimeoutId=null),i.isScrolling=!0,i.scrollDirection=i.scrollOffset<e?"forward":"backward",i.scrollOffset=e,i.maybeNotify(),i.isScrollingTimeoutId=setTimeout((function(){i.isScrollingTimeoutId=null,i.isScrolling=!1,i.scrollDirection=null,i.maybeNotify()}),i.options.scrollingDelay))}))))},this.getSize=function(){return i.scrollRect[i.options.horizontal?"width":"height"]},this.getMeasurements=
|
|
6021
|
+
i.scrollElement!==e&&(i.cleanup(),i.scrollElement=e,i._scrollToOffset(i.scrollOffset,{adjustments:void 0,behavior:void 0}),i.unsubs.push(i.options.observeElementRect(i,(function(e){i.scrollRect=e,i.maybeNotify()}))),i.unsubs.push(i.options.observeElementOffset(i,(function(e){i.scrollAdjustments=0,i.scrollOffset!==e&&(null!==i.isScrollingTimeoutId&&(clearTimeout(i.isScrollingTimeoutId),i.isScrollingTimeoutId=null),i.isScrolling=!0,i.scrollDirection=i.scrollOffset<e?"forward":"backward",i.scrollOffset=e,i.maybeNotify(),i.isScrollingTimeoutId=setTimeout((function(){i.isScrollingTimeoutId=null,i.isScrolling=!1,i.scrollDirection=null,i.maybeNotify()}),i.options.scrollingDelay))}))))},this.getSize=function(){return i.scrollRect[i.options.horizontal?"width":"height"]},this.getMeasurements=Sw((function(){return[i.options.count,i.options.paddingStart,i.options.scrollMargin,i.options.getItemKey,i.itemSizeCache]}),(function(e,t,o,n,s){var r=i.pendingMeasuredCacheIndexes.length>0?Math.min.apply(Math,i.pendingMeasuredCacheIndexes):0
|
|
5989
6022
|
i.pendingMeasuredCacheIndexes=[]
|
|
5990
6023
|
for(var a=i.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+o,u="number"==typeof d?d:i.options.estimateSize(l),p=h+u
|
|
5991
|
-
a[l]={index:l,start:h,size:u,end:p,key:c}}return i.measurementsCache=a,a}),{key:!1,debug:function(){return i.options.debug}}),this.calculateRange=
|
|
6024
|
+
a[l]={index:l,start:h,size:u,end:p,key:c}}return i.measurementsCache=a,a}),{key:!1,debug:function(){return i.options.debug}}),this.calculateRange=Sw((function(){return[i.getMeasurements(),i.getSize(),i.scrollOffset]}),(function(e,t,o){return i.range=function(e){var t=e.measurements,i=e.outerSize,o=e.scrollOffset,n=t.length-1,s=function(e){return t[e].start},r=function(e,t,i,o){for(;e<=t;){var n=(e+t)/2|0,s=i(n)
|
|
5992
6025
|
if(s<o)e=n+1
|
|
5993
6026
|
else{if(!(s>o))return n
|
|
5994
6027
|
t=n-1}}return e>0?e-1:0}(0,n,s,o),a=r
|
|
5995
6028
|
for(;a<n&&t[a].end<o+i;)a++
|
|
5996
|
-
return{startIndex:r,endIndex:a}}({measurements:e,outerSize:t,scrollOffset:o})}),{key:!1,debug:function(){return i.options.debug}}),this.maybeNotify=
|
|
6029
|
+
return{startIndex:r,endIndex:a}}({measurements:e,outerSize:t,scrollOffset:o})}),{key:!1,debug:function(){return i.options.debug}}),this.maybeNotify=Sw((function(){return[].concat(Object.values(i.calculateRange()),[i.isScrolling])}),(function(){i.notify()}),{key:!1,debug:function(){return i.options.debug},initialDeps:[].concat(Object.values(this.range),[this.isScrolling])}),this.getIndexes=Sw((function(){return[i.options.rangeExtractor,i.calculateRange(),i.options.overscan,i.options.count]}),(function(e,t,i,o){return e(kw({},t,{overscan:i,count:o}))}),{key:!1,debug:function(){return i.options.debug}}),this.indexFromElement=function(e){var t=i.options.indexAttribute,o=e.getAttribute(t)
|
|
5997
6030
|
return o?parseInt(o,10):(console.warn("Missing attribute name '"+t+"={index}' on measured element."),-1)},this._measureElement=function(e,t){var o,n=i.indexFromElement(e),s=i.measurementsCache[n]
|
|
5998
6031
|
if(s){var r=i.measureElementCache[s.key],a=i.getResizeObserver()
|
|
5999
6032
|
if(!e.isConnected)return null==a||a.unobserve(e),void(e===r&&delete i.measureElementCache[s.key])
|
|
6000
6033
|
if(r!==e)r&&(null==a||a.unobserve(r)),null==a||a.observe(e),i.measureElementCache[s.key]=e
|
|
6001
6034
|
else if(!t&&!r.__virtualizerSkipFirstNotSync)return void(r.__virtualizerSkipFirstNotSync=!0)
|
|
6002
6035
|
var l,c=i.options.measureElement(e,i),d=c-(null!=(o=i.itemSizeCache[s.key])?o:s.size)
|
|
6003
|
-
if(0!==d)s.start<i.scrollOffset&&i._scrollToOffset(i.scrollOffset,{adjustments:i.scrollAdjustments+=d,behavior:void 0}),i.pendingMeasuredCacheIndexes.push(n),i.itemSizeCache
|
|
6036
|
+
if(0!==d)s.start<i.scrollOffset&&i._scrollToOffset(i.scrollOffset,{adjustments:i.scrollAdjustments+=d,behavior:void 0}),i.pendingMeasuredCacheIndexes.push(n),i.itemSizeCache=kw({},i.itemSizeCache,((l={})[s.key]=c,l)),i.notify()}},this.measureElement=function(e){e&&i._measureElement(e,!0)},this.getVirtualItems=Sw((function(){return[i.getIndexes(),i.getMeasurements()]}),(function(e,t){for(var i=[],o=0,n=e.length;o<n;o++){var s=t[e[o]]
|
|
6004
6037
|
i.push(s)}return i}),{key:!1,debug:function(){return i.options.debug}}),this.getOffsetForAlignment=function(e,t){var o=i.getSize()
|
|
6005
6038
|
"auto"===t&&(t=e<=i.scrollOffset?"start":e>=i.scrollOffset+o?"end":"start"),"start"===t||("end"===t?e-=o:"center"===t&&(e-=o/2))
|
|
6006
6039
|
var n=i.options.horizontal?"scrollWidth":"scrollHeight",s=(i.scrollElement?"document"in i.scrollElement?i.scrollElement.document.documentElement[n]:i.scrollElement[n]:0)-i.getSize()
|
|
@@ -6030,35 +6063,35 @@ i.options.scrollToFn(e,{behavior:n,adjustments:o},i)},this.measure=function(){i.
|
|
|
6030
6063
|
* LICENSE.md file in the root directory of this source tree.
|
|
6031
6064
|
*
|
|
6032
6065
|
* @license MIT
|
|
6033
|
-
*/class
|
|
6066
|
+
*/class Hw{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]
|
|
6034
6067
|
if(t){const e=t.inlineSize
|
|
6035
6068
|
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()
|
|
6036
|
-
this.virtualizer?this.virtualizer.setOptions(e):this.virtualizer=new
|
|
6037
|
-
return{count:this.tanStackTable.getRowModel().rows.length,getScrollElement:()=>this.table.viewport,estimateSize:t=>e,enableSmoothScroll:!0,overscan:3,scrollingDelay:5,scrollToFn:
|
|
6069
|
+
this.virtualizer?this.virtualizer.setOptions(e):this.virtualizer=new Fw(e),this.virtualizer._willUpdate(),this.handleVirtualizerChange()}createVirtualizerOptions(){const e=parseFloat(ea.getValueFor(this.table))+2*parseFloat(na.getValueFor(this.table))
|
|
6070
|
+
return{count:this.tanStackTable.getRowModel().rows.length,getScrollElement:()=>this.table.viewport,estimateSize:t=>e,enableSmoothScroll:!0,overscan:3,scrollingDelay:5,scrollToFn:Vw,observeElementOffset:Ow,observeElementRect:Mw,onChange:()=>this.handleVirtualizerChange()}}handleVirtualizerChange(){this.notifyFocusedCellRecycling()
|
|
6038
6071
|
const e=this.virtualizer
|
|
6039
6072
|
this.visibleItems=e.getVirtualItems(),this.allRowsHeight=e.getTotalSize()
|
|
6040
6073
|
let t=0
|
|
6041
6074
|
if(this.visibleItems.length>0){t=this.visibleItems[0].start}this.rowContainerYOffset=t}notifyFocusedCellRecycling(){let e=this.table.shadowRoot.activeElement
|
|
6042
|
-
for(;null!==e&&!(e instanceof
|
|
6043
|
-
if(e instanceof
|
|
6044
|
-
case
|
|
6045
|
-
default:return
|
|
6046
|
-
return"string"==typeof o&&"string"==typeof n?o.localeCompare(n):o===n?0:void 0===o||null===o&&void 0!==n?-1:1}e([f],
|
|
6047
|
-
const
|
|
6048
|
-
return!1},
|
|
6075
|
+
for(;null!==e&&!(e instanceof Yb)&&e.shadowRoot;)e=e.shadowRoot.activeElement
|
|
6076
|
+
if(e instanceof Yb&&e.focusedRecycleCallback(),void 0!==this.table.openActionMenuRecordId){this.table.rowElements.find((e=>e.recordId===this.table.openActionMenuRecordId))?.closeOpenActionMenus()}}}function Pw(e){switch(e){case Gb:return Tb.basic
|
|
6077
|
+
case Wb:return Tw
|
|
6078
|
+
default:return Tb.basic}}function Tw(e,t,i){const o=e.getValue(i),n=t.getValue(i)
|
|
6079
|
+
return"string"==typeof o&&"string"==typeof n?o.localeCompare(n):o===n?0:void 0===o||null===o&&void 0!==n?-1:1}e([f],Hw.prototype,"visibleItems",void 0),e([f],Hw.prototype,"allRowsHeight",void 0),e([f],Hw.prototype,"headerContainerMarginRight",void 0),e([f],Hw.prototype,"rowContainerYOffset",void 0)
|
|
6080
|
+
const Lw=(e,...t)=>{for(const i of t)if(e===i)return!0
|
|
6081
|
+
return!1},Dw=(e,...t)=>{for(const i of t)if(e===i)return!0
|
|
6049
6082
|
return!1}
|
|
6050
|
-
class
|
|
6051
|
-
if(i){return`${Math.max(t,i)}px`}return`minmax(${t}px, ${o}fr)`})).join(" ")}}class
|
|
6083
|
+
class zw{constructor(e){this.requiredUpdates={rowIds:!1,groupRows:!1,columnIds:!1,columnSort:!1,columnWidths:!1,columnDefinition:!1,actionMenuSlots:!1,selectionMode:!1},this.updateQueued=!1,this.table=e}get updateRowIds(){return this.requiredUpdates.rowIds}get updateGroupRows(){return this.requiredUpdates.groupRows}get updateColumnIds(){return this.requiredUpdates.columnIds}get updateColumnSort(){return this.requiredUpdates.columnSort}get updateColumnWidths(){return this.requiredUpdates.columnWidths}get updateColumnDefinition(){return this.requiredUpdates.columnDefinition}get updateActionMenuSlots(){return this.requiredUpdates.actionMenuSlots}get updateSelectionMode(){return this.requiredUpdates.selectionMode}get requiresTanStackUpdate(){return this.requiredUpdates.rowIds||this.requiredUpdates.columnSort||this.requiredUpdates.columnDefinition||this.requiredUpdates.groupRows||this.requiredUpdates.selectionMode}get requiresTanStackDataReset(){return this.requiredUpdates.rowIds||this.requiredUpdates.columnDefinition}trackAllStateChanged(){this.setAllKeys(!0),this.queueUpdate()}get hasPendingUpdates(){return this.updateQueued}trackColumnPropertyChanged(e){Lw(e,"columnId")?this.requiredUpdates.columnIds=!0:Dw(e,"operandDataRecordFieldName","sortOperation")?this.requiredUpdates.columnDefinition=!0:Lw(e,"sortIndex","sortDirection")?this.requiredUpdates.columnSort=!0:Lw(e,"columnHidden")||Dw(e,"currentFractionalWidth","currentPixelWidth","minPixelWidth")?this.requiredUpdates.columnWidths=!0:Lw(e,"actionMenuSlot")?this.requiredUpdates.actionMenuSlots=!0:Dw(e,"groupIndex","groupingDisabled")&&(this.requiredUpdates.groupRows=!0),this.queueUpdate()}trackColumnInstancesChanged(){this.requiredUpdates.columnIds=!0,this.requiredUpdates.columnDefinition=!0,this.requiredUpdates.columnSort=!0,this.requiredUpdates.columnWidths=!0,this.requiredUpdates.actionMenuSlots=!0,this.requiredUpdates.groupRows=!0,this.queueUpdate()}trackIdFieldNameChanged(){this.requiredUpdates.rowIds=!0,this.queueUpdate()}trackSelectionModeChanged(){this.requiredUpdates.selectionMode=!0,this.queueUpdate()}setAllKeys(e){Object.keys(this.requiredUpdates).forEach((t=>{this.requiredUpdates[t]=e}))}queueUpdate(){this.table.$fastController.isConnected&&(this.updateQueued||(this.updateQueued=!0,u.queueUpdate((()=>{this.table.update(),this.setAllKeys(!1),this.updateQueued=!1}))))}}class Bw{static getGridTemplateColumns(e){return e?.filter((e=>!e.columnHidden)).map((e=>{const{minPixelWidth:t,currentPixelWidth:i,currentFractionalWidth:o}=e.columnInternals
|
|
6084
|
+
if(i){return`${Math.max(t,i)}px`}return`minmax(${t}px, ${o}fr)`})).join(" ")}}class Nw extends _t{constructor(){super(),this.selectionMode=Zb.none,this.tableData=[],this.columns=[],this.childItems=[],this.rowElements=[],this.actionMenuSlots=[],this.canRenderRows=!0,this.scrollX=0,this.selectionState=qb,this.showCollapseAll=!1,this.tableValidator=new tw,this.updateTracker=new zw(this),this.columnNotifiers=[],this.isInitialized=!1,this.collapsedRows=new Set,this.ignoreSelectionChangeEvents=!1,this.onViewPortScroll=e=>{this.scrollX=e.target.scrollLeft},this.getIsRowExpanded=e=>{if(!e.getIsGrouped())return!1
|
|
6052
6085
|
const t=this.table.options.state.expanded
|
|
6053
6086
|
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
|
|
6054
6087
|
this.updateTableOptions({state:{rowSelection:t}})},this.handleExpandedChange=e=>{const t=e instanceof Function?e(this.table.getState().expanded):e
|
|
6055
|
-
this.updateTableOptions({state:{expanded:t}})},this.options={data:[],onStateChange:e=>{},onRowSelectionChange:this.handleRowSelectionChange,onExpandedChange:this.handleExpandedChange,getCoreRowModel:e=>
|
|
6088
|
+
this.updateTableOptions({state:{expanded:t}})},this.options={data:[],onStateChange:e=>{},onRowSelectionChange:this.handleRowSelectionChange,onExpandedChange:this.handleExpandedChange,getCoreRowModel:e=>sb((()=>[e.options.data]),(t=>{const i={rows:[],flatRows:[],rowsById:{}},o=function(t,n,s){void 0===n&&(n=0)
|
|
6056
6089
|
const r=[]
|
|
6057
|
-
for(let l=0;l<t.length;l++){const c=
|
|
6090
|
+
for(let l=0;l<t.length;l++){const c=zb(e,e._getRowId(t[l],l,s),t[l],l,n)
|
|
6058
6091
|
var a
|
|
6059
6092
|
i.flatRows.push(c),i.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=o(c.originalSubRows,n+1,c)))}return r}
|
|
6060
6093
|
return i.rows=o(t),i}),{key:!1,debug:()=>{var t
|
|
6061
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getSortedRowModel:e=>
|
|
6094
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getSortedRowModel:e=>sb((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,i)=>{if(!i.rows.length||null==t||!t.length)return i
|
|
6062
6095
|
const o=e.getState().sorting,n=[],s=o.filter((t=>{var i
|
|
6063
6096
|
return null==(i=e.getColumn(t.id))?void 0:i.getCanSort()})),r={}
|
|
6064
6097
|
s.forEach((t=>{const i=e.getColumn(t.id)
|
|
@@ -6071,46 +6104,46 @@ if(i||o)return i&&o?0:i?a.sortUndefined:-a.sortUndefined}let c=a.sortingFn(e,t,n
|
|
|
6071
6104
|
if(0!==c)return l&&(c*=-1),a.invertSorting&&(c*=-1),c}return e.index-t.index})),t.forEach((e=>{var t
|
|
6072
6105
|
n.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=a(e.subRows))})),t}
|
|
6073
6106
|
return{rows:a(i.rows),flatRows:n,rowsById:i.rowsById}}),{key:!1,debug:()=>{var t
|
|
6074
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getGroupedRowModel:
|
|
6107
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getGroupedRowModel:Bb(),getExpandedRowModel:e=>sb((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,i)=>!t.rows.length||!0!==e&&!Object.keys(null!=e?e:{}).length?t:i?function(e){const t=[],i=e=>{var o
|
|
6075
6108
|
t.push(e),null!=(o=e.subRows)&&o.length&&e.getIsExpanded()&&e.subRows.forEach(i)}
|
|
6076
6109
|
return e.rows.forEach(i),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}(t):t),{key:!1,debug:()=>{var t
|
|
6077
|
-
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=
|
|
6110
|
+
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=Db(this.options),this.virtualizer=new Hw(this,this.table)}get validity(){return this.tableValidator.getValidity()}async setData(e){await this.processPendingUpdates()
|
|
6078
6111
|
const t=e.map((e=>({...e}))),i={data:t}
|
|
6079
6112
|
if(this.validateWithData(t),this.tableValidator.areRecordIdsValid()){const e=await this.getSelectedRecordIds()
|
|
6080
6113
|
i.state={rowSelection:this.calculateTanStackSelectionState(e)}}this.updateTableOptions(i)}async getSelectedRecordIds(){await this.processPendingUpdates()
|
|
6081
6114
|
const e=this.options.state.rowSelection
|
|
6082
6115
|
if(!e)return[]
|
|
6083
6116
|
const t=[]
|
|
6084
|
-
return Object.entries(e).forEach((([e,i])=>{i&&t.push(e)})),t}async setSelectedRecordIds(e){await this.processPendingUpdates(),this.selectionMode!==
|
|
6117
|
+
return Object.entries(e).forEach((([e,i])=>{i&&t.push(e)})),t}async setSelectedRecordIds(e){await this.processPendingUpdates(),this.selectionMode!==Zb.none&&this.updateTableOptions({state:{rowSelection:this.calculateTanStackSelectionState(e)}})}connectedCallback(){super.connectedCallback(),this.initialize(),this.virtualizer.connectedCallback(),this.viewport.addEventListener("scroll",this.onViewPortScroll,{passive:!0})}disconnectedCallback(){super.disconnectedCallback(),this.virtualizer.disconnectedCallback(),this.viewport.removeEventListener("scroll",this.onViewPortScroll)}checkValidity(){return this.tableValidator.isValid()}handleChange(e,t){(e instanceof ew||e instanceof Jb)&&"string"==typeof t&&this.updateTracker.trackColumnPropertyChanged(t)}async onRowSelectionToggle(e,t){if(t.stopImmediatePropagation(),this.selectionMode===Zb.none)return
|
|
6085
6118
|
const i=this.tableData[e]
|
|
6086
|
-
i?.isGrouped&&i?.selectionState===
|
|
6119
|
+
i?.isGrouped&&i?.selectionState===jb?this.deselectAllLeafRows(e):this.table.getRowModel().rows[e]?.toggleSelected(t.detail.newState),await this.emitSelectionChangeEvent()}async onRowClick(e){return this.selectSingleRow(e)}async onAllRowsSelectionChange(e){e.stopPropagation(),this.ignoreSelectionChangeEvents||(this.table.toggleAllRowsSelected(this.selectionCheckbox.checked),await this.emitSelectionChangeEvent())}async onRowActionMenuBeforeToggle(e,t){t.stopImmediatePropagation()
|
|
6087
6120
|
let i=t.detail.recordIds
|
|
6088
|
-
if(this.selectionMode!==
|
|
6121
|
+
if(this.selectionMode!==Zb.none){const t=this.table.getRowModel().rows[e]
|
|
6089
6122
|
t&&!t.getIsSelected()?await this.selectSingleRow(e):i=await this.getSelectedRecordIds()}this.openActionMenuRecordId=t.detail.recordIds[0]
|
|
6090
6123
|
const o={...t.detail,recordIds:i}
|
|
6091
6124
|
this.$emit("action-menu-beforetoggle",o)}async onRowActionMenuToggle(e){e.stopImmediatePropagation()
|
|
6092
|
-
const t=this.selectionMode===
|
|
6093
|
-
this.$emit("action-menu-toggle",i),e.detail.newState||(this.openActionMenuRecordId=void 0)}handleGroupRowExpanded(e,t){this.toggleGroupExpanded(e),t.stopPropagation()}update(){this.validate(),this.updateTracker.requiresTanStackUpdate&&this.updateTanStack(),this.updateTracker.updateActionMenuSlots&&this.updateActionMenuSlots(),this.updateTracker.updateColumnWidths&&this.updateRowGridColumns()}get ariaMultiSelectable(){switch(this.selectionMode){case
|
|
6094
|
-
case
|
|
6125
|
+
const t=this.selectionMode===Zb.multiple?await this.getSelectedRecordIds():e.detail.recordIds,i={...e.detail,recordIds:t}
|
|
6126
|
+
this.$emit("action-menu-toggle",i),e.detail.newState||(this.openActionMenuRecordId=void 0)}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()}update(){this.validate(),this.updateTracker.requiresTanStackUpdate&&this.updateTanStack(),this.updateTracker.updateActionMenuSlots&&this.updateActionMenuSlots(),this.updateTracker.updateColumnWidths&&this.updateRowGridColumns(),this.updateTracker.updateGroupRows&&(this.showCollapseAll=this.getColumnsParticipatingInGrouping().length>0)}get ariaMultiSelectable(){switch(this.selectionMode){case Zb.multiple:return"true"
|
|
6127
|
+
case Zb.single:return"false"
|
|
6095
6128
|
default:return null}}selectionModeChanged(e,t){this.$fastController.isConnected&&this.updateTracker.trackSelectionModeChanged()}idFieldNameChanged(e,t){this.$fastController.isConnected&&this.updateTracker.trackIdFieldNameChanged()}columnsChanged(e,t){this.$fastController.isConnected&&(this.observeColumns(),this.updateTracker.trackColumnInstancesChanged())}removeColumnObservers(){this.columnNotifiers.forEach((e=>{e.unsubscribe(this)})),this.columnNotifiers=[]}initialize(){this.isInitialized||(this.isInitialized=!0,this.$fastController.onConnectedCallback(),this.updateTracker.trackAllStateChanged(),this.observeColumns())}async processPendingUpdates(){if(this.initialize(),await u.nextUpdate(),this.updateTracker.hasPendingUpdates)throw new Error("Expected pending updates to be resolved")}observeColumns(){this.removeColumnObservers()
|
|
6096
6129
|
for(const e of this.columns){const t=v.getNotifier(e)
|
|
6097
6130
|
t.subscribe(this),this.columnNotifiers.push(t)
|
|
6098
|
-
v.getNotifier(e.columnInternals).subscribe(this),this.columnNotifiers.push(t)}}getColumnsParticipatingInSorting(){return this.columns.filter((e=>e.sortDirection!==
|
|
6099
|
-
await Promise.all(e),this.columns=this.childItems.filter((e=>e instanceof
|
|
6100
|
-
this.updateTracker.updateColumnSort&&(e.state.sorting=this.calculateTanStackSortState()),this.updateTracker.updateColumnDefinition&&(e.columns=this.calculateTanStackColumns()),this.updateTracker.updateRowIds&&(e.getRowId=this.calculateTanStackRowIdFunction(),e.state.rowSelection={}),this.updateTracker.updateSelectionMode&&(e.enableMultiRowSelection=this.selectionMode===
|
|
6131
|
+
v.getNotifier(e.columnInternals).subscribe(this),this.columnNotifiers.push(t)}}getColumnsParticipatingInSorting(){return this.columns.filter((e=>e.sortDirection!==Nb.none&&"number"==typeof e.sortIndex))}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()))
|
|
6132
|
+
await Promise.all(e),this.columns=this.childItems.filter((e=>e instanceof ew))}updateTanStack(){const e={state:{}}
|
|
6133
|
+
this.updateTracker.updateColumnSort&&(e.state.sorting=this.calculateTanStackSortState()),this.updateTracker.updateColumnDefinition&&(e.columns=this.calculateTanStackColumns()),this.updateTracker.updateRowIds&&(e.getRowId=this.calculateTanStackRowIdFunction(),e.state.rowSelection={}),this.updateTracker.updateSelectionMode&&(e.enableMultiRowSelection=this.selectionMode===Zb.multiple,e.enableSubRowSelection=this.selectionMode===Zb.multiple,e.state.rowSelection={}),this.updateTracker.requiresTanStackDataReset&&(e.data=[...this.table.options.data]),this.updateTracker.updateGroupRows&&(e.state.grouping=this.calculateTanStackGroupingState(),e.state.expanded=!0,this.collapsedRows.clear()),this.updateTableOptions(e)}updateActionMenuSlots(){const e=new Set
|
|
6101
6134
|
for(const t of this.columns)t.actionMenuSlot&&e.add(t.actionMenuSlot)
|
|
6102
|
-
this.actionMenuSlots=Array.from(e)}updateRowGridColumns(){this.rowGridColumns=
|
|
6103
|
-
this.$emit("selection-change",e)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===
|
|
6135
|
+
this.actionMenuSlots=Array.from(e)}updateRowGridColumns(){this.rowGridColumns=Bw.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.sortIndex))),this.tableValidator.validateColumnGroupIndices(this.getColumnsParticipatingInGrouping().map((e=>e.columnInternals.groupIndex))),this.validateWithData(this.table.options.data)}validateWithData(e){this.tableValidator.validateRecordIds(e,this.idFieldName),this.canRenderRows=this.checkValidity()}async emitSelectionChangeEvent(){const e={selectedRecordIds:await this.getSelectedRecordIds()}
|
|
6136
|
+
this.$emit("selection-change",e)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===jb,this.selectionCheckbox.indeterminate=this.selectionState===Ub,this.ignoreSelectionChangeEvents=!1)}refreshRows(){this.selectionState=this.getTableSelectionState()
|
|
6104
6137
|
const e=this.table.getRowModel().rows
|
|
6105
|
-
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()?
|
|
6138
|
+
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()?jb:this.table.getIsSomeRowsSelected()?Ub:qb}getRowSelectionState(e){return e.getIsGrouped()?this.getGroupedRowSelectionState(e):e.getIsSelected()?jb:qb}getGroupedRowSelectionState(e){const t=e.subRows??[]
|
|
6106
6139
|
let i=!1,o=!1
|
|
6107
|
-
for(const e of t){if(e.getIsGrouped()){switch(this.getGroupedRowSelectionState(e)){case
|
|
6140
|
+
for(const e of t){if(e.getIsGrouped()){switch(this.getGroupedRowSelectionState(e)){case qb:o=!0
|
|
6108
6141
|
break
|
|
6109
|
-
case
|
|
6142
|
+
case jb:i=!0
|
|
6110
6143
|
break
|
|
6111
|
-
default:return
|
|
6112
|
-
if(i&&o)return
|
|
6113
|
-
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()}async selectSingleRow(e){if(this.selectionMode===
|
|
6144
|
+
default:return Ub}}else e.getIsSelected()?i=!0:o=!0
|
|
6145
|
+
if(i&&o)return Ub}return i?jb:qb}getGroupRowColumn(e){const t=e.groupingColumnId
|
|
6146
|
+
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()}async selectSingleRow(e){if(this.selectionMode===Zb.none)return
|
|
6114
6147
|
const t=this.table.getRowModel().rows[e]
|
|
6115
6148
|
if(!t)return
|
|
6116
6149
|
const i=await this.getSelectedRecordIds()
|
|
@@ -6118,14 +6151,14 @@ const i=await this.getSelectedRecordIds()
|
|
|
6118
6151
|
for(const e of t)delete i[e]
|
|
6119
6152
|
this.updateTableOptions({state:{rowSelection:i}})}toggleGroupExpanded(e){const t=this.table.getRowModel().rows[e]
|
|
6120
6153
|
t.getIsExpanded()?this.collapsedRows.add(t.id):this.collapsedRows.delete(t.id),t.toggleExpanded()}calculateTanStackSortState(){const e=this.getColumnsParticipatingInSorting().sort(((e,t)=>e.sortIndex-t.sortIndex))
|
|
6121
|
-
return this.firstSortedColumn=e.length?e[0]:void 0,e.map((e=>({id:e.columnInternals.uniqueId,desc:e.sortDirection===
|
|
6122
|
-
if("string"==typeof i)return t[i]},sortingFn:
|
|
6154
|
+
return this.firstSortedColumn=e.length?e[0]:void 0,e.map((e=>({id:e.columnInternals.uniqueId,desc:e.sortDirection===Nb.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 i=e.columnInternals.operandDataRecordFieldName
|
|
6155
|
+
if("string"==typeof i)return t[i]},sortingFn:Pw(e.columnInternals.sortOperation)})))}calculateTanStackSelectionState(e){if(this.selectionMode===Zb.none)return{}
|
|
6123
6156
|
const t={},i=this.tableValidator.getPresentRecordIds(e)
|
|
6124
|
-
for(const e of i)if(t[e]=!0,this.selectionMode===
|
|
6125
|
-
return t}}e([ne({attribute:"id-field-name"})],
|
|
6126
|
-
const
|
|
6127
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
6128
|
-
const
|
|
6157
|
+
for(const e of i)if(t[e]=!0,this.selectionMode===Zb.single)break
|
|
6158
|
+
return t}}e([ne({attribute:"id-field-name"})],Nw.prototype,"idFieldName",void 0),e([ne({attribute:"selection-mode"})],Nw.prototype,"selectionMode",void 0),e([f],Nw.prototype,"tableData",void 0),e([f],Nw.prototype,"columns",void 0),e([f],Nw.prototype,"childItems",void 0),e([f],Nw.prototype,"rowElements",void 0),e([f],Nw.prototype,"actionMenuSlots",void 0),e([f],Nw.prototype,"openActionMenuRecordId",void 0),e([f],Nw.prototype,"canRenderRows",void 0),e([f],Nw.prototype,"scrollX",void 0),e([f],Nw.prototype,"rowGridColumns",void 0),e([f],Nw.prototype,"selectionState",void 0),e([f],Nw.prototype,"selectionCheckbox",void 0),e([f],Nw.prototype,"showCollapseAll",void 0),e([f],Nw.prototype,"firstSortedColumn",void 0)
|
|
6159
|
+
const Zw=Nw.compose({baseName:"table",template:Cw,styles:iw})
|
|
6160
|
+
no.getOrCreate().withPrefix("nimble").register(Zw()),no.tagFor(Nw)
|
|
6161
|
+
const qw=fe`
|
|
6129
6162
|
:host {
|
|
6130
6163
|
display: contents;
|
|
6131
6164
|
}
|
|
@@ -6135,14 +6168,14 @@ const Nw=fe`
|
|
|
6135
6168
|
overflow: hidden;
|
|
6136
6169
|
text-overflow: ellipsis;
|
|
6137
6170
|
}
|
|
6138
|
-
`,
|
|
6171
|
+
`,jw=G`
|
|
6139
6172
|
<template slot="${e=>e.columnInternals.uniqueId}">
|
|
6140
6173
|
<span class="header-content">
|
|
6141
6174
|
<slot></slot>
|
|
6142
6175
|
</span>
|
|
6143
6176
|
</template>
|
|
6144
6177
|
`
|
|
6145
|
-
const
|
|
6178
|
+
const Uw=G`
|
|
6146
6179
|
<span
|
|
6147
6180
|
${_e("textSpan")}
|
|
6148
6181
|
class="${e=>"string"==typeof e.groupHeaderValue?"":"placeholder"}"
|
|
@@ -6152,7 +6185,7 @@ const qw=G`
|
|
|
6152
6185
|
>
|
|
6153
6186
|
${e=>e.content}
|
|
6154
6187
|
</span>
|
|
6155
|
-
`,
|
|
6188
|
+
`,Gw=fe`
|
|
6156
6189
|
span {
|
|
6157
6190
|
font: ${xl};
|
|
6158
6191
|
color: ${yl};
|
|
@@ -6165,10 +6198,10 @@ const qw=G`
|
|
|
6165
6198
|
color: ${Tl};
|
|
6166
6199
|
}
|
|
6167
6200
|
`
|
|
6168
|
-
class
|
|
6169
|
-
const
|
|
6170
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
6171
|
-
const
|
|
6201
|
+
class Ww extends Xb{constructor(){super(...arguments),this.isValidContentAndHasOverflow=!1}get content(){return"string"==typeof this.groupHeaderValue?this.groupHeaderValue:this.columnConfig?.placeholder??""}updateTitleOverflow(){this.isValidContentAndHasOverflow=this.textSpan.offsetWidth<this.textSpan.scrollWidth}clearTitleOverflow(){this.isValidContentAndHasOverflow=!1}}e([f],Ww.prototype,"isValidContentAndHasOverflow",void 0),e([m],Ww.prototype,"content",null)
|
|
6202
|
+
const Xw=Ww.compose({baseName:"table-column-text-group-header",template:Uw,styles:Gw})
|
|
6203
|
+
no.getOrCreate().withPrefix("nimble").register(Xw())
|
|
6204
|
+
const Kw=no.tagFor(Ww),Yw=fe`
|
|
6172
6205
|
span {
|
|
6173
6206
|
font: ${xl};
|
|
6174
6207
|
color: ${yl};
|
|
@@ -6180,7 +6213,7 @@ const Ww=no.tagFor(Uw),Xw=fe`
|
|
|
6180
6213
|
.placeholder {
|
|
6181
6214
|
color: ${Tl};
|
|
6182
6215
|
}
|
|
6183
|
-
`,
|
|
6216
|
+
`,Qw=G`
|
|
6184
6217
|
<span
|
|
6185
6218
|
${_e("textSpan")}
|
|
6186
6219
|
class="${e=>"string"==typeof e.cellRecord.value?"":"placeholder"}"
|
|
@@ -6191,14 +6224,14 @@ const Ww=no.tagFor(Uw),Xw=fe`
|
|
|
6191
6224
|
${e=>e.content}
|
|
6192
6225
|
</span>
|
|
6193
6226
|
`
|
|
6194
|
-
class
|
|
6195
|
-
const
|
|
6196
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
6197
|
-
const
|
|
6198
|
-
class
|
|
6199
|
-
const
|
|
6200
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
6201
|
-
const
|
|
6227
|
+
class Jw extends Yb{constructor(){super(...arguments),this.isValidContentAndHasOverflow=!1}get content(){return"string"==typeof this.cellRecord.value?this.cellRecord.value:this.columnConfig.placeholder}}e([f],Jw.prototype,"isValidContentAndHasOverflow",void 0),e([m],Jw.prototype,"content",null)
|
|
6228
|
+
const ex=Jw.compose({baseName:"table-column-text-cell-view",template:Qw,styles:Yw})
|
|
6229
|
+
no.getOrCreate().withPrefix("nimble").register(ex())
|
|
6230
|
+
const tx=no.tagFor(Jw)
|
|
6231
|
+
class ix extends(function(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:ie})(t.prototype,"groupIndex"),t}(function(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:ie})(t.prototype,"fractionalWidth"),ne({attribute:"min-pixel-width",converter:ie})(t.prototype,"minPixelWidth"),t}(ew))){constructor(){super({cellRecordFieldNames:["value"],cellViewTag:tx,groupHeaderViewTag:Kw}),this.columnInternals.sortOperation=Wb}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}placeholderChanged(){this.columnInternals.columnConfig={placeholder:this.placeholder??""}}}e([ne({attribute:"field-name"})],ix.prototype,"fieldName",void 0),e([ne],ix.prototype,"placeholder",void 0)
|
|
6232
|
+
const ox=ix.compose({baseName:"table-column-text",template:jw,styles:qw})
|
|
6233
|
+
no.getOrCreate().withPrefix("nimble").register(ox()),no.tagFor(ix)
|
|
6234
|
+
const nx=fe`
|
|
6202
6235
|
${bn("grid")}
|
|
6203
6236
|
|
|
6204
6237
|
:host {
|
|
@@ -6222,7 +6255,7 @@ const ix=fe`
|
|
|
6222
6255
|
overflow: auto;
|
|
6223
6256
|
}
|
|
6224
6257
|
`
|
|
6225
|
-
class
|
|
6258
|
+
class sx extends jo{constructor(){super(),this.activeindicator=!1}}const rx=sx.compose({baseName:"tabs",baseClass:jo,template:(e,t)=>G`
|
|
6226
6259
|
<template class="${e=>e.orientation}">
|
|
6227
6260
|
${Ne(0,t)}
|
|
6228
6261
|
<div class="tablist" part="tablist" role="tablist">
|
|
@@ -6241,9 +6274,9 @@ class ox extends jo{constructor(){super(),this.activeindicator=!1}}const nx=ox.c
|
|
|
6241
6274
|
<slot name="tabpanel" part="tabpanel" ${Te("tabpanels")}></slot>
|
|
6242
6275
|
</div>
|
|
6243
6276
|
</template>
|
|
6244
|
-
`,styles:
|
|
6245
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
6246
|
-
const
|
|
6277
|
+
`,styles:nx})
|
|
6278
|
+
no.getOrCreate().withPrefix("nimble").register(rx()),no.tagFor(sx)
|
|
6279
|
+
const ax=fe`
|
|
6247
6280
|
${bn("flex")}
|
|
6248
6281
|
|
|
6249
6282
|
:host {
|
|
@@ -6261,15 +6294,15 @@ const sx=fe`
|
|
|
6261
6294
|
rgba(${jr}, 0.3);
|
|
6262
6295
|
margin: calc(${oa} / 4) calc(${oa} / 2);
|
|
6263
6296
|
}
|
|
6264
|
-
`,
|
|
6297
|
+
`,lx=G`
|
|
6265
6298
|
<template slot="end">
|
|
6266
6299
|
<div class="separator"></div>
|
|
6267
6300
|
<slot></slot>
|
|
6268
6301
|
</template>
|
|
6269
6302
|
`
|
|
6270
|
-
class
|
|
6271
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
6272
|
-
const
|
|
6303
|
+
class cx extends _t{}const dx=cx.compose({baseName:"tabs-toolbar",template:lx,styles:ax})
|
|
6304
|
+
no.getOrCreate().withPrefix("nimble").register(dx()),no.tagFor(cx)
|
|
6305
|
+
const hx="outline",ux="block",px=fe`
|
|
6273
6306
|
${bn("inline-flex")}
|
|
6274
6307
|
${Jp}
|
|
6275
6308
|
|
|
@@ -6409,12 +6442,12 @@ const cx="outline",dx="block",hx=fe`
|
|
|
6409
6442
|
top: calc(${oa} / 2);
|
|
6410
6443
|
right: var(--ni-private-scrollbar-width);
|
|
6411
6444
|
}
|
|
6412
|
-
`.withBehaviors(zc(
|
|
6445
|
+
`.withBehaviors(zc(hx,fe`
|
|
6413
6446
|
.control {
|
|
6414
6447
|
border-color: rgba(${jr}, 0.3);
|
|
6415
6448
|
background-color: transparent;
|
|
6416
6449
|
}
|
|
6417
|
-
`),zc(
|
|
6450
|
+
`),zc(ux,fe`
|
|
6418
6451
|
.control {
|
|
6419
6452
|
background-color: rgba(${jr}, 0.1);
|
|
6420
6453
|
}
|
|
@@ -6432,8 +6465,8 @@ const cx="outline",dx="block",hx=fe`
|
|
|
6432
6465
|
border-bottom-color: ${Ur};
|
|
6433
6466
|
}
|
|
6434
6467
|
`))
|
|
6435
|
-
class
|
|
6436
|
-
const
|
|
6468
|
+
class gx extends Xo{constructor(){super(...arguments),this.appearance=hx,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],gx.prototype,"appearance",void 0),e([ne({attribute:"error-text"})],gx.prototype,"errorText",void 0),e([ne({attribute:"error-visible",mode:"boolean"})],gx.prototype,"errorVisible",void 0),e([f],gx.prototype,"scrollbarWidth",void 0)
|
|
6469
|
+
const vx=gx.compose({baseName:"text-area",baseClass:Xo,template:()=>G`
|
|
6437
6470
|
<label
|
|
6438
6471
|
part="label"
|
|
6439
6472
|
for="control"
|
|
@@ -6490,9 +6523,9 @@ const px=ux.compose({baseName:"text-area",baseClass:Xo,template:()=>G`
|
|
|
6490
6523
|
></${bp}>
|
|
6491
6524
|
${Up}
|
|
6492
6525
|
</div>
|
|
6493
|
-
`,styles:
|
|
6494
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
6495
|
-
const
|
|
6526
|
+
`,styles:px,shadowOptions:{delegatesFocus:!0}})
|
|
6527
|
+
no.getOrCreate().withPrefix("nimble").register(vx()),no.tagFor(gx)
|
|
6528
|
+
const fx="underline",mx="outline",bx="block",wx="frameless",xx=fe`
|
|
6496
6529
|
${bn("inline-block")}
|
|
6497
6530
|
${Jp}
|
|
6498
6531
|
|
|
@@ -6664,12 +6697,12 @@ const gx="underline",vx="outline",fx="block",mx="frameless",bx=fe`
|
|
|
6664
6697
|
slot[name='actions']::slotted(*) {
|
|
6665
6698
|
${ea.cssCustomProperty}: 24px;
|
|
6666
6699
|
}
|
|
6667
|
-
`.withBehaviors(zc(
|
|
6700
|
+
`.withBehaviors(zc(fx,fe`
|
|
6668
6701
|
.root {
|
|
6669
6702
|
border-bottom-width: ${na};
|
|
6670
6703
|
padding-bottom: 0;
|
|
6671
6704
|
}
|
|
6672
|
-
`),zc(
|
|
6705
|
+
`),zc(bx,fe`
|
|
6673
6706
|
.root {
|
|
6674
6707
|
background-color: rgba(${jr}, 0.1);
|
|
6675
6708
|
}
|
|
@@ -6697,12 +6730,12 @@ const gx="underline",vx="outline",fx="block",mx="frameless",bx=fe`
|
|
|
6697
6730
|
:host([disabled]) .root {
|
|
6698
6731
|
background-color: rgba(${jr}, 0.07);
|
|
6699
6732
|
}
|
|
6700
|
-
`),zc(
|
|
6733
|
+
`),zc(mx,fe`
|
|
6701
6734
|
.root {
|
|
6702
6735
|
border-width: ${na};
|
|
6703
6736
|
padding: 0;
|
|
6704
6737
|
}
|
|
6705
|
-
`),zc(
|
|
6738
|
+
`),zc(wx,fe`
|
|
6706
6739
|
.control {
|
|
6707
6740
|
padding-left: ${na};
|
|
6708
6741
|
padding-right: ${na};
|
|
@@ -6720,8 +6753,8 @@ const gx="underline",vx="outline",fx="block",mx="frameless",bx=fe`
|
|
|
6720
6753
|
filter: invert(100%);
|
|
6721
6754
|
}
|
|
6722
6755
|
`))
|
|
6723
|
-
class
|
|
6724
|
-
const
|
|
6756
|
+
class yx extends So{constructor(){super(...arguments),this.appearance=fx,this.errorVisible=!1,this.fullBleed=!1}}e([ne],yx.prototype,"appearance",void 0),e([ne({attribute:"error-text"})],yx.prototype,"errorText",void 0),e([ne({attribute:"error-visible",mode:"boolean"})],yx.prototype,"errorVisible",void 0),e([ne({attribute:"full-bleed",mode:"boolean"})],yx.prototype,"fullBleed",void 0)
|
|
6757
|
+
const $x=yx.compose({baseName:"text-field",baseClass:So,template:(e,t)=>G`
|
|
6725
6758
|
<template
|
|
6726
6759
|
class="
|
|
6727
6760
|
${e=>e.readOnly?"readonly":""}
|
|
@@ -6781,7 +6814,7 @@ const xx=wx.compose({baseName:"text-field",baseClass:So,template:(e,t)=>G`
|
|
|
6781
6814
|
${Be(0,t)}
|
|
6782
6815
|
</div>
|
|
6783
6816
|
</template>
|
|
6784
|
-
`,styles:
|
|
6817
|
+
`,styles:xx,shadowOptions:{delegatesFocus:!0},end:G`
|
|
6785
6818
|
<${bp}
|
|
6786
6819
|
severity="error"
|
|
6787
6820
|
class="error-icon"
|
|
@@ -6791,8 +6824,8 @@ const xx=wx.compose({baseName:"text-field",baseClass:So,template:(e,t)=>G`
|
|
|
6791
6824
|
</span>
|
|
6792
6825
|
${Up}
|
|
6793
6826
|
`})
|
|
6794
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
6795
|
-
const
|
|
6827
|
+
no.getOrCreate().withPrefix("nimble").register($x()),no.tagFor(yx)
|
|
6828
|
+
const Cx=fe`
|
|
6796
6829
|
.positioning-region {
|
|
6797
6830
|
display: flex;
|
|
6798
6831
|
padding: ${ia} ${oa};
|
|
@@ -6817,7 +6850,7 @@ const yx=fe`
|
|
|
6817
6850
|
margin-left: auto;
|
|
6818
6851
|
}
|
|
6819
6852
|
`
|
|
6820
|
-
class
|
|
6853
|
+
class kx extends Yo{}const Sx=kx.compose({baseName:"toolbar",baseClass:Yo,template:(e,t)=>G`
|
|
6821
6854
|
<template
|
|
6822
6855
|
aria-label="${e=>e.ariaLabel}"
|
|
6823
6856
|
aria-labelledby="${e=>e.ariaLabelledby}"
|
|
@@ -6838,9 +6871,9 @@ class $x extends Yo{}const Cx=$x.compose({baseName:"toolbar",baseClass:Yo,templa
|
|
|
6838
6871
|
${Be(0,t)}
|
|
6839
6872
|
</div>
|
|
6840
6873
|
</template>
|
|
6841
|
-
`,styles:
|
|
6842
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
6843
|
-
const
|
|
6874
|
+
`,styles:Cx,shadowOptions:{delegatesFocus:!0}})
|
|
6875
|
+
no.getOrCreate().withPrefix("nimble").register(Sx()),no.tagFor(kx)
|
|
6876
|
+
const _x=fe`
|
|
6844
6877
|
${bn("inline-flex")}
|
|
6845
6878
|
|
|
6846
6879
|
:host {
|
|
@@ -6925,7 +6958,7 @@ const kx=fe`
|
|
|
6925
6958
|
.status-icon {
|
|
6926
6959
|
opacity: 0.6;
|
|
6927
6960
|
}
|
|
6928
|
-
`)),
|
|
6961
|
+
`)),Ix=G`
|
|
6929
6962
|
${Ie((e=>e.tooltipVisible),G`
|
|
6930
6963
|
<${cd}
|
|
6931
6964
|
class="anchored-region"
|
|
@@ -6958,11 +6991,11 @@ const kx=fe`
|
|
|
6958
6991
|
</${cd}>
|
|
6959
6992
|
`)}
|
|
6960
6993
|
`
|
|
6961
|
-
class
|
|
6962
|
-
const
|
|
6963
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
6964
|
-
const
|
|
6965
|
-
class
|
|
6994
|
+
class Rx extends gn{constructor(){super(...arguments),this.iconVisible=!1}}e([ne],Rx.prototype,"severity",void 0),e([ne({attribute:"icon-visible",mode:"boolean"})],Rx.prototype,"iconVisible",void 0)
|
|
6995
|
+
const Mx=Rx.compose({baseName:"tooltip",baseClass:gn,template:Ix,styles:_x})
|
|
6996
|
+
no.getOrCreate().withPrefix("nimble").register(Mx()),no.tagFor(Rx)
|
|
6997
|
+
const Ax="group-selected",Ox="all",Ex="leaves-only",Vx="none"
|
|
6998
|
+
class Fx{constructor(e,t,i){this.ltr=e,this.rtl=t,this.source=i,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 Hx=fe`
|
|
6966
6999
|
${bn("block")}
|
|
6967
7000
|
|
|
6968
7001
|
:host {
|
|
@@ -6978,7 +7011,7 @@ class Ex{constructor(e,t,i){this.ltr=e,this.rtl=t,this.source=i,this.attached=nu
|
|
|
6978
7011
|
}
|
|
6979
7012
|
|
|
6980
7013
|
${""}
|
|
6981
|
-
:host([${
|
|
7014
|
+
:host([${Ax}])::after {
|
|
6982
7015
|
background: ${Kr};
|
|
6983
7016
|
border-radius: 0px;
|
|
6984
7017
|
content: '';
|
|
@@ -7000,7 +7033,7 @@ class Ex{constructor(e,t,i){this.ltr=e,this.rtl=t,this.source=i,this.attached=nu
|
|
|
7000
7033
|
background: ${Zr};
|
|
7001
7034
|
}
|
|
7002
7035
|
|
|
7003
|
-
:host([${
|
|
7036
|
+
:host([${Ax}]) .positioning-region:hover {
|
|
7004
7037
|
background: ${Nr};
|
|
7005
7038
|
}
|
|
7006
7039
|
|
|
@@ -7111,7 +7144,7 @@ class Ex{constructor(e,t,i){this.ltr=e,this.rtl=t,this.source=i,this.attached=nu
|
|
|
7111
7144
|
display: block;
|
|
7112
7145
|
}
|
|
7113
7146
|
`.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)
|
|
7114
|
-
t&&Fr.unsubscribe(t)}attach(e){const t=this.cache.get(e)||new
|
|
7147
|
+
t&&Fr.unsubscribe(t)}attach(e){const t=this.cache.get(e)||new Fx(this.ltr,this.rtl,e),i=Fr.getValueFor(e)
|
|
7115
7148
|
Fr.subscribe(t),t.attach(i),this.cache.set(e,t)}}(fe`
|
|
7116
7149
|
.expand-collapse-button {
|
|
7117
7150
|
left: var(
|
|
@@ -7143,8 +7176,8 @@ Fr.subscribe(t),t.attach(i),this.cache.set(e,t)}}(fe`
|
|
|
7143
7176
|
transform: rotate(135deg);
|
|
7144
7177
|
}
|
|
7145
7178
|
`))
|
|
7146
|
-
class
|
|
7147
|
-
const
|
|
7179
|
+
class Px extends fn{constructor(){super(...arguments),this.groupSelected=!1}}e([ne({attribute:"group-selected",mode:"boolean"})],Px.prototype,"groupSelected",void 0)
|
|
7180
|
+
const Tx=Px.compose({baseName:"tree-item",baseClass:fn,template:(e,t)=>G`
|
|
7148
7181
|
<template
|
|
7149
7182
|
role="treeitem"
|
|
7150
7183
|
slot="${e=>e.isNestedItem()?"item":void 0}"
|
|
@@ -7184,9 +7217,9 @@ const Hx=Fx.compose({baseName:"tree-item",baseClass:fn,template:(e,t)=>G`
|
|
|
7184
7217
|
</div>
|
|
7185
7218
|
`)}
|
|
7186
7219
|
</template>
|
|
7187
|
-
`,styles:
|
|
7188
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
7189
|
-
const
|
|
7220
|
+
`,styles:Hx,expandCollapseGlyph:kd.data})
|
|
7221
|
+
no.getOrCreate().withPrefix("nimble").register(Tx()),no.tagFor(Px)
|
|
7222
|
+
const Lx=fe`
|
|
7190
7223
|
${bn("flex")}
|
|
7191
7224
|
|
|
7192
7225
|
:host {
|
|
@@ -7198,7 +7231,7 @@ const Px=fe`
|
|
|
7198
7231
|
:host(${yn}) {
|
|
7199
7232
|
outline: none;
|
|
7200
7233
|
}
|
|
7201
|
-
`,
|
|
7234
|
+
`,Dx=G`
|
|
7202
7235
|
<template
|
|
7203
7236
|
role="tree"
|
|
7204
7237
|
${_e("treeView")}
|
|
@@ -7212,273 +7245,273 @@ const Px=fe`
|
|
|
7212
7245
|
<slot ${Te("slottedTreeItems")}></slot>
|
|
7213
7246
|
</template>
|
|
7214
7247
|
`
|
|
7215
|
-
class
|
|
7248
|
+
class zx extends mn{constructor(){super(...arguments),this.selectionMode=Ox,this.selectedItems=[]}handleClick(e){if(e.defaultPrevented)return!1
|
|
7216
7249
|
if(!(e.target instanceof Element&&vn(e.target)))return!0
|
|
7217
7250
|
const t=e.target
|
|
7218
|
-
return!t.disabled&&(this.canSelect(t)?t.selected=!0:this.itemHasChildren(t)&&(t.expanded=!t.expanded),!0)}canSelect(e){switch(this.selectionMode){case
|
|
7219
|
-
case
|
|
7220
|
-
case
|
|
7221
|
-
default:return!0}}itemHasChildren(e){return null!==e.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const e of Array.from(this.children))e instanceof
|
|
7251
|
+
return!t.disabled&&(this.canSelect(t)?t.selected=!0:this.itemHasChildren(t)&&(t.expanded=!t.expanded),!0)}canSelect(e){switch(this.selectionMode){case Ox:return!0
|
|
7252
|
+
case Vx:return!1
|
|
7253
|
+
case Ex:return!this.itemHasChildren(e)
|
|
7254
|
+
default:return!0}}itemHasChildren(e){return null!==e.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const e of Array.from(this.children))e instanceof Px&&(e.groupSelected=!1)
|
|
7222
7255
|
for(let e of this.selectedItems){for(;null!==e.parentElement&&e.parentElement!==this;)e=e.parentElement
|
|
7223
|
-
e instanceof
|
|
7224
|
-
const
|
|
7225
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
7226
|
-
var
|
|
7227
|
-
function
|
|
7228
|
-
o[e]=[]}return new
|
|
7256
|
+
e instanceof Px&&(e.groupSelected=!0)}}}e([ne({attribute:"selection-mode"})],zx.prototype,"selectionMode",void 0),e([f],zx.prototype,"selectedItems",void 0)
|
|
7257
|
+
const Bx=zx.compose({baseName:"tree-view",baseClass:mn,template:Dx,styles:Lx})
|
|
7258
|
+
no.getOrCreate().withPrefix("nimble").register(Bx()),no.tagFor(zx)
|
|
7259
|
+
var Nx={value:()=>{}}
|
|
7260
|
+
function Zx(){for(var e,t=0,i=arguments.length,o={};t<i;++t){if(!(e=arguments[t]+"")||e in o||/[\s.]/.test(e))throw new Error("illegal type: "+e)
|
|
7261
|
+
o[e]=[]}return new qx(o)}function qx(e){this._=e}function jx(e,t){return e.trim().split(/^|\s+/).map((function(e){var i="",o=e.indexOf(".")
|
|
7229
7262
|
if(o>=0&&(i=e.slice(o+1),e=e.slice(0,o)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e)
|
|
7230
|
-
return{type:e,name:i}}))}function
|
|
7231
|
-
break}return null!=i&&e.push({name:t,value:i}),e}
|
|
7263
|
+
return{type:e,name:i}}))}function Ux(e,t){for(var i,o=0,n=e.length;o<n;++o)if((i=e[o]).name===t)return i.value}function Gx(e,t,i){for(var o=0,n=e.length;o<n;++o)if(e[o].name===t){e[o]=Nx,e=e.slice(0,o).concat(e.slice(o+1))
|
|
7264
|
+
break}return null!=i&&e.push({name:t,value:i}),e}qx.prototype=Zx.prototype={constructor:qx,on:function(e,t){var i,o=this._,n=jx(e+"",o),s=-1,r=n.length
|
|
7232
7265
|
if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t)
|
|
7233
|
-
for(;++s<r;)if(i=(e=n[s]).type)o[i]=
|
|
7234
|
-
else if(null==t)for(i in o)o[i]=
|
|
7235
|
-
return this}for(;++s<r;)if((i=(e=n[s]).type)&&(i=
|
|
7266
|
+
for(;++s<r;)if(i=(e=n[s]).type)o[i]=Gx(o[i],e.name,t)
|
|
7267
|
+
else if(null==t)for(i in o)o[i]=Gx(o[i],e.name,null)
|
|
7268
|
+
return this}for(;++s<r;)if((i=(e=n[s]).type)&&(i=Ux(o[i],e.name)))return i},copy:function(){var e={},t=this._
|
|
7236
7269
|
for(var i in t)e[i]=t[i].slice()
|
|
7237
|
-
return new
|
|
7270
|
+
return new qx(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var i,o,n=new Array(i),s=0;s<i;++s)n[s]=arguments[s+2]
|
|
7238
7271
|
if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e)
|
|
7239
7272
|
for(s=0,i=(o=this._[e]).length;s<i;++s)o[s].value.apply(t,n)},apply:function(e,t,i){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e)
|
|
7240
7273
|
for(var o=this._[e],n=0,s=o.length;n<s;++n)o[n].value.apply(t,i)}}
|
|
7241
|
-
var
|
|
7242
|
-
function
|
|
7243
|
-
return i>=0&&"xmlns"!==(t=e.slice(0,i))&&(e=e.slice(i+1)),
|
|
7244
|
-
return i===
|
|
7245
|
-
return(t.local?
|
|
7246
|
-
function
|
|
7247
|
-
function
|
|
7248
|
-
for(;a<l;++a)(r=t[a])&&(n[a]=r)}function
|
|
7274
|
+
var Wx="http://www.w3.org/1999/xhtml",Xx={svg:"http://www.w3.org/2000/svg",xhtml:Wx,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}
|
|
7275
|
+
function Kx(e){var t=e+="",i=t.indexOf(":")
|
|
7276
|
+
return i>=0&&"xmlns"!==(t=e.slice(0,i))&&(e=e.slice(i+1)),Xx.hasOwnProperty(t)?{space:Xx[t],local:e}:e}function Yx(e){return function(){var t=this.ownerDocument,i=this.namespaceURI
|
|
7277
|
+
return i===Wx&&t.documentElement.namespaceURI===Wx?t.createElement(e):t.createElementNS(i,e)}}function Qx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Jx(e){var t=Kx(e)
|
|
7278
|
+
return(t.local?Qx:Yx)(t)}function ey(){}function ty(e){return null==e?ey:function(){return this.querySelector(e)}}function iy(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}function oy(){return[]}function ny(e){return null==e?oy:function(){return this.querySelectorAll(e)}}function sy(e){return function(){return this.matches(e)}}function ry(e){return function(t){return t.matches(e)}}var ay=Array.prototype.find
|
|
7279
|
+
function ly(){return this.firstElementChild}var cy=Array.prototype.filter
|
|
7280
|
+
function dy(){return Array.from(this.children)}function hy(e){return new Array(e.length)}function uy(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function py(e){return function(){return e}}function gy(e,t,i,o,n,s){for(var r,a=0,l=t.length,c=s.length;a<c;++a)(r=t[a])?(r.__data__=s[a],o[a]=r):i[a]=new uy(e,s[a])
|
|
7281
|
+
for(;a<l;++a)(r=t[a])&&(n[a]=r)}function vy(e,t,i,o,n,s,r){var a,l,c,d=new Map,h=t.length,u=s.length,p=new Array(h)
|
|
7249
7282
|
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))
|
|
7250
|
-
for(a=0;a<u;++a)c=r.call(e,s[a],a,s)+"",(l=d.get(c))?(o[a]=l,l.__data__=s[a],d.delete(c)):i[a]=new
|
|
7251
|
-
for(a=0;a<h;++a)(l=t[a])&&d.get(p[a])===l&&(n[a]=l)}function
|
|
7252
|
-
null==i?this.removeAttribute(e):this.setAttribute(e,i)}}function
|
|
7253
|
-
null==i?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,i)}}function
|
|
7254
|
-
null==o?this.style.removeProperty(e):this.style.setProperty(e,o,i)}}function
|
|
7255
|
-
null==i?delete this[e]:this[e]=i}}function
|
|
7256
|
-
this.textContent=null==t?"":t}}function
|
|
7257
|
-
this.innerHTML=null==t?"":t}}function
|
|
7258
|
-
e&&e.removeChild(this)}function
|
|
7259
|
-
return t?t.insertBefore(e,this.nextSibling):e}function
|
|
7260
|
-
return t?t.insertBefore(e,this.nextSibling):e}function
|
|
7261
|
-
return i>=0&&(t=e.slice(i+1),e=e.slice(0,i)),{type:e,name:t}}))}function
|
|
7262
|
-
if(t){for(var i,o=0,n=-1,s=t.length;o<s;++o)i=t[o],e.type&&i.type!==e.type||i.name!==e.name?t[++n]=i:this.removeEventListener(i.type,i.listener,i.options);++n?t.length=n:delete this.__on}}}function
|
|
7283
|
+
for(a=0;a<u;++a)c=r.call(e,s[a],a,s)+"",(l=d.get(c))?(o[a]=l,l.__data__=s[a],d.delete(c)):i[a]=new uy(e,s[a])
|
|
7284
|
+
for(a=0;a<h;++a)(l=t[a])&&d.get(p[a])===l&&(n[a]=l)}function fy(e){return e.__data__}function my(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function by(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function wy(e){return function(){this.removeAttribute(e)}}function xy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function yy(e,t){return function(){this.setAttribute(e,t)}}function $y(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Cy(e,t){return function(){var i=t.apply(this,arguments)
|
|
7285
|
+
null==i?this.removeAttribute(e):this.setAttribute(e,i)}}function ky(e,t){return function(){var i=t.apply(this,arguments)
|
|
7286
|
+
null==i?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,i)}}function Sy(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function _y(e){return function(){this.style.removeProperty(e)}}function Iy(e,t,i){return function(){this.style.setProperty(e,t,i)}}function Ry(e,t,i){return function(){var o=t.apply(this,arguments)
|
|
7287
|
+
null==o?this.style.removeProperty(e):this.style.setProperty(e,o,i)}}function My(e,t){return e.style.getPropertyValue(t)||Sy(e).getComputedStyle(e,null).getPropertyValue(t)}function Ay(e){return function(){delete this[e]}}function Oy(e,t){return function(){this[e]=t}}function Ey(e,t){return function(){var i=t.apply(this,arguments)
|
|
7288
|
+
null==i?delete this[e]:this[e]=i}}function Vy(e){return e.trim().split(/^|\s+/)}function Fy(e){return e.classList||new Hy(e)}function Hy(e){this._node=e,this._names=Vy(e.getAttribute("class")||"")}function Py(e,t){for(var i=Fy(e),o=-1,n=t.length;++o<n;)i.add(t[o])}function Ty(e,t){for(var i=Fy(e),o=-1,n=t.length;++o<n;)i.remove(t[o])}function Ly(e){return function(){Py(this,e)}}function Dy(e){return function(){Ty(this,e)}}function zy(e,t){return function(){(t.apply(this,arguments)?Py:Ty)(this,e)}}function By(){this.textContent=""}function Ny(e){return function(){this.textContent=e}}function Zy(e){return function(){var t=e.apply(this,arguments)
|
|
7289
|
+
this.textContent=null==t?"":t}}function qy(){this.innerHTML=""}function jy(e){return function(){this.innerHTML=e}}function Uy(e){return function(){var t=e.apply(this,arguments)
|
|
7290
|
+
this.innerHTML=null==t?"":t}}function Gy(){this.nextSibling&&this.parentNode.appendChild(this)}function Wy(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Xy(){return null}function Ky(){var e=this.parentNode
|
|
7291
|
+
e&&e.removeChild(this)}function Yy(){var e=this.cloneNode(!1),t=this.parentNode
|
|
7292
|
+
return t?t.insertBefore(e,this.nextSibling):e}function Qy(){var e=this.cloneNode(!0),t=this.parentNode
|
|
7293
|
+
return t?t.insertBefore(e,this.nextSibling):e}function Jy(e){return e.trim().split(/^|\s+/).map((function(e){var t="",i=e.indexOf(".")
|
|
7294
|
+
return i>=0&&(t=e.slice(i+1),e=e.slice(0,i)),{type:e,name:t}}))}function e$(e){return function(){var t=this.__on
|
|
7295
|
+
if(t){for(var i,o=0,n=-1,s=t.length;o<s;++o)i=t[o],e.type&&i.type!==e.type||i.name!==e.name?t[++n]=i:this.removeEventListener(i.type,i.listener,i.options);++n?t.length=n:delete this.__on}}}function t$(e,t,i){return function(){var o,n=this.__on,s=function(e){return function(t){e.call(this,t,this.__data__)}}(t)
|
|
7263
7296
|
if(n)for(var r=0,a=n.length;r<a;++r)if((o=n[r]).type===e.type&&o.name===e.name)return this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=s,o.options=i),void(o.value=t)
|
|
7264
|
-
this.addEventListener(e.type,s,i),o={type:e.type,name:e.name,value:t,listener:s,options:i},n?n.push(o):this.__on=[o]}}function
|
|
7265
|
-
"function"==typeof n?n=new n(t,i):(n=o.document.createEvent("Event"),i?(n.initEvent(t,i.bubbles,i.cancelable),n.detail=i.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function
|
|
7297
|
+
this.addEventListener(e.type,s,i),o={type:e.type,name:e.name,value:t,listener:s,options:i},n?n.push(o):this.__on=[o]}}function i$(e,t,i){var o=Sy(e),n=o.CustomEvent
|
|
7298
|
+
"function"==typeof n?n=new n(t,i):(n=o.document.createEvent("Event"),i?(n.initEvent(t,i.bubbles,i.cancelable),n.detail=i.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function o$(e,t){return function(){return i$(this,e,t)}}function n$(e,t){return function(){return i$(this,e,t.apply(this,arguments))}}uy.prototype={constructor:uy,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)}},Hy.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)
|
|
7266
7299
|
t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}
|
|
7267
|
-
var
|
|
7268
|
-
function
|
|
7300
|
+
var s$=[null]
|
|
7301
|
+
function r$(e,t){this._groups=e,this._parents=t}function a$(){return new r$([[document.documentElement]],s$)}function l$(e){return"string"==typeof e?new r$([[document.querySelector(e)]],[document.documentElement]):new r$([[e]],s$)}function c$(e,t){if(e=function(e){let t
|
|
7269
7302
|
for(;t=e.sourceEvent;)e=t
|
|
7270
7303
|
return e}(e),void 0===t&&(t=e.currentTarget),t){var i=t.ownerSVGElement||t
|
|
7271
7304
|
if(i.createSVGPoint){var o=i.createSVGPoint()
|
|
7272
7305
|
return o.x=e.clientX,o.y=e.clientY,[(o=o.matrixTransform(t.getScreenCTM().inverse())).x,o.y]}if(t.getBoundingClientRect){var n=t.getBoundingClientRect()
|
|
7273
|
-
return[e.clientX-n.left-t.clientLeft,e.clientY-n.top-t.clientTop]}}return[e.pageX,e.pageY]}
|
|
7306
|
+
return[e.clientX-n.left-t.clientLeft,e.clientY-n.top-t.clientTop]}}return[e.pageX,e.pageY]}r$.prototype=a$.prototype={constructor:r$,select:function(e){"function"!=typeof e&&(e=ty(e))
|
|
7274
7307
|
for(var t=this._groups,i=t.length,o=new Array(i),n=0;n<i;++n)for(var s,r,a=t[n],l=a.length,c=o[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)
|
|
7275
|
-
return new
|
|
7308
|
+
return new r$(o,this._parents)},selectAll:function(e){e="function"==typeof e?function(e){return function(){return iy(e.apply(this,arguments))}}(e):ny(e)
|
|
7276
7309
|
for(var t=this._groups,i=t.length,o=[],n=[],s=0;s<i;++s)for(var r,a=t[s],l=a.length,c=0;c<l;++c)(r=a[c])&&(o.push(e.call(r,r.__data__,c,a)),n.push(r))
|
|
7277
|
-
return new
|
|
7310
|
+
return new r$(o,n)},selectChild:function(e){return this.select(null==e?ly:function(e){return function(){return ay.call(this.children,e)}}("function"==typeof e?e:ry(e)))},selectChildren:function(e){return this.selectAll(null==e?dy:function(e){return function(){return cy.call(this.children,e)}}("function"==typeof e?e:ry(e)))},filter:function(e){"function"!=typeof e&&(e=sy(e))
|
|
7278
7311
|
for(var t=this._groups,i=t.length,o=new Array(i),n=0;n<i;++n)for(var s,r=t[n],a=r.length,l=o[n]=[],c=0;c<a;++c)(s=r[c])&&e.call(s,s.__data__,c,r)&&l.push(s)
|
|
7279
|
-
return new
|
|
7280
|
-
var i=t?
|
|
7281
|
-
"function"!=typeof e&&(e=
|
|
7282
|
-
for(var s=n.length,r=new Array(s),a=new Array(s),l=new Array(s),c=0;c<s;++c){var d=o[c],h=n[c],u=h.length,p=
|
|
7312
|
+
return new r$(o,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,fy)
|
|
7313
|
+
var i=t?vy:gy,o=this._parents,n=this._groups
|
|
7314
|
+
"function"!=typeof e&&(e=py(e))
|
|
7315
|
+
for(var s=n.length,r=new Array(s),a=new Array(s),l=new Array(s),c=0;c<s;++c){var d=o[c],h=n[c],u=h.length,p=my(e.call(d,d&&d.__data__,c,o)),g=p.length,v=a[c]=new Array(g),f=r[c]=new Array(g),m=l[c]=new Array(u)
|
|
7283
7316
|
i(d,h,v,f,m,p,t)
|
|
7284
|
-
for(var b,w,x=0,y=0;x<g;++x)if(b=v[x]){for(x>=y&&(y=x+1);!(w=f[y])&&++y<g;);b._next=w||null}}return(r=new
|
|
7317
|
+
for(var b,w,x=0,y=0;x<g;++x)if(b=v[x]){for(x>=y&&(y=x+1);!(w=f[y])&&++y<g;);b._next=w||null}}return(r=new r$(r,o))._enter=a,r._exit=l,r},enter:function(){return new r$(this._enter||this._groups.map(hy),this._parents)},exit:function(){return new r$(this._exit||this._groups.map(hy),this._parents)},join:function(e,t,i){var o=this.enter(),n=this,s=this.exit()
|
|
7285
7318
|
return"function"==typeof e?(o=e(o))&&(o=o.selection()):o=o.append(e+""),null!=t&&(n=t(n))&&(n=n.selection()),null==i?s.remove():i(s),o&&n?o.merge(n).order():n},merge:function(e){for(var t=e.selection?e.selection():e,i=this._groups,o=t._groups,n=i.length,s=o.length,r=Math.min(n,s),a=new Array(n),l=0;l<r;++l)for(var c,d=i[l],h=o[l],u=d.length,p=a[l]=new Array(u),g=0;g<u;++g)(c=d[g]||h[g])&&(p[g]=c)
|
|
7286
7319
|
for(;l<n;++l)a[l]=i[l]
|
|
7287
|
-
return new
|
|
7288
|
-
return this},sort:function(e){function t(t,i){return t&&i?e(t.__data__,i.__data__):!t-!i}e||(e=
|
|
7320
|
+
return new r$(a,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,i=e.length;++t<i;)for(var o,n=e[t],s=n.length-1,r=n[s];--s>=0;)(o=n[s])&&(r&&4^o.compareDocumentPosition(r)&&r.parentNode.insertBefore(o,r),r=o)
|
|
7321
|
+
return this},sort:function(e){function t(t,i){return t&&i?e(t.__data__,i.__data__):!t-!i}e||(e=by)
|
|
7289
7322
|
for(var i=this._groups,o=i.length,n=new Array(o),s=0;s<o;++s){for(var r,a=i[s],l=a.length,c=n[s]=new Array(l),d=0;d<l;++d)(r=a[d])&&(c[d]=r)
|
|
7290
|
-
c.sort(t)}return new
|
|
7323
|
+
c.sort(t)}return new r$(n,this._parents).order()},call:function(){var e=arguments[0]
|
|
7291
7324
|
return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var o=e[t],n=0,s=o.length;n<s;++n){var r=o[n]
|
|
7292
7325
|
if(r)return r}return null},size:function(){let e=0
|
|
7293
7326
|
for(const t of this)++e
|
|
7294
7327
|
return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,i=0,o=t.length;i<o;++i)for(var n,s=t[i],r=0,a=s.length;r<a;++r)(n=s[r])&&e.call(n,n.__data__,r,s)
|
|
7295
|
-
return this},attr:function(e,t){var i=
|
|
7328
|
+
return this},attr:function(e,t){var i=Kx(e)
|
|
7296
7329
|
if(arguments.length<2){var o=this.node()
|
|
7297
|
-
return i.local?o.getAttributeNS(i.space,i.local):o.getAttribute(i)}return this.each((null==t?i.local?
|
|
7298
|
-
if(arguments.length<2){for(var o=
|
|
7299
|
-
return!0}return this.each(("function"==typeof t?
|
|
7300
|
-
return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var i="function"==typeof e?e:
|
|
7301
|
-
return this.select((function(){return this.insertBefore(i.apply(this,arguments),o.apply(this,arguments)||null)}))},remove:function(){return this.each(
|
|
7302
|
-
if(!(arguments.length<2)){for(a=t?
|
|
7330
|
+
return i.local?o.getAttributeNS(i.space,i.local):o.getAttribute(i)}return this.each((null==t?i.local?xy:wy:"function"==typeof t?i.local?ky:Cy:i.local?$y:yy)(i,t))},style:function(e,t,i){return arguments.length>1?this.each((null==t?_y:"function"==typeof t?Ry:Iy)(e,t,null==i?"":i)):My(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?Ay:"function"==typeof t?Ey:Oy)(e,t)):this.node()[e]},classed:function(e,t){var i=Vy(e+"")
|
|
7331
|
+
if(arguments.length<2){for(var o=Fy(this.node()),n=-1,s=i.length;++n<s;)if(!o.contains(i[n]))return!1
|
|
7332
|
+
return!0}return this.each(("function"==typeof t?zy:t?Ly:Dy)(i,t))},text:function(e){return arguments.length?this.each(null==e?By:("function"==typeof e?Zy:Ny)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?qy:("function"==typeof e?Uy:jy)(e)):this.node().innerHTML},raise:function(){return this.each(Gy)},lower:function(){return this.each(Wy)},append:function(e){var t="function"==typeof e?e:Jx(e)
|
|
7333
|
+
return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var i="function"==typeof e?e:Jx(e),o=null==t?Xy:"function"==typeof t?t:ty(t)
|
|
7334
|
+
return this.select((function(){return this.insertBefore(i.apply(this,arguments),o.apply(this,arguments)||null)}))},remove:function(){return this.each(Ky)},clone:function(e){return this.select(e?Qy:Yy)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,i){var o,n,s=Jy(e+""),r=s.length
|
|
7335
|
+
if(!(arguments.length<2)){for(a=t?t$:e$,o=0;o<r;++o)this.each(a(s[o],t,i))
|
|
7303
7336
|
return this}var a=this.node().__on
|
|
7304
|
-
if(a)for(var l,c=0,d=a.length;c<d;++c)for(o=0,l=a[c];o<r;++o)if((n=s[o]).type===l.type&&n.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?
|
|
7305
|
-
const
|
|
7306
|
-
function
|
|
7307
|
-
"onselectstart"in t?i.on("selectstart.drag",
|
|
7308
|
-
t&&(o.on("click.drag",
|
|
7337
|
+
if(a)for(var l,c=0,d=a.length;c<d;++c)for(o=0,l=a[c];o<r;++o)if((n=s[o]).type===l.type&&n.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?n$:o$)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var o,n=e[t],s=0,r=n.length;s<r;++s)(o=n[s])&&(yield o)}}
|
|
7338
|
+
const d$={capture:!0,passive:!1}
|
|
7339
|
+
function h$(e){e.preventDefault(),e.stopImmediatePropagation()}function u$(e){var t=e.document.documentElement,i=l$(e).on("dragstart.drag",h$,d$)
|
|
7340
|
+
"onselectstart"in t?i.on("selectstart.drag",h$,d$):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function p$(e,t){var i=e.document.documentElement,o=l$(e).on("dragstart.drag",null)
|
|
7341
|
+
t&&(o.on("click.drag",h$,d$),setTimeout((function(){o.on("click.drag",null)}),0)),"onselectstart"in i?o.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}function g$(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function v$(e,t){var i=Object.create(e.prototype)
|
|
7309
7342
|
for(var o in t)i[o]=t[o]
|
|
7310
|
-
return i}function
|
|
7311
|
-
function
|
|
7312
|
-
return e=(e+"").trim().toLowerCase(),(t
|
|
7313
|
-
return`${1===e?"rgb(":"rgba("}${
|
|
7314
|
-
if(e instanceof
|
|
7315
|
-
if(e instanceof
|
|
7343
|
+
return i}function f$(){}var m$=.7,b$=1/m$,w$="\\s*([+-]?\\d+)\\s*",x$="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",y$="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$$=/^#([0-9a-f]{3,8})$/,C$=new RegExp(`^rgb\\(${w$},${w$},${w$}\\)$`),k$=new RegExp(`^rgb\\(${y$},${y$},${y$}\\)$`),S$=new RegExp(`^rgba\\(${w$},${w$},${w$},${x$}\\)$`),_$=new RegExp(`^rgba\\(${y$},${y$},${y$},${x$}\\)$`),I$=new RegExp(`^hsl\\(${x$},${y$},${y$}\\)$`),R$=new RegExp(`^hsla\\(${x$},${y$},${y$},${x$}\\)$`),M$={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}
|
|
7344
|
+
function A$(){return this.rgb().formatHex()}function O$(){return this.rgb().formatRgb()}function E$(e){var t,i
|
|
7345
|
+
return e=(e+"").trim().toLowerCase(),(t=$$.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?V$(t):3===i?new T$(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?F$(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?F$(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=C$.exec(e))?new T$(t[1],t[2],t[3],1):(t=k$.exec(e))?new T$(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=S$.exec(e))?F$(t[1],t[2],t[3],t[4]):(t=_$.exec(e))?F$(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=I$.exec(e))?Z$(t[1],t[2]/100,t[3]/100,1):(t=R$.exec(e))?Z$(t[1],t[2]/100,t[3]/100,t[4]):M$.hasOwnProperty(e)?V$(M$[e]):"transparent"===e?new T$(NaN,NaN,NaN,0):null}function V$(e){return new T$(e>>16&255,e>>8&255,255&e,1)}function F$(e,t,i,o){return o<=0&&(e=t=i=NaN),new T$(e,t,i,o)}function H$(e){return e instanceof f$||(e=E$(e)),e?new T$((e=e.rgb()).r,e.g,e.b,e.opacity):new T$}function P$(e,t,i,o){return 1===arguments.length?H$(e):new T$(e,t,i,null==o?1:o)}function T$(e,t,i,o){this.r=+e,this.g=+t,this.b=+i,this.opacity=+o}function L$(){return`#${N$(this.r)}${N$(this.g)}${N$(this.b)}`}function D$(){const e=z$(this.opacity)
|
|
7346
|
+
return`${1===e?"rgb(":"rgba("}${B$(this.r)}, ${B$(this.g)}, ${B$(this.b)}${1===e?")":`, ${e})`}`}function z$(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function B$(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function N$(e){return((e=B$(e))<16?"0":"")+e.toString(16)}function Z$(e,t,i,o){return o<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new j$(e,t,i,o)}function q$(e){if(e instanceof j$)return new j$(e.h,e.s,e.l,e.opacity)
|
|
7347
|
+
if(e instanceof f$||(e=E$(e)),!e)return new j$
|
|
7348
|
+
if(e instanceof j$)return e
|
|
7316
7349
|
var t=(e=e.rgb()).r/255,i=e.g/255,o=e.b/255,n=Math.min(t,i,o),s=Math.max(t,i,o),r=NaN,a=s-n,l=(s+n)/2
|
|
7317
|
-
return a?(r=t===s?(i-o)/a+6*(i<o):i===s?(o-t)/a+2:(t-i)/a+4,a/=l<.5?s+n:2-s-n,r*=60):a=l>0&&l<1?0:r,new
|
|
7318
|
-
return new
|
|
7319
|
-
return`${1===e?"hsl(":"hsla("}${
|
|
7320
|
-
var
|
|
7321
|
-
function
|
|
7322
|
-
return i?function(e,t){return function(i){return e+i*t}}(e,i):
|
|
7323
|
-
function o(e,t){var o=i((e=
|
|
7350
|
+
return a?(r=t===s?(i-o)/a+6*(i<o):i===s?(o-t)/a+2:(t-i)/a+4,a/=l<.5?s+n:2-s-n,r*=60):a=l>0&&l<1?0:r,new j$(r,a,l,e.opacity)}function j$(e,t,i,o){this.h=+e,this.s=+t,this.l=+i,this.opacity=+o}function U$(e){return(e=(e||0)%360)<0?e+360:e}function G$(e){return Math.max(0,Math.min(1,e||0))}function W$(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}g$(f$,E$,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:A$,formatHex:A$,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return q$(this).formatHsl()},formatRgb:O$,toString:O$}),g$(T$,P$,v$(f$,{brighter(e){return e=null==e?b$:Math.pow(b$,e),new T$(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?m$:Math.pow(m$,e),new T$(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new T$(B$(this.r),B$(this.g),B$(this.b),z$(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:L$,formatHex:L$,formatHex8:function(){return`#${N$(this.r)}${N$(this.g)}${N$(this.b)}${N$(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:D$,toString:D$})),g$(j$,(function(e,t,i,o){return 1===arguments.length?q$(e):new j$(e,t,i,null==o?1:o)}),v$(f$,{brighter(e){return e=null==e?b$:Math.pow(b$,e),new j$(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?m$:Math.pow(m$,e),new j$(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,i=this.l,o=i+(i<.5?i:1-i)*t,n=2*i-o
|
|
7351
|
+
return new T$(W$(e>=240?e-240:e+120,n,o),W$(e,n,o),W$(e<120?e+240:e-120,n,o),this.opacity)},clamp(){return new j$(U$(this.h),G$(this.s),G$(this.l),z$(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=z$(this.opacity)
|
|
7352
|
+
return`${1===e?"hsl(":"hsla("}${U$(this.h)}, ${100*G$(this.s)}%, ${100*G$(this.l)}%${1===e?")":`, ${e})`}`}}))
|
|
7353
|
+
var X$=e=>()=>e
|
|
7354
|
+
function K$(e){return 1==(e=+e)?Y$:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(o){return Math.pow(e+o*t,i)}}(t,i,e):X$(isNaN(t)?i:t)}}function Y$(e,t){var i=t-e
|
|
7355
|
+
return i?function(e,t){return function(i){return e+i*t}}(e,i):X$(isNaN(e)?t:e)}var Q$=function e(t){var i=K$(t)
|
|
7356
|
+
function o(e,t){var o=i((e=P$(e)).r,(t=P$(t)).r),n=i(e.g,t.g),s=i(e.b,t.b),r=Y$(e.opacity,t.opacity)
|
|
7324
7357
|
return function(t){return e.r=o(t),e.g=n(t),e.b=s(t),e.opacity=r(t),e+""}}return o.gamma=e,o}(1)
|
|
7325
|
-
function
|
|
7358
|
+
function J$(e,t){t||(t=[])
|
|
7326
7359
|
var i,o=e?Math.min(t.length,e.length):0,n=t.slice()
|
|
7327
7360
|
return function(s){for(i=0;i<o;++i)n[i]=e[i]*(1-s)+t[i]*s
|
|
7328
|
-
return n}}function
|
|
7329
|
-
for(i=0;i<n;++i)s[i]=
|
|
7361
|
+
return n}}function eC(e,t){var i,o=t?t.length:0,n=e?Math.min(o,e.length):0,s=new Array(n),r=new Array(o)
|
|
7362
|
+
for(i=0;i<n;++i)s[i]=aC(e[i],t[i])
|
|
7330
7363
|
for(;i<o;++i)r[i]=t[i]
|
|
7331
7364
|
return function(e){for(i=0;i<n;++i)r[i]=s[i](e)
|
|
7332
|
-
return r}}function
|
|
7333
|
-
return e=+e,t=+t,function(o){return i.setTime(e*(1-o)+t*o),i}}function
|
|
7334
|
-
for(i in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)i in e?o[i]=
|
|
7365
|
+
return r}}function tC(e,t){var i=new Date
|
|
7366
|
+
return e=+e,t=+t,function(o){return i.setTime(e*(1-o)+t*o),i}}function iC(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function oC(e,t){var i,o={},n={}
|
|
7367
|
+
for(i in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)i in e?o[i]=aC(e[i],t[i]):n[i]=t[i]
|
|
7335
7368
|
return function(e){for(i in o)n[i]=o[i](e)
|
|
7336
|
-
return n}}var
|
|
7337
|
-
function
|
|
7338
|
-
for(e+="",t+="";(i=
|
|
7369
|
+
return n}}var nC=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sC=new RegExp(nC.source,"g")
|
|
7370
|
+
function rC(e,t){var i,o,n,s=nC.lastIndex=sC.lastIndex=0,r=-1,a=[],l=[]
|
|
7371
|
+
for(e+="",t+="";(i=nC.exec(e))&&(o=sC.exec(t));)(n=o.index)>s&&(n=t.slice(s,n),a[r]?a[r]+=n:a[++r]=n),(i=i[0])===(o=o[0])?a[r]?a[r]+=o:a[++r]=o:(a[++r]=null,l.push({i:r,x:iC(i,o)})),s=sC.lastIndex
|
|
7339
7372
|
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 i,o=0;o<t;++o)a[(i=l[o]).i]=i.x(e)
|
|
7340
|
-
return a.join("")})}function
|
|
7341
|
-
return null==t||"boolean"===n?
|
|
7342
|
-
function
|
|
7343
|
-
return(r=Math.sqrt(e*e+t*t))&&(e/=r,t/=r),(l=e*i+t*o)&&(i-=e*l,o-=t*l),(a=Math.sqrt(i*i+o*o))&&(i/=a,o/=a,l/=a),e*o<t*i&&(e=-e,t=-t,l=-l,r=-r),{translateX:n,translateY:s,rotate:Math.atan2(t,e)*
|
|
7373
|
+
return a.join("")})}function aC(e,t){var i,o,n=typeof t
|
|
7374
|
+
return null==t||"boolean"===n?X$(t):("number"===n?iC:"string"===n?(i=E$(t))?(t=i,Q$):rC:t instanceof E$?Q$:t instanceof Date?tC:(o=t,!ArrayBuffer.isView(o)||o instanceof DataView?Array.isArray(t)?eC:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?oC:iC:J$))(e,t)}function lC(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var cC,dC=180/Math.PI,hC={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}
|
|
7375
|
+
function uC(e,t,i,o,n,s){var r,a,l
|
|
7376
|
+
return(r=Math.sqrt(e*e+t*t))&&(e/=r,t/=r),(l=e*i+t*o)&&(i-=e*l,o-=t*l),(a=Math.sqrt(i*i+o*o))&&(i/=a,o/=a,l/=a),e*o<t*i&&(e=-e,t=-t,l=-l,r=-r),{translateX:n,translateY:s,rotate:Math.atan2(t,e)*dC,skewX:Math.atan(l)*dC,scaleX:r,scaleY:a}}function pC(e,t,i,o){function n(e){return e.length?e.pop()+" ":""}return function(s,r){var a=[],l=[]
|
|
7344
7377
|
return s=e(s),r=e(r),function(e,o,n,s,r,a){if(e!==n||o!==s){var l=r.push("translate(",null,t,null,i)
|
|
7345
|
-
a.push({i:l-4,x:
|
|
7346
|
-
r.push({i:a-4,x:
|
|
7347
|
-
return a.join("")}}}var
|
|
7348
|
-
return t.isIdentity?
|
|
7349
|
-
function
|
|
7378
|
+
a.push({i:l-4,x:iC(e,n)},{i:l-2,x:iC(o,s)})}else(n||s)&&r.push("translate("+n+t+s+i)}(s.translateX,s.translateY,r.translateX,r.translateY,a,l),function(e,t,i,s){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),s.push({i:i.push(n(i)+"rotate(",null,o)-2,x:iC(e,t)})):t&&i.push(n(i)+"rotate("+t+o)}(s.rotate,r.rotate,a,l),function(e,t,i,s){e!==t?s.push({i:i.push(n(i)+"skewX(",null,o)-2,x:iC(e,t)}):t&&i.push(n(i)+"skewX("+t+o)}(s.skewX,r.skewX,a,l),function(e,t,i,o,s,r){if(e!==i||t!==o){var a=s.push(n(s)+"scale(",null,",",null,")")
|
|
7379
|
+
r.push({i:a-4,x:iC(e,i)},{i:a-2,x:iC(t,o)})}else 1===i&&1===o||s.push(n(s)+"scale("+i+","+o+")")}(s.scaleX,s.scaleY,r.scaleX,r.scaleY,a,l),s=r=null,function(e){for(var t,i=-1,o=l.length;++i<o;)a[(t=l[i]).i]=t.x(e)
|
|
7380
|
+
return a.join("")}}}var gC=pC((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"")
|
|
7381
|
+
return t.isIdentity?hC:uC(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),vC=pC((function(e){return null==e?hC:(cC||(cC=document.createElementNS("http://www.w3.org/2000/svg","g")),cC.setAttribute("transform",e),(e=cC.transform.baseVal.consolidate())?uC((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):hC)}),", ",")",")")
|
|
7382
|
+
function fC(e){return((e=Math.exp(e))+1/e)/2}var mC,bC,wC=function e(t,i,o){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
|
|
7350
7383
|
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)]}
|
|
7351
7384
|
else{var f=Math.sqrt(v),m=(u*u-c*c+o*v)/(2*c*i*f),b=(u*u-c*c-o*v)/(2*u*i*f),w=Math.log(Math.sqrt(m*m+1)-m),x=Math.log(Math.sqrt(b*b+1)-b)
|
|
7352
|
-
r=(x-w)/t,s=function(e){var o,n=e*r,s=
|
|
7353
|
-
return[a+d*p,l+d*g,c*s/
|
|
7354
|
-
return e(i,o,o*o)},n}(Math.SQRT2,2,4),
|
|
7355
|
-
function
|
|
7356
|
-
return o.restart(e,t,i),o}function
|
|
7357
|
-
try{!function(){
|
|
7358
|
-
for(var e,t=
|
|
7359
|
-
for(;i;)i._call?(o>i._time&&(o=i._time),e=i,i=i._next):(t=i._next,i._next=null,i=e?e._next=t:
|
|
7360
|
-
|
|
7361
|
-
t>1e3&&(
|
|
7362
|
-
return t=null==t?0:+t,o.restart((i=>{o.stop(),e(i+t)}),t,i),o}
|
|
7363
|
-
i=(null==i?
|
|
7364
|
-
var
|
|
7365
|
-
function
|
|
7385
|
+
r=(x-w)/t,s=function(e){var o,n=e*r,s=fC(w),d=c/(i*f)*(s*(o=t*n+w,((o=Math.exp(2*o))-1)/(o+1))-function(e){return((e=Math.exp(e))-1/e)/2}(w))
|
|
7386
|
+
return[a+d*p,l+d*g,c*s/fC(t*n+w)]}}return s.duration=1e3*r*t/Math.SQRT2,s}return n.rho=function(t){var i=Math.max(.001,+t),o=i*i
|
|
7387
|
+
return e(i,o,o*o)},n}(Math.SQRT2,2,4),xC=0,yC=0,$C=0,CC=0,kC=0,SC=0,_C="object"==typeof performance&&performance.now?performance:Date,IC="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)}
|
|
7388
|
+
function RC(){return kC||(IC(MC),kC=_C.now()+SC)}function MC(){kC=0}function AC(){this._call=this._time=this._next=null}function OC(e,t,i){var o=new AC
|
|
7389
|
+
return o.restart(e,t,i),o}function EC(){kC=(CC=_C.now())+SC,xC=yC=0
|
|
7390
|
+
try{!function(){RC(),++xC
|
|
7391
|
+
for(var e,t=mC;t;)(e=kC-t._time)>=0&&t._call.call(void 0,e),t=t._next;--xC}()}finally{xC=0,function(){var e,t,i=mC,o=1/0
|
|
7392
|
+
for(;i;)i._call?(o>i._time&&(o=i._time),e=i,i=i._next):(t=i._next,i._next=null,i=e?e._next=t:mC=t)
|
|
7393
|
+
bC=e,FC(o)}(),kC=0}}function VC(){var e=_C.now(),t=e-CC
|
|
7394
|
+
t>1e3&&(SC-=t,CC=e)}function FC(e){xC||(yC&&(yC=clearTimeout(yC)),e-kC>24?(e<1/0&&(yC=setTimeout(EC,e-_C.now()-SC)),$C&&($C=clearInterval($C))):($C||(CC=_C.now(),$C=setInterval(VC,1e3)),xC=1,IC(EC)))}function HC(e,t,i){var o=new AC
|
|
7395
|
+
return t=null==t?0:+t,o.restart((i=>{o.stop(),e(i+t)}),t,i),o}AC.prototype=OC.prototype={constructor:AC,restart:function(e,t,i){if("function"!=typeof e)throw new TypeError("callback is not a function")
|
|
7396
|
+
i=(null==i?RC():+i)+(null==t?0:+t),this._next||bC===this||(bC?bC._next=this:mC=this,bC=this),this._call=e,this._time=i,FC()},stop:function(){this._call&&(this._call=null,this._time=1/0,FC())}}
|
|
7397
|
+
var PC=Zx("start","end","cancel","interrupt"),TC=[]
|
|
7398
|
+
function LC(e,t,i,o,n,s){var r=e.__transition
|
|
7366
7399
|
if(r){if(i in r)return}else e.__transition={}
|
|
7367
7400
|
!function(e,t,i){var o,n=e.__transition
|
|
7368
7401
|
function s(e){i.state=1,i.timer.restart(r,i.delay,i.time),i.delay<=e&&r(e-i.delay)}function r(s){var c,d,h,u
|
|
7369
7402
|
if(1!==i.state)return l()
|
|
7370
|
-
for(c in n)if((u=n[c]).name===i.name){if(3===u.state)return
|
|
7371
|
-
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(
|
|
7403
|
+
for(c in n)if((u=n[c]).name===i.name){if(3===u.state)return HC(r)
|
|
7404
|
+
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(HC((function(){3===i.state&&(i.state=4,i.timer.restart(a,i.delay,i.time),a(s))})),i.state=2,i.on.call("start",e,e.__data__,i.index,i.group),2===i.state){for(i.state=3,o=new Array(h=i.tween.length),c=0,d=-1;c<h;++c)(u=i.tween[c].value.call(e,e.__data__,i.index,i.group))&&(o[++d]=u)
|
|
7372
7405
|
o.length=d+1}}function a(t){for(var n=t<i.duration?i.ease.call(null,t/i.duration):(i.timer.restart(l),i.state=5,1),s=-1,r=o.length;++s<r;)o[s].call(e,n)
|
|
7373
7406
|
5===i.state&&(i.on.call("end",e,e.__data__,i.index,i.group),l())}function l(){for(var o in i.state=6,i.timer.stop(),delete n[t],n)return
|
|
7374
|
-
delete e.__transition}n[t]=i,i.timer=
|
|
7407
|
+
delete e.__transition}n[t]=i,i.timer=OC(s,0,i.time)}(e,i,{name:t,index:o,group:n,on:PC,tween:TC,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:0})}function DC(e,t){var i=BC(e,t)
|
|
7375
7408
|
if(i.state>0)throw new Error("too late; already scheduled")
|
|
7376
|
-
return i}function
|
|
7409
|
+
return i}function zC(e,t){var i=BC(e,t)
|
|
7377
7410
|
if(i.state>3)throw new Error("too late; already running")
|
|
7378
|
-
return i}function
|
|
7411
|
+
return i}function BC(e,t){var i=e.__transition
|
|
7379
7412
|
if(!i||!(i=i[t]))throw new Error("transition not found")
|
|
7380
|
-
return i}function
|
|
7413
|
+
return i}function NC(e,t){var i,o,n,s=e.__transition,r=!0
|
|
7381
7414
|
if(s){for(n in t=null==t?null:t+"",s)(i=s[n]).name===t?(o=i.state>2&&i.state<5,i.state=6,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete s[n]):r=!1
|
|
7382
|
-
r&&delete e.__transition}}function
|
|
7383
|
-
return function(){var n=
|
|
7415
|
+
r&&delete e.__transition}}function ZC(e,t){var i,o
|
|
7416
|
+
return function(){var n=zC(this,e),s=n.tween
|
|
7384
7417
|
if(s!==i)for(var r=0,a=(o=i=s).length;r<a;++r)if(o[r].name===t){(o=o.slice()).splice(r,1)
|
|
7385
|
-
break}n.tween=o}}function
|
|
7418
|
+
break}n.tween=o}}function qC(e,t,i){var o,n
|
|
7386
7419
|
if("function"!=typeof i)throw new Error
|
|
7387
|
-
return function(){var s=
|
|
7420
|
+
return function(){var s=zC(this,e),r=s.tween
|
|
7388
7421
|
if(r!==o){n=(o=r).slice()
|
|
7389
7422
|
for(var a={name:t,value:i},l=0,c=n.length;l<c;++l)if(n[l].name===t){n[l]=a
|
|
7390
|
-
break}l===c&&n.push(a)}s.tween=n}}function
|
|
7391
|
-
return e.each((function(){var e=
|
|
7392
|
-
return("number"==typeof t?
|
|
7423
|
+
break}l===c&&n.push(a)}s.tween=n}}function jC(e,t,i){var o=e._id
|
|
7424
|
+
return e.each((function(){var e=zC(this,o);(e.value||(e.value={}))[t]=i.apply(this,arguments)})),function(e){return BC(e,o).value[t]}}function UC(e,t){var i
|
|
7425
|
+
return("number"==typeof t?iC:t instanceof E$?Q$:(i=E$(t))?(t=i,Q$):rC)(e,t)}function GC(e){return function(){this.removeAttribute(e)}}function WC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function XC(e,t,i){var o,n,s=i+""
|
|
7393
7426
|
return function(){var r=this.getAttribute(e)
|
|
7394
|
-
return r===s?null:r===o?n:n=t(o=r,i)}}function
|
|
7427
|
+
return r===s?null:r===o?n:n=t(o=r,i)}}function KC(e,t,i){var o,n,s=i+""
|
|
7395
7428
|
return function(){var r=this.getAttributeNS(e.space,e.local)
|
|
7396
|
-
return r===s?null:r===o?n:n=t(o=r,i)}}function
|
|
7429
|
+
return r===s?null:r===o?n:n=t(o=r,i)}}function YC(e,t,i){var o,n,s
|
|
7397
7430
|
return function(){var r,a,l=i(this)
|
|
7398
7431
|
if(null!=l)return(r=this.getAttribute(e))===(a=l+"")?null:r===o&&a===n?s:(n=a,s=t(o=r,l))
|
|
7399
|
-
this.removeAttribute(e)}}function
|
|
7432
|
+
this.removeAttribute(e)}}function QC(e,t,i){var o,n,s
|
|
7400
7433
|
return function(){var r,a,l=i(this)
|
|
7401
7434
|
if(null!=l)return(r=this.getAttributeNS(e.space,e.local))===(a=l+"")?null:r===o&&a===n?s:(n=a,s=t(o=r,l))
|
|
7402
|
-
this.removeAttributeNS(e.space,e.local)}}function
|
|
7435
|
+
this.removeAttributeNS(e.space,e.local)}}function JC(e,t){return function(i){this.setAttribute(e,t.call(this,i))}}function ek(e,t){return function(i){this.setAttributeNS(e.space,e.local,t.call(this,i))}}function tk(e,t){var i,o
|
|
7403
7436
|
function n(){var n=t.apply(this,arguments)
|
|
7404
|
-
return n!==o&&(i=(o=n)&&
|
|
7437
|
+
return n!==o&&(i=(o=n)&&ek(e,n)),i}return n._value=t,n}function ik(e,t){var i,o
|
|
7405
7438
|
function n(){var n=t.apply(this,arguments)
|
|
7406
|
-
return n!==o&&(i=(o=n)&&
|
|
7407
|
-
return function(){
|
|
7408
|
-
return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?
|
|
7439
|
+
return n!==o&&(i=(o=n)&&JC(e,n)),i}return n._value=t,n}function ok(e,t){return function(){DC(this,e).delay=+t.apply(this,arguments)}}function nk(e,t){return t=+t,function(){DC(this,e).delay=t}}function sk(e,t){return function(){zC(this,e).duration=+t.apply(this,arguments)}}function rk(e,t){return t=+t,function(){zC(this,e).duration=t}}function ak(e,t){if("function"!=typeof t)throw new Error
|
|
7440
|
+
return function(){zC(this,e).ease=t}}function lk(e,t,i){var o,n,s=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".")
|
|
7441
|
+
return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?DC:zC
|
|
7409
7442
|
return function(){var r=s(this,e),a=r.on
|
|
7410
|
-
a!==o&&(n=(o=a).copy()).on(t,i),r.on=n}}var
|
|
7411
|
-
function
|
|
7443
|
+
a!==o&&(n=(o=a).copy()).on(t,i),r.on=n}}var ck=a$.prototype.constructor
|
|
7444
|
+
function dk(e){return function(){this.style.removeProperty(e)}}function hk(e,t,i){return function(o){this.style.setProperty(e,t.call(this,o),i)}}function uk(e,t,i){var o,n
|
|
7412
7445
|
function s(){var s=t.apply(this,arguments)
|
|
7413
|
-
return s!==n&&(o=(n=s)&&
|
|
7446
|
+
return s!==n&&(o=(n=s)&&hk(e,s,i)),o}return s._value=t,s}function pk(e){return function(t){this.textContent=e.call(this,t)}}function gk(e){var t,i
|
|
7414
7447
|
function o(){var o=e.apply(this,arguments)
|
|
7415
|
-
return o!==i&&(t=(i=o)&&
|
|
7416
|
-
function
|
|
7417
|
-
|
|
7418
|
-
"function"!=typeof e&&(e=
|
|
7419
|
-
for(var o=this._groups,n=o.length,s=new Array(n),r=0;r<n;++r)for(var a,l,c=o[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,
|
|
7420
|
-
return new
|
|
7421
|
-
"function"!=typeof e&&(e=
|
|
7422
|
-
for(var o=this._groups,n=o.length,s=[],r=[],a=0;a<n;++a)for(var l,c=o[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=
|
|
7423
|
-
s.push(p),r.push(l)}return new
|
|
7448
|
+
return o!==i&&(t=(i=o)&&pk(o)),t}return o._value=e,o}var vk=0
|
|
7449
|
+
function fk(e,t,i,o){this._groups=e,this._parents=t,this._name=i,this._id=o}function mk(){return++vk}var bk=a$.prototype
|
|
7450
|
+
fk.prototype={constructor:fk,select:function(e){var t=this._name,i=this._id
|
|
7451
|
+
"function"!=typeof e&&(e=ty(e))
|
|
7452
|
+
for(var o=this._groups,n=o.length,s=new Array(n),r=0;r<n;++r)for(var a,l,c=o[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,LC(h[u],t,i,u,h,BC(a,i)))
|
|
7453
|
+
return new fk(s,this._parents,t,i)},selectAll:function(e){var t=this._name,i=this._id
|
|
7454
|
+
"function"!=typeof e&&(e=ny(e))
|
|
7455
|
+
for(var o=this._groups,n=o.length,s=[],r=[],a=0;a<n;++a)for(var l,c=o[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=BC(l,i),v=0,f=p.length;v<f;++v)(u=p[v])&&LC(u,t,i,v,p,g)
|
|
7456
|
+
s.push(p),r.push(l)}return new fk(s,r,t,i)},selectChild:bk.selectChild,selectChildren:bk.selectChildren,filter:function(e){"function"!=typeof e&&(e=sy(e))
|
|
7424
7457
|
for(var t=this._groups,i=t.length,o=new Array(i),n=0;n<i;++n)for(var s,r=t[n],a=r.length,l=o[n]=[],c=0;c<a;++c)(s=r[c])&&e.call(s,s.__data__,c,r)&&l.push(s)
|
|
7425
|
-
return new
|
|
7458
|
+
return new fk(o,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error
|
|
7426
7459
|
for(var t=this._groups,i=e._groups,o=t.length,n=i.length,s=Math.min(o,n),r=new Array(o),a=0;a<s;++a)for(var l,c=t[a],d=i[a],h=c.length,u=r[a]=new Array(h),p=0;p<h;++p)(l=c[p]||d[p])&&(u[p]=l)
|
|
7427
7460
|
for(;a<o;++a)r[a]=t[a]
|
|
7428
|
-
return new
|
|
7429
|
-
|
|
7430
|
-
return arguments.length<2?
|
|
7431
|
-
return this.attrTween(e,"function"==typeof t?(i.local?
|
|
7461
|
+
return new fk(r,this._parents,this._name,this._id)},selection:function(){return new ck(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,i=mk(),o=this._groups,n=o.length,s=0;s<n;++s)for(var r,a=o[s],l=a.length,c=0;c<l;++c)if(r=a[c]){var d=BC(r,t)
|
|
7462
|
+
LC(r,e,i,c,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new fk(o,this._parents,e,i)},call:bk.call,nodes:bk.nodes,node:bk.node,size:bk.size,empty:bk.empty,each:bk.each,on:function(e,t){var i=this._id
|
|
7463
|
+
return arguments.length<2?BC(this.node(),i).on.on(e):this.each(lk(i,e,t))},attr:function(e,t){var i=Kx(e),o="transform"===i?vC:UC
|
|
7464
|
+
return this.attrTween(e,"function"==typeof t?(i.local?QC:YC)(i,o,jC(this,"attr."+e,t)):null==t?(i.local?WC:GC)(i):(i.local?KC:XC)(i,o,t))},attrTween:function(e,t){var i="attr."+e
|
|
7432
7465
|
if(arguments.length<2)return(i=this.tween(i))&&i._value
|
|
7433
7466
|
if(null==t)return this.tween(i,null)
|
|
7434
7467
|
if("function"!=typeof t)throw new Error
|
|
7435
|
-
var o=
|
|
7436
|
-
return this.tween(i,(o.local?
|
|
7468
|
+
var o=Kx(e)
|
|
7469
|
+
return this.tween(i,(o.local?tk:ik)(o,t))},style:function(e,t,i){var o="transform"==(e+="")?gC:UC
|
|
7437
7470
|
return null==t?this.styleTween(e,function(e,t){var i,o,n
|
|
7438
|
-
return function(){var s=
|
|
7439
|
-
return s===r?null:s===i&&r===o?n:n=t(i=s,o=r)}}(e,o)).on("end.style."+e,
|
|
7440
|
-
return function(){var r=
|
|
7441
|
-
return null==a&&(this.style.removeProperty(e),l=a=
|
|
7442
|
-
return function(){var l=
|
|
7471
|
+
return function(){var s=My(this,e),r=(this.style.removeProperty(e),My(this,e))
|
|
7472
|
+
return s===r?null:s===i&&r===o?n:n=t(i=s,o=r)}}(e,o)).on("end.style."+e,dk(e)):"function"==typeof t?this.styleTween(e,function(e,t,i){var o,n,s
|
|
7473
|
+
return function(){var r=My(this,e),a=i(this),l=a+""
|
|
7474
|
+
return null==a&&(this.style.removeProperty(e),l=a=My(this,e)),r===l?null:r===o&&l===n?s:(n=l,s=t(o=r,a))}}(e,o,jC(this,"style."+e,t))).each(function(e,t){var i,o,n,s,r="style."+t,a="end."+r
|
|
7475
|
+
return function(){var l=zC(this,e),c=l.on,d=null==l.value[r]?s||(s=dk(t)):void 0
|
|
7443
7476
|
c===i&&n===d||(o=(i=c).copy()).on(a,n=d),l.on=o}}(this._id,e)):this.styleTween(e,function(e,t,i){var o,n,s=i+""
|
|
7444
|
-
return function(){var r=
|
|
7477
|
+
return function(){var r=My(this,e)
|
|
7445
7478
|
return r===s?null:r===o?n:n=t(o=r,i)}}(e,o,t),i).on("end.style."+e,null)},styleTween:function(e,t,i){var o="style."+(e+="")
|
|
7446
7479
|
if(arguments.length<2)return(o=this.tween(o))&&o._value
|
|
7447
7480
|
if(null==t)return this.tween(o,null)
|
|
7448
7481
|
if("function"!=typeof t)throw new Error
|
|
7449
|
-
return this.tween(o,
|
|
7450
|
-
this.textContent=null==t?"":t}}(
|
|
7482
|
+
return this.tween(o,uk(e,t,null==i?"":i))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this)
|
|
7483
|
+
this.textContent=null==t?"":t}}(jC(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text"
|
|
7451
7484
|
if(arguments.length<1)return(t=this.tween(t))&&t._value
|
|
7452
7485
|
if(null==e)return this.tween(t,null)
|
|
7453
7486
|
if("function"!=typeof e)throw new Error
|
|
7454
|
-
return this.tween(t,
|
|
7487
|
+
return this.tween(t,gk(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode
|
|
7455
7488
|
for(var i in this.__transition)if(+i!==e)return
|
|
7456
7489
|
t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var i=this._id
|
|
7457
|
-
if(e+="",arguments.length<2){for(var o,n=
|
|
7458
|
-
return null}return this.each((null==t?
|
|
7459
|
-
return arguments.length?this.each(("function"==typeof e?
|
|
7460
|
-
return arguments.length?this.each(("function"==typeof e?
|
|
7461
|
-
return arguments.length?this.each(
|
|
7490
|
+
if(e+="",arguments.length<2){for(var o,n=BC(this.node(),i).tween,s=0,r=n.length;s<r;++s)if((o=n[s]).name===e)return o.value
|
|
7491
|
+
return null}return this.each((null==t?ZC:qC)(i,e,t))},delay:function(e){var t=this._id
|
|
7492
|
+
return arguments.length?this.each(("function"==typeof e?ok:nk)(t,e)):BC(this.node(),t).delay},duration:function(e){var t=this._id
|
|
7493
|
+
return arguments.length?this.each(("function"==typeof e?sk:rk)(t,e)):BC(this.node(),t).duration},ease:function(e){var t=this._id
|
|
7494
|
+
return arguments.length?this.each(ak(t,e)):BC(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error
|
|
7462
7495
|
return this.each(function(e,t){return function(){var i=t.apply(this,arguments)
|
|
7463
7496
|
if("function"!=typeof i)throw new Error
|
|
7464
|
-
|
|
7497
|
+
zC(this,e).ease=i}}(this._id,e))},end:function(){var e,t,i=this,o=i._id,n=i.size()
|
|
7465
7498
|
return new Promise((function(s,r){var a={value:r},l={value:function(){0==--n&&s()}}
|
|
7466
|
-
i.each((function(){var i=
|
|
7467
|
-
n!==e&&((t=(e=n).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),i.on=t})),0===n&&s()}))},[Symbol.iterator]:
|
|
7468
|
-
var
|
|
7469
|
-
function
|
|
7470
|
-
return i}
|
|
7471
|
-
e instanceof
|
|
7472
|
-
for(var o=this._groups,n=o.length,s=0;s<n;++s)for(var r,a=o[s],l=a.length,c=0;c<l;++c)(r=a[c])&&
|
|
7473
|
-
return new
|
|
7474
|
-
var
|
|
7475
|
-
function
|
|
7476
|
-
var
|
|
7477
|
-
function
|
|
7478
|
-
return e.__zoom}function
|
|
7479
|
-
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
|
|
7480
|
-
return e.translate(n>o?(o+n)/2:Math.min(0,o)||Math.max(0,n),r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r))}
|
|
7481
|
-
const
|
|
7499
|
+
i.each((function(){var i=zC(this,o),n=i.on
|
|
7500
|
+
n!==e&&((t=(e=n).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),i.on=t})),0===n&&s()}))},[Symbol.iterator]:bk[Symbol.iterator]}
|
|
7501
|
+
var wk={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}}
|
|
7502
|
+
function xk(e,t){for(var i;!(i=e.__transition)||!(i=i[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`)
|
|
7503
|
+
return i}a$.prototype.interrupt=function(e){return this.each((function(){NC(this,e)}))},a$.prototype.transition=function(e){var t,i
|
|
7504
|
+
e instanceof fk?(t=e._id,e=e._name):(t=mk(),(i=wk).time=RC(),e=null==e?null:e+"")
|
|
7505
|
+
for(var o=this._groups,n=o.length,s=0;s<n;++s)for(var r,a=o[s],l=a.length,c=0;c<l;++c)(r=a[c])&&LC(r,e,t,c,a,i||xk(r,t))
|
|
7506
|
+
return new fk(o,this._parents,e,t)}
|
|
7507
|
+
var yk=e=>()=>e
|
|
7508
|
+
function $k(e,{sourceEvent:t,target:i,transform:o,dispatch:n}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:n}})}function Ck(e,t,i){this.k=e,this.x=t,this.y=i}Ck.prototype={constructor:Ck,scale:function(e){return 1===e?this:new Ck(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Ck(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+")"}}
|
|
7509
|
+
var kk=new Ck(1,0,0)
|
|
7510
|
+
function Sk(e){for(;!e.__zoom;)if(!(e=e.parentNode))return kk
|
|
7511
|
+
return e.__zoom}function _k(e){e.stopImmediatePropagation()}function Ik(e){e.preventDefault(),e.stopImmediatePropagation()}function Rk(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function Mk(){var e=this
|
|
7512
|
+
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 Ak(){return this.__zoom||kk}function Ok(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Ek(){return navigator.maxTouchPoints||"ontouchstart"in this}function Vk(e,t,i){var o=e.invertX(t[0][0])-i[0][0],n=e.invertX(t[1][0])-i[1][0],s=e.invertY(t[0][1])-i[0][1],r=e.invertY(t[1][1])-i[1][1]
|
|
7513
|
+
return e.translate(n>o?(o+n)/2:Math.min(0,o)||Math.max(0,n),r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r))}Sk.prototype=Ck.prototype
|
|
7514
|
+
const Fk=G`
|
|
7482
7515
|
<div class="wafer-map-container">
|
|
7483
7516
|
<svg class="svg-root">
|
|
7484
7517
|
<g ${_e("zoomContainer")} transform=${e=>e.transform.toString()}>
|
|
@@ -7508,7 +7541,7 @@ const Ek=G`
|
|
|
7508
7541
|
/>
|
|
7509
7542
|
</svg>
|
|
7510
7543
|
</div>
|
|
7511
|
-
`,
|
|
7544
|
+
`,Hk=fe`
|
|
7512
7545
|
:host {
|
|
7513
7546
|
display: inline-block;
|
|
7514
7547
|
width: 500px;
|
|
@@ -7592,68 +7625,68 @@ const Ek=G`
|
|
|
7592
7625
|
outline-width: 0px;
|
|
7593
7626
|
}
|
|
7594
7627
|
`
|
|
7595
|
-
function
|
|
7628
|
+
function Pk(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Tk(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Lk(e){let t,i,o
|
|
7596
7629
|
function n(e,o,n=0,s=e.length){if(n<s){if(0!==t(o,o))return s
|
|
7597
7630
|
do{const t=n+s>>>1
|
|
7598
|
-
i(e[t],o)<0?n=t+1:s=t}while(n<s)}return n}return 2!==e.length?(t=
|
|
7631
|
+
i(e[t],o)<0?n=t+1:s=t}while(n<s)}return n}return 2!==e.length?(t=Pk,i=(t,i)=>Pk(e(t),i),o=(t,i)=>e(t)-i):(t=e===Pk||e===Tk?e:Dk,i=e,o=e),{left:n,center:function(e,t,i=0,s=e.length){const r=n(e,t,i,s-1)
|
|
7599
7632
|
return r>i&&o(e[r-1],t)>-o(e[r],t)?r-1:r},right:function(e,o,n=0,s=e.length){if(n<s){if(0!==t(o,o))return s
|
|
7600
7633
|
do{const t=n+s>>>1
|
|
7601
|
-
i(e[t],o)<=0?n=t+1:s=t}while(n<s)}return n}}}function
|
|
7602
|
-
|
|
7603
|
-
var
|
|
7604
|
-
class
|
|
7634
|
+
i(e[t],o)<=0?n=t+1:s=t}while(n<s)}return n}}}function Dk(){return 0}function zk(e){return null===e?NaN:+e}const Bk=Lk(Pk).right
|
|
7635
|
+
Lk(zk).center
|
|
7636
|
+
var Nk=Bk
|
|
7637
|
+
class Zk extends Map{constructor(e,t=jk){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,i]of e)this.set(t,i)}get(e){return super.get(qk(this,e))}has(e){return super.has(qk(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},i){const o=t(i)
|
|
7605
7638
|
return e.has(o)?e.get(o):(e.set(o,i),i)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},i){const o=t(i)
|
|
7606
7639
|
e.has(o)&&(i=e.get(o),e.delete(o))
|
|
7607
|
-
return i}(this,e))}}function
|
|
7608
|
-
return e.has(o)?e.get(o):i}function
|
|
7609
|
-
function
|
|
7640
|
+
return i}(this,e))}}function qk({_intern:e,_key:t},i){const o=t(i)
|
|
7641
|
+
return e.has(o)?e.get(o):i}function jk(e){return null!==e&&"object"==typeof e?e.valueOf():e}const Uk=Math.sqrt(50),Gk=Math.sqrt(10),Wk=Math.sqrt(2)
|
|
7642
|
+
function Xk(e,t,i){const o=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(o)),s=o/Math.pow(10,n),r=s>=Uk?10:s>=Gk?5:s>=Wk?2:1
|
|
7610
7643
|
let a,l,c
|
|
7611
|
-
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<=i&&i<2?
|
|
7644
|
+
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<=i&&i<2?Xk(e,t,2*i):[a,l,c]}function Kk(e,t,i){return Xk(e=+e,t=+t,i=+i)[2]}function Yk(e,t,i=zk){if((o=e.length)&&!isNaN(t=+t)){if(t<=0||o<2)return+i(e[0],0,e)
|
|
7612
7645
|
if(t>=1)return+i(e[o-1],o-1,e)
|
|
7613
7646
|
var o,n=(o-1)*t,s=Math.floor(n),r=+i(e[s],s,e)
|
|
7614
|
-
return r+(+i(e[s+1],s+1,e)-r)*(n-s)}}function
|
|
7647
|
+
return r+(+i(e[s+1],s+1,e)-r)*(n-s)}}function Qk(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i
|
|
7615
7648
|
for(var o=-1,n=0|Math.max(0,Math.ceil((t-e)/i)),s=new Array(n);++o<n;)s[o]=e+o*i
|
|
7616
|
-
return s}function
|
|
7649
|
+
return s}function Jk(e,t){switch(arguments.length){case 0:break
|
|
7617
7650
|
case 1:this.range(e)
|
|
7618
7651
|
break
|
|
7619
|
-
default:this.range(t).domain(e)}return this}const
|
|
7620
|
-
function
|
|
7652
|
+
default:this.range(t).domain(e)}return this}const eS=Symbol("implicit")
|
|
7653
|
+
function tS(){var e=new Zk,t=[],i=[],o=eS
|
|
7621
7654
|
function n(n){let s=e.get(n)
|
|
7622
|
-
if(void 0===s){if(o!==
|
|
7655
|
+
if(void 0===s){if(o!==eS)return o
|
|
7623
7656
|
e.set(n,s=t.push(n)-1)}return i[s%i.length]}return n.domain=function(i){if(!arguments.length)return t.slice()
|
|
7624
|
-
t=[],e=new
|
|
7657
|
+
t=[],e=new Zk
|
|
7625
7658
|
for(const o of i)e.has(o)||e.set(o,t.push(o)-1)
|
|
7626
|
-
return n},n.range=function(e){return arguments.length?(i=Array.from(e),n):i.slice()},n.unknown=function(e){return arguments.length?(o=e,n):o},n.copy=function(){return
|
|
7659
|
+
return n},n.range=function(e){return arguments.length?(i=Array.from(e),n):i.slice()},n.unknown=function(e){return arguments.length?(o=e,n):o},n.copy=function(){return tS(t,i).unknown(o)},Jk.apply(n,arguments),n}function iS(){var e,t,i=tS().unknown(void 0),o=i.domain,n=i.range,s=0,r=1,a=!1,l=0,c=0,d=.5
|
|
7627
7660
|
function h(){var i=o().length,h=r<s,u=h?r:s,p=h?s:r
|
|
7628
7661
|
e=(p-u)/Math.max(1,i-l+2*c),a&&(e=Math.floor(e)),u+=(p-u-e*(i-l))*d,t=e*(1-l),a&&(u=Math.round(u),t=Math.round(t))
|
|
7629
|
-
var g=
|
|
7630
|
-
return n(h?g.reverse():g)}return delete i.unknown,i.domain=function(e){return arguments.length?(o(e),h()):o()},i.range=function(e){return arguments.length?([s,r]=e,s=+s,r=+r,h()):[s,r]},i.rangeRound=function(e){return[s,r]=e,s=+s,r=+r,a=!0,h()},i.bandwidth=function(){return t},i.step=function(){return e},i.round=function(e){return arguments.length?(a=!!e,h()):a},i.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),h()):l},i.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),h()):l},i.paddingOuter=function(e){return arguments.length?(c=+e,h()):c},i.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),h()):d},i.copy=function(){return
|
|
7631
|
-
function
|
|
7632
|
-
var i}function
|
|
7633
|
-
return n<o?(o=
|
|
7634
|
-
for(e[o]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++r<o;)n[r]=
|
|
7635
|
-
return function(t){var i=
|
|
7636
|
-
return s[i](n[i](t))}}function
|
|
7662
|
+
var g=Qk(i).map((function(t){return u+e*t}))
|
|
7663
|
+
return n(h?g.reverse():g)}return delete i.unknown,i.domain=function(e){return arguments.length?(o(e),h()):o()},i.range=function(e){return arguments.length?([s,r]=e,s=+s,r=+r,h()):[s,r]},i.rangeRound=function(e){return[s,r]=e,s=+s,r=+r,a=!0,h()},i.bandwidth=function(){return t},i.step=function(){return e},i.round=function(e){return arguments.length?(a=!!e,h()):a},i.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),h()):l},i.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),h()):l},i.paddingOuter=function(e){return arguments.length?(c=+e,h()):c},i.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),h()):d},i.copy=function(){return iS(o(),[s,r]).round(a).paddingInner(l).paddingOuter(c).align(d)},Jk.apply(h(),arguments)}function oS(e){return+e}var nS=[0,1]
|
|
7664
|
+
function sS(e){return e}function rS(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i})
|
|
7665
|
+
var i}function aS(e,t,i){var o=e[0],n=e[1],s=t[0],r=t[1]
|
|
7666
|
+
return n<o?(o=rS(n,o),s=i(r,s)):(o=rS(o,n),s=i(s,r)),function(e){return s(o(e))}}function lS(e,t,i){var o=Math.min(e.length,t.length)-1,n=new Array(o),s=new Array(o),r=-1
|
|
7667
|
+
for(e[o]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++r<o;)n[r]=rS(e[r],e[r+1]),s[r]=i(t[r],t[r+1])
|
|
7668
|
+
return function(t){var i=Nk(e,t,1,o)-1
|
|
7669
|
+
return s[i](n[i](t))}}function cS(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function dS(){var e,t,i,o,n,s,r=nS,a=nS,l=aC,c=sS
|
|
7637
7670
|
function d(){var e,t,i,l=Math.min(r.length,a.length)
|
|
7638
|
-
return c!==
|
|
7671
|
+
return c!==sS&&(e=r[0],t=r[l-1],e>t&&(i=e,e=t,t=i),c=function(i){return Math.max(e,Math.min(t,i))}),o=l>2?lS:aS,n=s=null,h}function h(t){return null==t||isNaN(t=+t)?i:(n||(n=o(r.map(e),a,l)))(e(c(t)))}return h.invert=function(i){return c(t((s||(s=o(a,r.map(e),iC)))(i)))},h.domain=function(e){return arguments.length?(r=Array.from(e,oS),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=lC,d()},h.clamp=function(e){return arguments.length?(c=!!e||sS,d()):c!==sS},h.interpolate=function(e){return arguments.length?(l=e,d()):l},h.unknown=function(e){return arguments.length?(i=e,h):i},function(i,o){return e=i,t=o,d()}}function hS(){return dS()(sS,sS)}function uS(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null
|
|
7639
7672
|
var i,o=e.slice(0,i)
|
|
7640
|
-
return[o.length>1?o[0]+o.slice(2):o,+e.slice(i+1)]}function
|
|
7641
|
-
function
|
|
7673
|
+
return[o.length>1?o[0]+o.slice(2):o,+e.slice(i+1)]}function pS(e){return(e=uS(Math.abs(e)))?e[1]:NaN}var gS,vS=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i
|
|
7674
|
+
function fS(e){if(!(t=vS.exec(e)))throw new Error("invalid format: "+e)
|
|
7642
7675
|
var t
|
|
7643
|
-
return new
|
|
7676
|
+
return new mS({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 mS(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 bS(e,t){var i=uS(e,t)
|
|
7644
7677
|
if(!i)return e+""
|
|
7645
7678
|
var o=i[0],n=i[1]
|
|
7646
|
-
return n<0?"0."+new Array(-n).join("0")+o:o.length>n+1?o.slice(0,n+1)+"."+o.slice(n+1):o+new Array(n-o.length+2).join("0")}
|
|
7647
|
-
var
|
|
7679
|
+
return n<0?"0."+new Array(-n).join("0")+o:o.length>n+1?o.slice(0,n+1)+"."+o.slice(n+1):o+new Array(n-o.length+2).join("0")}fS.prototype=mS.prototype,mS.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}
|
|
7680
|
+
var wS={"%":(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)=>bS(100*e,t),r:bS,s:function(e,t){var i=uS(e,t)
|
|
7648
7681
|
if(!i)return e+""
|
|
7649
|
-
var o=i[0],n=i[1],s=n-(
|
|
7650
|
-
return s===r?o:s>r?o+new Array(s-r+1).join("0"):s>0?o.slice(0,s)+"."+o.slice(s):"0."+new Array(1-s).join("0")+
|
|
7651
|
-
function
|
|
7652
|
-
function
|
|
7653
|
-
return s.reverse().join(i)}),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?
|
|
7654
|
-
function h(e){var t=(e=
|
|
7655
|
-
"n"===b?(v=!0,b="g"):
|
|
7656
|
-
var w="$"===u?n:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===u?s:/[%p]/.test(b)?l:"",y=
|
|
7682
|
+
var o=i[0],n=i[1],s=n-(gS=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,r=o.length
|
|
7683
|
+
return s===r?o:s>r?o+new Array(s-r+1).join("0"):s>0?o.slice(0,s)+"."+o.slice(s):"0."+new Array(1-s).join("0")+uS(e,Math.max(0,t+s-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)}
|
|
7684
|
+
function xS(e){return e}var yS,$S,CS,kS=Array.prototype.map,SS=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]
|
|
7685
|
+
function _S(e){var t,i,o=void 0===e.grouping||void 0===e.thousands?xS:(t=kS.call(e.grouping,Number),i=e.thousands+"",function(e,o){for(var n=e.length,s=[],r=0,a=t[0],l=0;n>0&&a>0&&(l+a+1>o&&(a=Math.max(1,o-l)),s.push(e.substring(n-=a,n+a)),!((l+=a+1)>o));)a=t[r=(r+1)%t.length]
|
|
7686
|
+
return s.reverse().join(i)}),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?xS:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(kS.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+""
|
|
7687
|
+
function h(e){var t=(e=fS(e)).fill,i=e.align,h=e.sign,u=e.symbol,p=e.zero,g=e.width,v=e.comma,f=e.precision,m=e.trim,b=e.type
|
|
7688
|
+
"n"===b?(v=!0,b="g"):wS[b]||(void 0===f&&(f=12),m=!0,b="g"),(p||"0"===t&&"="===i)&&(p=!0,t="0",i="=")
|
|
7689
|
+
var w="$"===u?n:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===u?s:/[%p]/.test(b)?l:"",y=wS[b],$=/[defgprs%]/.test(b)
|
|
7657
7690
|
function C(e){var n,s,l,u=w,C=x
|
|
7658
7691
|
if("c"===b)C=y(e)+C,e=""
|
|
7659
7692
|
else{var k=(e=+e)<0||1/e<0
|
|
@@ -7662,7 +7695,7 @@ break
|
|
|
7662
7695
|
case"0":0===n&&(n=o),t=o
|
|
7663
7696
|
break
|
|
7664
7697
|
default:if(!+e[o])break e
|
|
7665
|
-
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?
|
|
7698
|
+
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?SS[8+gS/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)
|
|
7666
7699
|
break}}v&&!p&&(e=o(e,1/0))
|
|
7667
7700
|
var S=u.length+e.length+C.length,_=S<g?new Array(g-S+1).join(t):""
|
|
7668
7701
|
switch(v&&p&&(e=o(_+e,_.length?g-C.length:1/0),_=""),i){case"<":e=u+e+C+_
|
|
@@ -7671,19 +7704,19 @@ case"=":e=u+_+e+C
|
|
|
7671
7704
|
break
|
|
7672
7705
|
case"^":e=_.slice(0,S=_.length>>1)+u+e+C+_.slice(S)
|
|
7673
7706
|
break
|
|
7674
|
-
default:e=_+u+e+C}return a(e)}return f=void 0===f?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),C.toString=function(){return e+""},C}return{format:h,formatPrefix:function(e,t){var i=h(((e=
|
|
7675
|
-
return function(e){return i(n*e)+s}}}}function
|
|
7676
|
-
const o=(t=+t)<(e=+e),n=o?
|
|
7707
|
+
default:e=_+u+e+C}return a(e)}return f=void 0===f?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),C.toString=function(){return e+""},C}return{format:h,formatPrefix:function(e,t){var i=h(((e=fS(e)).type="f",e)),o=3*Math.max(-8,Math.min(8,Math.floor(pS(t)/3))),n=Math.pow(10,-o),s=SS[8+o/3]
|
|
7708
|
+
return function(e){return i(n*e)+s}}}}function IS(e,t,i,o){var n,s=function(e,t,i){i=+i
|
|
7709
|
+
const o=(t=+t)<(e=+e),n=o?Kk(t,e,i):Kk(e,t,i)
|
|
7677
7710
|
return(o?-1:1)*(n<0?1/-n:n)}(e,t,i)
|
|
7678
|
-
switch((o=
|
|
7679
|
-
return null!=o.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(
|
|
7680
|
-
case"":case"e":case"g":case"p":case"r":null!=o.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,
|
|
7711
|
+
switch((o=fS(null==o?",f":o)).type){case"s":var r=Math.max(Math.abs(e),Math.abs(t))
|
|
7712
|
+
return null!=o.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(pS(t)/3)))-pS(Math.abs(e)))}(s,r))||(o.precision=n),CS(o,r)
|
|
7713
|
+
case"":case"e":case"g":case"p":case"r":null!=o.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,pS(t)-pS(e))+1}(s,Math.max(Math.abs(e),Math.abs(t))))||(o.precision=n-("e"===o.type))
|
|
7681
7714
|
break
|
|
7682
|
-
case"f":case"%":null!=o.precision||isNaN(n=function(e){return Math.max(0,-
|
|
7715
|
+
case"f":case"%":null!=o.precision||isNaN(n=function(e){return Math.max(0,-pS(Math.abs(e)))}(s))||(o.precision=n-2*("%"===o.type))}return $S(o)}function RS(e){var t=e.domain
|
|
7683
7716
|
return e.ticks=function(e){var i=t()
|
|
7684
7717
|
return function(e,t,i){if(!((i=+i)>0))return[]
|
|
7685
7718
|
if((e=+e)==(t=+t))return[e]
|
|
7686
|
-
const o=t<e,[n,s,r]=o?
|
|
7719
|
+
const o=t<e,[n,s,r]=o?Xk(t,e,i):Xk(e,t,i)
|
|
7687
7720
|
if(!(s>=n))return[]
|
|
7688
7721
|
const a=s-n+1,l=new Array(a)
|
|
7689
7722
|
if(o)if(r<0)for(let e=0;e<a;++e)l[e]=(s-e)/-r
|
|
@@ -7691,85 +7724,85 @@ else for(let e=0;e<a;++e)l[e]=(s-e)*r
|
|
|
7691
7724
|
else if(r<0)for(let e=0;e<a;++e)l[e]=(n+e)/-r
|
|
7692
7725
|
else for(let e=0;e<a;++e)l[e]=(n+e)*r
|
|
7693
7726
|
return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var o=t()
|
|
7694
|
-
return
|
|
7727
|
+
return IS(o[0],o[o.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10)
|
|
7695
7728
|
var o,n,s=t(),r=0,a=s.length-1,l=s[r],c=s[a],d=10
|
|
7696
|
-
for(c<l&&(n=l,l=c,c=n,n=r,r=a,a=n);d-- >0;){if((n=
|
|
7729
|
+
for(c<l&&(n=l,l=c,c=n,n=r,r=a,a=n);d-- >0;){if((n=Kk(l,c,i))===o)return s[r]=l,s[a]=c,t(s)
|
|
7697
7730
|
if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n
|
|
7698
7731
|
else{if(!(n<0))break
|
|
7699
|
-
l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}o=n}return e},e}function
|
|
7700
|
-
return e.copy=function(){return
|
|
7732
|
+
l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}o=n}return e},e}function MS(){var e=hS()
|
|
7733
|
+
return e.copy=function(){return cS(e,MS())},Jk.apply(e,arguments),RS(e)}function AS(){var e,t=[],i=[],o=[]
|
|
7701
7734
|
function n(){var e=0,n=Math.max(1,i.length)
|
|
7702
|
-
for(o=new Array(n-1);++e<n;)o[e-1]=
|
|
7703
|
-
return s}function s(t){return null==t||isNaN(t=+t)?e:i[
|
|
7735
|
+
for(o=new Array(n-1);++e<n;)o[e-1]=Yk(t,e/n)
|
|
7736
|
+
return s}function s(t){return null==t||isNaN(t=+t)?e:i[Nk(o,t)]}return s.invertExtent=function(e){var n=i.indexOf(e)
|
|
7704
7737
|
return n<0?[NaN,NaN]:[n>0?o[n-1]:t[0],n<o.length?o[n]:t[t.length-1]]},s.domain=function(e){if(!arguments.length)return t.slice()
|
|
7705
7738
|
t=[]
|
|
7706
7739
|
for(let i of e)null==i||isNaN(i=+i)||t.push(i)
|
|
7707
|
-
return t.sort(
|
|
7708
|
-
const
|
|
7709
|
-
class
|
|
7740
|
+
return t.sort(Pk),n()},s.range=function(e){return arguments.length?(i=Array.from(e),n()):i.slice()},s.unknown=function(t){return arguments.length?(e=t,s):e},s.quantiles=function(){return o.slice()},s.copy=function(){return AS().domain(t).range(i).unknown(e)},Jk.apply(s,arguments)}yS=_S({thousands:",",grouping:[3],currency:["$",""]}),$S=yS.format,CS=yS.formatPrefix
|
|
7741
|
+
const OS="bottom-left",ES="bottom-right",VS="top-left",FS="top-right",HS="top",PS="show",TS="hide",LS="linear",DS="ordinal"
|
|
7742
|
+
class zS{constructor(e){this.defaultPadding=0,this.baseMarginPercentage=.04
|
|
7710
7743
|
const t={width:e.canvasWidth,height:e.canvasHeight},i=this.calculateGridDimensions(e.dies),o=Math.min(t.width,t.height),n={top:(t.height-o)/2,right:(t.width-o)/2,bottom:(t.height-o)/2,left:(t.width-o)/2},s={top:o*this.baseMarginPercentage,right:o*this.baseMarginPercentage,bottom:o*this.baseMarginPercentage,left:o*this.baseMarginPercentage}
|
|
7711
7744
|
this.margin=this.calculateMarginAddition(s,n),this.containerDimensions=this.calculateContainerDimensions(t,this.margin)
|
|
7712
7745
|
const r=Math.min(this.containerDimensions.width,this.containerDimensions.height)
|
|
7713
7746
|
this.horizontalScale=this.createHorizontalScale(e.quadrant,i,r),this.invertedHorizontalScale=this.createInvertedHorizontalScale(e.quadrant,i,r),this.verticalScale=this.createVerticalScale(e.quadrant,i,r),this.invertedVerticalScale=this.createInvertedVerticalScale(e.quadrant,i,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}
|
|
7714
7747
|
const t={x:e[0].x,y:e[0].y},i={x:e[0].x,y:e[0].y}
|
|
7715
7748
|
for(const o of e)o.x<t.x&&(t.x=o.x),o.y<t.y&&(t.y=o.y),o.x>i.x&&(i.x=o.x),o.y>i.y&&(i.y=o.y)
|
|
7716
|
-
return{origin:t,rows:i.y-t.y+1,cols:i.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,i){const o=
|
|
7717
|
-
return e===
|
|
7718
|
-
return e===
|
|
7719
|
-
return e===
|
|
7720
|
-
return e===
|
|
7749
|
+
return{origin:t,rows:i.y-t.y+1,cols:i.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,i){const o=iS().domain(Qk(t.origin.x,t.origin.x+t.cols)).paddingInner(0).paddingOuter(0).align(0).round(!1)
|
|
7750
|
+
return e===OS||e===VS?o.range([0,i]):o.range([i,0])}createInvertedHorizontalScale(e,t,i){const o=AS().domain([0,i])
|
|
7751
|
+
return e===OS||e===VS?o.range(Qk(t.origin.x,t.origin.x+t.cols)):o.range(Qk(t.origin.x,t.origin.x+t.cols).reverse())}createVerticalScale(e,t,i){const o=iS().domain(Qk(t.origin.y,t.origin.y+t.rows)).paddingInner(this.defaultPadding).paddingOuter(0).align(0).round(!1)
|
|
7752
|
+
return e===OS||e===ES?o.range([i,0]):o.range([0,i])}createInvertedVerticalScale(e,t,i){const o=AS().domain([0,i])
|
|
7753
|
+
return e===OS||e===ES?o.range(Qk(t.origin.y,t.origin.y+t.rows).reverse()):o.range(Qk(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 BS{constructor(e,t,i,o,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(o,e.maxCharacters),this.diesRenderInfo=[]
|
|
7721
7754
|
for(const o of e.dies){const s=t(o.x)??0,r=i(o.y)??0
|
|
7722
|
-
this.diesRenderInfo.push({x:s+n.right,y:r+n.top,fillStyle:this.calculateFillStyle(o.value,e.colorScaleMode,e.highlightedValues),text:this.buildLabel(o.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)?
|
|
7755
|
+
this.diesRenderInfo.push({x:s+n.right,y:r+n.top,fillStyle:this.calculateFillStyle(o.value,e.colorScaleMode,e.highlightedValues),text:this.buildLabel(o.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)?MS().domain(e.values.map((e=>+e))).range(e.colors):tS().domain(e.values).range(e.colors)}dieHasData(e){return null!=e&&""!==e}buildLabel(e,t,i,o){if(i||!this.dieHasData(e))return""
|
|
7723
7756
|
const n=`${e}${o}`
|
|
7724
|
-
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===
|
|
7757
|
+
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===LS}isColorScaleOrdinal(e){return e===DS}calculateFillStyle(e,t,i){let o=this.emptyDieColor
|
|
7725
7758
|
if(this.dieHasData(e)&&(isNaN(+e)?o=this.nanDieColor:this.isColorScaleLinear(t)?o=this.d3ColorScale(+e):this.isColorScaleOrdinal(t)&&(o=this.d3ColorScale(e))),void 0===o)return this.emptyDieColor
|
|
7726
7759
|
let n=Fn(o)
|
|
7727
|
-
return null===n?this.emptyDieColor:(n=new _n(n.r,n.g,n.b,this.calculateOpacity(e,i)),n.toStringWebRGBA())}}class
|
|
7760
|
+
return null===n?this.emptyDieColor:(n=new _n(n.r,n.g,n.b,this.calculateOpacity(e,i)),n.toStringWebRGBA())}}class NS{constructor(e){this.computations=new zS(e),this.prerendering=new BS(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 ZS{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?TS:PS,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),i=this.wafermap.transform.apply([e+this.wafermap.dataManager.margin.left,t+this.wafermap.dataManager.margin.top])
|
|
7728
7761
|
return`translate(${i[0]}, ${i[1]})`}return""}renderDies(){let e
|
|
7729
7762
|
this.dies.sort(((e,t)=>e.fillStyle>t.fillStyle?1:t.fillStyle>e.fillStyle?-1:0))
|
|
7730
7763
|
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
|
|
7731
7764
|
this.wafermap.canvasContext.font=`${t.toString()}px sans-serif`,this.wafermap.canvasContext.fillStyle="#ffffff",this.wafermap.canvasContext.textAlign="center",this.wafermap.canvasContext.lineCap="butt"
|
|
7732
7765
|
const i=this.wafermap.canvasContext.measureText("M")
|
|
7733
|
-
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+i.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
|
|
7734
|
-
t.k===this.minScale?(this.zoomTransform
|
|
7735
|
-
function f(e){e.property("__zoom",
|
|
7736
|
-
return o===e.x&&n===e.y?e:new
|
|
7766
|
+
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+i.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 qS{constructor(e){this.wafermap=e,this.zoomTransform=kk,this.minScale=1.1,this.minExtentPoint=[-100,-100],this.extentPadding=100,this.zoomBehavior=this.createZoomBehavior(),this.zoomBehavior(l$(this.wafermap.canvas))}rescale(e){const t=e.transform
|
|
7767
|
+
t.k===this.minScale?(this.zoomTransform=kk,this.zoomBehavior.transform(l$(this.wafermap.canvas),kk)):this.zoomTransform=t,this.wafermap.transform=this.zoomTransform}createZoomBehavior(){const e=function(){var e,t,i,o=Rk,n=Mk,s=Vk,r=Ok,a=Ek,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,h=wC,u=Zx("start","zoom","end"),p=500,g=0,v=10
|
|
7768
|
+
function f(e){e.property("__zoom",Ak).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 m(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new Ck(t,e.x,e.y)}function b(e,t,i){var o=t[0]-i[0]*e.k,n=t[1]-i[1]*e.k
|
|
7769
|
+
return o===e.x&&n===e.y?e:new Ck(e.k,o,n)}function w(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function x(e,t,i,o){e.on("start.zoom",(function(){y(this,arguments).event(o).start()})).on("interrupt.zoom end.zoom",(function(){y(this,arguments).event(o).end()})).tween("zoom",(function(){var e=this,s=arguments,r=y(e,s).event(o),a=n.apply(e,s),l=null==i?w(a):"function"==typeof i?i.apply(e,s):i,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))
|
|
7737
7770
|
return function(e){if(1===e)e=u
|
|
7738
7771
|
else{var t=p(e),i=c/t[2]
|
|
7739
|
-
e=new
|
|
7772
|
+
e=new Ck(i,l[0]-t[0]*i,l[1]-t[1]*i)}r.zoom(null,e)}}))}function y(e,t,i){return!i&&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(o.apply(this,arguments)){var i=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=c$(e)
|
|
7740
7773
|
if(i.wheel)i.mouse[0][0]===d[0]&&i.mouse[0][1]===d[1]||(i.mouse[1]=n.invert(i.mouse[0]=d)),clearTimeout(i.wheel)
|
|
7741
7774
|
else{if(n.k===a)return
|
|
7742
|
-
i.mouse=[d,n.invert(d)],
|
|
7743
|
-
|
|
7744
|
-
r.moved=t*t+i*i>g}r.event(e).zoom("mouse",s(b(r.that.__zoom,r.mouse[0]=
|
|
7745
|
-
|
|
7746
|
-
for(
|
|
7747
|
-
e&&(e=clearTimeout(e)),s&&(h.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),p)),
|
|
7748
|
-
for(
|
|
7775
|
+
i.mouse=[d,n.invert(d)],NC(this),i.start()}Ik(e),i.wheel=setTimeout(h,150),i.zoom("mouse",s(b(m(n,a),i.mouse[0],i.mouse[1]),i.extent,c))}function h(){i.wheel=null,i.end()}}function k(e,...t){if(!i&&o.apply(this,arguments)){var n=e.currentTarget,r=y(this,t,!0).event(e),a=l$(e.view).on("mousemove.zoom",u,!0).on("mouseup.zoom",p,!0),l=c$(e,n),d=e.clientX,h=e.clientY
|
|
7776
|
+
u$(e.view),_k(e),r.mouse=[l,this.__zoom.invert(l)],NC(this),r.start()}function u(e){if(Ik(e),!r.moved){var t=e.clientX-d,i=e.clientY-h
|
|
7777
|
+
r.moved=t*t+i*i>g}r.event(e).zoom("mouse",s(b(r.that.__zoom,r.mouse[0]=c$(e,n),r.mouse[1]),r.extent,c))}function p(e){a.on("mousemove.zoom mouseup.zoom",null),p$(e.view,r.moved),Ik(e),r.event(e).end()}}function S(e,...t){if(o.apply(this,arguments)){var i=this.__zoom,r=c$(e.changedTouches?e.changedTouches[0]:e,this),a=i.invert(r),l=i.k*(e.shiftKey?.5:2),h=s(b(m(i,l),r,a),n.apply(this,t),c)
|
|
7778
|
+
Ik(e),d>0?l$(this).transition().duration(d).call(x,h,r,e):l$(this).call(f.transform,h,r,e)}}function _(i,...n){if(o.apply(this,arguments)){var s,r,a,l,c=i.touches,d=c.length,h=y(this,n,i.changedTouches.length===d).event(i)
|
|
7779
|
+
for(_k(i),r=0;r<d;++r)l=[l=c$(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)
|
|
7780
|
+
e&&(e=clearTimeout(e)),s&&(h.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),p)),NC(this),h.start())}}function I(e,...t){if(this.__zooming){var i,o,n,r,a=y(this,t).event(e),l=e.changedTouches,d=l.length
|
|
7781
|
+
for(Ik(e),i=0;i<d;++i)n=c$(o=l[i],this),a.touch0&&a.touch0[2]===o.identifier?a.touch0[0]=n:a.touch1&&a.touch1[2]===o.identifier&&(a.touch1[0]=n)
|
|
7749
7782
|
if(o=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,f=(f=g[0]-u[0])*f+(f=g[1]-u[1])*f
|
|
7750
7783
|
o=m(o,Math.sqrt(v/f)),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
|
|
7751
7784
|
n=a.touch0[0],r=a.touch0[1]}a.zoom("touch",s(b(o,n,r),a.extent,c))}}function R(e,...o){if(this.__zooming){var n,s,r=y(this,o).event(e),a=e.changedTouches,l=a.length
|
|
7752
|
-
for(
|
|
7785
|
+
for(_k(e),i&&clearTimeout(i),i=setTimeout((function(){i=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
|
|
7753
7786
|
if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0])
|
|
7754
|
-
else if(r.end(),2===r.taps&&(s=
|
|
7787
|
+
else if(r.end(),2===r.taps&&(s=c$(s,this),Math.hypot(t[0]-s[0],t[1]-s[1])<v)){var c=l$(this).on("dblclick.zoom")
|
|
7755
7788
|
c&&c.apply(this,arguments)}}}return f.transform=function(e,t,i,o){var n=e.selection?e.selection():e
|
|
7756
|
-
n.property("__zoom",
|
|
7789
|
+
n.property("__zoom",Ak),e!==n?x(e,t,i,o):n.interrupt().each((function(){y(this,arguments).event(o).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()}))},f.scaleBy=function(e,t,i,o){f.scaleTo(e,(function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)}),i,o)},f.scaleTo=function(e,t,i,o){f.transform(e,(function(){var e=n.apply(this,arguments),o=this.__zoom,r=null==i?w(e):"function"==typeof i?i.apply(this,arguments):i,a=o.invert(r),l="function"==typeof t?t.apply(this,arguments):t
|
|
7757
7790
|
return s(b(m(o,l),r,a),e,c)}),i,o)},f.translateBy=function(e,t,i,o){f.transform(e,(function(){return s(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof i?i.apply(this,arguments):i),n.apply(this,arguments),c)}),null,o)},f.translateTo=function(e,t,i,o,r){f.transform(e,(function(){var e=n.apply(this,arguments),r=this.__zoom,a=null==o?w(e):"function"==typeof o?o.apply(this,arguments):o
|
|
7758
|
-
return s(
|
|
7759
|
-
u.call(e,this.that,new
|
|
7760
|
-
return e===u?f:e},f.clickDistance=function(e){return arguments.length?(g=(e=+e)*e,f):Math.sqrt(g)},f.tapDistance=function(e){return arguments.length?(v=+e,f):v},f}().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=>
|
|
7761
|
-
return e}getZoomMax(e,t){return Math.ceil(t/e*100)}}class
|
|
7791
|
+
return s(kk.translate(a[0],a[1]).scale(r.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof i?-i.apply(this,arguments):-i),e,c)}),o,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=l$(this.that).datum()
|
|
7792
|
+
u.call(e,this.that,new $k(e,{sourceEvent:this.sourceEvent,target:f,type:e,transform:this.that.__zoom,dispatch:u}),t)}},f.wheelDelta=function(e){return arguments.length?(r="function"==typeof e?e:yk(+e),f):r},f.filter=function(e){return arguments.length?(o="function"==typeof e?e:yk(!!e),f):o},f.touchable=function(e){return arguments.length?(a="function"==typeof e?e:yk(!!e),f):a},f.extent=function(e){return arguments.length?(n="function"==typeof e?e:yk([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),f):n},f.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],f):[l[0],l[1]]},f.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],f):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},f.constrain=function(e){return arguments.length?(s=e,f):s},f.duration=function(e){return arguments.length?(d=+e,f):d},f.interpolate=function(e){return arguments.length?(h=e,f):h},f.on=function(){var e=u.on.apply(u,arguments)
|
|
7793
|
+
return e===u?f:e},f.clickDistance=function(e){return arguments.length?(g=(e=+e)*e,f):Math.sqrt(g)},f.tapDistance=function(e){return arguments.length?(v=+e,f):v},f}().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=>Sk(this.wafermap.canvas).k>=this.minScale||"wheel"===e.type)).on("zoom",(e=>{this.rescale(e)}))
|
|
7794
|
+
return e}getZoomMax(e,t){return Math.ceil(t/e*100)}}class jS{constructor(e){this.wafermap=e}mousemove(e){const t={x:e.offsetX,y:e.offsetY}
|
|
7762
7795
|
if(!this.hoversOverDie(t))return void(this.wafermap.hoverDie=void 0)
|
|
7763
7796
|
const i=this.wafermap.transform.invert([t.x,t.y]),o=this.calculateDieCoordinates({x:i[0],y:i[1]})
|
|
7764
|
-
this.wafermap.hoverDie=this.wafermap.dataManager.getWaferMapDie(o)}mouseout(e){this.wafermap.hoverDie=void 0}calculateDieCoordinates(e){const t=this.wafermap.quadrant,i=t===
|
|
7797
|
+
this.wafermap.hoverDie=this.wafermap.dataManager.getWaferMapDie(o)}mouseout(e){this.wafermap.hoverDie=void 0}calculateDieCoordinates(e){const t=this.wafermap.quadrant,i=t===OS||t===VS?Math.floor:Math.ceil,o=t===VS||t===FS?Math.floor:Math.ceil
|
|
7765
7798
|
return{x:i(this.wafermap.dataManager.invertedHorizontalScale(e.x-this.wafermap.dataManager.margin.left)),y:o(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
|
|
7766
7799
|
let i=0
|
|
7767
7800
|
for(const e of t)i+=e
|
|
7768
|
-
return i>0}}class
|
|
7801
|
+
return i>0}}class US{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 qS(e),this.hoverHandler=new jS(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 GS extends _t{constructor(){super(...arguments),this.quadrant=VS,this.orientation=HS,this.maxCharacters=4,this.dieLabelsHidden=!1,this.dieLabelsSuffix="",this.colorScaleMode=LS,this.renderQueued=!1,this.transform=kk,this.hoverTransform="",this.hoverOpacity=TS,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 NS(this),this.renderer=new ZS(this),this.eventCoordinator=new US(this)}createResizeObserver(){const e=new ResizeObserver((e=>{const t=e[0]
|
|
7769
7802
|
if(void 0===t)return
|
|
7770
7803
|
const{height:i,width:o}=t.contentRect
|
|
7771
7804
|
this.canvas.width=o,this.canvas.height=i,this.canvasWidth=o,this.canvasHeight=i}))
|
|
7772
|
-
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],
|
|
7773
|
-
const
|
|
7774
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
7805
|
+
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],GS.prototype,"quadrant",void 0),e([ne],GS.prototype,"orientation",void 0),e([ne({attribute:"max-characters",converter:ie})],GS.prototype,"maxCharacters",void 0),e([ne({attribute:"die-labels-hidden",mode:"boolean"})],GS.prototype,"dieLabelsHidden",void 0),e([ne({attribute:"die-labels-suffix"})],GS.prototype,"dieLabelsSuffix",void 0),e([ne({attribute:"color-scale-mode"})],GS.prototype,"colorScaleMode",void 0),e([f],GS.prototype,"canvasWidth",void 0),e([f],GS.prototype,"canvasHeight",void 0),e([f],GS.prototype,"transform",void 0),e([f],GS.prototype,"hoverTransform",void 0),e([f],GS.prototype,"hoverOpacity",void 0),e([f],GS.prototype,"hoverWidth",void 0),e([f],GS.prototype,"hoverHeight",void 0),e([f],GS.prototype,"hoverDie",void 0),e([f],GS.prototype,"highlightedValues",void 0),e([f],GS.prototype,"dies",void 0),e([f],GS.prototype,"colorScale",void 0)
|
|
7806
|
+
const WS=GS.compose({baseName:"wafer-map",template:Fk,styles:Hk})
|
|
7807
|
+
no.getOrCreate().withPrefix("nimble").register(WS()),no.tagFor(GS)}()
|
|
7775
7808
|
//# sourceMappingURL=all-components-bundle.min.js.map
|