@everymatrix/lottery-game-page 1.25.0 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/helper-accordion.cjs.entry.js +4 -1
- package/dist/cjs/helper-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/helper-filters_2.cjs.entry.js +10069 -9613
- package/dist/cjs/helper-filters_2.cjs.entry.js.map +1 -1
- package/dist/cjs/helper-pagination.cjs.entry.js +7 -1
- package/dist/cjs/helper-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js +15 -2
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js.map +1 -1
- package/dist/cjs/lottery-game-page.cjs.entry.js +24 -1
- package/dist/cjs/lottery-game-page.cjs.entry.js.map +1 -1
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js +4 -1
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js.map +1 -1
- package/dist/cjs/lottery-ticket.cjs.entry.js +11 -1
- package/dist/cjs/lottery-ticket.cjs.entry.js.map +1 -1
- package/dist/collection/utils/locale.utils.js +24 -1
- package/dist/collection/utils/locale.utils.js.map +1 -1
- package/dist/components/helper-accordion2.js +4 -1
- package/dist/components/helper-accordion2.js.map +1 -1
- package/dist/components/helper-filters2.js +10012 -9573
- package/dist/components/helper-filters2.js.map +1 -1
- package/dist/components/helper-pagination.js +7 -1
- package/dist/components/helper-pagination.js.map +1 -1
- package/dist/components/lottery-draw-results-history2.js +15 -2
- package/dist/components/lottery-draw-results-history2.js.map +1 -1
- package/dist/components/lottery-draw-results2.js +19 -2
- package/dist/components/lottery-draw-results2.js.map +1 -1
- package/dist/components/lottery-game-page.js +24 -1
- package/dist/components/lottery-game-page.js.map +1 -1
- package/dist/components/lottery-ticket-controller2.js +4 -1
- package/dist/components/lottery-ticket-controller2.js.map +1 -1
- package/dist/components/lottery-ticket2.js +11 -1
- package/dist/components/lottery-ticket2.js.map +1 -1
- package/dist/esm/helper-accordion.entry.js +4 -1
- package/dist/esm/helper-accordion.entry.js.map +1 -1
- package/dist/esm/helper-filters_2.entry.js +10069 -9613
- package/dist/esm/helper-filters_2.entry.js.map +1 -1
- package/dist/esm/helper-pagination.entry.js +7 -1
- package/dist/esm/helper-pagination.entry.js.map +1 -1
- package/dist/esm/lottery-draw-results-history.entry.js +15 -2
- package/dist/esm/lottery-draw-results-history.entry.js.map +1 -1
- package/dist/esm/lottery-game-page.entry.js +24 -1
- package/dist/esm/lottery-game-page.entry.js.map +1 -1
- package/dist/esm/lottery-ticket-controller.entry.js +4 -1
- package/dist/esm/lottery-ticket-controller.entry.js.map +1 -1
- package/dist/esm/lottery-ticket.entry.js +11 -1
- package/dist/esm/lottery-ticket.entry.js.map +1 -1
- package/dist/lottery-game-page/lottery-game-page.esm.js +1 -1
- package/dist/lottery-game-page/p-12340c50.entry.js +2921 -0
- package/dist/lottery-game-page/p-12340c50.entry.js.map +1 -0
- package/dist/lottery-game-page/p-20e0c81c.entry.js +2 -0
- package/dist/lottery-game-page/p-20e0c81c.entry.js.map +1 -0
- package/dist/lottery-game-page/p-b19ff22c.entry.js +2 -0
- package/dist/lottery-game-page/p-b19ff22c.entry.js.map +1 -0
- package/dist/lottery-game-page/p-cba19473.entry.js +2 -0
- package/dist/lottery-game-page/p-cba19473.entry.js.map +1 -0
- package/dist/lottery-game-page/p-cd4aa6a4.entry.js +2 -0
- package/dist/lottery-game-page/p-cd4aa6a4.entry.js.map +1 -0
- package/dist/lottery-game-page/p-e86e2389.entry.js +2 -0
- package/dist/lottery-game-page/p-e86e2389.entry.js.map +1 -0
- package/dist/lottery-game-page/p-f399eef1.entry.js +2 -0
- package/dist/lottery-game-page/p-f399eef1.entry.js.map +1 -0
- package/package.json +1 -1
- package/dist/lottery-game-page/p-042065c6.entry.js +0 -2
- package/dist/lottery-game-page/p-042065c6.entry.js.map +0 -1
- package/dist/lottery-game-page/p-5b49ab69.entry.js +0 -2
- package/dist/lottery-game-page/p-5b49ab69.entry.js.map +0 -1
- package/dist/lottery-game-page/p-606c0b0f.entry.js +0 -2
- package/dist/lottery-game-page/p-606c0b0f.entry.js.map +0 -1
- package/dist/lottery-game-page/p-96f06e2d.entry.js +0 -2
- package/dist/lottery-game-page/p-96f06e2d.entry.js.map +0 -1
- package/dist/lottery-game-page/p-a9ef5b8c.entry.js +0 -2
- package/dist/lottery-game-page/p-a9ef5b8c.entry.js.map +0 -1
- package/dist/lottery-game-page/p-b8e683f6.entry.js +0 -2
- package/dist/lottery-game-page/p-b8e683f6.entry.js.map +0 -1
- package/dist/lottery-game-page/p-f8578814.entry.js +0 -2899
- package/dist/lottery-game-page/p-f8578814.entry.js.map +0 -1
- /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const DEFAULT_LANGUAGE = 'en';
|
|
2
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar'];
|
|
2
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
3
3
|
const TRANSLATIONS = {
|
|
4
4
|
en: {
|
|
5
5
|
error: 'Error',
|
|
@@ -92,6 +92,29 @@ const TRANSLATIONS = {
|
|
|
92
92
|
orderSummarySubmit: 'يُقدِّم',
|
|
93
93
|
lastDrawResultsTitle: 'نتائج آخر سحب',
|
|
94
94
|
modalLogin: 'الرجاء تسجيل الدخول لتقديم تذكرة'
|
|
95
|
+
},
|
|
96
|
+
hr: {
|
|
97
|
+
error: 'Greška',
|
|
98
|
+
title: 'Krono',
|
|
99
|
+
backButton: 'Nazad',
|
|
100
|
+
lobbyButton: 'Lobby',
|
|
101
|
+
prize: 'Nagrada',
|
|
102
|
+
winUpTo: 'Osvoji do',
|
|
103
|
+
nextDraw: 'Sljedeće izvlačenje za: ',
|
|
104
|
+
buy: 'Uplati listić',
|
|
105
|
+
viewLatest: 'Pogledajte najnovije rezultate',
|
|
106
|
+
createTicket: 'Uplati listić',
|
|
107
|
+
modalSuccess: 'Kupnja uspješno obavljena!',
|
|
108
|
+
deleteTicketModalTitle: 'Izbriši listić',
|
|
109
|
+
deleteTicketModalText: 'Are you sure you want to delete this ticket?',
|
|
110
|
+
deleteTicketModalCancel: 'Otkaži',
|
|
111
|
+
deleteTicketModalConfirm: 'Izbriši',
|
|
112
|
+
orderSummaryTitle: 'Sažetak narudžbe',
|
|
113
|
+
orderSummaryTickets: 'Listić',
|
|
114
|
+
orderSummaryTotal: 'Ukupno',
|
|
115
|
+
orderSummarySubmit: 'Podnijeti',
|
|
116
|
+
lastDrawResultsTitle: 'Rezultati posljednjeg izvlačenja',
|
|
117
|
+
modalLogin: 'Molimo prijavite se da uplatite listić',
|
|
95
118
|
}
|
|
96
119
|
};
|
|
97
120
|
export const translate = (key, customLang) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale.utils.js","sourceRoot":"","sources":["../../../../../src/utils/locale.utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"locale.utils.js","sourceRoot":"","sources":["../../../../../src/utils/locale.utils.ts"],"names":[],"mappings":"AAYA,MAAM,gBAAgB,GAAS,IAAI,CAAA;AACnC,MAAM,mBAAmB,GAAa,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACrE,MAAM,YAAY,GAAiB;EACjC,EAAE,EAAE;IACF,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,QAAQ;IACf,UAAU,EAAE,MAAM;IAClB,WAAW,EAAE,OAAO;IACpB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,WAAW;IACpB,QAAQ,EAAE,gBAAgB;IAC1B,GAAG,EAAE,aAAa;IAClB,UAAU,EAAE,qBAAqB;IACjC,YAAY,EAAE,eAAe;IAC7B,YAAY,EAAE,kCAAkC;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EAAE,QAAQ;IAC7B,iBAAiB,EAAE,QAAQ;IAC3B,kBAAkB,EAAE,WAAW;IAC/B,oBAAoB,EAAE,kCAAkC;IACxD,UAAU,EAAE,wCAAwC;GACrD;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAW,EAAE,UAAW,EAAU,EAAE;EAC5D,MAAM,IAAI,GAAuB,UAAU,CAAC;EAC5C,OAAO,YAAY,CAAC,IAAI,KAAK,SAAS,IAAI,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC;AAC/G,CAAC,CAAC","sourcesContent":["interface Translation {\n [key: string]: string;\n}\n\ninterface Translations {\n en: Translation,\n ro: Translation,\n fr: Translation,\n ar: Translation,\n hr: Translation,\n}\n\nconst DEFAULT_LANGUAGE: 'en' = 'en'\nconst SUPPORTED_LANGUAGES: string[] = ['ro', 'en', 'fr', 'ar', 'hr'];\nconst TRANSLATIONS: Translations = {\n en: {\n error: 'Error',\n title: 'Chrono',\n backButton: 'Back',\n lobbyButton: 'Lobby',\n prize: 'Prize',\n winUpTo: 'Win up to',\n nextDraw: 'Next draw in: ',\n buy: 'Buy tickets',\n viewLatest: 'View latest results',\n createTicket: 'Create Ticket',\n modalSuccess: 'Purchase successfully completed!',\n deleteTicketModalTitle: 'Delete Ticket',\n deleteTicketModalText: 'Are you sure you want to delete this ticket?',\n deleteTicketModalCancel: 'Cancel',\n deleteTicketModalConfirm: 'Delete',\n orderSummaryTitle: 'Order Summary',\n orderSummaryTickets: 'Ticket',\n orderSummaryTotal: 'Total',\n orderSummarySubmit: 'Submit',\n lastDrawResultsTitle: 'Last Draw Results',\n modalLogin: 'Please login to submit a ticket',\n },\n ro: {\n error: 'Eroare',\n title: 'Loto 6/49',\n backButton: 'Inapoi',\n lobbyButton: 'Lobby',\n prize: 'MARELE JACKPOT OMG',\n winUpTo: 'Castiga pana la',\n nextDraw: 'Urmatoarea extragere:',\n buy: 'Cumpara bilet',\n viewLatest: 'Ultimile extrageri',\n createTicket: 'Creeaza bilet',\n modalSuccess: 'Achizitie efectuata cu succes',\n deleteTicketModalTitle: 'Sterge biletul',\n deleteTicketModalText: 'Esti sigur ca vrei sa stergi acest bilet?',\n deleteTicketModalCancel: 'Anuleaza',\n deleteTicketModalConfirm: 'Sterge',\n orderSummaryTitle: 'Rezumat comanda',\n orderSummaryTickets: 'Bilet',\n orderSummaryTotal: 'Total',\n orderSummarySubmit: 'Trimite',\n lastDrawResultsTitle: 'Cele mai recente extrageri',\n modalLogin: 'Please login to submit a ticket',\n },\n fr: {\n error: 'Error',\n title: 'Chrono',\n backButton: 'Back',\n lobbyButton: 'Lobby',\n prize: 'Prize',\n winUpTo: 'Win up to',\n nextDraw: 'Next draw in: ',\n buy: 'Buy tickets',\n viewLatest: 'View latest results',\n createTicket: 'Create Ticket',\n modalSuccess: 'Purchase successfully completed!',\n deleteTicketModalTitle: 'Delete Ticket',\n deleteTicketModalText: 'Are you sure you want to delete this ticket?',\n deleteTicketModalCancel: 'Cancel',\n deleteTicketModalConfirm: 'Delete',\n orderSummaryTitle: 'Order Summary',\n orderSummaryTickets: 'Ticket',\n orderSummaryTotal: 'Total',\n orderSummarySubmit: 'Submit',\n lastDrawResultsTitle: 'Résultats du dernier tirage',\n modalLogin: 'Please login to submit a ticket',\n },\n ar: {\n error: 'خطأ',\n title: 'كرونو',\n backButton: 'خلف',\n lobbyButton: 'ردهة',\n prize: 'جائزة',\n winUpTo: 'الفوز بما يصل الى',\n nextDraw: 'السحب التالي:',\n buy: 'اشتري تذاكر',\n viewLatest: 'عرض أحدث النتائج',\n createTicket: 'إنشاء تذكرة',\n modalSuccess: '!سيتم الشراء بنجاح قريبًا',\n deleteTicketModalTitle: 'حذف التذكرة',\n deleteTicketModalText: 'هل أنت متأكد أنك تريد حذف هذه التذكرة؟',\n deleteTicketModalCancel: 'يلغي',\n deleteTicketModalConfirm: 'حذف',\n orderSummaryTitle: 'ملخص الطلب',\n orderSummaryTickets: 'تذكرة',\n orderSummaryTotal: 'المجموع',\n orderSummarySubmit: 'يُقدِّم',\n lastDrawResultsTitle: 'نتائج آخر سحب',\n modalLogin: 'الرجاء تسجيل الدخول لتقديم تذكرة'\n },\n hr: {\n error: 'Greška',\n title: 'Krono',\n backButton: 'Nazad',\n lobbyButton: 'Lobby',\n prize: 'Nagrada',\n winUpTo: 'Osvoji do',\n nextDraw: 'Sljedeće izvlačenje za: ',\n buy: 'Uplati listić',\n viewLatest: 'Pogledajte najnovije rezultate',\n createTicket: 'Uplati listić',\n modalSuccess: 'Kupnja uspješno obavljena!',\n deleteTicketModalTitle: 'Izbriši listić',\n deleteTicketModalText: 'Are you sure you want to delete this ticket?',\n deleteTicketModalCancel: 'Otkaži',\n deleteTicketModalConfirm: 'Izbriši',\n orderSummaryTitle: 'Sažetak narudžbe',\n orderSummaryTickets: 'Listić',\n orderSummaryTotal: 'Ukupno',\n orderSummarySubmit: 'Podnijeti',\n lastDrawResultsTitle: 'Rezultati posljednjeg izvlačenja',\n modalLogin: 'Molimo prijavite se da uplatite listić',\n }\n};\n\nexport const translate = (key: string, customLang?): string => {\n const lang: string | undefined = customLang;\n return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];\n};\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
4
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'hr'];
|
|
5
5
|
const TRANSLATIONS = {
|
|
6
6
|
en: {
|
|
7
7
|
deleteTicket: 'Delete ticket'
|
|
@@ -14,6 +14,9 @@ const TRANSLATIONS = {
|
|
|
14
14
|
},
|
|
15
15
|
ar: {
|
|
16
16
|
deleteTicket: 'حذف التذكرة'
|
|
17
|
+
},
|
|
18
|
+
hr: {
|
|
19
|
+
deleteTicket: 'Izbriši listić'
|
|
17
20
|
}
|
|
18
21
|
};
|
|
19
22
|
const translate = (key, customLang) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"helper-accordion2.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACzC,MAAM,YAAY,GAAG;AACrB,EAAE,EAAE,EAAE;AACN,IAAI,YAAY,EAAE,eAAe;AACjC,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,YAAY,EAAE,gBAAgB;AAClC,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,YAAY,EAAE,qBAAqB;AACvC,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,YAAY,EAAE,aAAa;AAC/B,GAAG;AACH,CAAC,CAAC;AACK,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,UAAU,KAAK;AAC9C,EAAE,MAAM,IAAI,GAAG,UAAU,CAAC;AAC1B,EAAE,OAAO,YAAY,CAAC,IAAI,KAAK,SAAS,IAAI,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC;AAC/G,CAAC;;ACnBD,MAAM,kBAAkB,GAAG,uhDAAuhD;;MCEriD,SAAS;EACpB;;;;;;;;IAIE,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;;;;IAI/B,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;;;;IAItB,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;;;;IAIzB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;;;;IAItB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;;;;IAIpB,IAAI,CAAC,SAAS,GAA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AW;QAC7B,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS;UAC3B,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAE,EAAE,SAAS,CAAC,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;GACrI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["../helper-accordion/dist/collection/utils/locale.utils.js","../helper-accordion/dist/collection/components/helper-accordion/helper-accordion.css?tag=helper-accordion&encapsulation=shadow","../helper-accordion/dist/collection/components/helper-accordion/helper-accordion.js"],"sourcesContent":["const DEFAULT_LANGUAGE = 'en';\nconst SUPPORTED_LANGUAGES = ['ro', 'en'];\nconst TRANSLATIONS = {\n en: {\n deleteTicket: 'Delete ticket'\n },\n ro: {\n deleteTicket: 'Sterge biletul'\n },\n fr: {\n deleteTicket: 'Supprimer le billet'\n },\n ar: {\n deleteTicket: 'حذف التذكرة'\n }\n};\nexport const translate = (key, customLang) => {\n const lang = customLang;\n return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];\n};\n","@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n display: block;\n font-family: \"Roboto\", sans-serif;\n}\n\n.Header {\n border-radius: 5px;\n background: #009993;\n display: flex;\n gap: 30px;\n border: 1px solid #009993;\n padding: 8px 10px;\n user-select: none;\n margin-bottom: 1px;\n cursor: pointer;\n}\n.Header:hover {\n background: #00ABA4;\n}\n.Header .Title,\n.Header .Subtitle,\n.Header .Description {\n margin: 0;\n font-size: 14px;\n color: #fff;\n text-transform: capitalize;\n}\n.Header .Expand {\n margin-left: auto;\n color: #FFF;\n width: 17px;\n height: 17px;\n cursor: pointer;\n text-align: center;\n transform: rotate(90deg);\n font-size: 20px;\n user-select: none;\n}\n\n.HeaderTicketHistory {\n border-radius: 4px;\n background: #F1F1F1;\n display: flex;\n gap: 30px;\n border: 1px solid #009993;\n padding: 8px 10px;\n user-select: none;\n margin-bottom: 5px;\n cursor: pointer;\n}\n.HeaderTicketHistory:hover {\n background: #00ABA4;\n}\n.HeaderTicketHistory .Title,\n.HeaderTicketHistory .Subtitle,\n.HeaderTicketHistory .Description {\n margin: 0;\n font-size: 14px;\n color: #000;\n}\n.HeaderTicketHistory .Expand {\n margin-left: auto;\n color: #FFF;\n width: 17px;\n height: 17px;\n cursor: pointer;\n text-align: center;\n transform: rotate(90deg);\n font-size: 20px;\n user-select: none;\n}\n\n.Content {\n border-radius: 0 0 4px 4px;\n background: #fff;\n border: 1px solid #009993;\n padding: 10px 15px;\n user-select: none;\n color: #000;\n margin-bottom: 10px;\n}\n\n.ActionButton {\n cursor: pointer;\n display: inline-block;\n border-radius: 4px;\n margin: 20px 0 10px;\n text-transform: uppercase;\n font-size: 12px;\n text-align: center;\n padding: 8px 20px;\n min-width: 80px;\n background: #FF3D00;\n border: 1px solid #FF3D00;\n color: #FFF;\n}\n.ActionButton:hover {\n background: #FF6536;\n border: 1px solid #FF3D00;\n}","import { Component, Prop, h, State, Event } from '@stencil/core';\nimport { translate } from '../../utils/locale.utils';\nexport class Accordion {\n constructor() {\n /**\n * Flag for ticket history\n */\n this.ticketHistoryFlag = false;\n /**\n * Title (top header)\n */\n this.headerTitle = '';\n /**\n * SubTitle (top header)\n */\n this.headerSubtitle = '';\n /**\n * Description\n */\n this.description = '';\n /**\n * Enables footer content\n */\n this.footer = false;\n /**\n * Enables footer button for tab deletion\n */\n this.deleteTab = false;\n /**\n * Activates postMessages as events for actions from the widget\n */\n this.postMessage = false;\n /**\n * Name of the event emitter by the action button\n */\n this.eventName = 'helperAccordionAction';\n /**\n * Collapsed\n */\n this.collapsed = true;\n /**\n * Language\n */\n this.language = 'en';\n /**\n * Client custom styling via string\n */\n this.clientStyling = '';\n /**\n * Client custom styling via url content\n */\n this.clientStylingUrlContent = '';\n this.limitStylingAppends = false;\n this.setClientStyling = () => {\n let sheet = document.createElement('style');\n sheet.innerHTML = this.clientStyling;\n this.stylingContainer.prepend(sheet);\n };\n this.setClientStylingURL = () => {\n let cssFile = document.createElement('style');\n setTimeout(() => {\n cssFile.innerHTML = this.clientStylingUrlContent;\n this.stylingContainer.prepend(cssFile);\n }, 1);\n };\n }\n // @TODO fix the `any` type :)\n connectedCallback() {\n this.showContent = !this.collapsed;\n }\n componentDidRender() {\n // start custom styling area\n if (!this.limitStylingAppends && this.stylingContainer) {\n if (this.clientStyling)\n this.setClientStyling();\n if (this.clientStylingUrlContent)\n this.setClientStylingURL();\n this.limitStylingAppends = true;\n }\n // end custom styling area\n }\n toggleContent() {\n this.showContent = !this.showContent;\n }\n deleteAction() {\n if (this.postMessage) {\n // @TODO maybe change the name type, this one sucks\n window.postMessage({ type: this.eventName }, window.location.href);\n }\n this.accordionEvent.emit();\n }\n render() {\n return (h(\"div\", { class: \"Wrapper\", ref: el => this.stylingContainer = el },\n h(\"div\", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() },\n h(\"p\", { class: \"Title\" }, this.headerTitle),\n h(\"p\", { class: \"Subtitle\" }, this.headerSubtitle),\n h(\"p\", { class: \"Subtitle Description\" }, this.description),\n h(\"span\", { class: \"Expand\" }, this.showContent ? '<' : '>')),\n this.showContent &&\n h(\"div\", null,\n h(\"div\", { class: \"Content\" },\n h(\"slot\", { name: 'accordionContent' }),\n this.footer && this.showContent &&\n h(\"div\", null, this.deleteTab &&\n h(\"span\", { class: \"ActionButton\", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));\n }\n static get is() { return \"helper-accordion\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-accordion.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-accordion.css\"]\n }; }\n static get properties() { return {\n \"ticketHistoryFlag\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Flag for ticket history\"\n },\n \"attribute\": \"ticket-history-flag\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"headerTitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Title (top header)\"\n },\n \"attribute\": \"header-title\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"headerSubtitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"SubTitle (top header)\"\n },\n \"attribute\": \"header-subtitle\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"description\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Description\"\n },\n \"attribute\": \"description\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"footer\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Enables footer content\"\n },\n \"attribute\": \"footer\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"deleteTab\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Enables footer button for tab deletion\"\n },\n \"attribute\": \"delete-tab\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"postMessage\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Activates postMessages as events for actions from the widget\"\n },\n \"attribute\": \"post-message\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"eventName\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Name of the event emitter by the action button\"\n },\n \"attribute\": \"event-name\",\n \"reflect\": true,\n \"defaultValue\": \"'helperAccordionAction'\"\n },\n \"collapsed\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Collapsed\"\n },\n \"attribute\": \"collapsed\",\n \"reflect\": true,\n \"defaultValue\": \"true\"\n },\n \"language\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Language\"\n },\n \"attribute\": \"language\",\n \"reflect\": true,\n \"defaultValue\": \"'en'\"\n },\n \"clientStyling\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via string\"\n },\n \"attribute\": \"client-styling\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"showContent\": {},\n \"limitStylingAppends\": {}\n }; }\n static get events() { return [{\n \"method\": \"accordionEvent\",\n \"name\": \"helperAccordionAction\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Action event\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }]; }\n}\n"],"version":3}
|
|
1
|
+
{"file":"helper-accordion2.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAC/C,MAAM,YAAY,GAAG;AACrB,EAAE,EAAE,EAAE;AACN,IAAI,YAAY,EAAE,eAAe;AACjC,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,YAAY,EAAE,gBAAgB;AAClC,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,YAAY,EAAE,qBAAqB;AACvC,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,YAAY,EAAE,aAAa;AAC/B,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,YAAY,EAAE,gBAAgB;AAClC,GAAG;AACH,CAAC,CAAC;AACK,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,UAAU,KAAK;AAC9C,EAAE,MAAM,IAAI,GAAG,UAAU,CAAC;AAC1B,EAAE,OAAO,YA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,IAAI,CAAC,cAAc,CAAC,EAClD,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,sBAAsB,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,EAC3D,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC,WAAW,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,EAC/D,IAAI,CAAC,WAAW;MACd,CAAC,CAAC,KAAK,EAAE,IAAI,EACX,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAC3B,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,EACvC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW;QAC7B,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS;UAC3B,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAE,EAAE,SAAS,CAAC,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;GACrI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["../helper-accordion/dist/collection/utils/locale.utils.js","../helper-accordion/dist/collection/components/helper-accordion/helper-accordion.css?tag=helper-accordion&encapsulation=shadow","../helper-accordion/dist/collection/components/helper-accordion/helper-accordion.js"],"sourcesContent":["const DEFAULT_LANGUAGE = 'en';\nconst SUPPORTED_LANGUAGES = ['ro', 'en', 'hr'];\nconst TRANSLATIONS = {\n en: {\n deleteTicket: 'Delete ticket'\n },\n ro: {\n deleteTicket: 'Sterge biletul'\n },\n fr: {\n deleteTicket: 'Supprimer le billet'\n },\n ar: {\n deleteTicket: 'حذف التذكرة'\n },\n hr: {\n deleteTicket: 'Izbriši listić'\n }\n};\nexport const translate = (key, customLang) => {\n const lang = customLang;\n return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];\n};\n","@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n display: block;\n font-family: \"Roboto\", sans-serif;\n}\n\n.Header {\n border-radius: 5px;\n background: #009993;\n display: flex;\n gap: 30px;\n border: 1px solid #009993;\n padding: 8px 10px;\n user-select: none;\n margin-bottom: 1px;\n cursor: pointer;\n}\n.Header:hover {\n background: #00ABA4;\n}\n.Header .Title,\n.Header .Subtitle,\n.Header .Description {\n margin: 0;\n font-size: 14px;\n color: #fff;\n text-transform: capitalize;\n}\n.Header .Expand {\n margin-left: auto;\n color: #FFF;\n width: 17px;\n height: 17px;\n cursor: pointer;\n text-align: center;\n transform: rotate(90deg);\n font-size: 20px;\n user-select: none;\n}\n\n.HeaderTicketHistory {\n border-radius: 4px;\n background: #F1F1F1;\n display: flex;\n gap: 30px;\n border: 1px solid #009993;\n padding: 8px 10px;\n user-select: none;\n margin-bottom: 5px;\n cursor: pointer;\n}\n.HeaderTicketHistory:hover {\n background: #00ABA4;\n}\n.HeaderTicketHistory .Title,\n.HeaderTicketHistory .Subtitle,\n.HeaderTicketHistory .Description {\n margin: 0;\n font-size: 14px;\n color: #000;\n}\n.HeaderTicketHistory .Expand {\n margin-left: auto;\n color: #FFF;\n width: 17px;\n height: 17px;\n cursor: pointer;\n text-align: center;\n transform: rotate(90deg);\n font-size: 20px;\n user-select: none;\n}\n\n.Content {\n border-radius: 0 0 4px 4px;\n background: #fff;\n border: 1px solid #009993;\n padding: 10px 15px;\n user-select: none;\n color: #000;\n margin-bottom: 10px;\n}\n\n.ActionButton {\n cursor: pointer;\n display: inline-block;\n border-radius: 4px;\n margin: 20px 0 10px;\n text-transform: uppercase;\n font-size: 12px;\n text-align: center;\n padding: 8px 20px;\n min-width: 80px;\n background: #FF3D00;\n border: 1px solid #FF3D00;\n color: #FFF;\n}\n.ActionButton:hover {\n background: #FF6536;\n border: 1px solid #FF3D00;\n}","import { Component, Prop, h, State, Event } from '@stencil/core';\nimport { translate } from '../../utils/locale.utils';\nexport class Accordion {\n constructor() {\n /**\n * Flag for ticket history\n */\n this.ticketHistoryFlag = false;\n /**\n * Title (top header)\n */\n this.headerTitle = '';\n /**\n * SubTitle (top header)\n */\n this.headerSubtitle = '';\n /**\n * Description\n */\n this.description = '';\n /**\n * Enables footer content\n */\n this.footer = false;\n /**\n * Enables footer button for tab deletion\n */\n this.deleteTab = false;\n /**\n * Activates postMessages as events for actions from the widget\n */\n this.postMessage = false;\n /**\n * Name of the event emitter by the action button\n */\n this.eventName = 'helperAccordionAction';\n /**\n * Collapsed\n */\n this.collapsed = true;\n /**\n * Language\n */\n this.language = 'en';\n /**\n * Client custom styling via string\n */\n this.clientStyling = '';\n /**\n * Client custom styling via url content\n */\n this.clientStylingUrlContent = '';\n this.limitStylingAppends = false;\n this.setClientStyling = () => {\n let sheet = document.createElement('style');\n sheet.innerHTML = this.clientStyling;\n this.stylingContainer.prepend(sheet);\n };\n this.setClientStylingURL = () => {\n let cssFile = document.createElement('style');\n setTimeout(() => {\n cssFile.innerHTML = this.clientStylingUrlContent;\n this.stylingContainer.prepend(cssFile);\n }, 1);\n };\n }\n // @TODO fix the `any` type :)\n connectedCallback() {\n this.showContent = !this.collapsed;\n }\n componentDidRender() {\n // start custom styling area\n if (!this.limitStylingAppends && this.stylingContainer) {\n if (this.clientStyling)\n this.setClientStyling();\n if (this.clientStylingUrlContent)\n this.setClientStylingURL();\n this.limitStylingAppends = true;\n }\n // end custom styling area\n }\n toggleContent() {\n this.showContent = !this.showContent;\n }\n deleteAction() {\n if (this.postMessage) {\n // @TODO maybe change the name type, this one sucks\n window.postMessage({ type: this.eventName }, window.location.href);\n }\n this.accordionEvent.emit();\n }\n render() {\n return (h(\"div\", { class: \"Wrapper\", ref: el => this.stylingContainer = el },\n h(\"div\", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() },\n h(\"p\", { class: \"Title\" }, this.headerTitle),\n h(\"p\", { class: \"Subtitle\" }, this.headerSubtitle),\n h(\"p\", { class: \"Subtitle Description\" }, this.description),\n h(\"span\", { class: \"Expand\" }, this.showContent ? '<' : '>')),\n this.showContent &&\n h(\"div\", null,\n h(\"div\", { class: \"Content\" },\n h(\"slot\", { name: 'accordionContent' }),\n this.footer && this.showContent &&\n h(\"div\", null, this.deleteTab &&\n h(\"span\", { class: \"ActionButton\", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));\n }\n static get is() { return \"helper-accordion\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-accordion.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-accordion.css\"]\n }; }\n static get properties() { return {\n \"ticketHistoryFlag\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Flag for ticket history\"\n },\n \"attribute\": \"ticket-history-flag\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"headerTitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Title (top header)\"\n },\n \"attribute\": \"header-title\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"headerSubtitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"SubTitle (top header)\"\n },\n \"attribute\": \"header-subtitle\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"description\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Description\"\n },\n \"attribute\": \"description\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"footer\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Enables footer content\"\n },\n \"attribute\": \"footer\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"deleteTab\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Enables footer button for tab deletion\"\n },\n \"attribute\": \"delete-tab\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"postMessage\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Activates postMessages as events for actions from the widget\"\n },\n \"attribute\": \"post-message\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"eventName\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Name of the event emitter by the action button\"\n },\n \"attribute\": \"event-name\",\n \"reflect\": true,\n \"defaultValue\": \"'helperAccordionAction'\"\n },\n \"collapsed\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Collapsed\"\n },\n \"attribute\": \"collapsed\",\n \"reflect\": true,\n \"defaultValue\": \"true\"\n },\n \"language\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Language\"\n },\n \"attribute\": \"language\",\n \"reflect\": true,\n \"defaultValue\": \"'en'\"\n },\n \"clientStyling\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via string\"\n },\n \"attribute\": \"client-styling\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"showContent\": {},\n \"limitStylingAppends\": {}\n }; }\n static get events() { return [{\n \"method\": \"accordionEvent\",\n \"name\": \"helperAccordionAction\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Action event\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }]; }\n}\n"],"version":3}
|