@ntix/components-scorad 1.0.3 → 1.0.4
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/README.md +22 -4
- package/dist/@ntix/components-scorad.es.js +31 -18
- package/dist/@ntix/components-scorad.umd.js +11 -11
- package/dist/HTMLScoradValueElement.d.ts +37 -0
- package/dist/ScoradData.d.ts +1 -1
- package/dist/ScoradExtentData.d.ts +11 -7
- package/dist/ScoradExtentWeights.d.ts +1 -1
- package/dist/ScoradIntensityData.d.ts +11 -7
- package/dist/ScoradResources.d.ts +11 -0
- package/dist/ScoradScore.d.ts +14 -1
- package/dist/ScoradSubjectiveData.d.ts +7 -3
- package/dist/component.d.ts +35 -7
- package/dist/componentsScoradLogger.d.ts +8 -0
- package/dist/constants.d.ts +19 -4
- package/dist/extent/component.d.ts +45 -8
- package/dist/getScoradScore.d.ts +1 -2
- package/dist/index.d.ts +1 -0
- package/dist/intensity/component.d.ts +39 -7
- package/dist/label/component.d.ts +1 -1
- package/dist/options/component.d.ts +4 -7
- package/dist/subjective/component.d.ts +40 -7
- package/dist/weightings/component.d.ts +30 -7
- package/docs/HTMLScoradValueElement.md +35 -0
- package/docs/README.md +36 -0
- package/docs/ScoradData.md +13 -0
- package/docs/ScoradExtentData.md +63 -0
- package/docs/ScoradExtentWeights.md +13 -0
- package/docs/ScoradIntensityData.md +64 -0
- package/docs/ScoradResources.md +41 -0
- package/docs/ScoradScore.md +47 -0
- package/docs/ScoradSubjectiveData.md +32 -0
- package/docs/component.md +68 -0
- package/docs/componentsScoradLogger.md +14 -0
- package/docs/constants.md +99 -0
- package/docs/extent.component.md +86 -0
- package/docs/getScoradScore.md +25 -0
- package/docs/intensity.component.md +77 -0
- package/docs/selectScoradWeights.md +25 -0
- package/docs/subjective.component.md +77 -0
- package/docs/validateScoradData.md +26 -0
- package/docs/weightings.component.md +59 -0
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
A professional-grade component library for calculating and visualizing SCORAD (SCORing Atopic Dermatitis) assessments. Developed by Antix Software Limited.
|
|
4
4
|
|
|
5
|
-
<a href="https://antix.co.uk/scorad">
|
|
6
|
-
<img src="https://github-production-user-asset-6210df.s3.amazonaws.com/873305/531299043-0c2a392c-f250-493f-b444-696413df6757.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20260101%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260101T004816Z&X-Amz-Expires=300&X-Amz-Signature=822cca7d3b90525f61745a99c5cc64765128ba7a59b6a3d4f43d433103748ccc&X-Amz-SignedHeaders=host" alt="SCORAD Component Preview" width="320" />
|
|
7
|
-
</a>
|
|
8
|
-
|
|
9
5
|
**View the interactive demo [antix.co.uk/scorad](https://antix.co.uk/scorad)**
|
|
10
6
|
|
|
11
7
|
## Features
|
|
@@ -53,6 +49,28 @@ Then add the component to your HTML:
|
|
|
53
49
|
<scorad-component></scorad-component>
|
|
54
50
|
```
|
|
55
51
|
|
|
52
|
+
## Documentation
|
|
53
|
+
|
|
54
|
+
### 🧱 Components
|
|
55
|
+
*Primary UI elements for building the assessment.*
|
|
56
|
+
|
|
57
|
+
- [**Scorad Root**](./docs/component.md) – The main coordinator and score aggregator.
|
|
58
|
+
- [**Extent (Section A)**](./docs/extent.component.md) – Surface area calculation.
|
|
59
|
+
- [**Intensity (Section B)**](./docs/intensity.component.md) – Clinical sign grading.
|
|
60
|
+
- [**Subjective (Section C)**](./docs/subjective.component.md) – Patient-reported symptoms.
|
|
61
|
+
- [**Weightings**](./docs/weightings.component.md) – Adult/Child toggle.
|
|
62
|
+
|
|
63
|
+
### 📊 Data Models & Logic
|
|
64
|
+
*Records and calculation engines.*
|
|
65
|
+
|
|
66
|
+
- [**ScoradScore**](./docs/ScoradScore.md) – The output structure (A, B, C, Total).
|
|
67
|
+
- [**ScoradData**](./docs/ScoradData.md) – The complete assessment state.
|
|
68
|
+
- [**getScoradScore**](./docs/getScoradScore.md) – The mathematical formula implementation.
|
|
69
|
+
- [**Clinical Constants**](./docs/constants.md) – Max values and defaults.
|
|
70
|
+
|
|
71
|
+
### 🌐 Resources
|
|
72
|
+
- [**Localization (ScoradResources)**](./docs/ScoradResources.md) – UI strings and descriptions.
|
|
73
|
+
|
|
56
74
|
## Licensing
|
|
57
75
|
|
|
58
76
|
This package is NOT open-source. Usage is governed by the Antix Software License.
|
|
@@ -967,7 +967,7 @@ const SCORAD_EXTENT_MAX_VALUE = 100, SCORAD_INTENSITY_MAX_VALUE = 3, SCORAD_SUBJ
|
|
|
967
967
|
lowerLimbs: .28,
|
|
968
968
|
genitals: 0
|
|
969
969
|
};
|
|
970
|
-
var component_default$6 = ":host{--host-display:inline-flex;--host-font-size:1rem;flex-wrap:wrap;justify-content:center;align-items:center;position:relative}label{padding:var(--host-padding-unit)}svg{min-width:14rem;max-width:18rem;margin:var(--host-padding-unit)0;fill:#0000;stroke:var(--host-color);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;flex:16rem;overflow:visible}@media print{svg{flex:0 0 14rem;width:14rem}}path,line{vector-effect:non-scaling-stroke}path{opacity:.333}text,line{opacity:.667}g{outline:none}g[tabindex] path{opacity:1;fill:hsla(var(--scorad-h,0),var(--extent,\"0%\"),50%,var(--opacity,0))
|
|
970
|
+
var component_default$6 = ":host{--host-display:inline-flex;--host-font-size:1rem;flex-wrap:wrap;justify-content:center;align-items:center;position:relative}label{padding:var(--host-padding-unit)}svg{min-width:14rem;max-width:18rem;margin:var(--host-padding-unit)0;fill:#0000;stroke:var(--host-color);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;flex:16rem;overflow:visible}@media print{svg{flex:0 0 14rem;width:14rem}}path,line{vector-effect:non-scaling-stroke}path{opacity:.333}text,line{opacity:.667}g{outline:none}g[tabindex] path{opacity:1;fill:hsla(var(--scorad-h,0),var(--extent,\"0%\"),50%,var(--opacity,0))}:host(:not([aria-readonly=true])) g[tabindex] path{cursor:grab}:host(:not([aria-readonly=true])) :has(:active) g[tabindex] path{cursor:ns-resize}:is(:host(:not([aria-readonly=true])) :not(:has(:active)) g[tabindex]:hover path,:host(:not([aria-readonly=true])) :not(:has(:active)) g[tabindex]:hover line){stroke-width:2px;stroke:var(--host-primary-color);stroke-dasharray:2 3.5;opacity:1}:host(:not([aria-readonly=true])) g[tabindex]:focus path,:host(:not([aria-readonly=true])) g[tabindex]:active path,:host(:not([aria-readonly=true])) g[tabindex].selected path,:host(:not([aria-readonly=true])) g[tabindex]:focus line,:host(:not([aria-readonly=true])) g[tabindex]:active line,:host(:not([aria-readonly=true])) g[tabindex].selected line{stroke-width:2px;stroke:var(--host-primary-color);opacity:1;stroke-dasharray:none!important}g[tabindex] text{fill:var(--host-color);stroke:none;font-size:var(--host-font-size);text-anchor:end}g[tabindex].posterior-trunk text{text-anchor:start}:is(:host(:not([aria-readonly=true])) :not(:has(:active)) g[tabindex]:hover text,:host(:not([aria-readonly=true])) g[tabindex]:focus text,:host(:not([aria-readonly=true])) g[tabindex]:active text,:host(:not([aria-readonly=true])) g[tabindex].selected text){fill:var(--host-primary-color);opacity:1}";
|
|
971
971
|
const selectScoradWeights = (e) => e?.child ? SCORAD_CHILD_WEIGHTS : SCORAD_ADULT_WEIGHTS, validateScoradData = (e) => {
|
|
972
972
|
let t = [], n = (e, n, r) => {
|
|
973
973
|
for (let [i, a] of Object.entries(e)) validateScoradData.isValid(a, r) || t.push(validateScoradData.formatError(n, i, r, a));
|
|
@@ -1090,6 +1090,7 @@ var tag$6 = "scorad-extent", HTMLScoradExtentElement = class extends HTMLCompone
|
|
|
1090
1090
|
render() {
|
|
1091
1091
|
let e = (e) => {
|
|
1092
1092
|
let t = (t) => {
|
|
1093
|
+
if (this.readonly) return;
|
|
1093
1094
|
let n = Math.round(Math.min(100, Math.max(0, t)));
|
|
1094
1095
|
this.setValue({
|
|
1095
1096
|
...this.value,
|
|
@@ -1223,12 +1224,12 @@ __decorate([Att(AttBoolean)], HTMLScoradExtentElement.prototype, "child", void 0
|
|
|
1223
1224
|
name: "has-errors",
|
|
1224
1225
|
write: (e) => e == null ? void 0 : "",
|
|
1225
1226
|
read: !1
|
|
1226
|
-
})], HTMLScoradExtentElement.prototype, "errors", void 0), __decorate([Watch("value", "errors")], HTMLScoradExtentElement.prototype, "afterRender", null), __decorate([Watch("child")], HTMLScoradExtentElement.prototype, "render", null), __decorate([Event()], HTMLScoradExtentElement.prototype, "valueInput", void 0), __decorate([Event()], HTMLScoradExtentElement.prototype, "valueChange", void 0), HTMLScoradExtentElement = __decorate([Component({
|
|
1227
|
+
})], HTMLScoradExtentElement.prototype, "errors", void 0), __decorate([Watch("value", "errors", "readonly")], HTMLScoradExtentElement.prototype, "afterRender", null), __decorate([Watch("child")], HTMLScoradExtentElement.prototype, "render", null), __decorate([Event()], HTMLScoradExtentElement.prototype, "valueInput", void 0), __decorate([Event()], HTMLScoradExtentElement.prototype, "valueChange", void 0), HTMLScoradExtentElement = __decorate([Component({
|
|
1227
1228
|
tag: tag$6,
|
|
1228
1229
|
css: [host_default, component_default$6],
|
|
1229
1230
|
delegatesFocus: !0
|
|
1230
1231
|
})], HTMLScoradExtentElement);
|
|
1231
|
-
var component_default$4 = ":host{--host-display:inline-flex;flex-direction:column;position:relative}scorad-options{align-self:center;margin-left:auto}", component_default$5 = ":host{--host-display:inline-flex;--host-option-width:var(--scorad-option-width,1.5em);--host-option-height:var(--scorad-option-height,1.5em);--host-option-border:var(--scorad-option-border,solid 1px var(--host-color));--host-option-border-selected:var(--scorad-option-border-selected,solid 2px var(--host-color));--host-option-color:var(--scorad-option-color,var(--host-color));--host-option-background:var(--scorad-option-background,transparent);--host-option-color-selected:var(--scorad-option-color-selected,var(--host-background-color));--host-option-background-selected:var(--scorad-option-background-selected,var(--host-color));gap:var(--host-spacing-unit);margin:var(--host-padding-unit)0;outline:none;width:max-content;position:relative}span{height:var(--host-option-height);width:var(--host-option-width);outline:var(--host-option-border);border-radius:var(--host-border-radius);padding:calc(.5*var(--host-padding-unit))var(--host-padding-unit);color:var(--host-option-color);background:var(--host-option-background)
|
|
1232
|
+
var component_default$4 = ":host{--host-display:inline-flex;flex-direction:column;position:relative}scorad-options{align-self:center;margin-left:auto}", component_default$5 = ":host{--host-display:inline-flex;--host-option-width:var(--scorad-option-width,1.5em);--host-option-height:var(--scorad-option-height,1.5em);--host-option-border:var(--scorad-option-border,solid 1px var(--host-color));--host-option-border-selected:var(--scorad-option-border-selected,solid 2px var(--host-color));--host-option-color:var(--scorad-option-color,var(--host-color));--host-option-background:var(--scorad-option-background,transparent);--host-option-color-selected:var(--scorad-option-color-selected,var(--host-background-color));--host-option-background-selected:var(--scorad-option-background-selected,var(--host-color));gap:var(--host-spacing-unit);margin:var(--host-padding-unit)0;outline:none;width:max-content;position:relative}span{height:var(--host-option-height);width:var(--host-option-width);outline:var(--host-option-border);border-radius:var(--host-border-radius);padding:calc(.5*var(--host-padding-unit))var(--host-padding-unit);color:var(--host-option-color);background:var(--host-option-background)}:host(:not([aria-readonly=true])) span{cursor:pointer}span:before{content:\"\";touch-action:none;pointer-events:none}span[aria-selected=true]{outline:var(--host-option-border-selected);color:var(--host-option-color-selected);background:var(--host-option-background-selected)}", tag$5 = "scorad-options", HTMLScoradOptionsElement = class extends HTMLComponentElement {
|
|
1232
1233
|
connectedCallback() {
|
|
1233
1234
|
this.render(), this.addEventListener("focusin", this.handleFocusIn, { once: !0 }), this.addEventListener("click", this.handleClick);
|
|
1234
1235
|
}
|
|
@@ -1306,7 +1307,7 @@ __decorate([Att({
|
|
|
1306
1307
|
})], HTMLScoradOptionsElement.prototype, "max", void 0), __decorate([Att(AttBoolean)], HTMLScoradOptionsElement.prototype, "showHue", void 0), __decorate([Att({
|
|
1307
1308
|
name: "aria-readonly",
|
|
1308
1309
|
...AttTrueFalse
|
|
1309
|
-
})], HTMLScoradOptionsElement.prototype, "readonly", void 0), __decorate([Att({ write: !1 })], HTMLScoradOptionsElement.prototype, "text", void 0), __decorate([Watch("min", "max", "text")], HTMLScoradOptionsElement.prototype, "render", null), __decorate([Watch("value")], HTMLScoradOptionsElement.prototype, "afterRender", null), __decorate([Event()], HTMLScoradOptionsElement.prototype, "valueInput", void 0), __decorate([Event()], HTMLScoradOptionsElement.prototype, "valueChange", void 0), HTMLScoradOptionsElement = __decorate([Component({
|
|
1310
|
+
})], HTMLScoradOptionsElement.prototype, "readonly", void 0), __decorate([Att({ write: !1 })], HTMLScoradOptionsElement.prototype, "text", void 0), __decorate([Watch("min", "max", "text")], HTMLScoradOptionsElement.prototype, "render", null), __decorate([Watch("value", "readonly")], HTMLScoradOptionsElement.prototype, "afterRender", null), __decorate([Event()], HTMLScoradOptionsElement.prototype, "valueInput", void 0), __decorate([Event()], HTMLScoradOptionsElement.prototype, "valueChange", void 0), HTMLScoradOptionsElement = __decorate([Component({
|
|
1310
1311
|
tag: tag$5,
|
|
1311
1312
|
css: [host_default, component_default$5]
|
|
1312
1313
|
})], HTMLScoradOptionsElement);
|
|
@@ -1329,7 +1330,7 @@ var tag$4 = "scorad-intensity", HTMLScoradIntensityElement = class extends HTMLC
|
|
|
1329
1330
|
n.dataset.value = `${t}`;
|
|
1330
1331
|
let r = n.querySelector("scorad-options");
|
|
1331
1332
|
if (!r) return;
|
|
1332
|
-
r.value = t, r.style.setProperty("--host-option-border", this.errors?.[e] == null ? null : "solid 1px var(--host-error-color)");
|
|
1333
|
+
r.value = t, r.readonly = this.readonly, r.style.setProperty("--host-option-border", this.errors?.[e] == null ? null : "solid 1px var(--host-error-color)");
|
|
1333
1334
|
}
|
|
1334
1335
|
}
|
|
1335
1336
|
render() {
|
|
@@ -1371,7 +1372,7 @@ __decorate([Att({
|
|
|
1371
1372
|
name: "has-errors",
|
|
1372
1373
|
write: (e) => e == null ? void 0 : "",
|
|
1373
1374
|
read: !1
|
|
1374
|
-
})], HTMLScoradIntensityElement.prototype, "errors", void 0), __decorate([Watch("value", "errors")], HTMLScoradIntensityElement.prototype, "afterRender", null), __decorate([Event()], HTMLScoradIntensityElement.prototype, "valueInput", void 0), __decorate([Event()], HTMLScoradIntensityElement.prototype, "valueChange", void 0), HTMLScoradIntensityElement = __decorate([Component({
|
|
1375
|
+
})], HTMLScoradIntensityElement.prototype, "errors", void 0), __decorate([Watch("value", "errors", "readonly")], HTMLScoradIntensityElement.prototype, "afterRender", null), __decorate([Event()], HTMLScoradIntensityElement.prototype, "valueInput", void 0), __decorate([Event()], HTMLScoradIntensityElement.prototype, "valueChange", void 0), HTMLScoradIntensityElement = __decorate([Component({
|
|
1375
1376
|
tag: tag$4,
|
|
1376
1377
|
css: [host_default, component_default$4],
|
|
1377
1378
|
delegatesFocus: !0
|
|
@@ -1380,6 +1381,7 @@ var component_default$3 = ":host{--host-display:inline-flex;--scorad-label-text-
|
|
|
1380
1381
|
connectedCallback() {
|
|
1381
1382
|
this.render();
|
|
1382
1383
|
}
|
|
1384
|
+
readonly = !1;
|
|
1383
1385
|
value = SCORAD_SUBJECTIVE_DEFAULT;
|
|
1384
1386
|
score;
|
|
1385
1387
|
errors;
|
|
@@ -1394,7 +1396,7 @@ var component_default$3 = ":host{--host-display:inline-flex;--scorad-label-text-
|
|
|
1394
1396
|
n.dataset.value = `${t}`;
|
|
1395
1397
|
let r = n.querySelector("scorad-options");
|
|
1396
1398
|
if (!r) return;
|
|
1397
|
-
r.value = t, r.style.setProperty("--host-option-border", this.errors?.[e] == null ? null : "solid 1px var(--host-error-color)");
|
|
1399
|
+
r.value = t, r.readonly = this.readonly, r.style.setProperty("--host-option-border", this.errors?.[e] == null ? null : "solid 1px var(--host-error-color)");
|
|
1398
1400
|
}
|
|
1399
1401
|
}
|
|
1400
1402
|
render() {
|
|
@@ -1424,10 +1426,13 @@ var component_default$3 = ":host{--host-display:inline-flex;--scorad-label-text-
|
|
|
1424
1426
|
valueChange;
|
|
1425
1427
|
};
|
|
1426
1428
|
__decorate([Att({
|
|
1429
|
+
name: "aria-readonly",
|
|
1430
|
+
...AttTrueFalse
|
|
1431
|
+
})], HTMLScoradSubjectiveElement.prototype, "readonly", void 0), __decorate([Att({
|
|
1427
1432
|
name: "has-errors",
|
|
1428
1433
|
write: (e) => e == null ? void 0 : "",
|
|
1429
1434
|
read: !1
|
|
1430
|
-
})], HTMLScoradSubjectiveElement.prototype, "errors", void 0), __decorate([Watch("value", "errors")], HTMLScoradSubjectiveElement.prototype, "afterRender", null), __decorate([Event()], HTMLScoradSubjectiveElement.prototype, "valueInput", void 0), __decorate([Event()], HTMLScoradSubjectiveElement.prototype, "valueChange", void 0), HTMLScoradSubjectiveElement = __decorate([Component({
|
|
1435
|
+
})], HTMLScoradSubjectiveElement.prototype, "errors", void 0), __decorate([Watch("value", "errors", "readonly")], HTMLScoradSubjectiveElement.prototype, "afterRender", null), __decorate([Event()], HTMLScoradSubjectiveElement.prototype, "valueInput", void 0), __decorate([Event()], HTMLScoradSubjectiveElement.prototype, "valueChange", void 0), HTMLScoradSubjectiveElement = __decorate([Component({
|
|
1431
1436
|
tag: tag$3,
|
|
1432
1437
|
css: [host_default, component_default$3],
|
|
1433
1438
|
delegatesFocus: !0
|
|
@@ -1436,6 +1441,7 @@ var component_default$2 = ":host{--host-display:inline-flex;padding:0 var(--host
|
|
|
1436
1441
|
connectedCallback() {
|
|
1437
1442
|
this.render();
|
|
1438
1443
|
}
|
|
1444
|
+
readonly = !1;
|
|
1439
1445
|
value = !1;
|
|
1440
1446
|
afterRender() {
|
|
1441
1447
|
if (this.value == null) {
|
|
@@ -1444,7 +1450,7 @@ var component_default$2 = ":host{--host-display:inline-flex;padding:0 var(--host
|
|
|
1444
1450
|
}
|
|
1445
1451
|
if (!this.shadowRoot) return;
|
|
1446
1452
|
let e = this.shadowRoot.querySelector("scorad-options");
|
|
1447
|
-
e && (e.value = this.value ? 1 : 0, e.text = ["Adult", "Child"]);
|
|
1453
|
+
e && (e.value = this.value ? 1 : 0, e.text = ["Adult", "Child"], e.readonly = this.readonly);
|
|
1448
1454
|
}
|
|
1449
1455
|
render() {
|
|
1450
1456
|
return html`
|
|
@@ -1460,7 +1466,10 @@ var component_default$2 = ":host{--host-display:inline-flex;padding:0 var(--host
|
|
|
1460
1466
|
valueInput;
|
|
1461
1467
|
valueChange;
|
|
1462
1468
|
};
|
|
1463
|
-
__decorate([
|
|
1469
|
+
__decorate([Att({
|
|
1470
|
+
name: "aria-readonly",
|
|
1471
|
+
...AttTrueFalse
|
|
1472
|
+
})], HTMLScoradWeightingsElement.prototype, "readonly", void 0), __decorate([Watch("value", "readonly")], HTMLScoradWeightingsElement.prototype, "afterRender", null), __decorate([Event()], HTMLScoradWeightingsElement.prototype, "valueInput", void 0), __decorate([Event()], HTMLScoradWeightingsElement.prototype, "valueChange", void 0), HTMLScoradWeightingsElement = __decorate([Component({
|
|
1464
1473
|
tag: tag$2,
|
|
1465
1474
|
css: [host_default, component_default$2],
|
|
1466
1475
|
delegatesFocus: !0
|
|
@@ -1479,12 +1488,12 @@ const getScoradScore = (e) => {
|
|
|
1479
1488
|
};
|
|
1480
1489
|
var component_default$1 = ":host{--host-display:var(--scorad-label-display,inline-flex);--host-options:var(--scorad-label-options,solid 1px var(--host-color));--host-text-min-width:var(--scorad-label-text-min-width,none);--host-text-max-width:var(--scorad-label-text-max-width,none);grid-column:1/3;grid-template-columns:subgrid;padding:var(--host-padding-unit);border-radius:var(--host-border-radius-outer);flex-wrap:wrap;align-content:baseline;align-items:baseline;position:relative}:host(:hover){outline:var(--host-outline-hover)}:host(:focus-within){outline:var(--host-outline-focus)}:host>label{min-width:var(--host-text-min-width);max-width:var(--host-text-max-width)}:host>label>slot[name=text]{transition:all .2s ease-in-out;display:block}:host>label>slot[name=description]{opacity:0;margin-bottom:-1.1em;transition:all .4s ease-in-out;display:block}:host(:hover)>label>slot[name=text],:host(:focus-within)>label>slot[name=text]{transform:translateY(-.5em)}:host(:hover)>label>slot[name=description],:host(:focus-within)>label>slot[name=description]{opacity:.667;transform:translateY(-.6em)}@media print{:host>label>slot[name=text]{transform:translateY(-.5em)}:host>label>slot[name=description]{opacity:.667;transform:translateY(-.6em)}}:host>label{padding:var(--host-padding-unit);flex:1;padding-left:0}", tag$1 = "scorad-label", HTMLScoradLabelElement = class extends HTMLComponentElement {
|
|
1481
1490
|
connectedCallback() {
|
|
1482
|
-
this.render(), this.addEventListener("click", this.
|
|
1491
|
+
this.render(), this.addEventListener("click", this.handleClick);
|
|
1483
1492
|
}
|
|
1484
1493
|
diconnectedCallback() {
|
|
1485
|
-
this.removeEventListener("click", this.
|
|
1494
|
+
this.removeEventListener("click", this.handleClick);
|
|
1486
1495
|
}
|
|
1487
|
-
|
|
1496
|
+
handleClick = (e) => {
|
|
1488
1497
|
this.querySelector(FOCUSABLE)?.focus();
|
|
1489
1498
|
};
|
|
1490
1499
|
text = "(label)";
|
|
@@ -1507,6 +1516,7 @@ var tag = "scorad-component", HTMLScoradElement = class extends HTMLComponentEle
|
|
|
1507
1516
|
connectedCallback() {
|
|
1508
1517
|
this.render();
|
|
1509
1518
|
}
|
|
1519
|
+
readonly = !1;
|
|
1510
1520
|
value = SCORAD_DEFAULT;
|
|
1511
1521
|
showErrors = !1;
|
|
1512
1522
|
afterRender() {
|
|
@@ -1523,13 +1533,13 @@ var tag = "scorad-component", HTMLScoradElement = class extends HTMLComponentEle
|
|
|
1523
1533
|
}, n);
|
|
1524
1534
|
e.innerText = `${t?.total ?? "Get Score"}`, e.style.color = this.showErrors && r != n ? "var(--host-error-color)" : "";
|
|
1525
1535
|
let i = this.shadowRoot.querySelector("scorad-subjective");
|
|
1526
|
-
i && (i.value = this.value?.subjective ?? SCORAD_SUBJECTIVE_DEFAULT, i.score = t?.B, this.showErrors && (i.errors = getValue(r, "subjective")));
|
|
1536
|
+
i && (i.value = this.value?.subjective ?? SCORAD_SUBJECTIVE_DEFAULT, i.score = t?.B, i.readonly = this.readonly, this.showErrors && (i.errors = getValue(r, "subjective")));
|
|
1527
1537
|
let a = this.shadowRoot.querySelector("scorad-intensity");
|
|
1528
|
-
a && (a.value = this.value?.intensity ?? SCORAD_INTENSITY_DEFAULT, a.score = t?.B, this.showErrors && (a.errors = getValue(r, "intensity")));
|
|
1538
|
+
a && (a.value = this.value?.intensity ?? SCORAD_INTENSITY_DEFAULT, a.score = t?.B, a.readonly = this.readonly, this.showErrors && (a.errors = getValue(r, "intensity")));
|
|
1529
1539
|
let o = this.shadowRoot.querySelector("scorad-extent");
|
|
1530
|
-
o && (o.child = this.value?.child ?? !1, o.value = this.value?.extent ?? SCORAD_EXTENT_DEFAULT, o.score = t?.A, this.showErrors && (o.errors = getValue(r, "extent")));
|
|
1540
|
+
o && (o.child = this.value?.child ?? !1, o.value = this.value?.extent ?? SCORAD_EXTENT_DEFAULT, o.score = t?.A, o.readonly = this.readonly, this.showErrors && (o.errors = getValue(r, "extent")));
|
|
1531
1541
|
let s = this.shadowRoot.querySelector("scorad-weightings");
|
|
1532
|
-
s && (s.value = this.value?.child ?? !1);
|
|
1542
|
+
s && (s.value = this.value?.child ?? !1, s.readonly = this.readonly);
|
|
1533
1543
|
}
|
|
1534
1544
|
render() {
|
|
1535
1545
|
return html`
|
|
@@ -1622,7 +1632,10 @@ var tag = "scorad-component", HTMLScoradElement = class extends HTMLComponentEle
|
|
|
1622
1632
|
valueInput;
|
|
1623
1633
|
valueChange;
|
|
1624
1634
|
};
|
|
1625
|
-
__decorate([
|
|
1635
|
+
__decorate([Att({
|
|
1636
|
+
name: "aria-readonly",
|
|
1637
|
+
...AttTrueFalse
|
|
1638
|
+
})], HTMLScoradElement.prototype, "readonly", void 0), __decorate([Watch("value", "showErrors", "readonly")], HTMLScoradElement.prototype, "afterRender", null), __decorate([Event()], HTMLScoradElement.prototype, "valueInput", void 0), __decorate([Event()], HTMLScoradElement.prototype, "valueChange", void 0), HTMLScoradElement = __decorate([Component({
|
|
1626
1639
|
tag,
|
|
1627
1640
|
css: [host_default, component_default],
|
|
1628
1641
|
delegatesFocus: !0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.AntixComponentsScorad={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=new Map,n=e=>e==null?[]:(Array.isArray(e)||(e=[e]),e.map(e=>{if(t.has(e))return t.get(e);let n=new CSSStyleSheet;return n.replaceSync(e),t.set(e,n),n})),r=e=>{let t=e;return t.__metadata=t.__metadata??{attributes:[],watches:[],events:[]},t};(()=>{let e=`__drag_attached`;return{list:(t,n,r)=>{if(t.dataset[e])return;t.dataset[e]=`true`;let i=(e,n)=>e.find(e=>e instanceof HTMLElement&&t.contains(e)&&n(e)),a=(e,n,r=()=>!0)=>!(e instanceof Node)||!t.contains(e)?null:e==null||e instanceof HTMLElement&&r(e)?e:a(n(e),n,r),o=e=>a(e?.nextSibling,e=>e?.nextSibling),s=(e,t)=>n=>n instanceof HTMLElement&&(e??(e=>e.classList.contains(t)))(n),c=()=>Array.from(t.children).filter(u).reduce((e,t)=>e.set(t,t.getBoundingClientRect()),new Map),l=s(r?.gripSelector,`drag-grip`),u=s(r?.itemSelector,`drag-item`),d,f,p,m=0,ee,
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.AntixComponentsScorad={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=new Map,n=e=>e==null?[]:(Array.isArray(e)||(e=[e]),e.map(e=>{if(t.has(e))return t.get(e);let n=new CSSStyleSheet;return n.replaceSync(e),t.set(e,n),n})),r=e=>{let t=e;return t.__metadata=t.__metadata??{attributes:[],watches:[],events:[]},t};(()=>{let e=`__drag_attached`;return{list:(t,n,r)=>{if(t.dataset[e])return;t.dataset[e]=`true`;let i=(e,n)=>e.find(e=>e instanceof HTMLElement&&t.contains(e)&&n(e)),a=(e,n,r=()=>!0)=>!(e instanceof Node)||!t.contains(e)?null:e==null||e instanceof HTMLElement&&r(e)?e:a(n(e),n,r),o=e=>a(e?.nextSibling,e=>e?.nextSibling),s=(e,t)=>n=>n instanceof HTMLElement&&(e??(e=>e.classList.contains(t)))(n),c=()=>Array.from(t.children).filter(u).reduce((e,t)=>e.set(t,t.getBoundingClientRect()),new Map),l=s(r?.gripSelector,`drag-grip`),u=s(r?.itemSelector,`drag-item`),d,f,p,m=0,h,ee,te=e=>{let n=e.composedPath();d=i(n,l),d&&(e.preventDefault(),e.stopPropagation(),window.getSelection()?.removeAllRanges(),f=c(),p=i(n,u),m=e.clientY,h=p.dataset.id,p.classList.add(`dragging`),p.style.pointerEvents=`none`,p.style.zIndex=`2`,t.style.touchAction=`none`,t.style.userSelect=`none`,document.addEventListener(`pointermove`,ne),document.addEventListener(`pointerup`,g))},ne=e=>{if(!p||!f)throw Error(`drag item is undefined`);let n=f.get(p),r=null;for(let[t,i]of f.entries()){if(t===p||e.clientY<=i.top||e.clientY>=i.bottom)continue;e.stopPropagation();let a=i.top+(n.bottom-i.top)/2;r=e.clientY>a?o(t):t;break}if(r){ee=r instanceof HTMLElement?r.dataset.id:void 0,t.insertBefore(p,r),p.style.transform=``;var i=n.top;f=c(),m+=f.get(p).top-i,d?.focus()}p.style.transform=`translateY(${e.clientY-m}px)`},g=e=>{if(!p)throw Error(`drag item is undefined`);e.stopPropagation(),document.removeEventListener(`pointermove`,ne),document.removeEventListener(`pointerup`,g),p.classList.remove(`dragging`),p.style.transform=``,p.style.pointerEvents=``,p.style.zIndex=``,p=void 0,t.style.touchAction=``,t.style.userSelect=``,h&&ee&&(n(h,ee),h=void 0,ee=void 0)},_=e=>{if(!e.altKey)return;let r=(e,r)=>{let i=document.activeElement;t.insertBefore(e,r),i instanceof HTMLElement&&i.focus(),n(e.dataset.id,r?.dataset.id)};switch(e.key){case`ArrowUp`:{let t=a(e.target,e=>e?.parentElement,u);if(t&&u(t.previousElementSibling)){let e=t.previousElementSibling;r(t,e)}break}case`ArrowDown`:{let t=a(e.target,e=>e?.parentElement,u);if(t&&u(t.nextElementSibling)){let e=t.nextElementSibling?.nextElementSibling;r(t,e)}break}}};return t.addEventListener(`pointerdown`,te),t.addEventListener(`keydown`,_),()=>{t.removeEventListener(`pointerdown`,te),t.removeEventListener(`keydown`,_)}}}})();var i=`
|
|
2
2
|
button:not([disabled]),
|
|
3
3
|
[href],
|
|
4
4
|
input:not([disabled]),
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
textarea:not([disabled]),
|
|
7
7
|
[tabindex]:not([tabindex="-1"]),
|
|
8
8
|
[contenteditable]:not([contenteditable="false"])
|
|
9
|
-
`,a={trace:0,debug:1,log:2,info:3,warn:4,error:5};function o(e,t,n){let r=()=>{},i={provide:r=>o(`${e}.${r}`,t,n)};for(let o of Object.keys(a)){let s=o,c=a[s],l=n[s];t>c?i[s]=r:i[s]=((t,...n)=>l(`[${e}]`,t,...n))}return i}var s=(()=>{let e=(e,t)=>(t??=s.defaultLevel,o(e,t,s.adapter));return e.adapter=console,e.defaultLevel=a.warn,e})(),c=(e,t)=>{if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(typeof e==`object`&&e)||!(typeof t==`object`&&t))return!1;let n=Array.isArray(e);if(n!==Array.isArray(t))return!1;if(n){let n=e,r=t;if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++)if(!c(n[e],r[e]))return!1;return!0}let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let n of r){if(!Object.prototype.hasOwnProperty.call(t,n))return!1;let r=e[n],i=t[n];if(!c(r,i))return!1}return!0},l=(e,t)=>{let n=e;for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Object.getPrototypeOf(n)}};function u(e){return e.split(/\.|\[|\]\.?/).filter(e=>e!==``).map(e=>{let t=Number.parseInt(e);return isNaN(t)?e:t})}function d(e,t){let n=u(t);for(let t=0;t<n.length;t++){if(e==null)return;let r=n[t];e=e[r]}return e}var f=e=>Object.keys(e);function p(e,t,n){let r=t.match(/[^.\[\]]+/g);if(!r)return n;let i={...e},a=i;for(let e=0;e<r.length-1;e++){let t=r[e],n=r[e+1],i=!isNaN(Number(n));t in a?Array.isArray(a[t])?a[t]=[...a[t]]:a[t]={...a[t]}:a[t]=i?[]:{},a=a[t]}let o=r[r.length-1];return a[o]=n,i}function m(e){return e!=null&&typeof e.then==`function`}var
|
|
10
|
-
`)},te={Ok:e=>new ee(e),Fail:e=>new h(e)},ne=(e,t)=>e.toString().padStart(t,`0`).slice(-t),g=e=>e==null?e:e?.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?`-`:``)+e).toLowerCase();function _(e={}){return function(t,n){let i=e?.name??n,a=e?.read??(e=>e),o=e?.write??(e=>e);if(!o&&!a)throw Error(`@Att() should have read or write options`);var s=r(t.constructor);s.__metadata.attributes=[...s.__metadata.attributes,{propertyName:n,name:g(i),read:a,write:o}]}}var v={read:e=>e===`true`,write:e=>e===!0?`true`:`false`},re={read:e=>e!=null,write:e=>e===!0?``:void 0},ie=s(`@ntix/components-core`,typeof ANTIX_COMPONENTS_CORE_LOG_LEVEL>`u`?a.warn:ANTIX_COMPONENTS_CORE_LOG_LEVEL);function ae(e){return typeof e==`object`&&!!e&&`render`in e&&typeof e.render==`function`&&e.render.length===1}function y(e={tag:void 0}){let t=()=>{},r=ie.provide(`component-decorator`),i={shadowRoot:`open`,delegatesFocus:!1,...e,css:n(e.css)};return function(n){let a=new Map,o=class extends n{constructor(...e){super(...e);let t=n.__metadata;t&&(t.events.forEach(e=>{r.debug(`event`,e.propertyName,e.name),Object.defineProperty(this,e.propertyName,{value:function(t){let n=new CustomEvent(e.name,{detail:t,...e.init});return this.dispatchEvent(n)},writable:!1,configurable:!1,enumerable:!0})}),t.watches.forEach(e=>{let t=e.methodName;r.debug(`${this.tagName}.${t}()`,{propertyNames:e.propertyNames}),e.propertyNames.forEach(e=>{let n=l(this,e);r.debug(`watch`,e,n);let i=n?.value,a=n?.get?.bind(this)??(()=>i),o=n?.set?.bind(this)??(e=>{i=e});Object.defineProperty(this,e,{get:a,set:function(n){let r=a();r!==n&&(o(n),this[t](n,r,e)===!1&&o(r))},enumerable:!0,configurable:!0})})}),t.attributes.forEach(e=>{let t=l(this,e.propertyName),n=t?.value,i=t?.get?.bind(this)??(()=>n),o=t?.set?.bind(this)??(e=>{n=e});if(e.write){let t=o,n=e.write;o=r=>{r!==i()&&t(r);let a=this.getAttribute(e.name),o=n(r);if(o==null)a!=null&&this.removeAttribute(e.name);else{let t=`${o}`;a!==t&&this.setAttribute(e.name,t)}}}r.debug(`${this.tagName}.${e.propertyName}`,{att:e.name,read:!!e.read,write:!!e.write}),Object.defineProperty(this,e.propertyName,{get:i,set:o,enumerable:!0}),e.read&&a.set(e.name,()=>{this.hasAttribute(e.name)||o(i())})}))}__shadowRoot};if(o.__metadata){let e=new Set(o.observedAttributes);o.__metadata.attributes.forEach(t=>{t.read&&e.add(t.name)}),o.observedAttributes=Array.from(e)}let s;o.prototype.resizeCallback&&(s=new ResizeObserver(e=>{o.prototype.resizeCallback?.call(e[0].target)}));let c=o.prototype.attributeChangedCallback??t;o.prototype.attributeChangedCallback=function(e,t,n){if(c(e,t,n),n!==t){var r=o.__metadata?.attributes.find(t=>t.name===e);r?.read&&(this[r.propertyName]=r.read(n))}};let u=o.prototype.connectedCallback??t;o.prototype.connectedCallback=function(){a.forEach(e=>e()),(i.shadowRoot===`open`||i.shadowRoot===`closed`)&&!this.__shadowRoot&&(this.__shadowRoot=this.attachShadow({delegatesFocus:i.delegatesFocus,mode:i.shadowRoot,slotAssignment:`named`}),this.__shadowRoot.adoptedStyleSheets=i.css),u.call(this),s&&s.observe(this)};let d=o.prototype.disconnectedCallback??t;o.prototype.disconnectedCallback=function(){d.call(this),s&&s.unobserve(this)};let f=o.prototype.beforeRender??t,p=o.prototype.render??t,ee=o.prototype.afterRender??t;return o.prototype.render=async function(){r.debug(`render`,this.tagName);let e=f.call(this);if(m(e)&&await e,this.__shadowRoot){let e=this.__shadowRoot,t=p.call(this);ae(t)?await t.render(e):e.innerHTML=t}ee.call(this)},r.debug(`define`,e.tag),window.customElements.define(e.tag,o),o}}function b(e={}){return function(t,n){var i=r(t.constructor);i.__metadata.events=[...i.__metadata.events,{name:e?.name??g(n),init:e,propertyName:n}]}}var x=class extends HTMLElement{addEventListener(e,t,n){return super.addEventListener(e,t,n),()=>{super.removeEventListener(e,t,n)}}removeEventListener(e,t,n){super.removeEventListener(e,t,n)}};function S(...e){return function(t,n){var i=r(t.constructor);i.__metadata.watches=[...i.__metadata.watches,{methodName:n,propertyNames:e}]}}function oe(e){return typeof e==`function`}var se=class extends Array{render=(e,t=``)=>new Promise(n=>{let r=document.createElement(`template`),i={},a=e=>{let t=`_${Object.keys(i).length}`;return i[t]=e,t},o=e=>Array.isArray(e)?e.map(o).join(``):oe(e)?`_r_=${a(e)}`:`${e}`;r.innerHTML=t+o(this),e.replaceChildren(r.content);let s=async e=>{if(e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute(`_r_`)){let t=e.getAttribute(`_r_`);if(t){e.removeAttribute(`_r_`);let n=i[t];for(n.element=e;!e.isConnected;)await new Promise(e=>requestAnimationFrame(()=>e()));n(e)}}await Promise.all([...e.children].map(s))};s(e).then(n)})},{entries:ce,setPrototypeOf:le,isFrozen:ue,getPrototypeOf:de,getOwnPropertyDescriptor:fe}=Object,{freeze:C,seal:w,create:pe}=Object,{apply:me,construct:T}=typeof Reflect<`u`&&Reflect;C||=function(e){return e},w||=function(e){return e},me||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},T||=function(e){return new e(...[...arguments].slice(1))};var he=O(Array.prototype.forEach),ge=O(Array.prototype.lastIndexOf),_e=O(Array.prototype.pop),ve=O(Array.prototype.push),ye=O(Array.prototype.splice),be=O(String.prototype.toLowerCase),xe=O(String.prototype.toString),Se=O(String.prototype.match),Ce=O(String.prototype.replace),we=O(String.prototype.indexOf),Te=O(String.prototype.trim),E=O(Object.prototype.hasOwnProperty),D=O(RegExp.prototype.test),Ee=k(TypeError);function O(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return me(e,t,n)}}function k(e){return function(){return T(e,[...arguments])}}function A(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:be;le&&le(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(ue(t)||(t[r]=e),i=e)}e[i]=!0}return e}function De(e){for(let t=0;t<e.length;t++)E(e,t)||(e[t]=null);return e}function j(e){let t=pe(null);for(let[n,r]of ce(e))E(e,n)&&(Array.isArray(r)?t[n]=De(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=j(r):t[n]=r);return t}function Oe(e,t){for(;e!==null;){let n=fe(e,t);if(n){if(n.get)return O(n.get);if(typeof n.value==`function`)return O(n.value)}e=de(e)}function n(){return null}return n}var ke=C(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Ae=C(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),je=C([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Me=C([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Ne=C(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Pe=C([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Fe=C([`#text`]),Ie=C(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),Le=C(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Re=C(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),ze=C([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),M=w(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Be=w(/<%[\w\W]*|[\w\W]*%>/gm),Ve=w(/\$\{[\w\W]*/gm),N=w(/^data-[\-\w.\u00B7-\uFFFF]+$/),He=w(/^aria-[\-\w]+$/),Ue=w(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),We=w(/^(?:\w+script|data):/i),Ge=w(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ke=w(/^html$/i),qe=w(/^[a-z][.\w]*(-[.\w]+)+$/i),Je=Object.freeze({__proto__:null,ARIA_ATTR:He,ATTR_WHITESPACE:Ge,CUSTOM_ELEMENT:qe,DATA_ATTR:N,DOCTYPE_NAME:Ke,ERB_EXPR:Be,IS_ALLOWED_URI:Ue,IS_SCRIPT_OR_DATA:We,MUSTACHE_EXPR:M,TMPLIT_EXPR:Ve}),Ye={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Xe=function(){return typeof window>`u`?null:window},Ze=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Qe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function $e(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xe(),t=e=>$e(e);if(t.version=`3.3.0`,t.removed=[],!e||!e.document||e.document.nodeType!==Ye.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,ee=Oe(m,`cloneNode`),h=Oe(m,`remove`),te=Oe(m,`nextSibling`),ne=Oe(m,`childNodes`),g=Oe(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let _,v=``,{implementation:re,createNodeIterator:ie,createDocumentFragment:ae,getElementsByTagName:y}=n,{importNode:b}=r,x=Qe();t.isSupported=typeof ce==`function`&&typeof g==`function`&&re&&re.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:S,ERB_EXPR:oe,TMPLIT_EXPR:se,DATA_ATTR:le,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:fe,CUSTOM_ELEMENT:w}=Je,{IS_ALLOWED_URI:me}=Je,T=null,O=A({},[...ke,...Ae,...je,...Ne,...Fe]),k=null,De=A({},[...Ie,...Le,...Re,...ze]),M=Object.seal(pe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Be=null,Ve=null,N=Object.seal(pe(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),He=!0,We=!0,Ge=!1,qe=!0,P=!1,et=!0,F=!1,I=!1,tt=!1,L=!1,R=!1,z=!1,B=!0,nt=!1,rt=!0,V=!1,H={},U=null,W=A({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),it=null,at=A({},[`audio`,`video`,`img`,`source`,`image`,`track`]),G=null,ot=A({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),st=`http://www.w3.org/1998/Math/MathML`,ct=`http://www.w3.org/2000/svg`,K=`http://www.w3.org/1999/xhtml`,lt=K,q=!1,ut=null,dt=A({},[st,ct,K],xe),J=A({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),ft=A({},[`annotation-xml`]),pt=A({},[`title`,`style`,`font`,`a`,`script`]),Y=null,mt=[`application/xhtml+xml`,`text/html`],X=null,ht=null,gt=n.createElement(`form`),_t=function(e){return e instanceof RegExp||e instanceof Function},Z=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ht&&ht===e)){if((!e||typeof e!=`object`)&&(e={}),e=j(e),Y=mt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,X=Y===`application/xhtml+xml`?xe:be,T=E(e,`ALLOWED_TAGS`)?A({},e.ALLOWED_TAGS,X):O,k=E(e,`ALLOWED_ATTR`)?A({},e.ALLOWED_ATTR,X):De,ut=E(e,`ALLOWED_NAMESPACES`)?A({},e.ALLOWED_NAMESPACES,xe):dt,G=E(e,`ADD_URI_SAFE_ATTR`)?A(j(ot),e.ADD_URI_SAFE_ATTR,X):ot,it=E(e,`ADD_DATA_URI_TAGS`)?A(j(at),e.ADD_DATA_URI_TAGS,X):at,U=E(e,`FORBID_CONTENTS`)?A({},e.FORBID_CONTENTS,X):W,Be=E(e,`FORBID_TAGS`)?A({},e.FORBID_TAGS,X):j({}),Ve=E(e,`FORBID_ATTR`)?A({},e.FORBID_ATTR,X):j({}),H=E(e,`USE_PROFILES`)?e.USE_PROFILES:!1,He=e.ALLOW_ARIA_ATTR!==!1,We=e.ALLOW_DATA_ATTR!==!1,Ge=e.ALLOW_UNKNOWN_PROTOCOLS||!1,qe=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,P=e.SAFE_FOR_TEMPLATES||!1,et=e.SAFE_FOR_XML!==!1,F=e.WHOLE_DOCUMENT||!1,L=e.RETURN_DOM||!1,R=e.RETURN_DOM_FRAGMENT||!1,z=e.RETURN_TRUSTED_TYPE||!1,tt=e.FORCE_BODY||!1,B=e.SANITIZE_DOM!==!1,nt=e.SANITIZE_NAMED_PROPS||!1,rt=e.KEEP_CONTENT!==!1,V=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||Ue,lt=e.NAMESPACE||K,J=e.MATHML_TEXT_INTEGRATION_POINTS||J,ft=e.HTML_INTEGRATION_POINTS||ft,M=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&_t(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(M.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&_t(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(M.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(M.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),P&&(We=!1),R&&(L=!0),H&&(T=A({},Fe),k=[],H.html===!0&&(A(T,ke),A(k,Ie)),H.svg===!0&&(A(T,Ae),A(k,Le),A(k,ze)),H.svgFilters===!0&&(A(T,je),A(k,Le),A(k,ze)),H.mathMl===!0&&(A(T,Ne),A(k,Re),A(k,ze))),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?N.tagCheck=e.ADD_TAGS:(T===O&&(T=j(T)),A(T,e.ADD_TAGS,X))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?N.attributeCheck=e.ADD_ATTR:(k===De&&(k=j(k)),A(k,e.ADD_ATTR,X))),e.ADD_URI_SAFE_ATTR&&A(G,e.ADD_URI_SAFE_ATTR,X),e.FORBID_CONTENTS&&(U===W&&(U=j(U)),A(U,e.FORBID_CONTENTS,X)),rt&&(T[`#text`]=!0),F&&A(T,[`html`,`head`,`body`]),T.table&&(A(T,[`tbody`]),delete Be.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Ee(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Ee(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);_=e.TRUSTED_TYPES_POLICY,v=_.createHTML(``)}else _===void 0&&(_=Ze(p,i)),_!==null&&typeof v==`string`&&(v=_.createHTML(``));C&&C(e),ht=e}},vt=A({},[...Ae,...je,...Me]),yt=A({},[...Ne,...Pe]),bt=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:lt,tagName:`template`});let n=be(e.tagName),r=be(t.tagName);return ut[e.namespaceURI]?e.namespaceURI===ct?t.namespaceURI===K?n===`svg`:t.namespaceURI===st?n===`svg`&&(r===`annotation-xml`||J[r]):!!vt[n]:e.namespaceURI===st?t.namespaceURI===K?n===`math`:t.namespaceURI===ct?n===`math`&&ft[r]:!!yt[n]:e.namespaceURI===K?t.namespaceURI===ct&&!ft[r]||t.namespaceURI===st&&!J[r]?!1:!yt[n]&&(pt[n]||!vt[n]):!!(Y===`application/xhtml+xml`&&ut[e.namespaceURI]):!1},xt=function(e){ve(t.removed,{element:e});try{g(e).removeChild(e)}catch{h(e)}},Q=function(e,n){try{ve(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{ve(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(L||R)try{xt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},St=function(e){let t=null,r=null;if(tt)e=`<remove></remove>`+e;else{let t=Se(e,/^[\r\n\t ]+/);r=t&&t[0]}Y===`application/xhtml+xml`&<===K&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=_?_.createHTML(e):e;if(lt===K)try{t=new f().parseFromString(i,Y)}catch{}if(!t||!t.documentElement){t=re.createDocument(lt,`template`,null);try{t.documentElement.innerHTML=q?v:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),lt===K?y.call(t,F?`html`:`body`)[0]:F?t.documentElement:a},Ct=function(e){return ie.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},wt=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},Tt=function(e){return typeof s==`function`&&e instanceof s};function $(e,n,r){he(e,e=>{e.call(t,n,r,ht)})}let Et=function(e){let n=null;if($(x.beforeSanitizeElements,e,null),wt(e))return xt(e),!0;let r=X(e.nodeName);if($(x.uponSanitizeElement,e,{tagName:r,allowedTags:T}),et&&e.hasChildNodes()&&!Tt(e.firstElementChild)&&D(/<[/\w!]/g,e.innerHTML)&&D(/<[/\w!]/g,e.textContent)||e.nodeType===Ye.progressingInstruction||et&&e.nodeType===Ye.comment&&D(/<[/\w]/g,e.data))return xt(e),!0;if(!(N.tagCheck instanceof Function&&N.tagCheck(r))&&(!T[r]||Be[r])){if(!Be[r]&&Ot(r)&&(M.tagNameCheck instanceof RegExp&&D(M.tagNameCheck,r)||M.tagNameCheck instanceof Function&&M.tagNameCheck(r)))return!1;if(rt&&!U[r]){let t=g(e)||e.parentNode,n=ne(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=ee(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,te(e))}}}return xt(e),!0}return e instanceof c&&!bt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&D(/<\/no(script|embed|frames)/i,e.innerHTML)?(xt(e),!0):(P&&e.nodeType===Ye.text&&(n=e.textContent,he([S,oe,se],e=>{n=Ce(n,e,` `)}),e.textContent!==n&&(ve(t.removed,{element:e.cloneNode()}),e.textContent=n)),$(x.afterSanitizeElements,e,null),!1)},Dt=function(e,t,r){if(B&&(t===`id`||t===`name`)&&(r in n||r in gt))return!1;if(!(We&&!Ve[t]&&D(le,t))&&!(He&&D(ue,t))&&!(N.attributeCheck instanceof Function&&N.attributeCheck(t,e))){if(!k[t]||Ve[t]){if(!(Ot(e)&&(M.tagNameCheck instanceof RegExp&&D(M.tagNameCheck,e)||M.tagNameCheck instanceof Function&&M.tagNameCheck(e))&&(M.attributeNameCheck instanceof RegExp&&D(M.attributeNameCheck,t)||M.attributeNameCheck instanceof Function&&M.attributeNameCheck(t,e))||t===`is`&&M.allowCustomizedBuiltInElements&&(M.tagNameCheck instanceof RegExp&&D(M.tagNameCheck,r)||M.tagNameCheck instanceof Function&&M.tagNameCheck(r))))return!1}else if(!G[t]&&!D(me,Ce(r,fe,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&we(r,`data:`)===0&&it[e])&&!(Ge&&!D(de,Ce(r,fe,``)))&&r)return!1}return!0},Ot=function(e){return e!==`annotation-xml`&&Se(e,w)},kt=function(e){$(x.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||wt(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:k,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=X(a),l=s,u=a===`value`?l:Te(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,$(x.uponSanitizeAttribute,e,r),u=r.attrValue,nt&&(c===`id`||c===`name`)&&(Q(a,e),u=`user-content-`+u),et&&D(/((--!?|])>)|<\/(style|title|textarea)/i,u)){Q(a,e);continue}if(c===`attributename`&&Se(u,`href`)){Q(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Q(a,e);continue}if(!qe&&D(/\/>/i,u)){Q(a,e);continue}P&&he([S,oe,se],e=>{u=Ce(u,e,` `)});let d=X(e.nodeName);if(!Dt(d,c,u)){Q(a,e);continue}if(_&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=_.createHTML(u);break;case`TrustedScriptURL`:u=_.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),wt(e)?xt(e):_e(t.removed)}catch{Q(a,e)}}$(x.afterSanitizeAttributes,e,null)},At=function e(t){let n=null,r=Ct(t);for($(x.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)$(x.uponSanitizeShadowNode,n,null),Et(n),kt(n),n.content instanceof a&&e(n.content);$(x.afterSanitizeShadowDOM,t,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(q=!e,q&&(e=`<!-->`),typeof e!=`string`&&!Tt(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw Ee(`dirty is not a string, aborting`)}else throw Ee(`toString is not a function`);if(!t.isSupported)return e;if(I||Z(n),t.removed=[],typeof e==`string`&&(V=!1),V){if(e.nodeName){let t=X(e.nodeName);if(!T[t]||Be[t])throw Ee(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=St(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===Ye.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!L&&!P&&!F&&e.indexOf(`<`)===-1)return _&&z?_.createHTML(e):e;if(i=St(e),!i)return L?null:z?v:``}i&&tt&&xt(i.firstChild);let u=Ct(V?e:i);for(;c=u.nextNode();)Et(c),kt(c),c.content instanceof a&&At(c.content);if(V)return e;if(L){if(R)for(l=ae.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(k.shadowroot||k.shadowrootmode)&&(l=b.call(r,l,!0)),l}let d=F?i.outerHTML:i.innerHTML;return F&&T[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&D(Ke,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
11
|
-
`+d),P&&he([S,oe,se],e=>{d=Ce(d,e,` `)}),_&&z?_.createHTML(d):d},t.setConfig=function(){Z(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),I=!0},t.clearConfig=function(){ht=null,I=!1},t.isValidAttribute=function(e,t,n){return ht||Z({}),Dt(X(e),X(t),n)},t.addHook=function(e,t){typeof t==`function`&&ve(x[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=ge(x[e],t);return n===-1?void 0:ye(x[e],n,1)[0]}return _e(x[e])},t.removeHooks=function(e){x[e]=[]},t.removeAllHooks=function(){x=Qe()},t}var P=$e(),et={sanitize:e=>P.sanitize(e)},F=(e,...t)=>new se(e.reduce((e,n,r)=>{let i=t[r]??``;return typeof i==`string`?[...e,n,et.sanitize(i)]:i===!1?[...e,n]:Array.isArray(i)?[...e,n,...i]:[...e,n,i]},[]));function I(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var tt=`:host{--host-display:flex;--host-heading-border:var(--scorad-heading-border,solid 1px var(--host-color));--host-score-color:var(--scorad-score-color,var(--host-color));--host-score-background:var(--scorad-score-background,var(--host-background-color));--host-score-border:var(--scorad-score-border,solid 1px var(--host-color));gap:var(--host-spacing-unit);flex-wrap:wrap;width:fit-content}h3{aspect-ratio:1;border:var(--host-heading-border);padding:var(--host-padding-unit);margin:0 0 0 calc(-1*var(--host-padding-unit));border-radius:50%;justify-content:center;align-items:center;line-height:0;display:inline-flex}p{padding:var(--host-padding-unit)0 0;margin:0;font-size:.9em}scorad-label{break-inside:avoid;outline:none;flex:5 19rem}#extent-label{flex-basis:100%}#intensity-label{flex-grow:1}#score-label{background:linear-gradient(to bottom,transparent,var(--background-color)75%);flex-basis:100%;font-size:1.2rem;position:sticky;bottom:0}@media print{#score-label{position:relative}}#score-label>span{padding:var(--host-padding-unit);border-radius:var(--host-border-radius);outline:var(--host-score-border);color:var(--host-score-color);background:var(--host-score-background)}scorad-extent,scorad-intensity,scorad-subjective{margin:.6rem calc(-1*var(--host-padding-unit));flex:100%}`,L=`*{box-sizing:border-box}:host{--host-color-l:var(--color-l,50%);--host-error-color-h:var(--error-color-h,0);--host-color:var(--color,#444);--host-background-color:var(--background-color,#eee);--host-primary-color:var(--primary-color,var(--host-color));--host-error-color:var(--error-color,hsl(var(--host-error-color-h),66.7%,var(--host-color-l)));--host-spacing-unit:var(--scorad-spacing-unit,.25rem);--host-padding-unit:var(--scorad-padding-unit,.333rem);--host-border-radius:var(--scorad-border-radius,3px);--host-border-radius-outer:var(--scorad-border-radius-outer,calc(var(--host-border-radius) + var(--host-padding-unit)));--host-outline-hover:var(--scorad-outline-hover,dashed 2px var(--host-primary-color));--host-outline-focus:var(--scorad-outline-focus,solid 2px var(--host-primary-color));display:var(--host-display,inline-flex);line-height:1.2}@media (prefers-color-scheme:dark){:host{--host-color-l:var(--color-l,70%)}}`;let R={headNeck:null,anteriorTrunk:null,posteriorTrunk:null,upperLimbs:null,lowerLimbs:null,genitals:null},z={erythema:null,oedemaPapulation:null,oozingCrusting:null,excoriations:null,lichenification:null,xerosis:null},B={pruritus:null,sleeplessness:null},nt={child:!1,extent:R,intensity:z,subjective:B},rt={headNeck:.09,anteriorTrunk:.18,posteriorTrunk:.18,upperLimbs:.18,lowerLimbs:.36,genitals:.01},V={headNeck:.18,anteriorTrunk:.18,posteriorTrunk:.18,upperLimbs:.18,lowerLimbs:.28,genitals:0};var H=`:host{--host-display:inline-flex;--host-font-size:1rem;flex-wrap:wrap;justify-content:center;align-items:center;position:relative}label{padding:var(--host-padding-unit)}svg{min-width:14rem;max-width:18rem;margin:var(--host-padding-unit)0;fill:#0000;stroke:var(--host-color);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;flex:16rem;overflow:visible}@media print{svg{flex:0 0 14rem;width:14rem}}path,line{vector-effect:non-scaling-stroke}path{opacity:.333}text,line{opacity:.667}g{outline:none}g[tabindex] path{opacity:1;fill:hsla(var(--scorad-h,0),var(--extent,"0%"),50%,var(--opacity,0))
|
|
9
|
+
`,a={trace:0,debug:1,log:2,info:3,warn:4,error:5};function o(e,t,n){let r=()=>{},i={provide:r=>o(`${e}.${r}`,t,n)};for(let o of Object.keys(a)){let s=o,c=a[s],l=n[s];t>c?i[s]=r:i[s]=((t,...n)=>l(`[${e}]`,t,...n))}return i}var s=(()=>{let e=(e,t)=>(t??=s.defaultLevel,o(e,t,s.adapter));return e.adapter=console,e.defaultLevel=a.warn,e})(),c=(e,t)=>{if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(typeof e==`object`&&e)||!(typeof t==`object`&&t))return!1;let n=Array.isArray(e);if(n!==Array.isArray(t))return!1;if(n){let n=e,r=t;if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++)if(!c(n[e],r[e]))return!1;return!0}let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let n of r){if(!Object.prototype.hasOwnProperty.call(t,n))return!1;let r=e[n],i=t[n];if(!c(r,i))return!1}return!0},l=(e,t)=>{let n=e;for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Object.getPrototypeOf(n)}};function u(e){return e.split(/\.|\[|\]\.?/).filter(e=>e!==``).map(e=>{let t=Number.parseInt(e);return isNaN(t)?e:t})}function d(e,t){let n=u(t);for(let t=0;t<n.length;t++){if(e==null)return;let r=n[t];e=e[r]}return e}var f=e=>Object.keys(e);function p(e,t,n){let r=t.match(/[^.\[\]]+/g);if(!r)return n;let i={...e},a=i;for(let e=0;e<r.length-1;e++){let t=r[e],n=r[e+1],i=!isNaN(Number(n));t in a?Array.isArray(a[t])?a[t]=[...a[t]]:a[t]={...a[t]}:a[t]=i?[]:{},a=a[t]}let o=r[r.length-1];return a[o]=n,i}function m(e){return e!=null&&typeof e.then==`function`}var h=class{constructor(e){this.value=e}value;orThrow(){return this.value}orNull(){return this.value}errors=[]},ee=class e{constructor(e){this.errors=e}errors;orThrow(){throw Error(e.formatErrors(this.errors))}orNull(){return null}static formatErrors=e=>e.join(`
|
|
10
|
+
`)},te={Ok:e=>new h(e),Fail:e=>new ee(e)},ne=(e,t)=>e.toString().padStart(t,`0`).slice(-t),g=e=>e==null?e:e?.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?`-`:``)+e).toLowerCase();function _(e={}){return function(t,n){let i=e?.name??n,a=e?.read??(e=>e),o=e?.write??(e=>e);if(!o&&!a)throw Error(`@Att() should have read or write options`);var s=r(t.constructor);s.__metadata.attributes=[...s.__metadata.attributes,{propertyName:n,name:g(i),read:a,write:o}]}}var v={read:e=>e===`true`,write:e=>e===!0?`true`:`false`},re={read:e=>e!=null,write:e=>e===!0?``:void 0},ie=s(`@ntix/components-core`,typeof ANTIX_COMPONENTS_CORE_LOG_LEVEL>`u`?a.warn:ANTIX_COMPONENTS_CORE_LOG_LEVEL);function ae(e){return typeof e==`object`&&!!e&&`render`in e&&typeof e.render==`function`&&e.render.length===1}function y(e={tag:void 0}){let t=()=>{},r=ie.provide(`component-decorator`),i={shadowRoot:`open`,delegatesFocus:!1,...e,css:n(e.css)};return function(n){let a=new Map,o=class extends n{constructor(...e){super(...e);let t=n.__metadata;t&&(t.events.forEach(e=>{r.debug(`event`,e.propertyName,e.name),Object.defineProperty(this,e.propertyName,{value:function(t){let n=new CustomEvent(e.name,{detail:t,...e.init});return this.dispatchEvent(n)},writable:!1,configurable:!1,enumerable:!0})}),t.watches.forEach(e=>{let t=e.methodName;r.debug(`${this.tagName}.${t}()`,{propertyNames:e.propertyNames}),e.propertyNames.forEach(e=>{let n=l(this,e);r.debug(`watch`,e,n);let i=n?.value,a=n?.get?.bind(this)??(()=>i),o=n?.set?.bind(this)??(e=>{i=e});Object.defineProperty(this,e,{get:a,set:function(n){let r=a();r!==n&&(o(n),this[t](n,r,e)===!1&&o(r))},enumerable:!0,configurable:!0})})}),t.attributes.forEach(e=>{let t=l(this,e.propertyName),n=t?.value,i=t?.get?.bind(this)??(()=>n),o=t?.set?.bind(this)??(e=>{n=e});if(e.write){let t=o,n=e.write;o=r=>{r!==i()&&t(r);let a=this.getAttribute(e.name),o=n(r);if(o==null)a!=null&&this.removeAttribute(e.name);else{let t=`${o}`;a!==t&&this.setAttribute(e.name,t)}}}r.debug(`${this.tagName}.${e.propertyName}`,{att:e.name,read:!!e.read,write:!!e.write}),Object.defineProperty(this,e.propertyName,{get:i,set:o,enumerable:!0}),e.read&&a.set(e.name,()=>{this.hasAttribute(e.name)||o(i())})}))}__shadowRoot};if(o.__metadata){let e=new Set(o.observedAttributes);o.__metadata.attributes.forEach(t=>{t.read&&e.add(t.name)}),o.observedAttributes=Array.from(e)}let s;o.prototype.resizeCallback&&(s=new ResizeObserver(e=>{o.prototype.resizeCallback?.call(e[0].target)}));let c=o.prototype.attributeChangedCallback??t;o.prototype.attributeChangedCallback=function(e,t,n){if(c(e,t,n),n!==t){var r=o.__metadata?.attributes.find(t=>t.name===e);r?.read&&(this[r.propertyName]=r.read(n))}};let u=o.prototype.connectedCallback??t;o.prototype.connectedCallback=function(){a.forEach(e=>e()),(i.shadowRoot===`open`||i.shadowRoot===`closed`)&&!this.__shadowRoot&&(this.__shadowRoot=this.attachShadow({delegatesFocus:i.delegatesFocus,mode:i.shadowRoot,slotAssignment:`named`}),this.__shadowRoot.adoptedStyleSheets=i.css),u.call(this),s&&s.observe(this)};let d=o.prototype.disconnectedCallback??t;o.prototype.disconnectedCallback=function(){d.call(this),s&&s.unobserve(this)};let f=o.prototype.beforeRender??t,p=o.prototype.render??t,h=o.prototype.afterRender??t;return o.prototype.render=async function(){r.debug(`render`,this.tagName);let e=f.call(this);if(m(e)&&await e,this.__shadowRoot){let e=this.__shadowRoot,t=p.call(this);ae(t)?await t.render(e):e.innerHTML=t}h.call(this)},r.debug(`define`,e.tag),window.customElements.define(e.tag,o),o}}function b(e={}){return function(t,n){var i=r(t.constructor);i.__metadata.events=[...i.__metadata.events,{name:e?.name??g(n),init:e,propertyName:n}]}}var x=class extends HTMLElement{addEventListener(e,t,n){return super.addEventListener(e,t,n),()=>{super.removeEventListener(e,t,n)}}removeEventListener(e,t,n){super.removeEventListener(e,t,n)}};function S(...e){return function(t,n){var i=r(t.constructor);i.__metadata.watches=[...i.__metadata.watches,{methodName:n,propertyNames:e}]}}function oe(e){return typeof e==`function`}var se=class extends Array{render=(e,t=``)=>new Promise(n=>{let r=document.createElement(`template`),i={},a=e=>{let t=`_${Object.keys(i).length}`;return i[t]=e,t},o=e=>Array.isArray(e)?e.map(o).join(``):oe(e)?`_r_=${a(e)}`:`${e}`;r.innerHTML=t+o(this),e.replaceChildren(r.content);let s=async e=>{if(e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute(`_r_`)){let t=e.getAttribute(`_r_`);if(t){e.removeAttribute(`_r_`);let n=i[t];for(n.element=e;!e.isConnected;)await new Promise(e=>requestAnimationFrame(()=>e()));n(e)}}await Promise.all([...e.children].map(s))};s(e).then(n)})},{entries:ce,setPrototypeOf:le,isFrozen:ue,getPrototypeOf:de,getOwnPropertyDescriptor:fe}=Object,{freeze:C,seal:w,create:pe}=Object,{apply:me,construct:T}=typeof Reflect<`u`&&Reflect;C||=function(e){return e},w||=function(e){return e},me||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},T||=function(e){return new e(...[...arguments].slice(1))};var he=O(Array.prototype.forEach),ge=O(Array.prototype.lastIndexOf),_e=O(Array.prototype.pop),ve=O(Array.prototype.push),ye=O(Array.prototype.splice),be=O(String.prototype.toLowerCase),xe=O(String.prototype.toString),Se=O(String.prototype.match),Ce=O(String.prototype.replace),we=O(String.prototype.indexOf),Te=O(String.prototype.trim),E=O(Object.prototype.hasOwnProperty),D=O(RegExp.prototype.test),Ee=k(TypeError);function O(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return me(e,t,n)}}function k(e){return function(){return T(e,[...arguments])}}function A(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:be;le&&le(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(ue(t)||(t[r]=e),i=e)}e[i]=!0}return e}function De(e){for(let t=0;t<e.length;t++)E(e,t)||(e[t]=null);return e}function j(e){let t=pe(null);for(let[n,r]of ce(e))E(e,n)&&(Array.isArray(r)?t[n]=De(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=j(r):t[n]=r);return t}function Oe(e,t){for(;e!==null;){let n=fe(e,t);if(n){if(n.get)return O(n.get);if(typeof n.value==`function`)return O(n.value)}e=de(e)}function n(){return null}return n}var ke=C(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Ae=C(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),je=C([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Me=C([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Ne=C(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Pe=C([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Fe=C([`#text`]),Ie=C(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),Le=C(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Re=C(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),ze=C([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),M=w(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Be=w(/<%[\w\W]*|[\w\W]*%>/gm),Ve=w(/\$\{[\w\W]*/gm),N=w(/^data-[\-\w.\u00B7-\uFFFF]+$/),He=w(/^aria-[\-\w]+$/),Ue=w(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),We=w(/^(?:\w+script|data):/i),Ge=w(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ke=w(/^html$/i),qe=w(/^[a-z][.\w]*(-[.\w]+)+$/i),Je=Object.freeze({__proto__:null,ARIA_ATTR:He,ATTR_WHITESPACE:Ge,CUSTOM_ELEMENT:qe,DATA_ATTR:N,DOCTYPE_NAME:Ke,ERB_EXPR:Be,IS_ALLOWED_URI:Ue,IS_SCRIPT_OR_DATA:We,MUSTACHE_EXPR:M,TMPLIT_EXPR:Ve}),Ye={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Xe=function(){return typeof window>`u`?null:window},Ze=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Qe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function $e(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xe(),t=e=>$e(e);if(t.version=`3.3.0`,t.removed=[],!e||!e.document||e.document.nodeType!==Ye.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,h=Oe(m,`cloneNode`),ee=Oe(m,`remove`),te=Oe(m,`nextSibling`),ne=Oe(m,`childNodes`),g=Oe(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let _,v=``,{implementation:re,createNodeIterator:ie,createDocumentFragment:ae,getElementsByTagName:y}=n,{importNode:b}=r,x=Qe();t.isSupported=typeof ce==`function`&&typeof g==`function`&&re&&re.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:S,ERB_EXPR:oe,TMPLIT_EXPR:se,DATA_ATTR:le,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:fe,CUSTOM_ELEMENT:w}=Je,{IS_ALLOWED_URI:me}=Je,T=null,O=A({},[...ke,...Ae,...je,...Ne,...Fe]),k=null,De=A({},[...Ie,...Le,...Re,...ze]),M=Object.seal(pe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Be=null,Ve=null,N=Object.seal(pe(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),He=!0,We=!0,Ge=!1,qe=!0,P=!1,et=!0,F=!1,I=!1,tt=!1,L=!1,R=!1,z=!1,B=!0,nt=!1,rt=!0,V=!1,H={},U=null,W=A({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),it=null,at=A({},[`audio`,`video`,`img`,`source`,`image`,`track`]),G=null,ot=A({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),st=`http://www.w3.org/1998/Math/MathML`,ct=`http://www.w3.org/2000/svg`,K=`http://www.w3.org/1999/xhtml`,lt=K,q=!1,ut=null,dt=A({},[st,ct,K],xe),J=A({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),ft=A({},[`annotation-xml`]),pt=A({},[`title`,`style`,`font`,`a`,`script`]),Y=null,mt=[`application/xhtml+xml`,`text/html`],X=null,ht=null,gt=n.createElement(`form`),_t=function(e){return e instanceof RegExp||e instanceof Function},Z=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ht&&ht===e)){if((!e||typeof e!=`object`)&&(e={}),e=j(e),Y=mt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,X=Y===`application/xhtml+xml`?xe:be,T=E(e,`ALLOWED_TAGS`)?A({},e.ALLOWED_TAGS,X):O,k=E(e,`ALLOWED_ATTR`)?A({},e.ALLOWED_ATTR,X):De,ut=E(e,`ALLOWED_NAMESPACES`)?A({},e.ALLOWED_NAMESPACES,xe):dt,G=E(e,`ADD_URI_SAFE_ATTR`)?A(j(ot),e.ADD_URI_SAFE_ATTR,X):ot,it=E(e,`ADD_DATA_URI_TAGS`)?A(j(at),e.ADD_DATA_URI_TAGS,X):at,U=E(e,`FORBID_CONTENTS`)?A({},e.FORBID_CONTENTS,X):W,Be=E(e,`FORBID_TAGS`)?A({},e.FORBID_TAGS,X):j({}),Ve=E(e,`FORBID_ATTR`)?A({},e.FORBID_ATTR,X):j({}),H=E(e,`USE_PROFILES`)?e.USE_PROFILES:!1,He=e.ALLOW_ARIA_ATTR!==!1,We=e.ALLOW_DATA_ATTR!==!1,Ge=e.ALLOW_UNKNOWN_PROTOCOLS||!1,qe=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,P=e.SAFE_FOR_TEMPLATES||!1,et=e.SAFE_FOR_XML!==!1,F=e.WHOLE_DOCUMENT||!1,L=e.RETURN_DOM||!1,R=e.RETURN_DOM_FRAGMENT||!1,z=e.RETURN_TRUSTED_TYPE||!1,tt=e.FORCE_BODY||!1,B=e.SANITIZE_DOM!==!1,nt=e.SANITIZE_NAMED_PROPS||!1,rt=e.KEEP_CONTENT!==!1,V=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||Ue,lt=e.NAMESPACE||K,J=e.MATHML_TEXT_INTEGRATION_POINTS||J,ft=e.HTML_INTEGRATION_POINTS||ft,M=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&_t(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(M.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&_t(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(M.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(M.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),P&&(We=!1),R&&(L=!0),H&&(T=A({},Fe),k=[],H.html===!0&&(A(T,ke),A(k,Ie)),H.svg===!0&&(A(T,Ae),A(k,Le),A(k,ze)),H.svgFilters===!0&&(A(T,je),A(k,Le),A(k,ze)),H.mathMl===!0&&(A(T,Ne),A(k,Re),A(k,ze))),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?N.tagCheck=e.ADD_TAGS:(T===O&&(T=j(T)),A(T,e.ADD_TAGS,X))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?N.attributeCheck=e.ADD_ATTR:(k===De&&(k=j(k)),A(k,e.ADD_ATTR,X))),e.ADD_URI_SAFE_ATTR&&A(G,e.ADD_URI_SAFE_ATTR,X),e.FORBID_CONTENTS&&(U===W&&(U=j(U)),A(U,e.FORBID_CONTENTS,X)),rt&&(T[`#text`]=!0),F&&A(T,[`html`,`head`,`body`]),T.table&&(A(T,[`tbody`]),delete Be.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Ee(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Ee(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);_=e.TRUSTED_TYPES_POLICY,v=_.createHTML(``)}else _===void 0&&(_=Ze(p,i)),_!==null&&typeof v==`string`&&(v=_.createHTML(``));C&&C(e),ht=e}},vt=A({},[...Ae,...je,...Me]),yt=A({},[...Ne,...Pe]),bt=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:lt,tagName:`template`});let n=be(e.tagName),r=be(t.tagName);return ut[e.namespaceURI]?e.namespaceURI===ct?t.namespaceURI===K?n===`svg`:t.namespaceURI===st?n===`svg`&&(r===`annotation-xml`||J[r]):!!vt[n]:e.namespaceURI===st?t.namespaceURI===K?n===`math`:t.namespaceURI===ct?n===`math`&&ft[r]:!!yt[n]:e.namespaceURI===K?t.namespaceURI===ct&&!ft[r]||t.namespaceURI===st&&!J[r]?!1:!yt[n]&&(pt[n]||!vt[n]):!!(Y===`application/xhtml+xml`&&ut[e.namespaceURI]):!1},xt=function(e){ve(t.removed,{element:e});try{g(e).removeChild(e)}catch{ee(e)}},Q=function(e,n){try{ve(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{ve(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(L||R)try{xt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},St=function(e){let t=null,r=null;if(tt)e=`<remove></remove>`+e;else{let t=Se(e,/^[\r\n\t ]+/);r=t&&t[0]}Y===`application/xhtml+xml`&<===K&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=_?_.createHTML(e):e;if(lt===K)try{t=new f().parseFromString(i,Y)}catch{}if(!t||!t.documentElement){t=re.createDocument(lt,`template`,null);try{t.documentElement.innerHTML=q?v:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),lt===K?y.call(t,F?`html`:`body`)[0]:F?t.documentElement:a},Ct=function(e){return ie.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},wt=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},Tt=function(e){return typeof s==`function`&&e instanceof s};function $(e,n,r){he(e,e=>{e.call(t,n,r,ht)})}let Et=function(e){let n=null;if($(x.beforeSanitizeElements,e,null),wt(e))return xt(e),!0;let r=X(e.nodeName);if($(x.uponSanitizeElement,e,{tagName:r,allowedTags:T}),et&&e.hasChildNodes()&&!Tt(e.firstElementChild)&&D(/<[/\w!]/g,e.innerHTML)&&D(/<[/\w!]/g,e.textContent)||e.nodeType===Ye.progressingInstruction||et&&e.nodeType===Ye.comment&&D(/<[/\w]/g,e.data))return xt(e),!0;if(!(N.tagCheck instanceof Function&&N.tagCheck(r))&&(!T[r]||Be[r])){if(!Be[r]&&Ot(r)&&(M.tagNameCheck instanceof RegExp&&D(M.tagNameCheck,r)||M.tagNameCheck instanceof Function&&M.tagNameCheck(r)))return!1;if(rt&&!U[r]){let t=g(e)||e.parentNode,n=ne(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=h(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,te(e))}}}return xt(e),!0}return e instanceof c&&!bt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&D(/<\/no(script|embed|frames)/i,e.innerHTML)?(xt(e),!0):(P&&e.nodeType===Ye.text&&(n=e.textContent,he([S,oe,se],e=>{n=Ce(n,e,` `)}),e.textContent!==n&&(ve(t.removed,{element:e.cloneNode()}),e.textContent=n)),$(x.afterSanitizeElements,e,null),!1)},Dt=function(e,t,r){if(B&&(t===`id`||t===`name`)&&(r in n||r in gt))return!1;if(!(We&&!Ve[t]&&D(le,t))&&!(He&&D(ue,t))&&!(N.attributeCheck instanceof Function&&N.attributeCheck(t,e))){if(!k[t]||Ve[t]){if(!(Ot(e)&&(M.tagNameCheck instanceof RegExp&&D(M.tagNameCheck,e)||M.tagNameCheck instanceof Function&&M.tagNameCheck(e))&&(M.attributeNameCheck instanceof RegExp&&D(M.attributeNameCheck,t)||M.attributeNameCheck instanceof Function&&M.attributeNameCheck(t,e))||t===`is`&&M.allowCustomizedBuiltInElements&&(M.tagNameCheck instanceof RegExp&&D(M.tagNameCheck,r)||M.tagNameCheck instanceof Function&&M.tagNameCheck(r))))return!1}else if(!G[t]&&!D(me,Ce(r,fe,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&we(r,`data:`)===0&&it[e])&&!(Ge&&!D(de,Ce(r,fe,``)))&&r)return!1}return!0},Ot=function(e){return e!==`annotation-xml`&&Se(e,w)},kt=function(e){$(x.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||wt(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:k,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=X(a),l=s,u=a===`value`?l:Te(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,$(x.uponSanitizeAttribute,e,r),u=r.attrValue,nt&&(c===`id`||c===`name`)&&(Q(a,e),u=`user-content-`+u),et&&D(/((--!?|])>)|<\/(style|title|textarea)/i,u)){Q(a,e);continue}if(c===`attributename`&&Se(u,`href`)){Q(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Q(a,e);continue}if(!qe&&D(/\/>/i,u)){Q(a,e);continue}P&&he([S,oe,se],e=>{u=Ce(u,e,` `)});let d=X(e.nodeName);if(!Dt(d,c,u)){Q(a,e);continue}if(_&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=_.createHTML(u);break;case`TrustedScriptURL`:u=_.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),wt(e)?xt(e):_e(t.removed)}catch{Q(a,e)}}$(x.afterSanitizeAttributes,e,null)},At=function e(t){let n=null,r=Ct(t);for($(x.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)$(x.uponSanitizeShadowNode,n,null),Et(n),kt(n),n.content instanceof a&&e(n.content);$(x.afterSanitizeShadowDOM,t,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(q=!e,q&&(e=`<!-->`),typeof e!=`string`&&!Tt(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw Ee(`dirty is not a string, aborting`)}else throw Ee(`toString is not a function`);if(!t.isSupported)return e;if(I||Z(n),t.removed=[],typeof e==`string`&&(V=!1),V){if(e.nodeName){let t=X(e.nodeName);if(!T[t]||Be[t])throw Ee(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=St(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===Ye.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!L&&!P&&!F&&e.indexOf(`<`)===-1)return _&&z?_.createHTML(e):e;if(i=St(e),!i)return L?null:z?v:``}i&&tt&&xt(i.firstChild);let u=Ct(V?e:i);for(;c=u.nextNode();)Et(c),kt(c),c.content instanceof a&&At(c.content);if(V)return e;if(L){if(R)for(l=ae.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(k.shadowroot||k.shadowrootmode)&&(l=b.call(r,l,!0)),l}let d=F?i.outerHTML:i.innerHTML;return F&&T[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&D(Ke,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
11
|
+
`+d),P&&he([S,oe,se],e=>{d=Ce(d,e,` `)}),_&&z?_.createHTML(d):d},t.setConfig=function(){Z(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),I=!0},t.clearConfig=function(){ht=null,I=!1},t.isValidAttribute=function(e,t,n){return ht||Z({}),Dt(X(e),X(t),n)},t.addHook=function(e,t){typeof t==`function`&&ve(x[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=ge(x[e],t);return n===-1?void 0:ye(x[e],n,1)[0]}return _e(x[e])},t.removeHooks=function(e){x[e]=[]},t.removeAllHooks=function(){x=Qe()},t}var P=$e(),et={sanitize:e=>P.sanitize(e)},F=(e,...t)=>new se(e.reduce((e,n,r)=>{let i=t[r]??``;return typeof i==`string`?[...e,n,et.sanitize(i)]:i===!1?[...e,n]:Array.isArray(i)?[...e,n,...i]:[...e,n,i]},[]));function I(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var tt=`:host{--host-display:flex;--host-heading-border:var(--scorad-heading-border,solid 1px var(--host-color));--host-score-color:var(--scorad-score-color,var(--host-color));--host-score-background:var(--scorad-score-background,var(--host-background-color));--host-score-border:var(--scorad-score-border,solid 1px var(--host-color));gap:var(--host-spacing-unit);flex-wrap:wrap;width:fit-content}h3{aspect-ratio:1;border:var(--host-heading-border);padding:var(--host-padding-unit);margin:0 0 0 calc(-1*var(--host-padding-unit));border-radius:50%;justify-content:center;align-items:center;line-height:0;display:inline-flex}p{padding:var(--host-padding-unit)0 0;margin:0;font-size:.9em}scorad-label{break-inside:avoid;outline:none;flex:5 19rem}#extent-label{flex-basis:100%}#intensity-label{flex-grow:1}#score-label{background:linear-gradient(to bottom,transparent,var(--background-color)75%);flex-basis:100%;font-size:1.2rem;position:sticky;bottom:0}@media print{#score-label{position:relative}}#score-label>span{padding:var(--host-padding-unit);border-radius:var(--host-border-radius);outline:var(--host-score-border);color:var(--host-score-color);background:var(--host-score-background)}scorad-extent,scorad-intensity,scorad-subjective{margin:.6rem calc(-1*var(--host-padding-unit));flex:100%}`,L=`*{box-sizing:border-box}:host{--host-color-l:var(--color-l,50%);--host-error-color-h:var(--error-color-h,0);--host-color:var(--color,#444);--host-background-color:var(--background-color,#eee);--host-primary-color:var(--primary-color,var(--host-color));--host-error-color:var(--error-color,hsl(var(--host-error-color-h),66.7%,var(--host-color-l)));--host-spacing-unit:var(--scorad-spacing-unit,.25rem);--host-padding-unit:var(--scorad-padding-unit,.333rem);--host-border-radius:var(--scorad-border-radius,3px);--host-border-radius-outer:var(--scorad-border-radius-outer,calc(var(--host-border-radius) + var(--host-padding-unit)));--host-outline-hover:var(--scorad-outline-hover,dashed 2px var(--host-primary-color));--host-outline-focus:var(--scorad-outline-focus,solid 2px var(--host-primary-color));display:var(--host-display,inline-flex);line-height:1.2}@media (prefers-color-scheme:dark){:host{--host-color-l:var(--color-l,70%)}}`;let R={headNeck:null,anteriorTrunk:null,posteriorTrunk:null,upperLimbs:null,lowerLimbs:null,genitals:null},z={erythema:null,oedemaPapulation:null,oozingCrusting:null,excoriations:null,lichenification:null,xerosis:null},B={pruritus:null,sleeplessness:null},nt={child:!1,extent:R,intensity:z,subjective:B},rt={headNeck:.09,anteriorTrunk:.18,posteriorTrunk:.18,upperLimbs:.18,lowerLimbs:.36,genitals:.01},V={headNeck:.18,anteriorTrunk:.18,posteriorTrunk:.18,upperLimbs:.18,lowerLimbs:.28,genitals:0};var H=`:host{--host-display:inline-flex;--host-font-size:1rem;flex-wrap:wrap;justify-content:center;align-items:center;position:relative}label{padding:var(--host-padding-unit)}svg{min-width:14rem;max-width:18rem;margin:var(--host-padding-unit)0;fill:#0000;stroke:var(--host-color);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;flex:16rem;overflow:visible}@media print{svg{flex:0 0 14rem;width:14rem}}path,line{vector-effect:non-scaling-stroke}path{opacity:.333}text,line{opacity:.667}g{outline:none}g[tabindex] path{opacity:1;fill:hsla(var(--scorad-h,0),var(--extent,"0%"),50%,var(--opacity,0))}:host(:not([aria-readonly=true])) g[tabindex] path{cursor:grab}:host(:not([aria-readonly=true])) :has(:active) g[tabindex] path{cursor:ns-resize}:is(:host(:not([aria-readonly=true])) :not(:has(:active)) g[tabindex]:hover path,:host(:not([aria-readonly=true])) :not(:has(:active)) g[tabindex]:hover line){stroke-width:2px;stroke:var(--host-primary-color);stroke-dasharray:2 3.5;opacity:1}:host(:not([aria-readonly=true])) g[tabindex]:focus path,:host(:not([aria-readonly=true])) g[tabindex]:active path,:host(:not([aria-readonly=true])) g[tabindex].selected path,:host(:not([aria-readonly=true])) g[tabindex]:focus line,:host(:not([aria-readonly=true])) g[tabindex]:active line,:host(:not([aria-readonly=true])) g[tabindex].selected line{stroke-width:2px;stroke:var(--host-primary-color);opacity:1;stroke-dasharray:none!important}g[tabindex] text{fill:var(--host-color);stroke:none;font-size:var(--host-font-size);text-anchor:end}g[tabindex].posterior-trunk text{text-anchor:start}:is(:host(:not([aria-readonly=true])) :not(:has(:active)) g[tabindex]:hover text,:host(:not([aria-readonly=true])) g[tabindex]:focus text,:host(:not([aria-readonly=true])) g[tabindex]:active text,:host(:not([aria-readonly=true])) g[tabindex].selected text){fill:var(--host-primary-color);opacity:1}`;let U=e=>e?.child?V:rt,W=e=>{let t=[],n=(e,n,r)=>{for(let[i,a]of Object.entries(e))W.isValid(a,r)||t.push(W.formatError(n,i,r,a))},r={...e?.extent??R},i=U(e);for(let[e,t]of Object.entries(i))t===0&&delete r[e];return n(r,`extent`,100),n(e?.intensity??z,`intensity`,3),n(e?.subjective??B,`subjective`,10),t.length?te.Fail(t):te.Ok(e)};W.formatError=(e,t,n,r)=>`${e}.${t}: must be between 0 and ${n}, but received ${r}.`,W.isValid=(e,t)=>typeof e==`number`&&Number.isFinite(e)&&e>=0&&e<=t;let it={child:{text:`child`,description:`use weightings for a child`},extent:{headNeck:{text:`head`,description:`percentage of the head and neck area affected`},anteriorTrunk:{text:`trunk`,description:`percentage of the front torso area affected`},posteriorTrunk:{text:`back`,description:`percentage of the back torso area affected`},genitals:{text:`genitals`,description:`percentage of the genital area affected`},upperLimbs:{text:`arms`,description:`percentage of the arms and shoulders affected`},lowerLimbs:{text:`legs`,description:`percentage of the legs and hips affected`}},intensity:{erythema:{text:`Erythema`,description:`redness of the skin`},oedemaPapulation:{text:`Oedema/Papulation`,description:`swelling and small bumps`},oozingCrusting:{text:`Oozing/Crusting`,description:`fluid leakage and dried scabs`},excoriations:{text:`Excoriations`,description:`scratch marks`},lichenification:{text:`Lichenification`,description:`skin thickening and hardening`},xerosis:{text:`Xerosis`,description:`dryness of the skin`}},subjective:{pruritus:{text:`Pruritus`,description:`itching`},sleeplessness:{text:`Sleeplessness`,description:`difficulty sleeping`}}};var at=`scorad-extent`,G=class extends x{connectedCallback(){this.render(),this.addEventListener(`focusin`,this.handleFocusIn,{once:!0})}disconnectedCallback(){this.removeEventListener(`focusin`,this.handleFocusIn)}handleFocusIn=()=>{this.readonly||(this.committedValue=this.value,this.addEventListener(`focusout`,this.handleFocusOut,{once:!0}))};handleFocusOut=()=>{this.addEventListener(`focusin`,this.handleFocusIn,{once:!0}),!c(this.value,this.committedValue)&&this.valueChange(this.value)};child=!1;readonly=!1;committedValue=R;value=R;score;setValue=e=>{this.value=e,this.errors=void 0,this.valueInput(this.value)};errors;afterRender(){if(!this.value){this.value=R;return}if(this.shadowRoot)for(let e of f(R)){let t=(this.value??{})[e],n=this.shadowRoot.querySelector(`.${g(e)}`);if(!n)return;n.style.setProperty(`--extent`,`${t}%`),n.style.setProperty(`--opacity`,`${(t??0)/100}`);let r=n.querySelector(`text`);if(!r)return;r.textContent=W.isValid(t,100)?`${t}%`:it.extent[e].text,n.querySelectorAll(`path`).forEach(t=>t.style.stroke=this.errors?.[e]==null?``:`var(--host-error-color)`)}}resizeCallback(){if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector(`svg`);if(!e)return;let t=Math.round(19e3/e.clientWidth)/100;this.style.setProperty(`--host-font-size`,`${t}rem`)}render(){let e=e=>{let t=t=>{if(this.readonly)return;let n=Math.round(Math.min(100,Math.max(0,t)));this.setValue({...this.value,[e]:n})};return n=>{if(!n)return;`ontouchstart`in window&&n.addEventListener(`touchstart`,e=>{e.preventDefault()},{passive:!1}),n.style.touchAction=`none`,n.addEventListener(`pointerdown`,r=>{r.stopPropagation(),n.focus();let i=this.value[e],a=r.clientY,o=e=>{e.preventDefault();let n=(a-e.clientY)/2;t(Math.round((i+n)/5)*5)},s=()=>{document.removeEventListener(`pointermove`,o),document.removeEventListener(`pointerup`,s),document.removeEventListener(`pointercancel`,s)};document.addEventListener(`pointermove`,o),document.addEventListener(`pointerup`,s),document.addEventListener(`pointercancel`,s),o(r)});let r,i;n.addEventListener(`focus`,()=>{i=`000`,r=this.value[e]}),n.addEventListener(`keydown`,n=>{let a=W.isValid(this.value[e],100)?this.value[e]:0,o=n.shiftKey?5:1;switch(n.key){case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:t(Number.parseInt(i.substring(1)+n.key)),i=ne(this.value[e],3);break;case`ArrowLeft`:case`ArrowDown`:n.preventDefault(),t(a-o);break;case`ArrowUp`:case`ArrowRight`:n.preventDefault(),t(a+o);break;case`Escape`:n.preventDefault(),t(r);break}})}},t=e=>t=>{t&&(t.textContent=`${this.value[e]}%`)};return F`
|
|
12
12
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 190 240">
|
|
13
13
|
<g ${e(`headNeck`)}
|
|
14
14
|
class="head-neck" tabindex="0">
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
<path d="M120,142 Q110,155 100,151 L100,230 A1,1 0,0,0 120,230Z"></path>
|
|
74
74
|
</g>
|
|
75
75
|
</svg>
|
|
76
|
-
`}valueInput;valueChange};I([_(re)],G.prototype,`child`,void 0),I([_({name:`aria-readonly`,...v})],G.prototype,`readonly`,void 0),I([_({name:`has-errors`,write:e=>e==null?void 0:``,read:!1})],G.prototype,`errors`,void 0),I([S(`value`,`errors`)],G.prototype,`afterRender`,null),I([S(`child`)],G.prototype,`render`,null),I([b()],G.prototype,`valueInput`,void 0),I([b()],G.prototype,`valueChange`,void 0),G=I([y({tag:at,css:[L,H],delegatesFocus:!0})],G);var ot=`:host{--host-display:inline-flex;flex-direction:column;position:relative}scorad-options{align-self:center;margin-left:auto}`,st=`:host{--host-display:inline-flex;--host-option-width:var(--scorad-option-width,1.5em);--host-option-height:var(--scorad-option-height,1.5em);--host-option-border:var(--scorad-option-border,solid 1px var(--host-color));--host-option-border-selected:var(--scorad-option-border-selected,solid 2px var(--host-color));--host-option-color:var(--scorad-option-color,var(--host-color));--host-option-background:var(--scorad-option-background,transparent);--host-option-color-selected:var(--scorad-option-color-selected,var(--host-background-color));--host-option-background-selected:var(--scorad-option-background-selected,var(--host-color));gap:var(--host-spacing-unit);margin:var(--host-padding-unit)0;outline:none;width:max-content;position:relative}span{height:var(--host-option-height);width:var(--host-option-width);outline:var(--host-option-border);border-radius:var(--host-border-radius);padding:calc(.5*var(--host-padding-unit))var(--host-padding-unit);color:var(--host-option-color);background:var(--host-option-background)
|
|
76
|
+
`}valueInput;valueChange};I([_(re)],G.prototype,`child`,void 0),I([_({name:`aria-readonly`,...v})],G.prototype,`readonly`,void 0),I([_({name:`has-errors`,write:e=>e==null?void 0:``,read:!1})],G.prototype,`errors`,void 0),I([S(`value`,`errors`,`readonly`)],G.prototype,`afterRender`,null),I([S(`child`)],G.prototype,`render`,null),I([b()],G.prototype,`valueInput`,void 0),I([b()],G.prototype,`valueChange`,void 0),G=I([y({tag:at,css:[L,H],delegatesFocus:!0})],G);var ot=`:host{--host-display:inline-flex;flex-direction:column;position:relative}scorad-options{align-self:center;margin-left:auto}`,st=`:host{--host-display:inline-flex;--host-option-width:var(--scorad-option-width,1.5em);--host-option-height:var(--scorad-option-height,1.5em);--host-option-border:var(--scorad-option-border,solid 1px var(--host-color));--host-option-border-selected:var(--scorad-option-border-selected,solid 2px var(--host-color));--host-option-color:var(--scorad-option-color,var(--host-color));--host-option-background:var(--scorad-option-background,transparent);--host-option-color-selected:var(--scorad-option-color-selected,var(--host-background-color));--host-option-background-selected:var(--scorad-option-background-selected,var(--host-color));gap:var(--host-spacing-unit);margin:var(--host-padding-unit)0;outline:none;width:max-content;position:relative}span{height:var(--host-option-height);width:var(--host-option-width);outline:var(--host-option-border);border-radius:var(--host-border-radius);padding:calc(.5*var(--host-padding-unit))var(--host-padding-unit);color:var(--host-option-color);background:var(--host-option-background)}:host(:not([aria-readonly=true])) span{cursor:pointer}span:before{content:"";touch-action:none;pointer-events:none}span[aria-selected=true]{outline:var(--host-option-border-selected);color:var(--host-option-color-selected);background:var(--host-option-background-selected)}`,ct=`scorad-options`,K=class extends x{connectedCallback(){this.render(),this.addEventListener(`focusin`,this.handleFocusIn,{once:!0}),this.addEventListener(`click`,this.handleClick)}disconnectedCallback(){this.removeEventListener(`focusin`,this.handleFocusIn),this.removeEventListener(`click`,this.handleClick)}handleFocusIn=()=>{this.readonly||(this.committedValue=this.value,this.addEventListener(`focusout`,this.handleFocusOut,{once:!0}),this.addEventListener(`keydown`,this.handleKeydown))};handleFocusOut=()=>{this.removeEventListener(`keydown`,this.handleKeydown),this.addEventListener(`focusin`,this.handleFocusIn,{once:!0}),this.setValue(this.value),this.value!==this.committedValue&&this.valueChange(this.value)};handleClick=e=>{if(this.readonly)return;e.stopPropagation(),e.preventDefault(),this.focus();let t=e.composedPath()[0];if(!(t instanceof HTMLSpanElement))return;let n=Number.parseInt(t.dataset.value);this.setValue(n)};handleKeydown=e=>{let t=this.value??0;switch(e.key){case`ArrowLeft`:case`ArrowDown`:e.preventDefault(),this.setValue(t-1);break;case`ArrowUp`:case`ArrowRight`:e.preventDefault(),this.setValue(t+1);break;case`Escape`:e.preventDefault(),this.setValue(this.committedValue);break}};min=0;max=5;showHue=!1;committedValue=0;value=0;setValue=e=>{this.value=Math.max(this.min,Math.min(this.max,e)),this.valueInput(this.value)};readonly=!1;text=[];render(){return F`
|
|
77
77
|
${Array.from({length:this.max-this.min+1},(e,t)=>this.min+t).map(e=>F`
|
|
78
78
|
<span data-value="${e}">${this.text[e]}</span>
|
|
79
79
|
`)}
|
|
80
|
-
`}afterRender(){this.shadowRoot&&this.shadowRoot.querySelectorAll(`span`).forEach(e=>{let t=Number.parseInt(e.dataset.value);if(e.setAttribute(`aria-selected`,t===this.value?`true`:`false`),!this.showHue)return;if(t>this.value){e.style.backgroundColor=``;return}let n=Math.round(100*t/(this.max-this.min));e.style.backgroundColor=`hsl(var(--scorad-h, 0), ${n}%, 50%, ${n}%)`})}valueInput;valueChange};I([_({read:Number,write:!1})],K.prototype,`min`,void 0),I([_({read:Number,write:!1})],K.prototype,`max`,void 0),I([_(re)],K.prototype,`showHue`,void 0),I([_({name:`aria-readonly`,...v})],K.prototype,`readonly`,void 0),I([_({write:!1})],K.prototype,`text`,void 0),I([S(`min`,`max`,`text`)],K.prototype,`render`,null),I([S(`value`)],K.prototype,`afterRender`,null),I([b()],K.prototype,`valueInput`,void 0),I([b()],K.prototype,`valueChange`,void 0),K=I([y({tag:ct,css:[L,st]})],K);var lt=`scorad-intensity`,q=class extends x{connectedCallback(){this.render()}readonly=!1;value=z;score;errors;afterRender(){if(this.value==null){this.value=z;return}if(this.shadowRoot)for(let[e,t]of Object.entries(this.value)){let n=this.shadowRoot.querySelector(`.${g(e)}`);if(!n)return;n.dataset.value=`${t}`;let r=n.querySelector(`scorad-options`);if(!r)return;r.value=t,r.style.setProperty(`--host-option-border`,this.errors?.[e]==null?null:`solid 1px var(--host-error-color)`)}}render(){return F`
|
|
80
|
+
`}afterRender(){this.shadowRoot&&this.shadowRoot.querySelectorAll(`span`).forEach(e=>{let t=Number.parseInt(e.dataset.value);if(e.setAttribute(`aria-selected`,t===this.value?`true`:`false`),!this.showHue)return;if(t>this.value){e.style.backgroundColor=``;return}let n=Math.round(100*t/(this.max-this.min));e.style.backgroundColor=`hsl(var(--scorad-h, 0), ${n}%, 50%, ${n}%)`})}valueInput;valueChange};I([_({read:Number,write:!1})],K.prototype,`min`,void 0),I([_({read:Number,write:!1})],K.prototype,`max`,void 0),I([_(re)],K.prototype,`showHue`,void 0),I([_({name:`aria-readonly`,...v})],K.prototype,`readonly`,void 0),I([_({write:!1})],K.prototype,`text`,void 0),I([S(`min`,`max`,`text`)],K.prototype,`render`,null),I([S(`value`,`readonly`)],K.prototype,`afterRender`,null),I([b()],K.prototype,`valueInput`,void 0),I([b()],K.prototype,`valueChange`,void 0),K=I([y({tag:ct,css:[L,st]})],K);var lt=`scorad-intensity`,q=class extends x{connectedCallback(){this.render()}readonly=!1;value=z;score;errors;afterRender(){if(this.value==null){this.value=z;return}if(this.shadowRoot)for(let[e,t]of Object.entries(this.value)){let n=this.shadowRoot.querySelector(`.${g(e)}`);if(!n)return;n.dataset.value=`${t}`;let r=n.querySelector(`scorad-options`);if(!r)return;r.value=t,r.readonly=this.readonly,r.style.setProperty(`--host-option-border`,this.errors?.[e]==null?null:`solid 1px var(--host-error-color)`)}}render(){return F`
|
|
81
81
|
${f(this.value).map(e=>this.renderLevel(e))}
|
|
82
82
|
`}renderLevel(e){let t=t=>{t&&(t.addEventListener(`value-input`,t=>{this.value={...this.value,[e]:t.detail},this.errors=void 0,this.valueInput(this.value)}),t.addEventListener(`value-change`,t=>{this.value={...this.value,[e]:t.detail},this.errors=void 0,this.valueChange(this.value)}))},n=it.intensity[e];return F`
|
|
83
83
|
<scorad-label class="${g(e)} row"
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
min="0" max="3" show-hue tabindex="0"
|
|
88
88
|
></scorad-options>
|
|
89
89
|
</scorad-label>
|
|
90
|
-
`}valueInput;valueChange};I([_({name:`aria-readonly`,...v})],q.prototype,`readonly`,void 0),I([_({name:`has-errors`,write:e=>e==null?void 0:``,read:!1})],q.prototype,`errors`,void 0),I([S(`value`,`errors`)],q.prototype,`afterRender`,null),I([b()],q.prototype,`valueInput`,void 0),I([b()],q.prototype,`valueChange`,void 0),q=I([y({tag:lt,css:[L,ot],delegatesFocus:!0})],q);var ut=`:host{--host-display:inline-flex;--scorad-label-text-min-width:7rem;flex-direction:column;position:relative}scorad-options{align-self:center;margin-left:auto}`,dt=`scorad-subjective`,J=class extends x{connectedCallback(){this.render()}value=B;score;errors;afterRender(){if(this.value==null){this.value=B;return}if(this.shadowRoot)for(let[e,t]of Object.entries(this.value)){let n=this.shadowRoot.querySelector(`.${g(e)}`);if(!n)return;n.dataset.value=`${t}`;let r=n.querySelector(`scorad-options`);if(!r)return;r.value=t,r.style.setProperty(`--host-option-border`,this.errors?.[e]==null?null:`solid 1px var(--host-error-color)`)}}render(){return F`
|
|
90
|
+
`}valueInput;valueChange};I([_({name:`aria-readonly`,...v})],q.prototype,`readonly`,void 0),I([_({name:`has-errors`,write:e=>e==null?void 0:``,read:!1})],q.prototype,`errors`,void 0),I([S(`value`,`errors`,`readonly`)],q.prototype,`afterRender`,null),I([b()],q.prototype,`valueInput`,void 0),I([b()],q.prototype,`valueChange`,void 0),q=I([y({tag:lt,css:[L,ot],delegatesFocus:!0})],q);var ut=`:host{--host-display:inline-flex;--scorad-label-text-min-width:7rem;flex-direction:column;position:relative}scorad-options{align-self:center;margin-left:auto}`,dt=`scorad-subjective`,J=class extends x{connectedCallback(){this.render()}readonly=!1;value=B;score;errors;afterRender(){if(this.value==null){this.value=B;return}if(this.shadowRoot)for(let[e,t]of Object.entries(this.value)){let n=this.shadowRoot.querySelector(`.${g(e)}`);if(!n)return;n.dataset.value=`${t}`;let r=n.querySelector(`scorad-options`);if(!r)return;r.value=t,r.readonly=this.readonly,r.style.setProperty(`--host-option-border`,this.errors?.[e]==null?null:`solid 1px var(--host-error-color)`)}}render(){return F`
|
|
91
91
|
${f(this.value).map(e=>this.renderLevel(e))}
|
|
92
92
|
`}renderLevel(e){let t=t=>{t&&t.addEventListener(`value-input`,t=>{this.value={...this.value,[e]:t.detail},this.valueInput(this.value)})},n=it.subjective[e];return F`
|
|
93
93
|
<scorad-label class="${g(e)} row"
|
|
@@ -96,17 +96,17 @@
|
|
|
96
96
|
<scorad-options ${t}
|
|
97
97
|
min="0" max="10" show-hue tabindex="0"></scorad-options>
|
|
98
98
|
</scorad-label>
|
|
99
|
-
`}valueInput;valueChange};I([_({name:`has-errors`,write:e=>e==null?void 0:``,read:!1})],J.prototype,`errors`,void 0),I([S(`value`,`errors`)],J.prototype,`afterRender`,null),I([b()],J.prototype,`valueInput`,void 0),I([b()],J.prototype,`valueChange`,void 0),J=I([y({tag:dt,css:[L,ut],delegatesFocus:!0})],J);var ft=`:host{--host-display:inline-flex;padding:0 var(--host-padding-unit);border-radius:var(--host-border-radius);justify-content:center;align-items:baseline;position:relative}:host(:hover){outline:var(--host-outline-hover)}:host(:focus-within){outline:var(--host-outline-focus)}scorad-options{--host-option-width:auto;--host-option-height:auto}`,pt=`scorad-weightings`,Y=class extends x{connectedCallback(){this.render()}value=!1;afterRender(){if(this.value==null){this.value=!1;return}if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector(`scorad-options`);e&&(e.value=this.value?1:0,e.text=[`Adult`,`Child`])}render(){return F`
|
|
99
|
+
`}valueInput;valueChange};I([_({name:`aria-readonly`,...v})],J.prototype,`readonly`,void 0),I([_({name:`has-errors`,write:e=>e==null?void 0:``,read:!1})],J.prototype,`errors`,void 0),I([S(`value`,`errors`,`readonly`)],J.prototype,`afterRender`,null),I([b()],J.prototype,`valueInput`,void 0),I([b()],J.prototype,`valueChange`,void 0),J=I([y({tag:dt,css:[L,ut],delegatesFocus:!0})],J);var ft=`:host{--host-display:inline-flex;padding:0 var(--host-padding-unit);border-radius:var(--host-border-radius);justify-content:center;align-items:baseline;position:relative}:host(:hover){outline:var(--host-outline-hover)}:host(:focus-within){outline:var(--host-outline-focus)}scorad-options{--host-option-width:auto;--host-option-height:auto}`,pt=`scorad-weightings`,Y=class extends x{connectedCallback(){this.render()}readonly=!1;value=!1;afterRender(){if(this.value==null){this.value=!1;return}if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector(`scorad-options`);e&&(e.value=this.value?1:0,e.text=[`Adult`,`Child`],e.readonly=this.readonly)}render(){return F`
|
|
100
100
|
<scorad-options ${e=>{e.addEventListener(`value-input`,e=>{this.value=e.detail===1,this.valueInput(this.value)})}}
|
|
101
101
|
min="0" max="1" tabindex="0"
|
|
102
102
|
></scorad-options>
|
|
103
|
-
`}valueInput;valueChange};I([S(`value`)],Y.prototype,`afterRender`,null),I([b()],Y.prototype,`valueInput`,void 0),I([b()],Y.prototype,`valueChange`,void 0),Y=I([y({tag:pt,css:[L,ft],delegatesFocus:!0})],Y);let mt=e=>{let t=W(e);if(t instanceof
|
|
103
|
+
`}valueInput;valueChange};I([_({name:`aria-readonly`,...v})],Y.prototype,`readonly`,void 0),I([S(`value`,`readonly`)],Y.prototype,`afterRender`,null),I([b()],Y.prototype,`valueInput`,void 0),I([b()],Y.prototype,`valueChange`,void 0),Y=I([y({tag:pt,css:[L,ft],delegatesFocus:!0})],Y);let mt=e=>{let t=W(e);if(t instanceof ee)return t;e=t.value;let n=U(e),r=Object.entries(e.extent).reduce((e,[t,r])=>e+r*n[t],0),i=Object.values(e.intensity).reduce((e,t)=>e+t,0),a=e.subjective.pruritus+e.subjective.sleeplessness,o=Math.round((r/5+7*i/2+a)*100)/100;return te.Ok({A:r,B:i,C:a,total:o})};var X=`:host{--host-display:var(--scorad-label-display,inline-flex);--host-options:var(--scorad-label-options,solid 1px var(--host-color));--host-text-min-width:var(--scorad-label-text-min-width,none);--host-text-max-width:var(--scorad-label-text-max-width,none);grid-column:1/3;grid-template-columns:subgrid;padding:var(--host-padding-unit);border-radius:var(--host-border-radius-outer);flex-wrap:wrap;align-content:baseline;align-items:baseline;position:relative}:host(:hover){outline:var(--host-outline-hover)}:host(:focus-within){outline:var(--host-outline-focus)}:host>label{min-width:var(--host-text-min-width);max-width:var(--host-text-max-width)}:host>label>slot[name=text]{transition:all .2s ease-in-out;display:block}:host>label>slot[name=description]{opacity:0;margin-bottom:-1.1em;transition:all .4s ease-in-out;display:block}:host(:hover)>label>slot[name=text],:host(:focus-within)>label>slot[name=text]{transform:translateY(-.5em)}:host(:hover)>label>slot[name=description],:host(:focus-within)>label>slot[name=description]{opacity:.667;transform:translateY(-.6em)}@media print{:host>label>slot[name=text]{transform:translateY(-.5em)}:host>label>slot[name=description]{opacity:.667;transform:translateY(-.6em)}}:host>label{padding:var(--host-padding-unit);flex:1;padding-left:0}`,ht=`scorad-label`,gt=class extends x{connectedCallback(){this.render(),this.addEventListener(`click`,this.handleClick)}diconnectedCallback(){this.removeEventListener(`click`,this.handleClick)}handleClick=e=>{this.querySelector(i)?.focus()};text=`(label)`;description;render(){return F`
|
|
104
104
|
<label>
|
|
105
105
|
<slot name="text"><span>${this.text}</span></slot>
|
|
106
106
|
<slot name="description"><small>${this.description}</small></slot>
|
|
107
107
|
</label>
|
|
108
108
|
<slot></slot>
|
|
109
|
-
`}};I([_({write:!1})],gt.prototype,`text`,void 0),I([_({write:!1})],gt.prototype,`description`,void 0),gt=I([y({tag:ht,css:[L,X]})],gt);var _t=`scorad-component`,Z=class extends x{connectedCallback(){this.render()}value=nt;showErrors=!1;afterRender(){if(this.value==null){this.value=nt;return}if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector(`#score`);if(!e)return;let t=mt(this.value).orNull(),n={},r=W(this.value).errors.reduce((e,t)=>{let n=t.indexOf(`:`);return p(e,t.substring(0,n),t.substring(n+2))},n);e.innerText=`${t?.total??`Get Score`}`,e.style.color=this.showErrors&&r!=n?`var(--host-error-color)`:``;let i=this.shadowRoot.querySelector(`scorad-subjective`);i&&(i.value=this.value?.subjective??B,i.score=t?.B,this.showErrors&&(i.errors=d(r,`subjective`)));let a=this.shadowRoot.querySelector(`scorad-intensity`);a&&(a.value=this.value?.intensity??z,a.score=t?.B,this.showErrors&&(a.errors=d(r,`intensity`)));let o=this.shadowRoot.querySelector(`scorad-extent`);o&&(o.child=this.value?.child??!1,o.value=this.value?.extent??R,o.score=t?.A,this.showErrors&&(o.errors=d(r,`extent`)));let s=this.shadowRoot.querySelector(`scorad-weightings`);s&&(s.value=this.value?.child??!1)}render(){return F`
|
|
109
|
+
`}};I([_({write:!1})],gt.prototype,`text`,void 0),I([_({write:!1})],gt.prototype,`description`,void 0),gt=I([y({tag:ht,css:[L,X]})],gt);var _t=`scorad-component`,Z=class extends x{connectedCallback(){this.render()}readonly=!1;value=nt;showErrors=!1;afterRender(){if(this.value==null){this.value=nt;return}if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector(`#score`);if(!e)return;let t=mt(this.value).orNull(),n={},r=W(this.value).errors.reduce((e,t)=>{let n=t.indexOf(`:`);return p(e,t.substring(0,n),t.substring(n+2))},n);e.innerText=`${t?.total??`Get Score`}`,e.style.color=this.showErrors&&r!=n?`var(--host-error-color)`:``;let i=this.shadowRoot.querySelector(`scorad-subjective`);i&&(i.value=this.value?.subjective??B,i.score=t?.B,i.readonly=this.readonly,this.showErrors&&(i.errors=d(r,`subjective`)));let a=this.shadowRoot.querySelector(`scorad-intensity`);a&&(a.value=this.value?.intensity??z,a.score=t?.B,a.readonly=this.readonly,this.showErrors&&(a.errors=d(r,`intensity`)));let o=this.shadowRoot.querySelector(`scorad-extent`);o&&(o.child=this.value?.child??!1,o.value=this.value?.extent??R,o.score=t?.A,o.readonly=this.readonly,this.showErrors&&(o.errors=d(r,`extent`)));let s=this.shadowRoot.querySelector(`scorad-weightings`);s&&(s.value=this.value?.child??!1,s.readonly=this.readonly)}render(){return F`
|
|
110
110
|
<scorad-label id="extent-label">
|
|
111
111
|
<h3 slot="text">A</h3>
|
|
112
112
|
<p slot="description">extent - effected surface area</p>
|
|
@@ -133,4 +133,4 @@
|
|
|
133
133
|
>
|
|
134
134
|
<span id="score" tabindex="0"></span>
|
|
135
135
|
</scorad-label>
|
|
136
|
-
`}valueInput;valueChange};I([S(`value`,`showErrors`)],Z.prototype,`afterRender`,null),I([b()],Z.prototype,`valueInput`,void 0),I([b()],Z.prototype,`valueChange`,void 0),Z=I([y({tag:_t,css:[L,tt],delegatesFocus:!0})],Z);let vt=s(`@ntix/components-scorad`,typeof ANTIX_COMPONENTS_SCORAD_LOG_LEVEL>`u`?a.warn:ANTIX_COMPONENTS_SCORAD_LOG_LEVEL);Object.defineProperty(e,`HTMLScoradElement`,{enumerable:!0,get:function(){return Z}}),Object.defineProperty(e,`HTMLScoradExtentElement`,{enumerable:!0,get:function(){return G}}),Object.defineProperty(e,`HTMLScoradIntensityElement`,{enumerable:!0,get:function(){return q}}),Object.defineProperty(e,`HTMLScoradLabelElement`,{enumerable:!0,get:function(){return gt}}),Object.defineProperty(e,`HTMLScoradOptionsElement`,{enumerable:!0,get:function(){return K}}),Object.defineProperty(e,`HTMLScoradSubjectiveElement`,{enumerable:!0,get:function(){return J}}),Object.defineProperty(e,`HTMLScoradWeightingsElement`,{enumerable:!0,get:function(){return Y}}),e.SCORAD_ADULT_WEIGHTS=rt,e.SCORAD_CHILD_WEIGHTS=V,e.SCORAD_DEFAULT=nt,e.SCORAD_EXTENT_DEFAULT=R,e.SCORAD_EXTENT_MAX_VALUE=100,e.SCORAD_INTENSITY_DEFAULT=z,e.SCORAD_INTENSITY_MAX_VALUE=3,e.SCORAD_SUBJECTIVE_DEFAULT=B,e.SCORAD_SUBJECTIVE_MAX_VALUE=10,e.ScoradResources=it,e.componentsScoradLogger=vt,e.getScoradScore=mt,e.selectScoradWeights=U,e.validateScoradData=W});
|
|
136
|
+
`}valueInput;valueChange};I([_({name:`aria-readonly`,...v})],Z.prototype,`readonly`,void 0),I([S(`value`,`showErrors`,`readonly`)],Z.prototype,`afterRender`,null),I([b()],Z.prototype,`valueInput`,void 0),I([b()],Z.prototype,`valueChange`,void 0),Z=I([y({tag:_t,css:[L,tt],delegatesFocus:!0})],Z);let vt=s(`@ntix/components-scorad`,typeof ANTIX_COMPONENTS_SCORAD_LOG_LEVEL>`u`?a.warn:ANTIX_COMPONENTS_SCORAD_LOG_LEVEL);Object.defineProperty(e,`HTMLScoradElement`,{enumerable:!0,get:function(){return Z}}),Object.defineProperty(e,`HTMLScoradExtentElement`,{enumerable:!0,get:function(){return G}}),Object.defineProperty(e,`HTMLScoradIntensityElement`,{enumerable:!0,get:function(){return q}}),Object.defineProperty(e,`HTMLScoradLabelElement`,{enumerable:!0,get:function(){return gt}}),Object.defineProperty(e,`HTMLScoradOptionsElement`,{enumerable:!0,get:function(){return K}}),Object.defineProperty(e,`HTMLScoradSubjectiveElement`,{enumerable:!0,get:function(){return J}}),Object.defineProperty(e,`HTMLScoradWeightingsElement`,{enumerable:!0,get:function(){return Y}}),e.SCORAD_ADULT_WEIGHTS=rt,e.SCORAD_CHILD_WEIGHTS=V,e.SCORAD_DEFAULT=nt,e.SCORAD_EXTENT_DEFAULT=R,e.SCORAD_EXTENT_MAX_VALUE=100,e.SCORAD_INTENSITY_DEFAULT=z,e.SCORAD_INTENSITY_MAX_VALUE=3,e.SCORAD_SUBJECTIVE_DEFAULT=B,e.SCORAD_SUBJECTIVE_MAX_VALUE=10,e.ScoradResources=it,e.componentsScoradLogger=vt,e.getScoradScore=mt,e.selectScoradWeights=U,e.validateScoradData=W});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module
|
|
3
|
+
* @group Components
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Common interface for SCORAD input elements.
|
|
7
|
+
*
|
|
8
|
+
* This interface defines the standard reactive contract for components that manage a generic score value.
|
|
9
|
+
*
|
|
10
|
+
* @template T - The data type of the SCORAD value
|
|
11
|
+
*/
|
|
12
|
+
export interface HTMLScoradValueElement<T> extends HTMLElementEventMap {
|
|
13
|
+
/**
|
|
14
|
+
* Value is readonly
|
|
15
|
+
*/
|
|
16
|
+
readonly: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The current value of the component.
|
|
19
|
+
*
|
|
20
|
+
* @group Properties
|
|
21
|
+
*/
|
|
22
|
+
readonly value: T;
|
|
23
|
+
/**
|
|
24
|
+
* Fired immediately as the user interacts with the input (high frequency).
|
|
25
|
+
*
|
|
26
|
+
* @param detail - The current value of type {@link T} during input.
|
|
27
|
+
* @group Events
|
|
28
|
+
*/
|
|
29
|
+
readonly 'value-input': CustomEvent<T>;
|
|
30
|
+
/**
|
|
31
|
+
* Fired when the value is finalized or "committed" by the user.
|
|
32
|
+
*
|
|
33
|
+
* @param detail - The final updated value of type {@link T}.
|
|
34
|
+
* @group Events
|
|
35
|
+
*/
|
|
36
|
+
readonly 'value-change': CustomEvent<T>;
|
|
37
|
+
}
|
package/dist/ScoradData.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ScoradExtentData } from './ScoradExtentData';
|
|
|
2
2
|
import { ScoradIntensityData } from './ScoradIntensityData';
|
|
3
3
|
import { ScoradSubjectiveData } from './ScoradSubjectiveData';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* The complete data model for the SCORAD index, containing all three components (A, B, C).
|
|
6
6
|
*/
|
|
7
7
|
export type ScoradData = {
|
|
8
8
|
child: boolean;
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @module
|
|
3
|
+
* @group Data
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Represents the raw percentage affected (0-100) for each of the six SCORAD regions.
|
|
3
7
|
*/
|
|
4
8
|
export type ScoradExtentData = {
|
|
5
|
-
/**
|
|
9
|
+
/** Percentage (0-100) of the Head and Neck region affected. */
|
|
6
10
|
headNeck: number;
|
|
7
|
-
/**
|
|
11
|
+
/** Percentage (0-100) of the Anterior Trunk region affected. */
|
|
8
12
|
anteriorTrunk: number;
|
|
9
|
-
/**
|
|
13
|
+
/** Percentage (0-100) of the Posterior Trunk region affected. */
|
|
10
14
|
posteriorTrunk: number;
|
|
11
|
-
/**
|
|
15
|
+
/** Percentage (0-100) of the Genital region affected. */
|
|
12
16
|
genitals: number;
|
|
13
|
-
/**
|
|
17
|
+
/** Percentage (0-100) of the Upper Limbs region affected. */
|
|
14
18
|
upperLimbs: number;
|
|
15
|
-
/**
|
|
19
|
+
/** Percentage (0-100) of the Lower Limbs region affected. */
|
|
16
20
|
lowerLimbs: number;
|
|
17
21
|
};
|