@ni/nimble-components 21.6.6 → 21.6.8
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 +46 -66
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +378 -374
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/dialog/index.d.ts +1 -10
- package/dist/esm/dialog/index.js.map +1 -1
- package/dist/esm/drawer/index.d.ts +1 -2
- package/dist/esm/drawer/index.js.map +1 -1
- package/dist/esm/spinner/styles.js +9 -2
- package/dist/esm/spinner/styles.js.map +1 -1
- package/dist/esm/spinner/template.js +11 -0
- package/dist/esm/spinner/template.js.map +1 -1
- package/dist/esm/utilities/unit-format/decimal-unit-format.d.ts +0 -2
- package/dist/esm/utilities/unit-format/decimal-unit-format.js +6 -11
- package/dist/esm/utilities/unit-format/decimal-unit-format.js.map +1 -1
- package/dist/esm/utilities/unit-format/default-unit-format.d.ts +0 -3
- package/dist/esm/utilities/unit-format/default-unit-format.js +20 -52
- package/dist/esm/utilities/unit-format/default-unit-format.js.map +1 -1
- package/package.json +1 -1
|
@@ -9007,16 +9007,22 @@ const aT=sT.compose({baseName:"select",baseClass:Ji,template:(e,t)=>Z`
|
|
|
9007
9007
|
`})
|
|
9008
9008
|
Ht(sT,Ye,Xi),bi.getOrCreate().withPrefix("nimble").register(aT())
|
|
9009
9009
|
const lT=we`
|
|
9010
|
-
${Oo("inline-
|
|
9010
|
+
${Oo("inline-grid")}
|
|
9011
9011
|
|
|
9012
9012
|
:host {
|
|
9013
9013
|
height: ${ml};
|
|
9014
9014
|
aspect-ratio: 1 / 1;
|
|
9015
9015
|
}
|
|
9016
9016
|
|
|
9017
|
+
div.overlay {
|
|
9018
|
+
z-index: ${$h};
|
|
9019
|
+
margin: max(2px, 6.25%);
|
|
9020
|
+
grid-area: 1/1;
|
|
9021
|
+
}
|
|
9022
|
+
|
|
9017
9023
|
div.container {
|
|
9018
9024
|
margin: max(2px, 6.25%);
|
|
9019
|
-
|
|
9025
|
+
grid-area: 1/1;
|
|
9020
9026
|
${""}
|
|
9021
9027
|
opacity: 0.6;
|
|
9022
9028
|
}
|
|
@@ -9160,6 +9166,9 @@ const lT=we`
|
|
|
9160
9166
|
}
|
|
9161
9167
|
`)),cT=Z`
|
|
9162
9168
|
<template role="progressbar">
|
|
9169
|
+
${""}
|
|
9170
|
+
<div class="overlay"></div>
|
|
9171
|
+
|
|
9163
9172
|
<div class="container">
|
|
9164
9173
|
<div class="bit1"></div>
|
|
9165
9174
|
<div class="bit2"></div>
|
|
@@ -11197,43 +11206,38 @@ this.supportedScaledUnits=e,this.baseScaledUnit=n}scaleNumber(e){const t=Math.ab
|
|
|
11197
11206
|
if(1===this.supportedScaledUnits.length||0===t||t===1/0||Number.isNaN(t))return{scaledValue:e,scaledUnit:this.baseScaledUnit}
|
|
11198
11207
|
for(let n=this.supportedScaledUnits.length-1;n>=0;n-=1){const i=this.supportedScaledUnits[n]
|
|
11199
11208
|
if(t/i.scaleFactor>=1)return{scaledValue:e/i.scaleFactor,scaledUnit:i}}const n=this.supportedScaledUnits[0]
|
|
11200
|
-
return{scaledValue:e/n.scaleFactor,scaledUnit:n}}}const zN=new class extends LN{constructor(){super([new PN(1,NN.createFactory({}))])}}
|
|
11201
|
-
class
|
|
11202
|
-
for(const n of t.supportedScaledUnits)this.defaultScaledUnitFormatters.set(n.scaleFactor,n.scaledUnitFormatFactory({locale:e,intlNumberFormatOptions:this.defaultIntlNumberFormatOptions}))
|
|
11203
|
-
this.exponentialScaledUnitFormatter=t.baseScaledUnit.scaledUnitFormatFactory({locale:e,intlNumberFormatOptions:this.exponentialIntlNumberFormatOptions}),this.unitScale=t}resolvedOptions(){return{unitScale:this.unitScale}}tryFormat(e){const
|
|
11204
|
-
|
|
11205
|
-
|
|
11206
|
-
|
|
11207
|
-
default:throw new Error("Unexpected number format style")}}resolveNumberStyle(e){if(0===e)return"default"
|
|
11208
|
-
const t=Math.abs(e)
|
|
11209
|
-
return t>=FN.exponentialUpperBound||t<FN.exponentialLowerBound?"exponential":t<1?"leadingZero":"default"}}FN.maximumDigits=6,FN.exponentialLowerBound=995e-6,FN.exponentialUpperBound=999999.5
|
|
11210
|
-
class VN extends RN{constructor(e,{minimumFractionDigits:t=0,maximumFractionDigits:n=Math.max(3,t),unitScale:i=zN}={minimumFractionDigits:0,maximumFractionDigits:3,unitScale:zN}){super(),this.scaledUnitFormatters=new Map
|
|
11211
|
-
const o={maximumFractionDigits:n,minimumFractionDigits:t,useGrouping:!0}
|
|
11209
|
+
return{scaledValue:e/n.scaleFactor,scaledUnit:n}}}const zN=new class extends LN{constructor(){super([new PN(1,NN.createFactory({}))])}},FN="negative"
|
|
11210
|
+
class VN extends RN{constructor(e,{unitScale:t=zN}={unitScale:zN}){super(),this.defaultIntlNumberFormatOptions={maximumSignificantDigits:VN.maximumDigits,maximumFractionDigits:VN.maximumDigits-1,roundingPriority:"lessPrecision",signDisplay:FN},this.defaultScaledUnitFormatters=new Map,this.exponentialIntlNumberFormatOptions={maximumSignificantDigits:VN.maximumDigits,notation:"scientific",signDisplay:FN}
|
|
11211
|
+
for(const n of t.supportedScaledUnits)this.defaultScaledUnitFormatters.set(n.scaleFactor,n.scaledUnitFormatFactory({locale:e,intlNumberFormatOptions:this.defaultIntlNumberFormatOptions}))
|
|
11212
|
+
this.exponentialScaledUnitFormatter=t.baseScaledUnit.scaledUnitFormatFactory({locale:e,intlNumberFormatOptions:this.exponentialIntlNumberFormatOptions}),this.unitScale=t}resolvedOptions(){return{unitScale:this.unitScale}}tryFormat(e){const{scaledValue:t,scaledUnit:n}=this.unitScale.scaleNumber(e),i=Math.abs(t)
|
|
11213
|
+
return 0!==i&&(i>=VN.exponentialUpperBound||i<VN.exponentialLowerBound)?this.exponentialScaledUnitFormatter.format(e):this.defaultScaledUnitFormatters.get(n.scaleFactor).format(t)}}VN.maximumDigits=6,VN.exponentialLowerBound=995e-6,VN.exponentialUpperBound=999999.5
|
|
11214
|
+
class HN extends RN{constructor(e,{minimumFractionDigits:t=0,maximumFractionDigits:n=Math.max(3,t),unitScale:i=zN}={minimumFractionDigits:0,maximumFractionDigits:3,unitScale:zN}){super(),this.scaledUnitFormatters=new Map
|
|
11215
|
+
const o={maximumFractionDigits:n,minimumFractionDigits:t,signDisplay:"negative"}
|
|
11212
11216
|
for(const t of i.supportedScaledUnits)this.scaledUnitFormatters.set(t.scaleFactor,t.scaledUnitFormatFactory({locale:e,intlNumberFormatOptions:o}))
|
|
11213
|
-
this.
|
|
11214
|
-
return this.scaledUnitFormatters.get(n.scaleFactor).format(
|
|
11217
|
+
this.unitScale=i,this.minimumFractionDigits=t,this.maximumFractionDigits=n}resolvedOptions(){return{unitScale:this.unitScale,maximumFractionDigits:this.maximumFractionDigits,minimumFractionDigits:this.minimumFractionDigits}}tryFormat(e){const{scaledValue:t,scaledUnit:n}=this.unitScale.scaleNumber(e)
|
|
11218
|
+
return this.scaledUnitFormatters.get(n.scaleFactor).format(t)}}class BN extends RN{constructor(e,t){super(),this._resolvedOptions=this.resolveOptions(t),this.resolvedUnitFormat=this.resolveUnitFormat(e,this._resolvedOptions)}resolvedOptions(){return{...this._resolvedOptions}}optionsMatch(e){const t=this.resolveOptions(e)
|
|
11215
11219
|
return this._resolvedOptions.decimalDigits===t.decimalDigits&&this._resolvedOptions.decimalMaximumDigits===t.decimalMaximumDigits&&this._resolvedOptions.numberTextFormat===t.numberTextFormat&&this._resolvedOptions.unitScale===t.unitScale}tryFormat(e){return this.resolvedUnitFormat.format(e)}resolveUnitFormat(e,t){const{numberTextFormat:n,decimalMaximumDigits:i,decimalDigits:o,unitScale:r}=t
|
|
11216
|
-
return n===AN.default?new
|
|
11220
|
+
return n===AN.default?new VN(e,{unitScale:r}):new HN(e,"number"==typeof o?{minimumFractionDigits:o,maximumFractionDigits:o,unitScale:r}:{minimumFractionDigits:0,maximumFractionDigits:i,unitScale:r})}resolveOptions(e){if(!e||e.numberTextFormat===AN.default)return{numberTextFormat:AN.default,decimalDigits:void 0,decimalMaximumDigits:void 0,unitScale:e?.unitScale??zN}
|
|
11217
11221
|
const t="number"==typeof e.decimalDigits,n="number"==typeof e.decimalMaximumDigits
|
|
11218
11222
|
if(t&&n)throw new Error("decimalDigits and decimalMaximumDigits are mutually exclusive. Do not specify both.")
|
|
11219
|
-
return t||n?{numberTextFormat:AN.decimal,decimalDigits:e.decimalDigits,decimalMaximumDigits:e.decimalMaximumDigits,unitScale:e.unitScale??zN}:{numberTextFormat:AN.decimal,decimalDigits:
|
|
11220
|
-
const
|
|
11221
|
-
class
|
|
11223
|
+
return t||n?{numberTextFormat:AN.decimal,decimalDigits:e.decimalDigits,decimalMaximumDigits:e.decimalMaximumDigits,unitScale:e.unitScale??zN}:{numberTextFormat:AN.decimal,decimalDigits:BN.defaultDecimalDigits,decimalMaximumDigits:void 0,unitScale:e.unitScale??zN}}}BN.defaultDecimalDigits=2
|
|
11224
|
+
const qN=["invalidDecimalDigits","invalidDecimalMaximumDigits","decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits","moreThanOneUnitSpecified"]
|
|
11225
|
+
class jN extends iN{constructor(e){super(e,qN)}validateDecimalDigits(e,t){const n=!!(e===AN.decimal&&"number"==typeof t)&&this.isInvalidDecimalDigitsValue(t)
|
|
11222
11226
|
this.setConditionValue("invalidDecimalDigits",n)}validateDecimalMaximumDigits(e,t){const n=!!(e===AN.decimal&&"number"==typeof t)&&this.isInvalidDecimalDigitsValue(t)
|
|
11223
11227
|
this.setConditionValue("invalidDecimalMaximumDigits",n)}validateNoMutuallyExclusiveProperties(e,t,n){const i=!!(e===AN.decimal)&&("number"==typeof t&&"number"==typeof n)
|
|
11224
11228
|
this.setConditionValue("decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits",i)}validateAtMostOneUnit(e){const t=e.length>1
|
|
11225
|
-
this.setConditionValue("moreThanOneUnitSpecified",t)}isInvalidDecimalDigitsValue(e){return e<0||e>20}}class
|
|
11226
|
-
class
|
|
11227
|
-
e.subscribe(this.unitSubscriber,"resolvedUnitScale"),this.unitNotifier=e}}formatChanged(){this.updateColumnConfig()}alignmentChanged(){this.updateColumnConfig()}decimalDigitsChanged(){this.updateColumnConfig()}decimalMaximumDigitsChanged(){this.updateColumnConfig()}unitElementsChanged(){this.updateUnit()}async updateUnit(){this.unit=void 0,this.unitElements&&(await eI(this.unitElements),this.unit=this.unitElements.find((e=>e instanceof
|
|
11229
|
+
this.setConditionValue("moreThanOneUnitSpecified",t)}isInvalidDecimalDigitsValue(e){return e<0||e>20}}class UN extends zt{}e([g],UN.prototype,"resolvedUnitScale",void 0)
|
|
11230
|
+
class WN extends WD{constructor(){super(...arguments),this.validator=new jN(this.columnInternals),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}},this.unitSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Sa.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Sa.unsubscribe(this.langSubscriber,this)}get validity(){return this.validator.getValidity()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-number-text-cell-view",groupHeaderViewTag:"nimble-table-column-number-text-group-header-view",delegatedEvents:[],sortOperation:kR}}updateUnitNotifier(){if(this.unitNotifier&&(this.unitNotifier.unsubscribe(this.unitSubscriber),this.unitNotifier=void 0),this.unit){const e=m.getNotifier(this.unit)
|
|
11231
|
+
e.subscribe(this.unitSubscriber,"resolvedUnitScale"),this.unitNotifier=e}}formatChanged(){this.updateColumnConfig()}alignmentChanged(){this.updateColumnConfig()}decimalDigitsChanged(){this.updateColumnConfig()}decimalMaximumDigitsChanged(){this.updateColumnConfig()}unitElementsChanged(){this.updateUnit()}async updateUnit(){this.unit=void 0,this.unitElements&&(await eI(this.unitElements),this.unit=this.unitElements.find((e=>e instanceof UN))),this.updateUnitNotifier()}unitChanged(){this.updateColumnConfig()}updateColumnConfig(){if(this.validator.validateDecimalDigits(this.format,this.decimalDigits),this.validator.validateDecimalMaximumDigits(this.format,this.decimalMaximumDigits),this.validator.validateNoMutuallyExclusiveProperties(this.format,this.decimalDigits,this.decimalMaximumDigits),this.validator.validateAtMostOneUnit(this.unitElements??[]),this.validator.isValid()){const e={formatter:this.createFormatter(),alignment:this.determineCellContentAlignment()}
|
|
11228
11232
|
this.columnInternals.columnConfig=e}else this.columnInternals.columnConfig=void 0}createFormatter(){const e=this.unit?.resolvedUnitScale
|
|
11229
|
-
return new
|
|
11230
|
-
const WN
|
|
11231
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
11232
|
-
const
|
|
11233
|
-
class
|
|
11234
|
-
this.setConditionValue("invalidIconName",t)}validateNoMissingText(e){const t=e.filter(
|
|
11235
|
-
this.setConditionValue("missingTextValue",t)}validateMappingTypes(e){const t=e.every(
|
|
11236
|
-
this.setConditionValue("unsupportedMappingType",!t)}}const
|
|
11233
|
+
return new BN(Sa.getValueFor(this),{numberTextFormat:this.format??void 0,decimalDigits:this.decimalDigits??void 0,decimalMaximumDigits:this.decimalMaximumDigits??void 0,unitScale:e})}determineCellContentAlignment(){return this.alignment===ON?KD:this.alignment===TN?JD:this.format!==AN.decimal||"number"==typeof this.decimalMaximumDigits||this.unit?KD:JD}}e([se],WN.prototype,"format",void 0),e([se],WN.prototype,"alignment",void 0),e([se({attribute:"decimal-digits",converter:oe})],WN.prototype,"decimalDigits",void 0),e([se({attribute:"decimal-maximum-digits",converter:oe})],WN.prototype,"decimalMaximumDigits",void 0),e([g],WN.prototype,"unitElements",void 0),e([g],WN.prototype,"unit",void 0)
|
|
11234
|
+
const ZN=WN.compose({baseName:"table-column-number-text",template:_N,styles:OD})
|
|
11235
|
+
bi.getOrCreate().withPrefix("nimble").register(ZN())
|
|
11236
|
+
const GN=[...vN,"unsupportedMappingType","invalidIconName","missingTextValue"]
|
|
11237
|
+
class KN extends bN{constructor(e){super(e,GN)}static isIconMappingElement(e){return e instanceof yv}static isSupportedMappingElement(e){return e instanceof yv||e instanceof kv}validate(e,t){super.validate(e,t),this.validateMappingTypes(e),this.validateIconNames(e),this.validateNoMissingText(e)}validateIconNames(e){const t=e.filter(KN.isIconMappingElement).some((e=>void 0===e.resolvedIcon))
|
|
11238
|
+
this.setConditionValue("invalidIconName",t)}validateNoMissingText(e){const t=e.filter(KN.isSupportedMappingElement).some((e=>void 0===e.text))
|
|
11239
|
+
this.setConditionValue("missingTextValue",t)}validateMappingTypes(e){const t=e.every(KN.isSupportedMappingElement)
|
|
11240
|
+
this.setConditionValue("unsupportedMappingType",!t)}}const JN=we`
|
|
11237
11241
|
${Oo("inline-flex")}
|
|
11238
11242
|
|
|
11239
11243
|
:host {
|
|
@@ -11253,7 +11257,7 @@ this.setConditionValue("unsupportedMappingType",!t)}}const KN=we`
|
|
|
11253
11257
|
overflow: hidden;
|
|
11254
11258
|
text-overflow: ellipsis;
|
|
11255
11259
|
}
|
|
11256
|
-
`,
|
|
11260
|
+
`,XN=Z`
|
|
11257
11261
|
${Fe((e=>"icon"===e.visual),Z`
|
|
11258
11262
|
${e=>e.iconTemplate}
|
|
11259
11263
|
<span
|
|
@@ -11272,7 +11276,7 @@ this.setConditionValue("unsupportedMappingType",!t)}}const KN=we`
|
|
|
11272
11276
|
>${e=>e.text}</span>
|
|
11273
11277
|
`)}
|
|
11274
11278
|
`
|
|
11275
|
-
class
|
|
11279
|
+
class YN extends xN{constructor(e,t,n){var i
|
|
11276
11280
|
super(n),this.severity=t,this.iconTemplate=Z`
|
|
11277
11281
|
<${i=e}
|
|
11278
11282
|
title="${e=>e.text}"
|
|
@@ -11281,14 +11285,14 @@ super(n),this.severity=t,this.iconTemplate=Z`
|
|
|
11281
11285
|
severity="${e=>e.severity}"
|
|
11282
11286
|
class="no-shrink"
|
|
11283
11287
|
>
|
|
11284
|
-
</${i}>`}}class
|
|
11288
|
+
</${i}>`}}class QN extends xN{constructor(e){super(e)}}class eP extends FD{columnConfigChanged(){this.updateState()}groupHeaderValueChanged(){this.updateState()}updateState(){if(this.visual=void 0,!this.columnConfig)return
|
|
11285
11289
|
const e=this.groupHeaderValue
|
|
11286
11290
|
if(null==e)return
|
|
11287
11291
|
const t=this.columnConfig.mappingConfigs.get(e)
|
|
11288
|
-
t instanceof
|
|
11289
|
-
const eP
|
|
11290
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
11291
|
-
const
|
|
11292
|
+
t instanceof YN?(this.visual="icon",this.severity=t.severity,this.text=t.text??"",this.iconTemplate=t.iconTemplate):t instanceof QN&&(this.visual="spinner",this.text=t.text??"")}}e([g],eP.prototype,"severity",void 0),e([g],eP.prototype,"iconTemplate",void 0),e([g],eP.prototype,"visual",void 0)
|
|
11293
|
+
const tP=eP.compose({baseName:"table-column-icon-group-header-view",template:XN,styles:JN})
|
|
11294
|
+
bi.getOrCreate().withPrefix("nimble").register(tP())
|
|
11295
|
+
const nP=Z`
|
|
11292
11296
|
${Fe((e=>"icon"===e.visual),(e=>e.iconTemplate))}
|
|
11293
11297
|
${Fe((e=>"spinner"===e.visual),Z`
|
|
11294
11298
|
<${pT}
|
|
@@ -11298,22 +11302,22 @@ const tP=Z`
|
|
|
11298
11302
|
</${pT}>
|
|
11299
11303
|
`)}
|
|
11300
11304
|
`
|
|
11301
|
-
class
|
|
11305
|
+
class iP extends MR{columnConfigChanged(){this.updateState()}cellRecordChanged(){this.updateState()}updateState(){if(this.visual=void 0,!this.columnConfig||!this.cellRecord)return
|
|
11302
11306
|
const e=this.cellRecord.value
|
|
11303
11307
|
if(null==e)return
|
|
11304
11308
|
const t=this.columnConfig.mappingConfigs.get(e)
|
|
11305
|
-
t instanceof
|
|
11306
|
-
const iP
|
|
11307
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
11308
|
-
class
|
|
11309
|
-
return new
|
|
11310
|
-
throw new Error("Unsupported mapping")}}const rP
|
|
11311
|
-
bi.getOrCreate().withPrefix("nimble").register(rP())
|
|
11312
|
-
const sP=class extends QD{cellRecordChanged(){this.text="string"==typeof this.cellRecord?.value?this.cellRecord.value:""}}.compose({baseName:"table-column-text-cell-view",template:XD,styles:YD})
|
|
11309
|
+
t instanceof YN?(this.visual="icon",this.severity=t.severity,this.text=t.text,this.iconTemplate=t.iconTemplate):t instanceof QN&&(this.visual="spinner",this.text=t.text)}}e([g],iP.prototype,"severity",void 0),e([g],iP.prototype,"text",void 0),e([g],iP.prototype,"iconTemplate",void 0),e([g],iP.prototype,"visual",void 0)
|
|
11310
|
+
const oP=iP.compose({baseName:"table-column-icon-cell-view",template:nP})
|
|
11311
|
+
bi.getOrCreate().withPrefix("nimble").register(oP())
|
|
11312
|
+
class rP extends(DD(RD(fN))){createValidator(){return new KN(this.columnInternals)}get validity(){return this.validator.getValidity()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-icon-cell-view",groupHeaderViewTag:"nimble-table-column-icon-group-header-view",delegatedEvents:[],sortOperation:kR}}createColumnConfig(e){return{mappingConfigs:e}}createMappingConfig(e){if(e instanceof yv){if(!e.resolvedIcon)throw Error("Unresolved icon")
|
|
11313
|
+
return new YN(e.resolvedIcon,e.severity,e.text)}if(e instanceof kv)return new QN(e.text)
|
|
11314
|
+
throw new Error("Unsupported mapping")}}const sP=rP.compose({baseName:"table-column-icon",template:gN,styles:mN})
|
|
11313
11315
|
bi.getOrCreate().withPrefix("nimble").register(sP())
|
|
11314
|
-
const aP=class extends
|
|
11316
|
+
const aP=class extends QD{cellRecordChanged(){this.text="string"==typeof this.cellRecord?.value?this.cellRecord.value:""}}.compose({baseName:"table-column-text-cell-view",template:XD,styles:YD})
|
|
11315
11317
|
bi.getOrCreate().withPrefix("nimble").register(aP())
|
|
11316
|
-
const lP=
|
|
11318
|
+
const lP=class extends WD{getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-text-cell-view",groupHeaderViewTag:qD,delegatedEvents:[],sortOperation:CR}}}.compose({baseName:"table-column-text",template:TD,styles:OD})
|
|
11319
|
+
bi.getOrCreate().withPrefix("nimble").register(lP())
|
|
11320
|
+
const cP=we`
|
|
11317
11321
|
${Oo("grid")}
|
|
11318
11322
|
|
|
11319
11323
|
:host {
|
|
@@ -11341,7 +11345,7 @@ const lP=we`
|
|
|
11341
11345
|
overflow: auto;
|
|
11342
11346
|
}
|
|
11343
11347
|
`
|
|
11344
|
-
const
|
|
11348
|
+
const dP=class extends oo{constructor(){super(),this.activeindicator=!1}}.compose({baseName:"tabs",baseClass:oo,template:(e,t)=>Z`
|
|
11345
11349
|
<template class="${e=>e.orientation}">
|
|
11346
11350
|
${et(0,t)}
|
|
11347
11351
|
<div class="tablist" part="tablist" role="tablist">
|
|
@@ -11360,9 +11364,9 @@ const cP=class extends oo{constructor(){super(),this.activeindicator=!1}}.compos
|
|
|
11360
11364
|
<slot name="tabpanel" ${Ke("tabpanels")}></slot>
|
|
11361
11365
|
</div>
|
|
11362
11366
|
</template>
|
|
11363
|
-
`,styles:
|
|
11364
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
11365
|
-
const
|
|
11367
|
+
`,styles:cP})
|
|
11368
|
+
bi.getOrCreate().withPrefix("nimble").register(dP())
|
|
11369
|
+
const hP=we`
|
|
11366
11370
|
${Oo("flex")}
|
|
11367
11371
|
|
|
11368
11372
|
:host {
|
|
@@ -11380,15 +11384,15 @@ const dP=we`
|
|
|
11380
11384
|
rgba(${za}, 0.3);
|
|
11381
11385
|
margin: ${ol} ${rl};
|
|
11382
11386
|
}
|
|
11383
|
-
`,
|
|
11387
|
+
`,uP=Z`
|
|
11384
11388
|
<template slot="end">
|
|
11385
11389
|
<div class="separator"></div>
|
|
11386
11390
|
<slot></slot>
|
|
11387
11391
|
</template>
|
|
11388
11392
|
`
|
|
11389
|
-
const
|
|
11390
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
11391
|
-
const
|
|
11393
|
+
const pP=class extends zt{}.compose({baseName:"tabs-toolbar",template:uP,styles:hP})
|
|
11394
|
+
bi.getOrCreate().withPrefix("nimble").register(pP())
|
|
11395
|
+
const fP="outline",mP="block",gP=we`
|
|
11392
11396
|
${Oo("inline-flex")}
|
|
11393
11397
|
${eg}
|
|
11394
11398
|
|
|
@@ -11528,12 +11532,12 @@ const pP="outline",fP="block",mP=we`
|
|
|
11528
11532
|
top: ${rl};
|
|
11529
11533
|
right: var(--ni-private-scrollbar-width);
|
|
11530
11534
|
}
|
|
11531
|
-
`.withBehaviors(oh(
|
|
11535
|
+
`.withBehaviors(oh(fP,we`
|
|
11532
11536
|
.control {
|
|
11533
11537
|
border-color: rgba(${za}, 0.3);
|
|
11534
11538
|
background-color: transparent;
|
|
11535
11539
|
}
|
|
11536
|
-
`),oh(
|
|
11540
|
+
`),oh(mP,we`
|
|
11537
11541
|
.control {
|
|
11538
11542
|
background-color: rgba(${za}, 0.1);
|
|
11539
11543
|
}
|
|
@@ -11551,8 +11555,8 @@ const pP="outline",fP="block",mP=we`
|
|
|
11551
11555
|
border-bottom-color: ${Fa};
|
|
11552
11556
|
}
|
|
11553
11557
|
`))
|
|
11554
|
-
class
|
|
11555
|
-
const vP
|
|
11558
|
+
class vP extends lo{constructor(){super(...arguments),this.appearance=fP,this.errorVisible=!1,this.scrollbarWidth=-1,this.updateScrollbarWidthQueued=!1}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver((()=>this.onResize())),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}onTextAreaInput(){this.handleTextInput(),this.queueUpdateScrollbarWidth()}placeholderChanged(){this.queueUpdateScrollbarWidth()}valueChanged(e,t){super.valueChanged(e,t),this.queueUpdateScrollbarWidth()}onResize(){this.scrollbarWidth=this.control.offsetWidth-this.control.clientWidth}queueUpdateScrollbarWidth(){this.$fastController.isConnected&&(this.updateScrollbarWidthQueued||(this.updateScrollbarWidthQueued=!0,u.queueUpdate((()=>this.updateScrollbarWidth()))))}updateScrollbarWidth(){this.updateScrollbarWidthQueued=!1,this.scrollbarWidth=this.control.offsetWidth-this.control.clientWidth}}e([se],vP.prototype,"appearance",void 0),e([se({attribute:"error-text"})],vP.prototype,"errorText",void 0),e([se({attribute:"error-visible",mode:"boolean"})],vP.prototype,"errorVisible",void 0),e([g],vP.prototype,"scrollbarWidth",void 0)
|
|
11559
|
+
const bP=vP.compose({baseName:"text-area",baseClass:lo,template:()=>Z`
|
|
11556
11560
|
<label
|
|
11557
11561
|
part="label"
|
|
11558
11562
|
for="control"
|
|
@@ -11609,9 +11613,9 @@ const vP=gP.compose({baseName:"text-area",baseClass:lo,template:()=>Z`
|
|
|
11609
11613
|
></${rm}>
|
|
11610
11614
|
${Zm}
|
|
11611
11615
|
</div>
|
|
11612
|
-
`,styles:
|
|
11613
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
11614
|
-
const
|
|
11616
|
+
`,styles:gP,shadowOptions:{delegatesFocus:!0}})
|
|
11617
|
+
bi.getOrCreate().withPrefix("nimble").register(bP())
|
|
11618
|
+
const wP="underline",yP="outline",xP="block",kP="frameless",CP=we`
|
|
11615
11619
|
${Oo("inline-block")}
|
|
11616
11620
|
${eg}
|
|
11617
11621
|
|
|
@@ -11783,12 +11787,12 @@ const bP="underline",wP="outline",yP="block",xP="frameless",kP=we`
|
|
|
11783
11787
|
slot[name='actions']::slotted(*) {
|
|
11784
11788
|
${nl.cssCustomProperty}: 24px;
|
|
11785
11789
|
}
|
|
11786
|
-
`.withBehaviors(oh(
|
|
11790
|
+
`.withBehaviors(oh(wP,we`
|
|
11787
11791
|
.root {
|
|
11788
11792
|
border-bottom-width: ${ll};
|
|
11789
11793
|
padding-bottom: 0;
|
|
11790
11794
|
}
|
|
11791
|
-
`),oh(
|
|
11795
|
+
`),oh(xP,we`
|
|
11792
11796
|
.root {
|
|
11793
11797
|
background-color: rgba(${za}, 0.1);
|
|
11794
11798
|
}
|
|
@@ -11816,12 +11820,12 @@ const bP="underline",wP="outline",yP="block",xP="frameless",kP=we`
|
|
|
11816
11820
|
:host([disabled]) .root {
|
|
11817
11821
|
background-color: rgba(${za}, 0.07);
|
|
11818
11822
|
}
|
|
11819
|
-
`),oh(
|
|
11823
|
+
`),oh(yP,we`
|
|
11820
11824
|
.root {
|
|
11821
11825
|
border-width: ${ll};
|
|
11822
11826
|
padding: 0;
|
|
11823
11827
|
}
|
|
11824
|
-
`),oh(
|
|
11828
|
+
`),oh(kP,we`
|
|
11825
11829
|
.control {
|
|
11826
11830
|
padding-left: ${ll};
|
|
11827
11831
|
padding-right: ${ll};
|
|
@@ -11839,8 +11843,8 @@ const bP="underline",wP="outline",yP="block",xP="frameless",kP=we`
|
|
|
11839
11843
|
filter: invert(100%);
|
|
11840
11844
|
}
|
|
11841
11845
|
`))
|
|
11842
|
-
class
|
|
11843
|
-
const SP
|
|
11846
|
+
class SP extends zi{constructor(){super(...arguments),this.appearance=wP,this.errorVisible=!1,this.fullBleed=!1}}e([se],SP.prototype,"appearance",void 0),e([se({attribute:"error-text"})],SP.prototype,"errorText",void 0),e([se({attribute:"error-visible",mode:"boolean"})],SP.prototype,"errorVisible",void 0),e([se({attribute:"full-bleed",mode:"boolean"})],SP.prototype,"fullBleed",void 0)
|
|
11847
|
+
const $P=SP.compose({baseName:"text-field",baseClass:zi,template:(e,t)=>Z`
|
|
11844
11848
|
<template
|
|
11845
11849
|
class="
|
|
11846
11850
|
${e=>e.readOnly?"readonly":""}
|
|
@@ -11900,7 +11904,7 @@ const SP=CP.compose({baseName:"text-field",baseClass:zi,template:(e,t)=>Z`
|
|
|
11900
11904
|
${Qe(0,t)}
|
|
11901
11905
|
</div>
|
|
11902
11906
|
</template>
|
|
11903
|
-
`,styles:
|
|
11907
|
+
`,styles:CP,shadowOptions:{delegatesFocus:!0},end:Z`
|
|
11904
11908
|
<${rm}
|
|
11905
11909
|
severity="error"
|
|
11906
11910
|
class="error-icon"
|
|
@@ -11910,8 +11914,8 @@ const SP=CP.compose({baseName:"text-field",baseClass:zi,template:(e,t)=>Z`
|
|
|
11910
11914
|
</span>
|
|
11911
11915
|
${Zm}
|
|
11912
11916
|
`})
|
|
11913
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
11914
|
-
const
|
|
11917
|
+
bi.getOrCreate().withPrefix("nimble").register($P())
|
|
11918
|
+
const MP=we`
|
|
11915
11919
|
${Oo("inline-flex")}
|
|
11916
11920
|
|
|
11917
11921
|
:host {
|
|
@@ -11996,7 +12000,7 @@ const $P=we`
|
|
|
11996
12000
|
.status-icon {
|
|
11997
12001
|
opacity: 0.6;
|
|
11998
12002
|
}
|
|
11999
|
-
`)),
|
|
12003
|
+
`)),_P=Z`
|
|
12000
12004
|
${Fe((e=>e.tooltipVisible),Z`
|
|
12001
12005
|
<${Eh}
|
|
12002
12006
|
class="anchored-region"
|
|
@@ -12029,11 +12033,11 @@ const $P=we`
|
|
|
12029
12033
|
</${Eh}>
|
|
12030
12034
|
`)}
|
|
12031
12035
|
`
|
|
12032
|
-
class
|
|
12033
|
-
const EP
|
|
12034
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
12035
|
-
const
|
|
12036
|
-
class
|
|
12036
|
+
class EP extends _o{constructor(){super(...arguments),this.iconVisible=!1}}e([se],EP.prototype,"severity",void 0),e([se({attribute:"icon-visible",mode:"boolean"})],EP.prototype,"iconVisible",void 0)
|
|
12037
|
+
const IP=EP.compose({baseName:"tooltip",baseClass:_o,template:_P,styles:MP})
|
|
12038
|
+
bi.getOrCreate().withPrefix("nimble").register(IP())
|
|
12039
|
+
const AP="group-selected",OP="all",TP="leaves-only",RP="none"
|
|
12040
|
+
class DP{constructor(e,t,n){this.ltr=e,this.rtl=t,this.source=n,this.attached=null}handleChange({target:e,token:t}){this.attach(t.getValueFor(e))}attach(e){this.attached!==this[e]&&(null!==this.attached&&this.source.$fastController.removeStyles(this.attached),this.attached=this[e],null!==this.attached&&this.source.$fastController.addStyles(this.attached))}}const NP=we`
|
|
12037
12041
|
${Oo("block")}
|
|
12038
12042
|
|
|
12039
12043
|
:host {
|
|
@@ -12054,7 +12058,7 @@ class RP{constructor(e,t,n){this.ltr=e,this.rtl=t,this.source=n,this.attached=nu
|
|
|
12054
12058
|
}
|
|
12055
12059
|
|
|
12056
12060
|
${""}
|
|
12057
|
-
:host([${
|
|
12061
|
+
:host([${AP}])::after {
|
|
12058
12062
|
background: ${qa};
|
|
12059
12063
|
border-radius: 0px;
|
|
12060
12064
|
content: '';
|
|
@@ -12076,7 +12080,7 @@ class RP{constructor(e,t,n){this.ltr=e,this.rtl=t,this.source=n,this.attached=nu
|
|
|
12076
12080
|
background: ${Pa};
|
|
12077
12081
|
}
|
|
12078
12082
|
|
|
12079
|
-
:host([${
|
|
12083
|
+
:host([${AP}]) .positioning-region:hover {
|
|
12080
12084
|
background: ${Na};
|
|
12081
12085
|
}
|
|
12082
12086
|
|
|
@@ -12182,7 +12186,7 @@ class RP{constructor(e,t,n){this.ltr=e,this.rtl=t,this.source=n,this.attached=nu
|
|
|
12182
12186
|
display: block;
|
|
12183
12187
|
}
|
|
12184
12188
|
`.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)
|
|
12185
|
-
t&&$a.unsubscribe(t)}attach(e){const t=this.cache.get(e)||new
|
|
12189
|
+
t&&$a.unsubscribe(t)}attach(e){const t=this.cache.get(e)||new DP(this.ltr,this.rtl,e),n=$a.getValueFor(e)
|
|
12186
12190
|
$a.subscribe(t),t.attach(n),this.cache.set(e,t)}}(we`
|
|
12187
12191
|
.expand-collapse-button {
|
|
12188
12192
|
left: var(
|
|
@@ -12214,8 +12218,8 @@ $a.subscribe(t),t.attach(n),this.cache.set(e,t)}}(we`
|
|
|
12214
12218
|
transform: rotate(135deg);
|
|
12215
12219
|
}
|
|
12216
12220
|
`))
|
|
12217
|
-
class
|
|
12218
|
-
const PP
|
|
12221
|
+
class PP extends Io{constructor(){super(...arguments),this.groupSelected=!1}}e([se({attribute:"group-selected",mode:"boolean"})],PP.prototype,"groupSelected",void 0)
|
|
12222
|
+
const LP=PP.compose({baseName:"tree-item",baseClass:Io,template:(e,t)=>Z`
|
|
12219
12223
|
<template
|
|
12220
12224
|
role="treeitem"
|
|
12221
12225
|
slot="${e=>e.isNestedItem()?"item":void 0}"
|
|
@@ -12255,9 +12259,9 @@ const PP=NP.compose({baseName:"tree-item",baseClass:Io,template:(e,t)=>Z`
|
|
|
12255
12259
|
</div>
|
|
12256
12260
|
`)}
|
|
12257
12261
|
</template>
|
|
12258
|
-
`,styles:
|
|
12259
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
12260
|
-
const
|
|
12262
|
+
`,styles:NP,expandCollapseGlyph:qh.data})
|
|
12263
|
+
bi.getOrCreate().withPrefix("nimble").register(LP())
|
|
12264
|
+
const zP=we`
|
|
12261
12265
|
${Oo("flex")}
|
|
12262
12266
|
|
|
12263
12267
|
:host {
|
|
@@ -12269,7 +12273,7 @@ const LP=we`
|
|
|
12269
12273
|
:host(${Do}) {
|
|
12270
12274
|
outline: none;
|
|
12271
12275
|
}
|
|
12272
|
-
`,
|
|
12276
|
+
`,FP=Z`
|
|
12273
12277
|
<template
|
|
12274
12278
|
role="tree"
|
|
12275
12279
|
${Ne("treeView")}
|
|
@@ -12283,246 +12287,246 @@ const LP=we`
|
|
|
12283
12287
|
<slot ${Ke("slottedTreeItems")}></slot>
|
|
12284
12288
|
</template>
|
|
12285
12289
|
`
|
|
12286
|
-
class
|
|
12290
|
+
class VP extends Ao{constructor(){super(...arguments),this.selectionMode=OP,this.selectedItems=[]}handleClick(e){if(e.defaultPrevented)return!1
|
|
12287
12291
|
if(!(e.target instanceof Element&&Eo(e.target)))return!0
|
|
12288
12292
|
const t=e.target
|
|
12289
|
-
return!t.disabled&&(this.canSelect(t)?t.selected=!0:this.itemHasChildren(t)&&(t.expanded=!t.expanded),!0)}canSelect(e){switch(this.selectionMode){case
|
|
12290
|
-
case
|
|
12291
|
-
case
|
|
12292
|
-
default:return!0}}itemHasChildren(e){return null!==e.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const e of Array.from(this.children))e instanceof
|
|
12293
|
+
return!t.disabled&&(this.canSelect(t)?t.selected=!0:this.itemHasChildren(t)&&(t.expanded=!t.expanded),!0)}canSelect(e){switch(this.selectionMode){case OP:return!0
|
|
12294
|
+
case RP:return!1
|
|
12295
|
+
case TP:return!this.itemHasChildren(e)
|
|
12296
|
+
default:return!0}}itemHasChildren(e){return null!==e.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const e of Array.from(this.children))e instanceof PP&&(e.groupSelected=!1)
|
|
12293
12297
|
for(let e of this.selectedItems){for(;null!==e.parentElement&&e.parentElement!==this;)e=e.parentElement
|
|
12294
|
-
e instanceof
|
|
12295
|
-
const VP
|
|
12296
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
12297
|
-
const
|
|
12298
|
-
class
|
|
12299
|
-
this.pluralRules=new Intl.PluralRules(this.locale),this.formatter=new Intl.NumberFormat(this.locale,this.intlNumberFormatOptions),this.unitTranslation=this.getTranslationToUse(t,this.locale),this.scaledPrefixText=n}static createFactory(e){return t=>new
|
|
12298
|
+
e instanceof PP&&(e.groupSelected=!0)}}}e([se({attribute:"selection-mode"})],VP.prototype,"selectionMode",void 0),e([g],VP.prototype,"selectedItems",void 0)
|
|
12299
|
+
const HP=VP.compose({baseName:"tree-view",baseClass:Ao,template:FP,styles:zP})
|
|
12300
|
+
bi.getOrCreate().withPrefix("nimble").register(HP())
|
|
12301
|
+
const BP=Z`<template slot="unit"></template>`
|
|
12302
|
+
class qP{constructor(e,t,n){this.singular=e,this.plural=t,this.symbol=n}}class jP extends DN{constructor(e,{unitTranslations:t,scaledPrefixText:n}){if(super(e),!t.get("en"))throw new Error('English translations must exist with locale string "en"')
|
|
12303
|
+
this.pluralRules=new Intl.PluralRules(this.locale),this.formatter=new Intl.NumberFormat(this.locale,this.intlNumberFormatOptions),this.unitTranslation=this.getTranslationToUse(t,this.locale),this.scaledPrefixText=n}static createFactory(e){return t=>new jP(t,e)}format(e){const t=this.formatter.format(e)
|
|
12300
12304
|
if(""!==this.scaledPrefixText)return`${t} ${this.scaledPrefixText}${this.unitTranslation.symbol}`
|
|
12301
12305
|
return`${t} ${"one"===this.pluralRules.select(e)?this.unitTranslation.singular:this.unitTranslation.plural}`}getTranslationToUse(e,t){const n=new Intl.Locale(t??"en"),i=n.language,o=n.region
|
|
12302
|
-
return(o?e.get(`${i}-${o}`):void 0)??e.get(i)??e.get("en")}}const
|
|
12303
|
-
const
|
|
12304
|
-
const
|
|
12305
|
-
class
|
|
12306
|
-
const JP
|
|
12307
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
12308
|
-
const
|
|
12309
|
-
const
|
|
12310
|
-
const
|
|
12311
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
12312
|
-
var
|
|
12313
|
-
function
|
|
12314
|
-
i[e]=[]}return new
|
|
12315
|
-
break}return null!=n&&e.push({name:t,value:n}),e}
|
|
12306
|
+
return(o?e.get(`${i}-${o}`):void 0)??e.get(i)??e.get("en")}}const UP=new Map([["en",new qP("byte","bytes","B")],["fr",new qP("octet","octets","o")],["de",new qP("Byte","Byte","B")],["ja",new qP("バイト","バイト","B")],["zh",new qP("字节","字节","B")]]),WP=[[1,""],[1024,"Ki"],[1048576,"Mi"],[1024**3,"Gi"],[1024**4,"Ti"],[1024**5,"Pi"]]
|
|
12307
|
+
const ZP=new class extends LN{constructor(){super(WP.map((([e,t])=>new PN(e,jP.createFactory({unitTranslations:UP,scaledPrefixText:t})))))}},GP=[[1,"byte","long"],[1e3,"kilobyte","short"],[1e6,"megabyte","short"],[1e3**3,"gigabyte","short"],[1e3**4,"terabyte","short"],[1e3**5,"petabyte","short"]]
|
|
12308
|
+
const KP=new class extends LN{constructor(){super(GP.map((([e,t,n])=>new PN(e,NN.createFactory({style:"unit",unit:t,unitDisplay:n})))))}}
|
|
12309
|
+
class JP extends UN{constructor(){super(),this.binary=!1,this.resolvedUnitScale=KP}binaryChanged(){this.resolvedUnitScale=this.binary?ZP:KP}}e([se({mode:"boolean"})],JP.prototype,"binary",void 0)
|
|
12310
|
+
const XP=JP.compose({baseName:"unit-byte",template:BP})
|
|
12311
|
+
bi.getOrCreate().withPrefix("nimble").register(XP())
|
|
12312
|
+
const YP=[[1e-15,"f"],[1e-12,"p"],[1e-9,"n"],[10**-6,"μ"],[.001,"m"],[.01,"c"],[.1,"d"],[1,""],[1e3,"k"],[10**6,"M"],[10**9,"G"],[10**12,"T"],[10**15,"P"],[10**18,"E"]],QP=new Map([["en",new qP("volt","volts","V")],["fr",new qP("volt","volts","V")],["de",new qP("Volt","Volt","V")],["ja",new qP("ボルト","ボルト","V")],["zh",new qP("伏特","伏特","V")]])
|
|
12313
|
+
const eL=new class extends LN{constructor(){super(YP.map((([e,t])=>new PN(e,jP.createFactory({unitTranslations:QP,scaledPrefixText:t})))))}}
|
|
12314
|
+
const tL=class extends UN{constructor(){super(),this.resolvedUnitScale=eL}}.compose({baseName:"unit-volt",template:BP})
|
|
12315
|
+
bi.getOrCreate().withPrefix("nimble").register(tL())
|
|
12316
|
+
var nL={value:()=>{}}
|
|
12317
|
+
function iL(){for(var e,t=0,n=arguments.length,i={};t<n;++t){if(!(e=arguments[t]+"")||e in i||/[\s.]/.test(e))throw new Error("illegal type: "+e)
|
|
12318
|
+
i[e]=[]}return new oL(i)}function oL(e){this._=e}function rL(e,t){for(var n,i=0,o=e.length;i<o;++i)if((n=e[i]).name===t)return n.value}function sL(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=nL,e=e.slice(0,i).concat(e.slice(i+1))
|
|
12319
|
+
break}return null!=n&&e.push({name:t,value:n}),e}oL.prototype=iL.prototype={constructor:oL,on:function(e,t){var n,i,o=this._,r=(i=o,(e+"").trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".")
|
|
12316
12320
|
if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!i.hasOwnProperty(e))throw new Error("unknown type: "+e)
|
|
12317
12321
|
return{type:e,name:t}}))),s=-1,a=r.length
|
|
12318
12322
|
if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t)
|
|
12319
|
-
for(;++s<a;)if(n=(e=r[s]).type)o[n]=
|
|
12320
|
-
else if(null==t)for(n in o)o[n]=
|
|
12321
|
-
return this}for(;++s<a;)if((n=(e=r[s]).type)&&(n=
|
|
12323
|
+
for(;++s<a;)if(n=(e=r[s]).type)o[n]=sL(o[n],e.name,t)
|
|
12324
|
+
else if(null==t)for(n in o)o[n]=sL(o[n],e.name,null)
|
|
12325
|
+
return this}for(;++s<a;)if((n=(e=r[s]).type)&&(n=rL(o[n],e.name)))return n},copy:function(){var e={},t=this._
|
|
12322
12326
|
for(var n in t)e[n]=t[n].slice()
|
|
12323
|
-
return new
|
|
12327
|
+
return new oL(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,i,o=new Array(n),r=0;r<n;++r)o[r]=arguments[r+2]
|
|
12324
12328
|
if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e)
|
|
12325
12329
|
for(r=0,n=(i=this._[e]).length;r<n;++r)i[r].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e)
|
|
12326
12330
|
for(var i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)}}
|
|
12327
|
-
var
|
|
12328
|
-
function
|
|
12329
|
-
return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),
|
|
12330
|
-
return n===
|
|
12331
|
-
return(t.local?dL
|
|
12332
|
-
var t}}function
|
|
12333
|
-
function
|
|
12334
|
-
function
|
|
12335
|
-
for(;a<l;++a)(s=t[a])&&(o[a]=s)}function
|
|
12331
|
+
var aL="http://www.w3.org/1999/xhtml",lL={svg:"http://www.w3.org/2000/svg",xhtml:aL,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}
|
|
12332
|
+
function cL(e){var t=e+="",n=t.indexOf(":")
|
|
12333
|
+
return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),lL.hasOwnProperty(t)?{space:lL[t],local:e}:e}function dL(e){return function(){var t=this.ownerDocument,n=this.namespaceURI
|
|
12334
|
+
return n===aL&&t.documentElement.namespaceURI===aL?t.createElement(e):t.createElementNS(n,e)}}function hL(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function uL(e){var t=cL(e)
|
|
12335
|
+
return(t.local?hL:dL)(t)}function pL(){}function fL(e){return null==e?pL:function(){return this.querySelector(e)}}function mL(){return[]}function gL(e){return null==e?mL:function(){return this.querySelectorAll(e)}}function vL(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t)
|
|
12336
|
+
var t}}function bL(e){return function(){return this.matches(e)}}function wL(e){return function(t){return t.matches(e)}}var yL=Array.prototype.find
|
|
12337
|
+
function xL(){return this.firstElementChild}var kL=Array.prototype.filter
|
|
12338
|
+
function CL(){return Array.from(this.children)}function SL(e){return new Array(e.length)}function $L(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function ML(e,t,n,i,o,r){for(var s,a=0,l=t.length,c=r.length;a<c;++a)(s=t[a])?(s.__data__=r[a],i[a]=s):n[a]=new $L(e,r[a])
|
|
12339
|
+
for(;a<l;++a)(s=t[a])&&(o[a]=s)}function _L(e,t,n,i,o,r,s){var a,l,c,d=new Map,h=t.length,u=r.length,p=new Array(h)
|
|
12336
12340
|
for(a=0;a<h;++a)(l=t[a])&&(p[a]=c=s.call(l,l.__data__,a,t)+"",d.has(c)?o[a]=l:d.set(c,l))
|
|
12337
|
-
for(a=0;a<u;++a)c=s.call(e,r[a],a,r)+"",(l=d.get(c))?(i[a]=l,l.__data__=r[a],d.delete(c)):n[a]=new
|
|
12338
|
-
for(a=0;a<h;++a)(l=t[a])&&d.get(p[a])===l&&(o[a]=l)}function
|
|
12339
|
-
null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function
|
|
12340
|
-
null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function
|
|
12341
|
-
null==i?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function
|
|
12342
|
-
null==n?delete this[e]:this[e]=n}}function
|
|
12343
|
-
this.textContent=null==t?"":t}}function
|
|
12344
|
-
this.innerHTML=null==t?"":t}}function
|
|
12345
|
-
e&&e.removeChild(this)}function
|
|
12346
|
-
return t?t.insertBefore(e,this.nextSibling):e}function
|
|
12347
|
-
return t?t.insertBefore(e,this.nextSibling):e}function
|
|
12348
|
-
if(t){for(var n,i=0,o=-1,r=t.length;i<r;++i)n=t[i],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function
|
|
12341
|
+
for(a=0;a<u;++a)c=s.call(e,r[a],a,r)+"",(l=d.get(c))?(i[a]=l,l.__data__=r[a],d.delete(c)):n[a]=new $L(e,r[a])
|
|
12342
|
+
for(a=0;a<h;++a)(l=t[a])&&d.get(p[a])===l&&(o[a]=l)}function EL(e){return e.__data__}function IL(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function AL(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function OL(e){return function(){this.removeAttribute(e)}}function TL(e){return function(){this.removeAttributeNS(e.space,e.local)}}function RL(e,t){return function(){this.setAttribute(e,t)}}function DL(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function NL(e,t){return function(){var n=t.apply(this,arguments)
|
|
12343
|
+
null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function PL(e,t){return function(){var n=t.apply(this,arguments)
|
|
12344
|
+
null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function LL(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function zL(e){return function(){this.style.removeProperty(e)}}function FL(e,t,n){return function(){this.style.setProperty(e,t,n)}}function VL(e,t,n){return function(){var i=t.apply(this,arguments)
|
|
12345
|
+
null==i?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function HL(e,t){return e.style.getPropertyValue(t)||LL(e).getComputedStyle(e,null).getPropertyValue(t)}function BL(e){return function(){delete this[e]}}function qL(e,t){return function(){this[e]=t}}function jL(e,t){return function(){var n=t.apply(this,arguments)
|
|
12346
|
+
null==n?delete this[e]:this[e]=n}}function UL(e){return e.trim().split(/^|\s+/)}function WL(e){return e.classList||new ZL(e)}function ZL(e){this._node=e,this._names=UL(e.getAttribute("class")||"")}function GL(e,t){for(var n=WL(e),i=-1,o=t.length;++i<o;)n.add(t[i])}function KL(e,t){for(var n=WL(e),i=-1,o=t.length;++i<o;)n.remove(t[i])}function JL(e){return function(){GL(this,e)}}function XL(e){return function(){KL(this,e)}}function YL(e,t){return function(){(t.apply(this,arguments)?GL:KL)(this,e)}}function QL(){this.textContent=""}function ez(e){return function(){this.textContent=e}}function tz(e){return function(){var t=e.apply(this,arguments)
|
|
12347
|
+
this.textContent=null==t?"":t}}function nz(){this.innerHTML=""}function iz(e){return function(){this.innerHTML=e}}function oz(e){return function(){var t=e.apply(this,arguments)
|
|
12348
|
+
this.innerHTML=null==t?"":t}}function rz(){this.nextSibling&&this.parentNode.appendChild(this)}function sz(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function az(){return null}function lz(){var e=this.parentNode
|
|
12349
|
+
e&&e.removeChild(this)}function cz(){var e=this.cloneNode(!1),t=this.parentNode
|
|
12350
|
+
return t?t.insertBefore(e,this.nextSibling):e}function dz(){var e=this.cloneNode(!0),t=this.parentNode
|
|
12351
|
+
return t?t.insertBefore(e,this.nextSibling):e}function hz(e){return function(){var t=this.__on
|
|
12352
|
+
if(t){for(var n,i=0,o=-1,r=t.length;i<r;++i)n=t[i],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function uz(e,t,n){return function(){var i,o=this.__on,r=function(e){return function(t){e.call(this,t,this.__data__)}}(t)
|
|
12349
12353
|
if(o)for(var s=0,a=o.length;s<a;++s)if((i=o[s]).type===e.type&&i.name===e.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=r,i.options=n),void(i.value=t)
|
|
12350
|
-
this.addEventListener(e.type,r,n),i={type:e.type,name:e.name,value:t,listener:r,options:n},o?o.push(i):this.__on=[i]}}function
|
|
12351
|
-
"function"==typeof o?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function
|
|
12354
|
+
this.addEventListener(e.type,r,n),i={type:e.type,name:e.name,value:t,listener:r,options:n},o?o.push(i):this.__on=[i]}}function pz(e,t,n){var i=LL(e),o=i.CustomEvent
|
|
12355
|
+
"function"==typeof o?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function fz(e,t){return function(){return pz(this,e,t)}}function mz(e,t){return function(){return pz(this,e,t.apply(this,arguments))}}$L.prototype={constructor:$L,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)}},ZL.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)
|
|
12352
12356
|
t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}
|
|
12353
|
-
var
|
|
12354
|
-
function
|
|
12357
|
+
var gz=[null]
|
|
12358
|
+
function vz(e,t){this._groups=e,this._parents=t}function bz(){return new vz([[document.documentElement]],gz)}function wz(e){return"string"==typeof e?new vz([[document.querySelector(e)]],[document.documentElement]):new vz([[e]],gz)}function yz(e,t){if(e=function(e){let t
|
|
12355
12359
|
for(;t=e.sourceEvent;)e=t
|
|
12356
12360
|
return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t
|
|
12357
12361
|
if(n.createSVGPoint){var i=n.createSVGPoint()
|
|
12358
12362
|
return i.x=e.clientX,i.y=e.clientY,[(i=i.matrixTransform(t.getScreenCTM().inverse())).x,i.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect()
|
|
12359
|
-
return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}
|
|
12363
|
+
return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}vz.prototype=bz.prototype={constructor:vz,select:function(e){"function"!=typeof e&&(e=fL(e))
|
|
12360
12364
|
for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r,s,a=t[o],l=a.length,c=i[o]=new Array(l),d=0;d<l;++d)(r=a[d])&&(s=e.call(r,r.__data__,d,a))&&("__data__"in r&&(s.__data__=r.__data__),c[d]=s)
|
|
12361
|
-
return new
|
|
12365
|
+
return new vz(i,this._parents)},selectAll:function(e){e="function"==typeof e?vL(e):gL(e)
|
|
12362
12366
|
for(var t=this._groups,n=t.length,i=[],o=[],r=0;r<n;++r)for(var s,a=t[r],l=a.length,c=0;c<l;++c)(s=a[c])&&(i.push(e.call(s,s.__data__,c,a)),o.push(s))
|
|
12363
|
-
return new
|
|
12367
|
+
return new vz(i,o)},selectChild:function(e){return this.select(null==e?xL:function(e){return function(){return yL.call(this.children,e)}}("function"==typeof e?e:wL(e)))},selectChildren:function(e){return this.selectAll(null==e?CL:function(e){return function(){return kL.call(this.children,e)}}("function"==typeof e?e:wL(e)))},filter:function(e){"function"!=typeof e&&(e=bL(e))
|
|
12364
12368
|
for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r,s=t[o],a=s.length,l=i[o]=[],c=0;c<a;++c)(r=s[c])&&e.call(r,r.__data__,c,s)&&l.push(r)
|
|
12365
|
-
return new
|
|
12366
|
-
var n,i=t?ML
|
|
12369
|
+
return new vz(i,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,EL)
|
|
12370
|
+
var n,i=t?_L:ML,o=this._parents,r=this._groups
|
|
12367
12371
|
"function"!=typeof e&&(n=e,e=function(){return n})
|
|
12368
|
-
for(var s=r.length,a=new Array(s),l=new Array(s),c=new Array(s),d=0;d<s;++d){var h=o[d],u=r[d],p=u.length,f=
|
|
12372
|
+
for(var s=r.length,a=new Array(s),l=new Array(s),c=new Array(s),d=0;d<s;++d){var h=o[d],u=r[d],p=u.length,f=IL(e.call(h,h&&h.__data__,d,o)),m=f.length,g=l[d]=new Array(m),v=a[d]=new Array(m)
|
|
12369
12373
|
i(h,u,g,v,c[d]=new Array(p),f,t)
|
|
12370
|
-
for(var b,w,y=0,x=0;y<m;++y)if(b=g[y]){for(y>=x&&(x=y+1);!(w=v[x])&&++x<m;);b._next=w||null}}return(a=new
|
|
12374
|
+
for(var b,w,y=0,x=0;y<m;++y)if(b=g[y]){for(y>=x&&(x=y+1);!(w=v[x])&&++x<m;);b._next=w||null}}return(a=new vz(a,o))._enter=l,a._exit=c,a},enter:function(){return new vz(this._enter||this._groups.map(SL),this._parents)},exit:function(){return new vz(this._exit||this._groups.map(SL),this._parents)},join:function(e,t,n){var i=this.enter(),o=this,r=this.exit()
|
|
12371
12375
|
return"function"==typeof e?(i=e(i))&&(i=i.selection()):i=i.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?r.remove():n(r),i&&o?i.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,o=n.length,r=i.length,s=Math.min(o,r),a=new Array(o),l=0;l<s;++l)for(var c,d=n[l],h=i[l],u=d.length,p=a[l]=new Array(u),f=0;f<u;++f)(c=d[f]||h[f])&&(p[f]=c)
|
|
12372
12376
|
for(;l<o;++l)a[l]=n[l]
|
|
12373
|
-
return new
|
|
12374
|
-
return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=
|
|
12377
|
+
return new vz(a,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i,o=e[t],r=o.length-1,s=o[r];--r>=0;)(i=o[r])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i)
|
|
12378
|
+
return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=AL)
|
|
12375
12379
|
for(var n=this._groups,i=n.length,o=new Array(i),r=0;r<i;++r){for(var s,a=n[r],l=a.length,c=o[r]=new Array(l),d=0;d<l;++d)(s=a[d])&&(c[d]=s)
|
|
12376
|
-
c.sort(t)}return new
|
|
12380
|
+
c.sort(t)}return new vz(o,this._parents).order()},call:function(){var e=arguments[0]
|
|
12377
12381
|
return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,r=i.length;o<r;++o){var s=i[o]
|
|
12378
12382
|
if(s)return s}return null},size:function(){let e=0
|
|
12379
12383
|
for(const t of this)++e
|
|
12380
12384
|
return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var o,r=t[n],s=0,a=r.length;s<a;++s)(o=r[s])&&e.call(o,o.__data__,s,r)
|
|
12381
|
-
return this},attr:function(e,t){var n=
|
|
12385
|
+
return this},attr:function(e,t){var n=cL(e)
|
|
12382
12386
|
if(arguments.length<2){var i=this.node()
|
|
12383
|
-
return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==t?n.local?OL:
|
|
12384
|
-
if(arguments.length<2){for(var i=
|
|
12385
|
-
return!0}return this.each(("function"==typeof t?
|
|
12386
|
-
return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:
|
|
12387
|
-
return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(
|
|
12387
|
+
return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==t?n.local?TL:OL:"function"==typeof t?n.local?PL:NL:n.local?DL:RL)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?zL:"function"==typeof t?VL:FL)(e,t,null==n?"":n)):HL(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?BL:"function"==typeof t?jL:qL)(e,t)):this.node()[e]},classed:function(e,t){var n=UL(e+"")
|
|
12388
|
+
if(arguments.length<2){for(var i=WL(this.node()),o=-1,r=n.length;++o<r;)if(!i.contains(n[o]))return!1
|
|
12389
|
+
return!0}return this.each(("function"==typeof t?YL:t?JL:XL)(n,t))},text:function(e){return arguments.length?this.each(null==e?QL:("function"==typeof e?tz:ez)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?nz:("function"==typeof e?oz:iz)(e)):this.node().innerHTML},raise:function(){return this.each(rz)},lower:function(){return this.each(sz)},append:function(e){var t="function"==typeof e?e:uL(e)
|
|
12390
|
+
return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:uL(e),i=null==t?az:"function"==typeof t?t:fL(t)
|
|
12391
|
+
return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(lz)},clone:function(e){return this.select(e?dz:cz)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var i,o,r=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".")
|
|
12388
12392
|
return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),s=r.length
|
|
12389
|
-
if(!(arguments.length<2)){for(a=t?hz
|
|
12393
|
+
if(!(arguments.length<2)){for(a=t?uz:hz,i=0;i<s;++i)this.each(a(r[i],t,n))
|
|
12390
12394
|
return this}var a=this.node().__on
|
|
12391
|
-
if(a)for(var l,c=0,d=a.length;c<d;++c)for(i=0,l=a[c];i<s;++i)if((o=r[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?fz
|
|
12392
|
-
const
|
|
12393
|
-
function
|
|
12395
|
+
if(a)for(var l,c=0,d=a.length;c<d;++c)for(i=0,l=a[c];i<s;++i)if((o=r[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?mz:fz)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i,o=e[t],r=0,s=o.length;r<s;++r)(i=o[r])&&(yield i)}}
|
|
12396
|
+
const xz={capture:!0,passive:!1}
|
|
12397
|
+
function kz(e){e.preventDefault(),e.stopImmediatePropagation()}function Cz(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Sz(e,t){var n=Object.create(e.prototype)
|
|
12394
12398
|
for(var i in t)n[i]=t[i]
|
|
12395
|
-
return n}function
|
|
12396
|
-
function
|
|
12397
|
-
return e=(e+"").trim().toLowerCase(),(t=
|
|
12398
|
-
var o}function
|
|
12399
|
-
return`${1===e?"rgb(":"rgba("}${
|
|
12400
|
-
if(e instanceof
|
|
12401
|
-
if(e instanceof
|
|
12399
|
+
return n}function $z(){}var Mz=.7,_z=1/Mz,Ez="\\s*([+-]?\\d+)\\s*",Iz="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Az="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Oz=/^#([0-9a-f]{3,8})$/,Tz=new RegExp(`^rgb\\(${Ez},${Ez},${Ez}\\)$`),Rz=new RegExp(`^rgb\\(${Az},${Az},${Az}\\)$`),Dz=new RegExp(`^rgba\\(${Ez},${Ez},${Ez},${Iz}\\)$`),Nz=new RegExp(`^rgba\\(${Az},${Az},${Az},${Iz}\\)$`),Pz=new RegExp(`^hsl\\(${Iz},${Az},${Az}\\)$`),Lz=new RegExp(`^hsla\\(${Iz},${Az},${Az},${Iz}\\)$`),zz={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}
|
|
12400
|
+
function Fz(){return this.rgb().formatHex()}function Vz(){return this.rgb().formatRgb()}function Hz(e){var t,n
|
|
12401
|
+
return e=(e+"").trim().toLowerCase(),(t=Oz.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Bz(t):3===n?new Uz(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?qz(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?qz(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=Tz.exec(e))?new Uz(t[1],t[2],t[3],1):(t=Rz.exec(e))?new Uz(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Dz.exec(e))?qz(t[1],t[2],t[3],t[4]):(t=Nz.exec(e))?qz(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Pz.exec(e))?Xz(t[1],t[2]/100,t[3]/100,1):(t=Lz.exec(e))?Xz(t[1],t[2]/100,t[3]/100,t[4]):zz.hasOwnProperty(e)?Bz(zz[e]):"transparent"===e?new Uz(NaN,NaN,NaN,0):null}function Bz(e){return new Uz(e>>16&255,e>>8&255,255&e,1)}function qz(e,t,n,i){return i<=0&&(e=t=n=NaN),new Uz(e,t,n,i)}function jz(e,t,n,i){return 1===arguments.length?((o=e)instanceof $z||(o=Hz(o)),o?new Uz((o=o.rgb()).r,o.g,o.b,o.opacity):new Uz):new Uz(e,t,n,null==i?1:i)
|
|
12402
|
+
var o}function Uz(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function Wz(){return`#${Jz(this.r)}${Jz(this.g)}${Jz(this.b)}`}function Zz(){const e=Gz(this.opacity)
|
|
12403
|
+
return`${1===e?"rgb(":"rgba("}${Kz(this.r)}, ${Kz(this.g)}, ${Kz(this.b)}${1===e?")":`, ${e})`}`}function Gz(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Kz(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Jz(e){return((e=Kz(e))<16?"0":"")+e.toString(16)}function Xz(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Qz(e,t,n,i)}function Yz(e){if(e instanceof Qz)return new Qz(e.h,e.s,e.l,e.opacity)
|
|
12404
|
+
if(e instanceof $z||(e=Hz(e)),!e)return new Qz
|
|
12405
|
+
if(e instanceof Qz)return e
|
|
12402
12406
|
var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),r=Math.max(t,n,i),s=NaN,a=r-o,l=(r+o)/2
|
|
12403
|
-
return a?(s=t===r?(n-i)/a+6*(n<i):n===r?(i-t)/a+2:(t-n)/a+4,a/=l<.5?r+o:2-r-o,s*=60):a=l>0&&l<1?0:s,new
|
|
12404
|
-
return new
|
|
12405
|
-
return`${1===e?"hsl(":"hsla("}${
|
|
12406
|
-
var
|
|
12407
|
-
function
|
|
12408
|
-
return n?function(e,t){return function(n){return e+n*t}}(e,n):
|
|
12409
|
-
function i(e,t){var i=n((e=
|
|
12407
|
+
return a?(s=t===r?(n-i)/a+6*(n<i):n===r?(i-t)/a+2:(t-n)/a+4,a/=l<.5?r+o:2-r-o,s*=60):a=l>0&&l<1?0:s,new Qz(s,a,l,e.opacity)}function Qz(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function eF(e){return(e=(e||0)%360)<0?e+360:e}function tF(e){return Math.max(0,Math.min(1,e||0))}function nF(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Cz($z,Hz,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Fz,formatHex:Fz,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Yz(this).formatHsl()},formatRgb:Vz,toString:Vz}),Cz(Uz,jz,Sz($z,{brighter(e){return e=null==e?_z:Math.pow(_z,e),new Uz(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Mz:Math.pow(Mz,e),new Uz(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Uz(Kz(this.r),Kz(this.g),Kz(this.b),Gz(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:Wz,formatHex:Wz,formatHex8:function(){return`#${Jz(this.r)}${Jz(this.g)}${Jz(this.b)}${Jz(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Zz,toString:Zz})),Cz(Qz,(function(e,t,n,i){return 1===arguments.length?Yz(e):new Qz(e,t,n,null==i?1:i)}),Sz($z,{brighter(e){return e=null==e?_z:Math.pow(_z,e),new Qz(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Mz:Math.pow(Mz,e),new Qz(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,o=2*n-i
|
|
12408
|
+
return new Uz(nF(e>=240?e-240:e+120,o,i),nF(e,o,i),nF(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new Qz(eF(this.h),tF(this.s),tF(this.l),Gz(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=Gz(this.opacity)
|
|
12409
|
+
return`${1===e?"hsl(":"hsla("}${eF(this.h)}, ${100*tF(this.s)}%, ${100*tF(this.l)}%${1===e?")":`, ${e})`}`}}))
|
|
12410
|
+
var iF=e=>()=>e
|
|
12411
|
+
function oF(e){return 1==(e=+e)?rF:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}(t,n,e):iF(isNaN(t)?n:t)}}function rF(e,t){var n=t-e
|
|
12412
|
+
return n?function(e,t){return function(n){return e+n*t}}(e,n):iF(isNaN(e)?t:e)}var sF=function e(t){var n=oF(t)
|
|
12413
|
+
function i(e,t){var i=n((e=jz(e)).r,(t=jz(t)).r),o=n(e.g,t.g),r=n(e.b,t.b),s=rF(e.opacity,t.opacity)
|
|
12410
12414
|
return function(t){return e.r=i(t),e.g=o(t),e.b=r(t),e.opacity=s(t),e+""}}return i.gamma=e,i}(1)
|
|
12411
|
-
function
|
|
12415
|
+
function aF(e,t){t||(t=[])
|
|
12412
12416
|
var n,i=e?Math.min(t.length,e.length):0,o=t.slice()
|
|
12413
12417
|
return function(r){for(n=0;n<i;++n)o[n]=e[n]*(1-r)+t[n]*r
|
|
12414
|
-
return o}}function
|
|
12415
|
-
for(n=0;n<o;++n)r[n]=
|
|
12418
|
+
return o}}function lF(e,t){var n,i=t?t.length:0,o=e?Math.min(i,e.length):0,r=new Array(o),s=new Array(i)
|
|
12419
|
+
for(n=0;n<o;++n)r[n]=mF(e[n],t[n])
|
|
12416
12420
|
for(;n<i;++n)s[n]=t[n]
|
|
12417
12421
|
return function(e){for(n=0;n<o;++n)s[n]=r[n](e)
|
|
12418
|
-
return s}}function
|
|
12419
|
-
return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function
|
|
12420
|
-
for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?i[n]=
|
|
12422
|
+
return s}}function cF(e,t){var n=new Date
|
|
12423
|
+
return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function dF(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function hF(e,t){var n,i={},o={}
|
|
12424
|
+
for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?i[n]=mF(e[n],t[n]):o[n]=t[n]
|
|
12421
12425
|
return function(e){for(n in i)o[n]=i[n](e)
|
|
12422
|
-
return o}}var
|
|
12423
|
-
function
|
|
12424
|
-
for(e+="",t+="";(n=
|
|
12426
|
+
return o}}var uF=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pF=new RegExp(uF.source,"g")
|
|
12427
|
+
function fF(e,t){var n,i,o,r=uF.lastIndex=pF.lastIndex=0,s=-1,a=[],l=[]
|
|
12428
|
+
for(e+="",t+="";(n=uF.exec(e))&&(i=pF.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),a[s]?a[s]+=o:a[++s]=o),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:dF(n,i)})),r=pF.lastIndex
|
|
12425
12429
|
return r<t.length&&(o=t.slice(r),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,i=0;i<t;++i)a[(n=l[i]).i]=n.x(e)
|
|
12426
|
-
return a.join("")})}function
|
|
12427
|
-
return null==t||"boolean"===o?
|
|
12428
|
-
function
|
|
12429
|
-
return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*i)&&(n-=e*l,i-=t*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),e*i<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:o,translateY:r,rotate:Math.atan2(t,e)*
|
|
12430
|
+
return a.join("")})}function mF(e,t){var n,i,o=typeof t
|
|
12431
|
+
return null==t||"boolean"===o?iF(t):("number"===o?dF:"string"===o?(n=Hz(t))?(t=n,sF):fF:t instanceof Hz?sF:t instanceof Date?cF:(i=t,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(t)?lF:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?hF:dF:aF))(e,t)}function gF(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var vF,bF=180/Math.PI,wF={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}
|
|
12432
|
+
function yF(e,t,n,i,o,r){var s,a,l
|
|
12433
|
+
return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*i)&&(n-=e*l,i-=t*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),e*i<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:o,translateY:r,rotate:Math.atan2(t,e)*bF,skewX:Math.atan(l)*bF,scaleX:s,scaleY:a}}function xF(e,t,n,i){function o(e){return e.length?e.pop()+" ":""}return function(r,s){var a=[],l=[]
|
|
12430
12434
|
return r=e(r),s=e(s),function(e,i,o,r,s,a){if(e!==o||i!==r){var l=s.push("translate(",null,t,null,n)
|
|
12431
|
-
a.push({i:l-4,x:
|
|
12432
|
-
s.push({i:a-4,x:
|
|
12433
|
-
return a.join("")}}}var xF
|
|
12434
|
-
return t.isIdentity?
|
|
12435
|
-
function
|
|
12435
|
+
a.push({i:l-4,x:dF(e,o)},{i:l-2,x:dF(i,r)})}else(o||r)&&s.push("translate("+o+t+r+n)}(r.translateX,r.translateY,s.translateX,s.translateY,a,l),function(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(o(n)+"rotate(",null,i)-2,x:dF(e,t)})):t&&n.push(o(n)+"rotate("+t+i)}(r.rotate,s.rotate,a,l),function(e,t,n,r){e!==t?r.push({i:n.push(o(n)+"skewX(",null,i)-2,x:dF(e,t)}):t&&n.push(o(n)+"skewX("+t+i)}(r.skewX,s.skewX,a,l),function(e,t,n,i,r,s){if(e!==n||t!==i){var a=r.push(o(r)+"scale(",null,",",null,")")
|
|
12436
|
+
s.push({i:a-4,x:dF(e,n)},{i:a-2,x:dF(t,i)})}else 1===n&&1===i||r.push(o(r)+"scale("+n+","+i+")")}(r.scaleX,r.scaleY,s.scaleX,s.scaleY,a,l),r=s=null,function(e){for(var t,n=-1,i=l.length;++n<i;)a[(t=l[n]).i]=t.x(e)
|
|
12437
|
+
return a.join("")}}}var kF=xF((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"")
|
|
12438
|
+
return t.isIdentity?wF:yF(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),CF=xF((function(e){return null==e?wF:(vF||(vF=document.createElementNS("http://www.w3.org/2000/svg","g")),vF.setAttribute("transform",e),(e=vF.transform.baseVal.consolidate())?yF((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):wF)}),", ",")",")")
|
|
12439
|
+
function SF(e){return((e=Math.exp(e))+1/e)/2}var $F,MF,_F=function e(t,n,i){function o(e,o){var r,s,a=e[0],l=e[1],c=e[2],d=o[0],h=o[1],u=o[2],p=d-a,f=h-l,m=p*p+f*f
|
|
12436
12440
|
if(m<1e-12)s=Math.log(u/c)/t,r=function(e){return[a+e*p,l+e*f,c*Math.exp(t*e*s)]}
|
|
12437
12441
|
else{var g=Math.sqrt(m),v=(u*u-c*c+i*m)/(2*c*n*g),b=(u*u-c*c-i*m)/(2*u*n*g),w=Math.log(Math.sqrt(v*v+1)-v),y=Math.log(Math.sqrt(b*b+1)-b)
|
|
12438
|
-
s=(y-w)/t,r=function(e){var i,o=e*s,r=
|
|
12439
|
-
return[a+d*p,l+d*f,c*r/
|
|
12440
|
-
return e(n,i,i*i)},o}(Math.SQRT2,2,4),
|
|
12441
|
-
function
|
|
12442
|
-
return i.restart(e,t,n),i}function
|
|
12443
|
-
try{!function(){
|
|
12444
|
-
for(var e,t
|
|
12445
|
-
for(;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t
|
|
12446
|
-
|
|
12447
|
-
t>
|
|
12448
|
-
return t=null==t?0:+t,i.restart((n=>{i.stop(),e(n+t)}),t,n),i}
|
|
12449
|
-
n=(null==n?
|
|
12450
|
-
var
|
|
12451
|
-
function
|
|
12442
|
+
s=(y-w)/t,r=function(e){var i,o=e*s,r=SF(w),d=c/(n*g)*(r*(i=t*o+w,((i=Math.exp(2*i))-1)/(i+1))-function(e){return((e=Math.exp(e))-1/e)/2}(w))
|
|
12443
|
+
return[a+d*p,l+d*f,c*r/SF(t*o+w)]}}return r.duration=1e3*s*t/Math.SQRT2,r}return o.rho=function(t){var n=Math.max(.001,+t),i=n*n
|
|
12444
|
+
return e(n,i,i*i)},o}(Math.SQRT2,2,4),EF=0,IF=0,AF=0,OF=1e3,TF=0,RF=0,DF=0,NF="object"==typeof performance&&performance.now?performance:Date,PF="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)}
|
|
12445
|
+
function LF(){return RF||(PF(zF),RF=NF.now()+DF)}function zF(){RF=0}function FF(){this._call=this._time=this._next=null}function VF(e,t,n){var i=new FF
|
|
12446
|
+
return i.restart(e,t,n),i}function HF(){RF=(TF=NF.now())+DF,EF=IF=0
|
|
12447
|
+
try{!function(){LF(),++EF
|
|
12448
|
+
for(var e,t=$F;t;)(e=RF-t._time)>=0&&t._call.call(void 0,e),t=t._next;--EF}()}finally{EF=0,function(){var e,t,n=$F,i=1/0
|
|
12449
|
+
for(;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:$F=t)
|
|
12450
|
+
MF=e,qF(i)}(),RF=0}}function BF(){var e=NF.now(),t=e-TF
|
|
12451
|
+
t>OF&&(DF-=t,TF=e)}function qF(e){EF||(IF&&(IF=clearTimeout(IF)),e-RF>24?(e<1/0&&(IF=setTimeout(HF,e-NF.now()-DF)),AF&&(AF=clearInterval(AF))):(AF||(TF=NF.now(),AF=setInterval(BF,OF)),EF=1,PF(HF)))}function jF(e,t,n){var i=new FF
|
|
12452
|
+
return t=null==t?0:+t,i.restart((n=>{i.stop(),e(n+t)}),t,n),i}FF.prototype=VF.prototype={constructor:FF,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function")
|
|
12453
|
+
n=(null==n?LF():+n)+(null==t?0:+t),this._next||MF===this||(MF?MF._next=this:$F=this,MF=this),this._call=e,this._time=n,qF()},stop:function(){this._call&&(this._call=null,this._time=1/0,qF())}}
|
|
12454
|
+
var UF=iL("start","end","cancel","interrupt"),WF=[],ZF=0,GF=1,KF=2,JF=3,XF=4,YF=5,QF=6
|
|
12455
|
+
function eV(e,t,n,i,o,r){var s=e.__transition
|
|
12452
12456
|
if(s){if(n in s)return}else e.__transition={}
|
|
12453
12457
|
!function(e,t,n){var i,o=e.__transition
|
|
12454
|
-
function r(e){n.state=
|
|
12455
|
-
if(n.state!==
|
|
12456
|
-
for(c in o)if((u=o[c]).name===n.name){if(u.state===
|
|
12457
|
-
u.state===
|
|
12458
|
-
i.length=d+1}}function a(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=
|
|
12459
|
-
n.state===
|
|
12460
|
-
delete e.__transition}o[t]=n,n.timer=
|
|
12461
|
-
if(n.state>
|
|
12462
|
-
return n}function
|
|
12463
|
-
if(n.state>
|
|
12464
|
-
return n}function
|
|
12458
|
+
function r(e){n.state=GF,n.timer.restart(s,n.delay,n.time),n.delay<=e&&s(e-n.delay)}function s(r){var c,d,h,u
|
|
12459
|
+
if(n.state!==GF)return l()
|
|
12460
|
+
for(c in o)if((u=o[c]).name===n.name){if(u.state===JF)return jF(s)
|
|
12461
|
+
u.state===XF?(u.state=QF,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete o[c]):+c<t&&(u.state=QF,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete o[c])}if(jF((function(){n.state===JF&&(n.state=XF,n.timer.restart(a,n.delay,n.time),a(r))})),n.state=KF,n.on.call("start",e,e.__data__,n.index,n.group),n.state===KF){for(n.state=JF,i=new Array(h=n.tween.length),c=0,d=-1;c<h;++c)(u=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=u)
|
|
12462
|
+
i.length=d+1}}function a(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=YF,1),r=-1,s=i.length;++r<s;)i[r].call(e,o)
|
|
12463
|
+
n.state===YF&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var i in n.state=QF,n.timer.stop(),delete o[t],o)return
|
|
12464
|
+
delete e.__transition}o[t]=n,n.timer=VF(r,0,n.time)}(e,n,{name:t,index:i,group:o,on:UF,tween:WF,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:ZF})}function tV(e,t){var n=iV(e,t)
|
|
12465
|
+
if(n.state>ZF)throw new Error("too late; already scheduled")
|
|
12466
|
+
return n}function nV(e,t){var n=iV(e,t)
|
|
12467
|
+
if(n.state>JF)throw new Error("too late; already running")
|
|
12468
|
+
return n}function iV(e,t){var n=e.__transition
|
|
12465
12469
|
if(!n||!(n=n[t]))throw new Error("transition not found")
|
|
12466
|
-
return n}function
|
|
12467
|
-
if(r){for(o in t=null==t?null:t+"",r)(n=r[o]).name===t?(i=n.state>
|
|
12468
|
-
s&&delete e.__transition}}function
|
|
12469
|
-
return function(){var o=
|
|
12470
|
+
return n}function oV(e,t){var n,i,o,r=e.__transition,s=!0
|
|
12471
|
+
if(r){for(o in t=null==t?null:t+"",r)(n=r[o]).name===t?(i=n.state>KF&&n.state<YF,n.state=QF,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[o]):s=!1
|
|
12472
|
+
s&&delete e.__transition}}function rV(e,t){var n,i
|
|
12473
|
+
return function(){var o=nV(this,e),r=o.tween
|
|
12470
12474
|
if(r!==n)for(var s=0,a=(i=n=r).length;s<a;++s)if(i[s].name===t){(i=i.slice()).splice(s,1)
|
|
12471
|
-
break}o.tween=i}}function
|
|
12475
|
+
break}o.tween=i}}function sV(e,t,n){var i,o
|
|
12472
12476
|
if("function"!=typeof n)throw new Error
|
|
12473
|
-
return function(){var r=
|
|
12477
|
+
return function(){var r=nV(this,e),s=r.tween
|
|
12474
12478
|
if(s!==i){o=(i=s).slice()
|
|
12475
12479
|
for(var a={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=a
|
|
12476
|
-
break}l===c&&o.push(a)}r.tween=o}}function
|
|
12477
|
-
return e.each((function(){var e=
|
|
12478
|
-
return("number"==typeof t?
|
|
12480
|
+
break}l===c&&o.push(a)}r.tween=o}}function aV(e,t,n){var i=e._id
|
|
12481
|
+
return e.each((function(){var e=nV(this,i);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return iV(e,i).value[t]}}function lV(e,t){var n
|
|
12482
|
+
return("number"==typeof t?dF:t instanceof Hz?sF:(n=Hz(t))?(t=n,sF):fF)(e,t)}function cV(e){return function(){this.removeAttribute(e)}}function dV(e){return function(){this.removeAttributeNS(e.space,e.local)}}function hV(e,t,n){var i,o,r=n+""
|
|
12479
12483
|
return function(){var s=this.getAttribute(e)
|
|
12480
|
-
return s===r?null:s===i?o:o=t(i=s,n)}}function
|
|
12484
|
+
return s===r?null:s===i?o:o=t(i=s,n)}}function uV(e,t,n){var i,o,r=n+""
|
|
12481
12485
|
return function(){var s=this.getAttributeNS(e.space,e.local)
|
|
12482
|
-
return s===r?null:s===i?o:o=t(i=s,n)}}function
|
|
12486
|
+
return s===r?null:s===i?o:o=t(i=s,n)}}function pV(e,t,n){var i,o,r
|
|
12483
12487
|
return function(){var s,a,l=n(this)
|
|
12484
12488
|
if(null!=l)return(s=this.getAttribute(e))===(a=l+"")?null:s===i&&a===o?r:(o=a,r=t(i=s,l))
|
|
12485
|
-
this.removeAttribute(e)}}function
|
|
12489
|
+
this.removeAttribute(e)}}function fV(e,t,n){var i,o,r
|
|
12486
12490
|
return function(){var s,a,l=n(this)
|
|
12487
12491
|
if(null!=l)return(s=this.getAttributeNS(e.space,e.local))===(a=l+"")?null:s===i&&a===o?r:(o=a,r=t(i=s,l))
|
|
12488
|
-
this.removeAttributeNS(e.space,e.local)}}function
|
|
12492
|
+
this.removeAttributeNS(e.space,e.local)}}function mV(e,t){var n,i
|
|
12489
12493
|
function o(){var o=t.apply(this,arguments)
|
|
12490
|
-
return o!==i&&(n=(i=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function
|
|
12494
|
+
return o!==i&&(n=(i=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function gV(e,t){var n,i
|
|
12491
12495
|
function o(){var o=t.apply(this,arguments)
|
|
12492
|
-
return o!==i&&(n=(i=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function
|
|
12493
|
-
function
|
|
12494
|
-
function
|
|
12495
|
-
|
|
12496
|
-
"function"!=typeof e&&(e=
|
|
12497
|
-
for(var i=this._groups,o=i.length,r=new Array(o),s=0;s<o;++s)for(var a,l,c=i[s],d=c.length,h=r[s]=new Array(d),u=0;u<d;++u)(a=c[u])&&(l=e.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),h[u]=l,
|
|
12498
|
-
return new
|
|
12499
|
-
"function"!=typeof e&&(e=
|
|
12500
|
-
for(var i=this._groups,o=i.length,r=[],s=[],a=0;a<o;++a)for(var l,c=i[a],d=c.length,h=0;h<d;++h)if(l=c[h]){for(var u,p=e.call(l,l.__data__,h,c),f=
|
|
12501
|
-
r.push(p),s.push(l)}return new
|
|
12496
|
+
return o!==i&&(n=(i=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function vV(e,t){return function(){tV(this,e).delay=+t.apply(this,arguments)}}function bV(e,t){return t=+t,function(){tV(this,e).delay=t}}function wV(e,t){return function(){nV(this,e).duration=+t.apply(this,arguments)}}function yV(e,t){return t=+t,function(){nV(this,e).duration=t}}var xV=bz.prototype.constructor
|
|
12497
|
+
function kV(e){return function(){this.style.removeProperty(e)}}var CV=0
|
|
12498
|
+
function SV(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function $V(){return++CV}var MV=bz.prototype
|
|
12499
|
+
SV.prototype={constructor:SV,select:function(e){var t=this._name,n=this._id
|
|
12500
|
+
"function"!=typeof e&&(e=fL(e))
|
|
12501
|
+
for(var i=this._groups,o=i.length,r=new Array(o),s=0;s<o;++s)for(var a,l,c=i[s],d=c.length,h=r[s]=new Array(d),u=0;u<d;++u)(a=c[u])&&(l=e.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),h[u]=l,eV(h[u],t,n,u,h,iV(a,n)))
|
|
12502
|
+
return new SV(r,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id
|
|
12503
|
+
"function"!=typeof e&&(e=gL(e))
|
|
12504
|
+
for(var i=this._groups,o=i.length,r=[],s=[],a=0;a<o;++a)for(var l,c=i[a],d=c.length,h=0;h<d;++h)if(l=c[h]){for(var u,p=e.call(l,l.__data__,h,c),f=iV(l,n),m=0,g=p.length;m<g;++m)(u=p[m])&&eV(u,t,n,m,p,f)
|
|
12505
|
+
r.push(p),s.push(l)}return new SV(r,s,t,n)},selectChild:MV.selectChild,selectChildren:MV.selectChildren,filter:function(e){"function"!=typeof e&&(e=bL(e))
|
|
12502
12506
|
for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r,s=t[o],a=s.length,l=i[o]=[],c=0;c<a;++c)(r=s[c])&&e.call(r,r.__data__,c,s)&&l.push(r)
|
|
12503
|
-
return new
|
|
12507
|
+
return new SV(i,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error
|
|
12504
12508
|
for(var t=this._groups,n=e._groups,i=t.length,o=n.length,r=Math.min(i,o),s=new Array(i),a=0;a<r;++a)for(var l,c=t[a],d=n[a],h=c.length,u=s[a]=new Array(h),p=0;p<h;++p)(l=c[p]||d[p])&&(u[p]=l)
|
|
12505
12509
|
for(;a<i;++a)s[a]=t[a]
|
|
12506
|
-
return new
|
|
12507
|
-
|
|
12508
|
-
return arguments.length<2?
|
|
12509
|
-
return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?
|
|
12510
|
+
return new SV(s,this._parents,this._name,this._id)},selection:function(){return new xV(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=$V(),i=this._groups,o=i.length,r=0;r<o;++r)for(var s,a=i[r],l=a.length,c=0;c<l;++c)if(s=a[c]){var d=iV(s,t)
|
|
12511
|
+
eV(s,e,n,c,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new SV(i,this._parents,e,n)},call:MV.call,nodes:MV.nodes,node:MV.node,size:MV.size,empty:MV.empty,each:MV.each,on:function(e,t){var n=this._id
|
|
12512
|
+
return arguments.length<2?iV(this.node(),n).on.on(e):this.each(function(e,t,n){var i,o,r=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".")
|
|
12513
|
+
return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?tV:nV
|
|
12510
12514
|
return function(){var s=r(this,e),a=s.on
|
|
12511
|
-
a!==i&&(o=(i=a).copy()).on(t,n),s.on=o}}(n,e,t))},attr:function(e,t){var n=
|
|
12512
|
-
return this.attrTween(e,"function"==typeof t?(n.local?pV
|
|
12515
|
+
a!==i&&(o=(i=a).copy()).on(t,n),s.on=o}}(n,e,t))},attr:function(e,t){var n=cL(e),i="transform"===n?CF:lV
|
|
12516
|
+
return this.attrTween(e,"function"==typeof t?(n.local?fV:pV)(n,i,aV(this,"attr."+e,t)):null==t?(n.local?dV:cV)(n):(n.local?uV:hV)(n,i,t))},attrTween:function(e,t){var n="attr."+e
|
|
12513
12517
|
if(arguments.length<2)return(n=this.tween(n))&&n._value
|
|
12514
12518
|
if(null==t)return this.tween(n,null)
|
|
12515
12519
|
if("function"!=typeof t)throw new Error
|
|
12516
|
-
var i=
|
|
12517
|
-
return this.tween(n,(i.local?
|
|
12520
|
+
var i=cL(e)
|
|
12521
|
+
return this.tween(n,(i.local?mV:gV)(i,t))},style:function(e,t,n){var i="transform"==(e+="")?kF:lV
|
|
12518
12522
|
return null==t?this.styleTween(e,function(e,t){var n,i,o
|
|
12519
|
-
return function(){var r=
|
|
12520
|
-
return r===s?null:r===n&&s===i?o:o=t(n=r,i=s)}}(e,i)).on("end.style."+e,
|
|
12521
|
-
return function(){var s=
|
|
12522
|
-
return null==a&&(this.style.removeProperty(e),l=a=
|
|
12523
|
-
return function(){var l=
|
|
12523
|
+
return function(){var r=HL(this,e),s=(this.style.removeProperty(e),HL(this,e))
|
|
12524
|
+
return r===s?null:r===n&&s===i?o:o=t(n=r,i=s)}}(e,i)).on("end.style."+e,kV(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var i,o,r
|
|
12525
|
+
return function(){var s=HL(this,e),a=n(this),l=a+""
|
|
12526
|
+
return null==a&&(this.style.removeProperty(e),l=a=HL(this,e)),s===l?null:s===i&&l===o?r:(o=l,r=t(i=s,a))}}(e,i,aV(this,"style."+e,t))).each(function(e,t){var n,i,o,r,s="style."+t,a="end."+s
|
|
12527
|
+
return function(){var l=nV(this,e),c=l.on,d=null==l.value[s]?r||(r=kV(t)):void 0
|
|
12524
12528
|
c===n&&o===d||(i=(n=c).copy()).on(a,o=d),l.on=i}}(this._id,e)):this.styleTween(e,function(e,t,n){var i,o,r=n+""
|
|
12525
|
-
return function(){var s=
|
|
12529
|
+
return function(){var s=HL(this,e)
|
|
12526
12530
|
return s===r?null:s===i?o:o=t(i=s,n)}}(e,i,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var i="style."+(e+="")
|
|
12527
12531
|
if(arguments.length<2)return(i=this.tween(i))&&i._value
|
|
12528
12532
|
if(null==t)return this.tween(i,null)
|
|
@@ -12530,7 +12534,7 @@ if("function"!=typeof t)throw new Error
|
|
|
12530
12534
|
return this.tween(i,function(e,t,n){var i,o
|
|
12531
12535
|
function r(){var r=t.apply(this,arguments)
|
|
12532
12536
|
return r!==o&&(i=(o=r)&&function(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}(e,r,n)),i}return r._value=t,r}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this)
|
|
12533
|
-
this.textContent=null==t?"":t}}(
|
|
12537
|
+
this.textContent=null==t?"":t}}(aV(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text"
|
|
12534
12538
|
if(arguments.length<1)return(t=this.tween(t))&&t._value
|
|
12535
12539
|
if(null==e)return this.tween(t,null)
|
|
12536
12540
|
if("function"!=typeof e)throw new Error
|
|
@@ -12539,60 +12543,60 @@ function i(){var i=e.apply(this,arguments)
|
|
|
12539
12543
|
return i!==n&&(t=(n=i)&&function(e){return function(t){this.textContent=e.call(this,t)}}(i)),t}return i._value=e,i}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode
|
|
12540
12544
|
for(var n in this.__transition)if(+n!==e)return
|
|
12541
12545
|
t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id
|
|
12542
|
-
if(e+="",arguments.length<2){for(var i,o=
|
|
12543
|
-
return null}return this.each((null==t?
|
|
12544
|
-
return arguments.length?this.each(("function"==typeof e?
|
|
12545
|
-
return arguments.length?this.each(("function"==typeof e?
|
|
12546
|
+
if(e+="",arguments.length<2){for(var i,o=iV(this.node(),n).tween,r=0,s=o.length;r<s;++r)if((i=o[r]).name===e)return i.value
|
|
12547
|
+
return null}return this.each((null==t?rV:sV)(n,e,t))},delay:function(e){var t=this._id
|
|
12548
|
+
return arguments.length?this.each(("function"==typeof e?vV:bV)(t,e)):iV(this.node(),t).delay},duration:function(e){var t=this._id
|
|
12549
|
+
return arguments.length?this.each(("function"==typeof e?wV:yV)(t,e)):iV(this.node(),t).duration},ease:function(e){var t=this._id
|
|
12546
12550
|
return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error
|
|
12547
|
-
return function(){
|
|
12551
|
+
return function(){nV(this,e).ease=t}}(t,e)):iV(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error
|
|
12548
12552
|
return this.each(function(e,t){return function(){var n=t.apply(this,arguments)
|
|
12549
12553
|
if("function"!=typeof n)throw new Error
|
|
12550
|
-
|
|
12554
|
+
nV(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,i=n._id,o=n.size()
|
|
12551
12555
|
return new Promise((function(r,s){var a={value:s},l={value:function(){0==--o&&r()}}
|
|
12552
|
-
n.each((function(){var n=
|
|
12553
|
-
o!==e&&((t=(e=o).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),n.on=t})),0===o&&r()}))},[Symbol.iterator]
|
|
12554
|
-
var
|
|
12555
|
-
function
|
|
12556
|
-
return n}
|
|
12557
|
-
e instanceof
|
|
12558
|
-
for(var i=this._groups,o=i.length,r=0;r<o;++r)for(var s,a=i[r],l=a.length,c=0;c<l;++c)(s=a[c])&&
|
|
12559
|
-
return new
|
|
12560
|
-
var
|
|
12561
|
-
function
|
|
12562
|
-
var
|
|
12563
|
-
function
|
|
12564
|
-
return e.__zoom}function
|
|
12565
|
-
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
|
|
12566
|
-
return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}function
|
|
12567
|
-
function v(e){e.property("__zoom",
|
|
12568
|
-
return i===e.x&&o===e.y?e:new
|
|
12556
|
+
n.each((function(){var n=nV(this,i),o=n.on
|
|
12557
|
+
o!==e&&((t=(e=o).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),n.on=t})),0===o&&r()}))},[Symbol.iterator]:MV[Symbol.iterator]}
|
|
12558
|
+
var _V={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}}
|
|
12559
|
+
function EV(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`)
|
|
12560
|
+
return n}bz.prototype.interrupt=function(e){return this.each((function(){oV(this,e)}))},bz.prototype.transition=function(e){var t,n
|
|
12561
|
+
e instanceof SV?(t=e._id,e=e._name):(t=$V(),(n=_V).time=LF(),e=null==e?null:e+"")
|
|
12562
|
+
for(var i=this._groups,o=i.length,r=0;r<o;++r)for(var s,a=i[r],l=a.length,c=0;c<l;++c)(s=a[c])&&eV(s,e,t,c,a,n||EV(s,t))
|
|
12563
|
+
return new SV(i,this._parents,e,t)}
|
|
12564
|
+
var IV=e=>()=>e
|
|
12565
|
+
function AV(e,{sourceEvent:t,target:n,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function OV(e,t,n){this.k=e,this.x=t,this.y=n}OV.prototype={constructor:OV,scale:function(e){return 1===e?this:new OV(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new OV(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+")"}}
|
|
12566
|
+
var TV=new OV(1,0,0)
|
|
12567
|
+
function RV(e){for(;!e.__zoom;)if(!(e=e.parentNode))return TV
|
|
12568
|
+
return e.__zoom}function DV(e){e.stopImmediatePropagation()}function NV(e){e.preventDefault(),e.stopImmediatePropagation()}function PV(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function LV(){var e=this
|
|
12569
|
+
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 zV(){return this.__zoom||TV}function FV(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function VV(){return navigator.maxTouchPoints||"ontouchstart"in this}function HV(e,t,n){var i=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1]
|
|
12570
|
+
return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}function BV(){var e,t,n,i=PV,o=LV,r=HV,s=FV,a=VV,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,h=_F,u=iL("start","zoom","end"),p=500,f=150,m=0,g=10
|
|
12571
|
+
function v(e){e.property("__zoom",zV).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",$).on("dblclick.zoom",M).filter(a).on("touchstart.zoom",_).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",I).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new OV(t,e.x,e.y)}function w(e,t,n){var i=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k
|
|
12572
|
+
return i===e.x&&o===e.y?e:new OV(e.k,i,o)}function y(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function x(e,t,n,i){e.on("start.zoom",(function(){k(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){k(this,arguments).event(i).end()})).tween("zoom",(function(){var e=this,r=arguments,s=k(e,r).event(i),a=o.apply(e,r),l=null==n?y(a):"function"==typeof n?n.apply(e,r):n,c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),d=e.__zoom,u="function"==typeof t?t.apply(e,r):t,p=h(d.invert(l).concat(c/d.k),u.invert(l).concat(c/u.k))
|
|
12569
12573
|
return function(e){if(1===e)e=u
|
|
12570
12574
|
else{var t=p(e),n=c/t[2]
|
|
12571
|
-
e=new
|
|
12575
|
+
e=new OV(n,l[0]-t[0]*n,l[1]-t[1]*n)}s.zoom(null,e)}}))}function k(e,t,n){return!n&&e.__zooming||new C(e,t)}function C(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,t),this.taps=0}function S(e,...t){if(i.apply(this,arguments)){var n=k(this,t).event(e),o=this.__zoom,a=Math.max(l[0],Math.min(l[1],o.k*Math.pow(2,s.apply(this,arguments)))),d=yz(e)
|
|
12572
12576
|
if(n.wheel)n.mouse[0][0]===d[0]&&n.mouse[0][1]===d[1]||(n.mouse[1]=o.invert(n.mouse[0]=d)),clearTimeout(n.wheel)
|
|
12573
12577
|
else{if(o.k===a)return
|
|
12574
|
-
n.mouse=[d,o.invert(d)],
|
|
12575
|
-
s.moved=t*t+n*n>m}s.event(e).zoom("mouse",r(w(s.that.__zoom,s.mouse[0]=
|
|
12576
|
-
t&&(i.on("click.drag",xz
|
|
12577
|
-
!function(e){var t=e.document.documentElement,n=
|
|
12578
|
-
"onselectstart"in t?n.on("selectstart.drag",xz
|
|
12579
|
-
|
|
12580
|
-
for(
|
|
12581
|
-
e&&(e=clearTimeout(e)),r&&(h.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),p)),
|
|
12582
|
-
for(
|
|
12578
|
+
n.mouse=[d,o.invert(d)],oV(this),n.start()}NV(e),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),f),n.zoom("mouse",r(w(b(o,a),n.mouse[0],n.mouse[1]),n.extent,c))}}function $(e,...t){if(!n&&i.apply(this,arguments)){var o=e.currentTarget,s=k(this,t,!0).event(e),a=wz(e.view).on("mousemove.zoom",(function(e){if(NV(e),!s.moved){var t=e.clientX-d,n=e.clientY-h
|
|
12579
|
+
s.moved=t*t+n*n>m}s.event(e).zoom("mouse",r(w(s.that.__zoom,s.mouse[0]=yz(e,o),s.mouse[1]),s.extent,c))}),!0).on("mouseup.zoom",(function(e){a.on("mousemove.zoom mouseup.zoom",null),function(e,t){var n=e.document.documentElement,i=wz(e).on("dragstart.drag",null)
|
|
12580
|
+
t&&(i.on("click.drag",kz,xz),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(e.view,s.moved),NV(e),s.event(e).end()}),!0),l=yz(e,o),d=e.clientX,h=e.clientY
|
|
12581
|
+
!function(e){var t=e.document.documentElement,n=wz(e).on("dragstart.drag",kz,xz)
|
|
12582
|
+
"onselectstart"in t?n.on("selectstart.drag",kz,xz):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}(e.view),DV(e),s.mouse=[l,this.__zoom.invert(l)],oV(this),s.start()}}function M(e,...t){if(i.apply(this,arguments)){var n=this.__zoom,s=yz(e.changedTouches?e.changedTouches[0]:e,this),a=n.invert(s),l=n.k*(e.shiftKey?.5:2),h=r(w(b(n,l),s,a),o.apply(this,t),c)
|
|
12583
|
+
NV(e),d>0?wz(this).transition().duration(d).call(x,h,s,e):wz(this).call(v.transform,h,s,e)}}function _(n,...o){if(i.apply(this,arguments)){var r,s,a,l,c=n.touches,d=c.length,h=k(this,o,n.changedTouches.length===d).event(n)
|
|
12584
|
+
for(DV(n),s=0;s<d;++s)l=[l=yz(a=c[s],this),this.__zoom.invert(l),a.identifier],h.touch0?h.touch1||h.touch0[2]===l[2]||(h.touch1=l,h.taps=0):(h.touch0=l,r=!0,h.taps=1+!!e)
|
|
12585
|
+
e&&(e=clearTimeout(e)),r&&(h.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),p)),oV(this),h.start())}}function E(e,...t){if(this.__zooming){var n,i,o,s,a=k(this,t).event(e),l=e.changedTouches,d=l.length
|
|
12586
|
+
for(NV(e),n=0;n<d;++n)o=yz(i=l[n],this),a.touch0&&a.touch0[2]===i.identifier?a.touch0[0]=o:a.touch1&&a.touch1[2]===i.identifier&&(a.touch1[0]=o)
|
|
12583
12587
|
if(i=a.that.__zoom,a.touch1){var h=a.touch0[0],u=a.touch0[1],p=a.touch1[0],f=a.touch1[1],m=(m=p[0]-h[0])*m+(m=p[1]-h[1])*m,g=(g=f[0]-u[0])*g+(g=f[1]-u[1])*g
|
|
12584
12588
|
i=b(i,Math.sqrt(m/g)),o=[(h[0]+p[0])/2,(h[1]+p[1])/2],s=[(u[0]+f[0])/2,(u[1]+f[1])/2]}else{if(!a.touch0)return
|
|
12585
12589
|
o=a.touch0[0],s=a.touch0[1]}a.zoom("touch",r(w(i,o,s),a.extent,c))}}function I(e,...i){if(this.__zooming){var o,r,s=k(this,i).event(e),a=e.changedTouches,l=a.length
|
|
12586
|
-
for(
|
|
12590
|
+
for(DV(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),p),o=0;o<l;++o)r=a[o],s.touch0&&s.touch0[2]===r.identifier?delete s.touch0:s.touch1&&s.touch1[2]===r.identifier&&delete s.touch1
|
|
12587
12591
|
if(s.touch1&&!s.touch0&&(s.touch0=s.touch1,delete s.touch1),s.touch0)s.touch0[1]=this.__zoom.invert(s.touch0[0])
|
|
12588
|
-
else if(s.end(),2===s.taps&&(r=
|
|
12592
|
+
else if(s.end(),2===s.taps&&(r=yz(r,this),Math.hypot(t[0]-r[0],t[1]-r[1])<g)){var c=wz(this).on("dblclick.zoom")
|
|
12589
12593
|
c&&c.apply(this,arguments)}}}return v.transform=function(e,t,n,i){var o=e.selection?e.selection():e
|
|
12590
|
-
o.property("__zoom",
|
|
12594
|
+
o.property("__zoom",zV),e!==o?x(e,t,n,i):o.interrupt().each((function(){k(this,arguments).event(i).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()}))},v.scaleBy=function(e,t,n,i){v.scaleTo(e,(function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)}),n,i)},v.scaleTo=function(e,t,n,i){v.transform(e,(function(){var e=o.apply(this,arguments),i=this.__zoom,s=null==n?y(e):"function"==typeof n?n.apply(this,arguments):n,a=i.invert(s),l="function"==typeof t?t.apply(this,arguments):t
|
|
12591
12595
|
return r(w(b(i,l),s,a),e,c)}),n,i)},v.translateBy=function(e,t,n,i){v.transform(e,(function(){return r(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),c)}),null,i)},v.translateTo=function(e,t,n,i,s){v.transform(e,(function(){var e=o.apply(this,arguments),s=this.__zoom,a=null==i?y(e):"function"==typeof i?i.apply(this,arguments):i
|
|
12592
|
-
return r(
|
|
12593
|
-
u.call(e,this.that,new
|
|
12594
|
-
return e===u?v:e},v.clickDistance=function(e){return arguments.length?(m=(e=+e)*e,v):Math.sqrt(m)},v.tapDistance=function(e){return arguments.length?(g=+e,v):g},v}
|
|
12595
|
-
const
|
|
12596
|
+
return r(TV.translate(a[0],a[1]).scale(s.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,c)}),i,s)},C.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=wz(this.that).datum()
|
|
12597
|
+
u.call(e,this.that,new AV(e,{sourceEvent:this.sourceEvent,target:v,type:e,transform:this.that.__zoom,dispatch:u}),t)}},v.wheelDelta=function(e){return arguments.length?(s="function"==typeof e?e:IV(+e),v):s},v.filter=function(e){return arguments.length?(i="function"==typeof e?e:IV(!!e),v):i},v.touchable=function(e){return arguments.length?(a="function"==typeof e?e:IV(!!e),v):a},v.extent=function(e){return arguments.length?(o="function"==typeof e?e:IV([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),v):o},v.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],v):[l[0],l[1]]},v.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],v):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},v.constrain=function(e){return arguments.length?(r=e,v):r},v.duration=function(e){return arguments.length?(d=+e,v):d},v.interpolate=function(e){return arguments.length?(h=e,v):h},v.on=function(){var e=u.on.apply(u,arguments)
|
|
12598
|
+
return e===u?v:e},v.clickDistance=function(e){return arguments.length?(m=(e=+e)*e,v):Math.sqrt(m)},v.tapDistance=function(e){return arguments.length?(g=+e,v):g},v}RV.prototype=OV.prototype
|
|
12599
|
+
const qV=Z`
|
|
12596
12600
|
<div class="wafer-map-container">
|
|
12597
12601
|
<svg class="svg-root">
|
|
12598
12602
|
<g ${Ne("zoomContainer")} transform=${e=>e.transform.toString()}>
|
|
@@ -12622,7 +12626,7 @@ const BV=Z`
|
|
|
12622
12626
|
/>
|
|
12623
12627
|
</svg>
|
|
12624
12628
|
</div>
|
|
12625
|
-
`,
|
|
12629
|
+
`,jV=we`
|
|
12626
12630
|
:host {
|
|
12627
12631
|
display: inline-block;
|
|
12628
12632
|
width: 500px;
|
|
@@ -12706,68 +12710,68 @@ const BV=Z`
|
|
|
12706
12710
|
outline-width: 0px;
|
|
12707
12711
|
}
|
|
12708
12712
|
`
|
|
12709
|
-
function
|
|
12713
|
+
function UV(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function WV(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ZV(e){let t,n,i
|
|
12710
12714
|
function o(e,i,o=0,r=e.length){if(o<r){if(0!==t(i,i))return r
|
|
12711
12715
|
do{const t=o+r>>>1
|
|
12712
|
-
n(e[t],i)<0?o=t+1:r=t}while(o<r)}return o}return 2!==e.length?(t=
|
|
12716
|
+
n(e[t],i)<0?o=t+1:r=t}while(o<r)}return o}return 2!==e.length?(t=UV,n=(t,n)=>UV(e(t),n),i=(t,n)=>e(t)-n):(t=e===UV||e===WV?e:GV,n=e,i=e),{left:o,center:function(e,t,n=0,r=e.length){const s=o(e,t,n,r-1)
|
|
12713
12717
|
return s>n&&i(e[s-1],t)>-i(e[s],t)?s-1:s},right:function(e,i,o=0,r=e.length){if(o<r){if(0!==t(i,i))return r
|
|
12714
12718
|
do{const t=o+r>>>1
|
|
12715
|
-
n(e[t],i)<=0?o=t+1:r=t}while(o<r)}return o}}}function
|
|
12716
|
-
|
|
12717
|
-
var JV
|
|
12718
|
-
class
|
|
12719
|
+
n(e[t],i)<=0?o=t+1:r=t}while(o<r)}return o}}}function GV(){return 0}function KV(e){return null===e?NaN:+e}const JV=ZV(UV).right
|
|
12720
|
+
ZV(KV).center
|
|
12721
|
+
var XV=JV
|
|
12722
|
+
class YV extends Map{constructor(e,t=eH){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(QV(this,e))}has(e){return super.has(QV(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const i=t(n)
|
|
12719
12723
|
return e.has(i)?e.get(i):(e.set(i,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const i=t(n)
|
|
12720
12724
|
e.has(i)&&(n=e.get(i),e.delete(i))
|
|
12721
|
-
return n}(this,e))}}function
|
|
12722
|
-
return e.has(i)?e.get(i):n}function
|
|
12723
|
-
function
|
|
12725
|
+
return n}(this,e))}}function QV({_intern:e,_key:t},n){const i=t(n)
|
|
12726
|
+
return e.has(i)?e.get(i):n}function eH(e){return null!==e&&"object"==typeof e?e.valueOf():e}const tH=Math.sqrt(50),nH=Math.sqrt(10),iH=Math.sqrt(2)
|
|
12727
|
+
function oH(e,t,n){const i=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(i)),r=i/Math.pow(10,o),s=r>=tH?10:r>=nH?5:r>=iH?2:1
|
|
12724
12728
|
let a,l,c
|
|
12725
|
-
return o<0?(c=Math.pow(10,-o)/s,a=Math.round(e*c),l=Math.round(t*c),a/c<e&&++a,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*s,a=Math.round(e/c),l=Math.round(t/c),a*c<e&&++a,l*c>t&&--l),l<a&&.5<=n&&n<2?
|
|
12729
|
+
return o<0?(c=Math.pow(10,-o)/s,a=Math.round(e*c),l=Math.round(t*c),a/c<e&&++a,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*s,a=Math.round(e/c),l=Math.round(t/c),a*c<e&&++a,l*c>t&&--l),l<a&&.5<=n&&n<2?oH(e,t,2*n):[a,l,c]}function rH(e,t,n){return oH(e=+e,t=+t,n=+n)[2]}function sH(e,t,n=KV){if((i=e.length)&&!isNaN(t=+t)){if(t<=0||i<2)return+n(e[0],0,e)
|
|
12726
12730
|
if(t>=1)return+n(e[i-1],i-1,e)
|
|
12727
12731
|
var i,o=(i-1)*t,r=Math.floor(o),s=+n(e[r],r,e)
|
|
12728
|
-
return s+(+n(e[r+1],r+1,e)-s)*(o-r)}}function
|
|
12732
|
+
return s+(+n(e[r+1],r+1,e)-s)*(o-r)}}function aH(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n
|
|
12729
12733
|
for(var i=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),r=new Array(o);++i<o;)r[i]=e+i*n
|
|
12730
|
-
return r}function
|
|
12734
|
+
return r}function lH(e,t){switch(arguments.length){case 0:break
|
|
12731
12735
|
case 1:this.range(e)
|
|
12732
12736
|
break
|
|
12733
|
-
default:this.range(t).domain(e)}return this}const
|
|
12734
|
-
function
|
|
12737
|
+
default:this.range(t).domain(e)}return this}const cH=Symbol("implicit")
|
|
12738
|
+
function dH(){var e=new YV,t=[],n=[],i=cH
|
|
12735
12739
|
function o(o){let r=e.get(o)
|
|
12736
|
-
if(void 0===r){if(i!==
|
|
12740
|
+
if(void 0===r){if(i!==cH)return i
|
|
12737
12741
|
e.set(o,r=t.push(o)-1)}return n[r%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice()
|
|
12738
|
-
t=[],e=new
|
|
12742
|
+
t=[],e=new YV
|
|
12739
12743
|
for(const i of n)e.has(i)||e.set(i,t.push(i)-1)
|
|
12740
|
-
return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(i=e,o):i},o.copy=function(){return
|
|
12744
|
+
return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(i=e,o):i},o.copy=function(){return dH(t,n).unknown(i)},lH.apply(o,arguments),o}function hH(){var e,t,n=dH().unknown(void 0),i=n.domain,o=n.range,r=0,s=1,a=!1,l=0,c=0,d=.5
|
|
12741
12745
|
function h(){var n=i().length,h=s<r,u=h?s:r,p=h?r:s
|
|
12742
12746
|
e=(p-u)/Math.max(1,n-l+2*c),a&&(e=Math.floor(e)),u+=(p-u-e*(n-l))*d,t=e*(1-l),a&&(u=Math.round(u),t=Math.round(t))
|
|
12743
|
-
var f=
|
|
12744
|
-
return o(h?f.reverse():f)}return delete n.unknown,n.domain=function(e){return arguments.length?(i(e),h()):i()},n.range=function(e){return arguments.length?([r,s]=e,r=+r,s=+s,h()):[r,s]},n.rangeRound=function(e){return[r,s]=e,r=+r,s=+s,a=!0,h()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(a=!!e,h()):a},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),h()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),h()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,h()):c},n.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),h()):d},n.copy=function(){return
|
|
12745
|
-
function
|
|
12746
|
-
var n}function
|
|
12747
|
-
return o<i?(i=
|
|
12748
|
-
for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<i;)o[s]=
|
|
12749
|
-
return function(t){var n=
|
|
12750
|
-
return r[n](o[n](t))}}function
|
|
12747
|
+
var f=aH(n).map((function(t){return u+e*t}))
|
|
12748
|
+
return o(h?f.reverse():f)}return delete n.unknown,n.domain=function(e){return arguments.length?(i(e),h()):i()},n.range=function(e){return arguments.length?([r,s]=e,r=+r,s=+s,h()):[r,s]},n.rangeRound=function(e){return[r,s]=e,r=+r,s=+s,a=!0,h()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(a=!!e,h()):a},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),h()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),h()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,h()):c},n.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),h()):d},n.copy=function(){return hH(i(),[r,s]).round(a).paddingInner(l).paddingOuter(c).align(d)},lH.apply(h(),arguments)}function uH(e){return+e}var pH=[0,1]
|
|
12749
|
+
function fH(e){return e}function mH(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n})
|
|
12750
|
+
var n}function gH(e,t,n){var i=e[0],o=e[1],r=t[0],s=t[1]
|
|
12751
|
+
return o<i?(i=mH(o,i),r=n(s,r)):(i=mH(i,o),r=n(r,s)),function(e){return r(i(e))}}function vH(e,t,n){var i=Math.min(e.length,t.length)-1,o=new Array(i),r=new Array(i),s=-1
|
|
12752
|
+
for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<i;)o[s]=mH(e[s],e[s+1]),r[s]=n(t[s],t[s+1])
|
|
12753
|
+
return function(t){var n=XV(e,t,1,i)-1
|
|
12754
|
+
return r[n](o[n](t))}}function bH(){var e,t,n,i,o,r,s=pH,a=pH,l=mF,c=fH
|
|
12751
12755
|
function d(){var e,t,n,l=Math.min(s.length,a.length)
|
|
12752
|
-
return c!==
|
|
12756
|
+
return c!==fH&&(e=s[0],t=s[l-1],e>t&&(n=e,e=t,t=n),c=function(n){return Math.max(e,Math.min(t,n))}),i=l>2?vH:gH,o=r=null,h}function h(t){return null==t||isNaN(t=+t)?n:(o||(o=i(s.map(e),a,l)))(e(c(t)))}return h.invert=function(n){return c(t((r||(r=i(a,s.map(e),dF)))(n)))},h.domain=function(e){return arguments.length?(s=Array.from(e,uH),d()):s.slice()},h.range=function(e){return arguments.length?(a=Array.from(e),d()):a.slice()},h.rangeRound=function(e){return a=Array.from(e),l=gF,d()},h.clamp=function(e){return arguments.length?(c=!!e||fH,d()):c!==fH},h.interpolate=function(e){return arguments.length?(l=e,d()):l},h.unknown=function(e){return arguments.length?(n=e,h):n},function(n,i){return e=n,t=i,d()}}function wH(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null
|
|
12753
12757
|
var n,i=e.slice(0,n)
|
|
12754
|
-
return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function
|
|
12755
|
-
function
|
|
12758
|
+
return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function yH(e){return(e=wH(Math.abs(e)))?e[1]:NaN}var xH,kH=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i
|
|
12759
|
+
function CH(e){if(!(t=kH.exec(e)))throw new Error("invalid format: "+e)
|
|
12756
12760
|
var t
|
|
12757
|
-
return new
|
|
12761
|
+
return new SH({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 SH(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 $H(e,t){var n=wH(e,t)
|
|
12758
12762
|
if(!n)return e+""
|
|
12759
12763
|
var i=n[0],o=n[1]
|
|
12760
|
-
return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}
|
|
12761
|
-
var
|
|
12764
|
+
return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}CH.prototype=SH.prototype,SH.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}
|
|
12765
|
+
var MH={"%":(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)=>$H(100*e,t),r:$H,s:function(e,t){var n=wH(e,t)
|
|
12762
12766
|
if(!n)return e+""
|
|
12763
|
-
var i=n[0],o=n[1],r=o-(
|
|
12764
|
-
return r===s?i:r>s?i+new Array(r-s+1).join("0"):r>0?i.slice(0,r)+"."+i.slice(r):"0."+new Array(1-r).join("0")+
|
|
12765
|
-
function
|
|
12766
|
-
function
|
|
12767
|
-
return r.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?
|
|
12768
|
-
function h(e){var t=(e=
|
|
12769
|
-
"n"===b?(m=!0,b="g")
|
|
12770
|
-
var w="$"===u?o:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",y="$"===u?r:/[%p]/.test(b)?l:"",x
|
|
12767
|
+
var i=n[0],o=n[1],r=o-(xH=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=i.length
|
|
12768
|
+
return r===s?i:r>s?i+new Array(r-s+1).join("0"):r>0?i.slice(0,r)+"."+i.slice(r):"0."+new Array(1-r).join("0")+wH(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)}
|
|
12769
|
+
function _H(e){return e}var EH,IH,AH,OH=Array.prototype.map,TH=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]
|
|
12770
|
+
function RH(e){var t,n,i=void 0===e.grouping||void 0===e.thousands?_H:(t=OH.call(e.grouping,Number),n=e.thousands+"",function(e,i){for(var o=e.length,r=[],s=0,a=t[0],l=0;o>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),r.push(e.substring(o-=a,o+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length]
|
|
12771
|
+
return r.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?_H:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(OH.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+""
|
|
12772
|
+
function h(e){var t=(e=CH(e)).fill,n=e.align,h=e.sign,u=e.symbol,p=e.zero,f=e.width,m=e.comma,g=e.precision,v=e.trim,b=e.type
|
|
12773
|
+
"n"===b?(m=!0,b="g"):MH[b]||(void 0===g&&(g=12),v=!0,b="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=")
|
|
12774
|
+
var w="$"===u?o:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",y="$"===u?r:/[%p]/.test(b)?l:"",x=MH[b],k=/[defgprs%]/.test(b)
|
|
12771
12775
|
function C(e){var o,r,l,u=w,C=y
|
|
12772
12776
|
if("c"===b)C=x(e)+C,e=""
|
|
12773
12777
|
else{var S=(e=+e)<0||1/e<0
|
|
@@ -12776,7 +12780,7 @@ break
|
|
|
12776
12780
|
case"0":0===o&&(o=i),t=i
|
|
12777
12781
|
break
|
|
12778
12782
|
default:if(!+e[i])break e
|
|
12779
|
-
o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==h&&(S=!1),u=(S?"("===h?h:c:"-"===h||"("===h?"":h)+u,C=("s"===b?
|
|
12783
|
+
o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==h&&(S=!1),u=(S?"("===h?h:c:"-"===h||"("===h?"":h)+u,C=("s"===b?TH[8+xH/3]:"")+C+(S&&"("===h?")":""),k)for(o=-1,r=e.length;++o<r;)if(48>(l=e.charCodeAt(o))||l>57){C=(46===l?s+e.slice(o+1):e.slice(o))+C,e=e.slice(0,o)
|
|
12780
12784
|
break}}m&&!p&&(e=i(e,1/0))
|
|
12781
12785
|
var $=u.length+e.length+C.length,M=$<f?new Array(f-$+1).join(t):""
|
|
12782
12786
|
switch(m&&p&&(e=i(M+e,M.length?f-C.length:1/0),M=""),n){case"<":e=u+e+C+M
|
|
@@ -12785,19 +12789,19 @@ case"=":e=u+M+e+C
|
|
|
12785
12789
|
break
|
|
12786
12790
|
case"^":e=M.slice(0,$=M.length>>1)+u+e+C+M.slice($)
|
|
12787
12791
|
break
|
|
12788
|
-
default:e=M+u+e+C}return a(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return e+""},C}return{format:h,formatPrefix:function(e,t){var n=h(((e=
|
|
12789
|
-
return function(e){return n(o*e)+r}}}}function
|
|
12790
|
-
const i=(t=+t)<(e=+e),o=i?
|
|
12792
|
+
default:e=M+u+e+C}return a(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return e+""},C}return{format:h,formatPrefix:function(e,t){var n=h(((e=CH(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(yH(t)/3))),o=Math.pow(10,-i),r=TH[8+i/3]
|
|
12793
|
+
return function(e){return n(o*e)+r}}}}function DH(e,t,n,i){var o,r=function(e,t,n){n=+n
|
|
12794
|
+
const i=(t=+t)<(e=+e),o=i?rH(t,e,n):rH(e,t,n)
|
|
12791
12795
|
return(i?-1:1)*(o<0?1/-o:o)}(e,t,n)
|
|
12792
|
-
switch((i=
|
|
12793
|
-
return null!=i.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(
|
|
12794
|
-
case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,
|
|
12796
|
+
switch((i=CH(null==i?",f":i)).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t))
|
|
12797
|
+
return null!=i.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(yH(t)/3)))-yH(Math.abs(e)))}(r,s))||(i.precision=o),AH(i,s)
|
|
12798
|
+
case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,yH(t)-yH(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(i.precision=o-("e"===i.type))
|
|
12795
12799
|
break
|
|
12796
|
-
case"f":case"%":null!=i.precision||isNaN(o=function(e){return Math.max(0,-
|
|
12800
|
+
case"f":case"%":null!=i.precision||isNaN(o=function(e){return Math.max(0,-yH(Math.abs(e)))}(r))||(i.precision=o-2*("%"===i.type))}return IH(i)}function NH(e){var t=e.domain
|
|
12797
12801
|
return e.ticks=function(e){var n=t()
|
|
12798
12802
|
return function(e,t,n){if(!((n=+n)>0))return[]
|
|
12799
12803
|
if((e=+e)==(t=+t))return[e]
|
|
12800
|
-
const i=t<e,[o,r,s]=i?
|
|
12804
|
+
const i=t<e,[o,r,s]=i?oH(t,e,n):oH(e,t,n)
|
|
12801
12805
|
if(!(r>=o))return[]
|
|
12802
12806
|
const a=r-o+1,l=new Array(a)
|
|
12803
12807
|
if(i)if(s<0)for(let e=0;e<a;++e)l[e]=(r-e)/-s
|
|
@@ -12805,23 +12809,23 @@ else for(let e=0;e<a;++e)l[e]=(r-e)*s
|
|
|
12805
12809
|
else if(s<0)for(let e=0;e<a;++e)l[e]=(o+e)/-s
|
|
12806
12810
|
else for(let e=0;e<a;++e)l[e]=(o+e)*s
|
|
12807
12811
|
return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var i=t()
|
|
12808
|
-
return
|
|
12812
|
+
return DH(i[0],i[i.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10)
|
|
12809
12813
|
var i,o,r=t(),s=0,a=r.length-1,l=r[s],c=r[a],d=10
|
|
12810
|
-
for(c<l&&(o=l,l=c,c=o,o=s,s=a,a=o);d-- >0;){if((o=
|
|
12814
|
+
for(c<l&&(o=l,l=c,c=o,o=s,s=a,a=o);d-- >0;){if((o=rH(l,c,n))===i)return r[s]=l,r[a]=c,t(r)
|
|
12811
12815
|
if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o
|
|
12812
12816
|
else{if(!(o<0))break
|
|
12813
|
-
l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}i=o}return e},e}function
|
|
12814
|
-
return e.copy=function(){return t=e,
|
|
12815
|
-
var t},
|
|
12817
|
+
l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}i=o}return e},e}function PH(){var e=bH()(fH,fH)
|
|
12818
|
+
return e.copy=function(){return t=e,PH().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())
|
|
12819
|
+
var t},lH.apply(e,arguments),NH(e)}function LH(){var e,t=[],n=[],i=[]
|
|
12816
12820
|
function o(){var e=0,o=Math.max(1,n.length)
|
|
12817
|
-
for(i=new Array(o-1);++e<o;)i[e-1]=
|
|
12818
|
-
return r}function r(t){return null==t||isNaN(t=+t)?e:n[
|
|
12821
|
+
for(i=new Array(o-1);++e<o;)i[e-1]=sH(t,e/o)
|
|
12822
|
+
return r}function r(t){return null==t||isNaN(t=+t)?e:n[XV(i,t)]}return r.invertExtent=function(e){var o=n.indexOf(e)
|
|
12819
12823
|
return o<0?[NaN,NaN]:[o>0?i[o-1]:t[0],o<i.length?i[o]:t[t.length-1]]},r.domain=function(e){if(!arguments.length)return t.slice()
|
|
12820
12824
|
t=[]
|
|
12821
12825
|
for(let n of e)null==n||isNaN(n=+n)||t.push(n)
|
|
12822
|
-
return t.sort(
|
|
12823
|
-
const
|
|
12824
|
-
class
|
|
12826
|
+
return t.sort(UV),o()},r.range=function(e){return arguments.length?(n=Array.from(e),o()):n.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.quantiles=function(){return i.slice()},r.copy=function(){return LH().domain(t).range(n).unknown(e)},lH.apply(r,arguments)}EH=RH({thousands:",",grouping:[3],currency:["$",""]}),IH=EH.format,AH=EH.formatPrefix
|
|
12827
|
+
const zH="bottom-left",FH="bottom-right",VH="top-left",HH="top",BH="show",qH="hide",jH="linear",UH="ordinal"
|
|
12828
|
+
class WH{constructor(e){this.wafermap=e,this.defaultPadding=0,this.baseMarginPercentage=.04}get containerDimensions(){return this._containerDimensions}get dieDimensions(){return this._dieDimensions}get radius(){return this._radius}get margin(){return this._margin}get horizontalScale(){return this._horizontalScale}get verticalScale(){return this._verticalScale}get invertedHorizontalScale(){return this._invertedHorizontalScale}get invertedVerticalScale(){return this._invertedVerticalScale}updateContainerDimensions(){const e={width:this.wafermap.canvasWidth,height:this.wafermap.canvasHeight},t=Math.min(e.width,e.height),n={top:(e.height-t)/2,right:(e.width-t)/2,bottom:(e.height-t)/2,left:(e.width-t)/2},i={top:t*this.baseMarginPercentage,right:t*this.baseMarginPercentage,bottom:t*this.baseMarginPercentage,left:t*this.baseMarginPercentage}
|
|
12825
12829
|
this._margin=this.calculateMarginAddition(i,n),this._containerDimensions=this.calculateContainerDimensions(e,this._margin)
|
|
12826
12830
|
const o=Math.min(this._containerDimensions.width,this._containerDimensions.height)
|
|
12827
12831
|
this._radius=o/2,this.updateScales()}updateScales(){const e=Math.min(this._containerDimensions.width,this._containerDimensions.height),t=this.gridDimensionsValidAndDefined()?this.calculateGridDimensionsFromBoundingBox():this.calculateGridDimensionsFromDies(this.wafermap.dies),n=this.wafermap.originLocation
|
|
@@ -12829,19 +12833,19 @@ this._horizontalScale=this.createHorizontalScale(n,t,e),this._invertedHorizontal
|
|
|
12829
12833
|
return"number"==typeof this.wafermap.gridMaxY&&"number"==typeof this.wafermap.gridMinY&&"number"==typeof this.wafermap.gridMaxX&&"number"==typeof this.wafermap.gridMinX&&(e.origin.x=this.wafermap.gridMinX,e.origin.y=this.wafermap.gridMinY,e.rows=this.wafermap.gridMaxY-this.wafermap.gridMinY+1,e.cols=this.wafermap.gridMaxX-this.wafermap.gridMinX+1),e}calculateGridDimensionsFromDies(e){if(0===e.length||void 0===e[0])return{origin:{x:0,y:0},rows:0,cols:0}
|
|
12830
12834
|
const t={x:e[0].x,y:e[0].y},n={x:e[0].x,y:e[0].y}
|
|
12831
12835
|
for(const i of e)i.x<t.x&&(t.x=i.x),i.y<t.y&&(t.y=i.y),i.x>n.x&&(n.x=i.x),i.y>n.y&&(n.y=i.y)
|
|
12832
|
-
return{origin:t,rows:n.y-t.y+1,cols:n.x-t.x+1}}calculateContainerDimensions(e,t){return{width:e.width-t.left-t.right,height:e.height-t.top-t.bottom}}createHorizontalScale(e,t,n){const i=
|
|
12833
|
-
return e===
|
|
12834
|
-
return e===
|
|
12835
|
-
return e===
|
|
12836
|
-
return e===
|
|
12837
|
-
return void 0===n||void 0===i?null:{x:n+t.right,y:i+t.top,fillStyle:this.calculateFillStyle(e.value,this.wafermap.colorScaleMode,this.wafermap.highlightedTags,e.tags),text:this.buildLabel(e.value,this.wafermap.maxCharacters,this.wafermap.dieLabelsHidden,this.wafermap.dieLabelsSuffix)}}calculateLabelsFontSize(e,t){return Math.min(e.height,e.width/(.5*Math.max(2,t))*this.fontSizeFactor)}createD3ColorScale(e,t){return this.isColorScaleLinear(t)?
|
|
12836
|
+
return{origin:t,rows:n.y-t.y+1,cols:n.x-t.x+1}}calculateContainerDimensions(e,t){return{width:e.width-t.left-t.right,height:e.height-t.top-t.bottom}}createHorizontalScale(e,t,n){const i=hH().domain(aH(t.origin.x,t.origin.x+t.cols)).paddingInner(0).paddingOuter(0).align(0).round(!1)
|
|
12837
|
+
return e===zH||e===VH?i.range([0,n]):i.range([n,0])}createInvertedHorizontalScale(e,t,n){const i=LH().domain([0,n])
|
|
12838
|
+
return e===zH||e===VH?i.range(aH(t.origin.x,t.origin.x+t.cols)):i.range(aH(t.origin.x,t.origin.x+t.cols).reverse())}createVerticalScale(e,t,n){const i=hH().domain(aH(t.origin.y,t.origin.y+t.rows)).paddingInner(this.defaultPadding).paddingOuter(0).align(0).round(!1)
|
|
12839
|
+
return e===zH||e===FH?i.range([n,0]):i.range([0,n])}createInvertedVerticalScale(e,t,n){const i=LH().domain([0,n])
|
|
12840
|
+
return e===zH||e===FH?i.range(aH(t.origin.y,t.origin.y+t.rows).reverse()):i.range(aH(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 ZH{constructor(e,t){this.wafermap=e,this.dataManager=t,this.fontSizeFactor=.8,this.nonHighlightedOpacity=.3,this.emptyDieColor="rgba(218,223,236,1)",this.nanDieColor="rgba(122,122,122,1)"}get labelsFontSize(){return this._labelsFontSize}get diesRenderInfo(){return this._diesRenderInfo}updateLabelsFontSize(){this._labelsFontSize=this.calculateLabelsFontSize(this.dataManager.dieDimensions,this.wafermap.maxCharacters),this.updateDiesRenderInfo()}updateDiesRenderInfo(){this.d3ColorScale=this.createD3ColorScale(this.wafermap.colorScale,this.wafermap.colorScaleMode),this._diesRenderInfo=this.wafermap.dies.map((e=>this.computeDieRenderInfo(e))).filter((e=>null!==e))}computeDieRenderInfo(e){const t=this.dataManager.margin,n=this.dataManager.horizontalScale(e.x),i=this.dataManager.verticalScale(e.y)
|
|
12841
|
+
return void 0===n||void 0===i?null:{x:n+t.right,y:i+t.top,fillStyle:this.calculateFillStyle(e.value,this.wafermap.colorScaleMode,this.wafermap.highlightedTags,e.tags),text:this.buildLabel(e.value,this.wafermap.maxCharacters,this.wafermap.dieLabelsHidden,this.wafermap.dieLabelsSuffix)}}calculateLabelsFontSize(e,t){return Math.min(e.height,e.width/(.5*Math.max(2,t))*this.fontSizeFactor)}createD3ColorScale(e,t){return this.isColorScaleLinear(t)?PH().domain(e.values.map((e=>+e))).range(e.colors):dH().domain(e.values).range(e.colors)}dieHasData(e){return null!=e&&""!==e}buildLabel(e,t,n,i){if(n||!this.dieHasData(e))return""
|
|
12838
12842
|
const o=`${e}${i}`
|
|
12839
12843
|
return o.length>t?`${o.substring(0,t)}…`:o}calculateOpacity(e,t){if(!t||0===t.length)return 1
|
|
12840
12844
|
const n=new Set(t)
|
|
12841
|
-
return e?.some((e=>n.has(e)))?1:this.nonHighlightedOpacity}isColorScaleLinear(e){return e===
|
|
12845
|
+
return e?.some((e=>n.has(e)))?1:this.nonHighlightedOpacity}isColorScaleLinear(e){return e===jH}isColorScaleOrdinal(e){return e===UH}calculateFillStyle(e,t,n,i){let o=this.emptyDieColor
|
|
12842
12846
|
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
|
|
12843
12847
|
let r=Zo(o)
|
|
12844
|
-
return null===r?this.emptyDieColor:(r=new Fo(r.r,r.g,r.b,this.calculateOpacity(i,n)),r.toStringWebRGBA())}}class
|
|
12848
|
+
return null===r?this.emptyDieColor:(r=new Fo(r.r,r.g,r.b,this.calculateOpacity(i,n)),r.toStringWebRGBA())}}class GH{constructor(e){this.wafermap=e,this.computations=new WH(e),this.prerendering=new ZH(e,this)}get containerDimensions(){return this.computations.containerDimensions}get dieDimensions(){return this.computations.dieDimensions}get radius(){return this.computations.radius}get margin(){return this.computations.margin}get horizontalScale(){return this.computations.horizontalScale}get invertedHorizontalScale(){return this.computations.invertedHorizontalScale}get verticalScale(){return this.computations.verticalScale}get invertedVerticalScale(){return this.computations.invertedVerticalScale}get labelsFontSize(){return this.prerendering.labelsFontSize}get diesRenderInfo(){return this.prerendering.diesRenderInfo}get data(){return this.dataMap}updateContainerDimensions(){this.computations.updateContainerDimensions(),this.updateDataMap(),this.updateLabelsFontSize()}updateScales(){this.computations.updateScales(),this.updateDataMap(),this.updateLabelsFontSize()}updateLabelsFontSize(){this.prerendering.updateLabelsFontSize()}updateDiesRenderInfo(){this.prerendering.updateDiesRenderInfo()}getWaferMapDie(e){return this.dataMap.get(`${e.x}_${e.y}`)}updateDataMap(){this.dataMap=new Map(this.wafermap.dies.map((e=>[`${e.x}_${e.y}`,e])))}}class KH{constructor(e){this.wafermap=e,this.minDieDim=50}updateSortedDiesAndDrawWafer(){this.dies=this.wafermap.dataManager.diesRenderInfo.sort(((e,t)=>e.fillStyle>t.fillStyle?1:t.fillStyle>e.fillStyle?-1:0)),this.drawWafer()}drawWafer(){this.wafermap.canvasContext.save(),this.clearCanvas(),this.scaleCanvas(),this.renderDies(),this.renderText(),this.wafermap.canvasContext.restore(),this.renderHover()}renderHover(){this.wafermap.hoverWidth=this.wafermap.dataManager.dieDimensions.width*this.wafermap.transform.k,this.wafermap.hoverHeight=this.wafermap.dataManager.dieDimensions.height*this.wafermap.transform.k,this.wafermap.hoverOpacity=void 0===this.wafermap.hoverDie?qH:BH,this.wafermap.hoverTransform=this.calculateHoverTransform()}calculateHoverTransform(){if(void 0!==this.wafermap.hoverDie){const e=this.wafermap.dataManager.horizontalScale(this.wafermap.hoverDie.x)
|
|
12845
12849
|
if(void 0===e)return""
|
|
12846
12850
|
const t=this.wafermap.dataManager.verticalScale(this.wafermap.hoverDie.y)
|
|
12847
12851
|
if(void 0===t)return""
|
|
@@ -12854,19 +12858,19 @@ if(e*t*(this.wafermap.transform.k||1)>=this.minDieDim){const n=this.wafermap.dat
|
|
|
12854
12858
|
i.font=`${n.toString()}px sans-serif`,i.fillStyle="#ffffff",i.textAlign="center",i.lineCap="butt"
|
|
12855
12859
|
const o=i.measureText("M"),r=this.wafermap.transform.invert([0,0]),s=this.wafermap.transform.invert([this.wafermap.canvas.width,this.wafermap.canvas.height])
|
|
12856
12860
|
r[0]-=e,r[1]-=t
|
|
12857
|
-
for(const n of this.dies)this.isDieVisible(n,r,s)&&i.fillText(n.text,n.x+e/2,n.y+t/2+o.width/2,e-e/100*20)}}clearCanvas(){this.wafermap.canvasContext.clearRect(0,0,this.wafermap.canvas.width,this.wafermap.canvas.height)}scaleCanvas(){this.wafermap.canvasContext.translate(this.wafermap.transform.x,this.wafermap.transform.y),this.wafermap.canvasContext.scale(this.wafermap.transform.k,this.wafermap.transform.k)}isDieVisible(e,t,n){return e.x>=t[0]&&e.x<n[0]&&e.y>=t[1]&&e.y<n[1]}}class
|
|
12858
|
-
t.k===this.minScale?(this.zoomTransform=
|
|
12861
|
+
for(const n of this.dies)this.isDieVisible(n,r,s)&&i.fillText(n.text,n.x+e/2,n.y+t/2+o.width/2,e-e/100*20)}}clearCanvas(){this.wafermap.canvasContext.clearRect(0,0,this.wafermap.canvas.width,this.wafermap.canvas.height)}scaleCanvas(){this.wafermap.canvasContext.translate(this.wafermap.transform.x,this.wafermap.transform.y),this.wafermap.canvasContext.scale(this.wafermap.transform.k,this.wafermap.transform.k)}isDieVisible(e,t,n){return e.x>=t[0]&&e.x<n[0]&&e.y>=t[1]&&e.y<n[1]}}class JH{constructor(e){this.wafermap=e,this.zoomTransform=TV,this.minScale=1.1,this.minExtentPoint=[-100,-100],this.extentPadding=100}createZoomBehavior(){this.zoomBehavior=BV().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=>RV(this.wafermap.canvas).k>=this.minScale||"wheel"===e.type)).on("zoom",(e=>{this.rescale(e)})),this.zoomBehavior(wz(this.wafermap.canvas))}rescale(e){const t=e.transform
|
|
12862
|
+
t.k===this.minScale?(this.zoomTransform=TV,this.zoomBehavior.transform(wz(this.wafermap.canvas),TV)):this.zoomTransform=t,this.wafermap.transform=this.zoomTransform}getZoomMax(e,t){return Math.ceil(t/e*100)}}class XH{constructor(e){this.wafermap=e}mousemove(e){const t={x:e.offsetX,y:e.offsetY}
|
|
12859
12863
|
if(!this.hoversOverDie(this.wafermap,t))return void(this.wafermap.hoverDie=void 0)
|
|
12860
12864
|
const n=this.wafermap.transform.invert([t.x,t.y]),i=this.calculateDieCoordinates(this.wafermap,{x:n[0],y:n[1]})
|
|
12861
|
-
this.wafermap.hoverDie=this.wafermap.dataManager.getWaferMapDie(i)}mouseout(){this.wafermap.hoverDie=void 0}calculateDieCoordinates(e,t){const n=e.originLocation,i=n===
|
|
12865
|
+
this.wafermap.hoverDie=this.wafermap.dataManager.getWaferMapDie(i)}mouseout(){this.wafermap.hoverDie=void 0}calculateDieCoordinates(e,t){const n=e.originLocation,i=n===zH||n===VH?Math.floor:Math.ceil,o=n===zH||n===FH?Math.floor:Math.ceil
|
|
12862
12866
|
return{x:i(e.dataManager.invertedHorizontalScale(t.x-e.dataManager.margin.left)),y:o(e.dataManager.invertedVerticalScale(t.y-e.dataManager.margin.top))}}hoversOverDie(e,t){const n=e.canvasContext.getImageData(t.x,t.y,1,1).data
|
|
12863
12867
|
let i=0
|
|
12864
12868
|
for(const e of n)i+=e
|
|
12865
|
-
return i>0}}class
|
|
12866
|
-
class
|
|
12869
|
+
return i>0}}class YH{constructor(e){this.wafermap=e,this.onWheelMove=e=>{e.preventDefault()},this.onMouseMove=e=>{this.hoverHandler.mousemove(e)},this.onMouseOut=()=>{this.hoverHandler.mouseout()},this.zoomHandler=new JH(e),this.hoverHandler=new XH(e)}attachEvents(){this.zoomHandler.createZoomBehavior(),this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut),this.wafermap.canvas.addEventListener("wheel",this.onWheelMove,{passive:!1})}detachEvents(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut),this.wafermap.canvas.removeEventListener("wheel",this.onWheelMove)}}const QH=["highlightedTags","canvasWidth","canvasHeight","originLocation","gridMinX","gridMaxX","gridMinY","gridMaxY","dies","maxCharacters","colorScale","colorScaleMode","dieLabelsHidden","dieLabelsSuffix","transform","hoverDie"]
|
|
12870
|
+
class eB extends JE{constructor(e){super(QH),this.wafermap=e,this.updateQueued=!1}get requiresEventsUpdate(){return this.isTracked("highlightedTags")||this.isTracked("canvasWidth")||this.isTracked("canvasHeight")||this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")||this.isTracked("maxCharacters")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")||this.isTracked("transform")}get requiresContainerDimensionsUpdate(){return this.isTracked("canvasWidth")||this.isTracked("canvasHeight")}get requiresScalesUpdate(){return this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")}get requiresLabelsFontSizeUpdate(){return this.isTracked("maxCharacters")}get requiresDiesRenderInfoUpdate(){return this.isTracked("highlightedTags")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")}get requiresDrawnWaferUpdate(){return this.isTracked("transform")}get requiresRenderHoverUpdate(){return this.isTracked("hoverDie")}queueUpdate(){this.wafermap.$fastController.isConnected&&(this.updateQueued||(this.updateQueued=!0,u.queueUpdate((()=>{this.wafermap.update(),this.untrackAll(),this.updateQueued=!1}))))}}class tB{constructor(e){this.wafermap=e,this.invalidGridDimensions=!1}getValidity(){return{invalidGridDimensions:this.invalidGridDimensions}}isValid(){return Object.values(this.getValidity()).every((e=>!1===e))}validateGridDimensions(){return this.invalidGridDimensions=!1,void 0===this.wafermap.gridMinX&&void 0===this.wafermap.gridMaxX&&void 0===this.wafermap.gridMinY&&void 0===this.wafermap.gridMaxY?this.invalidGridDimensions=!1:("number"!=typeof this.wafermap.gridMinX||"number"!=typeof this.wafermap.gridMaxX||"number"!=typeof this.wafermap.gridMinY||"number"!=typeof this.wafermap.gridMaxY||this.wafermap.gridMaxX<this.wafermap.gridMinX||this.wafermap.gridMaxY<this.wafermap.gridMinY)&&(this.invalidGridDimensions=!0),!this.invalidGridDimensions}}class nB extends zt{constructor(){super(...arguments),this.waferMapUpdateTracker=new eB(this),this.originLocation=zH,this.gridMinX=void 0,this.gridMaxX=void 0,this.gridMinY=void 0,this.gridMaxY=void 0,this.orientation=HH,this.maxCharacters=4,this.dieLabelsHidden=!1,this.dieLabelsSuffix="",this.colorScaleMode=jH,this.dataManager=new GH(this),this.renderer=new KH(this),this.renderQueued=!1,this.transform=TV,this.hoverTransform="",this.hoverOpacity=qH,this.hoverWidth=0,this.hoverHeight=0,this.highlightedTags=[],this.dies=[],this.colorScale={colors:[],values:[]},this.eventCoordinator=new YH(this),this.resizeObserver=this.createResizeObserver(),this.waferMapValidator=new tB(this)}get validity(){return this.waferMapValidator.getValidity()}connectedCallback(){super.connectedCallback(),this.canvasContext=this.canvas.getContext("2d",{willReadFrequently:!0}),this.resizeObserver.observe(this),this.waferMapUpdateTracker.trackAll()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this)}update(){this.waferMapUpdateTracker.requiresEventsUpdate?(this.eventCoordinator.detachEvents(),this.waferMapValidator.validateGridDimensions(),this.waferMapUpdateTracker.requiresContainerDimensionsUpdate?(this.dataManager.updateContainerDimensions(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresScalesUpdate?(this.dataManager.updateScales(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresLabelsFontSizeUpdate?(this.dataManager.updateLabelsFontSize(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresDiesRenderInfoUpdate?(this.dataManager.updateDiesRenderInfo(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresDrawnWaferUpdate&&this.renderer.drawWafer(),this.eventCoordinator.attachEvents()):this.waferMapUpdateTracker.requiresRenderHoverUpdate&&this.renderer.renderHover()}createResizeObserver(){return new ResizeObserver((e=>{const t=e[0]
|
|
12867
12871
|
if(void 0===t)return
|
|
12868
12872
|
const{height:n,width:i}=t.contentRect
|
|
12869
|
-
this.canvas.width=i,this.canvas.height=n,this.canvasWidth=i,this.canvasHeight=n}))}originLocationChanged(){this.waferMapUpdateTracker.track("originLocation"),this.waferMapUpdateTracker.queueUpdate()}gridMinXChanged(){this.waferMapUpdateTracker.track("gridMinX"),this.waferMapUpdateTracker.queueUpdate()}gridMaxXChanged(){this.waferMapUpdateTracker.track("gridMaxX"),this.waferMapUpdateTracker.queueUpdate()}gridMinYChanged(){this.waferMapUpdateTracker.track("gridMinY"),this.waferMapUpdateTracker.queueUpdate()}gridMaxYChanged(){this.waferMapUpdateTracker.track("gridMaxY"),this.waferMapUpdateTracker.queueUpdate()}maxCharactersChanged(){this.waferMapUpdateTracker.track("maxCharacters"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsHiddenChanged(){this.waferMapUpdateTracker.track("dieLabelsHidden"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsSuffixChanged(){this.waferMapUpdateTracker.track("dieLabelsSuffix"),this.waferMapUpdateTracker.queueUpdate()}colorScaleModeChanged(){this.waferMapUpdateTracker.track("colorScaleMode"),this.waferMapUpdateTracker.queueUpdate()}highlightedTagsChanged(){this.waferMapUpdateTracker.track("highlightedTags"),this.waferMapUpdateTracker.queueUpdate()}diesChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}colorScaleChanged(){this.waferMapUpdateTracker.track("colorScale"),this.waferMapUpdateTracker.queueUpdate()}transformChanged(){this.waferMapUpdateTracker.track("transform"),this.waferMapUpdateTracker.queueUpdate()}canvasWidthChanged(){this.waferMapUpdateTracker.track("canvasWidth"),this.waferMapUpdateTracker.queueUpdate()}canvasHeightChanged(){this.waferMapUpdateTracker.track("canvasHeight"),this.waferMapUpdateTracker.queueUpdate()}hoverDieChanged(){this.$emit("die-hover",{currentDie:this.hoverDie}),this.waferMapUpdateTracker.track("hoverDie"),this.waferMapUpdateTracker.queueUpdate()}}e([se({attribute:"origin-location"})],
|
|
12870
|
-
const nB
|
|
12871
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
12873
|
+
this.canvas.width=i,this.canvas.height=n,this.canvasWidth=i,this.canvasHeight=n}))}originLocationChanged(){this.waferMapUpdateTracker.track("originLocation"),this.waferMapUpdateTracker.queueUpdate()}gridMinXChanged(){this.waferMapUpdateTracker.track("gridMinX"),this.waferMapUpdateTracker.queueUpdate()}gridMaxXChanged(){this.waferMapUpdateTracker.track("gridMaxX"),this.waferMapUpdateTracker.queueUpdate()}gridMinYChanged(){this.waferMapUpdateTracker.track("gridMinY"),this.waferMapUpdateTracker.queueUpdate()}gridMaxYChanged(){this.waferMapUpdateTracker.track("gridMaxY"),this.waferMapUpdateTracker.queueUpdate()}maxCharactersChanged(){this.waferMapUpdateTracker.track("maxCharacters"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsHiddenChanged(){this.waferMapUpdateTracker.track("dieLabelsHidden"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsSuffixChanged(){this.waferMapUpdateTracker.track("dieLabelsSuffix"),this.waferMapUpdateTracker.queueUpdate()}colorScaleModeChanged(){this.waferMapUpdateTracker.track("colorScaleMode"),this.waferMapUpdateTracker.queueUpdate()}highlightedTagsChanged(){this.waferMapUpdateTracker.track("highlightedTags"),this.waferMapUpdateTracker.queueUpdate()}diesChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}colorScaleChanged(){this.waferMapUpdateTracker.track("colorScale"),this.waferMapUpdateTracker.queueUpdate()}transformChanged(){this.waferMapUpdateTracker.track("transform"),this.waferMapUpdateTracker.queueUpdate()}canvasWidthChanged(){this.waferMapUpdateTracker.track("canvasWidth"),this.waferMapUpdateTracker.queueUpdate()}canvasHeightChanged(){this.waferMapUpdateTracker.track("canvasHeight"),this.waferMapUpdateTracker.queueUpdate()}hoverDieChanged(){this.$emit("die-hover",{currentDie:this.hoverDie}),this.waferMapUpdateTracker.track("hoverDie"),this.waferMapUpdateTracker.queueUpdate()}}e([se({attribute:"origin-location"})],nB.prototype,"originLocation",void 0),e([se({attribute:"grid-min-x",converter:oe})],nB.prototype,"gridMinX",void 0),e([se({attribute:"grid-max-x",converter:oe})],nB.prototype,"gridMaxX",void 0),e([se({attribute:"grid-min-y",converter:oe})],nB.prototype,"gridMinY",void 0),e([se({attribute:"grid-max-y",converter:oe})],nB.prototype,"gridMaxY",void 0),e([se],nB.prototype,"orientation",void 0),e([se({attribute:"max-characters",converter:oe})],nB.prototype,"maxCharacters",void 0),e([se({attribute:"die-labels-hidden",mode:"boolean"})],nB.prototype,"dieLabelsHidden",void 0),e([se({attribute:"die-labels-suffix"})],nB.prototype,"dieLabelsSuffix",void 0),e([se({attribute:"color-scale-mode"})],nB.prototype,"colorScaleMode",void 0),e([g],nB.prototype,"canvasWidth",void 0),e([g],nB.prototype,"canvasHeight",void 0),e([g],nB.prototype,"transform",void 0),e([g],nB.prototype,"hoverTransform",void 0),e([g],nB.prototype,"hoverOpacity",void 0),e([g],nB.prototype,"hoverWidth",void 0),e([g],nB.prototype,"hoverHeight",void 0),e([g],nB.prototype,"hoverDie",void 0),e([g],nB.prototype,"highlightedTags",void 0),e([g],nB.prototype,"dies",void 0),e([g],nB.prototype,"colorScale",void 0)
|
|
12874
|
+
const iB=nB.compose({baseName:"wafer-map",template:qV,styles:jV})
|
|
12875
|
+
bi.getOrCreate().withPrefix("nimble").register(iB())}()
|
|
12872
12876
|
//# sourceMappingURL=all-components-bundle.min.js.map
|