New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

mhtml2html

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mhtml2html - npm Package Compare versions

Comparing version
1.2.0
to
1.3.0
+1
-1
index.js

@@ -15,3 +15,3 @@ #!/usr/bin/env node

const serializeDocument = require("jsdom").serializeDocument;
const mhtml2html = require('./dist/mhtml2html-min');
const mhtml2html = require('./src/mhtml2html');
const fs = require('fs');

@@ -18,0 +18,0 @@

{
"name": "mhtml2html",
"version": "1.2.0",
"description": "Converts .mhtml to a single .html page.",
"version": "1.3.0",
"description": "Converts an mhtml document to a single html document",
"author": "Mayank Sindwani",
"license": "MIT",
"homepage": "https://github.com/msindwan/mhtml2html#readme",
"repository": {

@@ -9,2 +12,8 @@ "type": "git",

},
"files": [
"dist/",
"index.js",
"LICENSE.txt",
"README.md"
],
"main": "dist/mhtml2html.js",

@@ -15,14 +24,13 @@ "bin": {

"scripts": {
"prepublishOnly": "gulp",
"build": "gulp build",
"test": "gulp test"
"lint": "eslint src",
"prebuild": "yarn lint",
"build": "webpack --mode=production",
"pretest": "yarn build",
"test": "karma start --single-run"
},
"engines": {
"node": ">=4.3.2"
"node": ">=10"
},
"author": "Mayank Sindwani",
"license": "MIT",
"homepage": "https://github.com/msindwan/mhtml2html#readme",
"dependencies": {
"btoa": "^1.1.2",
"btoa": "^1.2.1",
"jsdom": "^9.4.2",

@@ -32,21 +40,15 @@ "quoted-printable": "^1.0.1"

"devDependencies": {
"babel-core": "^6.6.5",
"babel-preset-env": "^1.6.1",
"babelify": "^7.3.0",
"browserify": "^14.5.0",
"chai": "^3.5.0",
"del": "^2.2.2",
"gulp": "^3.9.1",
"gulp-eslint": "^3.0.1",
"gulp-help": "^1.6.1",
"gulp-minify": "0.0.14",
"gulp-mocha": "^3.0.1",
"karma": "^1.7.1",
"@babel/core": "^7.6.0",
"babel-loader": "^8.0.6",
"chai": "^4.2.0",
"eslint": "^6.3.0",
"karma": "^4.3.0",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.2.0",
"karma-chrome-launcher": "^3.1.0",
"karma-cli": "^2.0.0",
"karma-mocha": "^1.3.0",
"mocha": "^2.5.3",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0"
"mocha": "^6.2.0",
"webpack": "^4.39.3",
"webpack-cli": "^3.3.8"
}
}

@@ -82,3 +82,3 @@ # mhtml2html.js

* Node.js >= v4.3.2
* Node.js >= 10
* Yarn

@@ -89,3 +89,3 @@

1. If node_modules haven't been installed already, run `yarn install` from the root directory.
2. Run `yarn run test` to build the scripts and run tests.
2. Run `yarn test` to build and test the source code.

@@ -92,0 +92,0 @@ ## License

!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.mhtml2html=t()}}(function(){var t;return function(){function t(e,r,n){function o(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var h=r[s]={exports:{}};e[s][0].call(h.exports,function(t){return o(e[s][1][t]||t)},h,h.exports,t,e,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}return t}()({1:[function(t,e,r){"use strict";function n(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function o(t){var e=n(t),r=e[0],o=e[1];return 3*(r+o)/4-o}function i(t,e,r){return 3*(e+r)/4-r}function s(t){for(var e,r=n(t),o=r[0],s=r[1],a=new l(i(t,o,s)),u=0,f=s>0?o-4:o,h=0;h<f;h+=4)e=c[t.charCodeAt(h)]<<18|c[t.charCodeAt(h+1)]<<12|c[t.charCodeAt(h+2)]<<6|c[t.charCodeAt(h+3)],a[u++]=e>>16&255,a[u++]=e>>8&255,a[u++]=255&e;return 2===s&&(e=c[t.charCodeAt(h)]<<2|c[t.charCodeAt(h+1)]>>4,a[u++]=255&e),1===s&&(e=c[t.charCodeAt(h)]<<10|c[t.charCodeAt(h+1)]<<4|c[t.charCodeAt(h+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e),a}function a(t){return h[t>>18&63]+h[t>>12&63]+h[t>>6&63]+h[63&t]}function u(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(255&t[i+2]),o.push(a(n));return o.join("")}function f(t){for(var e,r=t.length,n=r%3,o=[],i=0,s=r-n;i<s;i+=16383)o.push(u(t,i,i+16383>s?s:i+16383));return 1===n?(e=t[r-1],o.push(h[e>>2]+h[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],o.push(h[e>>10]+h[e>>4&63]+h[e<<2&63]+"=")),o.join("")}r.byteLength=o,r.toByteArray=s,r.fromByteArray=f;for(var h=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,y=p.length;d<y;++d)h[d]=p[d],c[p.charCodeAt(d)]=d;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},{}],2:[function(t,e,r){(function(t){!function(){"use strict";function r(e){var r;return r=e instanceof t?e:t.from(e.toString(),"binary"),r.toString("base64")}e.exports=r}()}).call(this,t("buffer").Buffer)},{buffer:3}],3:[function(t,e,r){"use strict";function n(t){if(t>W)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return e.__proto__=o.prototype,e}function o(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return i(t,e,r)}function i(t,e,r){if("string"==typeof t)return f(t,e);if(ArrayBuffer.isView(t))return h(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Y(t,ArrayBuffer)||t&&Y(t.buffer,ArrayBuffer))return c(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return o.from(n,e,r);var i=l(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return o.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function s(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function a(t,e,r){return s(t),t<=0?n(t):void 0!==e?"string"==typeof r?n(t).fill(e,r):n(t).fill(e):n(t)}function u(t){return s(t),n(t<0?0:0|p(t))}function f(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!o.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|y(t,e),i=n(r),s=i.write(t,e);return s!==r&&(i=i.slice(0,s)),i}function h(t){for(var e=t.length<0?0:0|p(t.length),r=n(e),o=0;o<e;o+=1)r[o]=255&t[o];return r}function c(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),n.__proto__=o.prototype,n}function l(t){if(o.isBuffer(t)){var e=0|p(t.length),r=n(e);return 0===r.length?r:(t.copy(r,0,0,e),r)}return void 0!==t.length?"number"!=typeof t.length||K(t.length)?n(0):h(t):"Buffer"===t.type&&Array.isArray(t.data)?h(t.data):void 0}function p(t){if(t>=W)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+W.toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),o.alloc(+t)}function y(t,e){if(o.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Y(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(t).length;default:if(i)return n?-1:D(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,r);case"utf8":case"utf-8":return M(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return U(this,e,r);case"base64":return B(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,K(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=o.from(e,n)),o.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,o){function i(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}var s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}var f;if(o){var h=-1;for(f=r;f<a;f++)if(i(t,f)===i(e,-1===h?0:f-h)){if(-1===h&&(h=f),f-h+1===u)return h*s}else-1!==h&&(f-=f-h),h=-1}else for(r+u>a&&(r=a-u),f=r;f>=0;f--){for(var c=!0,l=0;l<u;l++)if(i(t,f+l)!==i(e,l)){c=!1;break}if(c)return f}return-1}function w(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;n>i/2&&(n=i/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(K(a))return s;t[r+s]=a}return s}function E(t,e,r,n){return $(D(e,t.length-r),t,r,n)}function A(t,e,r,n){return $(H(e),t,r,n)}function x(t,e,r,n){return A(t,e,r,n)}function T(t,e,r,n){return $(z(e),t,r,n)}function C(t,e,r,n){return $(P(e,t.length-r),t,r,n)}function B(t,e,r){return 0===e&&r===t.length?Z.fromByteArray(t):Z.fromByteArray(t.slice(e,r))}function M(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i=t[o],s=null,a=i>239?4:i>223?3:i>191?2:1;if(o+a<=r){var u,f,h,c;switch(a){case 1:i<128&&(s=i);break;case 2:u=t[o+1],128==(192&u)&&(c=(31&i)<<6|63&u)>127&&(s=c);break;case 3:u=t[o+1],f=t[o+2],128==(192&u)&&128==(192&f)&&(c=(15&i)<<12|(63&u)<<6|63&f)>2047&&(c<55296||c>57343)&&(s=c);break;case 4:u=t[o+1],f=t[o+2],h=t[o+3],128==(192&u)&&128==(192&f)&&128==(192&h)&&(c=(15&i)<<18|(63&u)<<12|(63&f)<<6|63&h)>65535&&c<1114112&&(s=c)}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),o+=a}return O(n)}function O(t){var e=t.length;if(e<=X)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=X));return r}function I(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function U(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function L(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=F(t[i]);return o}function j(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function S(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function _(t,e,r,n,i,s){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<s)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function R(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(t,e,r,n,o){return e=+e,r>>>=0,o||R(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),V.write(t,e,r,n,23,4),r+4}function q(t,e,r,n,o){return e=+e,r>>>=0,o||R(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),V.write(t,e,r,n,52,8),r+8}function k(t){if(t=t.split("=")[0],t=t.trim().replace(G,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function F(t){return t<16?"0"+t.toString(16):t.toString(16)}function D(t,e){e=e||1/0;for(var r,n=t.length,o=null,i=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function H(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function P(t,e){for(var r,n,o,i=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,o=r%256,i.push(o),i.push(n);return i}function z(t){return Z.toByteArray(k(t))}function $(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function Y(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function K(t){return t!==t}var Z=t("base64-js"),V=t("ieee754");r.Buffer=o,r.SlowBuffer=d,r.INSPECT_MAX_BYTES=50;var W=2147483647;r.kMaxLength=W,o.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),o.poolSize=8192,o.from=function(t,e,r){return i(t,e,r)},o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,o.alloc=function(t,e,r){return a(t,e,r)},o.allocUnsafe=function(t){return u(t)},o.allocUnsafeSlow=function(t){return u(t)},o.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==o.prototype},o.compare=function(t,e){if(Y(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),Y(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,s=Math.min(r,n);i<s;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return o.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=o.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(Y(s,Uint8Array)&&(s=o.from(s)),!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},o.byteLength=y,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},o.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},o.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},o.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?M(this,0,t):g.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===o.compare(this,t)},o.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},o.prototype.compare=function(t,e,r,n,i){if(Y(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var s=i-n,a=r-e,u=Math.min(s,a),f=this.slice(n,i),h=t.slice(e,r),c=0;c<u;++c)if(f[c]!==h[c]){s=f[c],a=h[c];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},o.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},o.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},o.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":return A(this,t,e,r);case"latin1":case"binary":return x(this,t,e,r);case"base64":return T(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var X=4096;o.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return n.__proto__=o.prototype,n},o.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||S(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},o.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||S(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},o.prototype.readUInt8=function(t,e){return t>>>=0,e||S(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return t>>>=0,e||S(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return t>>>=0,e||S(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return t>>>=0,e||S(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return t>>>=0,e||S(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||S(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n},o.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||S(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},o.prototype.readInt8=function(t,e){return t>>>=0,e||S(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){t>>>=0,e||S(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(t,e){t>>>=0,e||S(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(t,e){return t>>>=0,e||S(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return t>>>=0,e||S(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return t>>>=0,e||S(t,4,this.length),V.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return t>>>=0,e||S(t,4,this.length),V.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return t>>>=0,e||S(t,8,this.length),V.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return t>>>=0,e||S(t,8,this.length),V.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){_(this,t,e,r,Math.pow(2,8*r)-1,0)}var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},o.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){_(this,t,e,r,Math.pow(2,8*r)-1,0)}var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},o.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,1,255,0),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},o.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},o.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},o.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},o.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);_(this,t,e,r,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i<r&&(s*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},o.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);_(this,t,e,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},o.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},o.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},o.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},o.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||_(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},o.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},o.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},o.prototype.writeDoubleLE=function(t,e,r){return q(this,t,e,!0,r)},o.prototype.writeDoubleBE=function(t,e,r){return q(this,t,e,!1,r)},o.prototype.copy=function(t,e,r,n){if(!o.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var s=i-1;s>=0;--s)t[s+e]=this[s+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},o.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var s;if("number"==typeof t)for(s=e;s<r;++s)this[s]=t;else{var a=o.isBuffer(t)?t:o.from(t,n),u=a.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(s=0;s<r-e;++s)this[s+e]=a[s%u]}return this};var G=/[^+\/0-9A-Za-z-_]/g},{"base64-js":1,ieee754:4}],4:[function(t,e,r){r.read=function(t,e,r,n,o){var i,s,a=8*o-n-1,u=(1<<a)-1,f=u>>1,h=-7,c=r?o-1:0,l=r?-1:1,p=t[e+c];for(c+=l,i=p&(1<<-h)-1,p>>=-h,h+=a;h>0;i=256*i+t[e+c],c+=l,h-=8);for(s=i&(1<<-h)-1,i>>=-h,h+=n;h>0;s=256*s+t[e+c],c+=l,h-=8);if(0===i)i=1-f;else{if(i===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=f}return(p?-1:1)*s*Math.pow(2,i-n)},r.write=function(t,e,r,n,o,i){var s,a,u,f=8*i-o-1,h=(1<<f)-1,c=h>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+c>=1?l/u:l*Math.pow(2,1-c),e*u>=2&&(s++,u/=2),s+c>=h?(a=0,s=h):s+c>=1?(a=(e*u-1)*Math.pow(2,o),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,o),s=0));o>=8;t[r+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,f+=o;f>0;t[r+p]=255&s,p+=d,s/=256,f-=8);t[r+p-d]|=128*y}},{}],5:[function(e,r,n){(function(e){!function(o){function i(t){throw new RangeError(_[t])}function s(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function a(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),t=t.replace(S,"."),n+s(t.split("."),e).join(".")}function u(t){for(var e,r,n=[],o=0,i=t.length;o<i;)e=t.charCodeAt(o++),e>=55296&&e<=56319&&o<i?(r=t.charCodeAt(o++),56320==(64512&r)?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),o--)):n.push(e);return n}function f(t){return s(t,function(t){var e="";return t>65535&&(t-=65536,e+=q(t>>>10&1023|55296),t=56320|1023&t),e+=q(t)}).join("")}function h(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:x}function c(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function l(t,e,r){var n=0;for(t=r?N(t/M):t>>1,t+=N(t/e);t>R*C>>1;n+=x)t=N(t/R);return N(n+(R+1)*t/(t+B))}function p(t){var e,r,n,o,s,a,u,c,p,d,y=[],g=t.length,v=0,m=I,b=O;for(r=t.lastIndexOf(U),r<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&i("not-basic"),y.push(t.charCodeAt(n));for(o=r>0?r+1:0;o<g;){for(s=v,a=1,u=x;o>=g&&i("invalid-input"),c=h(t.charCodeAt(o++)),(c>=x||c>N((A-v)/a))&&i("overflow"),v+=c*a,p=u<=b?T:u>=b+C?C:u-b,!(c<p);u+=x)d=x-p,a>N(A/d)&&i("overflow"),a*=d;e=y.length+1,b=l(v-s,e,0==s),N(v/e)>A-m&&i("overflow"),m+=N(v/e),v%=e,y.splice(v++,0,m)}return f(y)}function d(t){var e,r,n,o,s,a,f,h,p,d,y,g,v,m,b,w=[];for(t=u(t),g=t.length,e=I,r=0,s=O,a=0;a<g;++a)(y=t[a])<128&&w.push(q(y));for(n=o=w.length,o&&w.push(U);n<g;){for(f=A,a=0;a<g;++a)(y=t[a])>=e&&y<f&&(f=y);for(v=n+1,f-e>N((A-r)/v)&&i("overflow"),r+=(f-e)*v,e=f,a=0;a<g;++a)if(y=t[a],y<e&&++r>A&&i("overflow"),y==e){for(h=r,p=x;d=p<=s?T:p>=s+C?C:p-s,!(h<d);p+=x)b=h-d,m=x-d,w.push(q(c(d+b%m,0))),h=N(b/m);w.push(q(c(h,0))),s=l(r,v,n==o),r=0,++n}++r,++e}return w.join("")}function y(t){return a(t,function(t){return L.test(t)?p(t.slice(4).toLowerCase()):t})}function g(t){return a(t,function(t){return j.test(t)?"xn--"+d(t):t})}var v="object"==typeof n&&n&&!n.nodeType&&n,m="object"==typeof r&&r&&!r.nodeType&&r,b="object"==typeof e&&e;b.global!==b&&b.window!==b&&b.self!==b||(o=b);var w,E,A=2147483647,x=36,T=1,C=26,B=38,M=700,O=72,I=128,U="-",L=/^xn--/,j=/[^\x20-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,_={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=x-T,N=Math.floor,q=String.fromCharCode;if(w={version:"1.4.1",ucs2:{decode:u,encode:f},decode:p,encode:d,toASCII:g,toUnicode:y},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return w});else if(v&&m)if(r.exports==v)m.exports=w;else for(E in w)w.hasOwnProperty(E)&&(v[E]=w[E]);else o.punycode=w}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],6:[function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,i){e=e||"&",r=r||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var f=t.length;u>0&&f>u&&(f=u);for(var h=0;h<f;++h){var c,l,p,d,y=t[h].replace(a,"%20"),g=y.indexOf(r);g>=0?(c=y.substr(0,g),l=y.substr(g+1)):(c=y,l=""),p=decodeURIComponent(c),d=decodeURIComponent(l),n(s,p)?o(s[p])?s[p].push(d):s[p]=[s[p],d]:s[p]=d}return s};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],7:[function(t,e,r){"use strict";function n(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var o=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,r,a){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?n(s(t),function(s){var a=encodeURIComponent(o(s))+r;return i(t[s])?n(t[s],function(t){return a+encodeURIComponent(o(t))}).join(e):a+encodeURIComponent(o(t[s]))}).join(e):a?encodeURIComponent(o(a))+r+encodeURIComponent(o(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},s=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},{}],8:[function(t,e,r){"use strict";r.decode=r.parse=t("./decode"),r.encode=r.stringify=t("./encode")},{"./decode":6,"./encode":7}],9:[function(e,r,n){(function(e){!function(o){var i="object"==typeof n&&n,s="object"==typeof r&&r&&r.exports==i&&r,a="object"==typeof e&&e;a.global!==a&&a.window!==a||(o=a);var u=String.fromCharCode,f=function(t){return t.replace(/[\t\x20]$/gm,"").replace(/=(?:\r\n?|\n|$)/g,"").replace(/=([a-fA-F0-9]{2})/g,function(t,e){var r=parseInt(e,16);return u(r)})},h=function(t){return t.replace(/\x20$/,"=20").replace(/\t$/,"=09")},c=/[\0-\x08\n-\x1F=\x7F-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=function(t){for(var e=t.replace(c,function(t){if(t>"ÿ")throw RangeError("`quotedPrintable.encode()` expects extended ASCII input only. Don’t forget to encode the input first using a character encoding like UTF-8.");return"="+("0"+t.charCodeAt(0).toString(16).toUpperCase()).slice(-2)}),r=e.split(/\r\n?|\n/g),n=-1,o=r.length,i=[];++n<o;)for(var s=r[n],a=75,u=0,f=s.length;u<f;){var l=e.slice(u,u+a);/=$/.test(l)?(l=l.slice(0,a-1),u+=a-1):/=[A-F0-9]$/.test(l)?(l=l.slice(0,a-2),u+=a-2):u+=a,i.push(l)}var p=l.length;return/[\t\x20]$/.test(l)&&(i.pop(),p+2<=a+1?i.push(h(l)):i.push(l.slice(0,p-1),h(l.slice(p-1,p)))),i.join("=\r\n")},p={encode:l,decode:f,version:"1.0.1"};if("function"==typeof t&&"object"==typeof t.amd&&t.amd)t(function(){return p});else if(i&&!i.nodeType)if(s)s.exports=p;else for(var d in p)p.hasOwnProperty(d)&&(i[d]=p[d]);else o.quotedPrintable=p}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],10:[function(t,e,r){"use strict";function n(){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,r){if(t&&f.isObject(t)&&t instanceof n)return t;var o=new n;return o.parse(t,e,r),o}function i(t){return f.isString(t)&&(t=o(t)),t instanceof n?t.format():n.prototype.format.call(t)}function s(t,e){return o(t,!1,!0).resolve(e)}function a(t,e){return t?o(t,!1,!0).resolveObject(e):e}var u=t("punycode"),f=t("./util");r.parse=o,r.resolve=s,r.resolveObject=a,r.format=i,r.Url=n;var h=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,p=["<",">",'"',"`"," ","\r","\n","\t"],d=["{","}","|","\\","^","`"].concat(p),y=["'"].concat(d),g=["%","/","?",";","#"].concat(y),v=["/","?","#"],m=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,w={javascript:!0,"javascript:":!0},E={javascript:!0,"javascript:":!0},A={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},x=t("querystring");n.prototype.parse=function(t,e,r){if(!f.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),o=-1!==n&&n<t.indexOf("#")?"?":"#",i=t.split(o),s=/\\/g;i[0]=i[0].replace(s,"/"),t=i.join(o);var a=t;if(a=a.trim(),!r&&1===t.split("#").length){var c=l.exec(a);if(c)return this.path=a,this.href=a,this.pathname=c[1],c[2]?(this.search=c[2],this.query=e?x.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var p=h.exec(a);if(p){p=p[0];var d=p.toLowerCase();this.protocol=d,a=a.substr(p.length)}if(r||p||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var T="//"===a.substr(0,2);!T||p&&E[p]||(a=a.substr(2),this.slashes=!0)}if(!E[p]&&(T||p&&!A[p])){for(var C=-1,B=0;B<v.length;B++){var M=a.indexOf(v[B]);-1!==M&&(-1===C||M<C)&&(C=M)}var O,I;I=-1===C?a.lastIndexOf("@"):a.lastIndexOf("@",C),-1!==I&&(O=a.slice(0,I),a=a.slice(I+1),this.auth=decodeURIComponent(O)),C=-1;for(var B=0;B<g.length;B++){var M=a.indexOf(g[B]);-1!==M&&(-1===C||M<C)&&(C=M)}-1===C&&(C=a.length),this.host=a.slice(0,C),a=a.slice(C),this.parseHost(),this.hostname=this.hostname||"";var U="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!U)for(var L=this.hostname.split(/\./),B=0,j=L.length;B<j;B++){var S=L[B];if(S&&!S.match(m)){for(var _="",R=0,N=S.length;R<N;R++)S.charCodeAt(R)>127?_+="x":_+=S[R]
;if(!_.match(m)){var q=L.slice(0,B),k=L.slice(B+1),F=S.match(b);F&&(q.push(F[1]),k.unshift(F[2])),k.length&&(a="/"+k.join(".")+a),this.hostname=q.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),U||(this.hostname=u.toASCII(this.hostname));var D=this.port?":"+this.port:"",H=this.hostname||"";this.host=H+D,this.href+=this.host,U&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!w[d])for(var B=0,j=y.length;B<j;B++){var P=y[B];if(-1!==a.indexOf(P)){var z=encodeURIComponent(P);z===P&&(z=escape(P)),a=a.split(P).join(z)}}var $=a.indexOf("#");-1!==$&&(this.hash=a.substr($),a=a.slice(0,$));var Y=a.indexOf("?");if(-1!==Y?(this.search=a.substr(Y),this.query=a.substr(Y+1),e&&(this.query=x.parse(this.query)),a=a.slice(0,Y)):e&&(this.search="",this.query={}),a&&(this.pathname=a),A[d]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var D=this.pathname||"",K=this.search||"";this.path=D+K}return this.href=this.format(),this},n.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,i="";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&&f.isObject(this.query)&&Object.keys(this.query).length&&(i=x.stringify(this.query));var s=this.search||i&&"?"+i||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||A[e])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),r=r.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),s=s.replace("#","%23"),e+o+r+s+n},n.prototype.resolve=function(t){return this.resolveObject(o(t,!1,!0)).format()},n.prototype.resolveObject=function(t){if(f.isString(t)){var e=new n;e.parse(t,!1,!0),t=e}for(var r=new n,o=Object.keys(this),i=0;i<o.length;i++){var s=o[i];r[s]=this[s]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var a=Object.keys(t),u=0;u<a.length;u++){var h=a[u];"protocol"!==h&&(r[h]=t[h])}return A[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!A[t.protocol]){for(var c=Object.keys(t),l=0;l<c.length;l++){var p=c[l];r[p]=t[p]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||E[t.protocol])r.pathname=t.pathname;else{for(var d=(t.pathname||"").split("/");d.length&&!(t.host=d.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),r.pathname=d.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var y=r.pathname||"",g=r.search||"";r.path=y+g}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),m=t.host||t.pathname&&"/"===t.pathname.charAt(0),b=m||v||r.host&&t.pathname,w=b,x=r.pathname&&r.pathname.split("/")||[],d=t.pathname&&t.pathname.split("/")||[],T=r.protocol&&!A[r.protocol];if(T&&(r.hostname="",r.port=null,r.host&&(""===x[0]?x[0]=r.host:x.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===d[0]?d[0]=t.host:d.unshift(t.host)),t.host=null),b=b&&(""===d[0]||""===x[0])),m)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,x=d;else if(d.length)x||(x=[]),x.pop(),x=x.concat(d),r.search=t.search,r.query=t.query;else if(!f.isNullOrUndefined(t.search)){if(T){r.hostname=r.host=x.shift();var C=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");C&&(r.auth=C.shift(),r.host=r.hostname=C.shift())}return r.search=t.search,r.query=t.query,f.isNull(r.pathname)&&f.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!x.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var B=x.slice(-1)[0],M=(r.host||t.host||x.length>1)&&("."===B||".."===B)||""===B,O=0,I=x.length;I>=0;I--)B=x[I],"."===B?x.splice(I,1):".."===B?(x.splice(I,1),O++):O&&(x.splice(I,1),O--);if(!b&&!w)for(;O--;O)x.unshift("..");!b||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),M&&"/"!==x.join("/").substr(-1)&&x.push("");var U=""===x[0]||x[0]&&"/"===x[0].charAt(0);if(T){r.hostname=r.host=U?"":x.length?x.shift():"";var C=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");C&&(r.auth=C.shift(),r.host=r.hostname=C.shift())}return b=b||r.host&&x.length,b&&!U&&x.unshift(""),x.length?r.pathname=x.join("/"):(r.pathname=null,r.path=null),f.isNull(r.pathname)&&f.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var t=this.host,e=c.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":11,punycode:5,querystring:8}],11:[function(t,e,r){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],12:[function(t,e,r){"use strict";function n(t,e){if(!t)throw new Error(e);return!0}function o(t,e,r){var n=void 0,o=void 0;for(o=0;(o=r.indexOf("url(",o))>0;o+=n.length){o+="url(".length,n=r.substring(o,r.indexOf(")",o));var i=u.resolve(e,n.replace(/(\"|\')/g,""));if(null!=t[i])try{var s="'data:"+t[i].type+";base64,"+("base64"===t[i].encoding?t[i].data:a(t[i].data))+"'";r=""+r.substring(0,o)+s+r.substring(o+n.length)}catch(t){console.warn(t)}}return r}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=t("quoted-printable"),a=t("btoa"),u=t("url"),f=void 0,h=void 0,c={noConflict:function(){return"undefined"!=typeof window&&(window.mhtml2html=f),c},parse:function(t,e){function r(){for(;n(A<t.length-1,"Unexpected EOF")&&/\s/.test(t[A]);)"\n"==t[++A]&&x++}function o(e){for(var r=A;"\n"!==t[A]&&n(A++<t.length-1,"Unexpected EOF"););A++,x++;var o=t.substring(r,A);switch(e){case"quoted-printable":return s.decode(o);case"base64":return o.trim();default:return o}}function i(t,e){var r=void 0;(r=t.indexOf(":"))>-1?(b=t.substring(0,r).trim(),e[b]=t.substring(r+1,t.length).trim()):(n(void 0!==b,"Missing MHTML headers; Line "+x),e[b]+=t.trim())}var a={MHTML_HEADERS:0,MTHML_CONTENT:1,MHTML_DATA:2,MHTML_END:3},u=void 0,f=void 0,c=void 0,l=void 0,p=void 0,d=void 0,y=void 0,g=void 0,v=void 0,m=void 0,b=void 0,w=void 0,E=void 0,A=void 0,x=void 0,T=void 0;for(f={},c={},l={},p={},m=a.MHTML_HEADERS,A=x=0;m!=a.MHTML_END;)switch(m){case a.MHTML_HEADERS:if(0!=(w=o())&&"\n"!=w)i(w,f);else{n(void 0!==f["Content-Type"],"Missing document content type; Line "+x);var C=f["Content-Type"].match(/boundary=(.*)/m);n(null!=C,"Missing boundary from document headers; Line "+x),T=C[1].replace(/\"/g,""),r(),w=o(),n(w.includes(T),"Expected boundary; Line "+x),c={},m=a.MTHML_CONTENT}break;case a.MTHML_CONTENT:w=o(),0!=w&&"\n"!=w?i(w,c):(y=c["Content-Transfer-Encoding"],g=c["Content-Type"],v=c["Content-ID"],d=c["Content-Location"],void 0===E&&(E=d,n(void 0!==E&&"text/html"===g,"Index not found; Line "+x)),n(void 0!==v||void 0!==d,"ID or location header not provided; Line "+x),n(void 0!==y,"Content-Transfer-Encoding not provided; Line "+x),n(void 0!==g,"Content-Type not provided; Line "+x),u={encoding:y,type:g,data:"",id:v},void 0!==v&&(p[v]=u),void 0!==d&&void 0===l[d]&&(l[d]=u),r(),c={},m=a.MHTML_DATA);break;case a.MHTML_DATA:for(w=o(y);!w.includes(T);)u.data+=w,w=o(y);try{u.data=decodeURIComponent(escape(u.data))}catch(t){}if(!0===e&&void 0!==E)return h(u.data);m=A>=t.length-1?a.MHTML_END:a.MTHML_CONTENT}return{frames:p,media:l,index:E}},convert:function(t){var e=void 0,r=void 0,u=void 0,f=void 0,l=void 0,p=void 0,d=void 0,y=void 0,g=void 0,v=void 0;"string"==typeof t?t=c.parse(t):n("object"===(void 0===t?"undefined":i(t)),"Expected argument of type string or object"),l=t.frames,f=t.media,u=t.index,n("object"===(void 0===l?"undefined":i(l)),"MHTML error: invalid frames"),n("object"===(void 0===f?"undefined":i(f)),"MHTML error: invalid media"),n("string"==typeof u,"MHTML error: invalid index"),n(f[u]&&"text/html"===f[u].type,"MHTML error: invalid index");for(var m=h(f[u].data),b=[m];b.length;)!function(){var t=b.shift();t.childNodes.forEach(function(n){switch(n.getAttribute&&(g=n.getAttribute("href"),v=n.getAttribute("src")),n.removeAttribute&&n.removeAttribute("integrity"),n.tagName){case"HEAD":d=m.createElement("base"),d.setAttribute("target","_parent"),n.insertBefore(d,n.firstChild);break;case"LINK":void 0!==f[g]&&"text/css"===f[g].type&&(p=m.createElement("style"),p.type="text/css",f[g].data=o(f,g,f[g].data),p.appendChild(m.createTextNode(f[g].data)),t.replaceChild(p,n));break;case"STYLE":p=m.createElement("style"),p.type="text/css",p.appendChild(m.createTextNode(o(f,u,n.innerHTML))),t.replaceChild(p,n);break;case"IMG":if(y=null,void 0!==f[v]&&f[v].type.includes("image")){switch(f[v].encoding){case"quoted-printable":e=s.decode(f[v].data),y="data:"+f[v].type+";utf8,"+e;break;case"base64":y="data:"+f[v].type+";base64,"+f[v].data;break;default:try{r=a(f[v].data),y="data:"+f[v].type+";base64,"+r}catch(t){console.warn(t)}}null!==y&&n.setAttribute("src",y)}n.style.cssText=o(f,u,n.style.cssText);break;default:n.style&&(n.style.cssText=o(f,u,n.style.cssText))}b.push(n)})}();return m}};!function(){"undefined"!=typeof window&&(f=window.mhtml2html);var e=void 0!==t?t:null;if("undefined"==typeof DOMParser){var r=e("jsdom").jsdom;h=function(t){return r(t,{})}}else{var n=new DOMParser;h=function(t){return n.parseFromString(t,"text/html")}}}(),e.exports=c},{btoa:2,"quoted-printable":9,url:10}]},{},[12])(12)});

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display