@everymatrix/helper-filters 0.1.20 → 0.1.22
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/cjs/helper-filters.cjs.js +1 -1
- package/dist/cjs/helper-filters_2.cjs.entry.js +59 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/utils/locale.utils.js +26 -0
- package/dist/components/helper-filters.js +26 -0
- package/dist/components/helper-modal2.js +37 -2
- package/dist/esm/helper-filters.js +1 -1
- package/dist/esm/helper-filters_2.entry.js +59 -1
- package/dist/esm/loader.js +1 -1
- package/dist/helper-filters/helper-filters.esm.js +1 -1
- package/dist/helper-filters/{p-f41dd782.entry.js → p-13c0b3c4.entry.js} +27 -27
- package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/stencil/widgets-stencil/packages/helper-filters/.stencil/packages/helper-filters/stencil.config.d.ts +2 -0
- package/package.json +1 -1
- package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/helper-filters/.stencil/packages/helper-filters/stencil.config.d.ts +0 -2
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["helper-filters_2.cjs",[[1,"helper-filters",{"showFilterId":[4,"show-filter-id"],"activateTicketSearch":[4,"activate-ticket-search"],"gameId":[1,"game-id"],"playerId":[1,"player-id"],"session":[1],"postMessage":[4,"post-message"],"language":[1],"quickFiltersActive":[4,"quick-filters-active"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]],[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["helper-filters_2.cjs",[[1,"helper-filters",{"showFilterId":[4,"show-filter-id"],"activateTicketSearch":[4,"activate-ticket-search"],"gameId":[1,"game-id"],"playerId":[1,"player-id"],"session":[1],"postMessage":[4,"post-message"],"language":[1],"quickFiltersActive":[4,"quick-filters-active"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]],[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -31,6 +31,32 @@ const TRANSLATIONS = {
|
|
|
31
31
|
filterModalButton: 'Cauta',
|
|
32
32
|
filterOrDate: 'sau cauta dupa data'
|
|
33
33
|
},
|
|
34
|
+
fr: {
|
|
35
|
+
filterOpen: 'Filter',
|
|
36
|
+
filterClear: 'Clear',
|
|
37
|
+
filterModalTicketTitle: 'Ticket Results',
|
|
38
|
+
filterModalDrawTitle: 'Draws Results History',
|
|
39
|
+
filterTicketPlaceholder: 'Search for a ticket ID',
|
|
40
|
+
filterDrawPlaceholder: 'Search for a draw ID',
|
|
41
|
+
filterDateRangePlaceholder: 'Date Range',
|
|
42
|
+
filterModalButton: 'Search',
|
|
43
|
+
filterFromCalendar: 'From',
|
|
44
|
+
filterToCalendar: 'To',
|
|
45
|
+
filterOrDate: 'or search by date'
|
|
46
|
+
},
|
|
47
|
+
ar: {
|
|
48
|
+
filterOpen: 'Filter',
|
|
49
|
+
filterClear: 'Clear',
|
|
50
|
+
filterModalTicketTitle: 'Ticket Results',
|
|
51
|
+
filterModalDrawTitle: 'Draws Results History',
|
|
52
|
+
filterTicketPlaceholder: 'Search for a ticket ID',
|
|
53
|
+
filterDrawPlaceholder: 'Search for a draw ID',
|
|
54
|
+
filterDateRangePlaceholder: 'Date Range',
|
|
55
|
+
filterModalButton: 'Search',
|
|
56
|
+
filterFromCalendar: 'From',
|
|
57
|
+
filterToCalendar: 'To',
|
|
58
|
+
filterOrDate: 'or search by date'
|
|
59
|
+
}
|
|
34
60
|
};
|
|
35
61
|
const translate$1 = (key, customLang) => {
|
|
36
62
|
const lang = customLang;
|
|
@@ -22380,16 +22406,48 @@ const HelperModal = class {
|
|
|
22380
22406
|
* Toggles if the helper is visible or not
|
|
22381
22407
|
*/
|
|
22382
22408
|
this.visible = true;
|
|
22409
|
+
/**
|
|
22410
|
+
* Client custom styling via string
|
|
22411
|
+
*/
|
|
22412
|
+
this.clientStyling = '';
|
|
22413
|
+
/**
|
|
22414
|
+
* Client custom styling via url content
|
|
22415
|
+
*/
|
|
22416
|
+
this.clientStylingUrlContent = '';
|
|
22417
|
+
this.limitStylingAppends = false;
|
|
22383
22418
|
this.userAgent = window.navigator.userAgent;
|
|
22419
|
+
this.setClientStyling = () => {
|
|
22420
|
+
let sheet = document.createElement('style');
|
|
22421
|
+
sheet.innerHTML = this.clientStyling;
|
|
22422
|
+
this.stylingContainer.prepend(sheet);
|
|
22423
|
+
};
|
|
22424
|
+
this.setClientStylingURL = () => {
|
|
22425
|
+
let cssFile = document.createElement('style');
|
|
22426
|
+
setTimeout(() => {
|
|
22427
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
22428
|
+
this.stylingContainer.prepend(cssFile);
|
|
22429
|
+
}, 1);
|
|
22430
|
+
};
|
|
22384
22431
|
}
|
|
22385
22432
|
handleHelperModalClose() {
|
|
22386
22433
|
this.visible = false;
|
|
22387
22434
|
this.cancel.emit();
|
|
22388
22435
|
}
|
|
22389
22436
|
;
|
|
22437
|
+
componentDidRender() {
|
|
22438
|
+
// start custom styling area
|
|
22439
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
22440
|
+
if (this.clientStyling)
|
|
22441
|
+
this.setClientStyling();
|
|
22442
|
+
if (this.clientStylingUrlContent)
|
|
22443
|
+
this.setClientStylingURL();
|
|
22444
|
+
this.limitStylingAppends = true;
|
|
22445
|
+
}
|
|
22446
|
+
// end custom styling area
|
|
22447
|
+
}
|
|
22390
22448
|
render() {
|
|
22391
22449
|
return ((this.visible &&
|
|
22392
|
-
index.h("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper" }, index.h("div", { class: "HelperModalWrapper HelperModalVisible" }, index.h("div", { class: "HelperModalContent" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') }, index.h("span", { class: "HelperModalClose" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, "X"), index.h("slot", null))))));
|
|
22450
|
+
index.h("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper", ref: el => this.stylingContainer = el }, index.h("div", { class: "HelperModalWrapper HelperModalVisible" }, index.h("div", { class: "HelperModalContent" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') }, index.h("span", { class: "HelperModalClose" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, "X"), index.h("slot", null))))));
|
|
22393
22451
|
}
|
|
22394
22452
|
};
|
|
22395
22453
|
HelperModal.style = helperModalCss;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["helper-filters_2.cjs",[[1,"helper-filters",{"showFilterId":[4,"show-filter-id"],"activateTicketSearch":[4,"activate-ticket-search"],"gameId":[1,"game-id"],"playerId":[1,"player-id"],"session":[1],"postMessage":[4,"post-message"],"language":[1],"quickFiltersActive":[4,"quick-filters-active"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]],[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["helper-filters_2.cjs",[[1,"helper-filters",{"showFilterId":[4,"show-filter-id"],"activateTicketSearch":[4,"activate-ticket-search"],"gameId":[1,"game-id"],"playerId":[1,"player-id"],"session":[1],"postMessage":[4,"post-message"],"language":[1],"quickFiltersActive":[4,"quick-filters-active"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]],[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -25,6 +25,32 @@ const TRANSLATIONS = {
|
|
|
25
25
|
filterModalButton: 'Cauta',
|
|
26
26
|
filterOrDate: 'sau cauta dupa data'
|
|
27
27
|
},
|
|
28
|
+
fr: {
|
|
29
|
+
filterOpen: 'Filter',
|
|
30
|
+
filterClear: 'Clear',
|
|
31
|
+
filterModalTicketTitle: 'Ticket Results',
|
|
32
|
+
filterModalDrawTitle: 'Draws Results History',
|
|
33
|
+
filterTicketPlaceholder: 'Search for a ticket ID',
|
|
34
|
+
filterDrawPlaceholder: 'Search for a draw ID',
|
|
35
|
+
filterDateRangePlaceholder: 'Date Range',
|
|
36
|
+
filterModalButton: 'Search',
|
|
37
|
+
filterFromCalendar: 'From',
|
|
38
|
+
filterToCalendar: 'To',
|
|
39
|
+
filterOrDate: 'or search by date'
|
|
40
|
+
},
|
|
41
|
+
ar: {
|
|
42
|
+
filterOpen: 'Filter',
|
|
43
|
+
filterClear: 'Clear',
|
|
44
|
+
filterModalTicketTitle: 'Ticket Results',
|
|
45
|
+
filterModalDrawTitle: 'Draws Results History',
|
|
46
|
+
filterTicketPlaceholder: 'Search for a ticket ID',
|
|
47
|
+
filterDrawPlaceholder: 'Search for a draw ID',
|
|
48
|
+
filterDateRangePlaceholder: 'Date Range',
|
|
49
|
+
filterModalButton: 'Search',
|
|
50
|
+
filterFromCalendar: 'From',
|
|
51
|
+
filterToCalendar: 'To',
|
|
52
|
+
filterOrDate: 'or search by date'
|
|
53
|
+
}
|
|
28
54
|
};
|
|
29
55
|
export const translate = (key, customLang) => {
|
|
30
56
|
const lang = customLang;
|
|
@@ -28,6 +28,32 @@ const TRANSLATIONS = {
|
|
|
28
28
|
filterModalButton: 'Cauta',
|
|
29
29
|
filterOrDate: 'sau cauta dupa data'
|
|
30
30
|
},
|
|
31
|
+
fr: {
|
|
32
|
+
filterOpen: 'Filter',
|
|
33
|
+
filterClear: 'Clear',
|
|
34
|
+
filterModalTicketTitle: 'Ticket Results',
|
|
35
|
+
filterModalDrawTitle: 'Draws Results History',
|
|
36
|
+
filterTicketPlaceholder: 'Search for a ticket ID',
|
|
37
|
+
filterDrawPlaceholder: 'Search for a draw ID',
|
|
38
|
+
filterDateRangePlaceholder: 'Date Range',
|
|
39
|
+
filterModalButton: 'Search',
|
|
40
|
+
filterFromCalendar: 'From',
|
|
41
|
+
filterToCalendar: 'To',
|
|
42
|
+
filterOrDate: 'or search by date'
|
|
43
|
+
},
|
|
44
|
+
ar: {
|
|
45
|
+
filterOpen: 'Filter',
|
|
46
|
+
filterClear: 'Clear',
|
|
47
|
+
filterModalTicketTitle: 'Ticket Results',
|
|
48
|
+
filterModalDrawTitle: 'Draws Results History',
|
|
49
|
+
filterTicketPlaceholder: 'Search for a ticket ID',
|
|
50
|
+
filterDrawPlaceholder: 'Search for a draw ID',
|
|
51
|
+
filterDateRangePlaceholder: 'Date Range',
|
|
52
|
+
filterModalButton: 'Search',
|
|
53
|
+
filterFromCalendar: 'From',
|
|
54
|
+
filterToCalendar: 'To',
|
|
55
|
+
filterOrDate: 'or search by date'
|
|
56
|
+
}
|
|
31
57
|
};
|
|
32
58
|
const translate$1 = (key, customLang) => {
|
|
33
59
|
const lang = customLang;
|
|
@@ -25,21 +25,56 @@ const HelperModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
25
25
|
* Toggles if the helper is visible or not
|
|
26
26
|
*/
|
|
27
27
|
this.visible = true;
|
|
28
|
+
/**
|
|
29
|
+
* Client custom styling via string
|
|
30
|
+
*/
|
|
31
|
+
this.clientStyling = '';
|
|
32
|
+
/**
|
|
33
|
+
* Client custom styling via url content
|
|
34
|
+
*/
|
|
35
|
+
this.clientStylingUrlContent = '';
|
|
36
|
+
this.limitStylingAppends = false;
|
|
28
37
|
this.userAgent = window.navigator.userAgent;
|
|
38
|
+
this.setClientStyling = () => {
|
|
39
|
+
let sheet = document.createElement('style');
|
|
40
|
+
sheet.innerHTML = this.clientStyling;
|
|
41
|
+
this.stylingContainer.prepend(sheet);
|
|
42
|
+
};
|
|
43
|
+
this.setClientStylingURL = () => {
|
|
44
|
+
let cssFile = document.createElement('style');
|
|
45
|
+
setTimeout(() => {
|
|
46
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
47
|
+
this.stylingContainer.prepend(cssFile);
|
|
48
|
+
}, 1);
|
|
49
|
+
};
|
|
29
50
|
}
|
|
30
51
|
handleHelperModalClose() {
|
|
31
52
|
this.visible = false;
|
|
32
53
|
this.cancel.emit();
|
|
33
54
|
}
|
|
34
55
|
;
|
|
56
|
+
componentDidRender() {
|
|
57
|
+
// start custom styling area
|
|
58
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
59
|
+
if (this.clientStyling)
|
|
60
|
+
this.setClientStyling();
|
|
61
|
+
if (this.clientStylingUrlContent)
|
|
62
|
+
this.setClientStylingURL();
|
|
63
|
+
this.limitStylingAppends = true;
|
|
64
|
+
}
|
|
65
|
+
// end custom styling area
|
|
66
|
+
}
|
|
35
67
|
render() {
|
|
36
68
|
return ((this.visible &&
|
|
37
|
-
h("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper" }, h("div", { class: "HelperModalWrapper HelperModalVisible" }, h("div", { class: "HelperModalContent" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') }, h("span", { class: "HelperModalClose" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, "X"), h("slot", null))))));
|
|
69
|
+
h("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper", ref: el => this.stylingContainer = el }, h("div", { class: "HelperModalWrapper HelperModalVisible" }, h("div", { class: "HelperModalContent" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') }, h("span", { class: "HelperModalClose" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, "X"), h("slot", null))))));
|
|
38
70
|
}
|
|
39
71
|
static get style() { return helperModalCss; }
|
|
40
72
|
}, [1, "helper-modal", {
|
|
41
73
|
"titleModal": [1, "title-modal"],
|
|
42
|
-
"visible": [1540]
|
|
74
|
+
"visible": [1540],
|
|
75
|
+
"clientStyling": [1, "client-styling"],
|
|
76
|
+
"clientStylingUrlContent": [1, "client-styling-url-content"],
|
|
77
|
+
"limitStylingAppends": [32]
|
|
43
78
|
}]);
|
|
44
79
|
function defineCustomElement() {
|
|
45
80
|
if (typeof customElements === "undefined") {
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["helper-filters_2",[[1,"helper-filters",{"showFilterId":[4,"show-filter-id"],"activateTicketSearch":[4,"activate-ticket-search"],"gameId":[1,"game-id"],"playerId":[1,"player-id"],"session":[1],"postMessage":[4,"post-message"],"language":[1],"quickFiltersActive":[4,"quick-filters-active"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]],[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540]}]]]], options);
|
|
16
|
+
return bootstrapLazy([["helper-filters_2",[[1,"helper-filters",{"showFilterId":[4,"show-filter-id"],"activateTicketSearch":[4,"activate-ticket-search"],"gameId":[1,"game-id"],"playerId":[1,"player-id"],"session":[1],"postMessage":[4,"post-message"],"language":[1],"quickFiltersActive":[4,"quick-filters-active"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]],[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -27,6 +27,32 @@ const TRANSLATIONS = {
|
|
|
27
27
|
filterModalButton: 'Cauta',
|
|
28
28
|
filterOrDate: 'sau cauta dupa data'
|
|
29
29
|
},
|
|
30
|
+
fr: {
|
|
31
|
+
filterOpen: 'Filter',
|
|
32
|
+
filterClear: 'Clear',
|
|
33
|
+
filterModalTicketTitle: 'Ticket Results',
|
|
34
|
+
filterModalDrawTitle: 'Draws Results History',
|
|
35
|
+
filterTicketPlaceholder: 'Search for a ticket ID',
|
|
36
|
+
filterDrawPlaceholder: 'Search for a draw ID',
|
|
37
|
+
filterDateRangePlaceholder: 'Date Range',
|
|
38
|
+
filterModalButton: 'Search',
|
|
39
|
+
filterFromCalendar: 'From',
|
|
40
|
+
filterToCalendar: 'To',
|
|
41
|
+
filterOrDate: 'or search by date'
|
|
42
|
+
},
|
|
43
|
+
ar: {
|
|
44
|
+
filterOpen: 'Filter',
|
|
45
|
+
filterClear: 'Clear',
|
|
46
|
+
filterModalTicketTitle: 'Ticket Results',
|
|
47
|
+
filterModalDrawTitle: 'Draws Results History',
|
|
48
|
+
filterTicketPlaceholder: 'Search for a ticket ID',
|
|
49
|
+
filterDrawPlaceholder: 'Search for a draw ID',
|
|
50
|
+
filterDateRangePlaceholder: 'Date Range',
|
|
51
|
+
filterModalButton: 'Search',
|
|
52
|
+
filterFromCalendar: 'From',
|
|
53
|
+
filterToCalendar: 'To',
|
|
54
|
+
filterOrDate: 'or search by date'
|
|
55
|
+
}
|
|
30
56
|
};
|
|
31
57
|
const translate$1 = (key, customLang) => {
|
|
32
58
|
const lang = customLang;
|
|
@@ -22376,16 +22402,48 @@ const HelperModal = class {
|
|
|
22376
22402
|
* Toggles if the helper is visible or not
|
|
22377
22403
|
*/
|
|
22378
22404
|
this.visible = true;
|
|
22405
|
+
/**
|
|
22406
|
+
* Client custom styling via string
|
|
22407
|
+
*/
|
|
22408
|
+
this.clientStyling = '';
|
|
22409
|
+
/**
|
|
22410
|
+
* Client custom styling via url content
|
|
22411
|
+
*/
|
|
22412
|
+
this.clientStylingUrlContent = '';
|
|
22413
|
+
this.limitStylingAppends = false;
|
|
22379
22414
|
this.userAgent = window.navigator.userAgent;
|
|
22415
|
+
this.setClientStyling = () => {
|
|
22416
|
+
let sheet = document.createElement('style');
|
|
22417
|
+
sheet.innerHTML = this.clientStyling;
|
|
22418
|
+
this.stylingContainer.prepend(sheet);
|
|
22419
|
+
};
|
|
22420
|
+
this.setClientStylingURL = () => {
|
|
22421
|
+
let cssFile = document.createElement('style');
|
|
22422
|
+
setTimeout(() => {
|
|
22423
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
22424
|
+
this.stylingContainer.prepend(cssFile);
|
|
22425
|
+
}, 1);
|
|
22426
|
+
};
|
|
22380
22427
|
}
|
|
22381
22428
|
handleHelperModalClose() {
|
|
22382
22429
|
this.visible = false;
|
|
22383
22430
|
this.cancel.emit();
|
|
22384
22431
|
}
|
|
22385
22432
|
;
|
|
22433
|
+
componentDidRender() {
|
|
22434
|
+
// start custom styling area
|
|
22435
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
22436
|
+
if (this.clientStyling)
|
|
22437
|
+
this.setClientStyling();
|
|
22438
|
+
if (this.clientStylingUrlContent)
|
|
22439
|
+
this.setClientStylingURL();
|
|
22440
|
+
this.limitStylingAppends = true;
|
|
22441
|
+
}
|
|
22442
|
+
// end custom styling area
|
|
22443
|
+
}
|
|
22386
22444
|
render() {
|
|
22387
22445
|
return ((this.visible &&
|
|
22388
|
-
h$2("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper" }, h$2("div", { class: "HelperModalWrapper HelperModalVisible" }, h$2("div", { class: "HelperModalContent" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') }, h$2("span", { class: "HelperModalClose" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, "X"), h$2("slot", null))))));
|
|
22446
|
+
h$2("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper", ref: el => this.stylingContainer = el }, h$2("div", { class: "HelperModalWrapper HelperModalVisible" }, h$2("div", { class: "HelperModalContent" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') }, h$2("span", { class: "HelperModalClose" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, "X"), h$2("slot", null))))));
|
|
22389
22447
|
}
|
|
22390
22448
|
};
|
|
22391
22449
|
HelperModal.style = helperModalCss;
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["helper-filters_2",[[1,"helper-filters",{"showFilterId":[4,"show-filter-id"],"activateTicketSearch":[4,"activate-ticket-search"],"gameId":[1,"game-id"],"playerId":[1,"player-id"],"session":[1],"postMessage":[4,"post-message"],"language":[1],"quickFiltersActive":[4,"quick-filters-active"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]],[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540]}]]]], options);
|
|
13
|
+
return bootstrapLazy([["helper-filters_2",[[1,"helper-filters",{"showFilterId":[4,"show-filter-id"],"activateTicketSearch":[4,"activate-ticket-search"],"gameId":[1,"game-id"],"playerId":[1,"player-id"],"session":[1],"postMessage":[4,"post-message"],"language":[1],"quickFiltersActive":[4,"quick-filters-active"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]],[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as t,b as e}from"./p-6a46b66a.js";(()=>{const e=import.meta.url,l={};return""!==e&&(l.resourcesUrl=new URL(".",e).href),t(l)})().then((t=>e([["p-13c0b3c4",[[1,"helper-filters",{showFilterId:[4,"show-filter-id"],activateTicketSearch:[4,"activate-ticket-search"],gameId:[1,"game-id"],playerId:[1,"player-id"],session:[1],postMessage:[4,"post-message"],language:[1],quickFiltersActive:[4,"quick-filters-active"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],showFilterModal:[32],showClearButton:[32],filterData:[32],filterDataReset:[32],limitStylingAppends:[32]},[[0,"modalCloseEvent","modalCloseEvent"]]],[1,"helper-modal",{titleModal:[1,"title-modal"],visible:[1540],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]}]]]],t)));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as e,h as i}from"./p-6a46b66a.js";const s=["ro","en"],o={en:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterDateRangePlaceholder:"Date Range",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",filterOrDate:"or search by date"},ro:{filterOpen:"Filtrare",filterClear:"Stergere",filterModalTicketTitle:"Rezultatele biletelor",filterModalDrawTitle:"Rezultatele draw-urilor",filterTicketPlaceholder:"Cauta ID bilet",filterDrawPlaceholder:"Cauta ID draw",filterDateRangePlaceholder:"Perioada",filterModalButton:"Cauta",filterOrDate:"sau cauta dupa data"}},r=(t,e)=>{const i=e;return o[void 0!==i&&s.includes(i)?i:"en"][t]};
|
|
1
|
+
import{r as t,c as e,h as i}from"./p-6a46b66a.js";const s=["ro","en"],o={en:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterDateRangePlaceholder:"Date Range",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",filterOrDate:"or search by date"},ro:{filterOpen:"Filtrare",filterClear:"Stergere",filterModalTicketTitle:"Rezultatele biletelor",filterModalDrawTitle:"Rezultatele draw-urilor",filterTicketPlaceholder:"Cauta ID bilet",filterDrawPlaceholder:"Cauta ID draw",filterDateRangePlaceholder:"Perioada",filterModalButton:"Cauta",filterOrDate:"sau cauta dupa data"},fr:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterDateRangePlaceholder:"Date Range",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",filterOrDate:"or search by date"},ar:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterDateRangePlaceholder:"Date Range",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",filterOrDate:"or search by date"}},r=(t,e)=>{const i=e;return o[void 0!==i&&s.includes(i)?i:"en"][t]};
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
@@ -21,13 +21,13 @@ const a=window,l=a.ShadowRoot&&(void 0===a.ShadyCSS||a.ShadyCSS.nativeShadow)&&"
|
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
23
|
*/
|
|
24
|
-
var k;x.finalized=!0,x.elementProperties=new Map,x.elementStyles=[],x.shadowRootOptions={mode:"open"},null==g||g({ReactiveElement:x}),(null!==(m=f.reactiveElementVersions)&&void 0!==m?m:f.reactiveElementVersions=[]).push("1.4.1");const A=window,C=A.trustedTypes,D=C?C.createPolicy("lit-html",{createHTML:t=>t}):void 0,T=`lit$${(Math.random()+"").slice(9)}$`,S="?"+T,M=`<${S}>`,z=document,F=(t="")=>z.createComment(t),P=t=>null===t||"object"!=typeof t&&"function"!=typeof t,E=Array.isArray,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,
|
|
24
|
+
var k;x.finalized=!0,x.elementProperties=new Map,x.elementStyles=[],x.shadowRootOptions={mode:"open"},null==g||g({ReactiveElement:x}),(null!==(m=f.reactiveElementVersions)&&void 0!==m?m:f.reactiveElementVersions=[]).push("1.4.1");const A=window,C=A.trustedTypes,D=C?C.createPolicy("lit-html",{createHTML:t=>t}):void 0,T=`lit$${(Math.random()+"").slice(9)}$`,S="?"+T,M=`<${S}>`,z=document,F=(t="")=>z.createComment(t),P=t=>null===t||"object"!=typeof t&&"function"!=typeof t,E=Array.isArray,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,I=/>/g,N=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),j=/'/g,H=/"/g,R=/^(?:script|style|textarea|title)$/i,W=Symbol.for("lit-noChange"),L=Symbol.for("lit-nothing"),U=new WeakMap,$=z.createTreeWalker(z,129,null,!1),Y=(t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":"",n=O;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,c=0;for(;c<i.length&&(n.lastIndex=c,l=n.exec(i),null!==l);)c=n.lastIndex,n===O?"!--"===l[1]?n=B:void 0!==l[1]?n=I:void 0!==l[2]?(R.test(l[2])&&(o=RegExp("</"+l[2],"g")),n=N):void 0!==l[3]&&(n=N):n===N?">"===l[0]?(n=null!=o?o:O,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?N:'"'===l[3]?H:j):n===H||n===j?n=N:n===B||n===I?n=O:(n=N,o=void 0);const d=n===N&&t[e+1].startsWith("/>")?" ":"";r+=n===O?i+M:h>=0?(s.push(a),i.slice(0,h)+"$lit$"+i.slice(h)+T+d):i+T+(-2===h?(s.push(void 0),e):d)}const a=r+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==D?D.createHTML(a):a,s]};class q{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,a=this.parts,[l,h]=Y(t,e);if(this.el=q.createElement(l,i),$.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(s=$.nextNode())&&a.length<n;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const e of s.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(T)){const i=h[r++];if(t.push(e),void 0!==i){const t=s.getAttribute(i.toLowerCase()+"$lit$").split(T),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:o,name:e[2],strings:t,ctor:"."===e[1]?Z:"?"===e[1]?Q:"@"===e[1]?tt:K})}else a.push({type:6,index:o})}for(const e of t)s.removeAttribute(e)}if(R.test(s.tagName)){const t=s.textContent.split(T),e=t.length-1;if(e>0){s.textContent=C?C.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],F()),$.nextNode(),a.push({type:2,index:++o});s.append(t[e],F())}}}else if(8===s.nodeType)if(s.data===S)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(T,t+1));)a.push({type:7,index:o}),t+=T.length-1}o++}}static createElement(t,e){const i=z.createElement("template");return i.innerHTML=t,i}}function V(t,e,i=t,s){var o,r,n,a;if(e===W)return e;let l=void 0!==s?null===(o=i._$Cl)||void 0===o?void 0:o[s]:i._$Cu;const h=P(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,i,s)),void 0!==s?(null!==(n=(a=i)._$Cl)&&void 0!==n?n:a._$Cl=[])[s]=l:i._$Cu=l),void 0!==l&&(e=V(t,l._$AS(t,e.values),l,s)),e}class G{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:s}=this._$AD,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:z).importNode(i,!0);$.currentNode=o;let r=$.nextNode(),n=0,a=0,l=s[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new J(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new et(r,this,t)),this.v.push(e),l=s[++a]}n!==(null==l?void 0:l.index)&&(r=$.nextNode(),n++)}return o}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class J{constructor(t,e,i,s){var o;this.type=2,this._$AH=L,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$C_=null===(o=null==s?void 0:s.isConnected)||void 0===o||o}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$C_}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=V(this,t,e),P(t)?t===L||null==t||""===t?(this._$AH!==L&&this._$AR(),this._$AH=L):t!==this._$AH&&t!==W&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):(t=>E(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.O(t):this.$(t)}S(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}$(t){this._$AH!==L&&P(this._$AH)?this._$AA.nextSibling.data=t:this.k(z.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:s}=t,o="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=q.createElement(s.h,this.options)),s);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.m(i);else{const t=new G(o,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=U.get(t.strings);return void 0===e&&U.set(t.strings,e=new q(t)),e}O(t){E(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new J(this.S(F()),this.S(F()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$C_=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class K{constructor(t,e,i,s,o){this.type=1,this._$AH=L,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=L}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=V(this,t,e,0),r=!P(t)||t!==this._$AH&&t!==W,r&&(this._$AH=t);else{const s=t;let n,a;for(t=o[0],n=0;n<o.length-1;n++)a=V(this,s[i+n],e,n),a===W&&(a=this._$AH[n]),r||(r=!P(a)||a!==this._$AH[n]),a===L?t=L:t!==L&&(t+=(null!=a?a:"")+o[n+1]),this._$AH[n]=a}r&&!s&&this.P(t)}P(t){t===L?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Z extends K{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===L?void 0:t}}const X=C?C.emptyScript:"";class Q extends K{constructor(){super(...arguments),this.type=4}P(t){t&&t!==L?this.element.setAttribute(this.name,X):this.element.removeAttribute(this.name)}}class tt extends K{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=V(this,t,e,0))&&void 0!==i?i:L)===W)return;const s=this._$AH,o=t===L&&s!==L||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==L&&(s===L||o);o&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class et{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){V(this,t)}}const it=A.litHtmlPolyfillSupport;
|
|
25
25
|
/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2017 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
29
|
*/
|
|
30
|
-
var st,ot;null==it||it(q,J),(null!==(k=A.litHtmlVersions)&&void 0!==k?k:A.litHtmlVersions=[]).push("2.3.1");class rt extends x{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var s,o;const r=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let n=r._$litPart$;if(void 0===n){const t=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;r._$litPart$=n=new J(e.insertBefore(F(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return
|
|
30
|
+
var st,ot;null==it||it(q,J),(null!==(k=A.litHtmlVersions)&&void 0!==k?k:A.litHtmlVersions=[]).push("2.3.1");class rt extends x{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var s,o;const r=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let n=r._$litPart$;if(void 0===n){const t=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;r._$litPart$=n=new J(e.insertBefore(F(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return W}}rt.finalized=!0,rt._$litElement$=!0,null===(st=globalThis.litElementHydrateSupport)||void 0===st||st.call(globalThis,{LitElement:rt});const nt=globalThis.litElementPolyfillSupport;null==nt||nt({LitElement:rt}),(null!==(ot=globalThis.litElementVersions)&&void 0!==ot?ot:globalThis.litElementVersions=[]).push("3.2.2");
|
|
31
31
|
/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
@@ -586,7 +586,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
586
586
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
587
587
|
Code distributed by Google as part of the polymer project is also
|
|
588
588
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
589
|
-
*/const Pt=!window.ShadyDOM||!window.ShadyDOM.inUse,Et=Pt&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let Ot=window.Polymer&&window.Polymer.rootPath||Ft(document.baseURI||window.location.href),Bt=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,
|
|
589
|
+
*/const Pt=!window.ShadyDOM||!window.ShadyDOM.inUse,Et=Pt&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let Ot=window.Polymer&&window.Polymer.rootPath||Ft(document.baseURI||window.location.href),Bt=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,It=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Nt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,jt=window.Polymer&&window.Polymer.legacyOptimizations||!1,Ht=window.Polymer&&window.Polymer.legacyWarnings||!1,Rt=window.Polymer&&window.Polymer.syncInitialRender||!1,Wt=window.Polymer&&window.Polymer.legacyUndefined||!1,Lt=window.Polymer&&window.Polymer.orderedComputed||!1,Ut=window.Polymer&&window.Polymer.removeNestedTemplates||!1,$t=window.Polymer&&window.Polymer.fastDomIf||!1,Yt=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,qt=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,Vt=0;const Gt=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=Vt++;return function(s){let o=s.__mixinSet;if(o&&o[i])return s;let r=e,n=r.get(s);if(!n){n=t(s),r.set(s,n);let e=Object.create(n.__mixinSet||o||null);e[i]=!0,n.__mixinSet=e}return n}};
|
|
590
590
|
/**
|
|
591
591
|
@license
|
|
592
592
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -595,7 +595,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
595
595
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
596
596
|
Code distributed by Google as part of the polymer project is also
|
|
597
597
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
598
|
-
*/let Jt={},Kt={};function Zt(t,e){Jt[t]=Kt[t.toLowerCase()]=e}function Xt(t){return Jt[t]||Kt[t.toLowerCase()]}class Qt extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=Xt(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,s){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=Mt(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Ft(e)}return this.__assetpath}register(t){if(t=t||this.id){if(
|
|
598
|
+
*/let Jt={},Kt={};function Zt(t,e){Jt[t]=Kt[t.toLowerCase()]=e}function Xt(t){return Jt[t]||Kt[t.toLowerCase()]}class Qt extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=Xt(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,s){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=Mt(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Ft(e)}return this.__assetpath}register(t){if(t=t||this.id){if(It&&void 0!==Xt(t))throw Zt(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,Zt(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}function te(t){return Qt.import(t)}function ee(t){const e=zt((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function ie(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...se(e[t]));return i}function se(t){const e=te(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...re(e));const i=e.querySelector("template");i&&t.push(...oe(i,e.assetpath)),e._styles=t}return e._styles}function oe(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let o=s[t],r=o.getAttribute("include");r&&i.push(...ie(r).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(o.textContent=zt(o.textContent,e)),i.push(o)}t._styles=i}return t._styles}function re(t){const e=[],i=t.querySelectorAll("link[rel=import][type~=css]");for(let t=0;t<i.length;t++){let s=i[t];if(s.import){const t=s.import,i=s.hasAttribute("shady-unscoped");if(i&&!t._unscopedStyle){const e=ee(t);e.setAttribute("shady-unscoped",""),t._unscopedStyle=e}else t._style||(t._style=ee(t));e.push(i?t._unscopedStyle:t._style)}}return e}
|
|
599
599
|
/**
|
|
600
600
|
@license
|
|
601
601
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -631,7 +631,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
631
631
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
632
632
|
Code distributed by Google as part of the polymer project is also
|
|
633
633
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
634
|
-
*/let _e=0,xe=0,ke=[],Ae=0,Ce=!1,De=document.createTextNode("");new window.MutationObserver((function(){Ce=!1;const t=ke.length;for(let e=0;e<t;e++){let t=ke[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}ke.splice(0,t),xe+=t})).observe(De,{characterData:!0});const Te={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Se={run:t=>(Ce||(Ce=!0,De.textContent=Ae++),ke.push(t),_e++),cancel(t){const e=t-xe;if(e>=0){if(!ke[e])throw new Error("invalid async handle: "+t);ke[e]=null}}},Me=Se,ze=Gt((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let s=this.__data[t],o=this._shouldPropertyChange(t,e,s);return o&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),o}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Me.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return Boolean(e)}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,s){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,s)}_attributeToProperty(t,e,i){if(!this.__serializing){const s=this.__dataAttributes,o=s&&s[t]||t;this[o]=this._deserializeValue(e,i||this.constructor.typeForProperty(o))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const s=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=ne(t)),void 0===s?t.removeAttribute(i):t.setAttribute(i,""===s&&window.trustedTypes?window.trustedTypes.emptyScript:s)}_serializeValue(t){switch(typeof t){case"boolean":return t?"":void 0;default:return null!=t?t.toString():void 0}}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),Fe={};let Pe=HTMLElement.prototype;for(;Pe;){let t=Object.getOwnPropertyNames(Pe);for(let e=0;e<t.length;e++)Fe[t[e]]=!0;Pe=Object.getPrototypeOf(Pe)}const Ee=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,Oe=Gt((t=>{const e=ze(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(ye(t[e]))}static attributeNameForProperty(t){return we(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){switch(typeof t){case"object":if(t instanceof Date)return t.toString();if(t){if(Ee(t))return t;try{return JSON.stringify(t)}catch(t){return""}}default:return super._serializeValue(t)}}_deserializeValue(t,e){let i;switch(e){case Object:try{i=JSON.parse(t)}catch(e){i=t}break;case Array:try{i=JSON.parse(t)}catch(e){i=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:i=isNaN(t)?String(t):Number(t),i=new Date(i);break;default:i=super._deserializeValue(t,e)}return i}_definePropertyAccessor(t,e){!function(t,e){if(!Fe[e]){let i=t[e];void 0!==i&&(t.__data?t._setPendingProperty(e,i):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=i))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),Be={"dom-if":!0,"dom-repeat":!0};let Ne=!1,Ie=!1;const je=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const o=i.getAttribute(s);t&&s.startsWith("on-")?e.setAttribute(s,t.createScript(o,s)):e.setAttribute(s,o)}})();function He(t){let e=t.getAttribute("is");if(e&&Be[e]){let i=t;for(i.removeAttribute("is"),t=i.ownerDocument.createElement(e),i.parentNode.replaceChild(t,i),t.appendChild(i);i.attributes.length;){const{name:e}=i.attributes[0];je(t,i,e),i.removeAttribute(e)}}return t}function We(t,e){let i=e.parentInfo&&We(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,s=0;t;t=t.nextSibling)if(e.parentIndex===s++)return t}function Le(t,e,i,s){s.id&&(e[s.id]=i)}function Re(t,e,i){if(i.events&&i.events.length)for(let s,o=0,r=i.events;o<r.length&&(s=r[o]);o++)t._addMethodEventListenerToNode(e,s.name,s.value,t)}function Ue(t,e,i,s){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=s)}const $e=Gt((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(e),i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let s=!1,o=t;return"template"!=o.localName||o.hasAttribute("preserve-content")?"slot"===o.localName&&(e.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(o,e,i)||s,function(t){(function(){if(!Ne){Ne=!0;const t=document.createElement("textarea");t.placeholder="a",Ie=t.placeholder===t.textContent}return Ie})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(o),o.firstChild&&this._parseTemplateChildNodes(o,e,i),o.hasAttributes&&o.hasAttributes()&&(s=this._parseTemplateNodeAttributes(o,e,i)||s),s||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let s,o=t.firstChild,r=0;o;o=s){if("template"==o.localName&&(o=He(o)),s=o.nextSibling,o.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)o.textContent+=i.textContent,s=i.nextSibling,t.removeChild(i),i=s;if(e.stripWhiteSpace&&!o.textContent.trim()){t.removeChild(o);continue}}let n={parentIndex:r,parentInfo:i};this._parseTemplateNode(o,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),o.parentNode&&r++}}static _parseTemplateNestedTemplate(t,e,i){let s=t,o=this._parseTemplate(s,e);return(o.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=o,!0}static _parseTemplateNodeAttributes(t,e,i){let s=!1,o=Array.from(t.attributes);for(let r,n=o.length-1;r=o[n];n--)s=this._parseTemplateNodeAttribute(t,e,i,r.name,r.value)||s;return s}static _parseTemplateNodeAttribute(t,e,i,s,o){return"on-"===s.slice(0,3)?(t.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:o}),!0):"id"===s&&(i.id=o,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,s=document.importNode(e.content||t.content,!0);s.__noInsertionPoint=!e.hasInsertionPoint;let o=s.nodeList=new Array(i.length);s.$={};for(let t,r=0,n=i.length;r<n&&(t=i[r]);r++){let i=o[r]=We(s,t);Le(0,s.$,i,t),Ue(0,i,t,e),Re(this,i,t)}return s=s,s}_addMethodEventListenerToNode(t,e,i,s){let o=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(s=s||t,0,i);return this._addEventListenerToNode(t,e,o),o}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
|
|
634
|
+
*/let _e=0,xe=0,ke=[],Ae=0,Ce=!1,De=document.createTextNode("");new window.MutationObserver((function(){Ce=!1;const t=ke.length;for(let e=0;e<t;e++){let t=ke[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}ke.splice(0,t),xe+=t})).observe(De,{characterData:!0});const Te={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Se={run:t=>(Ce||(Ce=!0,De.textContent=Ae++),ke.push(t),_e++),cancel(t){const e=t-xe;if(e>=0){if(!ke[e])throw new Error("invalid async handle: "+t);ke[e]=null}}},Me=Se,ze=Gt((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let s=this.__data[t],o=this._shouldPropertyChange(t,e,s);return o&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),o}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Me.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return Boolean(e)}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,s){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,s)}_attributeToProperty(t,e,i){if(!this.__serializing){const s=this.__dataAttributes,o=s&&s[t]||t;this[o]=this._deserializeValue(e,i||this.constructor.typeForProperty(o))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const s=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=ne(t)),void 0===s?t.removeAttribute(i):t.setAttribute(i,""===s&&window.trustedTypes?window.trustedTypes.emptyScript:s)}_serializeValue(t){switch(typeof t){case"boolean":return t?"":void 0;default:return null!=t?t.toString():void 0}}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),Fe={};let Pe=HTMLElement.prototype;for(;Pe;){let t=Object.getOwnPropertyNames(Pe);for(let e=0;e<t.length;e++)Fe[t[e]]=!0;Pe=Object.getPrototypeOf(Pe)}const Ee=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,Oe=Gt((t=>{const e=ze(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(ye(t[e]))}static attributeNameForProperty(t){return we(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){switch(typeof t){case"object":if(t instanceof Date)return t.toString();if(t){if(Ee(t))return t;try{return JSON.stringify(t)}catch(t){return""}}default:return super._serializeValue(t)}}_deserializeValue(t,e){let i;switch(e){case Object:try{i=JSON.parse(t)}catch(e){i=t}break;case Array:try{i=JSON.parse(t)}catch(e){i=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:i=isNaN(t)?String(t):Number(t),i=new Date(i);break;default:i=super._deserializeValue(t,e)}return i}_definePropertyAccessor(t,e){!function(t,e){if(!Fe[e]){let i=t[e];void 0!==i&&(t.__data?t._setPendingProperty(e,i):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=i))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),Be={"dom-if":!0,"dom-repeat":!0};let Ie=!1,Ne=!1;const je=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const o=i.getAttribute(s);t&&s.startsWith("on-")?e.setAttribute(s,t.createScript(o,s)):e.setAttribute(s,o)}})();function He(t){let e=t.getAttribute("is");if(e&&Be[e]){let i=t;for(i.removeAttribute("is"),t=i.ownerDocument.createElement(e),i.parentNode.replaceChild(t,i),t.appendChild(i);i.attributes.length;){const{name:e}=i.attributes[0];je(t,i,e),i.removeAttribute(e)}}return t}function Re(t,e){let i=e.parentInfo&&Re(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,s=0;t;t=t.nextSibling)if(e.parentIndex===s++)return t}function We(t,e,i,s){s.id&&(e[s.id]=i)}function Le(t,e,i){if(i.events&&i.events.length)for(let s,o=0,r=i.events;o<r.length&&(s=r[o]);o++)t._addMethodEventListenerToNode(e,s.name,s.value,t)}function Ue(t,e,i,s){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=s)}const $e=Gt((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(e),i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let s=!1,o=t;return"template"!=o.localName||o.hasAttribute("preserve-content")?"slot"===o.localName&&(e.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(o,e,i)||s,function(t){(function(){if(!Ie){Ie=!0;const t=document.createElement("textarea");t.placeholder="a",Ne=t.placeholder===t.textContent}return Ne})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(o),o.firstChild&&this._parseTemplateChildNodes(o,e,i),o.hasAttributes&&o.hasAttributes()&&(s=this._parseTemplateNodeAttributes(o,e,i)||s),s||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let s,o=t.firstChild,r=0;o;o=s){if("template"==o.localName&&(o=He(o)),s=o.nextSibling,o.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)o.textContent+=i.textContent,s=i.nextSibling,t.removeChild(i),i=s;if(e.stripWhiteSpace&&!o.textContent.trim()){t.removeChild(o);continue}}let n={parentIndex:r,parentInfo:i};this._parseTemplateNode(o,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),o.parentNode&&r++}}static _parseTemplateNestedTemplate(t,e,i){let s=t,o=this._parseTemplate(s,e);return(o.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=o,!0}static _parseTemplateNodeAttributes(t,e,i){let s=!1,o=Array.from(t.attributes);for(let r,n=o.length-1;r=o[n];n--)s=this._parseTemplateNodeAttribute(t,e,i,r.name,r.value)||s;return s}static _parseTemplateNodeAttribute(t,e,i,s,o){return"on-"===s.slice(0,3)?(t.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:o}),!0):"id"===s&&(i.id=o,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,s=document.importNode(e.content||t.content,!0);s.__noInsertionPoint=!e.hasInsertionPoint;let o=s.nodeList=new Array(i.length);s.$={};for(let t,r=0,n=i.length;r<n&&(t=i[r]);r++){let i=o[r]=Re(s,t);We(0,s.$,i,t),Ue(0,i,t,e),Le(this,i,t)}return s=s,s}_addMethodEventListenerToNode(t,e,i,s){let o=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(s=s||t,0,i);return this._addEventListenerToNode(t,e,o),o}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
|
|
635
635
|
/**
|
|
636
636
|
* @fileoverview
|
|
637
637
|
* @suppress {checkPrototypalTypes}
|
|
@@ -642,7 +642,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
642
642
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
643
643
|
* Google as part of the polymer project is also subject to an additional IP
|
|
644
644
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
645
|
-
*/let Ye=0;const qe=[],Ve={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Ge=/[A-Z]/;function Je(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function Ke(t,e,i,s,o,r){if(e){let n=!1;const a=Ye++;for(let l in i){let h=e[o?le(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===a||o&&!Xe(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,i,s,e.info,o,r),n=!0)}return n}return!1}function Ze(t,e,i,s,o,r,n,a){let l=!1,h=e[n?le(s):s];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===i||n&&!Xe(s,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,n,a),l=!0);return l}function Xe(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!he(i,t))||!(!e.wildcard||!ce(i,t))}return!0}function Qe(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,n=o.property;r?r.call(t,t.__data[n],s[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function ti(t,e,i){let s=le(e);return s!==e&&(ei(t,we(s)+"-changed",i[e],e),!0)}function ei(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),ne(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function ii(t,e,i,s,o,r){let n=(r?le(e):e)!=e?e:null,a=n?me(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),ei(t,o.eventName,a,n)}function si(t,e,i,s,o){let r=t.__data[e];Bt&&(r=Bt(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const oi=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const n=s+o>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){r=n;break}o=n-1}}r<0&&(r=o+1),e.splice(r,0,t)},ri=(t,e,i,s,o)=>{const r=e[o?le(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun===Ye||o&&!Xe(t,n.trigger)||(n.info.lastRun=Ye,oi(n.info,i,s))}};function ni(t,e,i,s,o){let r=pi(t,e,i,0,o);if(r===qe)return!1;let n=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function ai(t,e,i,s,o,r,n){i.bindings=i.bindings||[];let a={kind:s,target:o,parts:r,literal:n,isCompound:1!==r.length};if(i.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||we(o)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,li(t,e,a,s,l)}}function li(t,e,i,s,o){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let r=s.dependencies,n={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=gi(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:hi,info:n,trigger:s})}}}function hi(t,e,i,s,o,r,n){let a=n[o.index],l=o.binding,h=o.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let s=i[e];e=de(h.source,l.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=o.evaluator._evaluateBinding(t,h,e,i,s,r);n!==qe&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,o,i,s),Bt&&(o=Bt(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?e[Ve.READ_ONLY]&&e[Ve.READ_ONLY][s]||e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,a,l,h,n)}}function ci(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=ne(t)),t[r]=e.literal)}}function di(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,n=t.detail,a=n&&n.path;a?(s=de(i,s,a),r=n&&n.value):r=t.currentTarget[i],r=o?!r:r,e[Ve.READ_ONLY]&&e[Ve.READ_ONLY][s]||!e._setPendingPropertyOrPath(s,r,!0,Boolean(a))||n&&n.queueProperty||e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function ui(t,e,i,s,o,r){let n={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:n,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function pi(t,e,i,s,o){let r=t._methodHost||t,n=r[o.methodName];if(n){let s=t._marshalArgs(o.args,e,i);return s===qe?qe:n.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const mi=[],fi=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?((?:[a-zA-Z_$][\\w.:$\\-*]*)\\s*(?:\\(\\s*(?:(?:(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)(?:,\\s*(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*))*)?)\\)\\s*)?)(?:]]|}})","g");function vi(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function bi(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:mi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=gi(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function gi(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=le(e),i.structured=ae(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function yi(t,e,i){let s=me(t,i);return void 0===s&&(s=e[i]),s}function wi(t,e,i,s){const o={indexSplices:s};Lt&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),Lt&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function _i(t,e,i,s,o,r){wi(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const xi=Gt((t=>{const e=$e(Oe(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return Ve}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(ki.length){let t=ki[ki.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[Ve.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==Ve.READ_ONLY);let s=Je(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=Je(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Ve.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Ve.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Ve.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Ve.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||le(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=me(this,t);if(!(t=fe(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let o;for(let r in s){let n=s[r];ce(r,e)?(o=de(r,n,e),t._setPendingPropertyOrPath(o,i,!0,!0)):ce(n,e)&&(o=de(n,r,e),t._setPendingPropertyOrPath(o,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=ne(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&ae(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[Ve.NOTIFY]&&this[Ve.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)!e&&this[Ve.READ_ONLY]&&this[Ve.READ_ONLY][i]||this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[Ve.COMPUTE];if(o)if(Rt){Ye++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[Ve.COMPUTE];let s,{counts:o,ready:r,total:n}=function(t){const e=t.__computeInfo,i={},s=t[Ve.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--o[e]&&r.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)ri(t,o,n,r,s);let a;for(;a=n.shift();)ni(t,"",e,0,a)&&ri(a.methodInfo,o,n,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;Ke(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),Ke(this,this[Ve.REFLECT],e,i,o),Ke(this,this[Ve.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,n,a=t[Ve.NOTIFY],l=Ye++;for(let n in e)e[n]&&(a&&Ze(t,a,l,n,i,s,o)||o&&ti(t,n,i))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[Ve.PROPAGATE]&&Ke(this,this[Ve.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{Ke(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=ue(t),e=ue(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=ue(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};wi(this,me(this,t,i),i.path,e)}get(t,e){return me(e||this,t)}set(t,e,i){i?fe(i,t,e):this[Ve.READ_ONLY]&&this[Ve.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=me(this,t,i),o=s.length,r=s.push(...e);return e.length&&_i(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=me(this,t,e),s=Boolean(i.length),o=i.pop();return s&&_i(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},n=me(this,t,r);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||o.length)&&_i(this,n,r.path,e,s.length,o),o}shift(t){let e={path:""},i=me(this,t,e),s=Boolean(i.length),o=i.shift();return s&&_i(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=me(this,t,i),o=s.unshift(...e);return e.length&&_i(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=me(this,t,s),i=s.path}else i=Array.isArray(t)?ue(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,Ve.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,Ve.OBSERVE,{fn:Qe,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,Ve.OBSERVE,{fn:Qe,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=bi(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");ui(this,i,Ve.OBSERVE,pi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Ve.NOTIFY,{fn:ii,info:{eventName:we(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,Ve.REFLECT,{fn:si,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=bi(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=ui(this,s,Ve.COMPUTE,ni,t,i);Je(this,"__computeInfo")[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,n=t.length;r<n;r++){let{name:n,structured:a,wildcard:l,value:h,literal:c}=t[r];if(!c)if(l){const t=ce(n,e),o=yi(s,i,t?e:n);h={path:t?e:n,value:o,base:t?me(s,n):o}}else h=a?yi(s,i,n):s[n];if(Lt&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return qe;o[r]=h}return o}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),ki.push(this);let i=super._stampTemplate(t,e);if(ki.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];ci(o,i),di(o,t,i)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];ne(ne(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=vi(e)||" ",ai(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let n=this._parseBindings(r,i);if(n){let e=o,r="property";Ge.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let a=vi(n);return a&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(o)),t.setAttribute(o,a)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=ye(o)),ai(this,i,s,r,o,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,n=s.templateInfo,a="dom-if"===r.localName;Ut&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,o=!1);let l=n.hostProps;if($t&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),Ut||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)ai(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=fi.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],n=Boolean(i[2]),a=i[3].trim(),l=!1,h="",c=-1;"{"==r&&(c=a.indexOf("::"))>0&&(h=a.substring(c+2),a=a.substring(0,c),l=!0);let d=bi(a),u=[];if(d){let{args:t,methodName:i}=d;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(a);s.push({source:a,mode:r,negate:n,customEvent:l,signature:d,dependencies:u,event:h}),o=fi.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let n;return n=e.signature?pi(t,i,s,0,e.signature):i!=e.source?me(t,e.source):r&&ae(i)?me(t,i):t.__data[i],e.negate&&(n=!n),n}}})),ki=[],Ai=Gt((t=>{const e=ze(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
645
|
+
*/let Ye=0;const qe=[],Ve={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Ge=/[A-Z]/;function Je(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function Ke(t,e,i,s,o,r){if(e){let n=!1;const a=Ye++;for(let l in i){let h=e[o?le(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===a||o&&!Xe(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,i,s,e.info,o,r),n=!0)}return n}return!1}function Ze(t,e,i,s,o,r,n,a){let l=!1,h=e[n?le(s):s];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===i||n&&!Xe(s,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,n,a),l=!0);return l}function Xe(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!he(i,t))||!(!e.wildcard||!ce(i,t))}return!0}function Qe(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,n=o.property;r?r.call(t,t.__data[n],s[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function ti(t,e,i){let s=le(e);return s!==e&&(ei(t,we(s)+"-changed",i[e],e),!0)}function ei(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),ne(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function ii(t,e,i,s,o,r){let n=(r?le(e):e)!=e?e:null,a=n?me(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),ei(t,o.eventName,a,n)}function si(t,e,i,s,o){let r=t.__data[e];Bt&&(r=Bt(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const oi=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const n=s+o>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){r=n;break}o=n-1}}r<0&&(r=o+1),e.splice(r,0,t)},ri=(t,e,i,s,o)=>{const r=e[o?le(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun===Ye||o&&!Xe(t,n.trigger)||(n.info.lastRun=Ye,oi(n.info,i,s))}};function ni(t,e,i,s,o){let r=pi(t,e,i,0,o);if(r===qe)return!1;let n=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function ai(t,e,i,s,o,r,n){i.bindings=i.bindings||[];let a={kind:s,target:o,parts:r,literal:n,isCompound:1!==r.length};if(i.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||we(o)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,li(t,e,a,s,l)}}function li(t,e,i,s,o){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let r=s.dependencies,n={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=gi(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:hi,info:n,trigger:s})}}}function hi(t,e,i,s,o,r,n){let a=n[o.index],l=o.binding,h=o.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let s=i[e];e=de(h.source,l.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=o.evaluator._evaluateBinding(t,h,e,i,s,r);n!==qe&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,o,i,s),Bt&&(o=Bt(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?e[Ve.READ_ONLY]&&e[Ve.READ_ONLY][s]||e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,a,l,h,n)}}function ci(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=ne(t)),t[r]=e.literal)}}function di(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,n=t.detail,a=n&&n.path;a?(s=de(i,s,a),r=n&&n.value):r=t.currentTarget[i],r=o?!r:r,e[Ve.READ_ONLY]&&e[Ve.READ_ONLY][s]||!e._setPendingPropertyOrPath(s,r,!0,Boolean(a))||n&&n.queueProperty||e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function ui(t,e,i,s,o,r){let n={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:n,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function pi(t,e,i,s,o){let r=t._methodHost||t,n=r[o.methodName];if(n){let s=t._marshalArgs(o.args,e,i);return s===qe?qe:n.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const mi=[],fi=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?((?:[a-zA-Z_$][\\w.:$\\-*]*)\\s*(?:\\(\\s*(?:(?:(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)(?:,\\s*(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*))*)?)\\)\\s*)?)(?:]]|}})","g");function vi(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function bi(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:mi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=gi(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function gi(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=le(e),i.structured=ae(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function yi(t,e,i){let s=me(t,i);return void 0===s&&(s=e[i]),s}function wi(t,e,i,s){const o={indexSplices:s};Wt&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),Wt&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function _i(t,e,i,s,o,r){wi(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const xi=Gt((t=>{const e=$e(Oe(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return Ve}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(ki.length){let t=ki[ki.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[Ve.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==Ve.READ_ONLY);let s=Je(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=Je(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Ve.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Ve.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Ve.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Ve.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||le(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=me(this,t);if(!(t=fe(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let o;for(let r in s){let n=s[r];ce(r,e)?(o=de(r,n,e),t._setPendingPropertyOrPath(o,i,!0,!0)):ce(n,e)&&(o=de(n,r,e),t._setPendingPropertyOrPath(o,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=ne(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&ae(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[Ve.NOTIFY]&&this[Ve.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)!e&&this[Ve.READ_ONLY]&&this[Ve.READ_ONLY][i]||this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[Ve.COMPUTE];if(o)if(Lt){Ye++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[Ve.COMPUTE];let s,{counts:o,ready:r,total:n}=function(t){const e=t.__computeInfo,i={},s=t[Ve.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--o[e]&&r.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)ri(t,o,n,r,s);let a;for(;a=n.shift();)ni(t,"",e,0,a)&&ri(a.methodInfo,o,n,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;Ke(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),Ke(this,this[Ve.REFLECT],e,i,o),Ke(this,this[Ve.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,n,a=t[Ve.NOTIFY],l=Ye++;for(let n in e)e[n]&&(a&&Ze(t,a,l,n,i,s,o)||o&&ti(t,n,i))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[Ve.PROPAGATE]&&Ke(this,this[Ve.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{Ke(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=ue(t),e=ue(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=ue(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};wi(this,me(this,t,i),i.path,e)}get(t,e){return me(e||this,t)}set(t,e,i){i?fe(i,t,e):this[Ve.READ_ONLY]&&this[Ve.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=me(this,t,i),o=s.length,r=s.push(...e);return e.length&&_i(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=me(this,t,e),s=Boolean(i.length),o=i.pop();return s&&_i(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},n=me(this,t,r);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||o.length)&&_i(this,n,r.path,e,s.length,o),o}shift(t){let e={path:""},i=me(this,t,e),s=Boolean(i.length),o=i.shift();return s&&_i(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=me(this,t,i),o=s.unshift(...e);return e.length&&_i(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=me(this,t,s),i=s.path}else i=Array.isArray(t)?ue(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,Ve.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,Ve.OBSERVE,{fn:Qe,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,Ve.OBSERVE,{fn:Qe,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=bi(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");ui(this,i,Ve.OBSERVE,pi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Ve.NOTIFY,{fn:ii,info:{eventName:we(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,Ve.REFLECT,{fn:si,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=bi(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=ui(this,s,Ve.COMPUTE,ni,t,i);Je(this,"__computeInfo")[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,n=t.length;r<n;r++){let{name:n,structured:a,wildcard:l,value:h,literal:c}=t[r];if(!c)if(l){const t=ce(n,e),o=yi(s,i,t?e:n);h={path:t?e:n,value:o,base:t?me(s,n):o}}else h=a?yi(s,i,n):s[n];if(Wt&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return qe;o[r]=h}return o}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),ki.push(this);let i=super._stampTemplate(t,e);if(ki.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];ci(o,i),di(o,t,i)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];ne(ne(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=vi(e)||" ",ai(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let n=this._parseBindings(r,i);if(n){let e=o,r="property";Ge.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let a=vi(n);return a&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(o)),t.setAttribute(o,a)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=ye(o)),ai(this,i,s,r,o,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,n=s.templateInfo,a="dom-if"===r.localName;Ut&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,o=!1);let l=n.hostProps;if($t&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),Ut||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)ai(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=fi.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],n=Boolean(i[2]),a=i[3].trim(),l=!1,h="",c=-1;"{"==r&&(c=a.indexOf("::"))>0&&(h=a.substring(c+2),a=a.substring(0,c),l=!0);let d=bi(a),u=[];if(d){let{args:t,methodName:i}=d;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(a);s.push({source:a,mode:r,negate:n,customEvent:l,signature:d,dependencies:u,event:h}),o=fi.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let n;return n=e.signature?pi(t,i,s,0,e.signature):i!=e.source?me(t,e.source):r&&ae(i)?me(t,i):t.__data[i],e.negate&&(n=!n),n}}})),ki=[],Ai=Gt((t=>{const e=ze(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
646
646
|
/**
|
|
647
647
|
@license
|
|
648
648
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -652,7 +652,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
652
652
|
Code distributed by Google as part of the polymer project is also
|
|
653
653
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
654
654
|
*/
|
|
655
|
-
function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class o extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return o})),Ci=window.ShadyCSS&&window.ShadyCSS.cssBuild,Di=Gt((t=>{const e=Ai(xi(t));function i(t,e,i,s){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,s)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,s[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.1"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):jt||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let s=0;s<t.length;s++)i._createMethodObserver(t[s],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!Nt
|
|
655
|
+
function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class o extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return o})),Ci=window.ShadyCSS&&window.ShadyCSS.cssBuild,Di=Gt((t=>{const e=Ai(xi(t));function i(t,e,i,s){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,s)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,s[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.1"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):jt||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let s=0;s<t.length;s++)i._createMethodObserver(t[s],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!It||Nt)&&(e=Qt.import(t,"template"),It&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=Ft(t.url);else{const t=Qt.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super()}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=Ot,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let i in e){let s=e[i];"value"in s&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=s)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let i=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof i.value?i.value.call(this):i.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return zt(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const i=this.importPath;(function(t,e,i,s){if(!Ci){const o=e.content.querySelectorAll("style"),r=oe(e),n=function(t){let e=te(t);return e?re(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let o=n[i];o.textContent=t._processStyleText(o.textContent,s),e.content.insertBefore(o,a)}let l=0;for(let e=0;e<r.length;e++){let i=r[e],n=o[l];n!==i?(i=i.cloneNode(!0),n.parentNode.insertBefore(i,n)):l++,i.textContent=t._processStyleText(i.textContent,s)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),qt&&Ci&&Et){const i=e.content.querySelectorAll("style");if(i){let e="";Array.from(i).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}})(this,e,t,i?Mt(i):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=ne(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),Rt&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=Mt(this.importPath)),Mt(t,e)}static _parseTemplateContent(t,i,s){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,s)}static _addTemplatePropertyEffect(t,i,s){return!Ht||i in this._properties||s.info.part.signature&&s.info.part.signature.static||s.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${i}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,i,s)}}})),Ti=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Si{constructor(t,e){Fi(t,e);const i=e.reduce(((e,i,s)=>e+Mi(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Mi(t){if(t instanceof Si)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const zi=function(t,...e){Fi(t,e);const i=document.createElement("template");let s=e.reduce(((e,i,s)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof Si)return Mi(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return Ti&&(s=Ti.createHTML(s)),i.innerHTML=s,i},Fi=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},Pi=Di(HTMLElement);
|
|
656
656
|
/**
|
|
657
657
|
* @license
|
|
658
658
|
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
@@ -663,7 +663,7 @@ class Ei{static detectScrollType(){const t=document.createElement("div");t.textC
|
|
|
663
663
|
* @license
|
|
664
664
|
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
665
665
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
666
|
-
*/const Oi=[];let Bi;function
|
|
666
|
+
*/const Oi=[];let Bi;function Ii(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function Ni(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=Ni();Oi.forEach((e=>{Ii(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const ji=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}static finalize(){super.finalize(),Bi||(Bi=Ei.detectScrollType())}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")||(this.__subscribe(),Ii(this,Ni(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const s=Ni(),o=i===s&&-1===Oi.indexOf(this),r=!i&&e&&-1===Oi.indexOf(this),n=i!==s&&e===s;o||r?(this.__subscribe(),Ii(this,s,i)):n&&this.__subscribe(!1)}disconnectedCallback(){super.disconnectedCallback(),this.__subscribe(!1),this.removeAttribute("dir")}_valueToNodeAttribute(t,e,i){("dir"!==i||""!==e||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,e,i)}_attributeToProperty(t,e,i){"dir"!==t||e?super._attributeToProperty(t,e,i):this.dir=""}__subscribe(t=!0){t?Oi.includes(this)||Oi.push(this):Oi.includes(this)&&Oi.splice(Oi.indexOf(this),1)}__getNormalizedScrollLeft(t){return Ei.getNormalizedScrollLeft(Bi,this.getAttribute("dir")||"ltr",t)}__setNormalizedScrollLeft(t,e){return Ei.setNormalizedScrollLeft(Bi,this.getAttribute("dir")||"ltr",t,e)}}
|
|
667
667
|
/**
|
|
668
668
|
* @license
|
|
669
669
|
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
@@ -720,19 +720,19 @@ class Ei{static detectScrollType(){const t=document.createElement("div");t.textC
|
|
|
720
720
|
<slot name="prefix"></slot>
|
|
721
721
|
<slot></slot>
|
|
722
722
|
<slot name="suffix"></slot>
|
|
723
|
-
`}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",(t=>{t.target===this&&t.preventDefault()})),this.addEventListener("click",(t=>{t.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach((t=>t.focus&&t.focus()))}))}}customElements.define(Hi.is,Hi);const
|
|
723
|
+
`}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",(t=>{t.target===this&&t.preventDefault()})),this.addEventListener("click",(t=>{t.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach((t=>t.focus&&t.focus()))}))}}customElements.define(Hi.is,Hi);const Ri=u`
|
|
724
724
|
/* Needed for Safari, where ::slotted(...)::placeholder does not work */
|
|
725
725
|
:is(input[slot='input'], textarea[slot='textarea'])::placeholder {
|
|
726
726
|
font: inherit;
|
|
727
727
|
color: inherit;
|
|
728
728
|
}
|
|
729
|
-
`,
|
|
729
|
+
`,Wi=document.createElement("template");Wi.innerHTML=`<style>${Ri.toString()}</style>`,document.head.appendChild(Wi.content);
|
|
730
730
|
/**
|
|
731
731
|
* @license
|
|
732
732
|
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
733
733
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
734
734
|
*/
|
|
735
|
-
const
|
|
735
|
+
const Li=u`
|
|
736
736
|
:host {
|
|
737
737
|
/* Square */
|
|
738
738
|
--lumo-space-xs: 0.25rem;
|
|
@@ -755,7 +755,7 @@ const Ri=u`
|
|
|
755
755
|
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
756
756
|
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
757
757
|
}
|
|
758
|
-
`,Ui=document.createElement("template");Ui.innerHTML=`<style>${
|
|
758
|
+
`,Ui=document.createElement("template");Ui.innerHTML=`<style>${Li.toString().replace(":host","html")}</style>`,document.head.appendChild(Ui.content);
|
|
759
759
|
/**
|
|
760
760
|
* @license
|
|
761
761
|
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
@@ -871,7 +871,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
871
871
|
Code distributed by Google as part of the polymer project is also
|
|
872
872
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
873
873
|
*/
|
|
874
|
-
let ss=null;function os(){return ss}os.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:os,writable:!0}});const rs=xi(os),ns=es(rs),as=xi(class{});class ls extends as{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let t=this.root.firstChild;t;t=t.nextSibling)e.push(t),t.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let i=this.__templatizeOptions;(t&&i.instanceProps||!i.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let e in t)this._setPendingProperty(e,t[e])}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,e,i){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,(t=>{t.model=this,i(t)}));else{let s=this.__dataHost.__dataHost;s&&s._addEventListenerToNode(t,e,i)}}_showHideChildren(t){!function(t,e){for(let i=0;i<e.length;i++){let s=e[i];if(Boolean(t)!=Boolean(s.__hideTemplateChildren__))if(s.nodeType===Node.TEXT_NODE)t?(s.__polymerTextContent__=s.textContent,s.textContent=""):s.textContent=s.__polymerTextContent__;else if("slot"===s.localName)if(t)s.__polymerReplaced__=document.createComment("hidden-slot"),ne(ne(s).parentNode).replaceChild(s.__polymerReplaced__,s);else{const t=s.__polymerReplaced__;t&&ne(ne(t).parentNode).replaceChild(s,t)}else s.style&&(t?(s.__polymerDisplay__=s.style.display,s.style.display="none"):s.style.display=s.__polymerDisplay__);s.__hideTemplateChildren__=t,s._showHideChildren&&s._showHideChildren(t)}}(t,this.children)}_setUnmanagedPropertyToNode(t,e,i){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&"textContent"==e?t.__polymerTextContent__=i:super._setUnmanagedPropertyToNode(t,e,i)}get parentModel(){let t=this.__parentModel;if(!t){let e;t=this;do{t=t.__dataHost.__dataHost}while((e=t.__templatizeOptions)&&!e.parentModel);this.__parentModel=t}return t}dispatchEvent(t){return!0}}const hs=es(ls);function cs(t){let e=t.__dataHost;return e&&e._methodHost||e}function ds(t,e){return function(t,i,s){e.call(t.__templatizeOwner,i.substring("_host_".length),s[i])}}function us(t,e){return function(t,i,s){e.call(t.__templatizeOwner,t,i,s[i])}}function ps(t,e,i){if(
|
|
874
|
+
let ss=null;function os(){return ss}os.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:os,writable:!0}});const rs=xi(os),ns=es(rs),as=xi(class{});class ls extends as{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let t=this.root.firstChild;t;t=t.nextSibling)e.push(t),t.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let i=this.__templatizeOptions;(t&&i.instanceProps||!i.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let e in t)this._setPendingProperty(e,t[e])}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,e,i){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,(t=>{t.model=this,i(t)}));else{let s=this.__dataHost.__dataHost;s&&s._addEventListenerToNode(t,e,i)}}_showHideChildren(t){!function(t,e){for(let i=0;i<e.length;i++){let s=e[i];if(Boolean(t)!=Boolean(s.__hideTemplateChildren__))if(s.nodeType===Node.TEXT_NODE)t?(s.__polymerTextContent__=s.textContent,s.textContent=""):s.textContent=s.__polymerTextContent__;else if("slot"===s.localName)if(t)s.__polymerReplaced__=document.createComment("hidden-slot"),ne(ne(s).parentNode).replaceChild(s.__polymerReplaced__,s);else{const t=s.__polymerReplaced__;t&&ne(ne(t).parentNode).replaceChild(s,t)}else s.style&&(t?(s.__polymerDisplay__=s.style.display,s.style.display="none"):s.style.display=s.__polymerDisplay__);s.__hideTemplateChildren__=t,s._showHideChildren&&s._showHideChildren(t)}}(t,this.children)}_setUnmanagedPropertyToNode(t,e,i){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&"textContent"==e?t.__polymerTextContent__=i:super._setUnmanagedPropertyToNode(t,e,i)}get parentModel(){let t=this.__parentModel;if(!t){let e;t=this;do{t=t.__dataHost.__dataHost}while((e=t.__templatizeOptions)&&!e.parentModel);this.__parentModel=t}return t}dispatchEvent(t){return!0}}const hs=es(ls);function cs(t){let e=t.__dataHost;return e&&e._methodHost||e}function ds(t,e){return function(t,i,s){e.call(t.__templatizeOwner,i.substring("_host_".length),s[i])}}function us(t,e){return function(t,i,s){e.call(t.__templatizeOwner,t,i,s[i])}}function ps(t,e,i){if(It&&!cs(t))throw new Error("strictTemplatePolicy: template owner not trusted");if(i=i||{},t.__templatizeOwner)throw new Error("A <template> can only be templatized once");t.__templatizeOwner=e;let s=(e?e.constructor:ls)._parseTemplate(t),o=s.templatizeInstanceClass;o||(o=function(t,e,i){let s=i.mutableData?hs:ls;ps.mixin&&(s=ps.mixin(s));let o=class extends s{};return o.prototype.__templatizeOptions=i,o.prototype._bindTemplate(t),function(t,e,i,s){let o=i.hostProps||{};for(let e in s.instanceProps){delete o[e];let i=s.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:us(0,i)})}if(s.forwardHostProp&&e.__dataHost)for(let e in o)i.hasHostProps||(i.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0)}})}(o,t,e,i),o}(t,s,i),s.templatizeInstanceClass=o);const r=cs(t);!function(t,e,i,s){let o=i.forwardHostProp;if(o&&e.hasHostProps){const a="template"==t.localName;let l=e.templatizeTemplateClass;if(!l){if(a){let t=i.mutableData?ns:rs;class s extends t{}l=e.templatizeTemplateClass=s}else{const i=t.constructor;class s extends i{}l=e.templatizeTemplateClass=s}let r=e.hostProps;for(let t in r)l.prototype._addPropertyEffect("_host_"+t,l.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:ds(0,o)}),l.prototype._createNotifyingProperty("_host_"+t);Ht&&s&&function(t,e,i){const s=i.constructor._properties,{propertyEffects:o}=t,{instanceProps:r}=e;for(let t in o)if(!(s[t]||r&&r[t])){const e=o[t];for(let i=0;i<e.length;i++){const{part:s}=e[i].info;if(!s.signature||!s.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,i,s)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),a)n=l,ss=r=t,Object.setPrototypeOf(r,n.prototype),new n,ss=null,t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties();else{Object.setPrototypeOf(t,l.prototype);const i=e.hostProps;for(let e in i)if(e="_host_"+e,e in t){const i=t[e];delete t[e],t.__data[e]=i}}}var r,n}(t,s,i,r);let n=class extends o{};return n.prototype._methodHost=r,n.prototype.__dataHost=t,n.prototype.__templatizeOwner=e,n.prototype.__hostProps=s.hostProps,n=n,n}
|
|
875
875
|
/**
|
|
876
876
|
* @license
|
|
877
877
|
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
@@ -1380,7 +1380,7 @@ const Ts=u`
|
|
|
1380
1380
|
* Code distributed by Google as part of the polymer project is also
|
|
1381
1381
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1382
1382
|
*/
|
|
1383
|
-
let Es=0,Os=0;const Bs=[];let
|
|
1383
|
+
let Es=0,Os=0;const Bs=[];let Is=0,Ns=!1;const js=document.createTextNode("");new window.MutationObserver((function(){Ns=!1;const t=Bs.length;for(let e=0;e<t;e++){const t=Bs[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Bs.splice(0,t),Os+=t})).observe(js,{characterData:!0});const Hs={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Rs={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},Ws={run(t){Ns||(Ns=!0,js.textContent=Is,Is+=1),Bs.push(t);const e=Es;return Es+=1,e},cancel(t){const e=t-Os;if(e>=0){if(!Bs[e])throw new Error(`invalid async handle: ${t}`);Bs[e]=null}}};
|
|
1384
1384
|
/**
|
|
1385
1385
|
@license
|
|
1386
1386
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1390,13 +1390,13 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
1390
1390
|
Code distributed by Google as part of the polymer project is also
|
|
1391
1391
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1392
1392
|
*/
|
|
1393
|
-
class
|
|
1393
|
+
class Ls{static debounce(t,e,i){return t instanceof Ls?t._cancelAsync():t=new Ls,t.setConfig(e,i),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,$s.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),$s.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}}let Us,$s=new Set;
|
|
1394
1394
|
/**
|
|
1395
1395
|
* @license
|
|
1396
1396
|
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
1397
1397
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1398
1398
|
*/
|
|
1399
|
-
window.Vaadin=window.Vaadin||{},window.Vaadin.registrations=window.Vaadin.registrations||[],window.Vaadin.developmentModeCallback=window.Vaadin.developmentModeCallback||{},window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){!function(t,e){if(window.Vaadin.developmentMode)Fs(t,e)}(Ps)};const Ys=new Set,qs=t=>class extends(ji(t)){static get version(){return"23.1.5"}static finalize(){super.finalize();const{is:t}=this;t&&!Ys.has(t)&&(window.Vaadin.registrations.push(this),Ys.add(t),window.Vaadin.developmentModeCallback&&(Us=
|
|
1399
|
+
window.Vaadin=window.Vaadin||{},window.Vaadin.registrations=window.Vaadin.registrations||[],window.Vaadin.developmentModeCallback=window.Vaadin.developmentModeCallback||{},window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){!function(t,e){if(window.Vaadin.developmentMode)Fs(t,e)}(Ps)};const Ys=new Set,qs=t=>class extends(ji(t)){static get version(){return"23.1.5"}static finalize(){super.finalize();const{is:t}=this;t&&!Ys.has(t)&&(window.Vaadin.registrations.push(this),Ys.add(t),window.Vaadin.developmentModeCallback&&(Us=Ls.debounce(Us,Rs,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),$s.add(Us)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
|
|
1400
1400
|
/**
|
|
1401
1401
|
@license
|
|
1402
1402
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1405,7 +1405,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1405
1405
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1406
1406
|
Code distributed by Google as part of the polymer project is also
|
|
1407
1407
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1408
|
-
*/,Vs="string"==typeof document.head.style.touchAction,Gs="__polymerGesturesHandled",Js="__polymerGesturesTouchAction",Ks=["mousedown","mousemove","mouseup","click"],Zs=[0,1,4,2],Xs=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function Qs(t){return Ks.indexOf(t)>-1}let to=!1;!function(){try{const t=Object.defineProperty({},"passive",{get(){to=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const eo=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),io={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function so(t){const e=t.type;if(!Qs(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!Xs&&(e=Zs[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const oo={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function ro(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function no(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const ao=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],lo={},ho=[];function co(t){const e=ao(t);return e.length>0?e[0]:t.target}function uo(t){const e=t.type,i=t.currentTarget.__polymerGestures;if(!i)return;const s=i[e];if(!s)return;if(!t[Gs]&&(t[Gs]={},"touch"===e.slice(0,5))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(oo.touch.id=i.identifier),oo.touch.id!==i.identifier)return;Vs||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)oo.touch.x=e.clientX,oo.touch.y=e.clientY,oo.touch.scrollDecided=!1;else if("touchmove"===i){if(oo.touch.scrollDecided)return;oo.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=ao(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[Js]){e=t[Js];break}return e}(t);let s=!1;const o=Math.abs(oo.touch.x-e.clientX),r=Math.abs(oo.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=r>o:"pan-y"===i&&(s=o>r)),s?t.preventDefault():bo("track")}}(t)}const o=t[Gs];if(!o.skip){for(let e,i=0;i<ho.length;i++)e=ho[i],s[e.name]&&!o[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,r=0;r<ho.length;r++)i=ho[r],s[i.name]&&!o[i.name]&&(o[i.name]=!0,i[e](t))}}function po(t,e,i){return!!lo[e]&&(function(t,e,i){const s=lo[e],o=s.deps,r=s.name;let n=t.__polymerGestures;n||(t.__polymerGestures=n={});for(let e,i,s=0;s<o.length;s++)e=o[s],eo&&Qs(e)&&"click"!==e||(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,uo,void Qs(e)),i[r]=(i[r]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),s.touchAction&&fo(t,s.touchAction)}(t,e,i),!0)}function mo(t){ho.push(t);for(let e=0;e<t.emits.length;e++)lo[t.emits[e]]=t}function fo(t,e){Vs&&t instanceof HTMLElement&&
|
|
1408
|
+
*/,Vs="string"==typeof document.head.style.touchAction,Gs="__polymerGesturesHandled",Js="__polymerGesturesTouchAction",Ks=["mousedown","mousemove","mouseup","click"],Zs=[0,1,4,2],Xs=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function Qs(t){return Ks.indexOf(t)>-1}let to=!1;!function(){try{const t=Object.defineProperty({},"passive",{get(){to=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const eo=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),io={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function so(t){const e=t.type;if(!Qs(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!Xs&&(e=Zs[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const oo={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function ro(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function no(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const ao=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],lo={},ho=[];function co(t){const e=ao(t);return e.length>0?e[0]:t.target}function uo(t){const e=t.type,i=t.currentTarget.__polymerGestures;if(!i)return;const s=i[e];if(!s)return;if(!t[Gs]&&(t[Gs]={},"touch"===e.slice(0,5))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(oo.touch.id=i.identifier),oo.touch.id!==i.identifier)return;Vs||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)oo.touch.x=e.clientX,oo.touch.y=e.clientY,oo.touch.scrollDecided=!1;else if("touchmove"===i){if(oo.touch.scrollDecided)return;oo.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=ao(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[Js]){e=t[Js];break}return e}(t);let s=!1;const o=Math.abs(oo.touch.x-e.clientX),r=Math.abs(oo.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=r>o:"pan-y"===i&&(s=o>r)),s?t.preventDefault():bo("track")}}(t)}const o=t[Gs];if(!o.skip){for(let e,i=0;i<ho.length;i++)e=ho[i],s[e.name]&&!o[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,r=0;r<ho.length;r++)i=ho[r],s[i.name]&&!o[i.name]&&(o[i.name]=!0,i[e](t))}}function po(t,e,i){return!!lo[e]&&(function(t,e,i){const s=lo[e],o=s.deps,r=s.name;let n=t.__polymerGestures;n||(t.__polymerGestures=n={});for(let e,i,s=0;s<o.length;s++)e=o[s],eo&&Qs(e)&&"click"!==e||(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,uo,void Qs(e)),i[r]=(i[r]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),s.touchAction&&fo(t,s.touchAction)}(t,e,i),!0)}function mo(t){ho.push(t);for(let e=0;e<t.emits.length;e++)lo[t.emits[e]]=t}function fo(t,e){Vs&&t instanceof HTMLElement&&Ws.run((()=>{t.style.touchAction=e})),t[Js]=e}function vo(t,e,i){const s=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,t.dispatchEvent(s),s.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function bo(t){const e=function(t){for(let e,i=0;i<ho.length;i++){e=ho[i];for(let i,s=0;s<e.emits.length;s++)if(i=e.emits[s],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function go(t,e,i,s){e&&vo(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:t=>bo(t)})}function yo(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const s=Math.abs(t.x-e),o=Math.abs(t.y-i);return s>=5||o>=5}function wo(t,e,i){if(!e)return;const s=t.moves[t.moves.length-2],o=t.moves[t.moves.length-1];let r,n=0;s&&(r=o.x-s.x,n=o.y-s.y),vo(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:o.x-t.x,dy:o.y-t.y,ddx:r,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM;){const o=s;if(s=s.shadowRoot.elementFromPoint(t,e),o===s)break;s&&(i=s)}return i}(i.clientX,i.clientY)})}function _o(t,e,i){const s=Math.abs(e.clientX-t.x),o=Math.abs(e.clientY-t.y),r=co(i||e);!r||io[r.localName]&&r.hasAttribute("disabled")||(isNaN(s)||isNaN(o)||s<=25&&o<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=co(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),s=t.pageX,o=t.pageY;return!(s>=i.left&&s<=i.right&&o>=i.top&&o<=i.bottom)}return!1}(e))&&(t.prevent||vo(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
|
|
1409
1409
|
/**
|
|
1410
1410
|
* @license
|
|
1411
1411
|
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
@@ -2192,7 +2192,7 @@ const Bo=[Oo,Po,Eo,u`
|
|
|
2192
2192
|
* Google as part of the polymer project is also subject to an additional IP
|
|
2193
2193
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2194
2194
|
*/
|
|
2195
|
-
const
|
|
2195
|
+
const Io=Gt((t=>{const e=Di(t);let i=(t=>{for(;t;){const e=Object.getOwnPropertyDescriptor(t,"observedAttributes");if(e)return e.get;t=Object.getPrototypeOf(t.prototype).constructor}return()=>[]})(e);return class extends e{constructor(){super()}static get observedAttributes(){return i.call(this).concat("disable-upgrade")}_initializeProperties(){this.hasAttribute("disable-upgrade")?this.__isUpgradeDisabled=!0:super._initializeProperties()}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(t){return super._canApplyPropertyDefault(t)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(t))}attributeChangedCallback(t,e,i,s){"disable-upgrade"==t?this.__isUpgradeDisabled&&null==i&&(super._initializeProperties(),this.__isUpgradeDisabled=!1,ne(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(t,e,i,s)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}})),No={start:"top",end:"bottom"},jo={start:"left",end:"right"},Ho=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.addEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes=
|
|
2196
2196
|
/**
|
|
2197
2197
|
* @license
|
|
2198
2198
|
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
@@ -2203,12 +2203,12 @@ function(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);br
|
|
|
2203
2203
|
* @license
|
|
2204
2204
|
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
2205
2205
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2206
|
-
*/(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this._updatePosition,!0)}))}__removeUpdatePositionEventListeners(){window.removeEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this._updatePosition,!0)})),this.__positionTargetAncestorRootNodes=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),t&&e&&this.__addUpdatePositionEventListeners(),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this.setAttribute("dir",t.direction),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}get __isRTL(){return"rtl"===this.getAttribute("dir")}__positionSettingsChanged(){this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened)return;const t=this.positionTarget.getBoundingClientRect(),e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__shouldAlignStartHorizontally(t,this.__isRTL),s=!this.__isRTL&&i||this.__isRTL&&!i;this.style.alignItems=s?"flex-start":"flex-end";const o=this.getBoundingClientRect(),r=this.__calculatePositionInOneDimension(t,o,this.noVerticalOverlap,
|
|
2206
|
+
*/(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this._updatePosition,!0)}))}__removeUpdatePositionEventListeners(){window.removeEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this._updatePosition,!0)})),this.__positionTargetAncestorRootNodes=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),t&&e&&this.__addUpdatePositionEventListeners(),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this.setAttribute("dir",t.direction),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}get __isRTL(){return"rtl"===this.getAttribute("dir")}__positionSettingsChanged(){this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened)return;const t=this.positionTarget.getBoundingClientRect(),e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__shouldAlignStartHorizontally(t,this.__isRTL),s=!this.__isRTL&&i||this.__isRTL&&!i;this.style.alignItems=s?"flex-start":"flex-end";const o=this.getBoundingClientRect(),r=this.__calculatePositionInOneDimension(t,o,this.noVerticalOverlap,No,this,e),n=this.__calculatePositionInOneDimension(t,o,this.noHorizontalOverlap,jo,this,i);Object.assign(this.style,r,n),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!s),this.toggleAttribute("start-aligned",s)}__shouldAlignStartHorizontally(t,e){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const s=Math.min(window.innerWidth,document.documentElement.clientWidth);return this.__shouldAlignStart(t,i,s,this.__margins,!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign,this.noHorizontalOverlap,jo)}__shouldAlignStartVertically(t){const e=Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight);return this.__shouldAlignStart(t,e,i,this.__margins,"top"===this.verticalAlign,this.noVerticalOverlap,No)}__shouldAlignStart(t,e,i,s,o,r,n){const a=i-t[r?n.end:n.start]-s[n.end],l=t[r?n.start:n.end]-s[n.start],h=o?a:l;return o===(h>(o?l:a)||h>e)}__calculatePositionInOneDimension(t,e,i,s,o,r){const n=r?s.start:s.end,a=r?s.end:s.start;return{[n]:`${parseFloat(o.style[n]||getComputedStyle(o)[n])+(e[r?s.start:s.end]-t[i===r?s.end:s.start])*(r?-1:1)}px`,[a]:""}}}
|
|
2207
2207
|
/**
|
|
2208
2208
|
* @license
|
|
2209
2209
|
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2210
2210
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2211
|
-
*/,
|
|
2211
|
+
*/,Ro=u`
|
|
2212
2212
|
:host([dir='rtl']) [part='input-field'] {
|
|
2213
2213
|
direction: ltr;
|
|
2214
2214
|
}
|
|
@@ -2222,7 +2222,7 @@ function(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);br
|
|
|
2222
2222
|
direction: rtl;
|
|
2223
2223
|
text-align: left;
|
|
2224
2224
|
}
|
|
2225
|
-
`;let
|
|
2225
|
+
`;let Wo;
|
|
2226
2226
|
/**
|
|
2227
2227
|
* @license
|
|
2228
2228
|
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
@@ -2237,7 +2237,7 @@ ht("vaadin-date-picker-overlay",u`
|
|
|
2237
2237
|
[part~='content'] {
|
|
2238
2238
|
flex: auto;
|
|
2239
2239
|
}
|
|
2240
|
-
`,{moduleId:"vaadin-date-picker-overlay-styles"});class
|
|
2240
|
+
`,{moduleId:"vaadin-date-picker-overlay-styles"});class Lo extends(Io(Ho(Ds))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return Wo||(Wo=super.template.cloneNode(!0),Wo.content.querySelector('[part~="overlay"]').removeAttribute("tabindex")),Wo}}customElements.define(Lo.is,Lo);
|
|
2241
2241
|
/**
|
|
2242
2242
|
@license
|
|
2243
2243
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -2432,7 +2432,7 @@ class tr extends Pi{static get template(){return zi`
|
|
|
2432
2432
|
<div class="buffer"></div>
|
|
2433
2433
|
<div id="fullHeight"></div>
|
|
2434
2434
|
</div>
|
|
2435
|
-
`}static get is(){return"vaadin-infinite-scroller"}static get properties(){return{bufferSize:{type:Number,value:20},_initialScroll:{value:5e5},_initialIndex:{value:0},_buffers:Array,_preventScrollEvent:Boolean,_mayHaveMomentum:Boolean,_initialized:Boolean,active:{type:Boolean,observer:"_activated"}}}ready(){super.ready(),this._buffers=Array.prototype.slice.call(this.root.querySelectorAll(".buffer")),this.$.fullHeight.style.height=2*this._initialScroll+"px";const t=this.querySelector("template");this._TemplateClass=ps(t,this,{forwardHostProp(t,e){"index"!==t&&this._buffers.forEach((i=>{[].forEach.call(i.children,(i=>{i._itemWrapper.instance[t]=e}))}))}}),vs&&(this.$.scroller.tabIndex=-1)}_activated(t){t&&!this._initialized&&(this._createPool(),this._initialized=!0)}_finishInit(){this._initDone||(this._buffers.forEach((t=>{[].forEach.call(t.children,(t=>this._ensureStampedInstance(t._itemWrapper)))}),this),this._buffers[0].translateY||this._reset(),this._initDone=!0)}_translateBuffer(t){const e=t?1:0;this._buffers[e].translateY=this._buffers[e?0:1].translateY+this._bufferHeight*(e?-1:1),this._buffers[e].style.transform=`translate3d(0, ${this._buffers[e].translateY}px, 0)`,this._buffers[e].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;const t=this.$.scroller.scrollTop;(t<this._bufferHeight||t>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t<this._buffers[0].translateY+e;(t>this._buffers[1].translateY+e||i)&&(this._translateBuffer(i),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=
|
|
2435
|
+
`}static get is(){return"vaadin-infinite-scroller"}static get properties(){return{bufferSize:{type:Number,value:20},_initialScroll:{value:5e5},_initialIndex:{value:0},_buffers:Array,_preventScrollEvent:Boolean,_mayHaveMomentum:Boolean,_initialized:Boolean,active:{type:Boolean,observer:"_activated"}}}ready(){super.ready(),this._buffers=Array.prototype.slice.call(this.root.querySelectorAll(".buffer")),this.$.fullHeight.style.height=2*this._initialScroll+"px";const t=this.querySelector("template");this._TemplateClass=ps(t,this,{forwardHostProp(t,e){"index"!==t&&this._buffers.forEach((i=>{[].forEach.call(i.children,(i=>{i._itemWrapper.instance[t]=e}))}))}}),vs&&(this.$.scroller.tabIndex=-1)}_activated(t){t&&!this._initialized&&(this._createPool(),this._initialized=!0)}_finishInit(){this._initDone||(this._buffers.forEach((t=>{[].forEach.call(t.children,(t=>this._ensureStampedInstance(t._itemWrapper)))}),this),this._buffers[0].translateY||this._reset(),this._initDone=!0)}_translateBuffer(t){const e=t?1:0;this._buffers[e].translateY=this._buffers[e?0:1].translateY+this._bufferHeight*(e?-1:1),this._buffers[e].style.transform=`translate3d(0, ${this._buffers[e].translateY}px, 0)`,this._buffers[e].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;const t=this.$.scroller.scrollTop;(t<this._bufferHeight||t>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t<this._buffers[0].translateY+e;(t>this._buffers[1].translateY+e||i)&&(this._translateBuffer(i),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=Ls.debounce(this._debouncerScrollFinish,Hs.after(200),(()=>{const t=this.$.scroller.getBoundingClientRect();this._isVisible(this._buffers[0],t)||this._isVisible(this._buffers[1],t)||(this.position=this.position)}))}get bufferOffset(){return this._buffers[0].offsetTop}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(t){this._preventScrollEvent=!0,t>this._firstIndex&&t<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~t,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=t%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10))}get itemHeight(){if(!this._itemHeightVal){const t=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),e="background-position";this.$.fullHeight.style.setProperty(e,t);const i=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e),this._itemHeightVal=parseFloat(i)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach((t=>{t.style.transform=`translate3d(0, ${t.translateY}px, 0)`})),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=Ls.debounce(this._debouncerUpdateClones,Hs.after(200),(()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones()})),this._scrollDisabled=!1}_createPool(){const t=this.getBoundingClientRect();this._buffers.forEach((e=>{for(let i=0;i<this.bufferSize;i++){const i=document.createElement("div");i.style.height=`${this.itemHeight}px`,i.instance={};const s=`vaadin-infinite-scroller-item-content-${tr._contentIndex=tr._contentIndex+1||0}`,o=document.createElement("slot");o.setAttribute("name",s),o._itemWrapper=i,e.appendChild(o),i.setAttribute("slot",s),this.appendChild(i),setTimeout((()=>{this._isVisible(i,t)&&this._ensureStampedInstance(i)}),1)}}),this),setTimeout((()=>{Qi(this,this._finishInit.bind(this))}),1)}_ensureStampedInstance(t){if(t.firstElementChild)return;const e=t.instance;t.instance=new this._TemplateClass({}),t.appendChild(t.instance.root),Object.keys(e).forEach((i=>{t.instance.set(i,e[i])}))}_updateClones(t){this._firstIndex=~~((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((i,s)=>{if(!i.updated){const o=this._firstIndex+this.bufferSize*s;[].forEach.call(i.children,((i,s)=>{const r=i._itemWrapper;t&&!this._isVisible(r,e)||(r.instance.index=o+s)})),i.updated=!0}}),this)}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}customElements.define(tr.is,tr);
|
|
2436
2436
|
/**
|
|
2437
2437
|
* @license
|
|
2438
2438
|
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
@@ -2645,7 +2645,7 @@ class er{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=t
|
|
|
2645
2645
|
[[i18n.cancel]]
|
|
2646
2646
|
</vaadin-button>
|
|
2647
2647
|
</div>
|
|
2648
|
-
`}static get is(){return"vaadin-date-picker-overlay-content"}static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Date},focusedDate:{type:Date,notify:!0,observer:"_focusedDateChanged"},_focusedMonthDate:Number,initialPosition:{type:Date,observer:"_initialPositionChanged"},_originDate:{value:new Date},_visibleMonthIndex:Number,_desktopMode:Boolean,_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:Date,maxDate:Date,label:String}}get __isRTL(){return"rtl"===this.getAttribute("dir")}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("vaadin-month-calendar")].map((t=>t.focusableDateElement)).find(Boolean)}ready(){super.ready(),this.setAttribute("role","dialog"),po(this,"tap",this._stopPropagation),po(this.$.scrollers,"track",this._track.bind(this)),po(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),po(this.shadowRoot.querySelector('[part="today-button"]'),"tap",this._onTodayTap.bind(this)),po(this.shadowRoot.querySelector('[part="cancel-button"]'),"tap",this._cancel.bind(this)),po(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),po(this.shadowRoot.querySelector('[part="years"]'),"tap",this._onYearTap.bind(this)),po(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this)),this.addController(new er(this._desktopMediaQuery,(t=>{this._desktopMode=t})))}connectedCallback(){super.connectedCallback(),this._closeYearScroller(),this._toggleAnimateClass(!0),fo(this.$.scrollers,"pan-y")}focusCancel(){this.$.cancelButton.focus()}scrollToDate(t,e){this._scrollToPosition(this._differenceInMonths(t,this._originDate),e)}_selectDate(t){this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0}))}_focusedDateChanged(t){this.revealDate(t)}_isCurrentYear(t){return 0===t}_isSelectedYear(t,e){if(e)return e.getFullYear()===this._originDate.getFullYear()+t}revealDate(t,e=!0){if(t){const i=this._differenceInMonths(t,this._originDate),s=this.$.monthScroller.position>i,o=Math.max(this.$.monthScroller.itemHeight,this.$.monthScroller.clientHeight-2*this.$.monthScroller.bufferOffset)/this.$.monthScroller.itemHeight,r=this.$.monthScroller.position+o-1<i;s?this._scrollToPosition(i,e):r&&this._scrollToPosition(i-o+1,e)}}_initialPositionChanged(t){this.scrollToDate(t)}_repositionYearScroller(){this._visibleMonthIndex=Math.floor(this.$.monthScroller.position),this.$.yearScroller.position=(this.$.monthScroller.position+this._originDate.getMonth())/12}_repositionMonthScroller(){this.$.monthScroller.position=12*this.$.yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this.$.monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>this._notTapping=!0),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=Rs.debounce(this._debouncer,Hs.after(300),(()=>this._ignoreTaps=!1))}_formatDisplayed(t,e,i){return t?e(Xo(t)):i}_onTodayTap(){const t=new Date;Math.abs(this.$.monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_showClear(t){return!!t}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=t.detail.y-(this.$.yearScroller.getBoundingClientRect().top+this.$.yearScroller.clientHeight/2);this._scrollToPosition(this.$.monthScroller.position+e/this.$.yearScroller.itemHeight*12,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this.$.monthScroller.position=t,this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();this._targetPosition=t;let i=0;const s=this.$.monthScroller.position,o=t=>{i=i||t;const e=t-i;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,s,this._targetPosition-s);this.$.monthScroller.position=t,window.requestAnimationFrame(o)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:s}})),this.$.monthScroller.position=this._targetPosition,this._targetPosition=void 0,this.__tryFocusDate();setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(o)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this.$.monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this.$.yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXYears(t){const e=new Date(this._originDate);return e.setFullYear(parseInt(t)+this._originDate.getFullYear()),e.getFullYear()}_yearAfterXMonths(t){return this._dateAfterXMonths(t).getFullYear()}_dateAfterXMonths(t){const e=new Date(this._originDate);return e.setDate(1),e.setMonth(parseInt(t)+this._originDate.getMonth()),e}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_differenceInYears(t,e){return this._differenceInMonths(t,e)/12}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){Jo(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate),this._close(),e=!0;break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.__focusInput());break;case"today":t.shiftKey&&setTimeout((()=>this.revealDate(this.focusedDate)),1);break;case"cancel":t.shiftKey||(t.preventDefault(),this.__focusInput())}}__onTodayButtonKeyDown(t){this.hasAttribute("fullscreen")?"Escape"!==t.key&&t.stopPropagation():"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){this.hasAttribute("fullscreen")?"Escape"!==t.key&&t.stopPropagation():"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&Jo(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}async focusDate(t,e){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),await this.focusDateElement()}async focusDateElement(){this.__pendingDateFocus=this.focusedDate,await new Promise((t=>{requestAnimationFrame(t)})),this.__tryFocusDate()}_focusClosestDate(t){this.focusDate(Zo(t,[this.minDate,this.maxDate]))}_moveFocusByDays(t){const e=this.focusedDate,i=new Date(0,0);i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(e.getDate()+t),this._dateAllowed(i,this.minDate,this.maxDate)?this.focusDate(i):this._dateAllowed(e,this.minDate,this.maxDate)?this.focusDate(t>0?this.maxDate:this.minDate):this._focusClosestDate(e)}_moveFocusByMonths(t){const e=this.focusedDate,i=new Date(0,0);i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()+t);const s=i.getMonth();i.setDate(this._focusedMonthDate||(this._focusedMonthDate=e.getDate())),i.getMonth()!==s&&i.setDate(0),this._dateAllowed(i,this.minDate,this.maxDate)?this.focusDate(i,!0):this._dateAllowed(e,this.minDate,this.maxDate)?this.focusDate(t>0?this.maxDate:this.minDate):this._focusClosestDate(e)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i,this.minDate,this.maxDate)?this.focusDate(i):this._dateAllowed(t,this.minDate,this.maxDate)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e,i){return(!e||t>=e)&&(!i||t<=i)}_isTodayAllowed(t,e){const i=new Date,s=new Date(0,0);return s.setFullYear(i.getFullYear()),s.setMonth(i.getMonth()),s.setDate(i.getDate()),this._dateAllowed(s,t,e)}_stopPropagation(t){t.stopPropagation()}}customElements.define(ir.is,ir);
|
|
2648
|
+
`}static get is(){return"vaadin-date-picker-overlay-content"}static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Date},focusedDate:{type:Date,notify:!0,observer:"_focusedDateChanged"},_focusedMonthDate:Number,initialPosition:{type:Date,observer:"_initialPositionChanged"},_originDate:{value:new Date},_visibleMonthIndex:Number,_desktopMode:Boolean,_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:Date,maxDate:Date,label:String}}get __isRTL(){return"rtl"===this.getAttribute("dir")}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("vaadin-month-calendar")].map((t=>t.focusableDateElement)).find(Boolean)}ready(){super.ready(),this.setAttribute("role","dialog"),po(this,"tap",this._stopPropagation),po(this.$.scrollers,"track",this._track.bind(this)),po(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),po(this.shadowRoot.querySelector('[part="today-button"]'),"tap",this._onTodayTap.bind(this)),po(this.shadowRoot.querySelector('[part="cancel-button"]'),"tap",this._cancel.bind(this)),po(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),po(this.shadowRoot.querySelector('[part="years"]'),"tap",this._onYearTap.bind(this)),po(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this)),this.addController(new er(this._desktopMediaQuery,(t=>{this._desktopMode=t})))}connectedCallback(){super.connectedCallback(),this._closeYearScroller(),this._toggleAnimateClass(!0),fo(this.$.scrollers,"pan-y")}focusCancel(){this.$.cancelButton.focus()}scrollToDate(t,e){this._scrollToPosition(this._differenceInMonths(t,this._originDate),e)}_selectDate(t){this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0}))}_focusedDateChanged(t){this.revealDate(t)}_isCurrentYear(t){return 0===t}_isSelectedYear(t,e){if(e)return e.getFullYear()===this._originDate.getFullYear()+t}revealDate(t,e=!0){if(t){const i=this._differenceInMonths(t,this._originDate),s=this.$.monthScroller.position>i,o=Math.max(this.$.monthScroller.itemHeight,this.$.monthScroller.clientHeight-2*this.$.monthScroller.bufferOffset)/this.$.monthScroller.itemHeight,r=this.$.monthScroller.position+o-1<i;s?this._scrollToPosition(i,e):r&&this._scrollToPosition(i-o+1,e)}}_initialPositionChanged(t){this.scrollToDate(t)}_repositionYearScroller(){this._visibleMonthIndex=Math.floor(this.$.monthScroller.position),this.$.yearScroller.position=(this.$.monthScroller.position+this._originDate.getMonth())/12}_repositionMonthScroller(){this.$.monthScroller.position=12*this.$.yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this.$.monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>this._notTapping=!0),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=Ls.debounce(this._debouncer,Hs.after(300),(()=>this._ignoreTaps=!1))}_formatDisplayed(t,e,i){return t?e(Xo(t)):i}_onTodayTap(){const t=new Date;Math.abs(this.$.monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_showClear(t){return!!t}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=t.detail.y-(this.$.yearScroller.getBoundingClientRect().top+this.$.yearScroller.clientHeight/2);this._scrollToPosition(this.$.monthScroller.position+e/this.$.yearScroller.itemHeight*12,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this.$.monthScroller.position=t,this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();this._targetPosition=t;let i=0;const s=this.$.monthScroller.position,o=t=>{i=i||t;const e=t-i;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,s,this._targetPosition-s);this.$.monthScroller.position=t,window.requestAnimationFrame(o)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:s}})),this.$.monthScroller.position=this._targetPosition,this._targetPosition=void 0,this.__tryFocusDate();setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(o)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this.$.monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this.$.yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXYears(t){const e=new Date(this._originDate);return e.setFullYear(parseInt(t)+this._originDate.getFullYear()),e.getFullYear()}_yearAfterXMonths(t){return this._dateAfterXMonths(t).getFullYear()}_dateAfterXMonths(t){const e=new Date(this._originDate);return e.setDate(1),e.setMonth(parseInt(t)+this._originDate.getMonth()),e}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_differenceInYears(t,e){return this._differenceInMonths(t,e)/12}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){Jo(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate),this._close(),e=!0;break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.__focusInput());break;case"today":t.shiftKey&&setTimeout((()=>this.revealDate(this.focusedDate)),1);break;case"cancel":t.shiftKey||(t.preventDefault(),this.__focusInput())}}__onTodayButtonKeyDown(t){this.hasAttribute("fullscreen")?"Escape"!==t.key&&t.stopPropagation():"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){this.hasAttribute("fullscreen")?"Escape"!==t.key&&t.stopPropagation():"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&Jo(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}async focusDate(t,e){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),await this.focusDateElement()}async focusDateElement(){this.__pendingDateFocus=this.focusedDate,await new Promise((t=>{requestAnimationFrame(t)})),this.__tryFocusDate()}_focusClosestDate(t){this.focusDate(Zo(t,[this.minDate,this.maxDate]))}_moveFocusByDays(t){const e=this.focusedDate,i=new Date(0,0);i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(e.getDate()+t),this._dateAllowed(i,this.minDate,this.maxDate)?this.focusDate(i):this._dateAllowed(e,this.minDate,this.maxDate)?this.focusDate(t>0?this.maxDate:this.minDate):this._focusClosestDate(e)}_moveFocusByMonths(t){const e=this.focusedDate,i=new Date(0,0);i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()+t);const s=i.getMonth();i.setDate(this._focusedMonthDate||(this._focusedMonthDate=e.getDate())),i.getMonth()!==s&&i.setDate(0),this._dateAllowed(i,this.minDate,this.maxDate)?this.focusDate(i,!0):this._dateAllowed(e,this.minDate,this.maxDate)?this.focusDate(t>0?this.maxDate:this.minDate):this._focusClosestDate(e)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i,this.minDate,this.maxDate)?this.focusDate(i):this._dateAllowed(t,this.minDate,this.maxDate)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e,i){return(!e||t>=e)&&(!i||t<=i)}_isTodayAllowed(t,e){const i=new Date,s=new Date(0,0);return s.setFullYear(i.getFullYear()),s.setMonth(i.getMonth()),s.setDate(i.getDate()),this._dateAllowed(s,t,e)}_stopPropagation(t){t.stopPropagation()}}customElements.define(ir.is,ir);
|
|
2649
2649
|
/**
|
|
2650
2650
|
* @license
|
|
2651
2651
|
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
@@ -2785,7 +2785,7 @@ class _r{constructor(t){this.host=t,t.addEventListener("opened-changed",(()=>{t.
|
|
|
2785
2785
|
* @license
|
|
2786
2786
|
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2787
2787
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2788
|
-
*/;ht("vaadin-date-picker",[wr,
|
|
2788
|
+
*/;ht("vaadin-date-picker",[wr,Ro],{moduleId:"vaadin-date-picker-styles"});class kr extends(xr(br(ft(qs(Pi))))){static get is(){return"vaadin-date-picker"}static get template(){return zi`
|
|
2789
2789
|
<style>
|
|
2790
2790
|
:host([opened]) {
|
|
2791
2791
|
pointer-events: auto;
|
|
@@ -2846,4 +2846,4 @@ class _r{constructor(t){this.host=t,t.addEventListener("opened-changed",(()=>{t.
|
|
|
2846
2846
|
></vaadin-date-picker-overlay-content>
|
|
2847
2847
|
</template>
|
|
2848
2848
|
</vaadin-date-picker-overlay>
|
|
2849
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new gr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new yr(this.inputElement,this._labelController)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault()))}_initOverlay(){super._initOverlay(),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){this._openedWithFocusRing&&this.hasAttribute("focused")?this.setAttribute("focus-ring",""):this.hasAttribute("focused")||this.blur(),t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this[this._overlayInitialized&&this.$.overlay.opened?"close":"open"]()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}customElements.define(kr.is,kr);const Ar=class{constructor(i){t(this,i),this.filterDraw=e(this,"filterDraw",7),this.filterSelection=e(this,"filterSelection",7),this.filterSelectionReset=e(this,"filterSelectionReset",7),this.showFilterId=!0,this.activateTicketSearch=!1,this.gameId="",this.playerId="",this.session="",this.postMessage=!1,this.language="en",this.quickFiltersActive=!1,this.clientStyling="",this.clientStylingUrlContent="",this.showFilterModal=!1,this.showClearButton=!1,this.filterData={},this.filterDataReset={ticketDrawId:"",filterFromCalendar:"",filterToCalendar:""},this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}componentDidRender(){document.getElementById("#FilterById")&&(document.getElementById("#FilterById").value=""),!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}filterSelectionHandler(t){this.postMessage&&window.postMessage({type:"filterSelection",event:t},window.location.href),(this.filterData.ticketDrawId||this.filterData.filterFromCalendar||this.filterData.filterToCalendar)&&this.filterSelection.emit(t)}filterSelectionResetHandler(t){this.postMessage&&window.postMessage({type:"filterSelectionReset",event:t},window.location.href),this.filterSelectionReset.emit(t)}modalCloseEvent(){this.showFilterModal=!1}toggleFilterModal(){this.showFilterModal=!0}filterSearch(){this.modalCloseEvent(),this.showClearButton=!0,this.filterSelectionHandler(this.filterData)}resetSearch(){this.showClearButton=!1,this.filterSelectionResetHandler(this.filterDataReset),this.filterData={}}handleTicketDrawId(t){this.filterData.ticketDrawId=t.target.value}handleFilterFrom(t){this.filterData.filterFromCalendar=new Date(t.target.value).toISOString()}handleFilterTo(t){this.filterData.filterToCalendar=new Date(t.target.value).toISOString()}render(){return i("div",{class:"HelperFilters",ref:t=>this.stylingContainer=t},i("div",{class:"FilterButtonsWrapper"},i("button",{class:"FilterOpen",onClick:()=>this.toggleFilterModal()},r("filterOpen",this.language)),this.showClearButton||this.quickFiltersActive?i("button",{class:"FilterClear",onClick:()=>this.resetSearch()},r("filterClear",this.language)):null),i("helper-modal",{"title-modal":"Filter Modal",visible:this.showFilterModal,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{class:"FilterModalHeader"},i("h3",{class:"FilterModalTitle"},r(this.activateTicketSearch?"filterModalTicketTitle":"filterModalDrawTitle",this.language))),i("div",{class:"FilterModalBody"},i("input",{id:"FilterById",type:"text",value:this.filterData.ticketDrawId,onInput:t=>this.handleTicketDrawId(t),class:"FilterModalSearch",placeholder:r(this.activateTicketSearch?"filterTicketPlaceholder":"filterDrawPlaceholder",this.language)}),i("p",null,r("filterOrDate",this.language)),i("div",{class:"FilterCalendarWrapper"},i("vaadin-date-picker",{value:this.filterData.filterFromCalendar,onChange:t=>this.handleFilterFrom(t),placeholder:r("filterFromCalendar",this.language),class:"VaadinDatePicker"}),i("vaadin-date-picker",{value:this.filterData.filterToCalendar,onChange:t=>this.handleFilterTo(t),placeholder:r("filterToCalendar",this.language),class:"VaadinDatePicker"}))),i("div",{class:"FilterModalFooter"},i("button",{class:"FilterModalButton",onClick:()=>this.filterSearch()},r("filterModalButton",this.language)))))}};Ar.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:#00958f;color:#FFF}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:#00958f;color:#FFF}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:#009993;text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:4px;background:#e8ebef;color:#263445;width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:#009993}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:#00958f;color:#FFF}.FilterModalHeader p,.FilterModalBody p,.FilterModalFooter p{margin:5px 0}';const Cr=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),Dr=class{constructor(i){t(this,i),this.cancel=e(this,"modalCloseEvent",7),this.visible=!0,this.userAgent=window.navigator.userAgent}handleHelperModalClose(){this.visible=!1,this.cancel.emit()}render(){return this.visible&&i("div",{class:this.visible?"HelperModalWrapper HelperModalVisible":"HelperModalWrapper"},i("div",{class:"HelperModalWrapper HelperModalVisible"},i("div",{class:"HelperModalContent"+(Cr(this.userAgent)?" HelperModalMobileContent":"")},i("span",{class:"HelperModalClose"+(Cr(this.userAgent)?" HelperModalMobileClose":""),onClick:this.handleHelperModalClose.bind(this)},"X"),i("slot",null))))}};Dr.style=":host{display:block}.HelperModalWrapper{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);opacity:0;visibility:hidden;transform:scale(1.1);transition:visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;z-index:1}.HelperModalVisible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.HelperModalContent{position:relative;border:solid 1px #848e97;box-shadow:2px 2px 2px rgba(0, 0, 0, 0.007);font-size:14px;padding:10px 10px 5px 10px;background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:600px;max-height:600px;overflow-y:scroll}.HelperModalMobileContent{background:#FFF;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:80%;max-height:350px}.HelperModalClose{cursor:pointer;position:absolute;top:15px;right:15px;font-size:20px;color:#000}.HelperModalMobileClose{position:absolute;top:15px;right:15px;font-size:20px;color:#000}";export{Ar as helper_filters,Dr as helper_modal}
|
|
2849
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new gr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new yr(this.inputElement,this._labelController)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault()))}_initOverlay(){super._initOverlay(),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){this._openedWithFocusRing&&this.hasAttribute("focused")?this.setAttribute("focus-ring",""):this.hasAttribute("focused")||this.blur(),t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this[this._overlayInitialized&&this.$.overlay.opened?"close":"open"]()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}customElements.define(kr.is,kr);const Ar=class{constructor(i){t(this,i),this.filterDraw=e(this,"filterDraw",7),this.filterSelection=e(this,"filterSelection",7),this.filterSelectionReset=e(this,"filterSelectionReset",7),this.showFilterId=!0,this.activateTicketSearch=!1,this.gameId="",this.playerId="",this.session="",this.postMessage=!1,this.language="en",this.quickFiltersActive=!1,this.clientStyling="",this.clientStylingUrlContent="",this.showFilterModal=!1,this.showClearButton=!1,this.filterData={},this.filterDataReset={ticketDrawId:"",filterFromCalendar:"",filterToCalendar:""},this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}componentDidRender(){document.getElementById("#FilterById")&&(document.getElementById("#FilterById").value=""),!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}filterSelectionHandler(t){this.postMessage&&window.postMessage({type:"filterSelection",event:t},window.location.href),(this.filterData.ticketDrawId||this.filterData.filterFromCalendar||this.filterData.filterToCalendar)&&this.filterSelection.emit(t)}filterSelectionResetHandler(t){this.postMessage&&window.postMessage({type:"filterSelectionReset",event:t},window.location.href),this.filterSelectionReset.emit(t)}modalCloseEvent(){this.showFilterModal=!1}toggleFilterModal(){this.showFilterModal=!0}filterSearch(){this.modalCloseEvent(),this.showClearButton=!0,this.filterSelectionHandler(this.filterData)}resetSearch(){this.showClearButton=!1,this.filterSelectionResetHandler(this.filterDataReset),this.filterData={}}handleTicketDrawId(t){this.filterData.ticketDrawId=t.target.value}handleFilterFrom(t){this.filterData.filterFromCalendar=new Date(t.target.value).toISOString()}handleFilterTo(t){this.filterData.filterToCalendar=new Date(t.target.value).toISOString()}render(){return i("div",{class:"HelperFilters",ref:t=>this.stylingContainer=t},i("div",{class:"FilterButtonsWrapper"},i("button",{class:"FilterOpen",onClick:()=>this.toggleFilterModal()},r("filterOpen",this.language)),this.showClearButton||this.quickFiltersActive?i("button",{class:"FilterClear",onClick:()=>this.resetSearch()},r("filterClear",this.language)):null),i("helper-modal",{"title-modal":"Filter Modal",visible:this.showFilterModal,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{class:"FilterModalHeader"},i("h3",{class:"FilterModalTitle"},r(this.activateTicketSearch?"filterModalTicketTitle":"filterModalDrawTitle",this.language))),i("div",{class:"FilterModalBody"},i("input",{id:"FilterById",type:"text",value:this.filterData.ticketDrawId,onInput:t=>this.handleTicketDrawId(t),class:"FilterModalSearch",placeholder:r(this.activateTicketSearch?"filterTicketPlaceholder":"filterDrawPlaceholder",this.language)}),i("p",null,r("filterOrDate",this.language)),i("div",{class:"FilterCalendarWrapper"},i("vaadin-date-picker",{value:this.filterData.filterFromCalendar,onChange:t=>this.handleFilterFrom(t),placeholder:r("filterFromCalendar",this.language),class:"VaadinDatePicker"}),i("vaadin-date-picker",{value:this.filterData.filterToCalendar,onChange:t=>this.handleFilterTo(t),placeholder:r("filterToCalendar",this.language),class:"VaadinDatePicker"}))),i("div",{class:"FilterModalFooter"},i("button",{class:"FilterModalButton",onClick:()=>this.filterSearch()},r("filterModalButton",this.language)))))}};Ar.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:#00958f;color:#FFF}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:#00958f;color:#FFF}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:#009993;text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:4px;background:#e8ebef;color:#263445;width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:#009993}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:#00958f;color:#FFF}.FilterModalHeader p,.FilterModalBody p,.FilterModalFooter p{margin:5px 0}';const Cr=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),Dr=class{constructor(i){t(this,i),this.cancel=e(this,"modalCloseEvent",7),this.visible=!0,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.userAgent=window.navigator.userAgent,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}handleHelperModalClose(){this.visible=!1,this.cancel.emit()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return this.visible&&i("div",{class:this.visible?"HelperModalWrapper HelperModalVisible":"HelperModalWrapper",ref:t=>this.stylingContainer=t},i("div",{class:"HelperModalWrapper HelperModalVisible"},i("div",{class:"HelperModalContent"+(Cr(this.userAgent)?" HelperModalMobileContent":"")},i("span",{class:"HelperModalClose"+(Cr(this.userAgent)?" HelperModalMobileClose":""),onClick:this.handleHelperModalClose.bind(this)},"X"),i("slot",null))))}};Dr.style=":host{display:block}.HelperModalWrapper{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);opacity:0;visibility:hidden;transform:scale(1.1);transition:visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;z-index:1}.HelperModalVisible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.HelperModalContent{position:relative;border:solid 1px #848e97;box-shadow:2px 2px 2px rgba(0, 0, 0, 0.007);font-size:14px;padding:10px 10px 5px 10px;background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:600px;max-height:600px;overflow-y:scroll}.HelperModalMobileContent{background:#FFF;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:80%;max-height:350px}.HelperModalClose{cursor:pointer;position:absolute;top:15px;right:15px;font-size:20px;color:#000}.HelperModalMobileClose{position:absolute;top:15px;right:15px;font-size:20px;color:#000}";export{Ar as helper_filters,Dr as helper_modal}
|
package/package.json
CHANGED