/*! * uri-util - URI Util module to work with URIs in browser and server * @version v1.1.0 - Mon Dec 08 2014 * @link https://github.com/pasangsherpa/uri-util * @author Pasang Sherpa (https://github.com/pasangsherpa) * @license MIT */ !function(){"use strict";var e="undefined"!=typeof module&&module.exports,n="function"==typeof define&&define.amd,o={parse:function(e){return"string"!=typeof e?{}:(e=e.trim().replace(/^(.*?)(\?|#)/,"").replace(/\+/g,"%20"),e?e.split("&").reduce(function(e,n){n=n.split("=");var o=n[0],t=n[1];return o=decodeURIComponent(o),t=void 0===t?null:decodeURIComponent(t),e.hasOwnProperty(o)?Array.isArray(e[o])?e[o].push(t):e[o]=[e[o],t]:e[o]=t,e},{}):{})},stringify:function(e){return e?Object.keys(e).map(function(n){var o=e[n];return Array.isArray(o)?o.map(function(e){return encodeURIComponent(n)+"="+encodeURIComponent(e)}).join("&"):encodeURIComponent(n)+"="+encodeURIComponent(o)}).join("&"):""},getQueryValue:function(e,n){return"string"!=typeof e?"":(e=e.trim().replace(/^(.*?)(\?|#)/,""),e?decodeURIComponent((new RegExp(n+"=([^&;]+?)(&|#|;|$)").exec(e)||[,""])[1].replace(/\+/g,"%20"))||null:"")},getQueryValueInLoc:function(e){return this.getQueryValue(location.search,e)}};e?module.exports=o:n?define(function(){return o}):window.URIUtil=o}();