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aAAa,CAAC,CAAC;QAE7B,aAAa,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;IAED,IAAI,OAAO,+BAA+B,KAAK,UAAU,EAAE,CAAC;QAC3D,+DAA+D;QAC/D,+BAA+B,CAAC,YAAY,CAAC,CAAC;IAC/C,CAAC;SAAM,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE,CAAC;QACzC,4CAA4C;QAC5C,YAAY,EAAE,CAAC;IAChB,CAAC;AACF,CAAC,EAzCS,aAAa,KAAb,aAAa,QAyCtB","sourcesContent":["// code for creating cookies policy agreement footer\r\n\r\ndeclare const g_cookiesFooterText: string; // declared on the page by WebAccess\r\ndeclare const g_cookiesFooterButtonText: string; // declared on the page by WebAccess\r\n\r\nnamespace CookiesFooter {\r\n\tfunction createFooter(): void {\r\n\t\tif (typeof (jQuery) === \"undefined\") {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// because in flexibleforms jQuery is no more present after boot we store it\r\n\t\t// also in some old pages jquery is included after this script, so not transferable by anonymous top function\r\n\t\tconst jQueryHandler = jQuery;\r\n\r\n\t\tconst footer = jQueryHandler(\"
\").addClass(\"footer_disclaimer\").attr(\"id\", \"cookie_disclaimer_container\");\r\n\r\n\t\tconst textSection = jQueryHandler(\"\").addClass(\"footer_disclaimer_message_container\").html(g_cookiesFooterText);\r\n\t\tconst buttonSection = jQueryHandler(\"\").addClass(\"footer_disclaimer_button_container\");\r\n\t\tbuttonSection.css(\"padding-top\", \"10px\");\r\n\r\n\t\tconst agreeButton = jQueryHandler(\"\").attr(\"id\", \"cookies-footer-agree-button\").addClass(\"Button Button_Enabled\").text(g_cookiesFooterButtonText);\r\n\t\tagreeButton.click(() => {\r\n\t\t\tjQueryHandler.ajax(\r\n\t\t\t\t{\r\n\t\t\t\t\turl: GetServiceSessionUrl(null, \"acceptcookiepolicy\")\r\n\t\t\t\t});\r\n\r\n\t\t\tfooter.hide();\r\n\t\t});\r\n\r\n\t\tbuttonSection.append(agreeButton);\r\n\r\n\t\tfooter.append(textSection);\r\n\t\tfooter.append(buttonSection);\r\n\r\n\t\tjQueryHandler(\"body\").prepend(footer);\r\n\t}\r\n\r\n\tif (typeof RegisterOnLoadWithMSAjaxToolKit === \"function\") {\r\n\t\t// To be sure that jQuery is initialised on old pages (xuf ...)\r\n\t\tRegisterOnLoadWithMSAjaxToolKit(createFooter);\r\n\t} else if (typeof jQuery === \"function\") {\r\n\t\t// if no clitools, call directly initializer\r\n\t\tcreateFooter();\r\n\t}\r\n}\r\n"]}