{"version":3,"sources":["../js/Help.js"],"names":["Help","SupportKey","Version","this","g_szSupportKey","g_szVersion","g_bHelpAnimating","prototype","toggleHelpMenu","g_oHelp","$","css","width","show","animate","right","hide","updateHelpMenu","updateHelpMenu_SupportKey","updateHelpMenu_VersionNumber","html","length","document","on","event","target","parents","id","window"],"mappings":"CAYC,WAEG,aAOH,SAASA,KAAKC,WAAYC,SAGzBC,KAAKC,eAAiBH,WAGtBE,KAAKE,YAAcH,QAGnBC,KAAKG,kBAAmB,EAMzBN,KAAKO,UAAUC,eAAiB,WAG1BC,QAAQH,mBAGZG,QAAQH,kBAAmB,EAGS,QAAhCI,EAAE,YAAYC,IAAI,YAGrBD,EAAE,YAAYC,IAAI,QAAS,EAAMD,EAAE,YAAYE,SAG/CF,EAAE,YAAYG,OAGdH,EAAE,YAAYI,QAAQ,CACrBC,MAAO,GACL,QAAS,WAGXN,QAAQH,kBAAmB,KAO5BI,EAAE,YAAYI,QAAQ,CACrBC,MAAO,EAAML,EAAE,YAAYE,SACzB,QAAS,WAGVF,EAAE,YAAYM,OAGfP,QAAQH,kBAAmB,MAS/BN,KAAKO,UAAUU,eAAiB,WAG/BR,QAAQS,4BAGRT,QAAQU,gCAMTnB,KAAKO,UAAUW,0BAA4B,WAG1CR,EAAE,qBAAqBU,KAA+B,MAA1BX,QAAQL,gBAA0D,EAAhCK,QAAQL,eAAeiB,OAAaZ,QAAQL,eAAiB,YAM5HJ,KAAKO,UAAUY,6BAA+B,WAG7CT,EAAE,kBAAkBU,KAA4B,MAAvBX,QAAQJ,aAAoD,EAA7BI,QAAQJ,YAAYgB,OAAaZ,QAAQJ,YAAc,YAMhHK,EAAEY,UAAUC,GAAG,QAAS,SAAUC,OAG5Bf,QAAQH,kBAAoD,QAAhCI,EAAE,YAAYC,IAAI,YAGA,GAA9CD,EAAEc,MAAMC,QAAQC,QAAQ,YAAYL,QAAkC,WAAnBG,MAAMC,OAAOE,IAGnElB,QAAQD,mBAMXoB,OAAO5B,KAAOA,KApHf","file":"Help-6a4fdbdc46.js","sourcesContent":["/*\r\n * Copyright (c) 2020 SGS Europe. All rights reserved.\r\n *\r\n * This program is the CONFIDENTIAL and PROPRIETARY property of 2020 SGS Europe.\r\n * Any unauthorised use, reproduction, or transfer of this program is strictly\r\n * prohibited.\r\n *\r\n * File Name:\tHelp.js\r\n *\r\n * Description:\tGeneric Greenlight Help code.\r\n */\r\n\r\n(function () {\r\n\r\n \"use strict\";\r\n\r\n /**\r\n * Initialises the help.\r\n * @param {string} SupportKey - The support key of the current session.\r\n * @param {string} Version - The version of the software.\r\n */\r\n\tfunction Help(SupportKey, Version) {\r\n\r\n\t\t// The support key of the current session.\r\n\t\tthis.g_szSupportKey = SupportKey;\r\n\r\n\t\t// The current version.\r\n\t\tthis.g_szVersion = Version;\r\n\r\n\t\t// If the help menu is in animation.\r\n\t\tthis.g_bHelpAnimating = false;\r\n\t};\r\n\r\n\t/**\r\n\t * Toggles the help menu.\r\n\t */\r\n\tHelp.prototype.toggleHelpMenu = function () {\r\n\r\n\t\t// If we are not already animating the help menu.\r\n\t\tif (!g_oHelp.g_bHelpAnimating) {\r\n\r\n\t\t\t// Set that the menu is currently animating.\r\n\t\t\tg_oHelp.g_bHelpAnimating = true;\r\n\r\n\t\t\t// If the help menu is currently shown.\r\n\t\t\tif ($(\"#divHelp\").css(\"display\") == \"none\") {\r\n\r\n\t\t\t\t// Ensure the menu is just off screen.\r\n\t\t\t\t$(\"#divHelp\").css(\"right\", 1 - + $(\"#divHelp\").width());\r\n\r\n\t\t\t\t// Show the menu.\r\n\t\t\t\t$(\"#divHelp\").show();\r\n\r\n\t\t\t\t// Slide the menu in from the right.\r\n\t\t\t\t$(\"#divHelp\").animate({\r\n\t\t\t\t\tright: 7\r\n\t\t\t\t}, 'swing', function () {\r\n\r\n\t\t\t\t\t// Set that we are no longer animating.\r\n\t\t\t\t\tg_oHelp.g_bHelpAnimating = false;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t// If the help menu is currently not shown.\r\n\t\t\telse {\r\n\r\n\t\t\t\t// Slide the menu out to the right.\r\n\t\t\t\t$(\"#divHelp\").animate({\r\n\t\t\t\t\tright: 1 - + $(\"#divHelp\").width()\r\n\t\t\t\t}, 'swing', function () {\r\n\r\n\t\t\t\t\t// Hide the menu once the animation has finished.\r\n\t\t\t\t\t\t$(\"#divHelp\").hide();\r\n\r\n\t\t\t\t\t// Set that we are no longer animating.\r\n\t\t\t\t\tg_oHelp.g_bHelpAnimating = false;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Updates the help menu.\r\n\t */\r\n\tHelp.prototype.updateHelpMenu = function () {\r\n\r\n\t\t// Update the session id.\r\n\t\tg_oHelp.updateHelpMenu_SupportKey();\r\n\r\n\t\t// Update the version number.\r\n\t\tg_oHelp.updateHelpMenu_VersionNumber();\r\n\t};\r\n\r\n\t/**\r\n\t * Updates the help menu support key.\r\n\t */\r\n\tHelp.prototype.updateHelpMenu_SupportKey = function () {\r\n\r\n\t\t// Upate the support key.\r\n\t\t$(\"#tdHelpSupportKey\").html(g_oHelp.g_szSupportKey != null && g_oHelp.g_szSupportKey.length > 0 ? g_oHelp.g_szSupportKey : \"Unknown\");\r\n\t};\r\n\r\n\t/**\r\n\t * Updates the help menu version number.\r\n\t */\r\n\tHelp.prototype.updateHelpMenu_VersionNumber = function () {\r\n\r\n\t\t// Upate the version number.\r\n\t\t$(\"#tdHelpVersion\").html(g_oHelp.g_szVersion != null && g_oHelp.g_szVersion.length > 0 ? g_oHelp.g_szVersion : \"Unknown\");\r\n\t};\r\n\r\n\t/*\r\n\t * Help Auto Closing.\r\n\t */\r\n\t$(document).on('click', function (event) {\r\n\r\n\t\t// If we are not already animating the help menu, the help menu is curreny open, and we want to close the menu.\r\n\t\tif (!g_oHelp.g_bHelpAnimating && $(\"#divHelp\").css(\"display\") != \"none\") {\r\n\r\n\t\t\t// If the click is outside of help menu.\r\n\t\t\tif ($(event.target).parents(\"#divHelp\").length == 0 && event.target.id != \"divHelp\") {\r\n\r\n\t\t\t\t// Close the menu.\r\n\t\t\t\tg_oHelp.toggleHelpMenu();\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\t// Add the viewer object to the window.\r\n\twindow.Help = Help;\r\n}());"]}