( function() {  var mapping = [{"appname":"", "appid":"CSP_APPS_PIC32MM_CCP_CAPTURE_MODE", "path":"GUID-143F555B-4027-44DE-BDDF-3B895E9AE60D.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_CCP_COMPARE_MODE", "path":"GUID-73C6258D-10A6-46BD-948E-AC6B9DA8802F.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_DMAC_MEMORY_TRANSFER", "path":"GUID-11C0B66C-05A6-4D9F-B5EE-352542443A19.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_I2C_EEPROM_READ_WRITE", "path":"GUID-E7DDA819-7419-4B6D-8A19-AE5716B13EE5.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_RTCC_ALARM_INTERRUPT", "path":"GUID-A042AD22-45C2-4343-89A5-5E5330597A25.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_SPI_EEPROM_WRITE_READ", "path":"GUID-57A9D8E8-CAD5-4FD3-A709-4373F2F09171.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_SPI_HOST_READ_WRITE_TEST_APPLICATION", "path":"GUID-80C497DA-3366-45A2-AA3F-9DF001234EA4.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_UART_ECHO_INTERRUPT", "path":"GUID-7223774A-F834-4DA6-A705-F815DB651AD1.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_UART_RING_BUFFER", "path":"GUID-0CC0B5A8-926F-4671-888E-52BCD5740D47.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_ADC_INTERRUPT", "path":"GUID-22834821-B42B-411D-A30C-AAF13DD59605.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_INTRODUCTION", "path":"GUID-E81E911A-5EFD-4F20-8D7C-0CA0EAB89D64.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_CCP_TIMER_MODE", "path":"GUID-A77936FD-E0B4-4ACF-9031-CE5D279CC28B.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_WDT_TIMEOUT", "path":"GUID-C9F20359-C9E4-452C-88B7-B745AE3E05A8.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_TMR1_PERIODIC_INTERRUPT", "path":"GUID-AA1ADFE8-F055-4397-959D-E43321EBB4A0.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_TMR_PERIODIC_INTERRUPT", "path":"GUID-DAEA62EA-342E-43C8-B931-33F47E725D8E.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_SPI_CLIENT_READ_WRITE", "path":"GUID-736343E0-55C4-404A-8135-5423D198A0B1.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_SPI_INTERRUPT", "path":"GUID-92BFA352-7581-49F0-9200-8EAFF72806D9.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_RCON_RESET_HANDLER", "path":"GUID-AD82A1E4-1F81-426E-BDAF-F0067D89FDB4.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_NVM_FLASH_READ_WRITE", "path":"GUID-2BEF92D8-0210-4C89-9D3F-D432AF26A190.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_I2C_EEPROM_EMULATION_I2C_CLIENT", "path":"GUID-56CFB477-810C-445E-80EF-83142417F259.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_GPIO_INTERRUPT", "path":"GUID-F8B49880-87B5-465D-8911-18C274D060F4.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_DMAC_USART_ECHO", "path":"GUID-ABEFBA05-9A4A-4381-BFF0-268FEE65FF7A.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_CRC32_GENERATION", "path":"GUID-5B76A78E-6220-4D8B-932D-098E0DFFCB4C.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_CORETIMER_PERIODIC_TIMEOUT", "path":"GUID-EFDC1B3B-FEE5-415F-ACB3-9D012DC41508.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_CMP_CONFIGURABLE_REFERENCE", "path":"GUID-6E7F36F4-A1E9-4F15-95DC-D2391A899268.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_CLOCK_CONFIGURATION", "path":"GUID-64041F19-4C87-4EB0-89EC-51C284EDF84C.html"},{"appname":"", "appid":"CSP_APPS_PIC32MM_CLC_MANCHESTER_ENCODER", "path":"GUID-675F3009-54AD-4312-83C8-18F6F5A9FB7F.html"}];
            var mchp = (function (mchp) {
                var mchp = mchp || {};
                var mapping = [];
        
                mchp.utils = {};
        
                mchp.utils.getQueryParam = function (name, url = window.location.href) {
                  name = name.replace(/[\[\]]/g, "\\$&");
                  var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
                    results = regex.exec(url);
                  if (!results) return null;
                  if (!results[2]) return "";
                  return decodeURIComponent(results[2].replace(/\+/g, " "));
                };

                mchp.utils.isFirefox = typeof InstallTrigger !== 'undefined';
        
                mchp.init = function (options) {
                  mchp.mapping = options.mapping || [];
                  mchp.bindEvents();
                };
        
                mchp.bindEvents = function () {
                    if (mchp.utils.isFirefox) {
                      window.onload = mchp.checkRedirect;
                    } else {
                      document.onreadystatechange = mchp.checkRedirect;
                    }
                };

                mchp.checkRedirect = function() {
                  var contextId = mchp.utils.getQueryParam("contextId") || "";
                  if (contextId && contextId != undefined) {
                    var record = mchp.mapping.find(function(x){
                      return x.appid && x.appid.toLowerCase() == contextId.toLowerCase();
                    });
                    if (record && record.path) {
                      window.stop();
                      window.location = record.path;
                    }
                  }
                };
        
                return {
                  init: mchp.init,
                };
              })();
        
              mchp.init({
                mapping: mapping
              });

        })();