{"version":3,"sources":["00-base/global/global.js"],"names":["$","Drupal","behaviors","addJSClass","attach","context","addClass","targetBrowsersOS","navigator","appVersion","indexOf","userAgent","jQuery"],"mappings":"aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;IA4BA;AACA;AACA;AACA;AAEA,CAAC,SAAUA,CAAV,CAAaC,CAAb,CAAqB,CAEpB,aAEA;AAOA;AANAA,CAAM,CAACC,SAAP,CAAiBC,UAAjB,CAA8B,CAC5BC,MAAM,CAAE,WAAUC,CAAV,CAAmB,CACzBL,CAAC,CAAC,MAAD,CAASK,CAAT,CAAD,CAAmBC,QAAnB,CAA4B,IAA5B,CACD,CAH2B,CALV,CAYpBL,CAAM,CAACC,SAAP,CAAiBK,gBAAjB,CAAoC,CAClCH,MAAM,CAAE,WAAUC,CAAV,CAAmB,CAEgB,CAAC,CAAtC,EAAAG,SAAS,CAACC,UAAV,CAAqBC,OAArB,CAA6B,KAA7B,CAFqB,CAMvBV,CAAC,CAAC,MAAD,CAASK,CAAT,CAAD,CAAmBC,QAAnB,CAA4B,IAA5B,CANuB,CAGvBN,CAAC,CAAC,MAAD,CAASK,CAAT,CAAD,CAAmBC,QAAnB,CAA4B,KAA5B,CAHuB,CASmB,CAAC,CAAzC,CAAAE,SAAS,CAACG,SAAV,CAAoBD,OAApB,CAA4B,QAA5B,CATqB,EAUvBV,CAAC,CAAC,MAAD,CAASK,CAAT,CAAD,CAAmBC,QAAnB,CAA4B,QAA5B,CAVuB,CAYoB,CAAC,CAA1C,EAAAE,SAAS,CAACG,SAAV,CAAoBD,OAApB,CAA4B,QAA5B,GAAwF,CAAC,CAA1C,EAAAF,SAAS,CAACG,SAAV,CAAoBD,OAApB,CAA4B,QAA5B,CAZ1B,EAavBV,CAAC,CAAC,MAAD,CAASK,CAAT,CAAD,CAAmBC,QAAnB,CAA4B,QAA5B,CAbuB,CAeoB,CAAC,CAA1C,CAAAE,SAAS,CAACG,SAAV,CAAoBD,OAApB,CAA4B,SAA5B,CAfqB,EAgBvBV,CAAC,CAAC,MAAD,CAASK,CAAT,CAAD,CAAmBC,QAAnB,CAA4B,SAA5B,CAhBuB,EAkBiB,CAAC,CAAvC,CAAAE,SAAS,CAACG,SAAV,CAAoBD,OAApB,CAA4B,MAA5B,GAAuF,CAA3C,CAAAF,SAAS,CAACC,UAAV,CAAqBC,OAArB,CAA6B,UAA7B,CAlBvB,GAmBvBV,CAAC,CAAC,MAAD,CAASK,CAAT,CAAD,CAAmBC,QAAnB,CAA4B,IAA5B,CAnBuB,CAsBuB,CAAC,CAA7C,GAAAE,SAAS,CAACC,UAAV,CAAqBC,OAArB,CAA6B,SAA7B,CAtBqB,EAuBvBV,CAAC,CAAC,MAAD,CAASK,CAAT,CAAD,CAAmBC,QAAnB,CAA4B,MAA5B,CAvBuB,CA0BoB,CAAC,CAA1C,GAAAE,SAAS,CAACC,UAAV,CAAqBC,OAArB,CAA6B,MAA7B,CA1BqB,EA2BvBV,CAAC,CAAC,MAAD,CAASK,CAAT,CAAD,CAAmBC,QAAnB,CAA4B,QAA5B,CAEH,CA9BiC,CAiCrC,CA7CD,EA6CGM,MA7CH,CA6CWX,MA7CX,C","sourcesContent":["/**\n * @file\n * A JavaScript file for the theme, for script that should be loaded globally.\n * Anything component-based, or code that is only called contextually\n * should go in a separate JS file... as should any code limited to specific parts\n * of the page that are complicated and deserve their own file (to avoid making this file massive).\n *\n * In order for this JavaScript to be loaded on pages, see the instructions in\n * the README.txt next to this file.\n *\n * Utilize Drupal behaviors. They are applied consistently when the page is first loaded and\n * then when new content is added during AHAH/AJAX requests.\n *\n * JavaScript API overview: https://www.drupal.org/docs/8/api/javascript-api/javascript-api-overview\n *\n * Avoid processing the same element multiple times within Drupal behaviors.\n * Use the jQuery Once plugin that's bundled with core:\n * $('.foo', context).once('foo').css('color', 'red');\n *\n * Practice DRY techniques:\n * https://learn.jquery.com/code-organization/dont-repeat-yourself\n * https://brandoncodes.wordpress.com/2012/06/29/making-some-simple-jquery-code-more-efficient\n *\n * Use helper functions to further DRY up your code:\n * http://joecritchley.com/articles/dry-chaining-jquery\n *\n */\n\n// JavaScript should be made compatible with libraries other than jQuery by\n// wrapping it with an \"anonymous closure\". See:\n// - https://drupal.org/node/1446420\n// - http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth\n\n(function ($, Drupal) {\n\n 'use strict';\n\n // Add classes to HTML element indicating existence of JS.\n Drupal.behaviors.addJSClass = {\n attach: function (context) {\n $('html', context).addClass('js');\n },\n };\n\n // Add classes to HTML element describing browser/OS.\n Drupal.behaviors.targetBrowsersOS = {\n attach: function (context) {\n // Check to see which operating system we're using.\n if (navigator.appVersion.indexOf('Mac')!=-1) {\n $('html', context).addClass('mac');\n }\n else {\n $('html', context).addClass('pc');\n }\n // Check to see if the browser is Safari and doublecheck that it is not Chrome.\n if (navigator.userAgent.indexOf('Chrome') > -1) {\n $('html', context).addClass('chrome');\n }\n if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) {\n $('html', context).addClass('safari');\n }\n if (navigator.userAgent.indexOf('Firefox') > -1) {\n $('html', context).addClass('firefox');\n }\n if (navigator.userAgent.indexOf('MSIE') > -1 || navigator.appVersion.indexOf('Trident/') > 0) {\n $('html', context).addClass('ie');\n }\n // If the browser is IE10.\n if (navigator.appVersion.indexOf('MSIE 10') !== -1) {\n $('html', context).addClass('ie10');\n }\n // If the browser is Edge.\n if (navigator.appVersion.indexOf('Edge') !== -1) {\n $('html', context).addClass('ieEdge');\n }\n },\n };\n \n})(jQuery, Drupal);\n"],"file":"global.js"}