reklatsmasters / depositjs

// ==UserScript==
// @name           depositjs
// @description    Helper for depositfiles without capcha, timers and limits
// @version        1.0.0
// @date           2015-02-01
// @author         ReklatsMasters
// @homepageURL    https://github.com/ReklatsMasters/depositjs
// @updateURL      https://openuserjs.org/install/ReklatsMasters/depositjs.user.js
// @include        http://depositfiles.com/files/*
// @include        http://depositfiles.com/*/files/*
// @include        http://depositfiles.org/files/*
// @include        http://depositfiles.org/*/files/*
// @include        http://dfiles.ru/*/files/*
// @include        http://dfiles.ru/files/*
// @include        http://dfiles.eu/*/files/*
// @include        http://dfiles.eu/files/*
// @grant          GM_xmlhttpRequest
// @icon           http://static.dfiles.ru/images/favicon.ico
// @license        MIT;https://github.com/ReklatsMasters/depositjs/blob/master/LICENSE
// @copyright      2015, ReklatsMasters (https://github.com/ReklatsMasters)
// ==/UserScript==

!function t(e,n,r){function o(i,a){if(!n[i]){if(!e[i]){var h="function"==typeof require&&require;if(!a&&h)return h(i,!0);if(s)return s(i,!0);var u=new Error("Cannot find module '"+i+"'");throw u.code="MODULE_NOT_FOUND",u}var f=n[i]={exports:{}};e[i][0].call(f.exports,function(t){var n=e[i][1][t];return o(n?n:t)},f,f.exports,t,e,n,r)}return n[i].exports}for(var s="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(t){"use strict";function e(t){return l(t+"dd64vJK3s.dV1/z")}function n(t){var n={protocol:"http",hostname:location.hostname,pathname:"/api/fastdownload/get",query:{uid:t,os:"win8x64",appid:"dfdownloader",sign:e(t)}};return p(n,!0)}function r(){return-1!=document.body.className.indexOf("page_download")}function o(){return-1!=document.body.className.indexOf("page_download_gateway")}function s(t){var e=new XMLHttpRequest;e.open("POST",location.pathname,!0),e.onreadystatechange=function(){if(4==e.readyState){if(!(e.status>=200&&e.status<300))throw new Error("Download error - "+e.status);var n=new DOMParser,r=n.parseFromString(e.responseText,"text/html");setTimeout(t.bind(null,r),0)}},e.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),e.send("gateway_result=1")}function i(t,e){GM_xmlhttpRequest({method:"GET",url:t,headers:{"User-Agent":"Deposit Files Downloader",Accept:"text/html, application/xhtml+xml, application/xml, */*","X-Requested-With":null},onload:function(t){if(t.status>=200&&t.status<300){var n=JSON.parse(t.responseText);if(!n.status_code)return void setTimeout(e.bind(null,new Error),0);setTimeout(e.bind(null,null,n.data.file.download_url),0)}else setTimeout(e.bind(null,new Error),0)},onerror:function(){setTimeout(e.bind(null,new Error),0)}})}function a(t){if("form"!=t.nodeName.toLowerCase())throw new Error("Impossible to find download url");return t.action}function h(t){var e=d(t).pathname;return e.split("_")[1]}function u(t,e){var r=a(e.getElementById("networkdownloader")||e.getElementById("dfdownloader_frm")),o=h(r),s=n(o);i(s,function(e,n){return e?void t.showError():void t.bindUrl(n).showDownloadBar()})}function f(){var t=new c;if(t.install().showSpinner(),o())s(u.bind(null,t));else{if(!r())throw new Error("Undefined page");u(t,document)}}var l=t("./lib/md5"),c=t("./lib/dom"),p=t("url").format,d=t("url").parse;window.addEventListener("DOMContentLoaded",f,!1)},{"./lib/dom":2,"./lib/md5":3,url:8}],2:[function(t,e){"use strict";function n(){var t=document.createElement("div");return t.className="loader",t.appendChild(document.createTextNode("Loading...")),t}function r(){var t="dmts-"+Math.random().toString().slice(2),e=document.createElement("a");return e.style.display="block",e.style.textTransform="uppercase",e.className="df_button",e.id=t,e}function o(){var t=document.createElement("span"),e=document.createElement("span");return e.appendChild(document.createTextNode("download")),t.innerHTML='<span class="sprite download_icon"></span>&nbsp;',t.appendChild(e),t}function s(){var t=document.createElement("span");return t.appendChild(document.createTextNode("{: ERROR :}")),t.style.lineHeight="38px",t}function i(){this.el=r(),this._core=o(),this._error=s(),this._spinner=n(),this.$installCss()}var a=" 	.loader:before, 	.loader:after, 	.loader {		border-radius: 50%;		width: 2.5em;		height: 2.5em;		-webkit-animation-fill-mode: both;		animation-fill-mode: both;		-webkit-animation: load7 1.8s infinite ease-in-out;		animation: load7 1.8s infinite ease-in-out;	}	.loader {		top: -2.5em; 		margin: 6px auto 7px;		font-size: 10px;		position: relative;		text-indent: -9999em;		-webkit-animation-delay: 0.16s;		animation-delay: 0.16s;	}	.loader:before {		left: -3.5em;	}	.loader:after {		left: 3.5em;		-webkit-animation-delay: 0.32s;		animation-delay: 0.32s;	}	.loader:before,	.loader:after {		content: '';		position: absolute;		top: 0;	}	@-webkit-keyframes load7 {		0%,		80%,		100% {			box-shadow: 0 2.5em 0 -1.3em #f30;		}		40% {			box-shadow: 0 2.5em 0 0 #f30;		}	}	@keyframes load7 {		0%,		80%,		100% {			box-shadow: 0 2.5em 0 -1.3em #f30;		}		40% {			box-shadow: 0 2.5em 0 0 #f30;		}	}";i.prototype.isInstalled=function(){return!!document.getElementById(this.el.id)},i.prototype.install=function(){if(this.isInstalled())return this;var t=document.querySelector(".file_info").nextElementSibling;return t.parentNode.insertBefore(this.el,t),this},i.prototype.$installCss=function(){if(this._cssid="dmts-"+Math.random().toString().slice(2),document.getElementById(this._cssid))return this;var t=document.createElement("style");return t.id=this._cssid,t.textContent=a,document.head.insertBefore(t,document.head.firstChild),this},i.prototype.bindUrl=function(t){return this.el.href=t,this},i.prototype.$removeChilds=function(){for(;this.el.firstChild;)this.el.removeChild(this.el.firstChild);return this},i.prototype.showSpinner=function(){return this.$removeChilds(),this.el.appendChild(this._spinner),this},i.prototype.showError=function(){return this.$removeChilds(),this.el.appendChild(this._error),this},i.prototype.showDownloadBar=function(){return this.$removeChilds(),this.el.appendChild(this._core),this},e.exports=i},{}],3:[function(t,e){"use strict";var n=t("spark-md5");e.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected string");return n.hash(t)}},{"spark-md5":9}],4:[function(t,e,n){(function(t){!function(r){function o(t){throw RangeError(T[t])}function s(t,e){for(var n=t.length;n--;)t[n]=e(t[n]);return t}function i(t,e){return s(t.split(R),e).join(".")}function a(t){for(var e,n,r=[],o=0,s=t.length;s>o;)e=t.charCodeAt(o++),e>=55296&&56319>=e&&s>o?(n=t.charCodeAt(o++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--)):r.push(e);return r}function h(t){return s(t,function(t){var e="";return t>65535&&(t-=65536,e+=F(t>>>10&1023|55296),t=56320|1023&t),e+=F(t)}).join("")}function u(t){return 10>t-48?t-22:26>t-65?t-65:26>t-97?t-97:x}function f(t,e){return t+22+75*(26>t)-((0!=e)<<5)}function l(t,e,n){var r=0;for(t=n?S(t/O):t>>1,t+=S(t/e);t>k*A>>1;r+=x)t=S(t/k);return S(r+(k+1)*t/(t+j))}function c(t){var e,n,r,s,i,a,f,c,p,d,m=[],y=t.length,v=0,b=I,g=E;for(n=t.lastIndexOf(q),0>n&&(n=0),r=0;n>r;++r)t.charCodeAt(r)>=128&&o("not-basic"),m.push(t.charCodeAt(r));for(s=n>0?n+1:0;y>s;){for(i=v,a=1,f=x;s>=y&&o("invalid-input"),c=u(t.charCodeAt(s++)),(c>=x||c>S((_-v)/a))&&o("overflow"),v+=c*a,p=g>=f?C:f>=g+A?A:f-g,!(p>c);f+=x)d=x-p,a>S(_/d)&&o("overflow"),a*=d;e=m.length+1,g=l(v-i,e,0==i),S(v/e)>_-b&&o("overflow"),b+=S(v/e),v%=e,m.splice(v++,0,b)}return h(m)}function p(t){var e,n,r,s,i,h,u,c,p,d,m,y,v,b,g,w=[];for(t=a(t),y=t.length,e=I,n=0,i=E,h=0;y>h;++h)m=t[h],128>m&&w.push(F(m));for(r=s=w.length,s&&w.push(q);y>r;){for(u=_,h=0;y>h;++h)m=t[h],m>=e&&u>m&&(u=m);for(v=r+1,u-e>S((_-n)/v)&&o("overflow"),n+=(u-e)*v,e=u,h=0;y>h;++h)if(m=t[h],e>m&&++n>_&&o("overflow"),m==e){for(c=n,p=x;d=i>=p?C:p>=i+A?A:p-i,!(d>c);p+=x)g=c-d,b=x-d,w.push(F(f(d+g%b,0))),c=S(g/b);w.push(F(f(c,0))),i=l(n,v,r==s),n=0,++r}++n,++e}return w.join("")}function d(t){return i(t,function(t){return U.test(t)?c(t.slice(4).toLowerCase()):t})}function m(t){return i(t,function(t){return B.test(t)?"xn--"+p(t):t})}var y="object"==typeof n&&n,v="object"==typeof e&&e&&e.exports==y&&e,b="object"==typeof t&&t;(b.global===b||b.window===b)&&(r=b);var g,w,_=2147483647,x=36,C=1,A=26,j=38,O=700,E=72,I=128,q="-",U=/^xn--/,B=/[^ -~]/,R=/\x2E|\u3002|\uFF0E|\uFF61/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},k=x-C,S=Math.floor,F=String.fromCharCode;if(g={version:"1.2.4",ucs2:{decode:a,encode:h},decode:c,encode:p,toASCII:m,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return g});else if(y&&!y.nodeType)if(v)v.exports=g;else for(w in g)g.hasOwnProperty(w)&&(y[w]=g[w]);else r.punycode=g}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],5:[function(t,e){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,o,s){e=e||"&",o=o||"=";var i={};if("string"!=typeof t||0===t.length)return i;var a=/\+/g;t=t.split(e);var h=1e3;s&&"number"==typeof s.maxKeys&&(h=s.maxKeys);var u=t.length;h>0&&u>h&&(u=h);for(var f=0;u>f;++f){var l,c,p,d,m=t[f].replace(a,"%20"),y=m.indexOf(o);y>=0?(l=m.substr(0,y),c=m.substr(y+1)):(l=m,c=""),p=decodeURIComponent(l),d=decodeURIComponent(c),n(i,p)?r(i[p])?i[p].push(d):i[p]=[i[p],d]:i[p]=d}return i};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],6:[function(t,e){"use strict";function n(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n}var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,i,a){return e=e||"&",i=i||"=",null===t&&(t=void 0),"object"==typeof t?n(s(t),function(s){var a=encodeURIComponent(r(s))+i;return o(t[s])?n(t[s],function(t){return a+encodeURIComponent(r(t))}).join(e):a+encodeURIComponent(r(t[s]))}).join(e):a?encodeURIComponent(r(a))+i+encodeURIComponent(r(t)):""};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},s=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},{}],7:[function(t,e,n){"use strict";n.decode=n.parse=t("./decode"),n.encode=n.stringify=t("./encode")},{"./decode":5,"./encode":6}],8:[function(t,e,n){function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function o(t,e,n){if(t&&u(t)&&t instanceof r)return t;var o=new r;return o.parse(t,e,n),o}function s(t){return h(t)&&(t=o(t)),t instanceof r?t.format():r.prototype.format.call(t)}function i(t,e){return o(t,!1,!0).resolve(e)}function a(t,e){return t?o(t,!1,!0).resolveObject(e):e}function h(t){return"string"==typeof t}function u(t){return"object"==typeof t&&null!==t}function f(t){return null===t}function l(t){return null==t}var c=t("punycode");n.parse=o,n.resolve=i,n.resolveObject=a,n.format=s,n.Url=r;var p=/^([a-z0-9.+-]+:)/i,d=/:[0-9]*$/,m=["<",">",'"',"`"," ","\r","\n","	"],y=["{","}","|","\\","^","`"].concat(m),v=["'"].concat(y),b=["%","/","?",";","#"].concat(v),g=["/","?","#"],w=255,_=/^[a-z0-9A-Z_-]{0,63}$/,x=/^([a-z0-9A-Z_-]{0,63})(.*)$/,C={javascript:!0,"javascript:":!0},A={javascript:!0,"javascript:":!0},j={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},O=t("querystring");r.prototype.parse=function(t,e,n){if(!h(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t;r=r.trim();var o=p.exec(r);if(o){o=o[0];var s=o.toLowerCase();this.protocol=s,r=r.substr(o.length)}if(n||o||r.match(/^\/\/[^@\/]+@[^@\/]+/)){var i="//"===r.substr(0,2);!i||o&&A[o]||(r=r.substr(2),this.slashes=!0)}if(!A[o]&&(i||o&&!j[o])){for(var a=-1,u=0;u<g.length;u++){var f=r.indexOf(g[u]);-1!==f&&(-1===a||a>f)&&(a=f)}var l,d;d=-1===a?r.lastIndexOf("@"):r.lastIndexOf("@",a),-1!==d&&(l=r.slice(0,d),r=r.slice(d+1),this.auth=decodeURIComponent(l)),a=-1;for(var u=0;u<b.length;u++){var f=r.indexOf(b[u]);-1!==f&&(-1===a||a>f)&&(a=f)}-1===a&&(a=r.length),this.host=r.slice(0,a),r=r.slice(a),this.parseHost(),this.hostname=this.hostname||"";var m="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!m)for(var y=this.hostname.split(/\./),u=0,E=y.length;E>u;u++){var I=y[u];if(I&&!I.match(_)){for(var q="",U=0,B=I.length;B>U;U++)q+=I.charCodeAt(U)>127?"x":I[U];if(!q.match(_)){var R=y.slice(0,u),T=y.slice(u+1),k=I.match(x);k&&(R.push(k[1]),T.unshift(k[2])),T.length&&(r="/"+T.join(".")+r),this.hostname=R.join(".");break}}}if(this.hostname=this.hostname.length>w?"":this.hostname.toLowerCase(),!m){for(var S=this.hostname.split("."),F=[],u=0;u<S.length;++u){var L=S[u];F.push(L.match(/[^A-Za-z0-9_-]/)?"xn--"+c.encode(L):L)}this.hostname=F.join(".")}var N=this.port?":"+this.port:"",$=this.hostname||"";this.host=$+N,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==r[0]&&(r="/"+r))}if(!C[s])for(var u=0,E=v.length;E>u;u++){var D=v[u],M=encodeURIComponent(D);M===D&&(M=escape(D)),r=r.split(D).join(M)}var z=r.indexOf("#");-1!==z&&(this.hash=r.substr(z),r=r.slice(0,z));var H=r.indexOf("?");if(-1!==H?(this.search=r.substr(H),this.query=r.substr(H+1),e&&(this.query=O.parse(this.query)),r=r.slice(0,H)):e&&(this.search="",this.query={}),r&&(this.pathname=r),j[s]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var N=this.pathname||"",L=this.search||"";this.path=N+L}return this.href=this.format(),this},r.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,s="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&u(this.query)&&Object.keys(this.query).length&&(s=O.stringify(this.query));var i=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||j[e])&&o!==!1?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),i&&"?"!==i.charAt(0)&&(i="?"+i),n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),i=i.replace("#","%23"),e+o+n+i+r},r.prototype.resolve=function(t){return this.resolveObject(o(t,!1,!0)).format()},r.prototype.resolveObject=function(t){if(h(t)){var e=new r;e.parse(t,!1,!0),t=e}var n=new r;if(Object.keys(this).forEach(function(t){n[t]=this[t]},this),n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol)return Object.keys(t).forEach(function(e){"protocol"!==e&&(n[e]=t[e])}),j[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n;if(t.protocol&&t.protocol!==n.protocol){if(!j[t.protocol])return Object.keys(t).forEach(function(e){n[e]=t[e]}),n.href=n.format(),n;if(n.protocol=t.protocol,t.host||A[t.protocol])n.pathname=t.pathname;else{for(var o=(t.pathname||"").split("/");o.length&&!(t.host=o.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==o[0]&&o.unshift(""),o.length<2&&o.unshift(""),n.pathname=o.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var s=n.pathname||"",i=n.search||"";n.path=s+i}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var a=n.pathname&&"/"===n.pathname.charAt(0),u=t.host||t.pathname&&"/"===t.pathname.charAt(0),c=u||a||n.host&&t.pathname,p=c,d=n.pathname&&n.pathname.split("/")||[],o=t.pathname&&t.pathname.split("/")||[],m=n.protocol&&!j[n.protocol];if(m&&(n.hostname="",n.port=null,n.host&&(""===d[0]?d[0]=n.host:d.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===o[0]?o[0]=t.host:o.unshift(t.host)),t.host=null),c=c&&(""===o[0]||""===d[0])),u)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,d=o;else if(o.length)d||(d=[]),d.pop(),d=d.concat(o),n.search=t.search,n.query=t.query;else if(!l(t.search)){if(m){n.hostname=n.host=d.shift();var y=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;y&&(n.auth=y.shift(),n.host=n.hostname=y.shift())}return n.search=t.search,n.query=t.query,f(n.pathname)&&f(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!d.length)return n.pathname=null,n.path=n.search?"/"+n.search:null,n.href=n.format(),n;for(var v=d.slice(-1)[0],b=(n.host||t.host)&&("."===v||".."===v)||""===v,g=0,w=d.length;w>=0;w--)v=d[w],"."==v?d.splice(w,1):".."===v?(d.splice(w,1),g++):g&&(d.splice(w,1),g--);if(!c&&!p)for(;g--;g)d.unshift("..");!c||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),b&&"/"!==d.join("/").substr(-1)&&d.push("");var _=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(m){n.hostname=n.host=_?"":d.length?d.shift():"";var y=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;y&&(n.auth=y.shift(),n.host=n.hostname=y.shift())}return c=c||n.host&&d.length,c&&!_&&d.unshift(""),d.length?n.pathname=d.join("/"):(n.pathname=null,n.path=null),f(n.pathname)&&f(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var t=this.host,e=d.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{punycode:4,querystring:7}],9:[function(t,e,n){!function(t){if("object"==typeof n)e.exports=t();else if("function"==typeof define&&define.amd)define(t);else{var r;try{r=window}catch(o){r=self}r.SparkMD5=t()}}(function(){"use strict";var t=function(t,e){return t+e&4294967295},e=function(e,n,r,o,s,i){return n=t(t(n,e),t(o,i)),t(n<<s|n>>>32-s,r)},n=function(t,n,r,o,s,i,a){return e(n&r|~n&o,t,n,s,i,a)},r=function(t,n,r,o,s,i,a){return e(n&o|r&~o,t,n,s,i,a)},o=function(t,n,r,o,s,i,a){return e(n^r^o,t,n,s,i,a)},s=function(t,n,r,o,s,i,a){return e(r^(n|~o),t,n,s,i,a)},i=function(e,i){var a=e[0],h=e[1],u=e[2],f=e[3];a=n(a,h,u,f,i[0],7,-680876936),f=n(f,a,h,u,i[1],12,-389564586),u=n(u,f,a,h,i[2],17,606105819),h=n(h,u,f,a,i[3],22,-1044525330),a=n(a,h,u,f,i[4],7,-176418897),f=n(f,a,h,u,i[5],12,1200080426),u=n(u,f,a,h,i[6],17,-1473231341),h=n(h,u,f,a,i[7],22,-45705983),a=n(a,h,u,f,i[8],7,1770035416),f=n(f,a,h,u,i[9],12,-1958414417),u=n(u,f,a,h,i[10],17,-42063),h=n(h,u,f,a,i[11],22,-1990404162),a=n(a,h,u,f,i[12],7,1804603682),f=n(f,a,h,u,i[13],12,-40341101),u=n(u,f,a,h,i[14],17,-1502002290),h=n(h,u,f,a,i[15],22,1236535329),a=r(a,h,u,f,i[1],5,-165796510),f=r(f,a,h,u,i[6],9,-1069501632),u=r(u,f,a,h,i[11],14,643717713),h=r(h,u,f,a,i[0],20,-373897302),a=r(a,h,u,f,i[5],5,-701558691),f=r(f,a,h,u,i[10],9,38016083),u=r(u,f,a,h,i[15],14,-660478335),h=r(h,u,f,a,i[4],20,-405537848),a=r(a,h,u,f,i[9],5,568446438),f=r(f,a,h,u,i[14],9,-1019803690),u=r(u,f,a,h,i[3],14,-187363961),h=r(h,u,f,a,i[8],20,1163531501),a=r(a,h,u,f,i[13],5,-1444681467),f=r(f,a,h,u,i[2],9,-51403784),u=r(u,f,a,h,i[7],14,1735328473),h=r(h,u,f,a,i[12],20,-1926607734),a=o(a,h,u,f,i[5],4,-378558),f=o(f,a,h,u,i[8],11,-2022574463),u=o(u,f,a,h,i[11],16,1839030562),h=o(h,u,f,a,i[14],23,-35309556),a=o(a,h,u,f,i[1],4,-1530992060),f=o(f,a,h,u,i[4],11,1272893353),u=o(u,f,a,h,i[7],16,-155497632),h=o(h,u,f,a,i[10],23,-1094730640),a=o(a,h,u,f,i[13],4,681279174),f=o(f,a,h,u,i[0],11,-358537222),u=o(u,f,a,h,i[3],16,-722521979),h=o(h,u,f,a,i[6],23,76029189),a=o(a,h,u,f,i[9],4,-640364487),f=o(f,a,h,u,i[12],11,-421815835),u=o(u,f,a,h,i[15],16,530742520),h=o(h,u,f,a,i[2],23,-995338651),a=s(a,h,u,f,i[0],6,-198630844),f=s(f,a,h,u,i[7],10,1126891415),u=s(u,f,a,h,i[14],15,-1416354905),h=s(h,u,f,a,i[5],21,-57434055),a=s(a,h,u,f,i[12],6,1700485571),f=s(f,a,h,u,i[3],10,-1894986606),u=s(u,f,a,h,i[10],15,-1051523),h=s(h,u,f,a,i[1],21,-2054922799),a=s(a,h,u,f,i[8],6,1873313359),f=s(f,a,h,u,i[15],10,-30611744),u=s(u,f,a,h,i[6],15,-1560198380),h=s(h,u,f,a,i[13],21,1309151649),a=s(a,h,u,f,i[4],6,-145523070),f=s(f,a,h,u,i[11],10,-1120210379),u=s(u,f,a,h,i[2],15,718787259),h=s(h,u,f,a,i[9],21,-343485551),e[0]=t(a,e[0]),e[1]=t(h,e[1]),e[2]=t(u,e[2]),e[3]=t(f,e[3])},a=function(t){var e,n=[];for(e=0;64>e;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n},h=function(t){var e,n=[];for(e=0;64>e;e+=4)n[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return n},u=function(t){var e,n,r,o,s,h,u=t.length,f=[1732584193,-271733879,-1732584194,271733878];for(e=64;u>=e;e+=64)i(f,a(t.substring(e-64,e)));for(t=t.substring(e-64),n=t.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;n>e;e+=1)r[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(r[e>>2]|=128<<(e%4<<3),e>55)for(i(f,r),e=0;16>e;e+=1)r[e]=0;return o=8*u,o=o.toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),h=parseInt(o[1],16)||0,r[14]=s,r[15]=h,i(f,r),f},f=function(t){var e,n,r,o,s,a,u=t.length,f=[1732584193,-271733879,-1732584194,271733878];for(e=64;u>=e;e+=64)i(f,h(t.subarray(e-64,e)));for(t=u>e-64?t.subarray(e-64):new Uint8Array(0),n=t.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;n>e;e+=1)r[e>>2]|=t[e]<<(e%4<<3);if(r[e>>2]|=128<<(e%4<<3),e>55)for(i(f,r),e=0;16>e;e+=1)r[e]=0;return o=8*u,o=o.toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),a=parseInt(o[1],16)||0,r[14]=s,r[15]=a,i(f,r),f},l=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],c=function(t){var e,n="";for(e=0;4>e;e+=1)n+=l[t>>8*e+4&15]+l[t>>8*e&15];return n},p=function(t){var e;for(e=0;e<t.length;e+=1)t[e]=c(t[e]);return t.join("")},d=function(t){return p(u(t))},m=function(){this.reset()};return"5d41402abc4b2a76b9719d911017c592"!==d("hello")&&(t=function(t,e){var n=(65535&t)+(65535&e),r=(t>>16)+(e>>16)+(n>>16);return r<<16|65535&n}),m.prototype.append=function(t){return/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t))),this.appendBinary(t),this},m.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var e,n=this._buff.length;for(e=64;n>=e;e+=64)i(this._state,a(this._buff.substring(e-64,e)));return this._buff=this._buff.substr(e-64),this},m.prototype.end=function(t){var e,n,r=this._buff,o=r.length,s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;o>e;e+=1)s[e>>2]|=r.charCodeAt(e)<<(e%4<<3);return this._finish(s,o),n=t?this._state:p(this._state),this.reset(),n},m.prototype._finish=function(t,e){var n,r,o,s=e;if(t[s>>2]|=128<<(s%4<<3),s>55)for(i(this._state,t),s=0;16>s;s+=1)t[s]=0;n=8*this._length,n=n.toString(16).match(/(.*?)(.{0,8})$/),r=parseInt(n[2],16),o=parseInt(n[1],16)||0,t[14]=r,t[15]=o,i(this._state,t)},m.prototype.reset=function(){return this._buff="",this._length=0,this._state=[1732584193,-271733879,-1732584194,271733878],this},m.prototype.destroy=function(){delete this._state,delete this._buff,delete this._length},m.hash=function(t,e){/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t)));var n=u(t);return e?n:p(n)},m.hashBinary=function(t,e){var n=u(t);return e?n:p(n)},m.ArrayBuffer=function(){this.reset()},m.ArrayBuffer.prototype.append=function(t){var e,n=this._concatArrayBuffer(this._buff,t),r=n.length;for(this._length+=t.byteLength,e=64;r>=e;e+=64)i(this._state,h(n.subarray(e-64,e)));return this._buff=r>e-64?n.subarray(e-64):new Uint8Array(0),this},m.ArrayBuffer.prototype.end=function(t){var e,n,r=this._buff,o=r.length,s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;o>e;e+=1)s[e>>2]|=r[e]<<(e%4<<3);return this._finish(s,o),n=t?this._state:p(this._state),this.reset(),n},m.ArrayBuffer.prototype._finish=m.prototype._finish,m.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._state=[1732584193,-271733879,-1732584194,271733878],this},m.ArrayBuffer.prototype.destroy=m.prototype.destroy,m.ArrayBuffer.prototype._concatArrayBuffer=function(t,e){var n=t.length,r=new Uint8Array(n+e.byteLength);return r.set(t),r.set(new Uint8Array(e),n),r},m.ArrayBuffer.hash=function(t,e){var n=f(new Uint8Array(t));return e?n:p(n)},m})},{}]},{},[1]);