@behold/widget 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BeholdWidget-d9atp5vg.js +1 -0
- package/dist/BeholdWidget.d.ts +37 -0
- package/dist/BeholdWidget.d.ts.map +1 -0
- package/dist/BeholdWidget.js +1 -0
- package/dist/GalleryWall-lxkCZ_CS.js +1 -0
- package/dist/Grid-Qff6mfYu.js +1 -0
- package/dist/Grid-SMtz915h.js +1 -0
- package/dist/PopoverGallery-pjXCeSIt.js +1 -0
- package/dist/elements/AlbumPost.d.ts +16 -0
- package/dist/elements/AlbumPost.d.ts.map +1 -0
- package/dist/elements/BaseElement.d.ts +120 -0
- package/dist/elements/BaseElement.d.ts.map +1 -0
- package/dist/elements/BasePost.d.ts +35 -0
- package/dist/elements/BasePost.d.ts.map +1 -0
- package/dist/elements/BaseWidget.d.ts +28 -0
- package/dist/elements/BaseWidget.d.ts.map +1 -0
- package/dist/elements/Image.d.ts +36 -0
- package/dist/elements/Image.d.ts.map +1 -0
- package/dist/elements/ImagePost.d.ts +16 -0
- package/dist/elements/ImagePost.d.ts.map +1 -0
- package/dist/elements/PopoverGallery.d.ts +69 -0
- package/dist/elements/PopoverGallery.d.ts.map +1 -0
- package/dist/elements/PopoverGallerySlide.d.ts +60 -0
- package/dist/elements/PopoverGallerySlide.d.ts.map +1 -0
- package/dist/elements/PopoverSlideAlbum.d.ts +56 -0
- package/dist/elements/PopoverSlideAlbum.d.ts.map +1 -0
- package/dist/elements/PopoverSlideVideo.d.ts +42 -0
- package/dist/elements/PopoverSlideVideo.d.ts.map +1 -0
- package/dist/elements/Video.d.ts +49 -0
- package/dist/elements/Video.d.ts.map +1 -0
- package/dist/elements/VideoPost.d.ts +20 -0
- package/dist/elements/VideoPost.d.ts.map +1 -0
- package/dist/lib/RGBStringToHSLArray.d.ts +2 -0
- package/dist/lib/RGBStringToHSLArray.d.ts.map +1 -0
- package/dist/lib/createElement.d.ts +13 -0
- package/dist/lib/createElement.d.ts.map +1 -0
- package/dist/lib/getLoadingColorString.d.ts +2 -0
- package/dist/lib/getLoadingColorString.d.ts.map +1 -0
- package/dist/lib/getMedianHSL.d.ts +2 -0
- package/dist/lib/getMedianHSL.d.ts.map +1 -0
- package/dist/lib/hurdyGurdy.d.ts +75 -0
- package/dist/lib/hurdyGurdy.d.ts.map +1 -0
- package/dist/lib/popoverScroller.d.ts +26 -0
- package/dist/lib/popoverScroller.d.ts.map +1 -0
- package/dist/lib/trapFocus.d.ts +8 -0
- package/dist/lib/trapFocus.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +72 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/widgets/GalleryWall.d.ts +65 -0
- package/dist/widgets/GalleryWall.d.ts.map +1 -0
- package/dist/widgets/Grid.d.ts +63 -0
- package/dist/widgets/Grid.d.ts.map +1 -0
- package/package.json +53 -0
- package/readme.md +13 -0
@@ -0,0 +1,69 @@
|
|
1
|
+
import BaseElement from './BaseElement';
|
2
|
+
import HurdyGurdy from '../lib/hurdyGurdy';
|
3
|
+
import PopoverScroller from '../lib/popoverScroller';
|
4
|
+
import PopoverGallerySlide from './PopoverGallerySlide';
|
5
|
+
/**
|
6
|
+
* @description
|
7
|
+
* Required props: 'posts', 'widgetSettings', 'feedMetadata'
|
8
|
+
*/
|
9
|
+
export default class PopoverGallery extends BaseElement {
|
10
|
+
label: string;
|
11
|
+
verticalScrollBreakpoint: number;
|
12
|
+
shadow: ShadowRoot;
|
13
|
+
fragment: DocumentFragment;
|
14
|
+
styleEl: HTMLStyleElement;
|
15
|
+
stylesAdded: boolean;
|
16
|
+
overlayEl: HTMLElement;
|
17
|
+
previousEl: HTMLButtonElement;
|
18
|
+
nextEl: HTMLButtonElement;
|
19
|
+
closeEl: HTMLButtonElement;
|
20
|
+
breadcrumbContainer: HTMLElement;
|
21
|
+
innerEl: HTMLElement;
|
22
|
+
postEls: Array<PopoverGallerySlide>;
|
23
|
+
hurdyGurdy: HurdyGurdy;
|
24
|
+
popoverScroller: PopoverScroller;
|
25
|
+
currentPostIndex: number;
|
26
|
+
posts: Posts;
|
27
|
+
widgetSettings: WidgetSettings;
|
28
|
+
feedMetadata: FeedMetadata;
|
29
|
+
closeFocusEl: HTMLElement;
|
30
|
+
onSlideChange: Function;
|
31
|
+
constructor();
|
32
|
+
handlePropChange({ changedProp, oldValue, newValue }: {
|
33
|
+
changedProp: any;
|
34
|
+
oldValue: any;
|
35
|
+
newValue: any;
|
36
|
+
}): void;
|
37
|
+
/**
|
38
|
+
* Handle state change
|
39
|
+
*/
|
40
|
+
handleStateChange({ changedProps, newState }: {
|
41
|
+
changedProps: any;
|
42
|
+
newState: any;
|
43
|
+
}): void;
|
44
|
+
/**
|
45
|
+
* Open
|
46
|
+
*/
|
47
|
+
open(index: number, closeFocusEl: HTMLElement): void;
|
48
|
+
/**
|
49
|
+
* Close
|
50
|
+
*/
|
51
|
+
close(): void;
|
52
|
+
/**
|
53
|
+
* Handle slide change
|
54
|
+
*/
|
55
|
+
handleSlideChange(newIndex: number): void;
|
56
|
+
/**
|
57
|
+
* Check size and update as needed
|
58
|
+
*/
|
59
|
+
checkSize(containerWidth: number): void;
|
60
|
+
handleResize(entry: ResizeObserverEntry): void;
|
61
|
+
render(): void;
|
62
|
+
static register(name?: string): string;
|
63
|
+
}
|
64
|
+
declare global {
|
65
|
+
interface HTMLElementTagNameMap {
|
66
|
+
'behold-popover-gallery': PopoverGallery;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
//# sourceMappingURL=PopoverGallery.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PopoverGallery.d.ts","sourceRoot":"","sources":["../../src/elements/PopoverGallery.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAA;AAKvC,OAAO,UAAU,MAAM,mBAAmB,CAAA;AAC1C,OAAO,eAAe,MAAM,wBAAwB,CAAA;AACpD,OAAO,mBAAmB,MAAM,uB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,CAAC;IACb,UAAU,qBAAqB;QAC7B,wBAAwB,EAAE,cAAc,CAAA;KACzC;CACF"}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
import BaseElement from './BaseElement';
|
2
|
+
import Image from './Image';
|
3
|
+
import PopoverSlideVideo from './PopoverSlideVideo';
|
4
|
+
import PopoverSlideAlbum from './PopoverSlideAlbum';
|
5
|
+
/**
|
6
|
+
* @description
|
7
|
+
* Required props: 'post', 'feedMetadata'
|
8
|
+
*/
|
9
|
+
export default class PopoverGallerySlide extends BaseElement {
|
10
|
+
label: string;
|
11
|
+
innerEl: HTMLElement;
|
12
|
+
mediaContainerEl: HTMLElement;
|
13
|
+
avatarImageEl: HTMLImageElement;
|
14
|
+
headerText: string;
|
15
|
+
avatarEl: HTMLElement;
|
16
|
+
headerEl: HTMLElement;
|
17
|
+
captionEl: HTMLElement;
|
18
|
+
footerLinkEl: HTMLElement | string;
|
19
|
+
footerEl: HTMLElement | string;
|
20
|
+
textEl: HTMLElement;
|
21
|
+
mediaEl: Image | PopoverSlideVideo | PopoverSlideAlbum;
|
22
|
+
moreEl: HTMLButtonElement;
|
23
|
+
post: Post;
|
24
|
+
feedMetadata: FeedMetadata;
|
25
|
+
constructor();
|
26
|
+
/**
|
27
|
+
* Render contents
|
28
|
+
*/
|
29
|
+
render(): void;
|
30
|
+
handlePropChange({ changedProp }: {
|
31
|
+
changedProp: any;
|
32
|
+
}): void;
|
33
|
+
/**
|
34
|
+
* Activate
|
35
|
+
*/
|
36
|
+
activate(): void;
|
37
|
+
/**
|
38
|
+
* Deactivate
|
39
|
+
*/
|
40
|
+
deactivate(): void;
|
41
|
+
/**
|
42
|
+
* Preload media
|
43
|
+
*/
|
44
|
+
preload(): void;
|
45
|
+
/**
|
46
|
+
* Expand post caption
|
47
|
+
*/
|
48
|
+
expandCaption(): void;
|
49
|
+
/**
|
50
|
+
* Collapse post caption
|
51
|
+
*/
|
52
|
+
collapseCaption(): void;
|
53
|
+
static register(name?: string): string;
|
54
|
+
}
|
55
|
+
declare global {
|
56
|
+
interface HTMLElementTagNameMap {
|
57
|
+
'behold-popover-gallery-slide': PopoverGallerySlide;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
//# sourceMappingURL=PopoverGallerySlide.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PopoverGallerySlide.d.ts","sourceRoot":"","sources":["../../src/elements/PopoverGallerySlide.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAA;AAGvC,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,iBAAiB,MAAM,qBAAqB,CAAA;AACnD,OAAO,iBAAiB,MAAM,qBAAqB,CAAA;AAKnD;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC1D,KAAK,SAAwB;IAG7B,OAAO,EAAE,WAAW,CAAA;IACpB,gBAAgB,EAAE,WAAW,CAAA;IAC7B,aAAa,EAAE,gBAAgB,CAAA;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,WAAW,CAAA;IACrB,QAAQ,EAAE,WAAW,CAAA;IACrB,SAAS,EAAE,WAAW,CAAA;IACtB,YAAY,EAAE,WAAW,GAAG,MAAM,CAAA;IAClC,QAAQ,EAAE,WAAW,GAAG,MAAM,CAAA;IAC9B,MAAM,EAAE,WAAW,CAAA;IACnB,OAAO,EAAE,KAAK,GAAG,iBAAiB,GAAG,iBAAiB,CAAA;IACtD,MAAM,EAAE,iBAAiB,CAAA;IAGzB,IAAI,EAAE,IAAI,CAAA;IACV,YAAY,EAAE,YAAY,CAAA;;IAsB1B;;OAEG;IACH,MAAM;IAsIN,gBAAgB,CAAC,EAAE,WAAW,EAAE;;KAAA;IAmBhC;;OAEG;IACH,QAAQ;IAaR;;OAEG;IACH,UAAU;IAWV;;OAEG;IACH,OAAO;IAIP;;OAEG;IACH,aAAa;IAsBb;;OAEG;IACH,eAAe;IAgBf,MAAM,CAAC,QAAQ,CAAC,IAAI,SAAiC;CAMtD;AAKD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,8BAA8B,EAAE,mBAAmB,CAAA;KACpD;CACF"}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import BaseElement from './BaseElement';
|
2
|
+
import Image from './Image';
|
3
|
+
import PopoverSlideVideo from './PopoverSlideVideo';
|
4
|
+
import HurdyGurdy from '../lib/hurdyGurdy';
|
5
|
+
/**
|
6
|
+
* @description
|
7
|
+
* Required props: 'post'
|
8
|
+
*/
|
9
|
+
export default class PopoverSlideAlbum extends BaseElement {
|
10
|
+
label: string;
|
11
|
+
containerEl: HTMLElement;
|
12
|
+
spaceholderEl: HTMLElement;
|
13
|
+
childEls: Array<Image | PopoverSlideVideo>;
|
14
|
+
previousEl: HTMLElement;
|
15
|
+
nextEl: HTMLElement;
|
16
|
+
breadcrumbsEl: HTMLElement;
|
17
|
+
childCarousel: HurdyGurdy;
|
18
|
+
currentSlideIndex: number;
|
19
|
+
post: Post;
|
20
|
+
constructor();
|
21
|
+
/**
|
22
|
+
* activate
|
23
|
+
*/
|
24
|
+
activate(): void;
|
25
|
+
/**
|
26
|
+
* Update tabbable els
|
27
|
+
*/
|
28
|
+
updateTabbable(): void;
|
29
|
+
/**
|
30
|
+
* on slide change
|
31
|
+
*/
|
32
|
+
handleSlideChange(newIndex: number): void;
|
33
|
+
/**
|
34
|
+
* Build slide els
|
35
|
+
*/
|
36
|
+
buildSlideEls(): Array<Image | PopoverSlideVideo>;
|
37
|
+
/**
|
38
|
+
* Play
|
39
|
+
*/
|
40
|
+
play(): void;
|
41
|
+
/**
|
42
|
+
* Pause
|
43
|
+
*/
|
44
|
+
pause(): void;
|
45
|
+
/**
|
46
|
+
* Preload media
|
47
|
+
*/
|
48
|
+
preload(): void;
|
49
|
+
static register(name?: string): string;
|
50
|
+
}
|
51
|
+
declare global {
|
52
|
+
interface HTMLElementTagNameMap {
|
53
|
+
'behold-popover-slide-album': PopoverSlideAlbum;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
//# sourceMappingURL=PopoverSlideAlbum.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PopoverSlideAlbum.d.ts","sourceRoot":"","sources":["../../src/elements/PopoverSlideAlbum.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAA;AAIvC,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,iBAAiB,MAAM,qBAAqB,CAAA;AACnD,OAAO,UAAU,MAAM,mBAAmB,CAAA;AAI1C;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IACxD,KAAK,SAAsB;IAG3B,WAAW,EAAE,WAAW,CAAA;IACxB,aAAa,EAAE,WAAW,CAAA;IAC1B,QAAQ,EAAE,KAAK,CAAC,KAAK,GAAG,iBAAiB,CAAC,CAAA;IAC1C,UAAU,EAAE,WAAW,CAAA;IACvB,MAAM,EAAE,WAAW,CAAA;IACnB,aAAa,EAAE,WAAW,CAAA;IAC1B,aAAa,EAAE,UAAU,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAI;IAG7B,IAAI,EAAE,IAAI,CAAA;;IAyEV;;OAEG;IACH,QAAQ;IAKR;;OAEG;IACH,cAAc;IAQd;;OAEG;IACH,iBAAiB,CAAC,QAAQ,EAAE,MAAM;IAsClC;;OAEG;IACH,aAAa,IAAI,KAAK,CAAC,KAAK,GAAG,iBAAiB,CAAC;IA+BjD;;OAEG;IACH,IAAI;IAQJ;;OAEG;IACH,KAAK;IAOL;;OAEG;IACH,OAAO;IAOP,MAAM,CAAC,QAAQ,CAAC,IAAI,SAA+B;CAMpD;AAKD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,4BAA4B,EAAE,iBAAiB,CAAA;KAChD;CACF"}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import BaseElement from './BaseElement';
|
2
|
+
import Video from './Video';
|
3
|
+
/**
|
4
|
+
* @description
|
5
|
+
* Required props: post
|
6
|
+
*/
|
7
|
+
export default class PopoverSlideVideo extends BaseElement {
|
8
|
+
label: string;
|
9
|
+
videoEl: Video;
|
10
|
+
soundControlEl: HTMLElement;
|
11
|
+
isPlaying: boolean;
|
12
|
+
post: Post;
|
13
|
+
constructor();
|
14
|
+
handlePropChange({ changedProp, newValue }: {
|
15
|
+
changedProp: any;
|
16
|
+
newValue: any;
|
17
|
+
}): void;
|
18
|
+
handleStateChange({ changedProps, newState }: {
|
19
|
+
changedProps: any;
|
20
|
+
newState: any;
|
21
|
+
}): void;
|
22
|
+
onLoad(): void;
|
23
|
+
onPlay(): void;
|
24
|
+
onPause(): void;
|
25
|
+
play(): void;
|
26
|
+
pause(): void;
|
27
|
+
togglePlayback(): void;
|
28
|
+
toggleSound(): void;
|
29
|
+
showSoundControl(): void;
|
30
|
+
hideSoundControl(): void;
|
31
|
+
/**
|
32
|
+
* Preload
|
33
|
+
*/
|
34
|
+
preload(): void;
|
35
|
+
static register(name?: string): string;
|
36
|
+
}
|
37
|
+
declare global {
|
38
|
+
interface HTMLElementTagNameMap {
|
39
|
+
'behold-popover-slide-video': PopoverSlideVideo;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
//# sourceMappingURL=PopoverSlideVideo.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PopoverSlideVideo.d.ts","sourceRoot":"","sources":["../../src/elements/PopoverSlideVideo.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,MAAM,SAAS,CAAA;AAI3B;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IACxD,KAAK,SAAsB;IAG3B,OAAO,EAAE,KAAK,CAAA;IACd,cAAc,EAAE,WAAW,CAAA;IAC3B,SAAS,EAAE,OAAO,CAAQ;IAG1B,IAAI,EAAE,IAAI,CAAA;;IAwDV,gBAAgB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE;;;KAAA;IAU1C,iBAAiB,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE;;;KAAA;IAc5C,MAAM;IAQN,MAAM;IAIN,OAAO;IAIP,IAAI;IAIJ,KAAK;IAOL,cAAc;IAQd,WAAW;IAQX,gBAAgB;IAKhB,gBAAgB;IAKhB;;OAEG;IACH,OAAO;IAOP,MAAM,CAAC,QAAQ,CAAC,IAAI,SAA+B;CAMpD;AAKD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,4BAA4B,EAAE,iBAAiB,CAAA;KAChD;CACF"}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import BaseElement from './BaseElement';
|
2
|
+
/**
|
3
|
+
* @description
|
4
|
+
* Required props: 'mediaUrl', 'sizes'
|
5
|
+
*/
|
6
|
+
export default class Video extends BaseElement {
|
7
|
+
label: string;
|
8
|
+
mediaUrl: string;
|
9
|
+
sizes: PostSizes;
|
10
|
+
videoEl: HTMLVideoElement;
|
11
|
+
imageEl: HTMLImageElement;
|
12
|
+
isLoaded: boolean;
|
13
|
+
isMuted: boolean;
|
14
|
+
constructor();
|
15
|
+
/**
|
16
|
+
* Add isPlaying property
|
17
|
+
*/
|
18
|
+
get isPlaying(): boolean;
|
19
|
+
/**
|
20
|
+
* Reflect props from videoEl
|
21
|
+
*/
|
22
|
+
get paused(): boolean;
|
23
|
+
get muted(): boolean;
|
24
|
+
render(): void;
|
25
|
+
handleIntersection(entry: IntersectionObserverEntry): void;
|
26
|
+
handleVideoLoad(): void;
|
27
|
+
play(): Promise<void>;
|
28
|
+
pause(): void;
|
29
|
+
/**
|
30
|
+
* Mute
|
31
|
+
*/
|
32
|
+
mute(): void;
|
33
|
+
/**
|
34
|
+
* Unmute
|
35
|
+
*/
|
36
|
+
unmute(): void;
|
37
|
+
handlePageVisibility(): void;
|
38
|
+
/**
|
39
|
+
* Preload
|
40
|
+
*/
|
41
|
+
preload(): void;
|
42
|
+
static register(name?: string): string;
|
43
|
+
}
|
44
|
+
declare global {
|
45
|
+
interface HTMLElementTagNameMap {
|
46
|
+
'behold-video': Video;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
//# sourceMappingURL=Video.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Video.d.ts","sourceRoot":"","sources":["../../src/elements/Video.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAA;AAIvC;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,WAAW;IAC5C,KAAK,SAAU;IAGf,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,SAAS,CAAA;IAGhB,OAAO,EAAE,gBAAgB,CAAA;IACzB,OAAO,EAAE,gBAAgB,CAAA;IACzB,QAAQ,EAAE,OAAO,CAAQ;IACzB,OAAO,EAAE,OAAO,CAAO;;IAiCvB;;OAEG;IACH,IAAI,SAAS,YAOZ;IAED;;OAEG;IACH,IAAI,MAAM,YAET;IACD,IAAI,KAAK,YAER;IAKD,MAAM;IAyCN,kBAAkB,CAAC,KAAK,EAAE,yBAAyB;IAgBnD,eAAe;IAiBT,IAAI;IAWV,KAAK;IAML;;OAEG;IACH,IAAI;IAQJ;;OAEG;IACH,MAAM;IAWN,oBAAoB;IAMpB;;OAEG;IACH,OAAO;IASP,MAAM,CAAC,QAAQ,CAAC,IAAI,SAAiB;CAMtC;AAKD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,KAAK,CAAA;KACtB;CACF"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import BasePost from './BasePost';
|
2
|
+
import Video from './Video';
|
3
|
+
import Image from './Image';
|
4
|
+
/**
|
5
|
+
* @description
|
6
|
+
* Required props: 'post', 'widgetSettings',
|
7
|
+
*/
|
8
|
+
export default class VideoPost extends BasePost {
|
9
|
+
label: string;
|
10
|
+
videoEl: Video;
|
11
|
+
imageEl: Image;
|
12
|
+
constructor();
|
13
|
+
handlePropChange({ changedProp, oldValue, newValue }: {
|
14
|
+
changedProp: any;
|
15
|
+
oldValue: any;
|
16
|
+
newValue: any;
|
17
|
+
}): void;
|
18
|
+
static register(name?: string): string;
|
19
|
+
}
|
20
|
+
//# sourceMappingURL=VideoPost.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"VideoPost.d.ts","sourceRoot":"","sources":["../../src/elements/VideoPost.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAA;AACjC,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,KAAK,MAAM,SAAS,CAAA;AAI3B;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,QAAQ;IAC7C,KAAK,SAAc;IAGnB,OAAO,EAAE,KAAK,CAAA;IACd,OAAO,EAAE,KAAK,CAAA;;IAgBd,gBAAgB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE;;;;KAAA;IAsCpD,MAAM,CAAC,QAAQ,CAAC,IAAI,SAAsB;CAM3C"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RGBStringToHSLArray.d.ts","sourceRoot":"","sources":["../../src/lib/RGBStringToHSLArray.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,GAAG,KAAA,OAsB9C"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
declare function createElement<ReturnType = HTMLElement>(args: CreateElementArgs): ReturnType;
|
2
|
+
export default createElement;
|
3
|
+
type CreateElementArgs = {
|
4
|
+
type?: string;
|
5
|
+
classes?: string | Array<string>;
|
6
|
+
contents?: CreateElementContents;
|
7
|
+
attributes?: object;
|
8
|
+
props?: object;
|
9
|
+
style?: object;
|
10
|
+
listeners?: object;
|
11
|
+
};
|
12
|
+
type CreateElementContents = Node | string | Array<Node | string>;
|
13
|
+
//# sourceMappingURL=createElement.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createElement.d.ts","sourceRoot":"","sources":["../../src/lib/createElement.ts"],"names":[],"mappings":"AAIA,iBAAS,aAAa,CAAC,UAAU,GAAG,WAAW,EAC7C,IAAI,EAAE,iBAAiB,GACtB,UAAU,CAiDZ;AAED,eAAe,aAAa,CAAA;AAE5B,KAAK,iBAAiB,GAAG;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAA;IAChC,QAAQ,CAAC,EAAE,qBAAqB,CAAA;IAChC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,KAAK,qBAAqB,GAAG,IAAI,GAAG,MAAM,GAAG,KAAK,CAAC,IAAI,GAAG,MAAM,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getLoadingColorString.d.ts","sourceRoot":"","sources":["../../src/lib/getLoadingColorString.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,YAAY,KAAA,EACZ,YAAY,KAAA,EACZ,gBAAgB,KAAA,EAChB,gBAAgB,KAAA,UAyCjB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getMedianHSL.d.ts","sourceRoot":"","sources":["../../src/lib/getMedianHSL.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,QAAQ,KAAA,EAAE,IAAI,KAAA,SAWlD"}
|
@@ -0,0 +1,75 @@
|
|
1
|
+
export default class HurdyGurdy {
|
2
|
+
initialized: boolean;
|
3
|
+
keyboardNav: boolean;
|
4
|
+
dynamicBreadCrumbsCutoff: any;
|
5
|
+
breadcrumbDiameter: any;
|
6
|
+
dragLimit: any;
|
7
|
+
index: number;
|
8
|
+
slides: any;
|
9
|
+
rootEl: Document | ShadowRoot;
|
10
|
+
containerEl: HTMLElement;
|
11
|
+
innerEl: HTMLElement;
|
12
|
+
breadcrumbsContainerEl: HTMLElement;
|
13
|
+
breadcrumbsInnerEl: HTMLElement;
|
14
|
+
breadcrumbsCurrent: HTMLElement;
|
15
|
+
previousEl: HTMLElement;
|
16
|
+
nextEl: HTMLElement;
|
17
|
+
slideEls: Array<HTMLElement>;
|
18
|
+
breadcrumbs: any;
|
19
|
+
raf: number;
|
20
|
+
focusRaf: number;
|
21
|
+
st: number;
|
22
|
+
transitionSt: number;
|
23
|
+
isDragging: boolean;
|
24
|
+
dragStartPoint: any;
|
25
|
+
lastDragPoint: any;
|
26
|
+
currentPixelTranslation: any;
|
27
|
+
currentPercentTranslation: any;
|
28
|
+
progressToNextSlide: any;
|
29
|
+
resizeObserver: ResizeObserver;
|
30
|
+
onSlideChange: Function;
|
31
|
+
constructor({ slides, containerEl, breadcrumbsContainerEl, previousEl, nextEl, onSlideChange, breadcrumbDiameter, keyboardNav, dynamicBreadCrumbsCutoff, dragLimit, }: {
|
32
|
+
slides: any;
|
33
|
+
containerEl: any;
|
34
|
+
breadcrumbsContainerEl: any;
|
35
|
+
previousEl: any;
|
36
|
+
nextEl: any;
|
37
|
+
onSlideChange: any;
|
38
|
+
breadcrumbDiameter?: number;
|
39
|
+
keyboardNav?: boolean;
|
40
|
+
dynamicBreadCrumbsCutoff?: number;
|
41
|
+
dragLimit?: number;
|
42
|
+
});
|
43
|
+
addEventListeners(): void;
|
44
|
+
removeEventListeners(): void;
|
45
|
+
init(index?: number): void;
|
46
|
+
destroy(): void;
|
47
|
+
handleResize(entries: any): void;
|
48
|
+
updateBreadcrumbClasses(newIndex: number, animate?: boolean): void;
|
49
|
+
updateBreadcrumbs(newIndex: any, oldIndex: any, animate: any): void;
|
50
|
+
goTo({ index, animate, forceUpdate, easing }: {
|
51
|
+
index: any;
|
52
|
+
animate?: boolean;
|
53
|
+
forceUpdate?: boolean;
|
54
|
+
easing?: string;
|
55
|
+
}): void;
|
56
|
+
handlePrevClick(): void;
|
57
|
+
handleNextClick(): void;
|
58
|
+
retreat(easing?: string): void;
|
59
|
+
advance(easing?: string): void;
|
60
|
+
handleKeyDown(evt: any): void;
|
61
|
+
startMouseDrag(evt: MouseEvent): void;
|
62
|
+
startTouchDrag(evt: TouchEvent): void;
|
63
|
+
startDrag(startPoint: {
|
64
|
+
x: number;
|
65
|
+
y: number;
|
66
|
+
}): void;
|
67
|
+
mouseDrag(evt: MouseEvent): void;
|
68
|
+
touchDrag(evt: TouchEvent): void;
|
69
|
+
drag(currentPosition: {
|
70
|
+
x: 0;
|
71
|
+
y: 0;
|
72
|
+
}, isTouch?: boolean): void;
|
73
|
+
endDrag(): void;
|
74
|
+
}
|
75
|
+
//# sourceMappingURL=hurdyGurdy.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"hurdyGurdy.d.ts","sourceRoot":"","sources":["../../src/lib/hurdyGurdy.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B,WAAW,EAAE,OAAO,CAAA;IACpB,WAAW,EAAE,OAAO,CAAA;IACpB,wBAAwB,EAAE,GAAG,CAAA;IAC7B,kBAAkB,EAAE,GAAG,CAAA;IACvB,SAAS,EAAE,GAAG,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,GAAG,CAAA;IACX,MAAM,EAAE,QAAQ,GAAG,UAAU,CAAW;IACxC,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,WAAW,CAAA;IACpB,sBAAsB,EAAE,WAAW,CAAA;IACnC,kBAAkB,EAAE,WAAW,CAAA;IAC/B,kBAAkB,EAAE,WAAW,CAAA;IAC/B,UAAU,EAAE,WAAW,CAAA;IACvB,MAAM,EAAE,WAAW,CAAA;IACnB,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC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S,CAAC,GAAG,EAAE,UAAU;IASzB,IAAI,CAAC,eAAe,EAAE;QAAE,CAAC,EAAE,CAAC,CAAC;QAAC,CAAC,EAAE,CAAC,CAAA;KAAE,EAAE,OAAO,UAAQ;IA+ErD,OAAO;CAqBR"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import './popoverScroller.scss';
|
2
|
+
export default class PopoverScroller {
|
3
|
+
initialized: boolean;
|
4
|
+
slides: Array<HTMLElement>;
|
5
|
+
currentSlide: number;
|
6
|
+
containerEl: HTMLElement;
|
7
|
+
scrollContainerEl: HTMLElement;
|
8
|
+
innerEl: HTMLElement;
|
9
|
+
onSlideChange: Function;
|
10
|
+
onRequestClose: Function;
|
11
|
+
constructor({ slides, containerEl, onSlideChange, onRequestClose }: {
|
12
|
+
slides: any;
|
13
|
+
containerEl: any;
|
14
|
+
onSlideChange: any;
|
15
|
+
onRequestClose?: any;
|
16
|
+
});
|
17
|
+
init(index?: number): void;
|
18
|
+
destroy(): void;
|
19
|
+
handleScroll(evt: any): void;
|
20
|
+
onBackGroundClick(evt: any): void;
|
21
|
+
goTo({ index, animate }: {
|
22
|
+
index: any;
|
23
|
+
animate?: boolean;
|
24
|
+
}): void;
|
25
|
+
}
|
26
|
+
//# sourceMappingURL=popoverScroller.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"popoverScroller.d.ts","sourceRoot":"","sources":["../../src/lib/popoverScroller.ts"],"names":[],"mappings":"AAEA,OAAO,wBAAwB,CAAA;AAE/B,MAAM,CAAC,OAAO,OAAO,eAAe;IAClC,WAAW,EAAE,OAAO,CAAA;IACpB,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,CAAA;IAC1B,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,WAAW,CAAA;IACxB,iBAAiB,EAAE,WAAW,CAAA;IAC9B,OAAO,EAAE,WAAW,CAAA;IACpB,aAAa,EAAE,QAAQ,CAAA;IACvB,cAAc,EAAE,QAAQ,CAAA;gBAEZ,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,cAAqB,EAAE;;;;;KAAA;IAezE,IAAI,CAAC,KAAK,SAAI;IAmBd,OAAO;IASP,YAAY,CAAC,GAAG,KAAA;IAShB,iBAAiB,CAAC,GAAG,KAAA;IAMrB,IAAI,CAAC,EAAE,KAAK,EAAE,OAAc,EAAE;;;KAAA;CAU/B"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export declare function updateTabbableEls({ include, exclude, merge, }: {
|
2
|
+
include?: any[];
|
3
|
+
exclude?: any[];
|
4
|
+
merge?: boolean;
|
5
|
+
}): void;
|
6
|
+
export declare function trapFocus(el: HTMLElement | ShadowRoot, exclude?: any[], initialFocusIndex?: number): Promise<void>;
|
7
|
+
export declare function releaseFocus(newFocusEl: HTMLElement): void;
|
8
|
+
//# sourceMappingURL=trapFocus.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"trapFocus.d.ts","sourceRoot":"","sources":["../../src/lib/trapFocus.ts"],"names":[],"mappings":"AA4HA,wBAAgB,iBAAiB,CAAC,EAChC,OAAY,EACZ,OAAY,EACZ,KAAa,GACd;;;;CAAA,QAeA;AAED,wBAAsB,SAAS,CAC7B,EAAE,EAAE,WAAW,GAAG,UAAU,EAC5B,OAAO,QAAK,EACZ,iBAAiB,SAAI,iBAqBtB;AAED,wBAAgB,YAAY,CAAC,UAAU,EAAE,WAAW,QAUnD"}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
/**
|
2
|
+
* @param input Object or array to clone
|
3
|
+
* @description A simple clone using JSON.stringify and JSON.parse.
|
4
|
+
*/
|
5
|
+
export declare function clone(input: object | Array<any>): JSON;
|
6
|
+
/**
|
7
|
+
* @description
|
8
|
+
* Force DOM layout. Coupled with a requestAnimationFrame this can be
|
9
|
+
* used to make sure newly added elements exist in the DOM before performing
|
10
|
+
* some other action, such as an animated transition
|
11
|
+
*/
|
12
|
+
export declare function forceLayout(): number;
|
13
|
+
/**
|
14
|
+
* @async
|
15
|
+
* @param type - Media type
|
16
|
+
* @param src - Media source
|
17
|
+
*/
|
18
|
+
export declare function preloadMedia(type: 'img' | 'video', src: string): Promise<unknown>;
|
19
|
+
/**
|
20
|
+
* @param text - string to truncate
|
21
|
+
* @param maxLines - Restrict to n lines. Determined by line breaks
|
22
|
+
* @param maxChars - Restrict to n total characters
|
23
|
+
*/
|
24
|
+
export declare function getTruncatedText({ text, maxLines, maxChars }: {
|
25
|
+
text: any;
|
26
|
+
maxLines?: number;
|
27
|
+
maxChars?: number;
|
28
|
+
}): any;
|
29
|
+
/**
|
30
|
+
* Generate a placeholder svg image
|
31
|
+
*/
|
32
|
+
export declare function getPlaceholderImage(width: number, height: number): string;
|
33
|
+
/**
|
34
|
+
* @async
|
35
|
+
* @param els - An array of elements
|
36
|
+
* @returns A promise that resolve with the index of the most visible el
|
37
|
+
* @description
|
38
|
+
* Find the most visible element in an array. Compares intersectionRatios.
|
39
|
+
* If multiple elements tie for highest intersectionRatio, the most visible
|
40
|
+
* element that appears earliest in the array is returned.
|
41
|
+
*/
|
42
|
+
export declare function getMostVisible(els: Array<HTMLElement>): Promise<number>;
|
43
|
+
/**
|
44
|
+
* @param el - the element to query
|
45
|
+
* @description
|
46
|
+
* Get first document or shadowRoot ancestor of an element
|
47
|
+
*/
|
48
|
+
export declare function getClosestShadowRootOrDocument(el: Node): Document | ShadowRoot;
|
49
|
+
/**
|
50
|
+
* @param callback - function to throttle
|
51
|
+
* @param wait - minimum time between invocations
|
52
|
+
* @param thisArg - this context to apply to callback
|
53
|
+
*/
|
54
|
+
export declare function throttle(callback: Function, wait: number, thisArg?: any): Function;
|
55
|
+
/**
|
56
|
+
* @param target - An element to toggle classes on
|
57
|
+
* @param classes - An object with the format { className: boolean }
|
58
|
+
* @description
|
59
|
+
* Add or remove classes on a target element with classname keys and boolean values
|
60
|
+
*/
|
61
|
+
export declare function setClasses(target: Element, classes: {
|
62
|
+
[key: string]: boolean;
|
63
|
+
}): void;
|
64
|
+
/**
|
65
|
+
* @param obj1 - Object to compare
|
66
|
+
* @param obj2 - Object to compare
|
67
|
+
* @param props - An array of properties to compare
|
68
|
+
* @description
|
69
|
+
* Compares an array of properties between two objects. Returns true if, for any property in the array, obj1[property] !== obj2[property]
|
70
|
+
*/
|
71
|
+
export declare function hasChanges(obj1: object, obj2: object, props: string | string[]): boolean;
|
72
|
+
//# sourceMappingURL=utils.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAEtD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,oBAmBpE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,QAAY,EAAE,QAAa,EAAE;;;;CAAA,OAUrE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,UAEhE;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAmBvE;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,EAAE,EAAE,IAAI,GACP,QAAQ,GAAG,UAAU,CAYvB;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,MAAO,GACb,QAAQ,CAoBV;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,OAAO,EACf,OAAO,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,QASpC;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,WAUzB"}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import Base from '../elements/BaseWidget.js';
|
2
|
+
import type PopoverGallery from '../elements/PopoverGallery.js';
|
3
|
+
import type BasePost from '../elements/BasePost.js';
|
4
|
+
export default class GalleryWall extends Base {
|
5
|
+
label: string;
|
6
|
+
widgetSettings: WidgetSettings;
|
7
|
+
feedMetadata: FeedMetadata;
|
8
|
+
posts: Posts;
|
9
|
+
containerEl: HTMLElement;
|
10
|
+
heightRefEl: HTMLElement;
|
11
|
+
postEls: Array<BasePost>;
|
12
|
+
popoverGalleryEl: PopoverGallery;
|
13
|
+
appliedBreakpoint: Breakpoint;
|
14
|
+
medianPaletteHSL: Array<string>;
|
15
|
+
setupIsComplete: boolean;
|
16
|
+
currentFocusIndex: number;
|
17
|
+
popupGallery: Function;
|
18
|
+
constructor();
|
19
|
+
handlePropChange({ changedProp }: {
|
20
|
+
changedProp: any;
|
21
|
+
}): void;
|
22
|
+
handlePostsChange(): void;
|
23
|
+
handleSettingsChange(): void;
|
24
|
+
handleMetadataChange(): void;
|
25
|
+
setup(): void;
|
26
|
+
/**
|
27
|
+
* Enable popup carousel
|
28
|
+
*/
|
29
|
+
enablePopoverGallery(): Promise<void>;
|
30
|
+
handleResize(entry: ResizeObserverEntry): void;
|
31
|
+
/**
|
32
|
+
* Handle prev post focus
|
33
|
+
*/
|
34
|
+
handleFocusPreviousPost(): void;
|
35
|
+
/**
|
36
|
+
* Handle next post focus
|
37
|
+
*/
|
38
|
+
handleFocusNextPost(): void;
|
39
|
+
/**
|
40
|
+
* Handle post click
|
41
|
+
*/
|
42
|
+
handlePostClick(post: BasePost): void;
|
43
|
+
renderPosts(breakpoint: Breakpoint): void;
|
44
|
+
getMatchingBreakpoint(width: number, breakpoints: Breakpoints): {
|
45
|
+
width: string;
|
46
|
+
numPosts: number;
|
47
|
+
borderRadius: string;
|
48
|
+
numColumns: number;
|
49
|
+
gap: {
|
50
|
+
[key: string]: string;
|
51
|
+
};
|
52
|
+
galleryWallLayout: string[];
|
53
|
+
galleryWallNamedLayout: string;
|
54
|
+
};
|
55
|
+
renderBreakpoint(breakpoint: Breakpoint, forceRender?: boolean): void;
|
56
|
+
createPostEls(breakpoint: Breakpoint): Array<BasePost>;
|
57
|
+
setContainerHeight: Function;
|
58
|
+
static register(name?: string): string;
|
59
|
+
}
|
60
|
+
declare global {
|
61
|
+
interface HTMLElementTagNameMap {
|
62
|
+
'behold-gallery-wall': GalleryWall;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
//# sourceMappingURL=GalleryWall.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"GalleryWall.d.ts","sourceRoot":"","sources":["../../src/widgets/GalleryWall.ts"],"names":[],"mappings":"AAGA,OAAO,IAAI,MAAM,2BAA2B,CAAA;AAK5C,OAAO,KAAK,cAAc,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAA;AAOnD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,IAAI;IAC3C,KAAK,SAAgB;IAGrB,cAAc,EAAE,cAAc,CAAkB;IAChD,YAAY,EAAE,YAAY,CAAA;IAC1B,KAAK,EAAE,KAAK,CAAA;IAGZ,WAAW,EAAE,WAAW,CAAA;IACxB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAA;IACxB,gBAAgB,EAAE,cAAc,CAAA;IAChC,iBAAiB,EAAE,UAAU,CAAA;IAC7B,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/B,eAAe,EAAE,OAAO,CAAQ;IAChC,iBAAiB,EAAE,MA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