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AE,QAAQgE,SAAS,cAEvBd,GAAQ,EAAK,GACf,G","sources":["webpack://@sazka/web/./js/app/golden-wheel/pages/landing-page/_gw-landing-page.ts","webpack://@sazka/web/./js/app/golden-wheel/utils/gw-datalayer.ts","webpack://@sazka/web/../../libs/mobile-apps/use-webview-debug.ts","webpack://@sazka/web/../../libs/mobile-apps/mobile-app-integration.ts","webpack://@sazka/web/../../libs/utils/sazka-alert.ts"],"sourcesContent":["import { useNgSession } from \"@sazka/ng/ng-session\";\r\nimport { GwAnalytics } from \"@/golden-wheel/utils/gw-datalayer\";\r\nimport { isMobileApp, triggerMobileAppEvent } from \"@sazka/mobile-apps/mobile-app-integration\";\r\n\r\nGwAnalytics.pushHowToPlayShow();\r\n\r\n// use dom ready, because NG session init is in dom ready as well and in Firefox, this was causing issues\r\ndocument.ready(() => {\r\n    const { isLoggedIn } = useNgSession();\r\n\r\n    if (isLoggedIn.value) {\r\n        GwAnalytics.pushMainPageShow();\r\n    }\r\n\r\n    GwAnalytics.pushPageReady();\r\n\r\n    // trigger event for webview instead of opening links to lotteries\r\n    if (isMobileApp) {\r\n        document.querySelectorAll(\"a\").forEach((link) => {\r\n            if (link.href?.includes(\"/loterie\")) {\r\n                link.addEventListener(\"click\", (e) => {\r\n                    e.preventDefault();\r\n                    triggerMobileAppEvent(\"showBet\");\r\n                });\r\n            }\r\n        });\r\n    }\r\n});\r\n","export namespace GwAnalytics {\r\n    export function pushPageReady() {\r\n        dataLayer.push({\r\n            event: \"pageReady\",\r\n        });\r\n    }\r\n\r\n    // 2.10 Main page of Zlate Kolo\r\n    export function pushMainPageShow() {\r\n        dataLayer.push({\r\n            page: {\r\n                type: \"game\",\r\n                kind: \"game\",\r\n                gameCode: \"zlatekolo\",\r\n                gameCodeStrict: \"zlatekolo\",\r\n                verticalCode: \"loterie\",\r\n                verticalCodeStrict: \"loterie\",\r\n            },\r\n        });\r\n    }\r\n\r\n    // 2.20 How To Play – Main page of Zlate Kolo\r\n    export function pushHowToPlayShow() {\r\n        dataLayer.push({\r\n            page: {\r\n                type: \"game.howToPlay\",\r\n                kind: \"game.howToPlay\",\r\n                gameCode: \"zlatekolo\",\r\n                gameCodeStrict: \"zlatekolo\",\r\n                verticalCode: \"loterie\",\r\n                verticalCodeStrict: \"loterie\",\r\n            },\r\n        });\r\n    }\r\n\r\n    // 2.30 Game Detail - Zlate Kolo\r\n    export function pushGoldenWheelShow() {\r\n        dataLayer.push({\r\n            page: {\r\n                type: \"game.detail\",\r\n                kind: \"game.detail\",\r\n                gameCode: \"zlatekolo\",\r\n                gameCodeStrict: \"zlatekolo\",\r\n                verticalCode: \"loterie\",\r\n                verticalCodeStrict: \"loterie\",\r\n            },\r\n        });\r\n\r\n        dataLayer.push({\r\n            event: \"pageReady\",\r\n        });\r\n    }\r\n\r\n    // 2.35 Impress Coins – Zlate Kolo\r\n    export function pushGoldenWheelImpressCoins(coins: string) {\r\n        dataLayer.push({\r\n            event: \"action.impressCoins.zlateKolo\",\r\n            action: {\r\n                impressCoins: {\r\n                    label: coins,\r\n                },\r\n            },\r\n        });\r\n    }\r\n\r\n    // 2.40 Game Error\r\n    export function pushGoldenWheelGameError(errorCode: string) {\r\n        let errorMessage;\r\n        switch (errorCode) {\r\n            case \"SZLS:GW101\":\r\n                errorMessage = \"Segment has no active Wheel\";\r\n                break;\r\n            case \"SZLS:GW201\":\r\n                errorMessage = \"Player has no Player Data (Redis)\";\r\n                break;\r\n            case \"SZLS:GW202\":\r\n                errorMessage = \"Player has no Bonus Wallet (Redis)\";\r\n                break;\r\n            case \"SZLS:GW301\":\r\n                errorMessage = \"Wheel does not exists\";\r\n                break;\r\n            case \"SZLS:GW302\":\r\n                errorMessage = \"Wheel has invalid Bonus tasks\";\r\n                break;\r\n            case \"SZLS:GW303 \":\r\n                errorMessage = \"Wheel has invalid Awards\";\r\n                break;\r\n        }\r\n\r\n        dataLayer.push({\r\n            page: {\r\n                type: \"game.error\",\r\n                kind: \"game.error\",\r\n                gameCode: \"zlatekolo\",\r\n                gameCodeStrict: \"zlatekolo\",\r\n                verticalCode: \"loterie\",\r\n                verticalCodeStrict: \"loterie\",\r\n                error: {\r\n                    type: errorCode, // error code\r\n                    message: errorMessage, // error message from corresponding error code\r\n                },\r\n            },\r\n        });\r\n    }\r\n\r\n    // 2.50 - 2.80 errors\r\n    export function pushGoldenWheelError(error: string) {\r\n        let type;\r\n        switch (error) {\r\n            case \"Něco se nepovedlo, už na tom pracujeme\":\r\n                type = \"game.wheelStopped\";\r\n                break;\r\n            case \"Jen pro přihlášené\":\r\n                type = \"game.notLoggedIn\";\r\n                break;\r\n            case \"Jejda, něco se nepovedlo\":\r\n                type = \"game.userExluded\";\r\n                break;\r\n            case \"Dokončete registraci a vytočte si výhru\":\r\n                type = \"game.notRegistered\";\r\n                break;\r\n        }\r\n\r\n        dataLayer.push({\r\n            page: {\r\n                type: type,\r\n                kind: type,\r\n                gameCode: \"zlatekolo\",\r\n                gameCodeStrict: \"zlatekolo\",\r\n                verticalCode: \"loterie\",\r\n                verticalCodeStrict: \"loterie\",\r\n            },\r\n        });\r\n    }\r\n\r\n    // 2.60 Game Not Logged In\r\n    export function pushGameNotLoggedIn() {\r\n        dataLayer.push({\r\n            page: {\r\n                type: \"game.notLoggedIn\",\r\n                kind: \"game.notLoggedIn\",\r\n                gameCode: \"zlatekolo\",\r\n                gameCodeStrict: \"zlatekolo\",\r\n                verticalCode: \"loterie\",\r\n                verticalCodeStrict: \"loterie\",\r\n            },\r\n        });\r\n\r\n        dataLayer.push({\r\n            event: \"pageReady\",\r\n        });\r\n    }\r\n\r\n    // 3.10 action.spinSuccess.zlatekolo–Successful spin\r\n    export function pushWheelStartSuccess() {\r\n        dataLayer.push({ event: \"action.spinSuccess.zlatekolo\" });\r\n    }\r\n\r\n    // 3.20 action.spinError.zlatekolo–Spin error\r\n    export function pushWheelStartError(errorMessage: string) {\r\n        dataLayer.push({\r\n            event: \"action.spinError.zlatekolo\",\r\n            action: {\r\n                spinError: {\r\n                    label: errorMessage, // Error message\r\n                },\r\n            },\r\n        });\r\n    }\r\n\r\n    /* Manual stopping is not used in current version */\r\n    // 3.30 action.stopSuccess.zlatekolo–Successful stopping of the spin\r\n    // export function pushWheelStopSuccess() {\r\n    //  dataLayer.push({ event: \"action.stopSuccess.zlatekolo\" });\r\n    // }\r\n\r\n    // 3.40 action.stopError.zlatekolo – Stop error\r\n    // export function pushWheelStopError(errorMessage: string) {\r\n    //     dataLayer.push({\r\n    //         event: \"action.stopError.zlatekolo\",\r\n    //         action: {\r\n    //             stopError: {\r\n    //                 label: errorMessage, // Error message\r\n    //             },\r\n    //         },\r\n    //     });\r\n    // }\r\n\r\n    // 3.50 action.win.zlatekolo – Win Prize on Zlatekolo\r\n    export function pushWheelWinPrice(prize: string) {\r\n        dataLayer.push({\r\n            event: \"action.win.zlatekolo\",\r\n            action: {\r\n                win: {\r\n                    label: prize, // Prize winned\r\n                },\r\n            },\r\n        });\r\n    }\r\n\r\n    // 3.60 action.task.zlateKolo - Deposit button click on Golden Wheel\r\n    export function pushWheelDepositClick(buttonPosition: string, currentPoints: string, hasBadge: boolean) {\r\n        dataLayer.push({\r\n            event: \"action.task.zlateKolo\",\r\n            action: {\r\n                task: {\r\n                    label: hasBadge ? \"novinka\" : null,\r\n                    eventProperty1: buttonPosition, // position of the button\r\n                    eventProperty2: \"deposit\", // task identifier\r\n                    eventProperty3: currentPoints, // current number of golden coins out of 10;\r\n                },\r\n            },\r\n        });\r\n    }\r\n\r\n    // 3.65 action.task.zlateKolo - When user opens a lottery page\r\n    export function pushBetPageLoad(\r\n        buttonPosition: string,\r\n        currentPoints: string,\r\n        vertical: string,\r\n        hasBadge: boolean\r\n    ) {\r\n        dataLayer.push({\r\n            event: \"action.task.zlateKolo\",\r\n            action: {\r\n                task: {\r\n                    label: hasBadge ? \"novinka\" : null,\r\n                    eventProperty1: buttonPosition, // position of the button; for this case 3 or 4\r\n                    eventProperty2: \"bet\", // task identifier\r\n                    eventProperty3: currentPoints, // current number of golden coins out of 10;\r\n                    eventProperty4: vertical, // vertical, could be either lottery or escratches\r\n                },\r\n            },\r\n        });\r\n    }\r\n\r\n    // 4.10  Zlate kolo impression\r\n    export function pushPromotionsBannerShow(currentPoints: number) {\r\n        dataLayer.push({\r\n            event: \"action.impress.promos\",\r\n            action: {\r\n                impress: {\r\n                    promos: [\r\n                        {\r\n                            id: \"zlateKolo.popup\",\r\n                            name: \"zlateKolo.popup\",\r\n                            creative: \"Zlaté kolo\",\r\n                            position: \"popup.bottom\",\r\n                            eventProperty1: currentPoints, // current number of golden coins out of 10;\r\n                        },\r\n                    ],\r\n                },\r\n            },\r\n        });\r\n    }\r\n\r\n    // 4.20 Clicking on Zlate kolo banner\r\n    export function pushPromotionsBannerPopupClick(currentPoints: number) {\r\n        dataLayer.push({\r\n            event: \"action.show.promos\",\r\n            action: {\r\n                show: {\r\n                    promos: [\r\n                        {\r\n                            id: \"zlateKolo.popup\",\r\n                            name: \"zlateKolo.popup\",\r\n                            creative: \"Zlaté kolo\",\r\n                            position: \"popup.bottom\",\r\n                            eventProperty1: currentPoints, // current number of golden coins out of 10;\r\n                        },\r\n                    ],\r\n                },\r\n            },\r\n        });\r\n    }\r\n\r\n    export function pushPromotionBannerPopupClose(currentPoints: number) {\r\n        dataLayer.push({\r\n            event: \"action.show.promos\",\r\n            action: {\r\n                show: {\r\n                    promos: [\r\n                        {\r\n                            id: \"zlateKolo.popup.close\",\r\n                            name: \"zlateKolo.popup\",\r\n                            creative: \"Zlaté kolo\",\r\n                            position: \"popup.bottom\",\r\n                            eventProperty: currentPoints, // current number of golden coins out of 10;\r\n                        },\r\n                    ],\r\n                },\r\n            },\r\n        });\r\n    }\r\n\r\n    // 5.10\r\n    export function pushPromotionsBannerSiteImpression(bannerId: string, imgUrl: string) {\r\n        dataLayer.push({\r\n            event: \"action.impress.promos\",\r\n            action: {\r\n                impress: {\r\n                    promos: [\r\n                        {\r\n                            id: bannerId,\r\n                            name: \"zlateKolo.site.banner\",\r\n                            creative: imgUrl,\r\n                            position: \"zlateKolo.site.banner\",\r\n                        },\r\n                    ],\r\n                },\r\n            },\r\n        });\r\n    }\r\n\r\n    // 5.20 Clicking on banner\r\n    export function pushPromotionsBannerSiteClick(bannerId: string, imgUrl: string) {\r\n        dataLayer.push({\r\n            event: \"action.show.promos\",\r\n            action: {\r\n                show: {\r\n                    promos: [\r\n                        {\r\n                            id: bannerId,\r\n                            name: \"zlateKolo.site.banner\",\r\n                            creative: imgUrl,\r\n                            position: \"zlateKolo.site.banner\",\r\n                        },\r\n                    ],\r\n                },\r\n            },\r\n        });\r\n    }\r\n\r\n    // 5.20 Bonus banner impression\r\n    export function pushBonusBannerImpression(bannerText: string) {\r\n        dataLayer.push({\r\n            event: \"action.impress.promos\",\r\n            action: {\r\n                impress: {\r\n                    promos: [\r\n                        {\r\n                            id: \"zlateKolo.bonusBanner\",\r\n                            name: \"zlateKolo.bonusBanner\",\r\n                            creative: bannerText,\r\n                            position: \"middle\",\r\n                        },\r\n                    ],\r\n                },\r\n            },\r\n        });\r\n    }\r\n\r\n    // 5.25 When user clicks to claim the bonus\r\n    export function pushBonusBannerClick(bannerText: string) {\r\n        dataLayer.push({\r\n            event: \"action.show.promos\",\r\n            action: {\r\n                show: {\r\n                    promos: [\r\n                        {\r\n                            id: \"zlateKolo.bonusBanner\",\r\n                            name: \"zlateKolo.bonusBanner\",\r\n                            creative: bannerText,\r\n                            position: \"middle\",\r\n                        },\r\n                    ],\r\n                },\r\n            },\r\n        });\r\n    }\r\n\r\n    // 5.35 Bonus banner close\r\n    export function pushBonusBannerClose(bannerText: string) {\r\n        dataLayer.push({\r\n            event: \"action.show.promos\",\r\n            action: {\r\n                show: {\r\n                    promos: [\r\n                        {\r\n                            id: \"zlateKolo.bonusBanner.close\",\r\n                            name: \"zlateKolo.bonusBanner\",\r\n                            creative: bannerText,\r\n                            position: \"middle\",\r\n                        },\r\n                    ],\r\n                },\r\n            },\r\n        });\r\n    }\r\n}\r\n","import { useNgSession } from \"@sazka/ng/ng-session\";\r\nimport { sazkaAlert } from \"@sazka/utils/sazka-alert\";\r\nimport { ref } from \"vue\";\r\nimport $ from \"jquery\";\r\n\r\nconst webViewDebugModeOn = ref(false);\r\n\r\nexport default function useWebviewDebugMode() {\r\n    const initWebviewDebugMode = (): void => {\r\n        try {\r\n            if (environment.env == \"Production\") return;\r\n            // Create debug button\r\n            const debugBtn = document.createElement(\"button\");\r\n            debugBtn.className = \"webview-debug\";\r\n            debugBtn.attributes[\"type\"] = \"button\";\r\n            debugBtn.onclick = () => {\r\n                webViewDebugModeOn.value = !webViewDebugModeOn.value;\r\n                $(\".webview-debug__mode\").toggleClass(\"webview-debug__mode--active\");\r\n                if (webViewDebugModeOn.value) {\r\n                    const { session } = useNgSession();\r\n\r\n                    sazkaAlert(\r\n                        \"WebView\",\r\n                        `Aplikace: ${environment.appName}<br/>\r\n                        URL: ${window.location.href}<br/>\r\n                        PlayerId z BE: ${window.player?.id || \"---\"}<br/>\r\n                        PlayerId od NG: ${session.value?.PlayerID || \"---\"}<br/>\r\n                        SessionToken z BE: ${window.player?.sessionToken || \"---\"}<br/>\r\n                        SessionToken od NG: ${session.value?.SessionToken || \"---\"}<br/>\r\n                    `\r\n                    );\r\n                }\r\n            };\r\n\r\n            debugBtn.insertAdjacentHTML(\r\n                \"beforeend\",\r\n                '<span>WebView Debug</span> <span class=\"webview-debug__mode\">Active</span>'\r\n            );\r\n            document.querySelector(\"body\").appendChild(debugBtn);\r\n        } catch (e) {\r\n            console.error(`WebView Debug Mode Initialiazation Failed: ${e}`);\r\n        }\r\n    };\r\n\r\n    const showEventAlert = (interfaceName: string, methodName: string, argument: string): void => {\r\n        try {\r\n            if (!webViewDebugModeOn.value) return;\r\n\r\n            const eventMessage =\r\n                argument !== null && argument !== undefined\r\n                    ? `Interface ${interfaceName}; method ${methodName}('${argument}')`\r\n                    : `Interface ${interfaceName}; method ${methodName}()`;\r\n            confirm(eventMessage);\r\n        } catch (e) {\r\n            console.error(`Show Alert For WebView Debug Mode Failed: ${e}`);\r\n        }\r\n    };\r\n\r\n    return {\r\n        showEventAlert,\r\n        initWebviewDebugMode,\r\n    };\r\n}\r\n","import { InterfaceName, MobileAppMethodName } from \"./mobile-app-models\";\r\nimport useWebviewDebugMode from \"./use-webview-debug\";\r\n\r\nconst { initWebviewDebugMode, showEventAlert } = useWebviewDebugMode();\r\n\r\nexport function triggerMobileAppEvent(\r\n    methodName: MobileAppMethodName,\r\n    argument?: string,\r\n    interfaceName?: InterfaceName\r\n): void;\r\nexport function triggerMobileAppEvent(methodName: string, argument?: string, interfaceName?: InterfaceName): void;\r\nexport function triggerMobileAppEvent(\r\n    methodName: string,\r\n    argument?: string,\r\n    interfaceName: InterfaceName = \"generalIntegration\"\r\n): void {\r\n    const anyWindow = window as any;\r\n\r\n    // for iOS WebKit\r\n    if (typeof anyWindow.webkit !== \"undefined\") {\r\n        showEventAlert(interfaceName, methodName, argument);\r\n        argument !== null && argument !== undefined\r\n            ? anyWindow.webkit.messageHandlers[interfaceName].postMessage(\r\n                  JSON.stringify({ type: methodName, parameters: argument })\r\n              )\r\n            : anyWindow.webkit.messageHandlers[interfaceName]?.postMessage(JSON.stringify({ type: methodName }));\r\n    }\r\n\r\n    // for Android WebView\r\n    const androindInterface = anyWindow[interfaceName];\r\n    if (androindInterface?.hasOwnProperty(methodName)) {\r\n        showEventAlert(interfaceName, methodName, argument);\r\n        argument !== null && argument !== undefined\r\n            ? androindInterface[methodName](argument)\r\n            : androindInterface[methodName]();\r\n    }\r\n\r\n    // TODO remove after Adastra deploy\r\n    if (interfaceName == \"generalIntegration\") {\r\n        triggerMobileAppEvent(methodName, argument, \"bannerIntegration\");\r\n        triggerMobileAppEvent(methodName, argument, \"goldenWheelIntegration\");\r\n    }\r\n}\r\n\r\nfunction initAutoMobileAppEvents() {\r\n    document.querySelectorAll(\"[data-app-event]:not([data-app-event=''])\").forEach((item) => {\r\n        item.addEventListener(\"click\", (e) => {\r\n            e.preventDefault();\r\n            const eventName = (e.currentTarget as HTMLElement).getAttribute(\"data-app-event\");\r\n            const argument = (e.currentTarget as HTMLElement).getAttribute(\"data-app-argument\");\r\n\r\n            triggerMobileAppEvent(eventName, argument);\r\n        });\r\n    });\r\n}\r\n\r\nexport const isMobileApp = environment.isInAppView || false;\r\n\r\nexport function initMobileAppFeatures() {\r\n    if (isMobileApp) {\r\n        initAutoMobileAppEvents();\r\n\r\n        // WebView Debug Mode\r\n        initWebviewDebugMode();\r\n    }\r\n}\r\n","/**\r\n * @deprecated Use showAlert a DS component\r\n */\r\nexport const sazkaAlert = (\r\n    title: string,\r\n    text: string = null,\r\n    linkText: string = null,\r\n    link: string = null,\r\n    buttonText = \"OK\",\r\n    customHtml = \"\",\r\n    hasExtraButton = true,\r\n    errorCode?: number\r\n): Promise<boolean> => {\r\n    return new Promise((resolve) => {\r\n        const heading = $(\r\n            `<h2 class=\"sazka-alert__title\" style=\"visibility:hidden; display:inline-block;\">${title}</h2>`\r\n        );\r\n        $(\"body\").append(heading);\r\n        const maxWidth = Math.max(heading.width(), 300);\r\n        heading.remove();\r\n\r\n        const template = `\r\n        <div class=\"modal fade sazka-alert\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\">\r\n            <div class=\"modal-dialog modal-dialog-centered\">\r\n                <div class=\"modal-content modal-content--without-close\">\r\n                    ${errorCode ? `<span class='sazka-alert__ecode'>ecode: ${errorCode}</span>` : \"\"}\r\n                    <h2 class=\"sazka-alert__title\">${title}</h2>\r\n                    ${text ? `<p class=\"sazka-alert__text\" style=\"max-width: ${maxWidth}px;\">${text}</p>` : \"\"}\r\n                    <div class=\"sazka-alert__button-group\">\r\n                        ${linkText ? `<a class=\"btn btn-primary sazka-alert--btn\" href=\"${link}\">${linkText}</a>` : \"\"}\r\n                        ${\r\n                            hasExtraButton\r\n                                ? `<button type=\"button\" class=\"btn ${\r\n                                      linkText ? \"btn-outline-primary\" : \"btn-primary\"\r\n                                  }\" data-dismiss=\"modal\">${buttonText}</button>`\r\n                                : \"\"\r\n                        }\r\n                    </div>\r\n                    ${customHtml}\r\n                </div>\r\n            </div>\r\n        </div>`;\r\n\r\n        const $modal = $(template);\r\n        $(\"body\").append($modal);\r\n        $modal.modal(\"show\");\r\n        $modal.find(\".sazka-alert--btn\").on(\"click\", () => {\r\n            resolve(false);\r\n            $modal.modal(\"hide\");\r\n        });\r\n        $modal.on(\"hidden.bs.modal\", () => {\r\n            $modal.modal(\"dispose\").remove();\r\n            if ($(\".modal:visible\").length) {\r\n                $(\"body\").addClass(\"modal-open\");\r\n            }\r\n            resolve(true);\r\n        });\r\n    });\r\n};\r\n"],"names":["GwAnalytics","pushHowToPlayShow","document","ready","isLoggedIn","useNgSession","value","pushMainPageShow","pushPageReady","isMobileApp","querySelectorAll","forEach","link","_link$href","href","includes","addEventListener","e","preventDefault","triggerMobileAppEvent","dataLayer","push","event","page","type","kind","gameCode","gameCodeStrict","verticalCode","verticalCodeStrict","pushGoldenWheelShow","pushGoldenWheelImpressCoins","coins","action","impressCoins","label","pushGoldenWheelGameError","errorCode","errorMessage","error","message","pushGoldenWheelError","pushGameNotLoggedIn","pushWheelStartSuccess","pushWheelStartError","spinError","pushWheelWinPrice","prize","win","pushWheelDepositClick","buttonPosition","currentPoints","hasBadge","task","eventProperty1","eventProperty2","eventProperty3","pushBetPageLoad","vertical","eventProperty4","pushPromotionsBannerShow","impress","promos","id","name","creative","position","pushPromotionsBannerPopupClick","show","pushPromotionBannerPopupClose","eventProperty","pushPromotionsBannerSiteImpression","bannerId","imgUrl","pushPromotionsBannerSiteClick","pushBonusBannerImpression","bannerText","pushBonusBannerClick","pushBonusBannerClose","webViewDebugModeOn","ref","useWebviewDebugMode","initWebviewDebugMode","environment","env","debugBtn","createElement","className","attributes","onclick","$","toggleClass","_window$player","_session$value","_window$player2","_session$value2","session","sazkaAlert","appName","window","location","player","PlayerID","sessionToken","SessionToken","insertAdjacentHTML","querySelector","appendChild","console","showEventAlert","interfaceName","methodName","argument","eventMessage","undefined","confirm","anyWindow","_anyWindow$webkit$mes","webkit","messageHandlers","postMessage","JSON","stringify","parameters","androindInterface","hasOwnProperty","initAutoMobileAppEvents","item","eventName","currentTarget","getAttribute","isInAppView","initMobileAppFeatures","title","text","linkText","buttonText","customHtml","hasExtraButton","Promise","resolve","heading","append","maxWidth","Math","max","width","remove","template","$modal","modal","find","on","length","addClass"],"sourceRoot":""}