@spectrum-web-components/slider 0.40.3 → 0.40.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -1
- package/custom-elements.json +123 -0
- package/package.json +9 -9
- package/src/Slider.d.ts +21 -1
- package/src/Slider.dev.js +59 -0
- package/src/Slider.dev.js.map +2 -2
- package/src/Slider.js +23 -18
- package/src/Slider.js.map +3 -3
- package/src/slider.css.dev.js +25 -17
- package/src/slider.css.dev.js.map +2 -2
- package/src/slider.css.js +25 -17
- package/src/slider.css.js.map +2 -2
- package/src/spectrum-config.js +2 -1
- package/src/spectrum-slider.css.dev.js +24 -16
- package/src/spectrum-slider.css.dev.js.map +2 -2
- package/src/spectrum-slider.css.js +24 -16
- package/src/spectrum-slider.css.js.map +2 -2
- package/stories/slider.stories.js +88 -4
- package/stories/slider.stories.js.map +2 -2
- package/test/slider.test.js +76 -0
- package/test/slider.test.js.map +2 -2
package/README.md
CHANGED
|
@@ -83,10 +83,75 @@ import { Slider } from '@spectrum-web-components/slider';
|
|
|
83
83
|
### Filled
|
|
84
84
|
|
|
85
85
|
```html
|
|
86
|
-
<sp-slider
|
|
86
|
+
<sp-slider
|
|
87
|
+
label="Slider Label"
|
|
88
|
+
max="1"
|
|
89
|
+
variant="filled"
|
|
90
|
+
min="0"
|
|
91
|
+
value=".5"
|
|
92
|
+
step="0.01"
|
|
93
|
+
></sp-slider>
|
|
87
94
|
<sp-slider
|
|
88
95
|
label="Slider Label - Disabled"
|
|
96
|
+
max="1"
|
|
89
97
|
variant="filled"
|
|
98
|
+
min="0"
|
|
99
|
+
value=".5"
|
|
100
|
+
step="0.01"
|
|
101
|
+
disabled
|
|
102
|
+
></sp-slider>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Filled Offset with only fill-start
|
|
106
|
+
|
|
107
|
+
```html
|
|
108
|
+
<sp-slider
|
|
109
|
+
label="Slider Label"
|
|
110
|
+
max="1"
|
|
111
|
+
fill-start
|
|
112
|
+
min="0"
|
|
113
|
+
value=".5"
|
|
114
|
+
step="0.01"
|
|
115
|
+
></sp-slider>
|
|
116
|
+
<sp-slider
|
|
117
|
+
label="Slider Label"
|
|
118
|
+
max="1"
|
|
119
|
+
fill-start
|
|
120
|
+
min="0"
|
|
121
|
+
value=".5"
|
|
122
|
+
step="0.01"
|
|
123
|
+
disabled
|
|
124
|
+
></sp-slider>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Filled Offset with fill-start value
|
|
128
|
+
|
|
129
|
+
```html
|
|
130
|
+
<sp-slider
|
|
131
|
+
id="fill-start-slider"
|
|
132
|
+
label="Fill Start greater than Value"
|
|
133
|
+
max="1"
|
|
134
|
+
min="0"
|
|
135
|
+
value=".3"
|
|
136
|
+
step="0.1"
|
|
137
|
+
fill-start="0.7"
|
|
138
|
+
></sp-slider>
|
|
139
|
+
<sp-slider
|
|
140
|
+
id="fill-start-slider"
|
|
141
|
+
label="Fill Start less than Value"
|
|
142
|
+
max="1"
|
|
143
|
+
min="0"
|
|
144
|
+
value=".7"
|
|
145
|
+
step="0.1"
|
|
146
|
+
fill-start="0.25"
|
|
147
|
+
></sp-slider>
|
|
148
|
+
<sp-slider
|
|
149
|
+
label="Slider Label"
|
|
150
|
+
max="1"
|
|
151
|
+
min="0"
|
|
152
|
+
value=".7"
|
|
153
|
+
step="0.1"
|
|
154
|
+
fill-start="0.25"
|
|
90
155
|
disabled
|
|
91
156
|
></sp-slider>
|
|
92
157
|
```
|
package/custom-elements.json
CHANGED
|
@@ -705,6 +705,16 @@
|
|
|
705
705
|
"default": "''",
|
|
706
706
|
"attribute": "type"
|
|
707
707
|
},
|
|
708
|
+
{
|
|
709
|
+
"kind": "field",
|
|
710
|
+
"name": "dir",
|
|
711
|
+
"type": {
|
|
712
|
+
"text": "'ltr' | 'rtl'"
|
|
713
|
+
},
|
|
714
|
+
"privacy": "public",
|
|
715
|
+
"attribute": "dir",
|
|
716
|
+
"reflects": true
|
|
717
|
+
},
|
|
708
718
|
{
|
|
709
719
|
"kind": "field",
|
|
710
720
|
"name": "variant",
|
|
@@ -848,6 +858,16 @@
|
|
|
848
858
|
"attribute": "disabled",
|
|
849
859
|
"reflects": true
|
|
850
860
|
},
|
|
861
|
+
{
|
|
862
|
+
"kind": "field",
|
|
863
|
+
"name": "fillStart",
|
|
864
|
+
"type": {
|
|
865
|
+
"text": "number | boolean | undefined"
|
|
866
|
+
},
|
|
867
|
+
"privacy": "public",
|
|
868
|
+
"attribute": "fill-start",
|
|
869
|
+
"reflects": true
|
|
870
|
+
},
|
|
851
871
|
{
|
|
852
872
|
"kind": "field",
|
|
853
873
|
"name": "quiet",
|
|
@@ -992,6 +1012,95 @@
|
|
|
992
1012
|
}
|
|
993
1013
|
]
|
|
994
1014
|
},
|
|
1015
|
+
{
|
|
1016
|
+
"kind": "field",
|
|
1017
|
+
"name": "_cachedValue",
|
|
1018
|
+
"type": {
|
|
1019
|
+
"text": "number | undefined"
|
|
1020
|
+
},
|
|
1021
|
+
"privacy": "private"
|
|
1022
|
+
},
|
|
1023
|
+
{
|
|
1024
|
+
"kind": "field",
|
|
1025
|
+
"name": "centerPoint",
|
|
1026
|
+
"type": {
|
|
1027
|
+
"text": "number | undefined"
|
|
1028
|
+
},
|
|
1029
|
+
"privacy": "private"
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
"kind": "method",
|
|
1033
|
+
"name": "getOffsetWidth",
|
|
1034
|
+
"privacy": "private",
|
|
1035
|
+
"return": {
|
|
1036
|
+
"type": {
|
|
1037
|
+
"text": ""
|
|
1038
|
+
}
|
|
1039
|
+
},
|
|
1040
|
+
"parameters": [
|
|
1041
|
+
{
|
|
1042
|
+
"name": "fillStartValue",
|
|
1043
|
+
"type": {
|
|
1044
|
+
"text": "number"
|
|
1045
|
+
}
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
"name": "currentValue",
|
|
1049
|
+
"type": {
|
|
1050
|
+
"text": "number"
|
|
1051
|
+
}
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
"name": "cachedValue"
|
|
1055
|
+
}
|
|
1056
|
+
]
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
"kind": "method",
|
|
1060
|
+
"name": "getOffsetPosition",
|
|
1061
|
+
"privacy": "private",
|
|
1062
|
+
"return": {
|
|
1063
|
+
"type": {
|
|
1064
|
+
"text": "number"
|
|
1065
|
+
}
|
|
1066
|
+
},
|
|
1067
|
+
"parameters": [
|
|
1068
|
+
{
|
|
1069
|
+
"name": "value",
|
|
1070
|
+
"type": {
|
|
1071
|
+
"text": "number"
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
]
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
"kind": "method",
|
|
1078
|
+
"name": "fillStyles",
|
|
1079
|
+
"privacy": "private",
|
|
1080
|
+
"return": {
|
|
1081
|
+
"type": {
|
|
1082
|
+
"text": "StyleInfo"
|
|
1083
|
+
}
|
|
1084
|
+
},
|
|
1085
|
+
"parameters": [
|
|
1086
|
+
{
|
|
1087
|
+
"name": "centerPoint",
|
|
1088
|
+
"type": {
|
|
1089
|
+
"text": "number"
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
]
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
"kind": "method",
|
|
1096
|
+
"name": "renderFillOffset",
|
|
1097
|
+
"privacy": "private",
|
|
1098
|
+
"return": {
|
|
1099
|
+
"type": {
|
|
1100
|
+
"text": "TemplateResult"
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
},
|
|
995
1104
|
{
|
|
996
1105
|
"kind": "method",
|
|
997
1106
|
"name": "renderTrack",
|
|
@@ -1331,6 +1440,13 @@
|
|
|
1331
1440
|
"default": "''",
|
|
1332
1441
|
"fieldName": "type"
|
|
1333
1442
|
},
|
|
1443
|
+
{
|
|
1444
|
+
"name": "dir",
|
|
1445
|
+
"type": {
|
|
1446
|
+
"text": "'ltr' | 'rtl'"
|
|
1447
|
+
},
|
|
1448
|
+
"fieldName": "dir"
|
|
1449
|
+
},
|
|
1334
1450
|
{
|
|
1335
1451
|
"name": "variant",
|
|
1336
1452
|
"type": {
|
|
@@ -1405,6 +1521,13 @@
|
|
|
1405
1521
|
"default": "false",
|
|
1406
1522
|
"fieldName": "disabled"
|
|
1407
1523
|
},
|
|
1524
|
+
{
|
|
1525
|
+
"name": "fill-start",
|
|
1526
|
+
"type": {
|
|
1527
|
+
"text": "number | boolean | undefined"
|
|
1528
|
+
},
|
|
1529
|
+
"fieldName": "fillStart"
|
|
1530
|
+
},
|
|
1408
1531
|
{
|
|
1409
1532
|
"name": "quiet",
|
|
1410
1533
|
"type": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/slider",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -75,15 +75,15 @@
|
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@internationalized/number": "^3.1.0",
|
|
77
77
|
"@lit-labs/observers": "^2.0.0",
|
|
78
|
-
"@spectrum-web-components/base": "^0.40.
|
|
79
|
-
"@spectrum-web-components/field-label": "^0.40.
|
|
80
|
-
"@spectrum-web-components/number-field": "^0.40.
|
|
81
|
-
"@spectrum-web-components/reactive-controllers": "^0.40.
|
|
82
|
-
"@spectrum-web-components/shared": "^0.40.
|
|
83
|
-
"@spectrum-web-components/theme": "^0.40.
|
|
78
|
+
"@spectrum-web-components/base": "^0.40.5",
|
|
79
|
+
"@spectrum-web-components/field-label": "^0.40.5",
|
|
80
|
+
"@spectrum-web-components/number-field": "^0.40.5",
|
|
81
|
+
"@spectrum-web-components/reactive-controllers": "^0.40.5",
|
|
82
|
+
"@spectrum-web-components/shared": "^0.40.5",
|
|
83
|
+
"@spectrum-web-components/theme": "^0.40.5"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@spectrum-css/slider": "^4.
|
|
86
|
+
"@spectrum-css/slider": "^4.3.0"
|
|
87
87
|
},
|
|
88
88
|
"types": "./src/index.d.ts",
|
|
89
89
|
"customElements": "custom-elements.json",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"./**/*.dev.js",
|
|
93
93
|
"./sync/sp-*.js"
|
|
94
94
|
],
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "2e0006478841b07af63c19a0167a136bf724d064"
|
|
96
96
|
}
|
package/src/Slider.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSResultArray, TemplateResult } from '@spectrum-web-components/base';
|
|
1
|
+
import { CSSResultArray, PropertyValues, TemplateResult } from '@spectrum-web-components/base';
|
|
2
2
|
import '@spectrum-web-components/field-label/sp-field-label.js';
|
|
3
3
|
import type { NumberField } from '@spectrum-web-components/number-field';
|
|
4
4
|
import { HandleController, HandleValueDictionary } from './HandleController.js';
|
|
@@ -32,6 +32,7 @@ export declare class Slider extends Slider_base {
|
|
|
32
32
|
*/
|
|
33
33
|
hideStepper: boolean;
|
|
34
34
|
type: string;
|
|
35
|
+
dir: 'ltr' | 'rtl';
|
|
35
36
|
set variant(variant: string);
|
|
36
37
|
get variant(): string;
|
|
37
38
|
get values(): HandleValueDictionary;
|
|
@@ -46,6 +47,7 @@ export declare class Slider extends Slider_base {
|
|
|
46
47
|
tickStep: number;
|
|
47
48
|
tickLabels: boolean;
|
|
48
49
|
disabled: boolean;
|
|
50
|
+
fillStart?: number | boolean;
|
|
49
51
|
/**
|
|
50
52
|
* Applies `quiet` to the underlying `sp-number-field` when `editable === true`.
|
|
51
53
|
*/
|
|
@@ -68,6 +70,23 @@ export declare class Slider extends Slider_base {
|
|
|
68
70
|
private renderRamp;
|
|
69
71
|
private renderTicks;
|
|
70
72
|
private renderTrackSegment;
|
|
73
|
+
private _cachedValue;
|
|
74
|
+
private centerPoint;
|
|
75
|
+
/**
|
|
76
|
+
* @description calculates the fill width
|
|
77
|
+
* @param fillStartValue
|
|
78
|
+
* @param currentValue
|
|
79
|
+
* @param cachedValue
|
|
80
|
+
* @returns
|
|
81
|
+
*/
|
|
82
|
+
private getOffsetWidth;
|
|
83
|
+
/**
|
|
84
|
+
* @description calculates the fill width starting point to fill width
|
|
85
|
+
* @param value
|
|
86
|
+
*/
|
|
87
|
+
private getOffsetPosition;
|
|
88
|
+
private fillStyles;
|
|
89
|
+
private renderFillOffset;
|
|
71
90
|
private renderTrack;
|
|
72
91
|
protected handlePointerdown(event: PointerEvent): void;
|
|
73
92
|
protected handlePointermove(event: PointerEvent): void;
|
|
@@ -77,5 +96,6 @@ export declare class Slider extends Slider_base {
|
|
|
77
96
|
private trackSegmentStyles;
|
|
78
97
|
private _numberFieldInput;
|
|
79
98
|
protected getUpdateComplete(): Promise<boolean>;
|
|
99
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
80
100
|
}
|
|
81
101
|
export {};
|
package/src/Slider.dev.js
CHANGED
|
@@ -252,6 +252,48 @@ export class Slider extends SizedMixin(ObserveSlotText(SliderHandle, ""), {
|
|
|
252
252
|
></div>
|
|
253
253
|
`;
|
|
254
254
|
}
|
|
255
|
+
/**
|
|
256
|
+
* @description calculates the fill width
|
|
257
|
+
* @param fillStartValue
|
|
258
|
+
* @param currentValue
|
|
259
|
+
* @param cachedValue
|
|
260
|
+
* @returns
|
|
261
|
+
*/
|
|
262
|
+
getOffsetWidth(fillStartValue, currentValue) {
|
|
263
|
+
const distance = Math.abs(currentValue - fillStartValue);
|
|
264
|
+
return distance / (this.max - this.min) * 100;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* @description calculates the fill width starting point to fill width
|
|
268
|
+
* @param value
|
|
269
|
+
*/
|
|
270
|
+
getOffsetPosition(value) {
|
|
271
|
+
return (value - this.min) / (this.max - this.min) * 100;
|
|
272
|
+
}
|
|
273
|
+
fillStyles(centerPoint) {
|
|
274
|
+
const position = this.dir === "rtl" ? "right" : "left";
|
|
275
|
+
const offsetPosition = this.value > centerPoint ? this.getOffsetPosition(centerPoint) : this.getOffsetPosition(this.value);
|
|
276
|
+
const offsetWidth = this.getOffsetWidth(centerPoint, this.value);
|
|
277
|
+
const styles = {
|
|
278
|
+
[position]: `${offsetPosition}%`,
|
|
279
|
+
width: `${offsetWidth}%`
|
|
280
|
+
};
|
|
281
|
+
return styles;
|
|
282
|
+
}
|
|
283
|
+
renderFillOffset() {
|
|
284
|
+
if (!this._cachedValue || !this.centerPoint) {
|
|
285
|
+
return html``;
|
|
286
|
+
}
|
|
287
|
+
return html`
|
|
288
|
+
<div
|
|
289
|
+
class=${classMap({
|
|
290
|
+
fill: true,
|
|
291
|
+
offset: this.value > this.centerPoint
|
|
292
|
+
})}
|
|
293
|
+
style=${styleMap(this.fillStyles(this.centerPoint))}
|
|
294
|
+
></div>
|
|
295
|
+
`;
|
|
296
|
+
}
|
|
255
297
|
renderTrack() {
|
|
256
298
|
const segments = this.handleController.trackSegments();
|
|
257
299
|
const handleItems = [
|
|
@@ -259,6 +301,7 @@ export class Slider extends SizedMixin(ObserveSlotText(SliderHandle, ""), {
|
|
|
259
301
|
];
|
|
260
302
|
const trackItems = [
|
|
261
303
|
{ id: "track0", html: this.renderTrackSegment(...segments[0]) },
|
|
304
|
+
{ id: "fill", html: this.renderFillOffset() },
|
|
262
305
|
{ id: "ramp", html: this.renderRamp() },
|
|
263
306
|
...segments.slice(1).map(([start, end], index) => ({
|
|
264
307
|
id: `track${index + 1}`,
|
|
@@ -347,6 +390,16 @@ export class Slider extends SizedMixin(ObserveSlotText(SliderHandle, ""), {
|
|
|
347
390
|
await this.handleController.handleUpdatesComplete();
|
|
348
391
|
return complete;
|
|
349
392
|
}
|
|
393
|
+
willUpdate(changed) {
|
|
394
|
+
if (changed.has("value") && changed.has("fillStart")) {
|
|
395
|
+
this._cachedValue = Number(this.value);
|
|
396
|
+
if (this.fillStart) {
|
|
397
|
+
this.centerPoint = Number(this.fillStart);
|
|
398
|
+
} else {
|
|
399
|
+
this.centerPoint = (Number(this.max) - Number(this.min)) / 2 + Number(this.min);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
350
403
|
}
|
|
351
404
|
__decorateClass([
|
|
352
405
|
property({ type: Boolean, reflect: true })
|
|
@@ -357,6 +410,9 @@ __decorateClass([
|
|
|
357
410
|
__decorateClass([
|
|
358
411
|
property()
|
|
359
412
|
], Slider.prototype, "type", 2);
|
|
413
|
+
__decorateClass([
|
|
414
|
+
property({ reflect: true })
|
|
415
|
+
], Slider.prototype, "dir", 2);
|
|
360
416
|
__decorateClass([
|
|
361
417
|
property({ type: String })
|
|
362
418
|
], Slider.prototype, "variant", 1);
|
|
@@ -384,6 +440,9 @@ __decorateClass([
|
|
|
384
440
|
__decorateClass([
|
|
385
441
|
property({ type: Boolean, reflect: true })
|
|
386
442
|
], Slider.prototype, "disabled", 2);
|
|
443
|
+
__decorateClass([
|
|
444
|
+
property({ type: Number, reflect: true, attribute: "fill-start" })
|
|
445
|
+
], Slider.prototype, "fillStart", 2);
|
|
387
446
|
__decorateClass([
|
|
388
447
|
property({ type: Boolean })
|
|
389
448
|
], Slider.prototype, "quiet", 2);
|
package/src/Slider.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["Slider.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n nothing,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport {\n classMap,\n ifDefined,\n repeat,\n styleMap,\n} from '@spectrum-web-components/base/src/directives.js';\n\nimport sliderStyles from './slider.css.js';\nimport { ObserveSlotText } from '@spectrum-web-components/shared/src/observe-slot-text.js';\nimport { StyleInfo } from 'lit-html/directives/style-map';\nimport '@spectrum-web-components/field-label/sp-field-label.js';\nimport type { NumberField } from '@spectrum-web-components/number-field';\nimport { HandleController, HandleValueDictionary } from './HandleController.dev.js'\nimport { SliderHandle } from './SliderHandle.dev.js'\nimport { streamingListener } from '@spectrum-web-components/base/src/streaming-listener.js';\nimport type { NumberFormatter } from '@internationalized/number';\n\nexport const variants = ['filled', 'ramp', 'range', 'tick'];\n\n/**\n * @element sp-slider\n *\n * @slot - text label for the Slider\n * @slot handle - optionally accepts two or more sp-slider-handle elements\n */\nexport class Slider extends SizedMixin(ObserveSlotText(SliderHandle, ''), {\n noDefaultSize: true,\n validSizes: ['s', 'm', 'l', 'xl'],\n}) {\n public static override get styles(): CSSResultArray {\n return [sliderStyles];\n }\n\n public override handleController: HandleController = new HandleController(\n this\n );\n\n /**\n * Whether to display a Number Field along side the slider UI\n */\n @property({ type: Boolean, reflect: true })\n public get editable(): boolean {\n return this._editable;\n }\n\n public set editable(editable: boolean) {\n if (editable === this.editable) return;\n const oldValue = this.editable;\n this._editable = this.handleController.size < 2 ? editable : false;\n if (this.editable) {\n this._numberFieldInput = import(\n '@spectrum-web-components/number-field/sp-number-field.js'\n );\n }\n if (oldValue !== this.editable) {\n this.requestUpdate('editable', oldValue);\n }\n }\n\n private _editable = false;\n\n /**\n * Whether the stepper UI of the Number Field is hidden or not\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-stepper' })\n public hideStepper = false;\n\n @property()\n public type = '';\n\n @property({ type: String })\n public set variant(variant: string) {\n const oldVariant = this.variant;\n if (variant === this.variant) {\n return;\n }\n if (variants.includes(variant)) {\n this.setAttribute('variant', variant);\n this._variant = variant;\n } else {\n this.removeAttribute('variant');\n this._variant = '';\n }\n this.requestUpdate('variant', oldVariant);\n }\n\n public get variant(): string {\n return this._variant;\n }\n\n public get values(): HandleValueDictionary {\n return this.handleController.values;\n }\n\n public override get handleName(): string {\n return 'value';\n }\n\n /* Ensure that a '' value for `variant` removes the attribute instead of a blank value */\n private _variant = '';\n\n @property({ attribute: false })\n public getAriaValueText: (values: Map<string, string>) => string = (\n values\n ) => {\n const valueArray = [...values.values()];\n if (valueArray.length === 2)\n return `${valueArray[0]} - ${valueArray[1]}`;\n return valueArray.join(', ');\n };\n\n public override get ariaValueText(): string {\n if (!this.getAriaValueText) {\n return `${this.value}${this._forcedUnit}`;\n }\n return this.getAriaValueText(this.handleController.formattedValues);\n }\n\n @property({ type: String, reflect: true, attribute: 'label-visibility' })\n public labelVisibility?: 'text' | 'value' | 'none';\n\n @property({ type: Number, reflect: true })\n public override min = 0;\n\n @property({ type: Number, reflect: true })\n public override max = 100;\n\n @property({ type: Number })\n public override step = 1;\n\n @property({ type: Number, attribute: 'tick-step' })\n public tickStep = 0;\n\n @property({ type: Boolean, attribute: 'tick-labels' })\n public tickLabels = false;\n\n @property({ type: Boolean, reflect: true })\n public override disabled = false;\n\n /**\n * Applies `quiet` to the underlying `sp-number-field` when `editable === true`.\n */\n @property({ type: Boolean })\n public quiet = false;\n\n /**\n * Applies `indeterminate` to the underlying `sp-number-field` when `editable === true`. Is removed on the next `change` event.\n */\n @property({ type: Boolean })\n public indeterminate = false;\n\n @query('#label')\n public labelEl!: HTMLLabelElement;\n\n @query('#number-field')\n public numberField!: NumberField;\n\n @query('#track')\n public track!: HTMLDivElement;\n\n public override get numberFormat(): NumberFormatter {\n return this.getNumberFormat();\n }\n\n public override get focusElement(): HTMLElement {\n return this.handleController.focusElement;\n }\n\n protected handleLabelClick(event: Event): void {\n if (this.editable) {\n event.preventDefault();\n this.focus();\n }\n }\n\n protected override render(): TemplateResult {\n return html`\n ${this.renderLabel()} ${this.renderTrack()}\n ${this.editable\n ? html`\n <sp-number-field\n .formatOptions=${this.formatOptions || {}}\n id=\"number-field\"\n min=${this.min}\n max=${this.max}\n step=${this.step}\n size=${this.size}\n value=${this.value}\n ?hide-stepper=${this.hideStepper}\n ?disabled=${this.disabled}\n ?quiet=${this.quiet}\n ?indeterminate=${this.indeterminate}\n @input=${this.handleNumberInput}\n @change=${this.handleNumberChange}\n ></sp-number-field>\n `\n : nothing}\n `;\n }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n this.handleController.hostConnected();\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.handleController.hostDisconnected();\n }\n\n public override update(changedProperties: Map<string, boolean>): void {\n this.handleController.hostUpdate();\n if (changedProperties.has('disabled') && this.disabled) {\n this.handleController.cancelDrag();\n }\n super.update(changedProperties);\n }\n\n private renderLabel(): TemplateResult {\n const textLabelVisible =\n this.labelVisibility === 'none' || this.labelVisibility === 'value';\n const valueLabelVisible =\n this.labelVisibility === 'none' || this.labelVisibility === 'text';\n return html`\n <div id=\"label-container\">\n <sp-field-label\n class=${classMap({\n 'visually-hidden': textLabelVisible,\n })}\n ?disabled=${this.disabled}\n id=\"label\"\n for=${this.editable\n ? 'number-field'\n : this.handleController.activeHandleInputId}\n @click=${this.handleLabelClick}\n size=${this.size}\n >\n ${this.slotHasContent ? nothing : this.label}\n <slot>${this.label}</slot>\n </sp-field-label>\n <sp-field-label\n class=${classMap({\n 'visually-hidden': valueLabelVisible,\n })}\n ?disabled=${this.disabled}\n for=${this.editable\n ? 'number-field'\n : this.handleController.activeHandleInputId}\n size=${this.size}\n >\n <output id=\"value\" aria-live=\"off\" for=\"input\">\n ${this.ariaValueText}\n </output>\n </sp-field-label>\n </div>\n `;\n }\n\n private renderRamp(): TemplateResult {\n if (this.variant !== 'ramp') {\n return html``;\n }\n return html`\n <div id=\"ramp\">\n <svg\n viewBox=\"0 0 240 16\"\n preserveAspectRatio=\"none\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path\n d=\"M240,4v8c0,2.3-1.9,4.1-4.2,4L1,9C0.4,9,0,8.5,0,8c0-0.5,0.4-1,1-1l234.8-7C238.1-0.1,240,1.7,240,4z\"\n ></path>\n </svg>\n </div>\n `;\n }\n\n private renderTicks(): TemplateResult {\n if (this.variant !== 'tick') {\n return html``;\n }\n const tickStep = this.tickStep || this.step;\n const tickCount =\n ((this.max as number) - (this.min as number)) / tickStep;\n const partialFit = tickCount % 1 !== 0;\n const ticks = new Array(Math.floor(tickCount + 1));\n ticks.fill(0, 0, tickCount + 1);\n return html`\n <div\n class=\"${partialFit ? 'not-exact ' : ''}ticks\"\n style=${ifDefined(\n partialFit\n ? `--sp-slider-tick-offset: calc(100% / ${this.max} * ${this.tickStep}`\n : undefined\n )}\n >\n ${ticks.map(\n (_tick, i) => html`\n <div class=\"tick\">\n ${this.tickLabels\n ? html`\n <div class=\"tickLabel\">\n ${i * tickStep + this.min}\n </div>\n `\n : nothing}\n </div>\n `\n )}\n </div>\n `;\n }\n\n private renderTrackSegment(start: number, end: number): TemplateResult {\n if (this.variant === 'ramp') {\n return html``;\n }\n return html`\n <div\n class=\"track\"\n style=${styleMap(this.trackSegmentStyles(start, end))}\n role=\"presentation\"\n ></div>\n `;\n }\n\n private renderTrack(): TemplateResult {\n const segments = this.handleController.trackSegments();\n const handleItems = [\n { id: 'handles', html: this.handleController.render() },\n ];\n const trackItems = [\n { id: 'track0', html: this.renderTrackSegment(...segments[0]) },\n { id: 'ramp', html: this.renderRamp() },\n ...segments.slice(1).map(([start, end], index) => ({\n id: `track${index + 1}`,\n html: this.renderTrackSegment(start, end),\n })),\n ];\n\n return html`\n <div\n id=\"track\"\n ${streamingListener({\n start: ['pointerdown', this.handlePointerdown],\n streamInside: ['pointermove', this.handlePointermove],\n end: [\n ['pointerup', 'pointercancel', 'pointerleave'],\n this.handlePointerup,\n ],\n })}\n >\n <div id=\"controls\">\n ${this.renderTicks()}\n <div class=\"trackContainer\">\n ${repeat(\n trackItems,\n (item) => item.id,\n (item) => item.html\n )}\n </div>\n <div class=\"handleContainer\">\n ${repeat(\n handleItems,\n (item) => item.id,\n (item) => item.html\n )}\n </div>\n </div>\n </div>\n `;\n }\n\n protected handlePointerdown(event: PointerEvent): void {\n this.handleController.handlePointerdown(event);\n }\n\n protected handlePointermove(event: PointerEvent): void {\n this.handleController.handlePointermove(event);\n }\n\n protected handlePointerup(event: PointerEvent): void {\n this.handleController.handlePointerup(event);\n }\n\n private handleNumberInput(event: Event & { target: NumberField }): void {\n const { value } = event.target;\n if (event.target?.managedInput && !isNaN(value)) {\n this.value = value;\n return;\n }\n // Do not apply uncommited values to the parent element unless interacting with the stepper UI.\n // Stop uncommitted input from being announced to the parent application.\n event.stopPropagation();\n }\n\n private handleNumberChange(event: Event & { target: NumberField }): void {\n const { value } = event.target;\n if (isNaN(value)) {\n event.target.value = this.value;\n event.stopPropagation();\n } else {\n this.value = value;\n if (!event.target?.managedInput) {\n // When stepper is not active, sythesize an `input` event so that the\n // `change` event isn't surprising.\n this.dispatchInputEvent();\n }\n }\n this.indeterminate = false;\n }\n\n private trackSegmentStyles(start: number, end: number): StyleInfo {\n const size = end - start;\n const styles: StyleInfo = {\n width: `${size * 100}%`,\n '--spectrum-slider-track-background-size': `${(1 / size) * 100}%`,\n '--spectrum-slider-track-segment-position': `${start * 100}%`,\n };\n return styles;\n }\n\n private _numberFieldInput: Promise<unknown> = Promise.resolve();\n\n protected override async getUpdateComplete(): Promise<boolean> {\n const complete = (await super.getUpdateComplete()) as boolean;\n if (this.editable) {\n await this._numberFieldInput;\n await this.numberField.updateComplete;\n }\n await this.handleController.handleUpdatesComplete();\n return complete;\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EACA;AAAA,
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n nothing,\n PropertyValues,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport {\n classMap,\n ifDefined,\n repeat,\n styleMap,\n} from '@spectrum-web-components/base/src/directives.js';\n\nimport sliderStyles from './slider.css.js';\nimport { ObserveSlotText } from '@spectrum-web-components/shared/src/observe-slot-text.js';\nimport { StyleInfo } from 'lit-html/directives/style-map';\nimport '@spectrum-web-components/field-label/sp-field-label.js';\nimport type { NumberField } from '@spectrum-web-components/number-field';\nimport { HandleController, HandleValueDictionary } from './HandleController.dev.js'\nimport { SliderHandle } from './SliderHandle.dev.js'\nimport { streamingListener } from '@spectrum-web-components/base/src/streaming-listener.js';\nimport type { NumberFormatter } from '@internationalized/number';\n\nexport const variants = ['filled', 'ramp', 'range', 'tick'];\n\n/**\n * @element sp-slider\n *\n * @slot - text label for the Slider\n * @slot handle - optionally accepts two or more sp-slider-handle elements\n */\nexport class Slider extends SizedMixin(ObserveSlotText(SliderHandle, ''), {\n noDefaultSize: true,\n validSizes: ['s', 'm', 'l', 'xl'],\n}) {\n public static override get styles(): CSSResultArray {\n return [sliderStyles];\n }\n\n public override handleController: HandleController = new HandleController(\n this\n );\n\n /**\n * Whether to display a Number Field along side the slider UI\n */\n @property({ type: Boolean, reflect: true })\n public get editable(): boolean {\n return this._editable;\n }\n\n public set editable(editable: boolean) {\n if (editable === this.editable) return;\n const oldValue = this.editable;\n this._editable = this.handleController.size < 2 ? editable : false;\n if (this.editable) {\n this._numberFieldInput = import(\n '@spectrum-web-components/number-field/sp-number-field.js'\n );\n }\n if (oldValue !== this.editable) {\n this.requestUpdate('editable', oldValue);\n }\n }\n\n private _editable = false;\n\n /**\n * Whether the stepper UI of the Number Field is hidden or not\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-stepper' })\n public hideStepper = false;\n\n @property()\n public type = '';\n\n @property({ reflect: true })\n public override dir!: 'ltr' | 'rtl';\n\n @property({ type: String })\n public set variant(variant: string) {\n const oldVariant = this.variant;\n if (variant === this.variant) {\n return;\n }\n if (variants.includes(variant)) {\n this.setAttribute('variant', variant);\n this._variant = variant;\n } else {\n this.removeAttribute('variant');\n this._variant = '';\n }\n this.requestUpdate('variant', oldVariant);\n }\n\n public get variant(): string {\n return this._variant;\n }\n\n public get values(): HandleValueDictionary {\n return this.handleController.values;\n }\n\n public override get handleName(): string {\n return 'value';\n }\n\n /* Ensure that a '' value for `variant` removes the attribute instead of a blank value */\n private _variant = '';\n\n @property({ attribute: false })\n public getAriaValueText: (values: Map<string, string>) => string = (\n values\n ) => {\n const valueArray = [...values.values()];\n if (valueArray.length === 2)\n return `${valueArray[0]} - ${valueArray[1]}`;\n return valueArray.join(', ');\n };\n\n public override get ariaValueText(): string {\n if (!this.getAriaValueText) {\n return `${this.value}${this._forcedUnit}`;\n }\n return this.getAriaValueText(this.handleController.formattedValues);\n }\n\n @property({ type: String, reflect: true, attribute: 'label-visibility' })\n public labelVisibility?: 'text' | 'value' | 'none';\n\n @property({ type: Number, reflect: true })\n public override min = 0;\n\n @property({ type: Number, reflect: true })\n public override max = 100;\n\n @property({ type: Number })\n public override step = 1;\n\n @property({ type: Number, attribute: 'tick-step' })\n public tickStep = 0;\n\n @property({ type: Boolean, attribute: 'tick-labels' })\n public tickLabels = false;\n\n @property({ type: Boolean, reflect: true })\n public override disabled = false;\n\n @property({ type: Number, reflect: true, attribute: 'fill-start' })\n public fillStart?: number | boolean;\n\n /**\n * Applies `quiet` to the underlying `sp-number-field` when `editable === true`.\n */\n @property({ type: Boolean })\n public quiet = false;\n\n /**\n * Applies `indeterminate` to the underlying `sp-number-field` when `editable === true`. Is removed on the next `change` event.\n */\n @property({ type: Boolean })\n public indeterminate = false;\n\n @query('#label')\n public labelEl!: HTMLLabelElement;\n\n @query('#number-field')\n public numberField!: NumberField;\n\n @query('#track')\n public track!: HTMLDivElement;\n\n public override get numberFormat(): NumberFormatter {\n return this.getNumberFormat();\n }\n\n public override get focusElement(): HTMLElement {\n return this.handleController.focusElement;\n }\n\n protected handleLabelClick(event: Event): void {\n if (this.editable) {\n event.preventDefault();\n this.focus();\n }\n }\n\n protected override render(): TemplateResult {\n return html`\n ${this.renderLabel()} ${this.renderTrack()}\n ${this.editable\n ? html`\n <sp-number-field\n .formatOptions=${this.formatOptions || {}}\n id=\"number-field\"\n min=${this.min}\n max=${this.max}\n step=${this.step}\n size=${this.size}\n value=${this.value}\n ?hide-stepper=${this.hideStepper}\n ?disabled=${this.disabled}\n ?quiet=${this.quiet}\n ?indeterminate=${this.indeterminate}\n @input=${this.handleNumberInput}\n @change=${this.handleNumberChange}\n ></sp-number-field>\n `\n : nothing}\n `;\n }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n this.handleController.hostConnected();\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.handleController.hostDisconnected();\n }\n\n public override update(changedProperties: Map<string, boolean>): void {\n this.handleController.hostUpdate();\n if (changedProperties.has('disabled') && this.disabled) {\n this.handleController.cancelDrag();\n }\n super.update(changedProperties);\n }\n\n private renderLabel(): TemplateResult {\n const textLabelVisible =\n this.labelVisibility === 'none' || this.labelVisibility === 'value';\n const valueLabelVisible =\n this.labelVisibility === 'none' || this.labelVisibility === 'text';\n return html`\n <div id=\"label-container\">\n <sp-field-label\n class=${classMap({\n 'visually-hidden': textLabelVisible,\n })}\n ?disabled=${this.disabled}\n id=\"label\"\n for=${this.editable\n ? 'number-field'\n : this.handleController.activeHandleInputId}\n @click=${this.handleLabelClick}\n size=${this.size}\n >\n ${this.slotHasContent ? nothing : this.label}\n <slot>${this.label}</slot>\n </sp-field-label>\n <sp-field-label\n class=${classMap({\n 'visually-hidden': valueLabelVisible,\n })}\n ?disabled=${this.disabled}\n for=${this.editable\n ? 'number-field'\n : this.handleController.activeHandleInputId}\n size=${this.size}\n >\n <output id=\"value\" aria-live=\"off\" for=\"input\">\n ${this.ariaValueText}\n </output>\n </sp-field-label>\n </div>\n `;\n }\n\n private renderRamp(): TemplateResult {\n if (this.variant !== 'ramp') {\n return html``;\n }\n return html`\n <div id=\"ramp\">\n <svg\n viewBox=\"0 0 240 16\"\n preserveAspectRatio=\"none\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path\n d=\"M240,4v8c0,2.3-1.9,4.1-4.2,4L1,9C0.4,9,0,8.5,0,8c0-0.5,0.4-1,1-1l234.8-7C238.1-0.1,240,1.7,240,4z\"\n ></path>\n </svg>\n </div>\n `;\n }\n\n private renderTicks(): TemplateResult {\n if (this.variant !== 'tick') {\n return html``;\n }\n const tickStep = this.tickStep || this.step;\n const tickCount =\n ((this.max as number) - (this.min as number)) / tickStep;\n const partialFit = tickCount % 1 !== 0;\n const ticks = new Array(Math.floor(tickCount + 1));\n ticks.fill(0, 0, tickCount + 1);\n return html`\n <div\n class=\"${partialFit ? 'not-exact ' : ''}ticks\"\n style=${ifDefined(\n partialFit\n ? `--sp-slider-tick-offset: calc(100% / ${this.max} * ${this.tickStep}`\n : undefined\n )}\n >\n ${ticks.map(\n (_tick, i) => html`\n <div class=\"tick\">\n ${this.tickLabels\n ? html`\n <div class=\"tickLabel\">\n ${i * tickStep + this.min}\n </div>\n `\n : nothing}\n </div>\n `\n )}\n </div>\n `;\n }\n\n private renderTrackSegment(start: number, end: number): TemplateResult {\n if (this.variant === 'ramp') {\n return html``;\n }\n return html`\n <div\n class=\"track\"\n style=${styleMap(this.trackSegmentStyles(start, end))}\n role=\"presentation\"\n ></div>\n `;\n }\n\n private _cachedValue: number | undefined;\n private centerPoint: number | undefined;\n\n /**\n * @description calculates the fill width\n * @param fillStartValue\n * @param currentValue\n * @param cachedValue\n * @returns\n */\n private getOffsetWidth(\n fillStartValue: number,\n currentValue: number\n ): number {\n const distance = Math.abs(currentValue - fillStartValue);\n return (distance / (this.max - this.min)) * 100;\n }\n\n /**\n * @description calculates the fill width starting point to fill width\n * @param value\n */\n private getOffsetPosition(value: number): number {\n return ((value - this.min) / (this.max - this.min)) * 100;\n }\n\n private fillStyles(centerPoint: number): StyleInfo {\n const position = this.dir === 'rtl' ? 'right' : 'left';\n const offsetPosition =\n this.value > centerPoint\n ? this.getOffsetPosition(centerPoint)\n : this.getOffsetPosition(this.value);\n const offsetWidth = this.getOffsetWidth(centerPoint, this.value);\n const styles: StyleInfo = {\n [position]: `${offsetPosition}%`,\n width: `${offsetWidth}%`,\n };\n return styles;\n }\n\n private renderFillOffset(): TemplateResult {\n if (!this._cachedValue || !this.centerPoint) {\n return html``;\n }\n return html`\n <div\n class=${classMap({\n fill: true,\n offset: this.value > this.centerPoint,\n })}\n style=${styleMap(this.fillStyles(this.centerPoint))}\n ></div>\n `;\n }\n\n private renderTrack(): TemplateResult {\n const segments = this.handleController.trackSegments();\n const handleItems = [\n { id: 'handles', html: this.handleController.render() },\n ];\n const trackItems = [\n { id: 'track0', html: this.renderTrackSegment(...segments[0]) },\n { id: 'fill', html: this.renderFillOffset() },\n { id: 'ramp', html: this.renderRamp() },\n ...segments.slice(1).map(([start, end], index) => ({\n id: `track${index + 1}`,\n html: this.renderTrackSegment(start, end),\n })),\n ];\n\n return html`\n <div\n id=\"track\"\n ${streamingListener({\n start: ['pointerdown', this.handlePointerdown],\n streamInside: ['pointermove', this.handlePointermove],\n end: [\n ['pointerup', 'pointercancel', 'pointerleave'],\n this.handlePointerup,\n ],\n })}\n >\n <div id=\"controls\">\n ${this.renderTicks()}\n <div class=\"trackContainer\">\n ${repeat(\n trackItems,\n (item) => item.id,\n (item) => item.html\n )}\n </div>\n <div class=\"handleContainer\">\n ${repeat(\n handleItems,\n (item) => item.id,\n (item) => item.html\n )}\n </div>\n </div>\n </div>\n `;\n }\n\n protected handlePointerdown(event: PointerEvent): void {\n this.handleController.handlePointerdown(event);\n }\n\n protected handlePointermove(event: PointerEvent): void {\n this.handleController.handlePointermove(event);\n }\n\n protected handlePointerup(event: PointerEvent): void {\n this.handleController.handlePointerup(event);\n }\n\n private handleNumberInput(event: Event & { target: NumberField }): void {\n const { value } = event.target;\n if (event.target?.managedInput && !isNaN(value)) {\n this.value = value;\n return;\n }\n // Do not apply uncommited values to the parent element unless interacting with the stepper UI.\n // Stop uncommitted input from being announced to the parent application.\n event.stopPropagation();\n }\n\n private handleNumberChange(event: Event & { target: NumberField }): void {\n const { value } = event.target;\n if (isNaN(value)) {\n event.target.value = this.value;\n event.stopPropagation();\n } else {\n this.value = value;\n if (!event.target?.managedInput) {\n // When stepper is not active, sythesize an `input` event so that the\n // `change` event isn't surprising.\n this.dispatchInputEvent();\n }\n }\n this.indeterminate = false;\n }\n\n private trackSegmentStyles(start: number, end: number): StyleInfo {\n const size = end - start;\n const styles: StyleInfo = {\n width: `${size * 100}%`,\n '--spectrum-slider-track-background-size': `${(1 / size) * 100}%`,\n '--spectrum-slider-track-segment-position': `${start * 100}%`,\n };\n return styles;\n }\n\n private _numberFieldInput: Promise<unknown> = Promise.resolve();\n\n protected override async getUpdateComplete(): Promise<boolean> {\n const complete = (await super.getUpdateComplete()) as boolean;\n if (this.editable) {\n await this._numberFieldInput;\n await this.numberField.updateComplete;\n }\n await this.handleController.handleUpdatesComplete();\n return complete;\n }\n\n protected override willUpdate(changed: PropertyValues): void {\n if (changed.has('value') && changed.has('fillStart')) {\n this._cachedValue = Number(this.value);\n if (this.fillStart) {\n this.centerPoint = Number(this.fillStart);\n } else {\n this.centerPoint =\n (Number(this.max) - Number(this.min)) / 2 +\n Number(this.min);\n }\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EACA;AAAA,E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