/*! uhttp v2.0.1 | (c) 2018 @flux159 | http://flux159.github.io/uhttp/ */ !function(t,e){"undefined"!=typeof module?module.exports=e():t.uhttp=e()}(this,function(){"use strict";function t(t,e){this.name=t,this.data={},e||(e={}),this.timeout=e.timeout||0}function e(t){return null!==t&&"object"==typeof t}function n(t){return null!==t&&"string"==typeof t}function o(t){return"[object File]"===m.call(t)}function r(t){return"[object Blob]"===m.call(t)}function a(t){return"[object FormData]"===m.call(t)}function u(t){var e=t;return document.documentMode&&(v.setAttribute("href",e),e=v.href),v.setAttribute("href",e),{href:v.href,protocol:v.protocol?v.protocol.replace(/:$/,""):"",host:v.host,search:v.search?v.search.replace(/^\?/,""):"",hash:v.hash?v.hash.replace(/^#/,""):"",hostname:v.hostname,port:v.port,pathname:"/"===v.pathname.charAt(0)?v.pathname:"/"+v.pathname}}function i(t){var e=n(t)?u(t):t;return e.protocol===g.protocol&&e.host===g.host}function s(t){if(t){for(var e=t+"=",n=document.cookie.split(";"),o=0;o=200&&S.status<300||304===S.status?("GET"===t&&O&&("boolean"==typeof O?d.get("__default").set(n,e):"Cache"===O.constructor.name?O.set(n,e):O.cache.set(n,e,O.options)),m(u.details?{res:e,status:S.status,request:S}:e)):v(u.details?{err:e,status:S.status,request:S}:e),N=null,S=null,e=null}},S.send(N.options.transformRequestData(f)),N.options.timeout>0&&setTimeout(function(){S&&S.abort()},N.options.timeout)});return p}var h=window;t.prototype.remove=function(t){delete this.data[t]},t.prototype.clear=function(){this.data={}},t.prototype.set=function(t,e,n){if(this.data[t]=e,n||(n={}),(n.timeout||this.timeout)>0){var o=this;setTimeout(function(){o.remove(t)},n.timeout||this.timeout)}},t.prototype.get=function(t){return this.data[t]};var d=function(){function e(){var e={__default:new t("__default")};return{get:function(n,o){if(e[n])return e[n];var r=new t(n,o);return e[n]=r,r}}}var n=null;return{getFactory:function(){return n||(n=e()),n}}}().getFactory(),m=Object.prototype.toString,v=document.createElement("a"),g=u(h.location.href),T={transformRequest:function(t){return t},transformResponse:function(t){return t},transformRequestData:function(t){return!e(t)||o(t)||r(t)||a(t)?t:JSON.stringify(t)},transformResponseData:function(t){var e,n=t.responseText;try{e=JSON.parse(n)}catch(t){e=n}return e},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},y={headers:{},timeout:0,withCredentials:!1},C="application/json;charset=utf-8",b={};return b.setGlobalOptions=function(t){(y=t).headers&&e(y.headers)||(y.headers={})},b.getGlobalOptions=function(){return y},b.CacheFactory=d,b.getCookie=s,b.setCookie=function(t,e,n){if(n){var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3);var r="expires="+o.toUTCString();document.cookie=t+"="+e+"; "+r+"; path=/"}else document.cookie=t+"="+e+"; path=/"},b.setCookieFromString=function(t){document.cookie=t},b.deleteCookie=function(t,e){document.cookie=e?t+"=; path="+e+"; expires=Thu, 01 Jan 1970 00:00:01 GMT;":t+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"},b.parallel=function(t,e){for(var n=0,o=[],r=null,a=t.length,u=0;u