{"version":3,"sources":["webpack:///scripts.js","webpack:///webpack/bootstrap f4774e3dd250de9a0242?bf2f","webpack:///./CMS/NationalGuild/src/js/components/globals.js?65f4","webpack:///(webpack)/buildin/global.js?3698","webpack:///./~/es6-promise-promise/index.js?539f","webpack:///./~/process/browser.js?82e4","webpack:///./~/es6-promise/dist/es6-promise.js?c993","webpack:///./CMS/NationalGuild/src/js/components/mobile-menu.js","webpack:///./~/es6-promise-promise/~/es6-promise/dist/es6-promise.js?dd9c","webpack:///./CMS/NationalGuild/src/js/components/login-modal.js","webpack:///./CMS/NationalGuild/src/js/components/member-dropdown.js","webpack:///./CMS/NationalGuild/src/js/components/form-to-top.js","webpack:///./CMS/NationalGuild/src/js/components/globalInits.js","webpack:///./CMS/NationalGuild/src/js/components/header-notifications.js","webpack:///./CMS/NationalGuild/src/js/components/left-nav.js","webpack:///./CMS/NationalGuild/src/js/components/listing.js","webpack:///./CMS/NationalGuild/src/js/components/memberlist-modal.js","webpack:///./CMS/NationalGuild/src/js/components/multiselect.js","webpack:///./CMS/NationalGuild/src/js/components/no-results.js","webpack:///./CMS/NationalGuild/src/js/components/pagination.js","webpack:///./CMS/NationalGuild/src/js/components/tabbable-nav.js","webpack:///./CMS/NationalGuild/src/js/components/table-sort.js","webpack:///./CMS/NationalGuild/src/js/components/tablet-nav-controls.js","webpack:///./CMS/NationalGuild/src/js/components/fluidvids.js","webpack:///./CMS/NationalGuild/src/js/libs/sortable.js","webpack:///./CMS/NationalGuild/src/js/scripts.js","webpack:///./~/svgxuse/svgxuse.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","getChildren","skipMe","r","nextSibling","nodeType","push","getSiblings","parentNode","firstChild","toArray","obj","array","length","tps_setCookie","cname","cvalue","cexpiration","Date","setTime","getTime","_cookie","toUTCString","document","cookie","getClosest","elem","selector","Element","matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","this","ownerDocument","querySelectorAll","item","Array","from","toStr","toString","isCallable","fn","toInteger","number","Number","isNaN","isFinite","Math","floor","abs","maxSafeInteger","pow","toLength","len","min","max","arrayLike","C","items","TypeError","T","mapFn","arguments","kValue","A","k","g","Function","eval","e","window","Promise","defaultSetTimout","Error","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","setTimeout","runClearTimeout","marker","cachedClearTimeout","clearTimeout","cleanUpNextTick","draining","currentQueue","queue","concat","queueIndex","drainQueue","timeout","run","Item","noop","process","nextTick","args","apply","title","browser","env","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","global","factory","objectOrFunction","x","type","isFunction","setScheduler","scheduleFn","customSchedulerFn","setAsap","asapFn","asap","useVertxTimer","vertxNext","flush","useSetTimeout","globalSetTimeout","callback","undefined","then","onFulfillment","onRejection","parent","child","constructor","PROMISE_ID","makePromise","_state","invokeCallback","_result","subscribe","resolve$1","Constructor","promise","resolve","selfFulfillment","cannotReturnOwn","getThen","error","TRY_CATCH_ERROR","tryThen","then$$1","fulfillmentHandler","rejectionHandler","handleForeignThenable","thenable","sealed","fulfill","reason","reject","_label","handleOwnThenable","FULFILLED","REJECTED","handleMaybeThenable","maybeThenable","publishRejection","_onerror","publish","PENDING","_subscribers","subscribers","settled","detail","tryCatch","hasCallback","succeeded","failed","initializePromise","resolver","nextId","id","validationError","all","entries","Enumerator","race","isArray","_","reject$1","needsResolver","needsNew","polyfill","local","self","P","promiseToString","cast","Promise$1","_isArray","arg","scheduleFlush","browserWindow","browserGlobal","BrowserMutationObserver","MutationObserver","WebKitMutationObserver","isNode","isWorker","Uint8ClampedArray","importScripts","MessageChannel","iterations","observer","node","createTextNode","observe","characterData","data","channel","port1","onmessage","port2","postMessage","vertx","require","runOnLoop","runOnContext","random","substring","input","_instanceConstructor","_remaining","_enumerate","_eachEntry","entry","resolve$$1","_then","_settledAt","_willSettleAt","state","enumerator","catch","finally","_setScheduler","_setAsap","_asap","closeMenu","body","classList","contains","remove","ng_consts","toggleButton","setAttribute","_loginModal","_memberDropdown","_globals","ng_nav","moveElements","div","forEach","panelNavElement","getElementById","appendChild","exitButton","mainNav","utilNav","searchWrap","querySelector","searchWrapMobile","panelNav","panelNavCover","mobileSubMenu","getElementsByClassName","ng_clones","setUpMobile","cloneMenus","mainNavClone","cloneNode","removeAttribute","menuWrap","createElement","add","utilNavClone","menuUtilWrap","style","overflow","navItemHasChildren","mobileItemHasChildren","mobileDropButtons","t","parentElement","addButtons","a","dropButton","buttonImg","hereStateSetup","menuToOpen","button","nextElementSibling","mobileDrop","preventDefault","mobileItemParent","mobileItemChildren","children","mobileL2List","toggleMenu","addEventListener","popModal","toggleMobile","dropMemberMenu","_arguments","_resolve","GET_THEN_ERROR","_reject","then$$","ErrorObject","_input","resolve$$","previousActiveElement","activeElement","loginModalWrap","loginModalMask","focus","_mobileMenu","createExitListener","activateKeyCheck","loginModalExit","popModalExit","which","KEYCODE","ESC","TAB","currentFocus","modalFocusableNum","modalFocusable","focusedIndex","indexOf","shiftKey","loginButton","loginButtonNodes","loginButtons","modalFocusableNodes","SHIFT","ENTER","topMenu","globals","menu","newObj","key","default","toggle","submitBtns","btn","scrollTop","documentElement","fluidvids","init","players","domain","location","host","replace","domainFilterRegexp","RegExp","NodeList","thisArg","link","test","sortable","target","tps_handleAlertBannerDismiss","event","currentTarget","banner","cookieName","dataset","tpsCookieName","cookieValue","tpsCookieValue","leftNav","leftNavTitle","innerHTML","toggleBtn","articles","arr","arr2","article","href","evt","ctrlKey","open","gotoURL","console","log","form","att","createAttribute","setAttributeNode","memberDownloadWrap","memberDownloadMask","memberDownloadExit","memberDownloadButton","showCheckboxes","expanded","options","display","updateLabel","customSelect","selected","checks","filter","check","checked","selectContainer","lastCheck","shiftkey","keyCode","pageContainer","listingContainer","templateBackground","listingPagination","pageBtns","getElementsByTagName","arrPageBtns","unshift","pageBtn","allPrimaryLinks","allFocus","allMenuLis","parentSelector","hasDropDown","allSibDropdowns","navParentSelector","focusClassList","allFocusElements","j","y","rowClick","el","sortTable","rows","itemsWithSubmenu","innerWidth","stopPropagation","root","src","join","getRatio","height","width","parseInt","fluid","getAttribute","wrap","insertBefore","className","paddingTop","addStyles","css","head","childNodes","render","nodes","__WEBPACK_AMD_DEFINE_RESULT__","SELECTOR","clickEvents","numberRegExp","touchDevice","trimRegExp","handler","attachEvent","table","tables","_i","_len","_results","initTable","th","ths","_ref","tHead","setupClickableTH","eventName","onClick","getColumnType","compare","newSortedDirection","position","row","rowArray","sorted","sortedDirection","tBody","_compare","_j","_k","_l","_len1","_len2","_len3","_len4","_m","_ref1","handled","defaultSortDirection","tBodies","reverse","b","getNodeValue","cells","comparator","sort","dispatchEvent","CustomEvent","bubbles","specified","text","_ref2","typesObject","types","match","alpha","dataValue","innerText","textContent","setupTypes","parseFloat","parse","localeCompare","_es6Promise","checkUseElems","tid","cache","create","debouncedCheck","unobserveChanges","observeChanges","childList","subtree","attributes","disconnect","removeEventListener","ignore","createRequest","url","getOrigin","loc","protocol","Request","origin","origin2","XMLHttpRequest","withCredentials","XDomainRequest","xlinkNS","observeIfDone","inProgressCount","attrUpdateFunc","spec","base","useEl","setAttributeNS","hash","hasAttribute","onErrorTimeout","xhr","onerror","ontimeout","bcr","isHidden","uses","getBoundingClientRect","getAttributeNS","split","left","right","top","bottom","onload","svg","responseText","send","abort","winLoad","readyState"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF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EA,SAAAb,GACA,kBACA,GAEAc,GAFA7U,EAAA7O,SAAA6O,KACAvI,EAAAtG,SAAA+Q,cAAA,IAEA6R,GAAAa,OAAA,KACAnd,EAAA8Q,UAAAwL,EAAAe,aACAD,EAAApd,EAAAuT,qBAAA,UACA6J,IACAA,EAAAvU,aAAA,sBACAuU,EAAAvS,MAAA2M,SAAA,WACA4F,EAAAvS,MAAAqK,MAAA,EACAkI,EAAAvS,MAAAoK,OAAA,EACAmI,EAAAvS,MAAAC,SAAA,SACAvC,EAAAgN,aAAA6H,EAAA7U,EAAA3P,aAEAgjB,MAyDAU,GACAA,EAAAC,QAAAF,EAAAC,GACAA,EAAAE,UAAAH,EAAAC,GACAA,EAAA/K,KAAA,MAAAyK,GACAM,EAAAgB,OACAzB,GAAA,KAKAa,EAWqBV,EAAAhjB,QAAAqhB,EAAA2B,IACrB5e,WAAA0e,GACAG,MAAAU,EAAA9lB,GACAmlB,OACAG,SACyB,OAfzBpb,KAAAsZ,EAAA2B,GAEA3B,EAAA2B,IAAA,EACyB3B,EAAA2B,GAAAmB,SAGzB9C,EAAA2B,GAAAuB,cACAlD,GAAA2B,GAAAmB,OACA9C,EAAA2B,IAAA,GAWAW,EAAA,GACAd,GAAA,EACAD,IAEA,IAAA4B,EACAA,GAAA,WACA5gB,OAAAke,oBAAA,OAAA0C,GAAA,GACApD,EAAAhd,WAAA+c,EAAA,IAEA,aAAAzgB,SAAA+jB,WAEA7gB,OAAAuP,iBAAA,OAAAqR,GAAA,GAGAA","file":"scripts.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 58);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */,\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getChildren = getChildren;\nexports.getSiblings = getSiblings;\nexports.toArray = toArray;\nexports.tps_setCookie = tps_setCookie;\n/**\r\n * Get the closest matching element up the DOM tree.\r\n * @private\r\n * @param {Element} elem Starting element\r\n * @param {String} selector Selector to match against\r\n * @return {Boolean|Element} Returns null if not match found\r\n */\nvar getClosest = exports.getClosest = function getClosest(elem, selector) {\n\n // Element.matches() polyfill\n if (!Element.prototype.matches) {\n Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function (s) {\n var matches = (this.document || this.ownerDocument).querySelectorAll(s),\n i = matches.length;\n while (--i >= 0 && matches.item(i) !== this) {}\n return i > -1;\n };\n }\n\n // Get closest match\n for (; elem && elem !== document; elem = elem.parentNode) {\n if (elem.matches(selector)) {\n return elem;\n }\n }\n\n return null;\n};\n\nfunction getChildren(n, skipMe) {\n var r = [];\n for (; n; n = n.nextSibling) {\n if (n.nodeType == 1 && n != skipMe) {\n r.push(n);\n }\n }\n return r;\n}\n\nfunction getSiblings(n) {\n return getChildren(n.parentNode.firstChild, n);\n}\n\n/* jshint ignore:start */\nfunction toArray(obj) {\n var array = [];\n // iterate backwards ensuring that length is an UInt32\n for (var i = obj.length >>> 0; i--;) {\n array[i] = obj[i];\n }\n return array;\n}\n/* jshint ignore:end */\n\n//Polyfill for Array.from\n// Production steps of ECMA-262, Edition 6, 22.1.2.1\nif (!Array.from) {\n Array.from = function () {\n var toStr = Object.prototype.toString;\n var isCallable = function isCallable(fn) {\n return typeof fn === 'function' || toStr.call(fn) === '[object Function]';\n };\n var toInteger = function toInteger(value) {\n var number = Number(value);\n if (isNaN(number)) {\n return 0;\n }\n if (number === 0 || !isFinite(number)) {\n return number;\n }\n return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));\n };\n var maxSafeInteger = Math.pow(2, 53) - 1;\n var toLength = function toLength(value) {\n var len = toInteger(value);\n return Math.min(Math.max(len, 0), maxSafeInteger);\n };\n\n // The length property of the from method is 1.\n return function from(arrayLike /*, mapFn, thisArg */) {\n // 1. Let C be the this value.\n var C = this;\n\n // 2. Let items be ToObject(arrayLike).\n var items = Object(arrayLike);\n\n // 3. ReturnIfAbrupt(items).\n if (arrayLike == null) {\n throw new TypeError('Array.from requires an array-like object - not null or undefined');\n }\n\n // 4. If mapfn is undefined, then let mapping be false.\n var mapFn = arguments.length > 1 ? arguments[1] : void undefined;\n var T;\n if (typeof mapFn !== 'undefined') {\n // 5. else\n // 5. a If IsCallable(mapfn) is false, throw a TypeError exception.\n if (!isCallable(mapFn)) {\n throw new TypeError('Array.from: when provided, the second argument must be a function');\n }\n\n // 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined.\n if (arguments.length > 2) {\n T = arguments[2];\n }\n }\n\n // 10. Let lenValue be Get(items, \"length\").\n // 11. Let len be ToLength(lenValue).\n var len = toLength(items.length);\n\n // 13. If IsConstructor(C) is true, then\n // 13. a. Let A be the result of calling the [[Construct]] internal method\n // of C with an argument list containing the single item len.\n // 14. a. Else, Let A be ArrayCreate(len).\n var A = isCallable(C) ? Object(new C(len)) : new Array(len);\n\n // 16. Let k be 0.\n var k = 0;\n // 17. Repeat, while k < len… (also steps a - h)\n var kValue;\n while (k < len) {\n kValue = items[k];\n if (mapFn) {\n A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);\n } else {\n A[k] = kValue;\n }\n k += 1;\n }\n // 18. Let putStatus be Put(A, \"length\", len, true).\n A.length = len;\n // 20. Return A.\n return A;\n };\n }();\n}\n\nfunction tps_setCookie(cname, cvalue, cexpiration) {\n if (!cexpiration) {\n cexpiration = 365;\n }\n // set cookie to expire in 1 year by default\n var d = new Date();\n d.setTime(d.getTime() + cexpiration * 24 * 60 * 60 * 1000);\n var _cookie = '';\n _cookie += cname + '=' + cvalue + ';';\n _cookie += 'expires=' + d.toUTCString() + ';';\n _cookie += 'secure;';\n _cookie += 'SameSite=Strict;path=/';\n document.cookie = _cookie;\n}\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nvar g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(9).Promise;\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process, global) {/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n\n(function (global, factory) {\n\t true ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.ES6Promise = factory());\n}(this, (function () { 'use strict';\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\n\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\n\nvar len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && \"function\" === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}\n\nfunction then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve$1(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n resolve(promise, object);\n return promise;\n}\n\nvar PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {\n try {\n then$$1.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then$$1) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then$$1, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then$$1) {\n if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then$$1 === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then$$1 === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then$$1)) {\n handleForeignThenable(promise, maybeThenable, then$$1);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n}\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve$$1 = c.resolve;\n\n\n if (resolve$$1 === resolve$1) {\n var _then = getThen(entry);\n\n if (_then === then && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise$1) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve$$1) {\n return resolve$$1(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve$$1(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject$1(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n reject(promise, reason);\n return promise;\n}\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise$1 = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise$1.prototype.then = then;\nPromise$1.all = all;\nPromise$1.race = race;\nPromise$1.resolve = resolve$1;\nPromise$1.reject = reject$1;\nPromise$1._setScheduler = setScheduler;\nPromise$1._setAsap = setAsap;\nPromise$1._asap = asap;\n\n/*global self*/\nfunction polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise$1;\n}\n\n// Strange compat..\nPromise$1.polyfill = polyfill;\nPromise$1.Promise = Promise$1;\n\nreturn Promise$1;\n\n})));\n\n\n\n//# sourceMappingURL=es6-promise.map\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4), __webpack_require__(2)))\n\n/***/ }),\n/* 6 */,\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Promise) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.closeMenu = closeMenu;\n\nvar _loginModal = __webpack_require__(11);\n\nvar _memberDropdown = __webpack_require__(12);\n\nvar _globals = __webpack_require__(1);\n\nvar ng_nav = ng_nav || {};\n\n/*\r\n * moveElements\r\n * Move Panel Navigation & Cover Elements to before body\r\n *\r\n * Deprecated\r\n*/\nng_nav.moveElements = function (div) {\n div.forEach(function (name) {\n var panelNavElement = document.getElementById(name);\n document.body.appendChild(panelNavElement);\n });\n};\nvar panelElements = ['panel-nav', 'panel-nav-cover'];\n//ng_nav.moveElements(panelElements);\n\n\nvar exitButton = document.getElementById('menu-exit-toggle');\n\n// Assign Constants\nvar ng_consts = {\n mainNav: document.getElementById('primary-navigation'),\n utilNav: document.getElementById('utility-navigation'),\n searchWrap: document.querySelector('.search-wrap'),\n searchWrapMobile: document.querySelector('.search-mobile-wrap'),\n panelNav: document.getElementById('panel-nav'),\n panelNavCover: document.getElementById('panel-nav-cover'),\n toggleButton: document.getElementById('mobile-toggle-menu'),\n mobileSubMenu: document.getElementsByClassName('submenu')\n};\nvar searchBoxDesktop = ng_consts.searchWrap.querySelector('input.form-control');\nsearchBoxDesktop.setAttribute('placeholder', 'Search');\nvar searchBoxMobile = ng_consts.searchWrapMobile.querySelector('input.form-control');\nsearchBoxMobile.setAttribute('placeholder', 'Search');\n\nvar ng_clones = {};\n\n/* MOBILE NAV CREATION WORKFLOW */\n\nng_nav.setUpMobile = function () {\n var cloneMenus = new Promise(function (resolve) {\n\n /*\r\n * cloneMenus\r\n * Clone menus into mobile nav\r\n */\n\n // Clone Main Nav\n ng_clones.mainNavClone = ng_consts.mainNav.cloneNode(true);\n ng_clones.mainNavClone.removeAttribute('id'); // Reset ID\n ng_clones.menuWrap = document.createElement('DIV'); // Create wrapper\n ng_clones.menuWrap.classList.add('primary-mobile-wrap'); //add unique class\n ng_clones.menuWrap.appendChild(ng_clones.mainNavClone);\n ng_consts.panelNav.appendChild(ng_clones.menuWrap);\n\n // Clone Utility Nav\n ng_clones.utilNavClone = ng_consts.utilNav.cloneNode(true);\n ng_clones.utilNavClone.removeAttribute('id'); // Reset ID\n ng_clones.menuUtilWrap = document.createElement('DIV'); // Create wrapper\n ng_clones.menuUtilWrap.classList.add('utility-mobile-wrap'); //add unique class\n ng_clones.menuUtilWrap.appendChild(ng_clones.utilNavClone);\n ng_consts.panelNav.appendChild(ng_clones.menuUtilWrap);\n\n //add overflow hidden to mobile L2\n for (var e = 0; e < ng_consts.mobileSubMenu.length; e++) {\n ng_consts.mobileSubMenu[e].style.overflow = \"hidden\";\n }\n\n resolve(cloneMenus);\n });\n\n cloneMenus.then(function () {\n\n //change member login ID to be unique; if exists (i.e. if not logged in)\n if (ng_consts.panelNav.querySelector('#member-login-button') != null || ng_consts.panelNav.querySelector('#member-login-button') != undefined) {\n ng_consts.panelNav.querySelector('#member-login-button').id = \"mobile-member-login-button\";\n }\n //ditto to logged in member button\n if (ng_consts.panelNav.querySelector('#logged-in-toggle') != null || ng_consts.panelNav.querySelector('#logged-in-toggle') != undefined) {\n ng_consts.panelNav.querySelector('#logged-in-toggle').id = \"mobile-logged-in-toggle\";\n //further controls in /components/member-dropdown.js\n }\n\n // init new vars\n var navItemHasChildren = document.getElementsByClassName('has-children');\n var mobileItemHasChildren = [];\n var mobileDropButtons = void 0;\n\n //isolate mobile only\n for (var t = 0; t < navItemHasChildren.length; t++) {\n if (navItemHasChildren[t].parentElement.parentElement.parentElement.classList.contains(\"primary-mobile-wrap\")) {\n mobileItemHasChildren.push(navItemHasChildren[t]);\n }\n }\n /*\r\n * addButtons\r\n * Add dropdown buttons to menu items with children\r\n *\r\n */\n ng_nav.addButtons = function () {\n\n for (var a = 0; a < mobileItemHasChildren.length; a++) {\n //create buttons\n var dropButton = document.createElement('button');\n dropButton.classList.add(\"mobile-dropdown-button\");\n dropButton.classList.add(\"button\");\n dropButton.classList.add(\"light\");\n dropButton.setAttribute(\"aria-expanded\", \"false\");\n\n var buttonImg = document.createElement('img');\n buttonImg.setAttribute('alt', 'Toggle Second Level of Menu');\n buttonImg.setAttribute('src', '/NationalGuild/assets/arrow-down.png');\n dropButton.appendChild(buttonImg);\n\n //append to menu\n mobileItemHasChildren[a].appendChild(dropButton);\n }\n\n //add to button array\n mobileDropButtons = document.getElementsByClassName('mobile-dropdown-button');\n };\n\n /*\r\n * mobileDrop\r\n * Toggle mobile menu 2nd level dropdowns\r\n *\r\n */\n\n ng_nav.hereStateSetup = function () {\n var menuToOpen = document.querySelector('.primary-mobile-wrap .submenu li.current');\n if (menuToOpen != null && menuToOpen) {\n var button = menuToOpen.parentNode.nextElementSibling;\n menuToOpen.parentNode.classList.add('open');\n menuToOpen.parentNode.style.overflow = \"auto\";\n button.setAttribute('aria-expanded', true);\n }\n };\n\n ng_nav.mobileDrop = function (e) {\n e.preventDefault();\n var button = this;\n var mobileItemParent = this.parentElement;\n var mobileItemChildren = mobileItemParent.children;\n for (var i = 0; i < mobileItemChildren.length; i++) {\n if (mobileItemChildren[i].classList.contains(\"submenu\")) {\n (function () {\n var mobileL2List = mobileItemChildren[i];\n if (mobileL2List.classList.contains('open')) {\n mobileL2List.classList.remove('open');\n button.setAttribute('aria-expanded', false);\n } else {\n setTimeout(function () {\n mobileL2List.classList.add('open');\n }, 400);\n button.setAttribute('aria-expanded', true);\n }\n })();\n }\n }\n };\n\n /*\r\n * toggleMenu\r\n * Toggle mobile menu function\r\n *\r\n */\n ng_nav.toggleMenu = function () {\n if (document.body.classList.contains('panel-active')) {\n document.body.classList.remove(\"panel-active\");\n ng_consts.toggleButton.setAttribute('aria-expanded', 'false');\n } else {\n document.body.classList.add(\"panel-active\");\n ng_consts.toggleButton.setAttribute('aria-expanded', 'true');\n }\n };\n\n //run \n ng_consts.toggleButton.addEventListener('click', function () {});\n ng_nav.addButtons();\n ng_nav.hereStateSetup();\n for (var l = 0; l < mobileDropButtons.length; l++) {\n mobileDropButtons[l].addEventListener('click', ng_nav.mobileDrop);\n }\n ng_consts.panelNavCover.addEventListener('click', ng_nav.toggleMenu);\n ng_consts.toggleButton.addEventListener('click', ng_nav.toggleMenu);\n exitButton.addEventListener('click', ng_nav.toggleMenu);\n //mobile login\n if (document.getElementById('mobile-member-login-button') != undefined || document.getElementById('mobile-member-login-button') != null) {\n var mobileLoginButton = document.getElementById('mobile-member-login-button');\n mobileLoginButton.addEventListener('click', _loginModal.popModal);\n }\n //mobile logged in menu\n if (document.getElementById('mobile-logged-in-toggle') != undefined || document.getElementById('mobile-logged-in-toggle') != null) {\n var toggleMobile = document.getElementById('mobile-logged-in-toggle');\n toggleMobile.addEventListener('click', _memberDropdown.dropMemberMenu);\n //add overflow hidden to mobile member dropdown\n var topMemberMenu = (0, _globals.getClosest)(toggleMobile, '.logged-in-menu-top');\n var memberMenu = topMemberMenu.querySelector('.logged-in-menu');\n memberMenu.style.overflow = \"hidden\";\n }\n });\n};\n\nng_nav.setUpMobile();\n\nfunction closeMenu() {\n if (document.body.classList.contains('panel-active')) {\n document.body.classList.remove(\"panel-active\");\n ng_consts.toggleButton.setAttribute('aria-expanded', 'false');\n }\n}\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))\n\n/***/ }),\n/* 8 */,\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process, global) {var require;/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 3.3.1\n */\n\n(function (global, factory) {\n true ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.ES6Promise = factory());\n}(this, (function () { 'use strict';\n\nfunction objectOrFunction(x) {\n return typeof x === 'function' || typeof x === 'object' && x !== null;\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nvar _isArray = undefined;\nif (!Array.isArray) {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n} else {\n _isArray = Array.isArray;\n}\n\nvar isArray = _isArray;\n\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n return function () {\n vertxNext(flush);\n };\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = __webpack_require__(10);\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && \"function\" === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}\n\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n _resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n _reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n _reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n _reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return _resolve(promise, value);\n }, function (reason) {\n return _reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then$$) {\n if (maybeThenable.constructor === promise.constructor && then$$ === then && maybeThenable.constructor.resolve === resolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then$$ === GET_THEN_ERROR) {\n _reject(promise, GET_THEN_ERROR.error);\n } else if (then$$ === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then$$)) {\n handleForeignThenable(promise, maybeThenable, then$$);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction _resolve(promise, value) {\n if (promise === value) {\n _reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction _reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n _reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n _resolve(promise, value);\n } else if (failed) {\n _reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n _reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n _resolve(promise, value);\n }, function rejectPromise(reason) {\n _reject(promise, reason);\n });\n } catch (e) {\n _reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this._input = input;\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate();\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n _reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function () {\n var length = this.length;\n var _input = this._input;\n\n for (var i = 0; this._state === PENDING && i < length; i++) {\n this._eachEntry(_input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve$$ = c.resolve;\n\n if (resolve$$ === resolve) {\n var _then = getThen(entry);\n\n if (_then === then && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve$$) {\n return resolve$$(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve$$(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n _reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = resolve;\nPromise.reject = reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};\n\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}\n\npolyfill();\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\n\nreturn Promise;\n\n})));\n//# sourceMappingURL=es6-promise.map\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4), __webpack_require__(2)))\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports) {\n\n/* (ignored) */\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.popModal = popModal;\n\nvar _mobileMenu = __webpack_require__(7);\n\nvar _globals = __webpack_require__(1);\n\n//declare vars\nvar loginButton = document.getElementById('member-login-button'),\n loginButtonNodes = document.querySelectorAll('.member-login-button'),\n loginModalWrap = document.getElementById('login-modal-wrap'),\n loginModalExit = document.getElementById('login-modal-exit-button'),\n loginModalMask = document.getElementById('login-modal-mask'),\n loginButtons = (0, _globals.toArray)(loginButtonNodes);\nvar previousActiveElement = void 0;\n\nvar elFocusable = \"a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), object, embed, *[contenteditable]\",\n modalFocusableNodes = loginModalWrap.querySelectorAll(elFocusable),\n modalFocusable = (0, _globals.toArray)(modalFocusableNodes);\n\nvar KEYCODE = {\n ESC: 27,\n TAB: 9,\n SHIFT: 16,\n ENTER: 13\n};\n\nfunction popModal() {\n previousActiveElement = document.activeElement;\n loginModalWrap.classList.add('active');\n loginModalMask.classList.add('active');\n document.getElementById('p_lt_ModalZone_NG_LogonForm_Login1_UserName').focus();\n\n (0, _mobileMenu.closeMenu)();\n\n createExitListener();\n activateKeyCheck();\n}\n\nfunction createExitListener() {\n loginModalExit.addEventListener('click', popModalExit);\n loginModalMask.addEventListener('click', popModalExit);\n\n document.addEventListener('keydown', function (e) {\n if (e.which === KEYCODE.ESC) {\n popModalExit();\n }\n });\n}\n\nfunction activateKeyCheck() {\n document.addEventListener('keydown', function (e) {\n if (e.which == KEYCODE.TAB) {\n var currentFocus = document.activeElement,\n modalFocusableNum = modalFocusable.length,\n focusedIndex = modalFocusable.indexOf(currentFocus);\n if (e.shiftKey) {\n if (focusedIndex === 0) {\n modalFocusable[modalFocusableNum - 1].focus();\n e.preventDefault();\n }\n } else {\n if (focusedIndex == modalFocusableNum - 1) {\n modalFocusable[0].focus();\n e.preventDefault();\n }\n }\n }\n });\n}\n\nfunction popModalExit() {\n loginModalMask.classList.remove('active');\n loginModalWrap.classList.remove('active');\n previousActiveElement.focus();\n}\n\n//run modal script if exists (i.e. if not logged in)\nif (loginButton != null || loginButton != undefined) {\n loginButton.addEventListener('click', popModal);\n}\n\nif (loginButtons != null || loginButtons != undefined) {\n loginButtonNodes.forEach(function (item) {\n item.addEventListener(\"click\", popModal);\n });\n}\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.dropMemberMenu = dropMemberMenu;\n\nvar _globals = __webpack_require__(1);\n\nvar globals = _interopRequireWildcard(_globals);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\n//declare variables\nvar toggle = document.getElementById('logged-in-toggle');\n\n//dropdown\nfunction dropMemberMenu() {\n var topMenu = globals.getClosest(this, '.logged-in-menu-top');\n var menu = topMenu.querySelector('.logged-in-menu');\n if (menu.classList.contains('open')) {\n menu.classList.remove('open');\n this.setAttribute('aria-expanded', 'false');\n if (globals.getClosest(this, '.utility-mobile-wrap')) {\n menu.style.overflow = \"hidden\";\n }\n } else {\n menu.classList.add('open');\n this.setAttribute('aria-expanded', 'true');\n if (globals.getClosest(this, '.utility-mobile-wrap')) {\n setTimeout(function () {\n menu.style.overflow = \"auto\";\n }, 500);\n }\n }\n}\n\nif (toggle != null || toggle != undefined) {\n toggle.addEventListener('click', dropMemberMenu);\n}\n\n//mobile handler in mobile-menu.js\n\n/***/ }),\n/* 13 */,\n/* 14 */,\n/* 15 */,\n/* 16 */,\n/* 17 */,\n/* 18 */,\n/* 19 */,\n/* 20 */,\n/* 21 */,\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar submitBtns = Array.from(document.querySelectorAll('input[type=\"submit\"].FormButton'));\n\nif (submitBtns.length) {\n\tsubmitBtns.forEach(function (btn) {\n\t\tbtn.addEventListener('click', function () {\n\t\t\tdocument.body.scrollTop = 0;\n\t\t\tdocument.documentElement.scrollTop = 0;\n\t\t});\n\t});\n}\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar svgxuse = __webpack_require__(65),\n //jshint ignore:line\n// ^ ie11 ployfill\nfluidvids = __webpack_require__(56)(),\n sortable = __webpack_require__(57);\n\n//fluidvids global\nfluidvids.init({\n selector: ['iframe', 'object'], // runs querySelectorAll()\n players: ['www.youtube.com', 'player.vimeo.com'] // players to support\n});\n\n(function openExternalLinksInNewWindow(window) {\n\n var domain = window.location.host.replace(/\\./gi, \"\\\\.\");\n\n var domainFilterRegexp = new RegExp(\"^(www\\\\.)?\" + domain + \"$\", \"gim\");\n\n var matches = window.document.querySelectorAll(\"a[href^='http://'], a[href^='https://']\");\n\n if (\"NodeList\" in window && !NodeList.prototype.forEach) {\n\n NodeList.prototype.forEach = function (callback, thisArg) {\n thisArg = thisArg || window;\n\n for (var i = 0; i < this.length; i++) {\n callback.call(thisArg, this[i], i, this);\n }\n };\n }\n\n matches.forEach(function (link) {\n\n if (!domainFilterRegexp.test(link.host)) {\n\n var _sortable = link.classList.contains('sortable');\n\n if (link === undefined || link.target === \"\" && !_sortable) {\n link.target = \"_blank\";\n }\n }\n });\n})(window);\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.tps_handleAlertBannerDismiss = tps_handleAlertBannerDismiss;\n\nvar _globals = __webpack_require__(1);\n\nfunction tps_handleAlertBannerDismiss(event) {\n var elem = event.currentTarget;\n var banner = document.getElementById('tps-header-notification-banner');\n var cookieName = elem.dataset.tpsCookieName;\n var cookieValue = elem.dataset.tpsCookieValue;\n // hide the banner\n banner.classList.add('hide');\n // set the cookie\n if (cookieName && cookieValue) {\n (0, _globals.tps_setCookie)(cookieName, cookieValue);\n }\n}\n\nwindow.tps_handleAlertBannerDismiss = tps_handleAlertBannerDismiss;\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _globals = __webpack_require__(1);\n\nvar globals = _interopRequireWildcard(_globals);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\n//jshint ignore:line\n\n// Get mobile button\nvar leftNav = document.querySelector('.secondary-nav');\nvar leftNavTitle = document.querySelector('.secondary-nav h2');\n\n// Create mobile toggle button\nif (leftNavTitle) {\n\t\tleftNavTitle = leftNavTitle.innerHTML;\n\t\tvar btn = document.createElement(\"BUTTON\");\n\t\tbtn.classList.add('mobile-toogle-btn');\n\t\tbtn.setAttribute('type', 'button');\n\t\tbtn.innerHTML = leftNavTitle;\n\t\tvar wrapper = document.querySelector(\".mobile-button-target\");\n\t\twrapper.appendChild(btn);\n}\n\nvar toggleMenu = function toggleMenu() {\n\t\tif (leftNav.classList.contains('active')) {\n\t\t\t\tleftNav.classList.remove('active');\n\t\t} else {\n\t\t\t\tleftNav.classList.add('active');\n\t\t}\n};\n\nvar toggleBtn = document.querySelector('.mobile-toogle-btn');\nif (toggleBtn) {\n\t\ttoggleBtn.addEventListener('click', toggleMenu);\n}\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _globals = __webpack_require__(1);\n\nvar globals = _interopRequireWildcard(_globals);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } /* jshint ignore:start */\n\n\n/* jshint ignore:end */\n\n// Get all post listing
\nvar articles = [].concat(_toConsumableArray(document.querySelectorAll('.post-listing article')));\n\n// Add click event for each article\narticles.forEach(function (article) {\n var href = article.querySelector(\"a\").href; // Find the href\n article.addEventListener('click', function (evt) {\n\n if (evt.ctrlKey) {\n evt.preventDefault();\n\n window.open(href, \"_blank\");\n } else {\n gotoURL(href);\n }\n }); // add event listener\n});\n\n// Goto the URL :)\nvar gotoURL = function gotoURL(href) {\n window.location.href = href;\n console.log('when does this run?');\n};\nvar form = document.getElementById('form');\nvar att = document.createAttribute('autocomplete');\natt.value = \"off\";\nform.setAttributeNode(att);\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.popModal = popModal;\n\nvar _mobileMenu = __webpack_require__(7);\n\nvar _globals = __webpack_require__(1);\n\n//declare vars\nvar memberDownloadButton = document.getElementById('membership-list_download-button'),\n memberDownloadWrap = document.getElementById('membership-list_modal-wrap'),\n memberDownloadExit = document.getElementById('membership-list_modal-close'),\n memberDownloadMask = document.getElementById('membership-list_modal-mask');\nvar previousActiveElement = void 0;\n\nvar modalFocusableNodes = void 0;\nvar modalFocusable = void 0;\nvar elFocusable = \"a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), object, embed, *[contenteditable]\";\nif (memberDownloadWrap) {\n modalFocusableNodes = memberDownloadWrap.querySelectorAll(elFocusable);\n modalFocusable = (0, _globals.toArray)(modalFocusableNodes);\n}\n\nvar KEYCODE = {\n ESC: 27,\n TAB: 9,\n SHIFT: 16,\n ENTER: 13\n};\n\nfunction popModal(e) {\n e.preventDefault();\n previousActiveElement = document.activeElement;\n memberDownloadWrap.classList.add('active');\n memberDownloadMask.classList.add('active');\n modalFocusable[0].focus();\n (0, _mobileMenu.closeMenu)();\n console.log(modalFocusable);\n createExitListener();\n activateKeyCheck();\n}\n\nfunction createExitListener() {\n\n if (memberDownloadMask) {\n memberDownloadMask.addEventListener('click', popModalExit);\n }\n\n memberDownloadExit.addEventListener('click', popModalExit);\n document.addEventListener('keydown', function (e) {\n if (e.which === KEYCODE.ESC) {\n popModalExit();\n }\n });\n}\n\nfunction activateKeyCheck() {\n document.addEventListener('keydown', function (e) {\n if (e.which == KEYCODE.TAB) {\n var currentFocus = document.activeElement,\n modalFocusableNum = modalFocusable.length,\n focusedIndex = modalFocusable.indexOf(currentFocus);\n if (e.shiftKey) {\n if (focusedIndex === 0) {\n modalFocusable[modalFocusableNum - 1].focus();\n e.preventDefault();\n }\n } else {\n if (focusedIndex == modalFocusableNum - 1) {\n modalFocusable[0].focus();\n e.preventDefault();\n }\n }\n }\n });\n}\n\nfunction popModalExit() {\n memberDownloadMask.classList.remove('active');\n memberDownloadWrap.classList.remove('active');\n previousActiveElement.focus();\n}\n\n//run modal script if exists (i.e. if not logged in)\nif (memberDownloadButton != null || memberDownloadButton != undefined) {\n memberDownloadButton.addEventListener('click', popModal);\n}\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar expanded = false;\nvar options = document.getElementById(\"selectOptions\");\nvar customSelect = document.getElementById(\"customSelect\");\nvar selectContainer = document.getElementById('multiSelectContainer');\n\nfunction showCheckboxes() {\n if (!expanded) {\n options.style.display = \"block\";\n expanded = true;\n } else {\n options.style.display = \"none\";\n expanded = false;\n }\n}\n\nfunction updateLabel() {\n var toggle = customSelect.querySelector('button');\n\n var selected = checks.filter(function (check) {\n return check.checked == true;\n });\n\n if (selected.length >= 2) {\n toggle.innerHTML = \"Multiple states selected\";\n } else if (selected.length == 1) {\n toggle.innerHTML = selected[0].dataset.name;\n } else {\n toggle.innerHTML = \"All states\";\n }\n}\n\nif (customSelect) {\n customSelect.addEventListener('click', function () {\n showCheckboxes();\n });\n}\n\n//listener on last checkbox to close when tabbign out\nvar checks = customSelect ? Array.from(options.querySelectorAll('input')) : [];\nvar lastCheck = checks.length ? checks[checks.length - 1] : null;\n\nif (lastCheck) {\n\n lastCheck.addEventListener('keydown', function (e) {\n if (!event.shiftkey && e.keyCode === 9) {\n showCheckboxes();\n }\n });\n}\n\nchecks.forEach(function (check) {\n check.addEventListener('click', function () {\n updateLabel();\n });\n});\n\n//global listener for click out of custom select\nvar pageContainer = document.getElementById('container');\nif (pageContainer) {\n pageContainer.addEventListener('click', function (e) {\n var clickedInside = selectContainer.contains(e.target);\n if (!clickedInside) {\n options.style.display = \"none\";\n expanded = false;\n }\n });\n}\n\nif (customSelect) {\n updateLabel();\n}\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n///Get the container for no results and remove the after effect\nvar listingContainer = document.querySelector('.has-after');\nif (listingContainer) {\n //console.log(listingContainer)\n var templateBackground = listingContainer.querySelector('.no-results_container');\n if (templateBackground) {\n //console.log(templateBackground.parentElement.parentElement)\n templateBackground.parentElement.parentElement.classList.add('after-removed');\n }\n}\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// Get the kentico pagination elements that are arrows and hide them\n\nvar listingPagination = document.querySelector('.listing-pagination');\nif (listingPagination) {\n var pageBtns = listingPagination.getElementsByTagName('a');\n\n var icon = listingPagination.getElementsByTagName('i');\n\n var arrPageBtns = [];\n for (var i = pageBtns.length; i--; arrPageBtns.unshift(pageBtns[i])) {}\n\n var pageBtnsWithArrows = arrPageBtns.forEach(function (pageBtn) {\n\n var span = pageBtn.querySelector('.sr-only') != null;\n if (span) {\n pageBtn.classList.add('hide');\n }\n });\n}\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _globals = __webpack_require__(1);\n\nvar globals = _interopRequireWildcard(_globals);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\n//CONFIG //declare consts\n\n//primary menu ID selector\nvar primaryMenuSelector = '#primary-navigation';\n//class of
  • elements that are parents of submenus\nvar subNavIndicator = '.has-children';\n//all menu links\nvar allPrimaryLinks = document.querySelectorAll('#primary-navigation a');\n//all focusable elements on the page\nvar allFocus = document.querySelectorAll('a, button, input');\n//all elements that could be given a class of \"focus\" by addTabHandler\nvar allMenuLis = document.querySelectorAll('#primary-navigation li');\n\n/**\r\n * addTabHandler\r\n * Listen for and handle focus on primary menu 's\r\n * @private\r\n * @param {Array} array Array of all primary menu links\r\n * @param {String} parentSelector Selector of first-level li with a submenu (i.e. '.has-children')\r\n */\nvar addTabHandler = function addTabHandler(array, parentSelector) {\n for (var i = 0; i < array.length; i++) {\n array[i].addEventListener(\"focus\", function () {\n //check if there is a parent with the class \"has-children\"\n var hasDropDown = globals.getClosest(this.parentNode, parentSelector);\n //if exists, add 'focus' to current parent with children\n if (hasDropDown != null || hasDropDown != undefined) {\n hasDropDown.classList.add('focus');\n }\n //remove \"focus\" from all other dropdowns not currently in focus\n var allSibDropdowns = globals.getSiblings(this.parentNode);\n for (var g = 0; g < allSibDropdowns.length; g++) {\n allSibDropdowns[g].classList.remove('focus');\n }\n });\n }\n};\n\n/**\r\n * removeFocusStatesOnNav\r\n * Listen for all focus states and remove 'focus' class on nav elements if currently focused element is not navigation\r\n * @private\r\n * @param {String} navParentSelector ID of primary navigation parent element\r\n * @param {Array} focusClassList Array containing all of the
  • elements in the main nav\r\n * @param {Array} allFocusElements Array containing all of the focusable elements on the page (or the one right after the main nav if you know it)\r\n */\n\n//remove focus class from all menu items when not focused on a menu element\nvar removeFocusStatesOnNav = function removeFocusStatesOnNav(navParentSelector, focusClassList, allFocusElements) {\n\n for (var j = 0; j < allFocusElements.length; j++) {\n allFocusElements[j].addEventListener(\"focus\", function () {\n var isMainMenu = globals.getClosest(this, navParentSelector) != null || globals.getClosest(this, navParentSelector) != undefined ? true : false;\n if (!isMainMenu) {\n for (var y = 0; y < focusClassList.length; y++) {\n focusClassList[y].classList.remove('focus');\n }\n }\n });\n }\n};\n\naddTabHandler(allPrimaryLinks, subNavIndicator);\nremoveFocusStatesOnNav(primaryMenuSelector, allMenuLis, allFocus);\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction rowClick(e) {\n\tvar el = e.target.parentElement;\n\tvar href = el.dataset.href;\n\n\tif (href) {\n\t\twindow.location = href;\n\t}\n}\n\nvar sortTable = document.getElementById(\"sort-table\");\nif (sortTable) {\n\t// loop table rows and add click event to TR\n\tfor (var i = 1, row; row = sortTable.rows[i]; i++) {\n\t\tvar link = sortTable.rows[i].querySelector('a').href;\n\t\tsortTable.rows[i].setAttribute('data-href', link);\n\t\tsortTable.rows[i].addEventListener('click', rowClick);\n\t}\n}\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _globals = __webpack_require__(1);\n\nvar itemsWithSubmenu = document.querySelectorAll('#primary-navigation .has-children');\nvar allPrimaryLinks = document.querySelectorAll('#primary-navigation a');\n\nvar addTabletTouchControls = function addTabletTouchControls(elem) {\n elem.addEventListener(\"touchend\", function (e) {\n\n //check that tapped element has a parent that is not yet focused and has a dropdown\n var isTabletAndClosed = ((0, _globals.getClosest)(this.parentNode, '.focus') === null || (0, _globals.getClosest)(this.parentNode, '.focus') === undefined) && window.innerWidth >= 1024 && ((0, _globals.getClosest)(this.parentNode, '.has-children') != null || (0, _globals.getClosest)(this.parentNode, '.has-children') != undefined) ? true : false;\n\n //if satisfied, stop default link action\n if (isTabletAndClosed) {\n e.preventDefault();\n e.stopPropagation();\n\n //remove focus state from other menus\n for (var i = 0; i < itemsWithSubmenu.length; i++) {\n itemsWithSubmenu[i].classList.remove('focus');\n }\n\n //add focus state to tapped on menu item\n this.parentNode.classList.add('focus');\n }\n });\n};\n\nfor (var l = 0; l < allPrimaryLinks.length; l++) {\n addTabletTouchControls(allPrimaryLinks[l]);\n}\n\n/***/ }),\n/* 34 */,\n/* 35 */,\n/* 36 */,\n/* 37 */,\n/* 38 */,\n/* 39 */,\n/* 40 */,\n/* 41 */,\n/* 42 */,\n/* 43 */,\n/* 44 */,\n/* 45 */,\n/* 46 */,\n/* 47 */,\n/* 48 */,\n/* 49 */,\n/* 50 */,\n/* 51 */,\n/* 52 */,\n/* 53 */,\n/* 54 */,\n/* 55 */,\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/*! fluidvids.js v2.4.1 | (c) 2014 @toddmotto | https://github.com/toddmotto/fluidvids */\n/* jshint ignore:start */\n(function (root, factory) {\n\n module.exports = factory;\n})(undefined, function () {\n\n 'use strict';\n\n var fluidvids = {\n selector: ['iframe', 'object'],\n players: ['www.youtube.com', 'player.vimeo.com']\n };\n\n var css = ['.fluidvids {', 'width: 100%; max-width: 100%; position: relative;', '}', '.fluidvids-item {', 'position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;', '}'].join('');\n\n var head = document.head || document.getElementsByTagName('head')[0];\n\n function matches(src) {\n return new RegExp('^(https?:)?\\/\\/(?:' + fluidvids.players.join('|') + ').*$', 'i').test(src);\n }\n\n function getRatio(height, width) {\n return parseInt(height, 10) / parseInt(width, 10) * 100 + '%';\n }\n\n function fluid(elem) {\n if (!matches(elem.src) && !matches(elem.data) || !!elem.getAttribute('data-fluidvids')) return;\n var wrap = document.createElement('div');\n elem.parentNode.insertBefore(wrap, elem);\n elem.className += (elem.className ? ' ' : '') + 'fluidvids-item';\n elem.setAttribute('data-fluidvids', 'loaded');\n wrap.className += 'fluidvids';\n wrap.style.paddingTop = getRatio(elem.height, elem.width);\n wrap.appendChild(elem);\n }\n\n function addStyles() {\n var div = document.createElement('div');\n div.innerHTML = '

    x

    ';\n head.appendChild(div.childNodes[1]);\n }\n\n fluidvids.render = function () {\n var nodes = document.querySelectorAll(fluidvids.selector.join());\n var i = nodes.length;\n while (i--) {\n fluid(nodes[i]);\n }\n };\n\n fluidvids.init = function (obj) {\n for (var key in obj) {\n fluidvids[key] = obj[key];\n }\n fluidvids.render();\n addStyles();\n };\n\n return fluidvids;\n});\n/* jshint ignore:end */\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\nvar __WEBPACK_AMD_DEFINE_RESULT__;\n\n(function () {\n var SELECTOR, addEventListener, clickEvents, numberRegExp, sortable, touchDevice, trimRegExp;\n\n SELECTOR = 'table[data-sortable]';\n\n numberRegExp = /^-?[£$¤]?[\\d,.]+%?$/;\n\n trimRegExp = /^\\s+|\\s+$/g;\n\n clickEvents = ['click'];\n\n touchDevice = 'ontouchstart' in document.documentElement;\n\n if (touchDevice) {\n clickEvents.push('touchstart');\n }\n\n addEventListener = function addEventListener(el, event, handler) {\n if (el.addEventListener != null) {\n return el.addEventListener(event, handler, false);\n } else {\n return el.attachEvent(\"on\" + event, handler);\n }\n };\n\n sortable = {\n init: function init(options) {\n var table, tables, _i, _len, _results;\n if (options == null) {\n options = {};\n }\n if (options.selector == null) {\n options.selector = SELECTOR;\n }\n tables = document.querySelectorAll(options.selector);\n _results = [];\n for (_i = 0, _len = tables.length; _i < _len; _i++) {\n table = tables[_i];\n _results.push(sortable.initTable(table));\n }\n return _results;\n },\n initTable: function initTable(table) {\n var i, th, ths, _i, _len, _ref;\n if (((_ref = table.tHead) != null ? _ref.rows.length : void 0) !== 1) {\n return;\n }\n if (table.getAttribute('data-sortable-initialized') === 'true') {\n return;\n }\n table.setAttribute('data-sortable-initialized', 'true');\n ths = table.querySelectorAll('th');\n for (i = _i = 0, _len = ths.length; _i < _len; i = ++_i) {\n th = ths[i];\n if (th.getAttribute('data-sortable') !== 'false') {\n sortable.setupClickableTH(table, th, i);\n }\n }\n return table;\n },\n setupClickableTH: function setupClickableTH(table, th, i) {\n var eventName, onClick, type, _i, _len, _results;\n type = sortable.getColumnType(table, i);\n onClick = function onClick(e) {\n var compare, item, newSortedDirection, position, row, rowArray, sorted, sortedDirection, tBody, ths, value, _compare, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1;\n if (e.handled !== true) {\n e.handled = true;\n } else {\n return false;\n }\n sorted = this.getAttribute('data-sorted') === 'true';\n sortedDirection = this.getAttribute('data-sorted-direction');\n if (sorted) {\n newSortedDirection = sortedDirection === 'ascending' ? 'descending' : 'ascending';\n } else {\n newSortedDirection = type.defaultSortDirection;\n }\n ths = this.parentNode.querySelectorAll('th');\n for (_i = 0, _len = ths.length; _i < _len; _i++) {\n th = ths[_i];\n th.setAttribute('data-sorted', 'false');\n th.removeAttribute('data-sorted-direction');\n }\n this.setAttribute('data-sorted', 'true');\n this.setAttribute('data-sorted-direction', newSortedDirection);\n tBody = table.tBodies[0];\n rowArray = [];\n if (!sorted) {\n if (type.compare != null) {\n _compare = type.compare;\n } else {\n _compare = function _compare(a, b) {\n return b - a;\n };\n }\n compare = function compare(a, b) {\n if (a[0] === b[0]) {\n return a[2] - b[2];\n }\n if (type.reverse) {\n return _compare(b[0], a[0]);\n } else {\n return _compare(a[0], b[0]);\n }\n };\n _ref = tBody.rows;\n for (position = _j = 0, _len1 = _ref.length; _j < _len1; position = ++_j) {\n row = _ref[position];\n value = sortable.getNodeValue(row.cells[i]);\n if (type.comparator != null) {\n value = type.comparator(value);\n }\n rowArray.push([value, row, position]);\n }\n rowArray.sort(compare);\n for (_k = 0, _len2 = rowArray.length; _k < _len2; _k++) {\n row = rowArray[_k];\n tBody.appendChild(row[1]);\n }\n } else {\n _ref1 = tBody.rows;\n for (_l = 0, _len3 = _ref1.length; _l < _len3; _l++) {\n item = _ref1[_l];\n rowArray.push(item);\n }\n rowArray.reverse();\n for (_m = 0, _len4 = rowArray.length; _m < _len4; _m++) {\n row = rowArray[_m];\n tBody.appendChild(row);\n }\n }\n if (typeof window['CustomEvent'] === 'function') {\n return typeof table.dispatchEvent === \"function\" ? table.dispatchEvent(new CustomEvent('Sortable.sorted', {\n bubbles: true\n })) : void 0;\n }\n };\n _results = [];\n for (_i = 0, _len = clickEvents.length; _i < _len; _i++) {\n eventName = clickEvents[_i];\n _results.push(addEventListener(th, eventName, onClick));\n }\n return _results;\n },\n getColumnType: function getColumnType(table, i) {\n var row, specified, text, type, _i, _j, _len, _len1, _ref, _ref1, _ref2;\n specified = (_ref = table.querySelectorAll('th')[i]) != null ? _ref.getAttribute('data-sortable-type') : void 0;\n if (specified != null) {\n return sortable.typesObject[specified];\n }\n _ref1 = table.tBodies[0].rows;\n for (_i = 0, _len = _ref1.length; _i < _len; _i++) {\n row = _ref1[_i];\n text = sortable.getNodeValue(row.cells[i]);\n _ref2 = sortable.types;\n for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {\n type = _ref2[_j];\n if (type.match(text)) {\n return type;\n }\n }\n }\n return sortable.typesObject.alpha;\n },\n getNodeValue: function getNodeValue(node) {\n var dataValue;\n if (!node) {\n return '';\n }\n dataValue = node.getAttribute('data-value');\n if (dataValue !== null) {\n return dataValue;\n }\n if (typeof node.innerText !== 'undefined') {\n return node.innerText.replace(trimRegExp, '');\n }\n return node.textContent.replace(trimRegExp, '');\n },\n setupTypes: function setupTypes(types) {\n var type, _i, _len, _results;\n sortable.types = types;\n sortable.typesObject = {};\n _results = [];\n for (_i = 0, _len = types.length; _i < _len; _i++) {\n type = types[_i];\n _results.push(sortable.typesObject[type.name] = type);\n }\n return _results;\n }\n };\n\n sortable.setupTypes([{\n name: 'numeric',\n defaultSortDirection: 'descending',\n match: function match(a) {\n return a.match(numberRegExp);\n },\n comparator: function comparator(a) {\n return parseFloat(a.replace(/[^0-9.-]/g, ''), 10) || 0;\n }\n }, {\n name: 'date',\n defaultSortDirection: 'ascending',\n reverse: true,\n match: function match(a) {\n return !isNaN(Date.parse(a));\n },\n comparator: function comparator(a) {\n return Date.parse(a) || 0;\n }\n }, {\n name: 'alpha',\n defaultSortDirection: 'ascending',\n match: function match() {\n return true;\n },\n compare: function compare(a, b) {\n return a.localeCompare(b);\n }\n }]);\n\n setTimeout(sortable.init, 0);\n\n if (true) {\n !(__WEBPACK_AMD_DEFINE_RESULT__ = function () {\n return sortable;\n }.call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else if (typeof exports !== 'undefined') {\n module.exports = sortable;\n } else {\n window.Sortable = sortable;\n }\n}).call(undefined);\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _es6Promise = __webpack_require__(5);\n\n__webpack_require__(23);\n\n__webpack_require__(31);\n\n__webpack_require__(33);\n\n__webpack_require__(7);\n\n__webpack_require__(11);\n\n__webpack_require__(12);\n\n__webpack_require__(26);\n\n__webpack_require__(25);\n\n__webpack_require__(32);\n\n__webpack_require__(27);\n\n__webpack_require__(30);\n\n__webpack_require__(29);\n\n__webpack_require__(28);\n\n__webpack_require__(22);\n\n__webpack_require__(24);\n\nvar Promise = __webpack_require__(5).Promise;\n(0, _es6Promise.polyfill)();\n\n/***/ }),\n/* 59 */,\n/* 60 */,\n/* 61 */,\n/* 62 */,\n/* 63 */,\n/* 64 */,\n/* 65 */\n/***/ (function(module, exports) {\n\n/*!\n * @copyright Copyright (c) 2017 IcoMoon.io\n * @license Licensed under MIT license\n * See https://github.com/Keyamoon/svgxuse\n * @version 1.2.6\n */\n/*jslint browser: true */\n/*global XDomainRequest, MutationObserver, window */\n(function () {\n \"use strict\";\n if (typeof window !== \"undefined\" && window.addEventListener) {\n var cache = Object.create(null); // holds xhr objects to prevent multiple requests\n var checkUseElems;\n var tid; // timeout id\n var debouncedCheck = function () {\n clearTimeout(tid);\n tid = setTimeout(checkUseElems, 100);\n };\n var unobserveChanges = function () {\n return;\n };\n var observeChanges = function () {\n var observer;\n window.addEventListener(\"resize\", debouncedCheck, false);\n window.addEventListener(\"orientationchange\", debouncedCheck, false);\n if (window.MutationObserver) {\n observer = new MutationObserver(debouncedCheck);\n observer.observe(document.documentElement, {\n childList: true,\n subtree: true,\n attributes: true\n });\n unobserveChanges = function () {\n try {\n observer.disconnect();\n window.removeEventListener(\"resize\", debouncedCheck, false);\n window.removeEventListener(\"orientationchange\", debouncedCheck, false);\n } catch (ignore) {}\n };\n } else {\n document.documentElement.addEventListener(\"DOMSubtreeModified\", debouncedCheck, false);\n unobserveChanges = function () {\n document.documentElement.removeEventListener(\"DOMSubtreeModified\", debouncedCheck, false);\n window.removeEventListener(\"resize\", debouncedCheck, false);\n window.removeEventListener(\"orientationchange\", debouncedCheck, false);\n };\n }\n };\n var createRequest = function (url) {\n // In IE 9, cross origin requests can only be sent using XDomainRequest.\n // XDomainRequest would fail if CORS headers are not set.\n // Therefore, XDomainRequest should only be used with cross origin requests.\n function getOrigin(loc) {\n var a;\n if (loc.protocol !== undefined) {\n a = loc;\n } else {\n a = document.createElement(\"a\");\n a.href = loc;\n }\n return a.protocol.replace(/:/g, \"\") + a.host;\n }\n var Request;\n var origin;\n var origin2;\n if (window.XMLHttpRequest) {\n Request = new XMLHttpRequest();\n origin = getOrigin(location);\n origin2 = getOrigin(url);\n if (Request.withCredentials === undefined && origin2 !== \"\" && origin2 !== origin) {\n Request = XDomainRequest || undefined;\n } else {\n Request = XMLHttpRequest;\n }\n }\n return Request;\n };\n var xlinkNS = \"http://www.w3.org/1999/xlink\";\n checkUseElems = function () {\n var base;\n var bcr;\n var fallback = \"\"; // optional fallback URL in case no base path to SVG file was given and no symbol definition was found.\n var hash;\n var href;\n var i;\n var inProgressCount = 0;\n var isHidden;\n var Request;\n var url;\n var uses;\n var xhr;\n function observeIfDone() {\n // If done with making changes, start watching for chagnes in DOM again\n inProgressCount -= 1;\n if (inProgressCount === 0) { // if all xhrs were resolved\n unobserveChanges(); // make sure to remove old handlers\n observeChanges(); // watch for changes to DOM\n }\n }\n function attrUpdateFunc(spec) {\n return function () {\n if (cache[spec.base] !== true) {\n spec.useEl.setAttributeNS(xlinkNS, \"xlink:href\", \"#\" + spec.hash);\n if (spec.useEl.hasAttribute(\"href\")) {\n spec.useEl.setAttribute(\"href\", \"#\" + spec.hash);\n }\n }\n };\n }\n function onloadFunc(xhr) {\n return function () {\n var body = document.body;\n var x = document.createElement(\"x\");\n var svg;\n xhr.onload = null;\n x.innerHTML = xhr.responseText;\n svg = x.getElementsByTagName(\"svg\")[0];\n if (svg) {\n svg.setAttribute(\"aria-hidden\", \"true\");\n svg.style.position = \"absolute\";\n svg.style.width = 0;\n svg.style.height = 0;\n svg.style.overflow = \"hidden\";\n body.insertBefore(svg, body.firstChild);\n }\n observeIfDone();\n };\n }\n function onErrorTimeout(xhr) {\n return function () {\n xhr.onerror = null;\n xhr.ontimeout = null;\n observeIfDone();\n };\n }\n unobserveChanges(); // stop watching for changes to DOM\n // find all use elements\n uses = document.getElementsByTagName(\"use\");\n for (i = 0; i < uses.length; i += 1) {\n try {\n bcr = uses[i].getBoundingClientRect();\n } catch (ignore) {\n // failed to get bounding rectangle of the use element\n bcr = false;\n }\n href = uses[i].getAttribute(\"href\")\n || uses[i].getAttributeNS(xlinkNS, \"href\")\n || uses[i].getAttribute(\"xlink:href\");\n if (href && href.split) {\n url = href.split(\"#\");\n } else {\n url = [\"\", \"\"];\n }\n base = url[0];\n hash = url[1];\n isHidden = bcr && bcr.left === 0 && bcr.right === 0 && bcr.top === 0 && bcr.bottom === 0;\n if (bcr && bcr.width === 0 && bcr.height === 0 && !isHidden) {\n // the use element is empty\n // if there is a reference to an external SVG, try to fetch it\n // use the optional fallback URL if there is no reference to an external SVG\n if (fallback && !base.length && hash && !document.getElementById(hash)) {\n base = fallback;\n }\n if (uses[i].hasAttribute(\"href\")) {\n uses[i].setAttributeNS(xlinkNS, \"xlink:href\", href);\n }\n if (base.length) {\n // schedule updating xlink:href\n xhr = cache[base];\n if (xhr !== true) {\n // true signifies that prepending the SVG was not required\n setTimeout(attrUpdateFunc({\n useEl: uses[i],\n base: base,\n hash: hash\n }), 0);\n }\n if (xhr === undefined) {\n Request = createRequest(base);\n if (Request !== undefined) {\n xhr = new Request();\n cache[base] = xhr;\n xhr.onload = onloadFunc(xhr);\n xhr.onerror = onErrorTimeout(xhr);\n xhr.ontimeout = onErrorTimeout(xhr);\n xhr.open(\"GET\", base);\n xhr.send();\n inProgressCount += 1;\n }\n }\n }\n } else {\n if (!isHidden) {\n if (cache[base] === undefined) {\n // remember this URL if the use element was not empty and no request was sent\n cache[base] = true;\n } else if (cache[base].onload) {\n // if it turns out that prepending the SVG is not necessary,\n // abort the in-progress xhr.\n cache[base].abort();\n delete cache[base].onload;\n cache[base] = true;\n }\n } else if (base.length && cache[base]) {\n setTimeout(attrUpdateFunc({\n useEl: uses[i],\n base: base,\n hash: hash\n }), 0);\n }\n }\n }\n uses = \"\";\n inProgressCount += 1;\n observeIfDone();\n };\n var winLoad;\n winLoad = function () {\n window.removeEventListener(\"load\", winLoad, false); // to prevent memory leaks\n tid = setTimeout(checkUseElems, 0);\n };\n if (document.readyState !== \"complete\") {\n // The load event fires when all resources have finished loading, which allows detecting whether SVG use elements are empty.\n window.addEventListener(\"load\", winLoad, false);\n } else {\n // No need to add a listener if the document is already loaded, initialize immediately.\n winLoad();\n }\n }\n}());\n\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// scripts.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 58);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap f4774e3dd250de9a0242","/**\r\n * Get the closest matching element up the DOM tree.\r\n * @private\r\n * @param {Element} elem Starting element\r\n * @param {String} selector Selector to match against\r\n * @return {Boolean|Element} Returns null if not match found\r\n */\r\nexport var getClosest = function ( elem, selector ) {\r\n\r\n // Element.matches() polyfill\r\n if (!Element.prototype.matches) {\r\n Element.prototype.matches =\r\n Element.prototype.matchesSelector ||\r\n Element.prototype.mozMatchesSelector ||\r\n Element.prototype.msMatchesSelector ||\r\n Element.prototype.oMatchesSelector ||\r\n Element.prototype.webkitMatchesSelector ||\r\n function(s) {\r\n var matches = (this.document || this.ownerDocument).querySelectorAll(s),\r\n i = matches.length;\r\n while (--i >= 0 && matches.item(i) !== this) {}\r\n return i > -1;\r\n };\r\n }\r\n\r\n // Get closest match\r\n for ( ; elem && elem !== document; elem = elem.parentNode ) {\r\n if ( elem.matches( selector ) ) {return elem;}\r\n }\r\n\r\n return null;\r\n\r\n};\r\n\r\nexport function getChildren(n, skipMe){\r\n var r = [];\r\n for ( ; n; n = n.nextSibling ) {\r\n if ( n.nodeType == 1 && n != skipMe) {\r\n r.push( n );\r\n }\r\n }\r\n return r;\r\n}\r\n\r\nexport function getSiblings(n) {\r\n return getChildren(n.parentNode.firstChild, n);\r\n}\r\n\r\n/* jshint ignore:start */\r\nexport function toArray(obj) {\r\n var array = [];\r\n // iterate backwards ensuring that length is an UInt32\r\n for (var i = obj.length >>> 0; i--;) {\r\n array[i] = obj[i];\r\n }\r\n return array;\r\n}\r\n/* jshint ignore:end */\r\n\r\n//Polyfill for Array.from\r\n// Production steps of ECMA-262, Edition 6, 22.1.2.1\r\nif (!Array.from) {\r\n Array.from = (function () {\r\n var toStr = Object.prototype.toString;\r\n var isCallable = function (fn) {\r\n return typeof fn === 'function' || toStr.call(fn) === '[object Function]';\r\n };\r\n var toInteger = function (value) {\r\n var number = Number(value);\r\n if (isNaN(number)) { return 0; }\r\n if (number === 0 || !isFinite(number)) { return number; }\r\n return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));\r\n };\r\n var maxSafeInteger = Math.pow(2, 53) - 1;\r\n var toLength = function (value) {\r\n var len = toInteger(value);\r\n return Math.min(Math.max(len, 0), maxSafeInteger);\r\n };\r\n\r\n // The length property of the from method is 1.\r\n return function from(arrayLike/*, mapFn, thisArg */) {\r\n // 1. Let C be the this value.\r\n var C = this;\r\n\r\n // 2. Let items be ToObject(arrayLike).\r\n var items = Object(arrayLike);\r\n\r\n // 3. ReturnIfAbrupt(items).\r\n if (arrayLike == null) {\r\n throw new TypeError('Array.from requires an array-like object - not null or undefined');\r\n }\r\n\r\n // 4. If mapfn is undefined, then let mapping be false.\r\n var mapFn = arguments.length > 1 ? arguments[1] : void undefined;\r\n var T;\r\n if (typeof mapFn !== 'undefined') {\r\n // 5. else\r\n // 5. a If IsCallable(mapfn) is false, throw a TypeError exception.\r\n if (!isCallable(mapFn)) {\r\n throw new TypeError('Array.from: when provided, the second argument must be a function');\r\n }\r\n\r\n // 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined.\r\n if (arguments.length > 2) {\r\n T = arguments[2];\r\n }\r\n }\r\n\r\n // 10. Let lenValue be Get(items, \"length\").\r\n // 11. Let len be ToLength(lenValue).\r\n var len = toLength(items.length);\r\n\r\n // 13. If IsConstructor(C) is true, then\r\n // 13. a. Let A be the result of calling the [[Construct]] internal method\r\n // of C with an argument list containing the single item len.\r\n // 14. a. Else, Let A be ArrayCreate(len).\r\n var A = isCallable(C) ? Object(new C(len)) : new Array(len);\r\n\r\n // 16. Let k be 0.\r\n var k = 0;\r\n // 17. Repeat, while k < len… (also steps a - h)\r\n var kValue;\r\n while (k < len) {\r\n kValue = items[k];\r\n if (mapFn) {\r\n A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);\r\n } else {\r\n A[k] = kValue;\r\n }\r\n k += 1;\r\n }\r\n // 18. Let putStatus be Put(A, \"length\", len, true).\r\n A.length = len;\r\n // 20. Return A.\r\n return A;\r\n };\r\n }());\r\n}\r\n\r\nexport function tps_setCookie(cname, cvalue, cexpiration) {\r\n if (!cexpiration) {\r\n cexpiration = 365;\r\n }\r\n // set cookie to expire in 1 year by default\r\n let d = new Date();\r\n d.setTime(d.getTime() + (cexpiration * 24 * 60 * 60 * 1000));\r\n let _cookie = '';\r\n _cookie += cname + '=' + cvalue + ';';\r\n _cookie += 'expires=' + d.toUTCString() + ';';\r\n _cookie += 'secure;';\r\n _cookie += 'SameSite=Strict;path=/';\r\n document.cookie = _cookie;\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/components/globals.js","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 2\n// module chunks = 0 1","module.exports = require('es6-promise').Promise;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es6-promise-promise/index.js\n// module id = 3\n// module chunks = 0 1","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/process/browser.js\n// module id = 4\n// module chunks = 0 1","/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.ES6Promise = factory());\n}(this, (function () { 'use strict';\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\n\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\n\nvar len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}\n\nfunction then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve$1(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n resolve(promise, object);\n return promise;\n}\n\nvar PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {\n try {\n then$$1.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then$$1) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then$$1, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then$$1) {\n if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then$$1 === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then$$1 === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then$$1)) {\n handleForeignThenable(promise, maybeThenable, then$$1);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n}\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve$$1 = c.resolve;\n\n\n if (resolve$$1 === resolve$1) {\n var _then = getThen(entry);\n\n if (_then === then && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise$1) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve$$1) {\n return resolve$$1(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve$$1(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject$1(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n reject(promise, reason);\n return promise;\n}\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise$1 = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise$1.prototype.then = then;\nPromise$1.all = all;\nPromise$1.race = race;\nPromise$1.resolve = resolve$1;\nPromise$1.reject = reject$1;\nPromise$1._setScheduler = setScheduler;\nPromise$1._setAsap = setAsap;\nPromise$1._asap = asap;\n\n/*global self*/\nfunction polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise$1;\n}\n\n// Strange compat..\nPromise$1.polyfill = polyfill;\nPromise$1.Promise = Promise$1;\n\nreturn Promise$1;\n\n})));\n\n\n\n//# sourceMappingURL=es6-promise.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es6-promise/dist/es6-promise.js\n// module id = 5\n// module chunks = 0 1","import {popModal} from './login-modal';\r\nimport {dropMemberMenu} from './member-dropdown';\r\nimport {getClosest} from './globals';\r\nvar ng_nav = ng_nav || {};\r\n\r\n/*\r\n * moveElements\r\n * Move Panel Navigation & Cover Elements to before body\r\n *\r\n * Deprecated\r\n*/\r\nng_nav.moveElements = (div) => {\r\n\tdiv.forEach(function(name) { \r\n\t\tvar panelNavElement = document.getElementById(name);\r\n\t\tdocument.body.appendChild(panelNavElement);\r\n\t});\r\n};\r\nlet panelElements = ['panel-nav', 'panel-nav-cover'];\r\n//ng_nav.moveElements(panelElements);\r\n\r\n\r\nvar exitButton = document.getElementById('menu-exit-toggle');\r\n\r\n// Assign Constants\r\nconst ng_consts = {\r\n mainNav: document.getElementById('primary-navigation'),\r\n utilNav: document.getElementById('utility-navigation'),\r\n searchWrap: document.querySelector('.search-wrap'),\r\n searchWrapMobile: document.querySelector('.search-mobile-wrap'),\r\n panelNav: document.getElementById('panel-nav'),\r\n panelNavCover: document.getElementById('panel-nav-cover'),\r\n toggleButton: document.getElementById('mobile-toggle-menu'),\r\n mobileSubMenu: document.getElementsByClassName('submenu')\r\n};\r\nlet searchBoxDesktop = ng_consts.searchWrap.querySelector('input.form-control');\r\nsearchBoxDesktop.setAttribute('placeholder', 'Search');\r\nlet searchBoxMobile = ng_consts.searchWrapMobile.querySelector('input.form-control');\r\nsearchBoxMobile.setAttribute('placeholder', 'Search');\r\n\r\n\r\nlet ng_clones = {};\r\n\r\n/* MOBILE NAV CREATION WORKFLOW */\r\n\r\nng_nav.setUpMobile = () => {\r\n let cloneMenus = new Promise((resolve) => {\r\n \r\n /*\r\n * cloneMenus\r\n * Clone menus into mobile nav\r\n */\r\n\r\n // Clone Main Nav\r\n ng_clones.mainNavClone = ng_consts.mainNav.cloneNode(true);\r\n ng_clones.mainNavClone.removeAttribute('id'); // Reset ID\r\n ng_clones.menuWrap = document.createElement('DIV'); // Create wrapper\r\n ng_clones.menuWrap.classList.add('primary-mobile-wrap'); //add unique class\r\n ng_clones.menuWrap.appendChild(ng_clones.mainNavClone);\r\n ng_consts.panelNav.appendChild(ng_clones.menuWrap);\r\n\r\n // Clone Utility Nav\r\n ng_clones.utilNavClone = ng_consts.utilNav.cloneNode(true);\r\n ng_clones.utilNavClone.removeAttribute('id'); // Reset ID\r\n ng_clones.menuUtilWrap = document.createElement('DIV'); // Create wrapper\r\n ng_clones.menuUtilWrap.classList.add('utility-mobile-wrap'); //add unique class\r\n ng_clones.menuUtilWrap.appendChild(ng_clones.utilNavClone);\r\n ng_consts.panelNav.appendChild(ng_clones.menuUtilWrap);\r\n\r\n //add overflow hidden to mobile L2\r\n for (var e=0; e < ng_consts.mobileSubMenu.length; e++) {\r\n ng_consts.mobileSubMenu[e].style.overflow = \"hidden\";\r\n }\r\n\r\n resolve(cloneMenus);\r\n\r\n });\r\n\r\n cloneMenus.then(function() {\r\n\r\n //change member login ID to be unique; if exists (i.e. if not logged in)\r\n if (ng_consts.panelNav.querySelector('#member-login-button') != null || ng_consts.panelNav.querySelector('#member-login-button') != undefined) {\r\n ng_consts.panelNav.querySelector('#member-login-button').id = \"mobile-member-login-button\";\r\n }\r\n //ditto to logged in member button\r\n if (ng_consts.panelNav.querySelector('#logged-in-toggle') != null || ng_consts.panelNav.querySelector('#logged-in-toggle') != undefined) {\r\n ng_consts.panelNav.querySelector('#logged-in-toggle').id = \"mobile-logged-in-toggle\";\r\n //further controls in /components/member-dropdown.js\r\n }\r\n\r\n // init new vars\r\n let navItemHasChildren = document.getElementsByClassName('has-children');\r\n let mobileItemHasChildren = [];\r\n let mobileDropButtons;\r\n\r\n //isolate mobile only\r\n for (var t=0; t < navItemHasChildren.length; t++) {\r\n if (navItemHasChildren[t].parentElement.parentElement.parentElement.classList.contains(\"primary-mobile-wrap\")) {\r\n mobileItemHasChildren.push(navItemHasChildren[t])\r\n }\r\n }\r\n /*\r\n * addButtons\r\n * Add dropdown buttons to menu items with children\r\n *\r\n */\r\n ng_nav.addButtons = () => {\r\n\r\n for (var a=0; a < mobileItemHasChildren.length; a++) {\r\n //create buttons\r\n let dropButton = document.createElement('button');\r\n dropButton.classList.add(\"mobile-dropdown-button\");\r\n dropButton.classList.add(\"button\");\r\n dropButton.classList.add(\"light\");\r\n dropButton.setAttribute(\"aria-expanded\", \"false\");\r\n\r\n var buttonImg = document.createElement('img');\r\n buttonImg.setAttribute('alt', 'Toggle Second Level of Menu');\r\n buttonImg.setAttribute('src', '/NationalGuild/assets/arrow-down.png');\r\n dropButton.appendChild(buttonImg);\r\n\r\n //append to menu\r\n mobileItemHasChildren[a].appendChild(dropButton);\r\n }\r\n\r\n //add to button array\r\n mobileDropButtons = document.getElementsByClassName('mobile-dropdown-button');\r\n\r\n }\r\n\r\n /*\r\n * mobileDrop\r\n * Toggle mobile menu 2nd level dropdowns\r\n *\r\n */\r\n \r\n ng_nav.hereStateSetup = function() {\r\n let menuToOpen = document.querySelector('.primary-mobile-wrap .submenu li.current');\r\n if (menuToOpen != null && menuToOpen) {\r\n let button = menuToOpen.parentNode.nextElementSibling;\r\n menuToOpen.parentNode.classList.add('open');\r\n menuToOpen.parentNode.style.overflow = \"auto\";\r\n button.setAttribute('aria-expanded', true);\r\n }\r\n\r\n }\r\n\r\n ng_nav.mobileDrop = function(e) {\r\n e.preventDefault()\r\n let button = this;\r\n let mobileItemParent = this.parentElement;\r\n let mobileItemChildren = mobileItemParent.children;\r\n for (var i=0; i < mobileItemChildren.length; i++) {\r\n if (mobileItemChildren[i].classList.contains(\"submenu\")) {\r\n let mobileL2List = mobileItemChildren[i];\r\n if (mobileL2List.classList.contains('open')) {\r\n mobileL2List.classList.remove('open');\r\n button.setAttribute('aria-expanded', false);\r\n } else {\r\n setTimeout(function() {\r\n mobileL2List.classList.add('open');\r\n }, 400);\r\n button.setAttribute('aria-expanded', true);\r\n }\r\n\r\n\r\n }\r\n }\r\n }\r\n\r\n /*\r\n * toggleMenu\r\n * Toggle mobile menu function\r\n *\r\n */\r\n ng_nav.toggleMenu = () =>{\r\n if(document.body.classList.contains('panel-active')){\r\n document.body.classList.remove(\"panel-active\");\r\n ng_consts.toggleButton.setAttribute('aria-expanded', 'false');\r\n }else{\r\n document.body.classList.add(\"panel-active\");\r\n ng_consts.toggleButton.setAttribute('aria-expanded', 'true');\r\n }\r\n }\r\n\r\n //run \r\n ng_consts.toggleButton.addEventListener('click', function() {\r\n })\r\n ng_nav.addButtons();\r\n ng_nav.hereStateSetup();\r\n for (var l=0; l < mobileDropButtons.length; l++) {\r\n mobileDropButtons[l].addEventListener('click', ng_nav.mobileDrop);\r\n }\r\n ng_consts.panelNavCover.addEventListener('click', ng_nav.toggleMenu);\r\n ng_consts.toggleButton.addEventListener('click', ng_nav.toggleMenu);\r\n exitButton.addEventListener('click', ng_nav.toggleMenu);\r\n //mobile login\r\n if (document.getElementById('mobile-member-login-button') != undefined || document.getElementById('mobile-member-login-button') != null) {\r\n let mobileLoginButton = document.getElementById('mobile-member-login-button');\r\n mobileLoginButton.addEventListener('click', popModal);\r\n }\r\n //mobile logged in menu\r\n if (document.getElementById('mobile-logged-in-toggle') != undefined || document.getElementById('mobile-logged-in-toggle') != null) {\r\n let toggleMobile = document.getElementById('mobile-logged-in-toggle');\r\n toggleMobile.addEventListener('click', dropMemberMenu);\r\n //add overflow hidden to mobile member dropdown\r\n let topMemberMenu = getClosest(toggleMobile, '.logged-in-menu-top');\r\n let memberMenu = topMemberMenu.querySelector('.logged-in-menu');\r\n memberMenu.style.overflow = \"hidden\";\r\n }\r\n });\r\n\r\n}\r\n\r\nng_nav.setUpMobile();\r\n\r\nexport function closeMenu() {\r\n if(document.body.classList.contains('panel-active')){\r\n document.body.classList.remove(\"panel-active\");\r\n ng_consts.toggleButton.setAttribute('aria-expanded', 'false');\r\n }\r\n}\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/components/mobile-menu.js","/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 3.3.1\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.ES6Promise = factory());\n}(this, (function () { 'use strict';\n\nfunction objectOrFunction(x) {\n return typeof x === 'function' || typeof x === 'object' && x !== null;\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nvar _isArray = undefined;\nif (!Array.isArray) {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n} else {\n _isArray = Array.isArray;\n}\n\nvar isArray = _isArray;\n\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n return function () {\n vertxNext(flush);\n };\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}\n\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n _resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n _reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n _reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n _reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return _resolve(promise, value);\n }, function (reason) {\n return _reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then$$) {\n if (maybeThenable.constructor === promise.constructor && then$$ === then && maybeThenable.constructor.resolve === resolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then$$ === GET_THEN_ERROR) {\n _reject(promise, GET_THEN_ERROR.error);\n } else if (then$$ === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then$$)) {\n handleForeignThenable(promise, maybeThenable, then$$);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction _resolve(promise, value) {\n if (promise === value) {\n _reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction _reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n _reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n _resolve(promise, value);\n } else if (failed) {\n _reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n _reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n _resolve(promise, value);\n }, function rejectPromise(reason) {\n _reject(promise, reason);\n });\n } catch (e) {\n _reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this._input = input;\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate();\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n _reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function () {\n var length = this.length;\n var _input = this._input;\n\n for (var i = 0; this._state === PENDING && i < length; i++) {\n this._eachEntry(_input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve$$ = c.resolve;\n\n if (resolve$$ === resolve) {\n var _then = getThen(entry);\n\n if (_then === then && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve$$) {\n return resolve$$(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve$$(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n _reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = resolve;\nPromise.reject = reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};\n\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}\n\npolyfill();\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\n\nreturn Promise;\n\n})));\n//# sourceMappingURL=es6-promise.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es6-promise-promise/~/es6-promise/dist/es6-promise.js\n// module id = 9\n// module chunks = 0 1","import {closeMenu} from './mobile-menu';\r\nimport {toArray, simulateClick} from './globals';\r\n\r\n//declare vars\r\nvar loginButton = document.getElementById('member-login-button'),\r\n loginButtonNodes = document.querySelectorAll('.member-login-button'),\r\n loginModalWrap = document.getElementById('login-modal-wrap'),\r\n loginModalExit = document.getElementById('login-modal-exit-button'),\r\n loginModalMask = document.getElementById('login-modal-mask'),\r\n loginButtons = toArray(loginButtonNodes);\r\nlet previousActiveElement;\r\n\r\nvar elFocusable = \"a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), object, embed, *[contenteditable]\",\r\n modalFocusableNodes = loginModalWrap.querySelectorAll(elFocusable),\r\n modalFocusable = toArray(modalFocusableNodes);\r\n\r\nconst KEYCODE = {\r\n ESC: 27,\r\n TAB: 9,\r\n SHIFT: 16,\r\n ENTER: 13\r\n}\r\n\r\nexport function popModal() {\r\n previousActiveElement = document.activeElement;\r\n loginModalWrap.classList.add('active');\r\n loginModalMask.classList.add('active');\r\n document.getElementById('p_lt_ModalZone_NG_LogonForm_Login1_UserName').focus();\r\n\r\n closeMenu();\r\n\r\n createExitListener();\r\n activateKeyCheck();\r\n}\r\n\r\nfunction createExitListener() {\r\n loginModalExit.addEventListener('click', popModalExit);\r\n loginModalMask.addEventListener('click', popModalExit);\r\n\r\n document.addEventListener('keydown', function(e) {\r\n if (e.which === KEYCODE.ESC) {\r\n popModalExit();\r\n }\r\n })\r\n}\r\n\r\nfunction activateKeyCheck() {\r\n document.addEventListener('keydown', function(e) {\r\n if (e.which == KEYCODE.TAB) {\r\n var currentFocus = document.activeElement,\r\n modalFocusableNum = modalFocusable.length,\r\n focusedIndex = modalFocusable.indexOf(currentFocus);\r\n if (e.shiftKey) {\r\n if (focusedIndex === 0) {\r\n modalFocusable[(modalFocusableNum - 1)].focus();\r\n e.preventDefault();\r\n }\r\n } else {\r\n if (focusedIndex == modalFocusableNum - 1) {\r\n modalFocusable[0].focus();\r\n e.preventDefault();\r\n }\r\n }\r\n }\r\n })\r\n}\r\n\r\nfunction popModalExit() {\r\n loginModalMask.classList.remove('active');\r\n loginModalWrap.classList.remove('active');\r\n previousActiveElement.focus();\r\n}\r\n\r\n//run modal script if exists (i.e. if not logged in)\r\nif (loginButton != null || loginButton != undefined) {\r\n loginButton.addEventListener('click', popModal);\r\n}\r\n\r\nif (loginButtons != null || loginButtons != undefined) {\r\n loginButtonNodes.forEach(function (item) {\r\n item.addEventListener(\"click\", popModal);\r\n });\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/components/login-modal.js","import * as globals from './globals';\r\n\r\n//declare variables\r\nlet toggle = document.getElementById('logged-in-toggle');\r\n\r\n//dropdown\r\nexport function dropMemberMenu() {\r\n let topMenu = globals.getClosest(this, '.logged-in-menu-top');\r\n let menu = topMenu.querySelector('.logged-in-menu');\r\n if (menu.classList.contains('open')) {\r\n menu.classList.remove('open');\r\n this.setAttribute('aria-expanded', 'false');\r\n if (globals.getClosest(this, '.utility-mobile-wrap')) {\r\n menu.style.overflow = \"hidden\";\r\n }\r\n } else {\r\n menu.classList.add('open');\r\n this.setAttribute('aria-expanded', 'true');\r\n if (globals.getClosest(this, '.utility-mobile-wrap')) {\r\n setTimeout(function() {\r\n menu.style.overflow = \"auto\";\r\n }, 500);\r\n }\r\n }\r\n}\r\n\r\nif (toggle != null || toggle != undefined) {\r\n toggle.addEventListener('click', dropMemberMenu);\r\n}\r\n\r\n//mobile handler in mobile-menu.js\r\n\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/components/member-dropdown.js","const submitBtns = Array.from(document.querySelectorAll('input[type=\"submit\"].FormButton'));\r\n\r\nif (submitBtns.length) {\r\n\tsubmitBtns.forEach((btn) => {\r\n\t btn.addEventListener('click', () => {\r\n\t document.body.scrollTop = 0; \r\n\t document.documentElement.scrollTop = 0; \r\n\t })\r\n\t})\r\n}\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/components/form-to-top.js","var svgxuse = require('svgxuse'), //jshint ignore:line\r\n // ^ ie11 ployfill\r\n fluidvids = require('./fluidvids.js')(),\r\n sortable = require('../libs/sortable.js');\r\n\r\n//fluidvids global\r\nfluidvids.init({\r\n selector: ['iframe', 'object'], // runs querySelectorAll()\r\n players: ['www.youtube.com', 'player.vimeo.com'] // players to support\r\n});\r\n\r\n\r\n(function openExternalLinksInNewWindow(window) {\r\n\r\n const domain = window.location.host\r\n .replace(/\\./gi, \"\\\\.\");\r\n\r\n const domainFilterRegexp = new RegExp(\"^(www\\\\.)?\" + domain + \"$\", \"gim\");\r\n\r\n const matches = window.document.querySelectorAll(\"a[href^='http://'], a[href^='https://']\");\r\n\r\n if (\"NodeList\" in window && !NodeList.prototype.forEach) {\r\n\r\n NodeList.prototype.forEach = function (callback, thisArg) {\r\n thisArg = thisArg || window;\r\n\r\n for (let i = 0; i < this.length; i++) {\r\n callback.call(thisArg, this[i], i, this);\r\n }\r\n };\r\n }\r\n\r\n matches.forEach(function (link) {\r\n\r\n if (!domainFilterRegexp.test(link.host)) {\r\n\r\n let sortable = link.classList.contains('sortable');\r\n\r\n if (link === undefined || link.target === \"\" && !sortable) {\r\n link.target = \"_blank\";\r\n }\r\n }\r\n });\r\n\r\n}(window));\r\n\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/components/globalInits.js","import { tps_setCookie } from './globals';\r\n\r\nexport function tps_handleAlertBannerDismiss(event) {\r\n var elem = event.currentTarget;\r\n var banner = document.getElementById('tps-header-notification-banner');\r\n var cookieName = elem.dataset.tpsCookieName;\r\n var cookieValue = elem.dataset.tpsCookieValue;\r\n // hide the banner\r\n banner.classList.add('hide');\r\n // set the cookie\r\n if (cookieName && cookieValue) {\r\n tps_setCookie(cookieName, cookieValue);\r\n }\r\n}\r\n\r\nwindow.tps_handleAlertBannerDismiss = tps_handleAlertBannerDismiss;\r\n\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/components/header-notifications.js","import * as globals from './globals'; //jshint ignore:line\r\n\r\n// Get mobile button\r\nconst leftNav = document.querySelector('.secondary-nav');\r\nlet leftNavTitle = document.querySelector('.secondary-nav h2');\r\n\r\n// Create mobile toggle button\r\nif(leftNavTitle){\r\n\tleftNavTitle = leftNavTitle.innerHTML;\r\n\tlet btn = document.createElement(\"BUTTON\");\r\n\tbtn.classList.add('mobile-toogle-btn');\r\n\tbtn.setAttribute('type','button');\r\n\tbtn.innerHTML = leftNavTitle;\r\n\tlet wrapper = document.querySelector(\".mobile-button-target\");\r\n\twrapper.appendChild(btn);\r\n}\r\n\r\nvar toggleMenu = () => {\r\n if(leftNav.classList.contains('active')){\r\n leftNav.classList.remove('active');\r\n } else {\r\n leftNav.classList.add('active');\r\n }\r\n}\r\n\r\nconst toggleBtn = document.querySelector('.mobile-toogle-btn');\r\nif(toggleBtn){\r\n toggleBtn.addEventListener('click', toggleMenu);\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/components/left-nav.js","/* jshint ignore:start */\r\nimport * as globals from './globals';\r\n/* jshint ignore:end */\r\n\r\n// Get all post listing
    \r\nconst articles = [...document.querySelectorAll('.post-listing article')];\r\n\r\n// Add click event for each article\r\narticles.forEach((article) => {\r\n let href = article.querySelector(\"a\").href; // Find the href\r\n article.addEventListener('click', function (evt) {\r\n\r\n if (evt.ctrlKey) {\r\n evt.preventDefault();\r\n\r\n window.open(href, \"_blank\");\r\n } else {\r\n gotoURL(href);\r\n } \r\n }); // add event listener\r\n});\r\n\r\n// Goto the URL :)\r\nlet gotoURL = (href) => {\r\n window.location.href = href;\r\n console.log('when does this run?')\r\n}\r\n let form = document.getElementById('form')\r\nvar att = document.createAttribute('autocomplete')\r\natt.value = \"off\"\r\nform.setAttributeNode(att)\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/components/listing.js","import {closeMenu} from './mobile-menu';\r\nimport {toArray, simulateClick} from './globals';\r\n\r\n//declare vars\r\nvar memberDownloadButton = document.getElementById('membership-list_download-button'),\r\nmemberDownloadWrap = document.getElementById('membership-list_modal-wrap'),memberDownloadExit = document.getElementById('membership-list_modal-close'),\r\nmemberDownloadMask = document.getElementById('membership-list_modal-mask');\r\nlet previousActiveElement;\r\n\r\nlet modalFocusableNodes;\r\nlet modalFocusable;\r\nvar elFocusable = \"a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), object, embed, *[contenteditable]\";\r\nif (memberDownloadWrap) {\r\n modalFocusableNodes = memberDownloadWrap.querySelectorAll(elFocusable);\r\n modalFocusable = toArray(modalFocusableNodes);\r\n}\r\n\r\n\r\nconst KEYCODE = {\r\n ESC: 27,\r\n TAB: 9,\r\n SHIFT: 16,\r\n ENTER: 13\r\n}\r\n\r\nexport function popModal(e) {\r\n e.preventDefault()\r\n previousActiveElement = document.activeElement;\r\n memberDownloadWrap.classList.add('active');\r\n memberDownloadMask.classList.add('active');\r\n modalFocusable[0].focus();\r\n closeMenu();\r\n console.log(modalFocusable)\r\n createExitListener();\r\n activateKeyCheck();\r\n}\r\n\r\nfunction createExitListener() {\r\n \r\n if (memberDownloadMask) {\r\n memberDownloadMask.addEventListener('click', popModalExit);\r\n }\r\n\r\n memberDownloadExit.addEventListener('click', popModalExit);\r\n document.addEventListener('keydown', function(e) {\r\n if (e.which === KEYCODE.ESC) {\r\n popModalExit();\r\n }\r\n })\r\n}\r\n\r\nfunction activateKeyCheck() {\r\n document.addEventListener('keydown', function(e) {\r\n if (e.which == KEYCODE.TAB) {\r\n var currentFocus = document.activeElement,\r\n modalFocusableNum = modalFocusable.length,\r\n focusedIndex = modalFocusable.indexOf(currentFocus);\r\n if (e.shiftKey) {\r\n if (focusedIndex === 0) {\r\n modalFocusable[(modalFocusableNum - 1)].focus();\r\n e.preventDefault();\r\n }\r\n } else {\r\n if (focusedIndex == modalFocusableNum - 1) {\r\n modalFocusable[0].focus();\r\n e.preventDefault();\r\n }\r\n }\r\n }\r\n })\r\n}\r\n\r\nfunction popModalExit() {\r\n memberDownloadMask.classList.remove('active');\r\n memberDownloadWrap.classList.remove('active');\r\n previousActiveElement.focus();\r\n}\r\n\r\n//run modal script if exists (i.e. if not logged in)\r\nif (memberDownloadButton != null ||memberDownloadButton != undefined) {\r\n memberDownloadButton.addEventListener('click', popModal);\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/components/memberlist-modal.js","let expanded = false;\r\nconst options = document.getElementById(\"selectOptions\");\r\nconst customSelect = document.getElementById(\"customSelect\");\r\nconst selectContainer = document.getElementById('multiSelectContainer');\r\n\r\nfunction showCheckboxes() {\r\n if (!expanded) {\r\n options.style.display = \"block\";\r\n expanded = true;\r\n } else {\r\n options.style.display = \"none\";\r\n expanded = false;\r\n }\r\n}\r\n\r\nfunction updateLabel() {\r\n const toggle = customSelect.querySelector('button');\r\n\r\n const selected = checks.filter(check => check.checked == true);\r\n\r\n if (selected.length >= 2) {\r\n toggle.innerHTML = \"Multiple states selected\";\r\n } else if (selected.length == 1) {\r\n toggle.innerHTML = selected[0].dataset.name;\r\n } else {\r\n toggle.innerHTML = \"All states\";\r\n }\r\n}\r\n\r\nif (customSelect){\r\n customSelect.addEventListener('click', ()=> {\r\n showCheckboxes();\r\n });\r\n}\r\n\r\n//listener on last checkbox to close when tabbign out\r\nconst checks = customSelect ? Array.from(options.querySelectorAll('input')) : [];\r\nconst lastCheck = checks.length ? checks[checks.length - 1] : null;\r\n\r\nif (lastCheck) {\r\n\r\n lastCheck.addEventListener('keydown', (e) => {\r\n if (!event.shiftkey && e.keyCode === 9 ) {\r\n showCheckboxes();\r\n\r\n }\r\n });\r\n}\r\n\r\nchecks.forEach((check) => {\r\n check.addEventListener('click', () => {\r\n updateLabel();\r\n })\r\n})\r\n\r\n\r\n//global listener for click out of custom select\r\nconst pageContainer = document.getElementById('container');\r\nif (pageContainer){\r\n pageContainer.addEventListener('click', (e) => {\r\n const clickedInside = selectContainer.contains(e.target);\r\n if (!clickedInside) {\r\n options.style.display = \"none\";\r\n expanded = false;\r\n }\r\n });\r\n}\r\n\r\nif (customSelect) {\r\n updateLabel();\r\n}\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/components/multiselect.js","///Get the container for no results and remove the after effect\r\nlet listingContainer = document.querySelector('.has-after')\r\nif(listingContainer){\r\n //console.log(listingContainer)\r\n let templateBackground = listingContainer.querySelector('.no-results_container')\r\n if (templateBackground){\r\n //console.log(templateBackground.parentElement.parentElement)\r\n templateBackground.parentElement.parentElement.classList.add('after-removed')\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/components/no-results.js","// Get the kentico pagination elements that are arrows and hide them\r\n\r\nlet listingPagination = document.querySelector('.listing-pagination')\r\nif(listingPagination){\r\n let pageBtns = listingPagination.getElementsByTagName('a')\r\n\r\n let icon = listingPagination.getElementsByTagName('i')\r\n\r\n var arrPageBtns = [];\r\n for(var i = pageBtns.length; i--; arrPageBtns.unshift(pageBtns[i]));\r\n\r\n let pageBtnsWithArrows = arrPageBtns.forEach(function(pageBtn) {\r\n\r\n let span = pageBtn.querySelector('.sr-only') != null\r\n if (span) {\r\n pageBtn.classList.add('hide')\r\n }\r\n })\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/components/pagination.js","import * as globals from './globals';\r\n\r\n//CONFIG //declare consts\r\n\r\n//primary menu ID selector\r\nconst primaryMenuSelector = '#primary-navigation';\r\n//class of
  • elements that are parents of submenus\r\nconst subNavIndicator = '.has-children';\r\n//all menu links\r\nconst allPrimaryLinks = document.querySelectorAll('#primary-navigation a');\r\n//all focusable elements on the page\r\nconst allFocus = document.querySelectorAll('a, button, input');\r\n//all elements that could be given a class of \"focus\" by addTabHandler\r\nconst allMenuLis = document.querySelectorAll('#primary-navigation li');\r\n\r\n/**\r\n * addTabHandler\r\n * Listen for and handle focus on primary menu 's\r\n * @private\r\n * @param {Array} array Array of all primary menu links\r\n * @param {String} parentSelector Selector of first-level li with a submenu (i.e. '.has-children')\r\n */\r\nvar addTabHandler = function(array, parentSelector) {\r\n for (var i=0; i < array.length; i++) {\r\n array[i].addEventListener(\"focus\", function() {\r\n //check if there is a parent with the class \"has-children\"\r\n var hasDropDown = globals.getClosest(this.parentNode, parentSelector);\r\n //if exists, add 'focus' to current parent with children\r\n if (hasDropDown != null || hasDropDown != undefined) {\r\n hasDropDown.classList.add('focus');\r\n }\r\n //remove \"focus\" from all other dropdowns not currently in focus\r\n var allSibDropdowns = globals.getSiblings(this.parentNode);\r\n for (var g = 0; g < allSibDropdowns.length; g++) {\r\n allSibDropdowns[g].classList.remove('focus');\r\n }\r\n });\r\n }\r\n};\r\n\r\n/**\r\n * removeFocusStatesOnNav\r\n * Listen for all focus states and remove 'focus' class on nav elements if currently focused element is not navigation\r\n * @private\r\n * @param {String} navParentSelector ID of primary navigation parent element\r\n * @param {Array} focusClassList Array containing all of the
  • elements in the main nav\r\n * @param {Array} allFocusElements Array containing all of the focusable elements on the page (or the one right after the main nav if you know it)\r\n */\r\n\r\n//remove focus class from all menu items when not focused on a menu element\r\nvar removeFocusStatesOnNav = function(navParentSelector, focusClassList, allFocusElements) {\r\n\r\n for (var j=0; j < allFocusElements.length; j++) {\r\n allFocusElements[j].addEventListener(\"focus\", function() {\r\n var isMainMenu = (globals.getClosest(this, navParentSelector) != null || globals.getClosest(this, navParentSelector) != undefined) ? true : false;\r\n if (!isMainMenu) {\r\n for (var y=0; y < focusClassList.length; y++) {\r\n focusClassList[y].classList.remove('focus');\r\n }\r\n }\r\n });\r\n }\r\n};\r\n\r\naddTabHandler(allPrimaryLinks, subNavIndicator);\r\nremoveFocusStatesOnNav(primaryMenuSelector, allMenuLis, allFocus);\r\n\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/components/tabbable-nav.js","function rowClick(e){\r\n\tlet el = e.target.parentElement;\r\n\tlet href = el.dataset.href;\r\n\r\n\tif(href){\r\n\t\twindow.location = href;\r\n\t}\r\n}\r\n\r\nvar sortTable = document.getElementById(\"sort-table\");\r\nif(sortTable){\r\n\t// loop table rows and add click event to TR\r\n\tfor (var i = 1, row; row = sortTable.rows[i]; i++) {\r\n\t var link = sortTable.rows[i].querySelector('a').href;\r\n\t sortTable.rows[i].setAttribute('data-href', link);\r\n\t sortTable.rows[i].addEventListener('click', rowClick);\r\n\t}\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/components/table-sort.js","import {getClosest} from './globals';\r\n\r\nconst itemsWithSubmenu = document.querySelectorAll('#primary-navigation .has-children');\r\nconst allPrimaryLinks = document.querySelectorAll('#primary-navigation a');\r\n\r\nvar addTabletTouchControls = function(elem) {\r\n elem.addEventListener(\"touchend\", function(e) {\r\n\r\n //check that tapped element has a parent that is not yet focused and has a dropdown\r\n var isTabletAndClosed = ( (getClosest(this.parentNode, '.focus') === null || getClosest(this.parentNode, '.focus') === undefined )\r\n && window.innerWidth >= 1024\r\n && ( getClosest(this.parentNode, '.has-children') != null || getClosest(this.parentNode, '.has-children') != undefined ) )\r\n ? true : false;\r\n\r\n //if satisfied, stop default link action\r\n if (isTabletAndClosed) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n //remove focus state from other menus\r\n for (var i=0; i < itemsWithSubmenu.length; i++) {\r\n itemsWithSubmenu[i].classList.remove('focus');\r\n }\r\n\r\n //add focus state to tapped on menu item\r\n this.parentNode.classList.add('focus');\r\n }\r\n\r\n });\r\n}\r\n\r\nfor (var l=0; l < allPrimaryLinks.length; l++) {\r\n addTabletTouchControls(allPrimaryLinks[l]);\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/components/tablet-nav-controls.js","/*! fluidvids.js v2.4.1 | (c) 2014 @toddmotto | https://github.com/toddmotto/fluidvids */\r\n/* jshint ignore:start */\r\n(function (root, factory) {\r\n\r\n module.exports = factory;\r\n\r\n})(this, function () {\r\n\r\n 'use strict';\r\n\r\n var fluidvids = {\r\n selector: ['iframe', 'object'],\r\n players: ['www.youtube.com', 'player.vimeo.com']\r\n };\r\n\r\n var css = [\r\n '.fluidvids {',\r\n 'width: 100%; max-width: 100%; position: relative;',\r\n '}',\r\n '.fluidvids-item {',\r\n 'position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;',\r\n '}'\r\n ].join('');\r\n\r\n var head = document.head || document.getElementsByTagName('head')[0];\r\n\r\n function matches (src) {\r\n return new RegExp('^(https?:)?\\/\\/(?:' + fluidvids.players.join('|') + ').*$', 'i').test(src);\r\n }\r\n\r\n function getRatio (height, width) {\r\n return ((parseInt(height, 10) / parseInt(width, 10)) * 100) + '%';\r\n }\r\n\r\n function fluid (elem) {\r\n if (!matches(elem.src) && !matches(elem.data) || !!elem.getAttribute('data-fluidvids')) return;\r\n var wrap = document.createElement('div');\r\n elem.parentNode.insertBefore(wrap, elem);\r\n elem.className += (elem.className ? ' ' : '') + 'fluidvids-item';\r\n elem.setAttribute('data-fluidvids', 'loaded');\r\n wrap.className += 'fluidvids';\r\n wrap.style.paddingTop = getRatio(elem.height, elem.width);\r\n wrap.appendChild(elem);\r\n }\r\n\r\n function addStyles () {\r\n var div = document.createElement('div');\r\n div.innerHTML = '

    x

    ';\r\n head.appendChild(div.childNodes[1]);\r\n }\r\n\r\n fluidvids.render = function () {\r\n var nodes = document.querySelectorAll(fluidvids.selector.join());\r\n var i = nodes.length;\r\n while (i--) {\r\n fluid(nodes[i]);\r\n }\r\n };\r\n\r\n fluidvids.init = function (obj) {\r\n for (var key in obj) {\r\n fluidvids[key] = obj[key];\r\n }\r\n fluidvids.render();\r\n addStyles();\r\n };\r\n\r\n return fluidvids;\r\n\r\n});\r\n/* jshint ignore:end */\r\n\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/components/fluidvids.js","(function() {\r\n var SELECTOR, addEventListener, clickEvents, numberRegExp, sortable, touchDevice, trimRegExp;\r\n\r\n SELECTOR = 'table[data-sortable]';\r\n\r\n numberRegExp = /^-?[£$¤]?[\\d,.]+%?$/;\r\n\r\n trimRegExp = /^\\s+|\\s+$/g;\r\n\r\n clickEvents = ['click'];\r\n\r\n touchDevice = 'ontouchstart' in document.documentElement;\r\n\r\n if (touchDevice) {\r\n clickEvents.push('touchstart');\r\n }\r\n\r\n addEventListener = function(el, event, handler) {\r\n if (el.addEventListener != null) {\r\n return el.addEventListener(event, handler, false);\r\n } else {\r\n return el.attachEvent(\"on\" + event, handler);\r\n }\r\n };\r\n\r\n sortable = {\r\n init: function(options) {\r\n var table, tables, _i, _len, _results;\r\n if (options == null) {\r\n options = {};\r\n }\r\n if (options.selector == null) {\r\n options.selector = SELECTOR;\r\n }\r\n tables = document.querySelectorAll(options.selector);\r\n _results = [];\r\n for (_i = 0, _len = tables.length; _i < _len; _i++) {\r\n table = tables[_i];\r\n _results.push(sortable.initTable(table));\r\n }\r\n return _results;\r\n },\r\n initTable: function(table) {\r\n var i, th, ths, _i, _len, _ref;\r\n if (((_ref = table.tHead) != null ? _ref.rows.length : void 0) !== 1) {\r\n return;\r\n }\r\n if (table.getAttribute('data-sortable-initialized') === 'true') {\r\n return;\r\n }\r\n table.setAttribute('data-sortable-initialized', 'true');\r\n ths = table.querySelectorAll('th');\r\n for (i = _i = 0, _len = ths.length; _i < _len; i = ++_i) {\r\n th = ths[i];\r\n if (th.getAttribute('data-sortable') !== 'false') {\r\n sortable.setupClickableTH(table, th, i);\r\n }\r\n }\r\n return table;\r\n },\r\n setupClickableTH: function(table, th, i) {\r\n var eventName, onClick, type, _i, _len, _results;\r\n type = sortable.getColumnType(table, i);\r\n onClick = function(e) {\r\n var compare, item, newSortedDirection, position, row, rowArray, sorted, sortedDirection, tBody, ths, value, _compare, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1;\r\n if (e.handled !== true) {\r\n e.handled = true;\r\n } else {\r\n return false;\r\n }\r\n sorted = this.getAttribute('data-sorted') === 'true';\r\n sortedDirection = this.getAttribute('data-sorted-direction');\r\n if (sorted) {\r\n newSortedDirection = sortedDirection === 'ascending' ? 'descending' : 'ascending';\r\n } else {\r\n newSortedDirection = type.defaultSortDirection;\r\n }\r\n ths = this.parentNode.querySelectorAll('th');\r\n for (_i = 0, _len = ths.length; _i < _len; _i++) {\r\n th = ths[_i];\r\n th.setAttribute('data-sorted', 'false');\r\n th.removeAttribute('data-sorted-direction');\r\n }\r\n this.setAttribute('data-sorted', 'true');\r\n this.setAttribute('data-sorted-direction', newSortedDirection);\r\n tBody = table.tBodies[0];\r\n rowArray = [];\r\n if (!sorted) {\r\n if (type.compare != null) {\r\n _compare = type.compare;\r\n } else {\r\n _compare = function(a, b) {\r\n return b - a;\r\n };\r\n }\r\n compare = function(a, b) {\r\n if (a[0] === b[0]) {\r\n return a[2] - b[2];\r\n }\r\n if (type.reverse) {\r\n return _compare(b[0], a[0]);\r\n } else {\r\n return _compare(a[0], b[0]);\r\n }\r\n };\r\n _ref = tBody.rows;\r\n for (position = _j = 0, _len1 = _ref.length; _j < _len1; position = ++_j) {\r\n row = _ref[position];\r\n value = sortable.getNodeValue(row.cells[i]);\r\n if (type.comparator != null) {\r\n value = type.comparator(value);\r\n }\r\n rowArray.push([value, row, position]);\r\n }\r\n rowArray.sort(compare);\r\n for (_k = 0, _len2 = rowArray.length; _k < _len2; _k++) {\r\n row = rowArray[_k];\r\n tBody.appendChild(row[1]);\r\n }\r\n } else {\r\n _ref1 = tBody.rows;\r\n for (_l = 0, _len3 = _ref1.length; _l < _len3; _l++) {\r\n item = _ref1[_l];\r\n rowArray.push(item);\r\n }\r\n rowArray.reverse();\r\n for (_m = 0, _len4 = rowArray.length; _m < _len4; _m++) {\r\n row = rowArray[_m];\r\n tBody.appendChild(row);\r\n }\r\n }\r\n if (typeof window['CustomEvent'] === 'function') {\r\n return typeof table.dispatchEvent === \"function\" ? table.dispatchEvent(new CustomEvent('Sortable.sorted', {\r\n bubbles: true\r\n })) : void 0;\r\n }\r\n };\r\n _results = [];\r\n for (_i = 0, _len = clickEvents.length; _i < _len; _i++) {\r\n eventName = clickEvents[_i];\r\n _results.push(addEventListener(th, eventName, onClick));\r\n }\r\n return _results;\r\n },\r\n getColumnType: function(table, i) {\r\n var row, specified, text, type, _i, _j, _len, _len1, _ref, _ref1, _ref2;\r\n specified = (_ref = table.querySelectorAll('th')[i]) != null ? _ref.getAttribute('data-sortable-type') : void 0;\r\n if (specified != null) {\r\n return sortable.typesObject[specified];\r\n }\r\n _ref1 = table.tBodies[0].rows;\r\n for (_i = 0, _len = _ref1.length; _i < _len; _i++) {\r\n row = _ref1[_i];\r\n text = sortable.getNodeValue(row.cells[i]);\r\n _ref2 = sortable.types;\r\n for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {\r\n type = _ref2[_j];\r\n if (type.match(text)) {\r\n return type;\r\n }\r\n }\r\n }\r\n return sortable.typesObject.alpha;\r\n },\r\n getNodeValue: function(node) {\r\n var dataValue;\r\n if (!node) {\r\n return '';\r\n }\r\n dataValue = node.getAttribute('data-value');\r\n if (dataValue !== null) {\r\n return dataValue;\r\n }\r\n if (typeof node.innerText !== 'undefined') {\r\n return node.innerText.replace(trimRegExp, '');\r\n }\r\n return node.textContent.replace(trimRegExp, '');\r\n },\r\n setupTypes: function(types) {\r\n var type, _i, _len, _results;\r\n sortable.types = types;\r\n sortable.typesObject = {};\r\n _results = [];\r\n for (_i = 0, _len = types.length; _i < _len; _i++) {\r\n type = types[_i];\r\n _results.push(sortable.typesObject[type.name] = type);\r\n }\r\n return _results;\r\n }\r\n };\r\n\r\n sortable.setupTypes([\r\n {\r\n name: 'numeric',\r\n defaultSortDirection: 'descending',\r\n match: function(a) {\r\n return a.match(numberRegExp);\r\n },\r\n comparator: function(a) {\r\n return parseFloat(a.replace(/[^0-9.-]/g, ''), 10) || 0;\r\n }\r\n }, {\r\n name: 'date',\r\n defaultSortDirection: 'ascending',\r\n reverse: true,\r\n match: function(a) {\r\n return !isNaN(Date.parse(a));\r\n },\r\n comparator: function(a) {\r\n return Date.parse(a) || 0;\r\n }\r\n }, {\r\n name: 'alpha',\r\n defaultSortDirection: 'ascending',\r\n match: function() {\r\n return true;\r\n },\r\n compare: function(a, b) {\r\n return a.localeCompare(b);\r\n }\r\n }\r\n ]);\r\n\r\n setTimeout(sortable.init, 0);\r\n\r\n if (typeof define === 'function' && define.amd) {\r\n define(function() {\r\n return sortable;\r\n });\r\n } else if (typeof exports !== 'undefined') {\r\n module.exports = sortable;\r\n } else {\r\n window.Sortable = sortable;\r\n }\r\n\r\n}).call(this);\r\n\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/libs/sortable.js","var Promise = require('es6-promise').Promise;\r\nimport { polyfill } from 'es6-promise'; polyfill();\r\nimport './components/globalInits';\r\nimport './components/tabbable-nav';\r\nimport './components/tablet-nav-controls';\r\nimport './components/mobile-menu';\r\nimport './components/login-modal';\r\nimport './components/member-dropdown';\r\nimport './components/listing';\r\nimport './components/left-nav';\r\nimport './components/table-sort';\r\nimport './components/memberlist-modal';\r\nimport './components/pagination';\r\nimport './components/no-results';\r\nimport './components/multiselect';\r\nimport './components/form-to-top';\r\nimport './components/header-notifications';\r\n\n\n\n// WEBPACK FOOTER //\n// ./CMS/NationalGuild/src/js/scripts.js","/*!\n * @copyright Copyright (c) 2017 IcoMoon.io\n * @license Licensed under MIT license\n * See https://github.com/Keyamoon/svgxuse\n * @version 1.2.6\n */\n/*jslint browser: true */\n/*global XDomainRequest, MutationObserver, window */\n(function () {\n \"use strict\";\n if (typeof window !== \"undefined\" && window.addEventListener) {\n var cache = Object.create(null); // holds xhr objects to prevent multiple requests\n var checkUseElems;\n var tid; // timeout id\n var debouncedCheck = function () {\n clearTimeout(tid);\n tid = setTimeout(checkUseElems, 100);\n };\n var unobserveChanges = function () {\n return;\n };\n var observeChanges = function () {\n var observer;\n window.addEventListener(\"resize\", debouncedCheck, false);\n window.addEventListener(\"orientationchange\", debouncedCheck, false);\n if (window.MutationObserver) {\n observer = new MutationObserver(debouncedCheck);\n observer.observe(document.documentElement, {\n childList: true,\n subtree: true,\n attributes: true\n });\n unobserveChanges = function () {\n try {\n observer.disconnect();\n window.removeEventListener(\"resize\", debouncedCheck, false);\n window.removeEventListener(\"orientationchange\", debouncedCheck, false);\n } catch (ignore) {}\n };\n } else {\n document.documentElement.addEventListener(\"DOMSubtreeModified\", debouncedCheck, false);\n unobserveChanges = function () {\n document.documentElement.removeEventListener(\"DOMSubtreeModified\", debouncedCheck, false);\n window.removeEventListener(\"resize\", debouncedCheck, false);\n window.removeEventListener(\"orientationchange\", debouncedCheck, false);\n };\n }\n };\n var createRequest = function (url) {\n // In IE 9, cross origin requests can only be sent using XDomainRequest.\n // XDomainRequest would fail if CORS headers are not set.\n // Therefore, XDomainRequest should only be used with cross origin requests.\n function getOrigin(loc) {\n var a;\n if (loc.protocol !== undefined) {\n a = loc;\n } else {\n a = document.createElement(\"a\");\n a.href = loc;\n }\n return a.protocol.replace(/:/g, \"\") + a.host;\n }\n var Request;\n var origin;\n var origin2;\n if (window.XMLHttpRequest) {\n Request = new XMLHttpRequest();\n origin = getOrigin(location);\n origin2 = getOrigin(url);\n if (Request.withCredentials === undefined && origin2 !== \"\" && origin2 !== origin) {\n Request = XDomainRequest || undefined;\n } else {\n Request = XMLHttpRequest;\n }\n }\n return Request;\n };\n var xlinkNS = \"http://www.w3.org/1999/xlink\";\n checkUseElems = function () {\n var base;\n var bcr;\n var fallback = \"\"; // optional fallback URL in case no base path to SVG file was given and no symbol definition was found.\n var hash;\n var href;\n var i;\n var inProgressCount = 0;\n var isHidden;\n var Request;\n var url;\n var uses;\n var xhr;\n function observeIfDone() {\n // If done with making changes, start watching for chagnes in DOM again\n inProgressCount -= 1;\n if (inProgressCount === 0) { // if all xhrs were resolved\n unobserveChanges(); // make sure to remove old handlers\n observeChanges(); // watch for changes to DOM\n }\n }\n function attrUpdateFunc(spec) {\n return function () {\n if (cache[spec.base] !== true) {\n spec.useEl.setAttributeNS(xlinkNS, \"xlink:href\", \"#\" + spec.hash);\n if (spec.useEl.hasAttribute(\"href\")) {\n spec.useEl.setAttribute(\"href\", \"#\" + spec.hash);\n }\n }\n };\n }\n function onloadFunc(xhr) {\n return function () {\n var body = document.body;\n var x = document.createElement(\"x\");\n var svg;\n xhr.onload = null;\n x.innerHTML = xhr.responseText;\n svg = x.getElementsByTagName(\"svg\")[0];\n if (svg) {\n svg.setAttribute(\"aria-hidden\", \"true\");\n svg.style.position = \"absolute\";\n svg.style.width = 0;\n svg.style.height = 0;\n svg.style.overflow = \"hidden\";\n body.insertBefore(svg, body.firstChild);\n }\n observeIfDone();\n };\n }\n function onErrorTimeout(xhr) {\n return function () {\n xhr.onerror = null;\n xhr.ontimeout = null;\n observeIfDone();\n };\n }\n unobserveChanges(); // stop watching for changes to DOM\n // find all use elements\n uses = document.getElementsByTagName(\"use\");\n for (i = 0; i < uses.length; i += 1) {\n try {\n bcr = uses[i].getBoundingClientRect();\n } catch (ignore) {\n // failed to get bounding rectangle of the use element\n bcr = false;\n }\n href = uses[i].getAttribute(\"href\")\n || uses[i].getAttributeNS(xlinkNS, \"href\")\n || uses[i].getAttribute(\"xlink:href\");\n if (href && href.split) {\n url = href.split(\"#\");\n } else {\n url = [\"\", \"\"];\n }\n base = url[0];\n hash = url[1];\n isHidden = bcr && bcr.left === 0 && bcr.right === 0 && bcr.top === 0 && bcr.bottom === 0;\n if (bcr && bcr.width === 0 && bcr.height === 0 && !isHidden) {\n // the use element is empty\n // if there is a reference to an external SVG, try to fetch it\n // use the optional fallback URL if there is no reference to an external SVG\n if (fallback && !base.length && hash && !document.getElementById(hash)) {\n base = fallback;\n }\n if (uses[i].hasAttribute(\"href\")) {\n uses[i].setAttributeNS(xlinkNS, \"xlink:href\", href);\n }\n if (base.length) {\n // schedule updating xlink:href\n xhr = cache[base];\n if (xhr !== true) {\n // true signifies that prepending the SVG was not required\n setTimeout(attrUpdateFunc({\n useEl: uses[i],\n base: base,\n hash: hash\n }), 0);\n }\n if (xhr === undefined) {\n Request = createRequest(base);\n if (Request !== undefined) {\n xhr = new Request();\n cache[base] = xhr;\n xhr.onload = onloadFunc(xhr);\n xhr.onerror = onErrorTimeout(xhr);\n xhr.ontimeout = onErrorTimeout(xhr);\n xhr.open(\"GET\", base);\n xhr.send();\n inProgressCount += 1;\n }\n }\n }\n } else {\n if (!isHidden) {\n if (cache[base] === undefined) {\n // remember this URL if the use element was not empty and no request was sent\n cache[base] = true;\n } else if (cache[base].onload) {\n // if it turns out that prepending the SVG is not necessary,\n // abort the in-progress xhr.\n cache[base].abort();\n delete cache[base].onload;\n cache[base] = true;\n }\n } else if (base.length && cache[base]) {\n setTimeout(attrUpdateFunc({\n useEl: uses[i],\n base: base,\n hash: hash\n }), 0);\n }\n }\n }\n uses = \"\";\n inProgressCount += 1;\n observeIfDone();\n };\n var winLoad;\n winLoad = function () {\n window.removeEventListener(\"load\", winLoad, false); // to prevent memory leaks\n tid = setTimeout(checkUseElems, 0);\n };\n if (document.readyState !== \"complete\") {\n // The load event fires when all resources have finished loading, which allows detecting whether SVG use elements are empty.\n window.addEventListener(\"load\", winLoad, false);\n } else {\n // No need to add a listener if the document is already loaded, initialize immediately.\n winLoad();\n }\n }\n}());\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/svgxuse/svgxuse.js\n// module id = 65\n// module chunks = 1"],"sourceRoot":""}