UNPKG

tiny-ai-api

Version:

A customizable and extensible client api for managing conversations and AI interactions, currently supporting the **Google Gemini** API — with flexibility to support any similar AI APIs.

1 lines 95.8 kB
var TinyAiApi=function(t){"use strict";class e extends Error{constructor(t,e){super("".concat(t," at position ").concat(e)),this.position=e}}function n(t){return/^[0-9A-Fa-f]$/.test(t)}function r(t){return t>="0"&&t<="9"}function o(t){return t>=" "}function i(t){return",:[]/{}()\n+".includes(t)}function s(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"||"_"===t||"$"===t}function a(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"||"_"===t||"$"===t||t>="0"&&t<="9"}const u=/^(http|https|ftp|mailto|file|data|irc):\/\/$/,f=/^[A-Za-z0-9-._~:/?#@!$&'()*+;=]$/;function l(t){return",[]/{}\n+".includes(t)}function c(t){return m(t)||h.test(t)}const h=/^[[{\w-]$/;function d(t){return"\n"===t||"\r"===t||"\t"===t||"\b"===t||"\f"===t}function p(t,e){const n=t.charCodeAt(e);return 32===n||10===n||9===n||13===n}function y(t,e){const n=t.charCodeAt(e);return 32===n||9===n||13===n}function g(t,e){const n=t.charCodeAt(e);return 160===n||n>=8192&&n<=8202||8239===n||8287===n||12288===n}function m(t){return w(t)||v(t)}function w(t){return'"'===t||"“"===t||"”"===t}function b(t){return'"'===t}function v(t){return"'"===t||"‘"===t||"’"===t||"`"===t||"´"===t}function I(t){return"'"===t}function E(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=t.lastIndexOf(e);return-1!==r?t.substring(0,r)+(n?"":t.substring(r+1)):t}function _(t,e){let n=t.length;if(!p(t,n-1))return t+e;for(;p(t,n-1);)n--;return t.substring(0,n)+e+t.substring(n)}function A(t,e,n){return t.substring(0,e)+t.substring(e+n)}const x={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},T={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function C(t){let h=0,C="";N();B()||function(){throw new e("Unexpected end of json string",t.length)}(),N();const k=D(",");for(k&&S(),c(t[h])&&function(t){return/[,\n][ \t\r]*$/.test(t)}(C)?(k||(C=_(C,",")),function(){let t=!0,e=!0;for(;e;){if(t)t=!1;else{D(",")||(C=_(C,","))}e=B()}e||(C=E(C,","));C="[\n".concat(C,"\n]")}()):k&&(C=E(C,","));"}"===t[h]||"]"===t[h];)h++,S();if(h>=t.length)return C;function B(){S();const e=function(){if("{"===t[h]){C+="{",h++,S(),P(",")&&S();let e=!0;for(;h<t.length&&"}"!==t[h];){let n;e?(n=!0,e=!1):(n=D(","),n||(C=_(C,",")),S()),R();if(!(O()||$(!0))){"}"===t[h]||"{"===t[h]||"]"===t[h]||"["===t[h]||void 0===t[h]?C=E(C,","):G();break}S();const r=D(":"),o=h>=t.length;r||(c(t[h])||o?C=_(C,":"):z());B()||(r||o?C+="null":z())}return"}"===t[h]?(C+="}",h++):C=_(C,"}"),!0}return!1}()||function(){if("["===t[h]){C+="[",h++,S(),P(",")&&S();let e=!0;for(;h<t.length&&"]"!==t[h];){if(e)e=!1;else{D(",")||(C=_(C,","))}R();if(!B()){C=E(C,",");break}}return"]"===t[h]?(C+="]",h++):C=_(C,"]"),!0}return!1}()||O()||function(){const e=h;if("-"===t[h]){if(h++,q())return Y(e),!0;if(!r(t[h]))return h=e,!1}for(;r(t[h]);)h++;if("."===t[h]){if(h++,q())return Y(e),!0;if(!r(t[h]))return h=e,!1;for(;r(t[h]);)h++}if("e"===t[h]||"E"===t[h]){if(h++,"-"!==t[h]&&"+"!==t[h]||h++,q())return Y(e),!0;if(!r(t[h]))return h=e,!1;for(;r(t[h]);)h++}if(!q())return h=e,!1;if(h>e){const n=t.slice(e,h),r=/^0\d/.test(n);return C+=r?'"'.concat(n,'"'):n,!0}return!1}()||F("true","true")||F("false","false")||F("null","null")||F("True","true")||F("False","false")||F("None","null")||$(!1)||function(){if("/"===t[h]){const e=h;for(h++;h<t.length&&("/"!==t[h]||"\\"===t[h-1]);)h++;return h++,C+='"'.concat(t.substring(e,h),'"'),!0}}();return S(),e}function S(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const e=h;let n=M(t);do{n=U(),n&&(n=M(t))}while(n);return h>e}function M(e){const n=e?p:y;let r="";for(;;)if(n(t,h))r+=t[h],h++;else{if(!g(t,h))break;r+=" ",h++}return r.length>0&&(C+=r,!0)}function U(){if("/"===t[h]&&"*"===t[h+1]){for(;h<t.length&&!L(t,h);)h++;return h+=2,!0}if("/"===t[h]&&"/"===t[h+1]){for(;h<t.length&&"\n"!==t[h];)h++;return!0}return!1}function N(){if("```"===t.slice(h,h+3)){if(h+=3,s(t[h]))for(;h<t.length&&a(t[h]);)h++;return S(),!0}return!1}function D(e){return t[h]===e&&(C+=t[h],h++,!0)}function P(e){return t[h]===e&&(h++,!0)}function R(){return S(),"."===t[h]&&"."===t[h+1]&&"."===t[h+2]&&(h+=3,S(),P(","),!0)}function O(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,a="\\"===t[h];if(a&&(h++,a=!0),m(t[h])){const c=b(t[h])?b:I(t[h])?I:v(t[h])?v:w,p=h,y=C.length;let g='"';for(h++;;){if(h>=t.length){const n=H(h-1);return!e&&i(t.charAt(n))?(h=p,C=C.substring(0,y),O(!0)):(g=_(g,'"'),C+=g,!0)}if(h===s)return g=_(g,'"'),C+=g,!0;if(c(t[h])){const n=h,o=g.length;if(g+='"',h++,C+=g,S(!1),e||h>=t.length||i(t[h])||m(t[h])||r(t[h]))return j(),!0;const s=H(n-1),a=t.charAt(s);if(","===a)return h=p,C=C.substring(0,y),O(!1,s);if(i(a))return h=p,C=C.substring(0,y),O(!0);C=C.substring(0,y),h=n+1,g="".concat(g.substring(0,o),"\\").concat(g.substring(o))}else{if(e&&l(t[h])){if(":"===t[h-1]&&u.test(t.substring(p+1,h+2)))for(;h<t.length&&f.test(t[h]);)g+=t[h],h++;return g=_(g,'"'),C+=g,j(),!0}if("\\"===t[h]){const e=t.charAt(h+1);if(void 0!==T[e])g+=t.slice(h,h+2),h+=2;else if("u"===e){let e=2;for(;e<6&&n(t[h+e]);)e++;6===e?(g+=t.slice(h,h+6),h+=6):h+e>=t.length?h=t.length:W()}else g+=e,h+=2}else{const e=t.charAt(h);'"'===e&&"\\"!==t[h-1]?(g+="\\".concat(e),h++):d(e)?(g+=x[e],h++):(o(e)||K(e),g+=e,h++)}}a&&P("\\")}}return!1}function j(){let e=!1;for(S();"+"===t[h];){e=!0,h++,S(),C=E(C,'"',!0);const t=C.length,n=O();C=n?A(C,t,1):_(C,'"')}return e}function F(e,n){return t.slice(h,h+e.length)===e&&(C+=n,h+=e.length,!0)}function $(e){const n=h;if(s(t[h])){for(;h<t.length&&a(t[h]);)h++;let e=h;for(;p(t,e);)e++;if("("===t[e])return h=e+1,B(),")"===t[h]&&(h++,";"===t[h]&&h++),!0}for(;h<t.length&&!l(t[h])&&!m(t[h])&&(!e||":"!==t[h]);)h++;if(":"===t[h-1]&&u.test(t.substring(n,h+2)))for(;h<t.length&&f.test(t[h]);)h++;if(h>n){for(;p(t,h-1)&&h>0;)h--;const e=t.slice(n,h);return C+="undefined"===e?"null":JSON.stringify(e),'"'===t[h]&&h++,!0}}function H(e){let n=e;for(;n>0&&p(t,n);)n--;return n}function q(){return h>=t.length||i(t[h])||p(t,h)}function Y(e){C+="".concat(t.slice(e,h),"0")}function K(t){throw new e("Invalid character ".concat(JSON.stringify(t)),h)}function G(){throw new e("Object key expected",h)}function z(){throw new e("Colon expected",h)}function W(){const n=t.slice(h,h+6);throw new e('Invalid unicode character "'.concat(n,'"'),h)}!function(){throw new e("Unexpected character ".concat(JSON.stringify(t[h])),h)}()}function L(t,e){return"*"===t[e]&&"/"===t[e+1]}function k(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function B(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var S,M={exports:{}};var U,N=(S||(S=1,M.exports=function t(e,n,r){function o(s,a){if(!n[s]){if(!e[s]){if(!a&&B)return B(s);if(i)return i(s,!0);throw new Error("Cannot find module '"+s+"'")}a=n[s]={exports:{}},e[s][0].call(a.exports,(function(t){return o(e[s][1][t]||t)}),a,a.exports,t,e,n,r)}return n[s].exports}for(var i=B,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t,e,n){(function(r,o,i,s,a,u,f,l,c){var h=t("crypto");function d(t,e){var n;return void 0===(n="passthrough"!==(e=g(t,e)).algorithm?h.createHash(e.algorithm):new b).write&&(n.write=n.update,n.end=n.update),w(e,n).dispatch(t),n.update||n.end(""),n.digest?n.digest("buffer"===e.encoding?void 0:e.encoding):(t=n.read(),"buffer"!==e.encoding?t.toString(e.encoding):t)}(n=e.exports=d).sha1=function(t){return d(t)},n.keys=function(t){return d(t,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},n.MD5=function(t){return d(t,{algorithm:"md5",encoding:"hex"})},n.keysMD5=function(t){return d(t,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var p=h.getHashes?h.getHashes().slice():["sha1","md5"],y=(p.push("passthrough"),["buffer","hex","binary","base64"]);function g(t,e){var n={};if(n.algorithm=(e=e||{}).algorithm||"sha1",n.encoding=e.encoding||"hex",n.excludeValues=!!e.excludeValues,n.algorithm=n.algorithm.toLowerCase(),n.encoding=n.encoding.toLowerCase(),n.ignoreUnknown=!0===e.ignoreUnknown,n.respectType=!1!==e.respectType,n.respectFunctionNames=!1!==e.respectFunctionNames,n.respectFunctionProperties=!1!==e.respectFunctionProperties,n.unorderedArrays=!0===e.unorderedArrays,n.unorderedSets=!1!==e.unorderedSets,n.unorderedObjects=!1!==e.unorderedObjects,n.replacer=e.replacer||void 0,n.excludeKeys=e.excludeKeys||void 0,void 0===t)throw new Error("Object argument required.");for(var r=0;r<p.length;++r)p[r].toLowerCase()===n.algorithm.toLowerCase()&&(n.algorithm=p[r]);if(-1===p.indexOf(n.algorithm))throw new Error('Algorithm "'+n.algorithm+'" not supported. supported values: '+p.join(", "));if(-1===y.indexOf(n.encoding)&&"passthrough"!==n.algorithm)throw new Error('Encoding "'+n.encoding+'" not supported. supported values: '+y.join(", "));return n}function m(t){if("function"==typeof t)return null!=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(t))}function w(t,e,n){function r(t){return e.update?e.update(t,"utf8"):e.write(t,"utf8")}return n=n||[],{dispatch:function(e){return this["_"+(null===(e=t.replacer?t.replacer(e):e)?"null":typeof e)](e)},_object:function(e){var o,s=Object.prototype.toString.call(e),a=/\[object (.*)\]/i.exec(s);if(a=(a=a?a[1]:"unknown:["+s+"]").toLowerCase(),0<=(s=n.indexOf(e)))return this.dispatch("[CIRCULAR:"+s+"]");if(n.push(e),void 0!==i&&i.isBuffer&&i.isBuffer(e))return r("buffer:"),r(e);if("object"===a||"function"===a||"asyncfunction"===a)return s=Object.keys(e),t.unorderedObjects&&(s=s.sort()),!1===t.respectType||m(e)||s.splice(0,0,"prototype","__proto__","constructor"),t.excludeKeys&&(s=s.filter((function(e){return!t.excludeKeys(e)}))),r("object:"+s.length+":"),o=this,s.forEach((function(n){o.dispatch(n),r(":"),t.excludeValues||o.dispatch(e[n]),r(",")}));if(!this["_"+a]){if(t.ignoreUnknown)return r("["+a+"]");throw new Error('Unknown object type "'+a+'"')}this["_"+a](e)},_array:function(e,o){o=void 0!==o?o:!1!==t.unorderedArrays;var i=this;if(r("array:"+e.length+":"),!o||e.length<=1)return e.forEach((function(t){return i.dispatch(t)}));var s=[];return o=e.map((function(e){var r=new b,o=n.slice();return w(t,r,o).dispatch(e),s=s.concat(o.slice(n.length)),r.read().toString()})),n=n.concat(s),o.sort(),this._array(o,!1)},_date:function(t){return r("date:"+t.toJSON())},_symbol:function(t){return r("symbol:"+t.toString())},_error:function(t){return r("error:"+t.toString())},_boolean:function(t){return r("bool:"+t.toString())},_string:function(t){r("string:"+t.length+":"),r(t.toString())},_function:function(e){r("fn:"),m(e)?this.dispatch("[native]"):this.dispatch(e.toString()),!1!==t.respectFunctionNames&&this.dispatch("function-name:"+String(e.name)),t.respectFunctionProperties&&this._object(e)},_number:function(t){return r("number:"+t.toString())},_xml:function(t){return r("xml:"+t.toString())},_null:function(){return r("Null")},_undefined:function(){return r("Undefined")},_regexp:function(t){return r("regex:"+t.toString())},_uint8array:function(t){return r("uint8array:"),this.dispatch(Array.prototype.slice.call(t))},_uint8clampedarray:function(t){return r("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(t))},_int8array:function(t){return r("int8array:"),this.dispatch(Array.prototype.slice.call(t))},_uint16array:function(t){return r("uint16array:"),this.dispatch(Array.prototype.slice.call(t))},_int16array:function(t){return r("int16array:"),this.dispatch(Array.prototype.slice.call(t))},_uint32array:function(t){return r("uint32array:"),this.dispatch(Array.prototype.slice.call(t))},_int32array:function(t){return r("int32array:"),this.dispatch(Array.prototype.slice.call(t))},_float32array:function(t){return r("float32array:"),this.dispatch(Array.prototype.slice.call(t))},_float64array:function(t){return r("float64array:"),this.dispatch(Array.prototype.slice.call(t))},_arraybuffer:function(t){return r("arraybuffer:"),this.dispatch(new Uint8Array(t))},_url:function(t){return r("url:"+t.toString())},_map:function(e){return r("map:"),e=Array.from(e),this._array(e,!1!==t.unorderedSets)},_set:function(e){return r("set:"),e=Array.from(e),this._array(e,!1!==t.unorderedSets)},_file:function(t){return r("file:"),this.dispatch([t.name,t.size,t.type,t.lastModfied])},_blob:function(){if(t.ignoreUnknown)return r("[blob]");throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n')},_domwindow:function(){return r("domwindow")},_bigint:function(t){return r("bigint:"+t.toString())},_process:function(){return r("process")},_timer:function(){return r("timer")},_pipe:function(){return r("pipe")},_tcp:function(){return r("tcp")},_udp:function(){return r("udp")},_tty:function(){return r("tty")},_statwatcher:function(){return r("statwatcher")},_securecontext:function(){return r("securecontext")},_connection:function(){return r("connection")},_zlib:function(){return r("zlib")},_context:function(){return r("context")},_nodescript:function(){return r("nodescript")},_httpparser:function(){return r("httpparser")},_dataview:function(){return r("dataview")},_signal:function(){return r("signal")},_fsevent:function(){return r("fsevent")},_tlswrap:function(){return r("tlswrap")}}}function b(){return{buf:"",write:function(t){this.buf+=t},end:function(t){this.buf+=t},read:function(){return this.buf}}}n.writeToStream=function(t,e,n){return void 0===n&&(n=e,e={}),w(e=g(t,e),n).dispatch(t)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(t,e,n){(function(t,e,r,o,i,s,a,u,f){!function(t){var e="undefined"!=typeof Uint8Array?Uint8Array:Array,n="+".charCodeAt(0),r="/".charCodeAt(0),o="0".charCodeAt(0),i="a".charCodeAt(0),s="A".charCodeAt(0),a="-".charCodeAt(0),u="_".charCodeAt(0);function f(t){return(t=t.charCodeAt(0))===n||t===a?62:t===r||t===u?63:t<o?-1:t<o+10?t-o+26+26:t<s+26?t-s:t<i+26?t-i+26:void 0}t.toByteArray=function(t){var n,r;if(0<t.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var o=t.length,i=(o="="===t.charAt(o-2)?2:"="===t.charAt(o-1)?1:0,new e(3*t.length/4-o)),s=0<o?t.length-4:t.length,a=0;function u(t){i[a++]=t}for(n=0;n<s;n+=4,0)u((16711680&(r=f(t.charAt(n))<<18|f(t.charAt(n+1))<<12|f(t.charAt(n+2))<<6|f(t.charAt(n+3))))>>16),u((65280&r)>>8),u(255&r);return 2==o?u(255&(r=f(t.charAt(n))<<2|f(t.charAt(n+1))>>4)):1==o&&(u((r=f(t.charAt(n))<<10|f(t.charAt(n+1))<<4|f(t.charAt(n+2))>>2)>>8&255),u(255&r)),i},t.fromByteArray=function(t){var e,n,r,o,i=t.length%3,s="";function a(t){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)}for(e=0,r=t.length-i;e<r;e+=3)s+=a((o=n=(t[e]<<16)+(t[e+1]<<8)+t[e+2])>>18&63)+a(o>>12&63)+a(o>>6&63)+a(63&o);switch(i){case 1:s=(s+=a((n=t[t.length-1])>>2))+a(n<<4&63)+"==";break;case 2:s=(s=(s+=a((n=(t[t.length-2]<<8)+t[t.length-1])>>10))+a(n>>4&63))+a(n<<2&63)+"="}return s}}(void 0===n?this.base64js={}:n)}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(t,e,n){(function(e,r,o,i,s,a,u,f,l){var c=t("base64-js"),h=t("ieee754");function o(t,e,n){if(!(this instanceof o))return new o(t,e,n);var r,i,s,a,u=typeof t;if("base64"===e&&"string"==u)for(t=(a=t).trim?a.trim():a.replace(/^\s+|\s+$/g,"");t.length%4!=0;)t+="=";if("number"==u)r=B(t);else if("string"==u)r=o.byteLength(t,e);else{if("object"!=u)throw new Error("First argument needs to be a number, array or string.");r=B(t.length)}if(o._useTypedArrays?i=o._augment(new Uint8Array(r)):((i=this).length=r,i._isBuffer=!0),o._useTypedArrays&&"number"==typeof t.byteLength)i._set(t);else if(S(a=t)||o.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length)for(s=0;s<r;s++)o.isBuffer(t)?i[s]=t.readUInt8(s):i[s]=t[s];else if("string"==u)i.write(t,0,e);else if("number"==u&&!o._useTypedArrays&&!n)for(s=0;s<r;s++)i[s]=0;return i}function d(t,e,n,r){return o._charsWritten=D(function(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function p(t,e,n,r){return o._charsWritten=D(function(t){for(var e,n,r=[],o=0;o<t.length;o++)e=(n=t.charCodeAt(o))>>8,n%=256,r.push(n),r.push(e);return r}(e),t,n,r)}function y(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;o++)r+=String.fromCharCode(t[o]);return r}function g(t,e,n,r){var o;if(r||(F("boolean"==typeof n,"missing or invalid endian"),F(null!=e,"missing offset"),F(e+1<t.length,"Trying to read beyond buffer length")),!((r=t.length)<=e))return n?(o=t[e],e+1<r&&(o|=t[e+1]<<8)):(o=t[e]<<8,e+1<r&&(o|=t[e+1])),o}function m(t,e,n,r){var o;if(r||(F("boolean"==typeof n,"missing or invalid endian"),F(null!=e,"missing offset"),F(e+3<t.length,"Trying to read beyond buffer length")),!((r=t.length)<=e))return n?(e+2<r&&(o=t[e+2]<<16),e+1<r&&(o|=t[e+1]<<8),o|=t[e],e+3<r&&(o+=t[e+3]<<24>>>0)):(e+1<r&&(o=t[e+1]<<16),e+2<r&&(o|=t[e+2]<<8),e+3<r&&(o|=t[e+3]),o+=t[e]<<24>>>0),o}function w(t,e,n,r){if(r||(F("boolean"==typeof n,"missing or invalid endian"),F(null!=e,"missing offset"),F(e+1<t.length,"Trying to read beyond buffer length")),!(t.length<=e))return 32768&(r=g(t,e,n,!0))?-1*(65535-r+1):r}function b(t,e,n,r){if(r||(F("boolean"==typeof n,"missing or invalid endian"),F(null!=e,"missing offset"),F(e+3<t.length,"Trying to read beyond buffer length")),!(t.length<=e))return 2147483648&(r=m(t,e,n,!0))?-1*(4294967295-r+1):r}function v(t,e,n,r){return r||(F("boolean"==typeof n,"missing or invalid endian"),F(e+3<t.length,"Trying to read beyond buffer length")),h.read(t,e,n,23,4)}function I(t,e,n,r){return r||(F("boolean"==typeof n,"missing or invalid endian"),F(e+7<t.length,"Trying to read beyond buffer length")),h.read(t,e,n,52,8)}function E(t,e,n,r,o){if(o||(F(null!=e,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(null!=n,"missing offset"),F(n+1<t.length,"trying to write beyond buffer length"),R(e,65535)),!((o=t.length)<=n))for(var i=0,s=Math.min(o-n,2);i<s;i++)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function _(t,e,n,r,o){if(o||(F(null!=e,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(null!=n,"missing offset"),F(n+3<t.length,"trying to write beyond buffer length"),R(e,4294967295)),!((o=t.length)<=n))for(var i=0,s=Math.min(o-n,4);i<s;i++)t[n+i]=e>>>8*(r?i:3-i)&255}function A(t,e,n,r,o){o||(F(null!=e,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(null!=n,"missing offset"),F(n+1<t.length,"Trying to write beyond buffer length"),O(e,32767,-32768)),t.length<=n||E(t,0<=e?e:65535+e+1,n,r,o)}function x(t,e,n,r,o){o||(F(null!=e,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(null!=n,"missing offset"),F(n+3<t.length,"Trying to write beyond buffer length"),O(e,2147483647,-2147483648)),t.length<=n||_(t,0<=e?e:4294967295+e+1,n,r,o)}function T(t,e,n,r,o){o||(F(null!=e,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(null!=n,"missing offset"),F(n+3<t.length,"Trying to write beyond buffer length"),j(e,34028234663852886e22,-34028234663852886e22)),t.length<=n||h.write(t,e,n,r,23,4)}function C(t,e,n,r,o){o||(F(null!=e,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(null!=n,"missing offset"),F(n+7<t.length,"Trying to write beyond buffer length"),j(e,17976931348623157e292,-17976931348623157e292)),t.length<=n||h.write(t,e,n,r,52,8)}n.Buffer=o,n.SlowBuffer=o,n.INSPECT_MAX_BYTES=50,o.poolSize=8192,o._useTypedArrays=function(){try{var t=new ArrayBuffer(0),e=new Uint8Array(t);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray}catch(t){return!1}}(),o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.byteLength=function(t,e){var n;switch(t+="",e||"utf8"){case"hex":n=t.length/2;break;case"utf8":case"utf-8":n=U(t).length;break;case"ascii":case"binary":case"raw":n=t.length;break;case"base64":n=N(t).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=2*t.length;break;default:throw new Error("Unknown encoding")}return n},o.concat=function(t,e){if(F(S(t),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===t.length)return new o(0);if(1===t.length)return t[0];if("number"!=typeof e)for(i=e=0;i<t.length;i++)e+=t[i].length;for(var n=new o(e),r=0,i=0;i<t.length;i++){var s=t[i];s.copy(n,r),r+=s.length}return n},o.prototype.write=function(t,e,n,r){isFinite(e)?isFinite(n)||(r=n,n=void 0):(f=r,r=e,e=n,n=f),e=Number(e)||0;var i,s,a,u,f=this.length-e;switch((!n||f<(n=Number(n)))&&(n=f),r=String(r||"utf8").toLowerCase()){case"hex":i=function(t,e,n,r){n=Number(n)||0;var i=t.length-n;(!r||i<(r=Number(r)))&&(r=i),F((i=e.length)%2==0,"Invalid hex string"),i/2<r&&(r=i/2);for(var s=0;s<r;s++){var a=parseInt(e.substr(2*s,2),16);F(!isNaN(a),"Invalid hex string"),t[n+s]=a}return o._charsWritten=2*s,s}(this,t,e,n);break;case"utf8":case"utf-8":s=this,a=e,u=n,i=o._charsWritten=D(U(t),s,a,u);break;case"ascii":case"binary":i=d(this,t,e,n);break;case"base64":s=this,a=e,u=n,i=o._charsWritten=D(N(t),s,a,u);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":i=p(this,t,e,n);break;default:throw new Error("Unknown encoding")}return i},o.prototype.toString=function(t,e,n){var r,o,i,s,a=this;if(t=String(t||"utf8").toLowerCase(),e=Number(e)||0,(n=void 0!==n?Number(n):a.length)===e)return"";switch(t){case"hex":r=function(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||r<n)&&(n=r);for(var o="",i=e;i<n;i++)o+=M(t[i]);return o}(a,e,n);break;case"utf8":case"utf-8":r=function(t,e,n){var r="",o="";n=Math.min(t.length,n);for(var i=e;i<n;i++)t[i]<=127?(r+=P(o)+String.fromCharCode(t[i]),o=""):o+="%"+t[i].toString(16);return r+P(o)}(a,e,n);break;case"ascii":case"binary":r=y(a,e,n);break;case"base64":o=a,s=n,r=0===(i=e)&&s===o.length?c.fromByteArray(o):c.fromByteArray(o.slice(i,s));break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=function(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}(a,e,n);break;default:throw new Error("Unknown encoding")}return r},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.copy=function(t,e,n,r){if(e=e||0,(r=r||0===r?r:this.length)!==(n=n||0)&&0!==t.length&&0!==this.length){F(n<=r,"sourceEnd < sourceStart"),F(0<=e&&e<t.length,"targetStart out of bounds"),F(0<=n&&n<this.length,"sourceStart out of bounds"),F(0<=r&&r<=this.length,"sourceEnd out of bounds"),r>this.length&&(r=this.length);var i=(r=t.length-e<r-n?t.length-e+n:r)-n;if(i<100||!o._useTypedArrays)for(var s=0;s<i;s++)t[s+e]=this[s+n];else t._set(this.subarray(n,n+i),e)}},o.prototype.slice=function(t,e){var n=this.length;if(t=k(t,n,0),e=k(e,n,n),o._useTypedArrays)return o._augment(this.subarray(t,e));for(var r=e-t,i=new o(r,void 0,!0),s=0;s<r;s++)i[s]=this[s+t];return i},o.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},o.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},o.prototype.readUInt8=function(t,e){if(e||(F(null!=t,"missing offset"),F(t<this.length,"Trying to read beyond buffer length")),!(t>=this.length))return this[t]},o.prototype.readUInt16LE=function(t,e){return g(this,t,!0,e)},o.prototype.readUInt16BE=function(t,e){return g(this,t,!1,e)},o.prototype.readUInt32LE=function(t,e){return m(this,t,!0,e)},o.prototype.readUInt32BE=function(t,e){return m(this,t,!1,e)},o.prototype.readInt8=function(t,e){if(e||(F(null!=t,"missing offset"),F(t<this.length,"Trying to read beyond buffer length")),!(t>=this.length))return 128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){return w(this,t,!0,e)},o.prototype.readInt16BE=function(t,e){return w(this,t,!1,e)},o.prototype.readInt32LE=function(t,e){return b(this,t,!0,e)},o.prototype.readInt32BE=function(t,e){return b(this,t,!1,e)},o.prototype.readFloatLE=function(t,e){return v(this,t,!0,e)},o.prototype.readFloatBE=function(t,e){return v(this,t,!1,e)},o.prototype.readDoubleLE=function(t,e){return I(this,t,!0,e)},o.prototype.readDoubleBE=function(t,e){return I(this,t,!1,e)},o.prototype.writeUInt8=function(t,e,n){n||(F(null!=t,"missing value"),F(null!=e,"missing offset"),F(e<this.length,"trying to write beyond buffer length"),R(t,255)),e>=this.length||(this[e]=t)},o.prototype.writeUInt16LE=function(t,e,n){E(this,t,e,!0,n)},o.prototype.writeUInt16BE=function(t,e,n){E(this,t,e,!1,n)},o.prototype.writeUInt32LE=function(t,e,n){_(this,t,e,!0,n)},o.prototype.writeUInt32BE=function(t,e,n){_(this,t,e,!1,n)},o.prototype.writeInt8=function(t,e,n){n||(F(null!=t,"missing value"),F(null!=e,"missing offset"),F(e<this.length,"Trying to write beyond buffer length"),O(t,127,-128)),e>=this.length||(0<=t?this.writeUInt8(t,e,n):this.writeUInt8(255+t+1,e,n))},o.prototype.writeInt16LE=function(t,e,n){A(this,t,e,!0,n)},o.prototype.writeInt16BE=function(t,e,n){A(this,t,e,!1,n)},o.prototype.writeInt32LE=function(t,e,n){x(this,t,e,!0,n)},o.prototype.writeInt32BE=function(t,e,n){x(this,t,e,!1,n)},o.prototype.writeFloatLE=function(t,e,n){T(this,t,e,!0,n)},o.prototype.writeFloatBE=function(t,e,n){T(this,t,e,!1,n)},o.prototype.writeDoubleLE=function(t,e,n){C(this,t,e,!0,n)},o.prototype.writeDoubleBE=function(t,e,n){C(this,t,e,!1,n)},o.prototype.fill=function(t,e,n){if(e=e||0,n=n||this.length,F("number"==typeof(t="string"==typeof(t=t||0)?t.charCodeAt(0):t)&&!isNaN(t),"value is not a number"),F(e<=n,"end < start"),n!==e&&0!==this.length){F(0<=e&&e<this.length,"start out of bounds"),F(0<=n&&n<=this.length,"end out of bounds");for(var r=e;r<n;r++)this[r]=t}},o.prototype.inspect=function(){for(var t=[],e=this.length,r=0;r<e;r++)if(t[r]=M(this[r]),r===n.INSPECT_MAX_BYTES){t[r+1]="...";break}return"<Buffer "+t.join(" ")+">"},o.prototype.toArrayBuffer=function(){if("undefined"==typeof Uint8Array)throw new Error("Buffer.toArrayBuffer not supported in this browser");if(o._useTypedArrays)return new o(this).buffer;for(var t=new Uint8Array(this.length),e=0,n=t.length;e<n;e+=1)t[e]=this[e];return t.buffer};var L=o.prototype;function k(t,e,n){return"number"!=typeof t?n:e<=(t=~~t)?e:0<=t||0<=(t+=e)?t:0}function B(t){return(t=~~Math.ceil(+t))<0?0:t}function S(t){return(Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)})(t)}function M(t){return t<16?"0"+t.toString(16):t.toString(16)}function U(t){for(var e=[],n=0;n<t.length;n++){var r=t.charCodeAt(n);if(r<=127)e.push(t.charCodeAt(n));else for(var o=n,i=(55296<=r&&r<=57343&&n++,encodeURIComponent(t.slice(o,n+1)).substr(1).split("%")),s=0;s<i.length;s++)e.push(parseInt(i[s],16))}return e}function N(t){return c.toByteArray(t)}function D(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);o++)e[o+n]=t[o];return o}function P(t){try{return decodeURIComponent(t)}catch(t){return String.fromCharCode(65533)}}function R(t,e){F("number"==typeof t,"cannot write a non-number as a number"),F(0<=t,"specified a negative value for writing an unsigned value"),F(t<=e,"value is larger than maximum value for type"),F(Math.floor(t)===t,"value has a fractional component")}function O(t,e,n){F("number"==typeof t,"cannot write a non-number as a number"),F(t<=e,"value larger than maximum allowed value"),F(n<=t,"value smaller than minimum allowed value"),F(Math.floor(t)===t,"value has a fractional component")}function j(t,e,n){F("number"==typeof t,"cannot write a non-number as a number"),F(t<=e,"value larger than maximum allowed value"),F(n<=t,"value smaller than minimum allowed value")}function F(t,e){if(!t)throw new Error(e||"Failed assertion")}o._augment=function(t){return t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=L.get,t.set=L.set,t.write=L.write,t.toString=L.toString,t.toLocaleString=L.toString,t.toJSON=L.toJSON,t.copy=L.copy,t.slice=L.slice,t.readUInt8=L.readUInt8,t.readUInt16LE=L.readUInt16LE,t.readUInt16BE=L.readUInt16BE,t.readUInt32LE=L.readUInt32LE,t.readUInt32BE=L.readUInt32BE,t.readInt8=L.readInt8,t.readInt16LE=L.readInt16LE,t.readInt16BE=L.readInt16BE,t.readInt32LE=L.readInt32LE,t.readInt32BE=L.readInt32BE,t.readFloatLE=L.readFloatLE,t.readFloatBE=L.readFloatBE,t.readDoubleLE=L.readDoubleLE,t.readDoubleBE=L.readDoubleBE,t.writeUInt8=L.writeUInt8,t.writeUInt16LE=L.writeUInt16LE,t.writeUInt16BE=L.writeUInt16BE,t.writeUInt32LE=L.writeUInt32LE,t.writeUInt32BE=L.writeUInt32BE,t.writeInt8=L.writeInt8,t.writeInt16LE=L.writeInt16LE,t.writeInt16BE=L.writeInt16BE,t.writeInt32LE=L.writeInt32LE,t.writeInt32BE=L.writeInt32BE,t.writeFloatLE=L.writeFloatLE,t.writeFloatBE=L.writeFloatBE,t.writeDoubleLE=L.writeDoubleLE,t.writeDoubleBE=L.writeDoubleBE,t.fill=L.fill,t.inspect=L.inspect,t.toArrayBuffer=L.toArrayBuffer,t}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(t,e,n){(function(n,r,o,i,s,a,u,f,l){o=t("buffer").Buffer;var c=4,h=new o(c);h.fill(0),e.exports={hash:function(t,e,n,r){for(var i=e(function(t,e){t.length%c!=0&&(n=t.length+(c-t.length%c),t=o.concat([t,h],n));for(var n,r=[],i=e?t.readInt32BE:t.readInt32LE,s=0;s<t.length;s+=c)r.push(i.call(t,s));return r}(t=o.isBuffer(t)?t:new o(t),r),8*t.length),s=(e=r,new o(n)),a=e?s.writeInt32BE:s.writeInt32LE,u=0;u<i.length;u++)a.call(s,i[u],4*u,!0);return s}}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],5:[function(t,e,n){(function(e,r,o,i,s,a,u,f,l){o=t("buffer").Buffer;var c=t("./sha"),h=t("./sha256"),d=t("./rng"),p={sha1:c,sha256:h,md5:t("./md5")},y=64,g=new o(y);function m(t,e){var n=p[t=t||"sha1"],r=[];return n||w("algorithm:",t,"is not yet supported"),{update:function(t){return o.isBuffer(t)||(t=new o(t)),r.push(t),t.length,this},digest:function(t){var i=o.concat(r);return i=e?function(t,e,n){o.isBuffer(e)||(e=new o(e)),o.isBuffer(n)||(n=new o(n)),e.length>y?e=t(e):e.length<y&&(e=o.concat([e,g],y));for(var r=new o(y),i=new o(y),s=0;s<y;s++)r[s]=54^e[s],i[s]=92^e[s];return n=t(o.concat([r,n])),t(o.concat([i,n]))}(n,e,i):n(i),r=null,t?i.toString(t):i}}}function w(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}g.fill(0),n.createHash=function(t){return m(t)},n.createHmac=m,n.randomBytes=function(t,e){if(!e||!e.call)return new o(d(t));try{e.call(this,void 0,new o(d(t)))}catch(t){e(t)}};var b,v=["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],I=function(t){n[t]=function(){w("sorry,",t,"is not implemented yet")}};for(b in v)I(v[b])}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:11}],6:[function(t,e,n){(function(n,r,o,i,s,a,u,f,l){var c=t("./helpers");function h(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,s=0;s<t.length;s+=16){var a=n,u=r,f=o,l=i;n=p(n,r,o,i,t[s+0],7,-680876936),i=p(i,n,r,o,t[s+1],12,-389564586),o=p(o,i,n,r,t[s+2],17,606105819),r=p(r,o,i,n,t[s+3],22,-1044525330),n=p(n,r,o,i,t[s+4],7,-176418897),i=p(i,n,r,o,t[s+5],12,1200080426),o=p(o,i,n,r,t[s+6],17,-1473231341),r=p(r,o,i,n,t[s+7],22,-45705983),n=p(n,r,o,i,t[s+8],7,1770035416),i=p(i,n,r,o,t[s+9],12,-1958414417),o=p(o,i,n,r,t[s+10],17,-42063),r=p(r,o,i,n,t[s+11],22,-1990404162),n=p(n,r,o,i,t[s+12],7,1804603682),i=p(i,n,r,o,t[s+13],12,-40341101),o=p(o,i,n,r,t[s+14],17,-1502002290),n=y(n,r=p(r,o,i,n,t[s+15],22,1236535329),o,i,t[s+1],5,-165796510),i=y(i,n,r,o,t[s+6],9,-1069501632),o=y(o,i,n,r,t[s+11],14,643717713),r=y(r,o,i,n,t[s+0],20,-373897302),n=y(n,r,o,i,t[s+5],5,-701558691),i=y(i,n,r,o,t[s+10],9,38016083),o=y(o,i,n,r,t[s+15],14,-660478335),r=y(r,o,i,n,t[s+4],20,-405537848),n=y(n,r,o,i,t[s+9],5,568446438),i=y(i,n,r,o,t[s+14],9,-1019803690),o=y(o,i,n,r,t[s+3],14,-187363961),r=y(r,o,i,n,t[s+8],20,1163531501),n=y(n,r,o,i,t[s+13],5,-1444681467),i=y(i,n,r,o,t[s+2],9,-51403784),o=y(o,i,n,r,t[s+7],14,1735328473),n=g(n,r=y(r,o,i,n,t[s+12],20,-1926607734),o,i,t[s+5],4,-378558),i=g(i,n,r,o,t[s+8],11,-2022574463),o=g(o,i,n,r,t[s+11],16,1839030562),r=g(r,o,i,n,t[s+14],23,-35309556),n=g(n,r,o,i,t[s+1],4,-1530992060),i=g(i,n,r,o,t[s+4],11,1272893353),o=g(o,i,n,r,t[s+7],16,-155497632),r=g(r,o,i,n,t[s+10],23,-1094730640),n=g(n,r,o,i,t[s+13],4,681279174),i=g(i,n,r,o,t[s+0],11,-358537222),o=g(o,i,n,r,t[s+3],16,-722521979),r=g(r,o,i,n,t[s+6],23,76029189),n=g(n,r,o,i,t[s+9],4,-640364487),i=g(i,n,r,o,t[s+12],11,-421815835),o=g(o,i,n,r,t[s+15],16,530742520),n=m(n,r=g(r,o,i,n,t[s+2],23,-995338651),o,i,t[s+0],6,-198630844),i=m(i,n,r,o,t[s+7],10,1126891415),o=m(o,i,n,r,t[s+14],15,-1416354905),r=m(r,o,i,n,t[s+5],21,-57434055),n=m(n,r,o,i,t[s+12],6,1700485571),i=m(i,n,r,o,t[s+3],10,-1894986606),o=m(o,i,n,r,t[s+10],15,-1051523),r=m(r,o,i,n,t[s+1],21,-2054922799),n=m(n,r,o,i,t[s+8],6,1873313359),i=m(i,n,r,o,t[s+15],10,-30611744),o=m(o,i,n,r,t[s+6],15,-1560198380),r=m(r,o,i,n,t[s+13],21,1309151649),n=m(n,r,o,i,t[s+4],6,-145523070),i=m(i,n,r,o,t[s+11],10,-1120210379),o=m(o,i,n,r,t[s+2],15,718787259),r=m(r,o,i,n,t[s+9],21,-343485551),n=w(n,a),r=w(r,u),o=w(o,f),i=w(i,l)}return Array(n,r,o,i)}function d(t,e,n,r,o,i){return w((e=w(w(e,t),w(r,i)))<<o|e>>>32-o,n)}function p(t,e,n,r,o,i,s){return d(e&n|~e&r,t,e,o,i,s)}function y(t,e,n,r,o,i,s){return d(e&r|n&~r,t,e,o,i,s)}function g(t,e,n,r,o,i,s){return d(e^n^r,t,e,o,i,s)}function m(t,e,n,r,o,i,s){return d(n^(e|~r),t,e,o,i,s)}function w(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}e.exports=function(t){return c.hash(t,h,16)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(t,e,n){(function(t,n,r,o,i,s,a,u,f){e.exports=function(t){for(var e,n=new Array(t),r=0;r<t;r++)!(3&r)&&(e=4294967296*Math.random()),n[r]=e>>>((3&r)<<3)&255;return n}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(t,e,n){(function(n,r,o,i,s,a,u,f,l){var c=t("./helpers");function h(t,e){t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var n,r,o,i=Array(80),s=1732584193,a=-271733879,u=-1732584194,f=271733878,l=-1009589776,c=0;c<t.length;c+=16){for(var h=s,y=a,g=u,m=f,w=l,b=0;b<80;b++){i[b]=b<16?t[c+b]:p(i[b-3]^i[b-8]^i[b-14]^i[b-16],1);var v=d(d(p(s,5),(v=a,r=u,o=f,(n=b)<20?v&r|~v&o:!(n<40)&&n<60?v&r|v&o|r&o:v^r^o)),d(d(l,i[b]),(n=b)<20?1518500249:n<40?1859775393:n<60?-1894007588:-899497514));l=f,f=u,u=p(a,30),a=s,s=v}s=d(s,h),a=d(a,y),u=d(u,g),f=d(f,m),l=d(l,w)}return Array(s,a,u,f,l)}function d(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function p(t,e){return t<<e|t>>>32-e}e.exports=function(t){return c.hash(t,h,20,!0)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(t,e,n){(function(n,r,o,i,s,a,u,f,l){function c(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function h(t,e){var n,r=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),o=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),i=new Array(64);t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var s,a,u=0;u<t.length;u+=16){for(var f=o[0],l=o[1],h=o[2],d=o[3],g=o[4],m=o[5],w=o[6],b=o[7],v=0;v<64;v++)i[v]=v<16?t[v+u]:c(c(c((a=i[v-2],p(a,17)^p(a,19)^y(a,10)),i[v-7]),(a=i[v-15],p(a,7)^p(a,18)^y(a,3))),i[v-16]),n=c(c(c(c(b,p(a=g,6)^p(a,11)^p(a,25)),g&m^~g&w),r[v]),i[v]),s=c(p(s=f,2)^p(s,13)^p(s,22),f&l^f&h^l&h),b=w,w=m,m=g,g=c(d,n),d=h,h=l,l=f,f=c(n,s);o[0]=c(f,o[0]),o[1]=c(l,o[1]),o[2]=c(h,o[2]),o[3]=c(d,o[3]),o[4]=c(g,o[4]),o[5]=c(m,o[5]),o[6]=c(w,o[6]),o[7]=c(b,o[7])}return o}var d=t("./helpers"),p=function(t,e){return t>>>e|t<<32-e},y=function(t,e){return t>>>e};e.exports=function(t){return d.hash(t,h,32,!0)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(t,e,n){(function(t,e,r,o,i,s,a,u,f){n.read=function(t,e,n,r,o){var i,s,a=8*o-r-1,u=(1<<a)-1,f=u>>1,l=-7,c=n?o-1:0,h=n?-1:1;for(o=t[e+c],c+=h,i=o&(1<<-l)-1,o>>=-l,l+=a;0<l;i=256*i+t[e+c],c+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;0<l;s=256*s+t[e+c],c+=h,l-=8);if(0===i)i=1-f;else{if(i===u)return s?NaN:1/0*(o?-1:1);s+=Math.pow(2,r),i-=f}return(o?-1:1)*s*Math.pow(2,i-r)},n.write=function(t,e,n,r,o,i){var s,a,u=8*i-o-1,f=(1<<u)-1,l=f>>1,c=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,d=r?1:-1;for(i=e<0||0===e&&1/e<0?1:0,e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(r=Math.pow(2,-s))<1&&(s--,r*=2),2<=(e+=1<=s+l?c/r:c*Math.pow(2,1-l))*r&&(s++,r/=2),f<=s+l?(a=0,s=f):1<=s+l?(a=(e*r-1)*Math.pow(2,o),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,o),s=0));8<=o;t[n+h]=255&a,h+=d,a/=256,o-=8);for(s=s<<o|a,u+=o;0<u;t[n+h]=255&s,h+=d,s/=256,u-=8);t[n+h-d]|=128*i}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/ieee754/index.js","/node_modules/gulp-browserify/node_modules/ieee754")},{buffer:3,lYpoI2:11}],11:[function(t,e,n){(function(t,n,r,o,i,s,a,u,f){var l,c,h;function d(){}(t=e.exports={}).nextTick=(c="undefined"!=typeof window&&window.setImmediate,h="undefined"!=typeof window&&window.postMessage&&window.addEventListener,c?function(t){return window.setImmediate(t)}:h?(l=[],window.addEventListener("message",(function(t){var e=t.source;e!==window&&null!==e||"process-tick"!==t.data||(t.stopPropagation(),0<l.length&&l.shift()())}),!0),function(t){l.push(t),window.postMessage("process-tick","*")}):function(t){setTimeout(t,0)}),t.title="browser",t.browser=!0,t.env={},t.argv=[],t.on=d,t.addListener=d,t.once=d,t.off=d,t.removeListener=d,t.removeAllListeners=d,t.emit=d,t.binding=function(t){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(t){throw new Error("process.chdir is not supported")}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:11}]},{},[1])(1)),M.exports),D=k(N),P={exports:{}};var R,O=function(){if(U)return P.exports;U=1;var t,e="object"==typeof Reflect?Reflect:null,n=e&&"function"==typeof e.apply?e.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};t=e&&"function"==typeof e.ownKeys?e.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var r=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}P.exports=o,P.exports.once=function(t,e){return new Promise((function(n,r){function o(n){t.removeListener(e,i),r(n)}function i(){"function"==typeof t.removeListener&&t.removeListener("error",o),n([].slice.call(arguments))}p(t,e,i,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&p(t,"error",e,n)}(t,o,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var i=10;function s(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function a(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function u(t,e,n,r){var o,i,u,f;if(s(n),void 0===(i=t._events)?(i=t._events=Object.create(null),t._eventsCount=0):(void 0!==i.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),i=t._events),u=i[e]),void 0===u)u=i[e]=n,++t._eventsCount;else if("function"==typeof u?u=i[e]=r?[n,u]:[u,n]:r?u.unshift(n):u.push(n),(o=a(t))>0&&u.length>o&&!u.warned){u.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=u.length,f=l,console&&console.warn&&console.warn(f)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},o=f.bind(r);return o.listener=n,r.wrapFn=o,o}function c(t,e,n){var r=t._events;if(void 0===r)return[];var o=r[e];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(o):d(o,o.length)}function h(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function d(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function p(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function o(i){r.once&&t.removeEventListener(e,o),n(i)}))}}return Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(t){if("number"!=typeof t||t<0||r(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");i=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||r(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return a(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var o="error"===t,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else{var f=u.length,l=d(u,f);for(r=0;r<f;++r)n(l[r],this,e)}return!0},o.prototype.addListener=function(t,e){return u(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return u(this,t,e,!0)},o.prototype.once=function(t,e){return s(e),this.on(t,l(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return s(e),this.prependListener(t,l(this,t,e)),this},o.prototype.removeListener=function(t,e){var n,r,o,i,a;if(s(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===e||n[i].listener===e){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,o),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,a||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},o.prototype.listeners=function(t){return c(this,t,!0)},o.prototype.rawListeners=function(t){return c(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):h.call(t,e)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]},P.exports}(),j={},F={};var $,H,q={};function Y(){return $||($=1,q.read=function(t,e,n,r,o){var i,s,a=8*o-r-1,u=(1<<a)-1,f=u>>1,l=-7,c=n?o-1:0,h=n?-1:1,d=t[e+c];for(c+=h,i=d&(1<<-l)-1,d>>=-l,l+=a;l>0;i=256*i+t[e+c],c+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+t[e+c],c+=h,l-=8);if(0===i)i=1-f;else{if(i===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),i-=f}return(d?-1:1)*s*Math.pow(2,i-r)},q.write=function(t,e,n,r,o,i){var s,a,u,f=8*i-o-1,l=(1<<f)-1,c=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,p=r?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=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+c>=1?h/u:h*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=l?(a=0,s=l):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[n+d]=255&a,d+=p,a/=256,o-=8);for(s=s<<o|a,f+=o;f>0;t[n+d]=255&s,d+=p,s/=256,f-=8);t[n+d-p]|=128*y}),q}var K=(H||(H=1,function(t){var e=function(){if(R)return F;R=1,F.byteLength=function(t){var e=i(t),n=e[0],r=e[1];return 3*(n+r)/4-r},F.toByteArray=function(t){var r,o,s=i(t),a=s[0],u=s[1],f=new n(function(t,e,n){return 3*(e+n)/4-n}(0,a,u)),l=0,c=u>0?a-4:a;for(o=0;o<c;o+=4)r=e[t.charCodeAt(o)]<<18|e[t.charCodeAt(o+1)]<<12|e[t.charCodeAt(o+2)]<<6|e[t.charCodeAt(o+3)],f[l++]=r>>16&255,f[l++]=r>>8&255,f[l++]=255&r;return 2===u&&(r=e[t.charCodeAt(o)]<<2|e[t.charCodeAt(o+1)]>>4,f[l++]=255&r),1===u&&(r=e[t.charCodeAt(o)]<<10|e[t.charCodeAt(o+1)]<<4|e[t.charCodeAt(o+2)]>>2,f[l++]=r>>8&255,f[l++]=255&r),f},F.fromByteArray=function(e){for(var n,r=e.length,o=r%3,i=[],a=16383,u=0,f=r-o;u<f;u+=a)i.push(s(e,u,u+a>f?f:u+a));return 1===o?(n=e[r-1],i.push(t[n>>2]+t[n<<4&63]+"==")):2===o&&(n=(e[r-2]<<8)+e[r-1],i.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+"=")),i.join("")};for(var t=[],e=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)t[o]=r[o],e[r.charCodeAt(o)]=o;function i(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function s(e,n,r){for(var o,i,s=[],a=n;a<r;a+=3)o=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(t[(i=o)>>18&63]+t[i>>12&63]+t[i>>6&63]+t[63&i]);return s.join("")}return e["-".charCodeAt(0)]=62,e["_".charCodeAt(0)]=63,F}(),n=Y();t.Buffer=i,t.SlowBuffer=function(t){return+t!=t&&(t=0),i.alloc(+t)},t.INSPECT_MAX_BYTES=50;var r=2147483647;function o(t){if(t>r)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return e.__proto__=i.prototype,e}function i(t,e,n){if("number"==typeof t){if("string"==ty