@tripian/core 9.1.96 → 9.1.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/API.d.ts +1 -0
- package/index.js +1 -1
- package/package.json +2 -2
- package/tcore.umd.js +1 -1
package/tcore.umd.js
CHANGED
|
@@ -283,7 +283,7 @@ e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月
|
|
|
283
283
|
//! moment.js locale configuration
|
|
284
284
|
e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,r){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(r(0))},function(e,t,r){!function(e){"use strict";
|
|
285
285
|
//! moment.js locale configuration
|
|
286
|
-
e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,r){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(r(0))},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.handleHttpResponseError=t.handleHttpResponseSuccess=void 0;const i=n(r(16)),a=n(r(282));t.handleHttpResponseSuccess=(e,t,r,n,i)=>{if(!e.success)throw e.message;return(0,a.default)(e.data,t,r,n,i,e.pagination),{data:e.data,pagination:e.pagination}};t.handleHttpResponseError=(e,t,r)=>{if(i.default.hasError=!0,i.default.errors.push({dataKey:t,errorResponse:e,params:r}),t&&"trip"!==t&&(i.default[t]=null),e.response){if(e.response.data){if(e.response.data.message)throw e.response.data.message;throw e.response.data}throw e.response}if(e.message)throw e.message;throw e}},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},function(e,t,r){"use strict";var n=r(6);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var a;if(r)a=r(t);else if(n.isURLSearchParams(t))a=t.toString();else{var s=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(i(t)+"="+i(e))})))})),a=s.join("&")}if(a){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},function(e,t,r){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},function(e,t,r){"use strict";(function(t){var n=r(6);e.exports=function(e,r){r=r||new FormData;var i=[];function a(e){return null===e?"":n.isDate(e)?e.toISOString():n.isArrayBuffer(e)||n.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):t.from(e):e}return function e(t,s){if(n.isPlainObject(t)||n.isArray(t)){if(-1!==i.indexOf(t))throw Error("Circular reference detected in "+s);i.push(t),n.forEach(t,(function(t,i){if(!n.isUndefined(t)){var o,u=s?s+"."+i:i;if(t&&!s&&"object"==typeof t)if(n.endsWith(i,"{}"))t=JSON.stringify(t);else if(n.endsWith(i,"[]")&&(o=n.toArray(t)))return void o.forEach((function(e){!n.isUndefined(e)&&r.append(u,a(e))}));e(t,u)}})),i.pop()}else r.append(s,a(t))}(e),r}}).call(this,r(3).Buffer)},function(e,t,r){"use strict";var n=r(6),i=r(294),a=r(295),s=r(203),o=r(207),u=r(298),d=r(299),c=r(204),f=r(17),h=r(35),l=r(300);e.exports=function(e){return new Promise((function(t,r){var p,_=e.data,m=e.headers,y=e.responseType;function b(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}n.isFormData(_)&&n.isStandardBrowserEnv()&&delete m["Content-Type"];var g=new XMLHttpRequest;if(e.auth){var M=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(M+":"+v)}var T=o(e.baseURL,e.url);function w(){if(g){var n="getAllResponseHeaders"in g?u(g.getAllResponseHeaders()):null,a={data:y&&"text"!==y&&"json"!==y?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g};i((function(e){t(e),b()}),(function(e){r(e),b()}),a),g=null}}if(g.open(e.method.toUpperCase(),s(T,e.params,e.paramsSerializer),!0),g.timeout=e.timeout,"onloadend"in g?g.onloadend=w:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(w)},g.onabort=function(){g&&(r(new f("Request aborted",f.ECONNABORTED,e,g)),g=null)},g.onerror=function(){r(new f("Network Error",f.ERR_NETWORK,e,g,g)),g=null},g.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||c;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new f(t,n.clarifyTimeoutError?f.ETIMEDOUT:f.ECONNABORTED,e,g)),g=null},n.isStandardBrowserEnv()){var S=(e.withCredentials||d(T))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;S&&(m[e.xsrfHeaderName]=S)}"setRequestHeader"in g&&n.forEach(m,(function(e,t){void 0===_&&"content-type"===t.toLowerCase()?delete m[t]:g.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(g.withCredentials=!!e.withCredentials),y&&"json"!==y&&(g.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&g.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&g.upload&&g.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){g&&(r(!e||e&&e.type?new h:e),g.abort(),g=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),_||(_=null);var L=l(T);L&&-1===["http","https","file"].indexOf(L)?r(new f("Unsupported protocol "+L+":",f.ERR_BAD_REQUEST,e)):g.send(_)}))}},function(e,t,r){"use strict";var n=r(296),i=r(297);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";var n=r(6);e.exports=function(e,t){t=t||{};var r={};function i(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function a(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(e[r],t[r])}function s(e){if(!n.isUndefined(t[e]))return i(void 0,t[e])}function o(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(void 0,t[r])}function u(r){return r in t?i(e[r],t[r]):r in e?i(void 0,e[r]):void 0}var d={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=d[e]||a,i=t(e);n.isUndefined(i)&&t!==u||(r[e]=i)})),r}},function(e,t){e.exports={version:"0.27.2"}},function(e,t,r){"use strict";(function(t,n){var i;e.exports=L,L.ReadableState=S;r(13).EventEmitter;var a=function(e,t){return e.listeners(t).length},s=r(212),o=r(3).Buffer,u=(void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var d,c=r(320);d=c&&c.debuglog?c.debuglog("stream"):function(){};var f,h,l,p=r(321),_=r(213),m=r(214).getHighWaterMark,y=r(19).codes,b=y.ERR_INVALID_ARG_TYPE,g=y.ERR_STREAM_PUSH_AFTER_EOF,M=y.ERR_METHOD_NOT_IMPLEMENTED,v=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(1)(L,s);var T=_.errorOrDestroy,w=["error","close","destroy","pause","resume"];function S(e,t,n){i=i||r(20),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(14).StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function L(e){if(i=i||r(20),!(this instanceof L))return new L(e);var t=this instanceof i;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function A(e,t,r,n,i){d("readableAddChunk",t);var a,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(d("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?k(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,Y(e)))}(e,s);else if(i||(a=function(e,t){var r;n=t,o.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(s,t)),a)T(e,a);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),n)s.endEmitted?T(e,new v):E(e,s,t,!0);else if(s.ended)T(e,new g);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?E(e,s,t,!1):O(e,s)):E(e,s,t,!1)}else n||(s.reading=!1,O(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function E(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),O(e,t)}Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),L.prototype.destroy=_.destroy,L.prototype._undestroy=_.undestroy,L.prototype._destroy=function(e,t){t(e)},L.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=o.from(e,t),t=""),r=!0),A(this,e,t,!1,r)},L.prototype.unshift=function(e){return A(this,e,null,!0,!1)},L.prototype.isPaused=function(){return!1===this._readableState.flowing},L.prototype.setEncoding=function(e){f||(f=r(14).StringDecoder);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function D(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;d("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(Y,e))}function Y(e){var t=e._readableState;d("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,x(e)}function O(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(F,e,t))}function F(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(d("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function P(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function I(e){d("readable nexttick read 0"),e.read(0)}function R(e,t){d("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),x(e),t.flowing&&!t.reading&&e.read(0)}function x(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function j(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function K(e){var t=e._readableState;d("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(H,t,e))}function H(e,t){if(d("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function N(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}L.prototype.read=function(e){d("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?K(this):k(this),null;if(0===(e=D(e,t))&&t.ended)return 0===t.length&&K(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),t.ended||t.reading?d("reading or ended",i=!1):i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=D(r,t))),null===(n=e>0?j(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&K(this)),null!==n&&this.emit("data",n),n},L.prototype._read=function(e){T(this,new M("_read()"))},L.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,d("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?u:m;function o(t,n){d("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),e.removeListener("close",p),e.removeListener("finish",_),e.removeListener("drain",c),e.removeListener("error",l),e.removeListener("unpipe",o),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",h),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function u(){d("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",o);var c=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,x(e))}}(r);e.on("drain",c);var f=!1;function h(t){d("ondata");var n=e.write(t);d("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==N(i.pipes,e))&&!f&&(d("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function l(t){d("onerror",t),m(),e.removeListener("error",l),0===a(e,"error")&&T(e,t)}function p(){e.removeListener("finish",_),m()}function _(){d("onfinish"),e.removeListener("close",p),m()}function m(){d("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",l),e.once("close",p),e.once("finish",_),e.emit("pipe",r),i.flowing||(d("pipe resume"),r.resume()),e},L.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var s=N(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},L.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,d("on readable",i.length,i.reading),i.length?k(this):i.reading||n.nextTick(I,this))),r},L.prototype.addListener=L.prototype.on,L.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(P,this),r},L.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(P,this),t},L.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(R,e,t))}(this,e)),e.paused=!1,this},L.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},L.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<w.length;a++)e.on(w[a],this.emit.bind(this,w[a]));return this._read=function(t){d("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(L.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=r(323)),h(this)}),Object.defineProperty(L.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(L.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(L.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),L._fromList=j,Object.defineProperty(L.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(L.from=function(e,t){return void 0===l&&(l=r(324)),l(L,e,t)})}).call(this,r(5),r(4))},function(e,t,r){e.exports=r(13).EventEmitter},function(e,t,r){"use strict";(function(t){function r(e,t){i(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,a){var s=this,o=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return o||u?(a?a(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(i,this,e)):t.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!a&&e?s._writableState?s._writableState.errorEmitted?t.nextTick(n,s):(s._writableState.errorEmitted=!0,t.nextTick(r,s,e)):t.nextTick(r,s,e):a?(t.nextTick(n,s),a(e)):t.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this,r(4))},function(e,t,r){"use strict";var n=r(19).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},function(e,t,r){"use strict";(function(t,n){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var a;e.exports=L,L.WritableState=S;var s={deprecate:r(47)},o=r(212),u=r(3).Buffer,d=(void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,f=r(213),h=r(214).getHighWaterMark,l=r(19).codes,p=l.ERR_INVALID_ARG_TYPE,_=l.ERR_METHOD_NOT_IMPLEMENTED,m=l.ERR_MULTIPLE_CALLBACK,y=l.ERR_STREAM_CANNOT_PIPE,b=l.ERR_STREAM_DESTROYED,g=l.ERR_STREAM_NULL_VALUES,M=l.ERR_STREAM_WRITE_AFTER_END,v=l.ERR_UNKNOWN_ENCODING,T=f.errorOrDestroy;function w(){}function S(e,t,s){a=a||r(20),e=e||{},"boolean"!=typeof s&&(s=t instanceof a),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,a=r.writecb;if("function"!=typeof a)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,a){--t.pendingcb,r?(n.nextTick(a,i),n.nextTick(O,e,t),e._writableState.errorEmitted=!0,T(e,i)):(a(i),e._writableState.errorEmitted=!0,T(e,i),O(e,t))}(e,r,i,t,a);else{var s=k(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||D(e,r),i?n.nextTick(E,e,r,s,a):E(e,r,s,a)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function L(e){var t=this instanceof(a=a||r(20));if(!t&&!c.call(L,this))return new L(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function A(e,t,r,n,i,a,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function E(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),O(e,t)}function D(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,a=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var o=0,u=!0;r;)a[o]=r,r.isBuf||(u=!1),r=r.next,o+=1;a.allBuffers=u,A(e,t,!0,t.length,a,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var d=r.chunk,c=r.encoding,f=r.callback;if(A(e,t,!1,t.objectMode?1:d.length,d,c,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function Y(e,t){e._final((function(r){t.pendingcb--,r&&T(e,r),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var r=k(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,n.nextTick(Y,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}r(1)(L,o),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(L,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===L&&(e&&e._writableState instanceof S)}})):c=function(e){return e instanceof this},L.prototype.pipe=function(){T(this,new y)},L.prototype.write=function(e,t,r){var i,a=this._writableState,s=!1,o=!a.objectMode&&(i=e,u.isBuffer(i)||i instanceof d);return o&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=a.defaultEncoding),"function"!=typeof r&&(r=w),a.ending?function(e,t){var r=new M;T(e,r),n.nextTick(t,r)}(this,r):(o||function(e,t,r,i){var a;return null===r?a=new g:"string"==typeof r||t.objectMode||(a=new p("chunk",["string","Buffer"],r)),!a||(T(e,a),n.nextTick(i,a),!1)}(this,a,e,r))&&(a.pendingcb++,s=function(e,t,r,n,i,a){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var o=t.objectMode?1:n.length;t.length+=o;var d=t.length<t.highWaterMark;d||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else A(e,t,!1,o,n,i,a);return d}(this,a,o,e,t,r)),s},L.prototype.cork=function(){this._writableState.corked++},L.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||D(this,e))},L.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(L.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),L.prototype._write=function(e,t,r){r(new _("_write()"))},L.prototype._writev=null,L.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(L.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),L.prototype.destroy=f.destroy,L.prototype._undestroy=f.undestroy,L.prototype._destroy=function(e,t){t(e)}}).call(this,r(5),r(4))},function(e,t,r){"use strict";e.exports=c;var n=r(19).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,a=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(20);function d(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new a);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);u.call(this,e),this._transformState={afterTransform:d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,r){h(e,t,r)}))}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new o;if(e._transformState.transforming)throw new s;return e.push(null)}r(1)(c,u),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,r){r(new i("_transform()"))},c.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},function(e,t,r){"use strict";var n=r(3).Buffer,i=r(1),a=r(327),s=new Array(16),o=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],c=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],f=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function l(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function _(e,t,r,n,i,a,s,o){return p(e+(t^r^n)+a+s|0,o)+i|0}function m(e,t,r,n,i,a,s,o){return p(e+(t&r|~t&n)+a+s|0,o)+i|0}function y(e,t,r,n,i,a,s,o){return p(e+((t|~r)^n)+a+s|0,o)+i|0}function b(e,t,r,n,i,a,s,o){return p(e+(t&n|r&~n)+a+s|0,o)+i|0}function g(e,t,r,n,i,a,s,o){return p(e+(t^(r|~n))+a+s|0,o)+i|0}i(l,a),l.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,l=0|this._e,M=0|this._a,v=0|this._b,T=0|this._c,w=0|this._d,S=0|this._e,L=0;L<80;L+=1){var A,E;L<16?(A=_(r,n,i,a,l,e[o[L]],f[0],d[L]),E=g(M,v,T,w,S,e[u[L]],h[0],c[L])):L<32?(A=m(r,n,i,a,l,e[o[L]],f[1],d[L]),E=b(M,v,T,w,S,e[u[L]],h[1],c[L])):L<48?(A=y(r,n,i,a,l,e[o[L]],f[2],d[L]),E=y(M,v,T,w,S,e[u[L]],h[2],c[L])):L<64?(A=b(r,n,i,a,l,e[o[L]],f[3],d[L]),E=m(M,v,T,w,S,e[u[L]],h[3],c[L])):(A=g(r,n,i,a,l,e[o[L]],f[4],d[L]),E=_(M,v,T,w,S,e[u[L]],h[4],c[L])),r=l,l=a,a=p(i,10),i=n,n=A,M=S,S=w,w=p(T,10),T=v,v=E}var D=this._b+i+w|0;this._b=this._c+a+S|0,this._c=this._d+l+M|0,this._d=this._e+r+v|0,this._e=this._a+n+T|0,this._a=D},l.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=l},function(e,t,r){"use strict";(function(t,n){var i;e.exports=L,L.ReadableState=S;r(13).EventEmitter;var a=function(e,t){return e.listeners(t).length},s=r(219),o=r(3).Buffer,u=(void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var d,c=r(329);d=c&&c.debuglog?c.debuglog("stream"):function(){};var f,h,l,p=r(330),_=r(220),m=r(221).getHighWaterMark,y=r(21).codes,b=y.ERR_INVALID_ARG_TYPE,g=y.ERR_STREAM_PUSH_AFTER_EOF,M=y.ERR_METHOD_NOT_IMPLEMENTED,v=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(1)(L,s);var T=_.errorOrDestroy,w=["error","close","destroy","pause","resume"];function S(e,t,n){i=i||r(22),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(14).StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function L(e){if(i=i||r(22),!(this instanceof L))return new L(e);var t=this instanceof i;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function A(e,t,r,n,i){d("readableAddChunk",t);var a,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(d("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?k(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,Y(e)))}(e,s);else if(i||(a=function(e,t){var r;n=t,o.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(s,t)),a)T(e,a);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),n)s.endEmitted?T(e,new v):E(e,s,t,!0);else if(s.ended)T(e,new g);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?E(e,s,t,!1):O(e,s)):E(e,s,t,!1)}else n||(s.reading=!1,O(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function E(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),O(e,t)}Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),L.prototype.destroy=_.destroy,L.prototype._undestroy=_.undestroy,L.prototype._destroy=function(e,t){t(e)},L.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=o.from(e,t),t=""),r=!0),A(this,e,t,!1,r)},L.prototype.unshift=function(e){return A(this,e,null,!0,!1)},L.prototype.isPaused=function(){return!1===this._readableState.flowing},L.prototype.setEncoding=function(e){f||(f=r(14).StringDecoder);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function D(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;d("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(Y,e))}function Y(e){var t=e._readableState;d("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,x(e)}function O(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(F,e,t))}function F(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(d("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function P(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function I(e){d("readable nexttick read 0"),e.read(0)}function R(e,t){d("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),x(e),t.flowing&&!t.reading&&e.read(0)}function x(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function j(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function K(e){var t=e._readableState;d("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(H,t,e))}function H(e,t){if(d("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function N(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}L.prototype.read=function(e){d("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?K(this):k(this),null;if(0===(e=D(e,t))&&t.ended)return 0===t.length&&K(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),t.ended||t.reading?d("reading or ended",i=!1):i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=D(r,t))),null===(n=e>0?j(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&K(this)),null!==n&&this.emit("data",n),n},L.prototype._read=function(e){T(this,new M("_read()"))},L.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,d("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?u:m;function o(t,n){d("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),e.removeListener("close",p),e.removeListener("finish",_),e.removeListener("drain",c),e.removeListener("error",l),e.removeListener("unpipe",o),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",h),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function u(){d("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",o);var c=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,x(e))}}(r);e.on("drain",c);var f=!1;function h(t){d("ondata");var n=e.write(t);d("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==N(i.pipes,e))&&!f&&(d("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function l(t){d("onerror",t),m(),e.removeListener("error",l),0===a(e,"error")&&T(e,t)}function p(){e.removeListener("finish",_),m()}function _(){d("onfinish"),e.removeListener("close",p),m()}function m(){d("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",l),e.once("close",p),e.once("finish",_),e.emit("pipe",r),i.flowing||(d("pipe resume"),r.resume()),e},L.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var s=N(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},L.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,d("on readable",i.length,i.reading),i.length?k(this):i.reading||n.nextTick(I,this))),r},L.prototype.addListener=L.prototype.on,L.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(P,this),r},L.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(P,this),t},L.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(R,e,t))}(this,e)),e.paused=!1,this},L.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},L.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<w.length;a++)e.on(w[a],this.emit.bind(this,w[a]));return this._read=function(t){d("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(L.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=r(332)),h(this)}),Object.defineProperty(L.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(L.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(L.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),L._fromList=j,Object.defineProperty(L.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(L.from=function(e,t){return void 0===l&&(l=r(333)),l(L,e,t)})}).call(this,r(5),r(4))},function(e,t,r){e.exports=r(13).EventEmitter},function(e,t,r){"use strict";(function(t){function r(e,t){i(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,a){var s=this,o=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return o||u?(a?a(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(i,this,e)):t.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!a&&e?s._writableState?s._writableState.errorEmitted?t.nextTick(n,s):(s._writableState.errorEmitted=!0,t.nextTick(r,s,e)):t.nextTick(r,s,e):a?(t.nextTick(n,s),a(e)):t.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this,r(4))},function(e,t,r){"use strict";var n=r(21).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},function(e,t,r){"use strict";(function(t,n){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var a;e.exports=L,L.WritableState=S;var s={deprecate:r(47)},o=r(219),u=r(3).Buffer,d=(void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,f=r(220),h=r(221).getHighWaterMark,l=r(21).codes,p=l.ERR_INVALID_ARG_TYPE,_=l.ERR_METHOD_NOT_IMPLEMENTED,m=l.ERR_MULTIPLE_CALLBACK,y=l.ERR_STREAM_CANNOT_PIPE,b=l.ERR_STREAM_DESTROYED,g=l.ERR_STREAM_NULL_VALUES,M=l.ERR_STREAM_WRITE_AFTER_END,v=l.ERR_UNKNOWN_ENCODING,T=f.errorOrDestroy;function w(){}function S(e,t,s){a=a||r(22),e=e||{},"boolean"!=typeof s&&(s=t instanceof a),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,a=r.writecb;if("function"!=typeof a)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,a){--t.pendingcb,r?(n.nextTick(a,i),n.nextTick(O,e,t),e._writableState.errorEmitted=!0,T(e,i)):(a(i),e._writableState.errorEmitted=!0,T(e,i),O(e,t))}(e,r,i,t,a);else{var s=k(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||D(e,r),i?n.nextTick(E,e,r,s,a):E(e,r,s,a)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function L(e){var t=this instanceof(a=a||r(22));if(!t&&!c.call(L,this))return new L(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function A(e,t,r,n,i,a,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function E(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),O(e,t)}function D(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,a=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var o=0,u=!0;r;)a[o]=r,r.isBuf||(u=!1),r=r.next,o+=1;a.allBuffers=u,A(e,t,!0,t.length,a,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var d=r.chunk,c=r.encoding,f=r.callback;if(A(e,t,!1,t.objectMode?1:d.length,d,c,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function Y(e,t){e._final((function(r){t.pendingcb--,r&&T(e,r),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var r=k(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,n.nextTick(Y,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}r(1)(L,o),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(L,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===L&&(e&&e._writableState instanceof S)}})):c=function(e){return e instanceof this},L.prototype.pipe=function(){T(this,new y)},L.prototype.write=function(e,t,r){var i,a=this._writableState,s=!1,o=!a.objectMode&&(i=e,u.isBuffer(i)||i instanceof d);return o&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=a.defaultEncoding),"function"!=typeof r&&(r=w),a.ending?function(e,t){var r=new M;T(e,r),n.nextTick(t,r)}(this,r):(o||function(e,t,r,i){var a;return null===r?a=new g:"string"==typeof r||t.objectMode||(a=new p("chunk",["string","Buffer"],r)),!a||(T(e,a),n.nextTick(i,a),!1)}(this,a,e,r))&&(a.pendingcb++,s=function(e,t,r,n,i,a){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var o=t.objectMode?1:n.length;t.length+=o;var d=t.length<t.highWaterMark;d||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else A(e,t,!1,o,n,i,a);return d}(this,a,o,e,t,r)),s},L.prototype.cork=function(){this._writableState.corked++},L.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||D(this,e))},L.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(L.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),L.prototype._write=function(e,t,r){r(new _("_write()"))},L.prototype._writev=null,L.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(L.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),L.prototype.destroy=f.destroy,L.prototype._undestroy=f.undestroy,L.prototype._destroy=function(e,t){t(e)}}).call(this,r(5),r(4))},function(e,t,r){"use strict";e.exports=c;var n=r(21).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,a=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(22);function d(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new a);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);u.call(this,e),this._transformState={afterTransform:d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,r){h(e,t,r)}))}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new o;if(e._transformState.transforming)throw new s;return e.push(null)}r(1)(c,u),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,r){r(new i("_transform()"))},c.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},function(e,t,r){"use strict";var n=r(2).Buffer,i=r(337),a=r(338),s=ArrayBuffer.isView||function(e){try{return a(e),!0}catch(e){return!1}},o="undefined"!=typeof Uint8Array,u="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,d=u&&(n.prototype instanceof Uint8Array||n.TYPED_ARRAY_SUPPORT);e.exports=function(e,t){if(e instanceof n)return e;if("string"==typeof e)return n.from(e,t);if(u&&s(e)){if(0===e.byteLength)return n.alloc(0);if(d){var r=n.from(e.buffer,e.byteOffset,e.byteLength);if(r.byteLength===e.byteLength)return r}var a=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),c=n.from(a);if(c.length===e.byteLength)return c}if(o&&e instanceof Uint8Array)return n.from(e);var f=i(e);if(f)for(var h=0;h<e.length;h+=1){var l=e[h];if("number"!=typeof l||l<0||l>255||~~l!==l)throw new RangeError("Array items must be numbers in the range 0-255.")}if(f||n.isBuffer(e)&&e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e))return n.from(e);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}},function(e,t,r){"use strict";var n=r(226),i=r(51),a=i([n("%String.prototype.indexOf%")]);e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&a(e,".prototype.")>-1?i([r]):r}},function(e,t,r){"use strict";var n=r(227),i=r(339),a=r(340),s=r(341),o=r(342),u=r(228),d=r(26),c=r(343),f=r(344),h=r(345),l=r(346),p=r(347),_=r(348),m=r(349),y=r(350),b=Function,g=function(e){try{return b('"use strict"; return ('+e+").constructor;")()}catch(e){}},M=r(27),v=r(36),T=function(){throw new d},w=M?function(){try{return T}catch(e){try{return M(arguments,"callee").get}catch(e){return T}}}():T,S=r(353)(),L=r(230),A=r(232),E=r(231),D=r(53),k=r(52),Y={},O="undefined"!=typeof Uint8Array&&L?L(Uint8Array):void 0,F={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":S&&L?L([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":Y,"%AsyncGenerator%":Y,"%AsyncGeneratorFunction%":Y,"%AsyncIteratorPrototype%":Y,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?void 0:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?void 0:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"undefined"==typeof Float16Array?void 0:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":Y,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&L?L(L([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&S&&L?L((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":n,"%Object.getOwnPropertyDescriptor%":M,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":s,"%ReferenceError%":o,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&S&&L?L((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&L?L(""[Symbol.iterator]()):void 0,"%Symbol%":S?Symbol:void 0,"%SyntaxError%":u,"%ThrowTypeError%":w,"%TypedArray%":O,"%TypeError%":d,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":D,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":A,"%Math.abs%":f,"%Math.floor%":h,"%Math.max%":l,"%Math.min%":p,"%Math.pow%":_,"%Math.round%":m,"%Math.sign%":y,"%Reflect.getPrototypeOf%":E};if(L)try{null.error}catch(e){var P=L(L(e));F["%Error.prototype%"]=P}var I={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},R=r(28),x=r(357),j=R.call(k,Array.prototype.concat),K=R.call(D,Array.prototype.splice),H=R.call(k,String.prototype.replace),N=R.call(k,String.prototype.slice),C=R.call(k,RegExp.prototype.exec),U=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,B=/\\(\\)?/g,W=function(e){var t=N(e,0,1),r=N(e,-1);if("%"===t&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var n=[];return H(e,U,(function(e,t,r,i){n[n.length]=r?H(i,B,"$1"):t||e})),n},z=function(e,t){var r,n=e;if(x(I,n)&&(n="%"+(r=I[n])[0]+"%"),x(F,n)){var i=F[n];if(i===Y&&(i=function e(t){var r;if("%AsyncFunction%"===t)r=g("async function () {}");else if("%GeneratorFunction%"===t)r=g("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=g("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&L&&(r=L(i.prototype))}return F[t]=r,r}(n)),void 0===i&&!t)throw new d("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new d("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new d('"allowMissing" argument must be a boolean');if(null===C(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=W(e),n=r.length>0?r[0]:"",i=z("%"+n+"%",t),a=i.name,s=i.value,o=!1,c=i.alias;c&&(n=c[0],K(r,j([0,1],c)));for(var f=1,h=!0;f<r.length;f+=1){var l=r[f],p=N(l,0,1),_=N(l,-1);if(('"'===p||"'"===p||"`"===p||'"'===_||"'"===_||"`"===_)&&p!==_)throw new u("property names with quotes must have matching quotes");if("constructor"!==l&&h||(o=!0),x(F,a="%"+(n+="."+l)+"%"))s=F[a];else if(null!=s){if(!(l in s)){if(!t)throw new d("base intrinsic for "+e+" exists, but the property is not available.");return}if(M&&f+1>=r.length){var m=M(s,l);s=(h=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:s[l]}else h=x(s,l),s=s[l];h&&!o&&(F[a]=s)}}return s}},function(e,t,r){"use strict";e.exports=Object},function(e,t,r){"use strict";e.exports=SyntaxError},function(e,t,r){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}},function(e,t,r){"use strict";var n=r(231),i=r(232),a=r(354);e.exports=n?function(e){return n(e)}:i?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return i(e)}:a?function(e){return a(e)}:null},function(e,t,r){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},function(e,t,r){"use strict";var n=r(227);e.exports=n.getPrototypeOf||null},function(e,t,r){"use strict";var n=r(28),i=r(53),a=r(52),s=r(356);e.exports=s||n.call(a,i)},function(e,t,r){"use strict";var n=r(1),i=r(23),a=r(2).Buffer,s=[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(64);function u(){this.init(),this._w=o,i.call(this,64,56)}function d(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function l(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,o=0|this._d,u=0|this._e,p=0|this._f,_=0|this._g,m=0|this._h,y=0;y<16;++y)r[y]=e.readInt32BE(4*y);for(;y<64;++y)r[y]=0|(((t=r[y-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[y-7]+l(r[y-15])+r[y-16];for(var b=0;b<64;++b){var g=m+h(u)+d(u,p,_)+s[b]+r[b]|0,M=f(n)+c(n,i,a)|0;m=_,_=p,p=u,u=o+g|0,o=a,a=i,i=n,n=g+M|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=_+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var e=a.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},function(e,t,r){"use strict";var n=r(1),i=r(23),a=r(2).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],o=new Array(160);function u(){this.init(),this._w=o,i.call(this,128,112)}function d(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function l(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function _(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function y(e,t){return e>>>0<t>>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,a=0|this._dh,o=0|this._eh,u=0|this._fh,b=0|this._gh,g=0|this._hh,M=0|this._al,v=0|this._bl,T=0|this._cl,w=0|this._dl,S=0|this._el,L=0|this._fl,A=0|this._gl,E=0|this._hl,D=0;D<32;D+=2)t[D]=e.readInt32BE(4*D),t[D+1]=e.readInt32BE(4*D+4);for(;D<160;D+=2){var k=t[D-30],Y=t[D-30+1],O=l(k,Y),F=p(Y,k),P=_(k=t[D-4],Y=t[D-4+1]),I=m(Y,k),R=t[D-14],x=t[D-14+1],j=t[D-32],K=t[D-32+1],H=F+x|0,N=O+R+y(H,F)|0;N=(N=N+P+y(H=H+I|0,I)|0)+j+y(H=H+K|0,K)|0,t[D]=N,t[D+1]=H}for(var C=0;C<160;C+=2){N=t[C],H=t[C+1];var U=c(r,n,i),B=c(M,v,T),W=f(r,M),z=f(M,r),q=h(o,S),G=h(S,o),J=s[C],V=s[C+1],Z=d(o,u,b),Q=d(S,L,A),X=E+G|0,$=g+q+y(X,E)|0;$=($=($=$+Z+y(X=X+Q|0,Q)|0)+J+y(X=X+V|0,V)|0)+N+y(X=X+H|0,H)|0;var ee=z+B|0,te=W+U+y(ee,z)|0;g=b,E=A,b=u,A=L,u=o,L=S,o=a+$+y(S=w+X|0,w)|0,a=i,w=T,i=n,T=v,n=r,v=M,r=$+te+y(M=X+ee|0,X)|0}this._al=this._al+M|0,this._bl=this._bl+v|0,this._cl=this._cl+T|0,this._dl=this._dl+w|0,this._el=this._el+S|0,this._fl=this._fl+L|0,this._gl=this._gl+A|0,this._hl=this._hl+E|0,this._ah=this._ah+r+y(this._al,M)|0,this._bh=this._bh+n+y(this._bl,v)|0,this._ch=this._ch+i+y(this._cl,T)|0,this._dh=this._dh+a+y(this._dl,w)|0,this._eh=this._eh+o+y(this._el,S)|0,this._fh=this._fh+u+y(this._fl,L)|0,this._gh=this._gh+b+y(this._gl,A)|0,this._hh=this._hh+g+y(this._hl,E)|0},u.prototype._hash=function(){var e=a.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},function(e,t,r){e.exports=i;var n=r(13).EventEmitter;function i(){n.call(this)}r(1)(i,n),i.Readable=r(37),i.Writable=r(380),i.Duplex=r(381),i.Transform=r(382),i.PassThrough=r(383),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function a(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",a),e._isStdio||t&&!1===t.end||(r.on("end",o),r.on("close",u));var s=!1;function o(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function d(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",i),e.removeListener("drain",a),r.removeListener("end",o),r.removeListener("close",u),r.removeListener("error",d),e.removeListener("error",d),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",d),e.on("error",d),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},function(e,t,r){"use strict";(function(t,n){var i=r(38);e.exports=g;var a,s=r(373);g.ReadableState=b;r(13).EventEmitter;var o=function(e,t){return e.listeners(t).length},u=r(238),d=r(54).Buffer,c=(void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var f=Object.create(r(29));f.inherits=r(1);var h=r(374),l=void 0;l=h&&h.debuglog?h.debuglog("stream"):function(){};var p,_=r(375),m=r(239);f.inherits(g,u);var y=["error","close","destroy","pause","resume"];function b(e,t){e=e||{};var n=t instanceof(a=a||r(15));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new _,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=r(14).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function g(e){if(a=a||r(15),!(this instanceof g))return new g(e);this._readableState=new b(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function M(e,t,r,n,i){var a,s=e._readableState;null===t?(s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,w(e)}(e,s)):(i||(a=function(e,t){var r;n=t,d.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(s,t)),a?e.emit("error",a):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===d.prototype||(t=function(e){return d.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):v(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?v(e,s,t,!1):L(e,s)):v(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(s)}function v(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&w(e)),L(e,t)}Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),g.prototype.destroy=m.destroy,g.prototype._undestroy=m.undestroy,g.prototype._destroy=function(e,t){this.push(null),t(e)},g.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=d.from(e,t),t=""),r=!0),M(this,e,t,!1,r)},g.prototype.unshift=function(e){return M(this,e,null,!0,!1)},g.prototype.isPaused=function(){return!1===this._readableState.flowing},g.prototype.setEncoding=function(e){return p||(p=r(14).StringDecoder),this._readableState.decoder=new p(e),this._readableState.encoding=e,this};function T(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function w(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(l("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(S,e):S(e))}function S(e){l("emit readable"),e.emit("readable"),k(e)}function L(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(A,e,t))}function A(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(l("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function E(e){l("readable nexttick read 0"),e.read(0)}function D(e,t){t.reading||(l("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),k(e),t.flowing&&!t.reading&&e.read(0)}function k(e){var t=e._readableState;for(l("flow",t.flowing);t.flowing&&null!==e.read(););}function Y(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var a=r.data,s=e>a.length?a.length:e;if(s===a.length?i+=a:i+=a.slice(0,e),0===(e-=s)){s===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=d.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var a=n.data,s=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,s),0===(e-=s)){s===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(s));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function O(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(F,t,e))}function F(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}g.prototype.read=function(e){l("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return l("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?O(this):w(this),null;if(0===(e=T(e,t))&&t.ended)return 0===t.length&&O(this),null;var n,i=t.needReadable;return l("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&l("length less than watermark",i=!0),t.ended||t.reading?l("reading or ended",i=!1):i&&(l("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=T(r,t))),null===(n=e>0?Y(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&O(this)),null!==n&&this.emit("data",n),n},g.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(e,t){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,l("pipe count=%d opts=%j",a.pipesCount,t);var u=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:g;function d(t,n){l("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,l("cleanup"),e.removeListener("close",y),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",m),e.removeListener("unpipe",d),r.removeListener("end",c),r.removeListener("end",g),r.removeListener("data",_),h=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function c(){l("onend"),e.end()}a.endEmitted?i.nextTick(u):r.once("end",u),e.on("unpipe",d);var f=function(e){return function(){var t=e._readableState;l("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,k(e))}}(r);e.on("drain",f);var h=!1;var p=!1;function _(t){l("ondata"),p=!1,!1!==e.write(t)||p||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==P(a.pipes,e))&&!h&&(l("false write response, pause",a.awaitDrain),a.awaitDrain++,p=!0),r.pause())}function m(t){l("onerror",t),g(),e.removeListener("error",m),0===o(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",b),g()}function b(){l("onfinish"),e.removeListener("close",y),g()}function g(){l("unpipe"),r.unpipe(e)}return r.on("data",_),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",y),e.once("finish",b),e.emit("pipe",r),a.flowing||(l("pipe resume"),r.resume()),e},g.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var s=P(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},g.prototype.on=function(e,t){var r=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&w(this):i.nextTick(E,this))}return r},g.prototype.addListener=g.prototype.on,g.prototype.resume=function(){var e=this._readableState;return e.flowing||(l("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}(this,e)),this},g.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this},g.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(l("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(l("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<y.length;a++)e.on(y[a],this.emit.bind(this,y[a]));return this._read=function(t){l("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(g.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),g._fromList=Y}).call(this,r(5),r(4))},function(e,t,r){e.exports=r(13).EventEmitter},function(e,t,r){"use strict";var n=r(38);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,e)):n.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,r){"use strict";e.exports=s;var n=r(15),i=Object.create(r(29));function a(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);n.call(this,e),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",o)}function o(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=r(1),i.inherits(s,n),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},function(e,t,r){"use strict";var n=r(1),i=r(384),a=r(12),s=r(2).Buffer,o=r(385),u=r(217),d=r(50),c=s.alloc(128);function f(e,t){a.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var r="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>r)?t=("rmd160"===e?new u:d(e)).update(t).digest():t.length<r&&(t=s.concat([t,c],r));for(var n=this._ipad=s.allocUnsafe(r),i=this._opad=s.allocUnsafe(r),o=0;o<r;o++)n[o]=54^t[o],i[o]=92^t[o];this._hash="rmd160"===e?new u:d(e),this._hash.update(n)}n(f,a),f.prototype._update=function(e){this._hash.update(e)},f.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new u:d(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new f("rmd160",t):"md5"===e?new i(o,t):new f(e,t)}},function(e){e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},function(e,t,r){"use strict";t.pbkdf2=r(387),t.pbkdf2Sync=r(246)},function(e,t,r){"use strict";var n=Math.pow(2,30)-1;e.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>n||t!=t)throw new TypeError("Bad key length")}},function(e,t,r){"use strict";(function(t,r){var n;if(t.process&&t.process.browser)n="utf-8";else if(t.process&&t.process.version){n=parseInt(r.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else n="utf-8";e.exports=n}).call(this,r(5),r(4))},function(e,t,r){"use strict";var n=r(388),i=r(390),a=r(50),s=r(2).Buffer,o=r(244),u=r(245),d=r(247),c=s.alloc(128),f={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},h={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function l(e){return(new i).update(e).digest()}function p(e,t,r){var i=function(e){return"rmd160"===e||"ripemd160"===e?l:"md5"===e?n:function(t){return a(e).update(t).digest()}}(e),o="sha512"===e||"sha384"===e?128:64;t.length>o?t=i(t):t.length<o&&(t=s.concat([t,c],o));for(var u=s.allocUnsafe(o+f[e]),d=s.allocUnsafe(o+f[e]),h=0;h<o;h++)u[h]=54^t[h],d[h]=92^t[h];var p=s.allocUnsafe(o+r+4);u.copy(p,0,0,o),this.ipad1=p,this.ipad2=u,this.opad=d,this.alg=e,this.blocksize=o,this.hash=i,this.size=f[e]}p.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(e,t,r,n,i){o(r,n),e=d(e,u,"Password"),t=d(t,u,"Salt");var a=(i||"sha1").toLowerCase(),c=h[a]||a,l=f[c];if("number"!=typeof l||!l)throw new TypeError("Digest algorithm not supported: "+i);var _=new p(c,e,t.length),m=s.allocUnsafe(n),y=s.allocUnsafe(t.length+4);t.copy(y,0,0,t.length);for(var b=0,g=l,M=Math.ceil(n/g),v=1;v<=M;v++){y.writeUInt32BE(v,t.length);for(var T=_.run(y,_.ipad1),w=T,S=1;S<r;S++){w=_.run(w,_.ipad2);for(var L=0;L<g;L++)T[L]^=w[L]}T.copy(m,b),b+=g}return m}},function(e,t,r){"use strict";var n=r(2).Buffer,i=r(224),a="undefined"!=typeof Uint8Array,s=a&&"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView;e.exports=function(e,t,r){if("string"==typeof e||n.isBuffer(e)||a&&e instanceof Uint8Array||s&&s(e))return i(e,t);throw new TypeError(r+" must be a string, a Buffer, a Uint8Array, or a DataView")}},function(e,t,r){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,a=0,s=6;s>=0;s-=2){for(var o=0;o<=24;o+=8)i<<=1,i|=t>>>o+s&1;for(o=0;o<=24;o+=8)i<<=1,i|=e>>>o+s&1}for(s=6;s>=0;s-=2){for(o=1;o<=25;o+=8)a<<=1,a|=t>>>o+s&1;for(o=1;o<=25;o+=8)a<<=1,a|=e>>>o+s&1}r[n+0]=i>>>0,r[n+1]=a>>>0},t.rip=function(e,t,r,n){for(var i=0,a=0,s=0;s<4;s++)for(var o=24;o>=0;o-=8)i<<=1,i|=t>>>o+s&1,i<<=1,i|=e>>>o+s&1;for(s=4;s<8;s++)for(o=24;o>=0;o-=8)a<<=1,a|=t>>>o+s&1,a<<=1,a|=e>>>o+s&1;r[n+0]=i>>>0,r[n+1]=a>>>0},t.pc1=function(e,t,r,n){for(var i=0,a=0,s=7;s>=5;s--){for(var o=0;o<=24;o+=8)i<<=1,i|=t>>o+s&1;for(o=0;o<=24;o+=8)i<<=1,i|=e>>o+s&1}for(o=0;o<=24;o+=8)i<<=1,i|=t>>o+s&1;for(s=1;s<=3;s++){for(o=0;o<=24;o+=8)a<<=1,a|=t>>o+s&1;for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+s&1}for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+s&1;r[n+0]=i>>>0,r[n+1]=a>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,r,i){for(var a=0,s=0,o=n.length>>>1,u=0;u<o;u++)a<<=1,a|=e>>>n[u]&1;for(u=o;u<n.length;u++)s<<=1,s|=t>>>n[u]&1;r[i+0]=a>>>0,r[i+1]=s>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var a=23;a>=15;a-=4)n<<=6,n|=e>>>a&63;for(a=11;a>=3;a-=4)i|=e>>>a&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(e>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(t>>>18-6*n&63)]}return r>>>0};var a=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r<a.length;r++)t<<=1,t|=e>>>a[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length<t;)n="0"+n;for(var i=[],a=0;a<t;a+=r)i.push(n.slice(a,a+r));return i.join(" ")}},function(e,t,r){"use strict";var n=r(8),i=r(1),a=r(248),s=r(56);function o(){this.tmp=new Array(2),this.keys=null}function u(e){s.call(this,e);var t=new o;this._desState=t,this.deriveKeys(t,e.key)}i(u,s),e.exports=u,u.create=function(e){return new u(e)};var d=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var r=a.readUInt32BE(t,0),i=a.readUInt32BE(t,4);a.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var s=0;s<e.keys.length;s+=2){var o=d[s>>>1];r=a.r28shl(r,o),i=a.r28shl(i,o),a.pc2(r,i,e.keys,s)}},u.prototype._update=function(e,t,r,n){var i=this._desState,s=a.readUInt32BE(e,t),o=a.readUInt32BE(e,t+4);a.ip(s,o,i.tmp,0),s=i.tmp[0],o=i.tmp[1],"encrypt"===this.type?this._encrypt(i,s,o,i.tmp,0):this._decrypt(i,s,o,i.tmp,0),s=i.tmp[0],o=i.tmp[1],a.writeUInt32BE(r,s,n),a.writeUInt32BE(r,o,n+4)},u.prototype._pad=function(e,t){if(!1===this.padding)return!1;for(var r=e.length-t,n=t;n<e.length;n++)e[n]=r;return!0},u.prototype._unpad=function(e){if(!1===this.padding)return e;for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)n.equal(e[r],t);return e.slice(0,e.length-t)},u.prototype._encrypt=function(e,t,r,n,i){for(var s=t,o=r,u=0;u<e.keys.length;u+=2){var d=e.keys[u],c=e.keys[u+1];a.expand(o,e.tmp,0),d^=e.tmp[0],c^=e.tmp[1];var f=a.substitute(d,c),h=o;o=(s^a.permute(f))>>>0,s=h}a.rip(o,s,n,i)},u.prototype._decrypt=function(e,t,r,n,i){for(var s=r,o=t,u=e.keys.length-2;u>=0;u-=2){var d=e.keys[u],c=e.keys[u+1];a.expand(s,e.tmp,0),d^=e.tmp[0],c^=e.tmp[1];var f=a.substitute(d,c),h=s;s=(o^a.permute(f))>>>0,o=h}a.rip(s,o,n,i)}},function(e,t,r){var n=r(30),i=r(2).Buffer,a=r(251);function s(e){var t=e._cipher.encryptBlockRaw(e._prev);return a(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),a=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var o=0;o<r;o++){var u=s(e),d=a+16*o;e._cache.writeUInt32BE(u[0],d+0),e._cache.writeUInt32BE(u[1],d+4),e._cache.writeUInt32BE(u[2],d+8),e._cache.writeUInt32BE(u[3],d+12)}var c=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,c)}},function(e,t){e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},function(e){e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},function(e,t,r){var n=r(39),i=r(2).Buffer,a=r(12),s=r(1),o=r(404),u=r(30),d=r(251);function c(e,t,r,s){a.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(t);var c=this._cipher.encryptBlock(u);this._ghash=new o(c),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new o(r),a=t.length,s=a%16;n.update(t),s&&(s=16-s,n.update(i.alloc(s,0))),n.update(i.alloc(8,0));var u=8*a,c=i.alloc(8);c.writeUIntBE(u,0,8),n.update(c),e._finID=n.state;var f=i.from(e._finID);return d(f),f}(this,r,c),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}s(c,a),c.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},c.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i<n;++i)r+=e[i]^t[i];return r}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},c.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},c.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},c.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=c},function(e,t,r){var n=r(39),i=r(2).Buffer,a=r(12);function s(e,t,r,s){a.call(this),this._cipher=new n.AES(t),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=e}r(1)(s,a),s.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},e.exports=s},function(e,t,r){var n=r(18);e.exports=b,b.simpleSieve=m,b.fermatTest=y;var i=r(7),a=new i(24),s=new(r(256)),o=new i(1),u=new i(2),d=new i(5),c=(new i(16),new i(8),new i(10)),f=new i(3),h=(new i(7),new i(11)),l=new i(4),p=(new i(12),null);function _(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<t&&e[i]<=n&&r%e[i]!=0;i++);t!==i&&e[i]<=n||(e[t++]=r)}return p=e,e}function m(e){for(var t=_(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function y(e){var t=i.mont(e);return 0===u.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function b(e,t){if(e<16)return new i(2===t||5===t?[140,123]:[140,39]);var r,p;for(t=new i(t);;){for(r=new i(n(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(o),r.testn(1)||r.iadd(u),t.cmp(u)){if(!t.cmp(d))for(;r.mod(c).cmp(f);)r.iadd(l)}else for(;r.mod(a).cmp(h);)r.iadd(l);if(m(p=r.shrn(1))&&m(r)&&y(p)&&y(r)&&s.test(p)&&s.test(r))return r}}},function(e,t,r){var n=r(7),i=r(59);function a(e){this.rand=e||new i.Rand}e.exports=a,a.create=function(e){return new a(e)},a.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},a.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},a.prototype.test=function(e,t,r){var i=e.bitLength(),a=n.mont(e),s=new n(1).toRed(a);t||(t=Math.max(1,i/48|0));for(var o=e.subn(1),u=0;!o.testn(u);u++);for(var d=e.shrn(u),c=o.toRed(a);t>0;t--){var f=this._randrange(new n(2),o);r&&r(f);var h=f.toRed(a).redPow(d);if(0!==h.cmp(s)&&0!==h.cmp(c)){for(var l=1;l<u;l++){if(0===(h=h.redSqr()).cmp(s))return!1;if(0===h.cmp(c))break}if(l===u)return!1}}return!0},a.prototype.getDivisor=function(e,t){var r=e.bitLength(),i=n.mont(e),a=new n(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var s=e.subn(1),o=0;!s.testn(o);o++);for(var u=e.shrn(o),d=s.toRed(i);t>0;t--){var c=this._randrange(new n(2),s),f=e.gcd(c);if(0!==f.cmpn(1))return f;var h=c.toRed(i).redPow(u);if(0!==h.cmp(a)&&0!==h.cmp(d)){for(var l=1;l<o;l++){if(0===(h=h.redSqr()).cmp(a))return h.fromRed().subn(1).gcd(e);if(0===h.cmp(d))break}if(l===o)return(h=h.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},function(e,t,r){"use strict";var n=t;function i(e){return 1===e.length?"0"+e:e}function a(e){for(var t="",r=0;r<e.length;r++)t+=i(e[r].toString(16));return t}n.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),a=i>>8,s=255&i;a?r.push(a,s):r.push(s)}return r},n.zero2=i,n.toHex=a,n.encode=function(e,t){return"hex"===t?a(e):e}},function(e,t,r){"use strict";var n=t;n.base=r(41),n.short=r(417),n.mont=r(418),n.edwards=r(419)},function(e,t,r){"use strict";var n=r(11).rotr32;function i(e,t,r){return e&t^~e&r}function a(e,t,r){return e&t^e&r^t&r}function s(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?s(t,r,n):2===e?a(t,r,n):void 0},t.ch32=i,t.maj32=a,t.p32=s,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=r(11),i=r(31),a=r(259),s=r(8),o=n.sum32,u=n.sum32_4,d=n.sum32_5,c=a.ch32,f=a.maj32,h=a.s0_256,l=a.s1_256,p=a.g0_256,_=a.g1_256,m=i.BlockHash,y=[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];function b(){if(!(this instanceof b))return new b;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(b,m),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=u(_(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],a=this.h[1],m=this.h[2],y=this.h[3],b=this.h[4],g=this.h[5],M=this.h[6],v=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var T=d(v,l(b),c(b,g,M),this.k[n],r[n]),w=o(h(i),f(i,a,m));v=M,M=g,g=b,b=o(y,T),y=m,m=a,a=i,i=o(T,w)}this.h[0]=o(this.h[0],i),this.h[1]=o(this.h[1],a),this.h[2]=o(this.h[2],m),this.h[3]=o(this.h[3],y),this.h[4]=o(this.h[4],b),this.h[5]=o(this.h[5],g),this.h[6]=o(this.h[6],M),this.h[7]=o(this.h[7],v)},b.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(e,t,r){"use strict";var n=r(11),i=r(31),a=r(8),s=n.rotr64_hi,o=n.rotr64_lo,u=n.shr64_hi,d=n.shr64_lo,c=n.sum64,f=n.sum64_hi,h=n.sum64_lo,l=n.sum64_4_hi,p=n.sum64_4_lo,_=n.sum64_5_hi,m=n.sum64_5_lo,y=i.BlockHash,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function g(){if(!(this instanceof g))return new g;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function M(e,t,r,n,i){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function v(e,t,r,n,i,a){var s=t&n^~t&a;return s<0&&(s+=4294967296),s}function T(e,t,r,n,i){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function w(e,t,r,n,i,a){var s=t&n^t&a^n&a;return s<0&&(s+=4294967296),s}function S(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function L(e,t){var r=o(e,t,28)^o(t,e,2)^o(t,e,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function E(e,t){var r=o(e,t,14)^o(e,t,18)^o(t,e,9);return r<0&&(r+=4294967296),r}function D(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function k(e,t){var r=o(e,t,1)^o(e,t,8)^d(e,t,7);return r<0&&(r+=4294967296),r}function Y(e,t){var r=s(e,t,19)^s(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}function O(e,t){var r=o(e,t,19)^o(t,e,29)^d(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(g,y),e.exports=g,g.blockSize=1024,g.outSize=512,g.hmacStrength=192,g.padLength=128,g.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=Y(r[n-4],r[n-3]),a=O(r[n-4],r[n-3]),s=r[n-14],o=r[n-13],u=D(r[n-30],r[n-29]),d=k(r[n-30],r[n-29]),c=r[n-32],f=r[n-31];r[n]=l(i,a,s,o,u,d,c,f),r[n+1]=p(i,a,s,o,u,d,c,f)}},g.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],s=this.h[2],o=this.h[3],u=this.h[4],d=this.h[5],l=this.h[6],p=this.h[7],y=this.h[8],b=this.h[9],g=this.h[10],D=this.h[11],k=this.h[12],Y=this.h[13],O=this.h[14],F=this.h[15];a(this.k.length===r.length);for(var P=0;P<r.length;P+=2){var I=O,R=F,x=A(y,b),j=E(y,b),K=M(y,b,g,D,k),H=v(y,b,g,D,k,Y),N=this.k[P],C=this.k[P+1],U=r[P],B=r[P+1],W=_(I,R,x,j,K,H,N,C,U,B),z=m(I,R,x,j,K,H,N,C,U,B);I=S(n,i),R=L(n,i),x=T(n,i,s,o,u),j=w(n,i,s,o,u,d);var q=f(I,R,x,j),G=h(I,R,x,j);O=k,F=Y,k=g,Y=D,g=y,D=b,y=f(l,p,W,z),b=h(p,p,W,z),l=u,p=d,u=s,d=o,s=n,o=i,n=f(W,z,q,G),i=h(W,z,q,G)}c(this.h,0,n,i),c(this.h,2,s,o),c(this.h,4,u,d),c(this.h,6,l,p),c(this.h,8,y,b),c(this.h,10,g,D),c(this.h,12,k,Y),c(this.h,14,O,F)},g.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(434).Buffer}catch(e){}function o(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function u(e,t,r){var n=o(e,r);return r-1>=t&&(n|=o(e,r-1)<<4),n}function d(e,t,r,i){for(var a=0,s=0,o=Math.min(e.length,r),u=t;u<o;u++){var d=e.charCodeAt(u)-48;a*=i,s=d>=49?d-49+10:d>=17?d-17+10:d,n(d>=0&&s<i,"Invalid character"),a+=s}return a}function c(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,s,o=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this._strip()},a.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,a=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=u(e,t,n)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;this._strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,s=a%n,o=Math.min(a,a-s)+r,u=0,c=r;c<o;c+=n)u=d(e,c,c+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=d(e,c,e.length,t),c=0;c<s;c++)f*=t;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype._move=function(e){c(e,this)},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(e){a.prototype.inspect=f}else a.prototype.inspect=f;function f(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,a=0,s=0;s<this.length;s++){var o=this.words[s],u=(16777215&(o<<i|a)).toString(16);a=o>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==a||s!==this.length-1?h[6-u.length]+u+r:u+r}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=l[e],c=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var _=f.modrn(c).toString(e);r=(f=f.idivn(c)).isZero()?_+r:h[d-_.length]+_+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16,2)},s&&(a.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function _(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],s=i*a,o=67108863&s,u=s/67108864|0;r.words[0]=o;for(var d=1;d<n;d++){for(var c=u>>>26,f=67108863&u,h=Math.min(d,t.length-1),l=Math.max(0,d-e.length+1);l<=h;l++){var p=d-l|0;c+=(s=(i=0|e.words[p])*(a=0|t.words[l])+f)/67108864|0,f=67108863&s}r.words[d]=0|f,u=0|c}return 0!==u?r.words[d]=0|u:r.length--,r._strip()}a.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,a);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},a.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,a=0;i<this.length;i++){var s=this.words[i]<<a|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===a?(r<e.length&&(e[r++]=s>>24&255),n=0,a=0):(n=s>>>24,a+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},a.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,a=0;i<this.length;i++){var s=this.words[i]<<a|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===a?(r>=0&&(e[r--]=s>>24&255),n=0,a=0):(n=s>>>24,a+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},a.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},a.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},a.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},a.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a<n.length;a++)t=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<r.length;a++)t=(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,s=0;s<n.length;s++)a=(t=(0|r.words[s])-(0|n.words[s])+a)>>26,this.words[s]=67108863&t;for(;0!==a&&s<r.length;s++)a=(t=(0|r.words[s])+a)>>26,this.words[s]=67108863&t;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,r){var n,i,a,s=e.words,o=t.words,u=r.words,d=0,c=0|s[0],f=8191&c,h=c>>>13,l=0|s[1],p=8191&l,_=l>>>13,m=0|s[2],y=8191&m,b=m>>>13,g=0|s[3],M=8191&g,v=g>>>13,T=0|s[4],w=8191&T,S=T>>>13,L=0|s[5],A=8191&L,E=L>>>13,D=0|s[6],k=8191&D,Y=D>>>13,O=0|s[7],F=8191&O,P=O>>>13,I=0|s[8],R=8191&I,x=I>>>13,j=0|s[9],K=8191&j,H=j>>>13,N=0|o[0],C=8191&N,U=N>>>13,B=0|o[1],W=8191&B,z=B>>>13,q=0|o[2],G=8191&q,J=q>>>13,V=0|o[3],Z=8191&V,Q=V>>>13,X=0|o[4],$=8191&X,ee=X>>>13,te=0|o[5],re=8191&te,ne=te>>>13,ie=0|o[6],ae=8191&ie,se=ie>>>13,oe=0|o[7],ue=8191&oe,de=oe>>>13,ce=0|o[8],fe=8191&ce,he=ce>>>13,le=0|o[9],pe=8191&le,_e=le>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(d+(n=Math.imul(f,C))|0)+((8191&(i=(i=Math.imul(f,U))+Math.imul(h,C)|0))<<13)|0;d=((a=Math.imul(h,U))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,C),i=(i=Math.imul(p,U))+Math.imul(_,C)|0,a=Math.imul(_,U);var ye=(d+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,z)|0)+Math.imul(h,W)|0))<<13)|0;d=((a=a+Math.imul(h,z)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,C),i=(i=Math.imul(y,U))+Math.imul(b,C)|0,a=Math.imul(b,U),n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,z)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,z)|0;var be=(d+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(h,G)|0))<<13)|0;d=((a=a+Math.imul(h,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(M,C),i=(i=Math.imul(M,U))+Math.imul(v,C)|0,a=Math.imul(v,U),n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,z)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,z)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(_,G)|0,a=a+Math.imul(_,J)|0;var ge=(d+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,Q)|0)+Math.imul(h,Z)|0))<<13)|0;d=((a=a+Math.imul(h,Q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(w,C),i=(i=Math.imul(w,U))+Math.imul(S,C)|0,a=Math.imul(S,U),n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,z)|0)+Math.imul(v,W)|0,a=a+Math.imul(v,z)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,G)|0,a=a+Math.imul(b,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(_,Z)|0,a=a+Math.imul(_,Q)|0;var Me=(d+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(h,$)|0))<<13)|0;d=((a=a+Math.imul(h,ee)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(A,C),i=(i=Math.imul(A,U))+Math.imul(E,C)|0,a=Math.imul(E,U),n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,z)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,z)|0,n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(v,G)|0,a=a+Math.imul(v,J)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(b,Z)|0,a=a+Math.imul(b,Q)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,ee)|0;var ve=(d+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(h,re)|0))<<13)|0;d=((a=a+Math.imul(h,ne)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(k,C),i=(i=Math.imul(k,U))+Math.imul(Y,C)|0,a=Math.imul(Y,U),n=n+Math.imul(A,W)|0,i=(i=i+Math.imul(A,z)|0)+Math.imul(E,W)|0,a=a+Math.imul(E,z)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(S,G)|0,a=a+Math.imul(S,J)|0,n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,Q)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,$)|0,a=a+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(_,re)|0,a=a+Math.imul(_,ne)|0;var Te=(d+(n=n+Math.imul(f,ae)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(h,ae)|0))<<13)|0;d=((a=a+Math.imul(h,se)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(F,C),i=(i=Math.imul(F,U))+Math.imul(P,C)|0,a=Math.imul(P,U),n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,z)|0)+Math.imul(Y,W)|0,a=a+Math.imul(Y,z)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(E,G)|0,a=a+Math.imul(E,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(S,Z)|0,a=a+Math.imul(S,Q)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(b,re)|0,a=a+Math.imul(b,ne)|0,n=n+Math.imul(p,ae)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(_,ae)|0,a=a+Math.imul(_,se)|0;var we=(d+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(h,ue)|0))<<13)|0;d=((a=a+Math.imul(h,de)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(R,C),i=(i=Math.imul(R,U))+Math.imul(x,C)|0,a=Math.imul(x,U),n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,z)|0)+Math.imul(P,W)|0,a=a+Math.imul(P,z)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(Y,G)|0,a=a+Math.imul(Y,J)|0,n=n+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,Q)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(v,re)|0,a=a+Math.imul(v,ne)|0,n=n+Math.imul(y,ae)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,se)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(_,ue)|0,a=a+Math.imul(_,de)|0;var Se=(d+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,he)|0)+Math.imul(h,fe)|0))<<13)|0;d=((a=a+Math.imul(h,he)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(K,C),i=(i=Math.imul(K,U))+Math.imul(H,C)|0,a=Math.imul(H,U),n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,z)|0)+Math.imul(x,W)|0,a=a+Math.imul(x,z)|0,n=n+Math.imul(F,G)|0,i=(i=i+Math.imul(F,J)|0)+Math.imul(P,G)|0,a=a+Math.imul(P,J)|0,n=n+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(Y,Z)|0,a=a+Math.imul(Y,Q)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(M,ae)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,se)|0,n=n+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,de)|0)+Math.imul(b,ue)|0,a=a+Math.imul(b,de)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(_,fe)|0,a=a+Math.imul(_,he)|0;var Le=(d+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,_e)|0)+Math.imul(h,pe)|0))<<13)|0;d=((a=a+Math.imul(h,_e)|0)+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,n=Math.imul(K,W),i=(i=Math.imul(K,z))+Math.imul(H,W)|0,a=Math.imul(H,z),n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,J)|0)+Math.imul(x,G)|0,a=a+Math.imul(x,J)|0,n=n+Math.imul(F,Z)|0,i=(i=i+Math.imul(F,Q)|0)+Math.imul(P,Z)|0,a=a+Math.imul(P,Q)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(Y,$)|0,a=a+Math.imul(Y,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,n=n+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(v,ue)|0,a=a+Math.imul(v,de)|0,n=n+Math.imul(y,fe)|0,i=(i=i+Math.imul(y,he)|0)+Math.imul(b,fe)|0,a=a+Math.imul(b,he)|0;var Ae=(d+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,_e)|0)+Math.imul(_,pe)|0))<<13)|0;d=((a=a+Math.imul(_,_e)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(K,G),i=(i=Math.imul(K,J))+Math.imul(H,G)|0,a=Math.imul(H,J),n=n+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(x,Z)|0,a=a+Math.imul(x,Q)|0,n=n+Math.imul(F,$)|0,i=(i=i+Math.imul(F,ee)|0)+Math.imul(P,$)|0,a=a+Math.imul(P,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(Y,re)|0,a=a+Math.imul(Y,ne)|0,n=n+Math.imul(A,ae)|0,i=(i=i+Math.imul(A,se)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,se)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(S,ue)|0,a=a+Math.imul(S,de)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,he)|0)+Math.imul(v,fe)|0,a=a+Math.imul(v,he)|0;var Ee=(d+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,_e)|0)+Math.imul(b,pe)|0))<<13)|0;d=((a=a+Math.imul(b,_e)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(K,Z),i=(i=Math.imul(K,Q))+Math.imul(H,Z)|0,a=Math.imul(H,Q),n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(x,$)|0,a=a+Math.imul(x,ee)|0,n=n+Math.imul(F,re)|0,i=(i=i+Math.imul(F,ne)|0)+Math.imul(P,re)|0,a=a+Math.imul(P,ne)|0,n=n+Math.imul(k,ae)|0,i=(i=i+Math.imul(k,se)|0)+Math.imul(Y,ae)|0,a=a+Math.imul(Y,se)|0,n=n+Math.imul(A,ue)|0,i=(i=i+Math.imul(A,de)|0)+Math.imul(E,ue)|0,a=a+Math.imul(E,de)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(S,fe)|0,a=a+Math.imul(S,he)|0;var De=(d+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,_e)|0)+Math.imul(v,pe)|0))<<13)|0;d=((a=a+Math.imul(v,_e)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(K,$),i=(i=Math.imul(K,ee))+Math.imul(H,$)|0,a=Math.imul(H,ee),n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(x,re)|0,a=a+Math.imul(x,ne)|0,n=n+Math.imul(F,ae)|0,i=(i=i+Math.imul(F,se)|0)+Math.imul(P,ae)|0,a=a+Math.imul(P,se)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(Y,ue)|0,a=a+Math.imul(Y,de)|0,n=n+Math.imul(A,fe)|0,i=(i=i+Math.imul(A,he)|0)+Math.imul(E,fe)|0,a=a+Math.imul(E,he)|0;var ke=(d+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,_e)|0)+Math.imul(S,pe)|0))<<13)|0;d=((a=a+Math.imul(S,_e)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(K,re),i=(i=Math.imul(K,ne))+Math.imul(H,re)|0,a=Math.imul(H,ne),n=n+Math.imul(R,ae)|0,i=(i=i+Math.imul(R,se)|0)+Math.imul(x,ae)|0,a=a+Math.imul(x,se)|0,n=n+Math.imul(F,ue)|0,i=(i=i+Math.imul(F,de)|0)+Math.imul(P,ue)|0,a=a+Math.imul(P,de)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,he)|0)+Math.imul(Y,fe)|0,a=a+Math.imul(Y,he)|0;var Ye=(d+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,_e)|0)+Math.imul(E,pe)|0))<<13)|0;d=((a=a+Math.imul(E,_e)|0)+(i>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,n=Math.imul(K,ae),i=(i=Math.imul(K,se))+Math.imul(H,ae)|0,a=Math.imul(H,se),n=n+Math.imul(R,ue)|0,i=(i=i+Math.imul(R,de)|0)+Math.imul(x,ue)|0,a=a+Math.imul(x,de)|0,n=n+Math.imul(F,fe)|0,i=(i=i+Math.imul(F,he)|0)+Math.imul(P,fe)|0,a=a+Math.imul(P,he)|0;var Oe=(d+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,_e)|0)+Math.imul(Y,pe)|0))<<13)|0;d=((a=a+Math.imul(Y,_e)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(K,ue),i=(i=Math.imul(K,de))+Math.imul(H,ue)|0,a=Math.imul(H,de),n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,he)|0)+Math.imul(x,fe)|0,a=a+Math.imul(x,he)|0;var Fe=(d+(n=n+Math.imul(F,pe)|0)|0)+((8191&(i=(i=i+Math.imul(F,_e)|0)+Math.imul(P,pe)|0))<<13)|0;d=((a=a+Math.imul(P,_e)|0)+(i>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(K,fe),i=(i=Math.imul(K,he))+Math.imul(H,fe)|0,a=Math.imul(H,he);var Pe=(d+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,_e)|0)+Math.imul(x,pe)|0))<<13)|0;d=((a=a+Math.imul(x,_e)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ie=(d+(n=Math.imul(K,pe))|0)+((8191&(i=(i=Math.imul(K,_e))+Math.imul(H,pe)|0))<<13)|0;return d=((a=Math.imul(H,_e))+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,u[0]=me,u[1]=ye,u[2]=be,u[3]=ge,u[4]=Me,u[5]=ve,u[6]=Te,u[7]=we,u[8]=Se,u[9]=Le,u[10]=Ae,u[11]=Ee,u[12]=De,u[13]=ke,u[14]=Ye,u[15]=Oe,u[16]=Fe,u[17]=Pe,u[18]=Ie,0!==d&&(u[19]=d,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var s=i;i=0;for(var o=67108863&n,u=Math.min(a,t.length-1),d=Math.max(0,a-e.length+1);d<=u;d++){var c=a-d,f=(0|e.words[c])*(0|t.words[d]),h=67108863&f;o=67108863&(h=h+o|0),i+=(s=(s=s+(f/67108864|0)|0)+(h>>>26)|0)>>>26,s&=67108863}r.words[a]=o,n=s,s=i}return 0!==n?r.words[a]=n:r.length--,r._strip()}function b(e,t,r){return y(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(m=_),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?_(this,e,t):r<1024?y(this,e,t):b(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},g.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},g.prototype.permute=function(e,t,r,n,i,a){for(var s=0;s<a;s++)n[s]=t[e[s]],i[s]=r[e[s]]},g.prototype.transform=function(e,t,r,n,i,a){this.permute(a,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var o=s<<1,u=Math.cos(2*Math.PI/o),d=Math.sin(2*Math.PI/o),c=0;c<i;c+=o)for(var f=u,h=d,l=0;l<s;l++){var p=r[c+l],_=n[c+l],m=r[c+l+s],y=n[c+l+s],b=f*m-h*y;y=f*y+h*m,m=b,r[c+l]=p+m,n[c+l]=_+y,r[c+l+s]=p-m,n[c+l+s]=_-y,l!==o&&(b=u*f-d*h,h=u*h+d*f,f=b)}},g.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},g.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},g.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},g.prototype.convert13b=function(e,t,r,i){for(var a=0,s=0;s<t;s++)a+=0|e[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===a),n(0==(-8192&a))},g.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},g.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),a=this.stub(n),s=new Array(n),o=new Array(n),u=new Array(n),d=new Array(n),c=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,d,n),this.transform(s,a,o,u,n,i),this.transform(d,a,c,f,n,i);for(var l=0;l<n;l++){var p=o[l]*c[l]-u[l]*f[l];u[l]=o[l]*f[l]+u[l]*c[l],o[l]=p}return this.conjugate(o,u,n),this.transform(o,u,h,a,n,i),this.conjugate(h,a,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),b(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var a=(0|this.words[i])*e,s=(67108863&a)+(67108863&r);r>>=26,r+=a/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),this.length=0===e?1:this.length,t?this.ineg():this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var o=this.words[t]&a,u=(0|this.words[t])-o<<r;this.words[t]=u|s,s=o>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},a.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<<a,u=r;if(i-=s,i=Math.max(0,i),u){for(var d=0;d<s;d++)u.words[d]=this.words[d];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,d=0;d<this.length;d++)this.words[d]=this.words[d+s];else this.words[0]=0,this.length=1;var c=0;for(d=this.length-1;d>=0&&(0!==c||d>=i);d--){var f=0|this.words[d];this.words[d]=c<<26-a|f>>>a,c=f&o}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r)&&!!(this.words[r]&i)},a.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var i,a,s=e.length+r;this._expand(s);var o=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+o;var u=(0|e.words[i])*t;o=((a-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)o=(a=(0|this.words[i+r])+o)>>26,this.words[i+r]=67108863&a;if(0===o)return this._strip();for(n(-1===o),o=0,i=0;i<this.length;i++)o=(a=-(0|this.words[i])+o)>>26,this.words[i]=67108863&a;return this.negative=1,this._strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var o,u=n.length-i.length;if("mod"!==t){(o=new a(null)).length=u+1,o.words=new Array(o.length);for(var d=0;d<o.length;d++)o.words[d]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,o&&(o.words[u]=1));for(var f=u-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/s|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);o&&(o.words[f]=h)}return o&&o._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:o||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(i=o.div.neg()),{div:i,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,o},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,a=this.length-1;a>=0;a--)i=(r*i+(0|this.words[a]))%e;return t?-i:i},a.prototype.modn=function(e){return this.modrn(e)},a.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var a=(0|this.words[i])+67108864*r;this.words[i]=a/e|0,r=a%e}return this._strip(),t?this.ineg():this},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),s=new a(0),o=new a(0),u=new a(1),d=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++d;for(var c=r.clone(),f=t.clone();!t.isZero();){for(var h=0,l=1;0==(t.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,_=1;0==(r.words[0]&_)&&p<26;++p,_<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(c),u.isub(f)),o.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(o),s.isub(u)):(r.isub(t),o.isub(i),u.isub(s))}return{a:o,b:u,gcd:r.iushln(d)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new a(1),o=new a(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var d=0,c=1;0==(t.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(t.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(o)):(r.isub(t),o.isub(s))}return(i=0===t.cmpn(1)?s:o).cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new A(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var M={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function T(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function L(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},i(T,v),T.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,n=10;n<e.length;n++){var a=0|e.words[n];e.words[n-10]=(4194303&a)<<4|i>>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},T.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(w,v),i(S,v),i(L,v),L.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(M[e])return M[e];var t;if("k256"===e)t=new T;else if("p224"===e)t=new w;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new L}return M[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var o=new a(1).toRed(this),u=o.redNeg(),d=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,d).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),h=this.pow(e,i.addn(1).iushrn(1)),l=this.pow(e,i),p=s;0!==l.cmp(o);){for(var _=l,m=0;0!==_.cmp(o);m++)_=_.redSqr();n(m<p);var y=this.pow(f,new a(1).iushln(p-m-1));h=h.redMul(y),f=y.redSqr(),l=l.redMul(f),p=m}return h},A.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},A.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,o=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var d=t.words[n],c=u-1;c>=0;c--){var f=d>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4===++o||0===n&&0===c)&&(i=this.mul(i,r[s]),o=0,s=0)):o=0}u=26}return i},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new E(e)},i(E,A),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(34)(e))},function(e,t,r){var n=r(1),i=r(33).Reporter,a=r(3).Buffer;function s(e,t){i.call(this,t),a.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function o(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof o||(e=new o(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=a.byteLength(e);else{if(!a.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(s,i),t.DecoderBuffer=s,s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(e){var t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=o,o.prototype.join=function(e,t){return e||(e=new a(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):a.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},function(e,t,r){var n=t;n._reverse=function(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t},n.der=r(440)},function(e,t,r){var n=r(1),i=r(32),a=i.base,s=i.bignum,o=i.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new d,this.tree._init(e.body)}function d(e){a.Node.call(this,"der",e)}function c(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=o.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){var a=r;for(r=0;128==(128&a);){if(a=e.readUInt8(t),e.isError(a))return a;r<<=7,r|=127&a}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:o.tag[r]}}function f(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var a=0;a<i;a++){n<<=8;var s=e.readUInt8(r);if(e.isError(s))return s;n|=s}return n}e.exports=u,u.prototype.decode=function(e,t){return e instanceof a.DecoderBuffer||(e=new a.DecoderBuffer(e,t)),this.tree._decode(e,t)},n(d,a.Node),d.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;var n=e.save(),i=c(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(n),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||r)},d.prototype._decodeTag=function(e,t,r){var n=c(e,'Failed to decode tag of "'+t+'"');if(e.isError(n))return n;var i=f(e,n.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!r&&n.tag!==t&&n.tagStr!==t&&n.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(n.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');var a=e.save(),s=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(s)?s:(i=e.offset-a.offset,e.restore(a),e.skip(i,'Failed to match body of: "'+t+'"'))},d.prototype._skipUntilEnd=function(e,t){for(;;){var r=c(e,t);if(e.isError(r))return r;var n,i=f(e,r.primitive,t);if(e.isError(i))return i;if(n=r.primitive||null!==i?e.skip(i):this._skipUntilEnd(e,t),e.isError(n))return n;if("end"===r.tagStr)break}},d.prototype._decodeList=function(e,t,r,n){for(var i=[];!e.isEmpty();){var a=this._peekTag(e,"end");if(e.isError(a))return a;var s=r.decode(e,"der",n);if(e.isError(s)&&a)break;i.push(s)}return i},d.prototype._decodeStr=function(e,t){if("bitstr"===t){var r=e.readUInt8();return e.isError(r)?r:{unused:r,data:e.raw()}}if("bmpstr"===t){var n=e.raw();if(n.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var i="",a=0;a<n.length/2;a++)i+=String.fromCharCode(n.readUInt16BE(2*a));return i}if("numstr"===t){var s=e.raw().toString("ascii");return this._isNumstr(s)?s:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var o=e.raw().toString("ascii");return this._isPrintstr(o)?o:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},d.prototype._decodeObjid=function(e,t,r){for(var n,i=[],a=0;!e.isEmpty();){var s=e.readUInt8();a<<=7,a|=127&s,0==(128&s)&&(i.push(a),a=0)}128&s&&i.push(a);var o=i[0]/40|0,u=i[0]%40;if(n=r?i:[o,u].concat(i.slice(1)),t){var d=t[n.join(" ")];void 0===d&&(d=t[n.join(".")]),void 0!==d&&(n=d)}return n},d.prototype._decodeTime=function(e,t){var r=e.raw().toString();if("gentime"===t)var n=0|r.slice(0,4),i=0|r.slice(4,6),a=0|r.slice(6,8),s=0|r.slice(8,10),o=0|r.slice(10,12),u=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),a=0|r.slice(4,6),s=0|r.slice(6,8),o=0|r.slice(8,10),u=0|r.slice(10,12);n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,a,s,o,u,0)},d.prototype._decodeNull=function(e){return null},d.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},d.prototype._decodeInt=function(e,t){var r=e.raw(),n=new s(r);return t&&(n=t[n.toString(10)]||n),n},d.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},function(e,t,r){var n=r(1),i=r(3).Buffer,a=r(32),s=a.base,o=a.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new d,this.tree._init(e.body)}function d(e){s.Node.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=u,u.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(d,s.Node),d.prototype._encodeComposite=function(e,t,r,n){var a,s=function(e,t,r,n){var i;"seqof"===e?e="seq":"setof"===e&&(e="set");if(o.tagByName.hasOwnProperty(e))i=o.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}if(i>=31)return n.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=o.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(n.length<128)return(a=new i(2))[0]=s,a[1]=n.length,this._createEncoderBuffer([a,n]);for(var u=1,d=n.length;d>=256;d>>=8)u++;(a=new i(2+u))[0]=s,a[1]=128|u;d=1+u;for(var c=n.length;c>0;d--,c>>=8)a[d]=255&c;return this._createEncoderBuffer([a,n])},d.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new i(2*e.length),n=0;n<e.length;n++)r.writeUInt16BE(e.charCodeAt(n),2*n);return this._createEncoderBuffer(r)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},d.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var n=0;n<e.length;n++)e[n]|=0}else if(Array.isArray(e)){e=e.slice();for(n=0;n<e.length;n++)e[n]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var a=0;for(n=0;n<e.length;n++){var s=e[n];for(a++;s>=128;s>>=7)a++}var o=new i(a),u=o.length-1;for(n=e.length-1;n>=0;n--){s=e[n];for(o[u--]=127&s;(s>>=7)>0;)o[u--]=128|127&s}return this._createEncoderBuffer(o)},d.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[c(n.getFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[c(n.getFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},d.prototype._encodeNull=function(){return this._createEncoderBuffer("")},d.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new i(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var a=new i(n);return e.copy(a),0===e.length&&(a[0]=0),this._createEncoderBuffer(a)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var s=e;s>=256;s>>=8)n++;for(s=(a=new Array(n)).length-1;s>=0;s--)a[s]=255&e,e>>=8;return 128&a[0]&&a.unshift(0),this._createEncoderBuffer(new i(a))},d.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},d.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},d.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var a=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),a.length!==i.defaultBuffer.length)return!1;for(n=0;n<a.length;n++)if(a[n]!==i.defaultBuffer[n])return!1;return!0}},function(e){e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},function(e,t,r){var n=r(25),i=r(2).Buffer;function a(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var r,s=i.alloc(0),o=0;s.length<t;)r=a(o++),s=i.concat([s,n("sha1").update(e).update(r).digest()]);return s.slice(0,t)}},function(e,t){e.exports=function(e,t){for(var r=e.length,n=-1;++n<r;)e[n]^=t[n];return e}},function(e,t,r){var n=r(7),i=r(2).Buffer;e.exports=function(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.providers=t.easy=t.init=t.api=t.API=t.data=t.random=t.ver=void 0;const i=r(272),a=n(r(273));t.random=a.default;const s=n(r(16));t.data=s.default;const o=n(r(275));t.API=o.default;const u=n(r(43));t.easy=u.default;const d=n(r(287)),c=n(r(306)),f=n(r(309)),h=n(r(310)),l=n(r(311)),p=n(r(313)),_=n(r(314)),m=n(r(315)),y=n(r(316)),b=n(r(454));let g;t.api=g;t.init=(e,r,n,i=!0,a="en")=>{s.default.initialised||(t.api=g=new o.default({url:e,xApiKey:r,token:n},a,i)),s.default.initialised=!0};const M={yelp:void 0,gyg:void 0,bb:void 0,travelify:void 0,viator:void 0,rezdy:void 0,videreo:void 0,toristy:void 0,victory:void 0,radialStorage:void 0,yelpInit:(e,t,r,n,i="en")=>{M.yelp=new d.default(e,t,r,n,i)},gygInit:(e,t,r,n,i="en",a="USD")=>{M.gyg=new c.default(e,t,r,n,i,a)},bbInit:(e,t,r,n)=>(M.bb=new f.default(e,r,n),M.bb.login(t)),travelifyInit:(e,t,r,n,i="en",a)=>{M.travelify=new h.default(e,t,r,n,i,a)},viatorInit:(e,t,r,n,i="en")=>{M.viator=new l.default(e,t,r,n,i)},rezdyInit:(e,t,r)=>{M.rezdy=new p.default(e,t,r)},videreoInit:(e,t)=>{M.videreo=new _.default(e,t)},toristyInit:(e,t,r)=>{M.toristy=new m.default(e,t,r)},victoryInit:(e,t,r,n)=>{M.victory=new y.default(e,t,r,n)},radialStorageInit:()=>{M.radialStorage=new b.default}};t.providers=M;const v=i.version;t.ver=v},function(e){e.exports=JSON.parse('{"name":"@tripian/core","version":"9.1.91","description":"Tripian Inc Web SDK","main":"index.js","types":"index.d.ts","scripts":{"webp":"npx webpack --mode production","webpdev":"npx webpack --mode development","webpumd":"npx webpack --mode production --config webpack.config.umd.js --env.mode=production","webpumddev":"npx webpack --mode development --config webpack.config.umd.js --env.mode=development","wp16":"yarn webp && yarn webpumd","wp":"export NODE_OPTIONS=--openssl-legacy-provider && yarn webp && yarn webpumd","wpdev":"yarn webpdev && yarn webpumddev","test":"yarn jest","test-prod":"yarn jestprodddd TODO","doc":"yarn typedoc","npm":"cd dist && npm publish --access public && cd .."},"dependencies":{"adyen-encryption":"^0.1.1","axios":"^0.27.2","cross-fetch":"^3.1.6","moment":"^2.29.0"},"devDependencies":{"@babel/cli":"^7.7.7","@babel/core":"^7.7.7","@babel/preset-env":"^7.7.7","@babel/preset-typescript":"^7.10.4","@tripian/eslint-config-tripian":"^1.1.0","@types/jest":"^26.0.24","@types/node":"^13.13.52","@types/npm":"^2.0.32","@typescript-eslint/eslint-plugin":"^2.34.0","babel-jest":"^24.9.0","babel-loader":"^8.3.0","eslint":"^6.8.0","eslint-config-airbnb":"^18.2.1","eslint-config-airbnb-typescript":"^6.3.2","eslint-config-prettier":"^6.15.0","eslint-plugin-import":"^2.20.0","eslint-plugin-jest":"^23.20.0","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-prettier":"^3.4.1","eslint-plugin-react":"^7.17.0","eslint-plugin-react-hooks":"^2.5.1","jest":"^24.9.0","prettier":"^1.19.1","ts-loader":"8.4.0","typedoc":"^0.19.2","typedoc-plugin-external-module-name":"^4.0.3","typescript":"^4.9.5","webpack":"^4.47.0","webpack-cli":"^3.3.12"},"keywords":["tripian","core","web sdk"],"repository":{"type":"git","url":"git+https://github.com/Tripian-inc/ui-tripian-core.git"},"author":"Penguen Umut","license":"MIT","bugs":{"url":"https://github.com/Tripian-inc/ui-tripian-core/issues"},"homepage":"https://tripian-inc.github.io/ui-tripian-core/globals.html","eslintConfig":{"extends":"@tripian/eslint-config-tripian"},"prettier":"@tripian/eslint-config-tripian/prettier.js"}')},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(24)),a=n(r(0));class s{constructor(){}}s.random=e=>e[Math.floor(e.length*Math.random())],s.randomCoordinate=()=>({lat:Math.floor(9e7*Math.random())/1e6*(Math.random()<.5?1:-1),lng:Math.floor(18e7*Math.random())/1e6*(Math.random()<.5?1:-1)}),s.randomAdultCount=()=>1+Math.floor(12*Math.random()),s.randomChildrenCount=()=>Math.floor(12*Math.random()),s.randomAdultAge=()=>18+Math.floor(97*Math.random()),s.randomChildAge=()=>Math.floor(17*Math.random()),s.randomAnswers=()=>{const e=[5,6,16,18,27,35,12,13,25,32,33,34,9,10,22,40,1,2,41,46,47,49,43,44,45],t=Math.floor(e.length-1*Math.random())+1,r=[];for(let n=0;n<t;n+=1){const t=e[Math.floor(e.length*Math.random())];r.includes(t)||r.push(t)}return r},s.randomUsername=()=>"Uu"+Math.random().toString(36).substring(7),s.addDays=(e,t)=>new Date(e.valueOf()+864e5*t),s.extend2Chars=e=>2===e.toString().length?e.toString():"0"+e.toString(),s.randomDateRange=()=>{const e=1+Math.floor(30*Math.random());let t=new Date;t=s.addDays(t,e);let r=new Date;return r=s.addDays(r,e+1+Math.floor(13*Math.random())),{arrivalDate:`${t.getFullYear()}-${s.extend2Chars((t.getMonth()+1).toString())}-${s.extend2Chars(t.getDate().toString())}`,departureDate:`${r.getFullYear()}-${s.extend2Chars((r.getMonth()+1).toString())}-${s.extend2Chars(r.getDate().toString())}`}},s.randomTime=()=>s.extend2Chars(Math.floor(24*Math.random()).toString())+":00",s.randomTimeRange=()=>{const e=Math.floor(12*Math.random()),t=12+Math.floor(12*Math.random());return{startTime:s.extend2Chars(e.toString())+":00",endTime:s.extend2Chars(t.toString())+":00"}},s.randomOrder=e=>{const t=[...e],r=[];for(;0!==t.length;){const e=Math.floor(Math.random()*t.length);r.push(t[e]),t.splice(e,1)}return r},s.randomNewCompanion=(e=[43,44,45])=>({title:"Family member",name:Math.random().toString(36).substring(7),answers:e,age:1+Math.floor(114*Math.random())}),s.randomTripProfile=(e=109)=>({cityId:e,arrivalDatetime:(0,a.default)(new Date).add(1,"days").set({hour:9,minute:0}).format("YYYY-MM-DDTHH:mm:ss[Z]"),departureDatetime:(0,a.default)(new Date).add(4,"days").set({hour:18,minute:0}).format("YYYY-MM-DDTHH:mm:ss[Z]"),numberOfAdults:1+Math.floor(19*Math.random()),numberOfChildren:Math.floor(20*Math.random()),answers:[],companionIds:[],excludeHash:[],doNotGenerate:0}),s.randomNewUserReservation=(e,t)=>({key:"Reservation1",value:{},provider:"Provider"+Math.random().toString(36).substring(7),tripHash:t,poiId:e}),s.randomPassword=()=>"pass"+Math.random().toString(36).substring(4),s.randomUser=(e=[1,2,41])=>({firstName:"FirstName"+Math.random().toString(36).substring(7),lastName:"LastName"+Math.random().toString(36).substring(7),answers:e}),s.randomUserPassword=()=>({password:"pass"+Math.random().toString(36).substring(4)}),s.randomNewUser=()=>({firstName:"FirstName"+Math.random().toString(36).substring(7),lastName:"LastName"+Math.random().toString(36).substring(7),password:"pass"+Math.random().toString(36).substring(4),email:s.randomUsername()+"@gmail.com"}),s.randomOffer=e=>{const t=(0,a.default)(new Date).add(1,"days").set({hour:9,minute:0}).format("YYYY-MM-DD HH:mm"),r=(0,a.default)(new Date).add(2,"days").set({hour:18,minute:0}).format("YYYY-MM-DD HH:mm");return{cityId:e,title:"string",description:"string",currency:i.default.OFFER_CURRENCY.CAD,status:i.default.OFFER_STATUS.ACTIVE,threshold:1,discount:10,discountedProductCount:0,quantity:55,productName:"lahmacun",timeframe:{start:t,end:r,blackouts:[],recurrent:[]},imageUrl:"https://poi-pics.s3-eu-west-1.amazonaws.com/Place/108/556400/8dd63d2cb1568dd3c93864b08fdb0aa7.jpg",productTypeId:1,offerType:i.default.OFFER_TYPE.PERCENTAGE}},t.default=s},function(e,t,r){var n={"./af":64,"./af.js":64,"./ar":65,"./ar-dz":66,"./ar-dz.js":66,"./ar-kw":67,"./ar-kw.js":67,"./ar-ly":68,"./ar-ly.js":68,"./ar-ma":69,"./ar-ma.js":69,"./ar-ps":70,"./ar-ps.js":70,"./ar-sa":71,"./ar-sa.js":71,"./ar-tn":72,"./ar-tn.js":72,"./ar.js":65,"./az":73,"./az.js":73,"./be":74,"./be.js":74,"./bg":75,"./bg.js":75,"./bm":76,"./bm.js":76,"./bn":77,"./bn-bd":78,"./bn-bd.js":78,"./bn.js":77,"./bo":79,"./bo.js":79,"./br":80,"./br.js":80,"./bs":81,"./bs.js":81,"./ca":82,"./ca.js":82,"./cs":83,"./cs.js":83,"./cv":84,"./cv.js":84,"./cy":85,"./cy.js":85,"./da":86,"./da.js":86,"./de":87,"./de-at":88,"./de-at.js":88,"./de-ch":89,"./de-ch.js":89,"./de.js":87,"./dv":90,"./dv.js":90,"./el":91,"./el.js":91,"./en-au":92,"./en-au.js":92,"./en-ca":93,"./en-ca.js":93,"./en-gb":94,"./en-gb.js":94,"./en-ie":95,"./en-ie.js":95,"./en-il":96,"./en-il.js":96,"./en-in":97,"./en-in.js":97,"./en-nz":98,"./en-nz.js":98,"./en-sg":99,"./en-sg.js":99,"./eo":100,"./eo.js":100,"./es":101,"./es-do":102,"./es-do.js":102,"./es-mx":103,"./es-mx.js":103,"./es-us":104,"./es-us.js":104,"./es.js":101,"./et":105,"./et.js":105,"./eu":106,"./eu.js":106,"./fa":107,"./fa.js":107,"./fi":108,"./fi.js":108,"./fil":109,"./fil.js":109,"./fo":110,"./fo.js":110,"./fr":111,"./fr-ca":112,"./fr-ca.js":112,"./fr-ch":113,"./fr-ch.js":113,"./fr.js":111,"./fy":114,"./fy.js":114,"./ga":115,"./ga.js":115,"./gd":116,"./gd.js":116,"./gl":117,"./gl.js":117,"./gom-deva":118,"./gom-deva.js":118,"./gom-latn":119,"./gom-latn.js":119,"./gu":120,"./gu.js":120,"./he":121,"./he.js":121,"./hi":122,"./hi.js":122,"./hr":123,"./hr.js":123,"./hu":124,"./hu.js":124,"./hy-am":125,"./hy-am.js":125,"./id":126,"./id.js":126,"./is":127,"./is.js":127,"./it":128,"./it-ch":129,"./it-ch.js":129,"./it.js":128,"./ja":130,"./ja.js":130,"./jv":131,"./jv.js":131,"./ka":132,"./ka.js":132,"./kk":133,"./kk.js":133,"./km":134,"./km.js":134,"./kn":135,"./kn.js":135,"./ko":136,"./ko.js":136,"./ku":137,"./ku-kmr":138,"./ku-kmr.js":138,"./ku.js":137,"./ky":139,"./ky.js":139,"./lb":140,"./lb.js":140,"./lo":141,"./lo.js":141,"./lt":142,"./lt.js":142,"./lv":143,"./lv.js":143,"./me":144,"./me.js":144,"./mi":145,"./mi.js":145,"./mk":146,"./mk.js":146,"./ml":147,"./ml.js":147,"./mn":148,"./mn.js":148,"./mr":149,"./mr.js":149,"./ms":150,"./ms-my":151,"./ms-my.js":151,"./ms.js":150,"./mt":152,"./mt.js":152,"./my":153,"./my.js":153,"./nb":154,"./nb.js":154,"./ne":155,"./ne.js":155,"./nl":156,"./nl-be":157,"./nl-be.js":157,"./nl.js":156,"./nn":158,"./nn.js":158,"./oc-lnc":159,"./oc-lnc.js":159,"./pa-in":160,"./pa-in.js":160,"./pl":161,"./pl.js":161,"./pt":162,"./pt-br":163,"./pt-br.js":163,"./pt.js":162,"./ro":164,"./ro.js":164,"./ru":165,"./ru.js":165,"./sd":166,"./sd.js":166,"./se":167,"./se.js":167,"./si":168,"./si.js":168,"./sk":169,"./sk.js":169,"./sl":170,"./sl.js":170,"./sq":171,"./sq.js":171,"./sr":172,"./sr-cyrl":173,"./sr-cyrl.js":173,"./sr.js":172,"./ss":174,"./ss.js":174,"./sv":175,"./sv.js":175,"./sw":176,"./sw.js":176,"./ta":177,"./ta.js":177,"./te":178,"./te.js":178,"./tet":179,"./tet.js":179,"./tg":180,"./tg.js":180,"./th":181,"./th.js":181,"./tk":182,"./tk.js":182,"./tl-ph":183,"./tl-ph.js":183,"./tlh":184,"./tlh.js":184,"./tr":185,"./tr.js":185,"./tzl":186,"./tzl.js":186,"./tzm":187,"./tzm-latn":188,"./tzm-latn.js":188,"./tzm.js":187,"./ug-cn":189,"./ug-cn.js":189,"./uk":190,"./uk.js":190,"./ur":191,"./ur.js":191,"./uz":192,"./uz-latn":193,"./uz-latn.js":193,"./uz.js":192,"./vi":194,"./vi.js":194,"./x-pseudo":195,"./x-pseudo.js":195,"./yo":196,"./yo.js":196,"./zh-cn":197,"./zh-cn.js":197,"./zh-hk":198,"./zh-hk.js":198,"./zh-mo":199,"./zh-mo.js":199,"./zh-tw":200,"./zh-tw.js":200};function i(e){var t=a(e);return r(t)}function a(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=a,e.exports=i,i.id=274},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=a(r(24)),u=s(r(0)),d=s(r(276)),c=s(r(44)),f=s(r(43)),h=s(r(284)),l=r(285),p=s(r(286)),_=async(e=750)=>new Promise(t=>setTimeout(()=>t(!0),e));t.default=class{constructor(e,t,r){this.getToken=()=>this.xhr.getToken(),this.setToken=e=>this.xhr.setToken(e),this.removeToken=()=>this.xhr.removeToken(),this.setLang=e=>{this.lang=e,this.xhr.setLang(e)},this.configList=()=>this.xhr.req(c.default.CONFIG.METHOD)(c.default.CONFIG.PATH,c.default.CONFIG.DATA_KEY),this.citiesPage=async(e,t=1e3)=>this.xhr.reqWithPage(c.default.CITIES.METHOD)(c.default.CITIES.PATH,c.default.CITIES.DATA_KEY,{limit:t,page:e}),this.citiesAll=async()=>{var e,t;if(!this.forceRequest){const e=h.default.cities(this.lang);if(e)return Promise.resolve(e)}let r=[],n=0,i=!1;for(;!i;){n+=1;const a=await this.citiesPage(n);r=r.concat(a.data),a.pagination&&(null===(e=a.pagination)||void 0===e?void 0:e.currentPage)===(null===(t=a.pagination)||void 0===t?void 0:t.totalPages)&&(i=!0)}return Promise.resolve(r)},this.city=async e=>{if(!this.forceRequest){const t=h.default.city(this.lang,e);if(t)return Promise.resolve(t)}return this.xhr.req(c.default.CITY.METHOD)(f.default.setParameterId(c.default.CITY.PATH,e,"cityId"),c.default.CITY.DATA_KEY)},this.cityInfo=async e=>{if(!this.forceRequest){const t=h.default.cityInfo(this.lang,e);if(t)return Promise.resolve(t)}return this.xhr.req(c.default.CITY_INFO.METHOD)(f.default.setParameterId(c.default.CITY_INFO.PATH,e,"cityId"),c.default.CITY_INFO.DATA_KEY)},this.cityEvents=async e=>{if(!this.forceRequest){const t=h.default.citiesEvents(this.lang,e);if(t)return Promise.resolve(t)}return this.xhr.req(c.default.CITY_EVENTS.METHOD)(f.default.setParameterId(c.default.CITY_EVENTS.PATH,e,"cityId"),c.default.CITY_EVENTS.DATA_KEY)},this.citiesSearch=async e=>this.xhr.req(c.default.CITIES.METHOD)(c.default.CITIES.PATH,c.default.CITIES.DATA_KEY,{search:e}),this.suggestCity=async e=>this.xhr.req(c.default.SUGGEST_CITY.METHOD)(c.default.SUGGEST_CITY.PATH,c.default.SUGGEST_CITY.DATA_KEY,{text:e}),this.poiCategories=async(e=100,t=2)=>{if(!this.forceRequest){const e=h.default.poiCategories(this.lang);if(e)return e}return this.xhr.req(c.default.POI_CATEGORIES.METHOD)(c.default.POI_CATEGORIES.PATH,c.default.POI_CATEGORIES.DATA_KEY,{version:t,limit:e})},this.poisSearch=async e=>this.xhr.reqWithPage(c.default.POIS.METHOD)(c.default.POIS.PATH,c.default.POIS.DATA_KEY,{...e,withOffers:e.withOffers}),this.poisNameSearch=async({cityId:e,search:t,poiCategories:r,showOffersOnly:n=!0,showBookingsOnly:i=!1,limit:a=100,page:s=1})=>{if(!this.forceRequest&&""===t&&r&&r.length>0&&1===s){const t=h.default.poisAll(this.lang,e||0,r,Number(n),Number(i));if(t)return Promise.resolve(t)}return this.poisSearch({cityId:e,search:t,poiCategories:r,withOffers:Number(n),limit:a,page:s}).then(e=>({...e,data:e.data.filter(e=>e.status)}))},this.poisOpenSearch=async({cityId:e,search:t,poiCategories:r,showOffersOnly:n,showBookingsOnly:i,limit:a=100,page:s=1})=>{if(!this.forceRequest&&""===t&&r&&r.length>0&&1===s){const t=h.default.poisAll(this.lang,e||0,r,Number(n),Number(i));if(t)return Promise.resolve(t)}return this.xhr.reqWithPage(c.default.POIS.METHOD)(c.default.POIS_OPEN_SEARCH.PATH,c.default.POIS_OPEN_SEARCH.DATA_KEY,{cityId:e,search:t,poiCategories:r,showOffersOnly:Number(n),withBookings:Number(i),limit:a,page:s})},this.poisSearchAutoComplete=async()=>this.xhr.req(c.default.POIS_SEARCH_AUTO_COMPLETE.METHOD)(c.default.POIS_SEARCH_AUTO_COMPLETE.PATH,c.default.POIS_SEARCH_AUTO_COMPLETE.DATA_KEY).then(e=>e),this.poisSearchAutoCompleteTags=async(e,t)=>{if(!this.forceRequest&&t&&t.length>0){const r=h.default.autoCompleteTagsAll(this.lang,e||0,t);if(r)return Promise.resolve(r)}return this.xhr.req(c.default.POIS_SEARCH_AUTO_COMPLETE_TAGS.METHOD)(c.default.POIS_SEARCH_AUTO_COMPLETE_TAGS.PATH,c.default.POIS_SEARCH_AUTO_COMPLETE_TAGS.DATA_KEY,{cityId:e,poiCategories:t||void 0}).then(e=>e)},this.poisCoordinateSearch=async({poiCategories:e,coordinate:t,distance:r,bounds:n,showOffersOnly:i,limit:a})=>this.poisSearch({poiCategories:e,coordinate:t,distance:r,bounds:n,withOffers:Number(i),limit:a}).then(e=>e.data),this.poisMustTrySearch=async({cityId:e,mustTryIds:t,limit:r=100})=>this.poisSearch({cityId:e,mustTryIds:t,limit:r}).then(e=>e.data.filter(e=>e.status)),this.pois=async(e,t,r,n=!1)=>{const i=o.helper.removeDuplicateValues(e,(e,t)=>e===t);if(!this.forceRequest&&!n){const e=h.default.pois(this.lang,t,i);if(e)return Promise.resolve(e)}return this.poisSearch({poiIds:i.join(","),withOffers:t,cityId:r}).then(e=>e.data)},this.poi=async(e,t=1)=>{if(!this.forceRequest){const t=h.default.poi(this.lang,e);if(t)return Promise.resolve(t)}return this.xhr.req(c.default.POI.METHOD)(f.default.setParameterId(c.default.POI.PATH,e,"poiId"),c.default.POI.DATA_KEY,{withOffers:t})},this.customPois=async e=>this.xhr.req(c.default.CUSTOM_POIS.METHOD)(c.default.CUSTOM_POIS.PATH,c.default.CUSTOM_POIS.DATA_KEY,{search:e}),this.topTen=(e,t)=>{if(!this.forceRequest){const t=h.default.topTen(this.lang,e);if(t)return Promise.resolve(t)}return this.xhr.req(c.default.TOP_TEN.METHOD)(c.default.TOP_TEN.PATH,c.default.TOP_TEN.DATA_KEY,{cityId:e,poiCategories:t})},this.register=async e=>this.xhr.req(c.default.REGISTER.METHOD)(c.default.REGISTER.PATH,c.default.REGISTER.DATA_KEY,e),this.loginGuest=async e=>this.xhr.req(c.default.LOGIN_GUEST.METHOD)(c.default.LOGIN_GUEST.PATH,c.default.LOGIN_GUEST.DATA_KEY,{email:e+"@tripianguest.com",password:"tripian123."}),this.login=async e=>this.xhr.req(c.default.LOGIN.METHOD)(c.default.LOGIN.PATH,c.default.LOGIN.DATA_KEY,e),this.loginEmail=async(e,t,r)=>this.login({email:e,password:t,business:r}),this.loginCognito=async(e,t,r)=>this.xhr.req(c.default.LOGIN_COGNITO.METHOD)(c.default.LOGIN_COGNITO.PATH,c.default.LOGIN_COGNITO.DATA_KEY,{code:e,redirectUrl:t,device:r}),this.logout=()=>{this.removeToken(),(0,p.default)()},this.lightRegisterLogin=async e=>this.xhr.req(c.default.LIGHT_REGISTER_LOGIN.METHOD)(c.default.LIGHT_REGISTER_LOGIN.PATH,c.default.LIGHT_REGISTER_LOGIN.DATA_KEY,{uniqueId:e}),this.lightLoginHash=async e=>this.xhr.req(c.default.LIGHT_HASH_LOGIN.METHOD)(c.default.LIGHT_HASH_LOGIN.PATH,c.default.LIGHT_HASH_LOGIN.DATA_KEY,{tripHash:e}),this.refreshToken=async(e=!1)=>{const t=this.xhr.getToken();if(t){const r=f.default.parseToken(t);if(r){if(e)return this.xhr.req(c.default.REFRESH_TOKEN.METHOD)(c.default.REFRESH_TOKEN.PATH,c.default.REFRESH_TOKEN.DATA_KEY,{refreshToken:t.refreshToken}).then(e=>{const r={...e,refreshToken:t.refreshToken};return this.setToken(r),setTimeout(()=>{this.refreshToken(!0)},354e4),r});const n=f.default.accessTokenExpSecond(r);if(n>360)return setTimeout(()=>{this.refreshToken(!0)},1e3*(n-60)),new Promise(e=>e(t));const{refreshToken:i}=t;if(f.default.refreshTokenExpSecond(r)>86400)return this.xhr.req(c.default.REFRESH_TOKEN.METHOD)(c.default.REFRESH_TOKEN.PATH,c.default.REFRESH_TOKEN.DATA_KEY,{refreshToken:i}).then(e=>{const t={...e,refreshToken:i};return this.setToken(t),setTimeout(()=>{this.refreshToken(!0)},354e4),t});throw new Error("Tcore refresh token expired")}throw new Error("Tcore doesn't have a valid token object")}throw new Error("Tcore doesn't have a token object")},this.user=async(e=this.forceRequest)=>{if(!e){const e=h.default.user();if(e)return Promise.resolve(e)}return this.xhr.req(c.default.USER.METHOD)(c.default.USER.PATH,c.default.USER.DATA_KEY)},this.userUpdate=async e=>this.xhr.req(c.default.USER_UPDATE.METHOD)(c.default.USER_UPDATE.PATH,c.default.USER_UPDATE.DATA_KEY,{...e}),this.userDelete=async()=>this.xhr.req(c.default.USER_DELETE.METHOD)(c.default.USER_DELETE.PATH,c.default.USER_DELETE.DATA_KEY).then(e=>(this.removeToken(),(0,p.default)(),e)),this.userResetPassword=async(e,t)=>this.xhr.req(c.default.USER_RESET_PASSWORD.METHOD)(c.default.USER_RESET_PASSWORD.PATH,c.default.USER_UPDATE.DATA_KEY,{email:e,resetPasswordUrl:t}),this.userUpdatePassword=async(e,t)=>this.xhr.req(c.default.USER_UPDATE_PASSWORD.METHOD)(c.default.USER_UPDATE_PASSWORD.PATH,c.default.USER_UPDATE_PASSWORD.DATA_KEY,{password:e,hash:t}),this.notifications=async()=>this.xhr.req(c.default.NOTIFICATIONS.METHOD)(c.default.NOTIFICATIONS.PATH,c.default.NOTIFICATIONS.DATA_KEY).then(e=>e),this.notificationsUnseen=async()=>this.xhr.req(c.default.NOTIFICATIONS_UNSEEN.METHOD)(c.default.NOTIFICATIONS_UNSEEN.PATH,c.default.NOTIFICATIONS_UNSEEN.DATA_KEY).then(e=>e),this.notificationsUpdateUnseen=async()=>this.xhr.req(c.default.NOTIFICATIONS_UPDATE_UNSEEN.METHOD)(c.default.NOTIFICATIONS_UPDATE_UNSEEN.PATH,c.default.NOTIFICATIONS_UPDATE_UNSEEN.DATA_KEY),this.notificationsSettings=async()=>this.xhr.req(c.default.NOTIFICATIONS_SETTINGS.METHOD)(c.default.NOTIFICATIONS_SETTINGS.PATH,c.default.NOTIFICATIONS_SETTINGS.DATA_KEY).then(e=>e),this.notificationsUpdateSettings=async(e,t)=>this.xhr.req(c.default.NOTIFICATIONS_UPDATE_SETTINGS.METHOD)(c.default.NOTIFICATIONS_UPDATE_SETTINGS.PATH,c.default.NOTIFICATIONS_UPDATE_SETTINGS.DATA_KEY,{settingId:e,checked:t}).then(e=>e),this.companions=async(e=this.forceRequest)=>{if(!e){const e=h.default.companions(this.lang);if(e)return Promise.resolve(e)}return this.xhr.reqWithPage(c.default.COMPANIONS.METHOD)(c.default.COMPANIONS.PATH,c.default.COMPANIONS.DATA_KEY,{limit:100}).then(e=>e.data)},this.companionAdd=async e=>this.xhr.req(c.default.COMPANION_ADD.METHOD)(c.default.COMPANION_ADD.PATH,c.default.COMPANION_ADD.DATA_KEY,{...e}),this.companionUpdate=async e=>this.xhr.req(c.default.COMPANION_UPDATE.METHOD)(f.default.setParameterId(c.default.COMPANION_UPDATE.PATH,e.id,"companionId"),c.default.COMPANION_UPDATE.DATA_KEY,{title:e.title,name:e.name,answers:e.answers,age:e.age}),this.companionDelete=async e=>this.xhr.req(c.default.COMPANION_DELETE.METHOD)(f.default.setParameterId(c.default.COMPANION_DELETE.PATH,e,"companionId"),c.default.COMPANION_DELETE.DATA_KEY).then(e=>e.recordId),this.favorites=async e=>{if(!this.forceRequest&&e){const t=h.default.favorites(this.lang,e);if(t)return Promise.resolve(t)}return this.xhr.reqWithPage(c.default.FAVORITES.METHOD)(c.default.FAVORITES.PATH,c.default.FAVORITES.DATA_KEY,{cityId:e}).then(e=>e.data)},this.favoriteAdd=async(e,t)=>this.xhr.req(c.default.FAVORITE_ADD.METHOD)(c.default.FAVORITE_ADD.PATH,c.default.FAVORITE_ADD.DATA_KEY,{poiId:e,tripHash:t}),this.favoriteDelete=async e=>this.xhr.req(c.default.FAVORITE_DELETE.METHOD)(f.default.setParameterId(c.default.FAVORITE_DELETE.PATH,e,"favoriteId"),c.default.FAVORITE_DELETE.DATA_KEY).then(e=>e.recordId),this.reactions=async(e,t,r=1)=>{if(!this.forceRequest){const t=h.default.userReactions(this.lang,e);if(t)return Promise.resolve(t)}return this.xhr.reqWithPage(c.default.REACTIONS.METHOD)(c.default.REACTIONS.PATH,c.default.REACTIONS.DATA_KEY,{reaction:t,tripHash:e,page:r,limit:100}).then(e=>e.data)},this.reactionAdd=async e=>this.xhr.req(c.default.REACTION_ADD.METHOD)(c.default.REACTION_ADD.PATH,c.default.REACTION_ADD.DATA_KEY,e),this.reactionUpdate=async(e,t)=>this.xhr.req(c.default.REACTION_UPDATE.METHOD)(f.default.setParameterId(c.default.REACTION_UPDATE.PATH,e,"reactionId"),c.default.REACTION_UPDATE.DATA_KEY,{comment:t}),this.reactionDelete=async e=>this.xhr.req(c.default.REACTION_DELETE.METHOD)(f.default.setParameterId(c.default.REACTION_DELETE.PATH,e,"reactionId"),c.default.REACTION_DELETE.DATA_KEY).then(e=>e.recordId),this.plan=async(e,t=!0,r=2e3,n=30)=>this.xhr.req(c.default.PLAN.METHOD)(f.default.setParameterId(c.default.PLAN.PATH,e,"planId"),c.default.PLAN.DATA_KEY,{}).then(async i=>{if(t&&0===i.generatedStatus&&n>0){if(await _(r))return this.plan(e,t,r,n-1)}return i}),this.planRouteUrl=async(e,t)=>this.xhr.req(c.default.PLAN_ROUTE_URL.METHOD)(c.default.PLAN_ROUTE_URL.PATH,c.default.PLAN_ROUTE_URL.DATA_KEY,{planId:e,tripHash:t}),this.planUpdate=async(e,t)=>this.xhr.req(c.default.PLAN_UPDATE.METHOD)(f.default.setParameterId(c.default.PLAN_UPDATE.PATH,e,"planId"),c.default.PLAN_UPDATE.DATA_KEY,{...t}),this.planUpdateOrders=async(e,t)=>this.planUpdate(e,{stepOrders:t}),this.planUpdateTime=async(e,t,r)=>this.planUpdate(e,{startTime:t,endTime:r}),this.stepAdd=async(e,t,r,n)=>this.xhr.req(c.default.STEP_ADD.METHOD)(c.default.STEP_ADD.PATH,c.default.STEP_ADD.DATA_KEY,{planId:e,poiId:t,startTime:r,endTime:n}),this.customStepAdd=async(e,t,r,n,i)=>this.xhr.req(c.default.STEP_ADD.METHOD)(c.default.STEP_ADD.PATH,c.default.STEP_ADD.DATA_KEY,{planId:e,customPoi:t,stepType:r,startTime:n,endTime:i}),this.stepUpdateTimes=async(e,t,r)=>this.xhr.req(c.default.STEP_UPDATE.METHOD)(f.default.setParameterId(c.default.STEP_UPDATE.PATH,e,"stepId"),c.default.STEP_UPDATE.DATA_KEY,{startTime:t,endTime:r}),this.stepReplace=async(e,t)=>this.xhr.req(c.default.STEP_UPDATE.METHOD)(f.default.setParameterId(c.default.STEP_UPDATE.PATH,e,"stepId"),c.default.STEP_UPDATE.DATA_KEY,{poiId:t}),this.stepDelete=async e=>this.xhr.req(c.default.STEP_DELETE.METHOD)(f.default.setParameterId(c.default.STEP_DELETE.PATH,e,"stepId"),c.default.STEP_DELETE.DATA_KEY).then(e=>e.recordId),this.questions=async(e,t=o.default.QUESTIONS_CATEGORY.TRIP)=>{const r=`${c.default.QUESTIONS.DATA_KEY}-${t}`;if(!this.forceRequest){const e=h.default.questions(this.lang,r);if(e)return Promise.resolve(e)}return this.xhr.reqWithPage(c.default.QUESTIONS.METHOD)(c.default.QUESTIONS.PATH,r,{cityId:e,category:t,version:2}).then(e=>e.data.filter(e=>e.answers.length>0)).then(e=>((0,l.allQuestionsData)(this.lang),e))},this.questionsTrip=async e=>this.questions(e,o.default.QUESTIONS_CATEGORY.TRIP),this.questionsProfile=async e=>this.questions(e,o.default.QUESTIONS_CATEGORY.PROFILE),this.questionsCompanion=async e=>this.questions(e,o.default.QUESTIONS_CATEGORY.COMPANION),this.questionsAll=async e=>{const t=this.questionsTrip(e),r=this.questionsProfile(e),n=this.questionsCompanion(e);return Promise.all([t,r,n]).then(e=>[].concat(...e))},this.tripRefs=async(e=40)=>{if(!this.forceRequest){const e=h.default.tripRefs();if(e)return Promise.resolve(e)}return this.xhr.reqWithPage(c.default.TRIPS.METHOD)(c.default.TRIPS.PATH,c.default.TRIPS.DATA_KEY,{limit:e}).then(e=>e.data)},this.tripRef=async e=>this.xhr.req(c.default.TRIP_WITH_HASH.METHOD)(f.default.setParameter(c.default.TRIP_WITH_HASH.PATH,{key:"hash",value:e}),c.default.TRIP_WITH_HASH.DATA_KEY).then(e=>e),this.trip=async(e,t=0,r=this.forceRequest,n=2e3,i=30)=>{if(!r){const r=h.default.trip(this.lang,e,t);if(r)return Promise.resolve(r)}return this.xhr.req(c.default.TRIP.METHOD)(f.default.setParameter(c.default.TRIP.PATH,{key:"tripHash",value:e}),c.default.TRIP.DATA_KEY).then(async e=>{const a=e.plans.length-1<t?e.plans.length-1:t;if((0===e.plans[a].generatedStatus||-2===e.plans[a].generatedStatus)&&i>0){if(await _(n))return this.trip(e.tripHash,a,r,void 0,i-1)}return e})},this.tripAdd=async(e,t)=>this.xhr.req(c.default.TRIP_ADD.METHOD)(c.default.TRIP_ADD.PATH,c.default.TRIP_ADD.DATA_KEY,{...e}).then(e=>void 0===t?e:this.trip(e.tripHash,t)),this.tripClone=async e=>this.xhr.req(c.default.TRIP_CLONE.METHOD)(f.default.setParameter(c.default.TRIP_CLONE.PATH,{key:"tripHash",value:e}),c.default.TRIP_CLONE.DATA_KEY).then(e=>e),this.tripCloneCombo=async e=>this.tripClone(e).then(async e=>({trip:e,tripReferences:await this.tripRefs()})),this.tripUpdate=async(e,t,r=0)=>this.xhr.req(c.default.TRIP_UPDATE.METHOD)(f.default.setParameter(c.default.TRIP_UPDATE.PATH,{key:"tripHash",value:e}),c.default.TRIP_UPDATE.DATA_KEY,{...t}).then(e=>this.trip(e.tripHash,r)),this.tripNameUpdate=async(e,t)=>this.xhr.req(c.default.TRIP_UPDATE.METHOD)(f.default.setParameter(c.default.TRIP_UPDATE.PATH,{key:"tripHash",value:e}),c.default.TRIP_UPDATE.DATA_KEY,{...t}).then(e=>e),this.tripDelete=async e=>this.xhr.req(c.default.TRIP_DELETE.METHOD)(f.default.setParameter(c.default.TRIP_DELETE.PATH,{key:"tripHash",value:e}),c.default.TRIP_DELETE.DATA_KEY).then(e=>e.recordId),this.tripDownloadIcs=async e=>this.xhr.req(c.default.TRIP_DOWNLOAD_ICS.METHOD)(f.default.setParameter(c.default.TRIP_DOWNLOAD_ICS.PATH,{key:"tripHash",value:e}),c.default.TRIP_DOWNLOAD_ICS.DATA_KEY,void 0,{headers:{"Content-Type":"text/calendar"},responseType:"blob"}).then(e=>{const t=URL.createObjectURL(e.data),r=document.createElement("a");r.href=t;const n=e.headers["content-disposition"].split(";")[1].split("=")[1].replace(/"/g,"");r.setAttribute("download",n),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(t)}),this.tripGetShared=async(e,t=!0)=>this.xhr.req(c.default.TRIP_GET_SHARED.METHOD)(f.default.setParameter(c.default.TRIP_GET_SHARED.PATH,{key:"tripHash",value:e}),c.default.TRIP_GET_SHARED.DATA_KEY).then(async e=>{const r=(0,u.default)(e.tripProfile.arrivalDatetime).diff((0,u.default)(),"weeks",!1);if(r<4&&t){const t=o.helper.deepCopy(e),n=4-r,i=(0,u.default)(t.tripProfile.arrivalDatetime).add(n,"weeks"),a=(0,u.default)(t.tripProfile.departureDatetime).add(n,"weeks");return t.tripProfile.arrivalDatetime=i.format("YYYY-MM-DDTHH:mm:ss[Z]"),t.tripProfile.departureDatetime=a.format("YYYY-MM-DDTHH:mm:ss[Z]"),t.plans.forEach((e,t)=>{e.date=i.clone().add(t,"days").format("YYYY-MM-DD")}),t}return e}),this.tripShare=async(e,t)=>this.xhr.req(c.default.TRIP_SHARE.METHOD)(f.default.setParameter(c.default.TRIP_SHARE.PATH,{key:"tripHash",value:e}),c.default.TRIP_SHARE.DATA_KEY,{share:t}).then(async e=>e.share),this.reservations=async(e,t,r,n,i,a,s=100)=>{if(!this.forceRequest){const e=h.default.reservations(this.lang);if(e)return Promise.resolve(e)}return this.xhr.reqWithPage(c.default.RESERVATIONS.METHOD)(c.default.RESERVATIONS.PATH,c.default.RESERVATIONS.DATA_KEY,{cityId:e,tripHash:t,poiId:r,provider:n,dateFrom:i,dateTo:a,limit:s}).then(e=>e.data)},this.reservationAdd=async e=>this.xhr.req(c.default.RESERVATION_ADD.METHOD)(c.default.RESERVATION_ADD.PATH,c.default.RESERVATION_ADD.DATA_KEY,{...e}),this.reservationUpdate=async e=>this.xhr.req(c.default.RESERVATION_UPDATE.METHOD)(f.default.setParameterId(c.default.RESERVATION_UPDATE.PATH,e.id,"reservationId"),c.default.RESERVATION_UPDATE.DATA_KEY,{key:e.key,value:e.value,provider:e.provider,tripHash:e.tripHash,poiId:e.poiId}),this.reservationDelete=async e=>this.xhr.req(c.default.RESERVATION_DELETE.METHOD)(f.default.setParameterId(c.default.RESERVATION_DELETE.PATH,e,"reservationId"),c.default.RESERVATION_DELETE.DATA_KEY).then(e=>e.recordId),this.feedbacks=async()=>this.xhr.req(c.default.FEEDBACKS.METHOD)(c.default.FEEDBACKS.PATH,c.default.FEEDBACKS.DATA_KEY),this.userFeedbacks=async(e=!1)=>{if(!this.forceRequest&&!e){const e=h.default.userFeedbacks(this.lang);if(e)return e}return this.xhr.req(c.default.USER_FEEDBACKS.METHOD)(c.default.USER_FEEDBACKS.PATH,c.default.USER_FEEDBACKS.DATA_KEY)},this.feedbackSend=async e=>this.xhr.req(c.default.SEND_FEEDBACK.METHOD)(c.default.SEND_FEEDBACK.PATH,c.default.SEND_FEEDBACK.DATA_KEY,{...e}).then(()=>this.userFeedbacks(!0)),this.feedbackReply=async e=>this.xhr.req(c.default.SEND_FEEDBACK.METHOD)(c.default.REPLY_FEEDBACK.PATH,c.default.SEND_FEEDBACK.DATA_KEY,{...e}).then(()=>this.userFeedbacks(!0)),this.feedbackUpdate=async(e,t)=>this.xhr.req(c.default.UPDATE_FEEDBACK.METHOD)(f.default.setParameterId(c.default.UPDATE_FEEDBACK.PATH,e,"feedbackId"),c.default.UPDATE_FEEDBACK.DATA_KEY,{isRead:t}).then(()=>this.userFeedbacks(!0)),this.productTypes=async()=>this.xhr.req(c.default.OFFER_PRODUCT_TYPES.METHOD)(c.default.OFFER_PRODUCT_TYPES.PATH,c.default.OFFER_PRODUCT_TYPES.DATA_KEY).then(e=>e),this.offerSearch=async(e,t,r,n)=>this.xhr.reqWithPage(c.default.OFFERS.METHOD)(c.default.OFFERS.PATH,c.default.OFFERS.DATA_KEY,{dateFrom:e,dateTo:t,boundary:r,page:1,limit:50}).then(e=>{if(0===e.data.length)return[];const t=e.data.map(e=>e.tripianPoiId);return this.pois(t,Number(n),void 0,!0)}),this.offersOptIn=async(e,t)=>this.xhr.req(c.default.OFFERS_OPT_IN.METHOD)(c.default.OFFERS_OPT_IN.PATH,c.default.OFFERS_OPT_IN.DATA_KEY,{dateFrom:e,dateTo:t}),this.myCampaignOffers=async e=>this.xhr.req(c.default.OFFERS_OPT_IN.METHOD)(c.default.OFFERS_OPT_IN.PATH,c.default.OFFERS_OPT_IN.DATA_KEY,{campaignId:e}),this.offerSearchCampaign=async(e,t)=>this.xhr.reqWithPage(c.default.OFFERS.METHOD)(c.default.OFFERS.PATH,c.default.OFFERS.DATA_KEY,{campaignId:e}).then(e=>{if(0===e.data.length)return[];const r=e.data.map(e=>e.tripianPoiId);return this.pois(r,Number(t),void 0,!0)}),this.offerSearchNew=async(e,t,r)=>this.xhr.reqWithPage(c.default.OFFERS.METHOD)(c.default.OFFERS.PATH,c.default.OFFERS.DATA_KEY,{dateFrom:e,dateTo:t,boundary:r,page:1,limit:50}),this.offer=async e=>this.xhr.req(c.default.OFFER.METHOD)(f.default.setParameterId(c.default.OFFER.PATH,e,"offerId"),c.default.OFFER.DATA_KEY,{}).then(e=>e),this.offerUpdateOptIn=async(e,t)=>this.xhr.req(c.default.OFFER_UPDATE.METHOD)(f.default.setParameterId(c.default.OFFER_UPDATE.PATH,e,"offerId"),c.default.OFFER_UPDATE.DATA_KEY,{optInDate:t}).then(e=>e),this.offerDelete=async e=>this.xhr.req(c.default.OFFER_DELETE.METHOD)(f.default.setParameterId(c.default.OFFER_DELETE.PATH,e,"offerId"),c.default.OFFER_DELETE.DATA_KEY).then(e=>e),this.offerRedeemStatusUpdate=async(e,t)=>this.xhr.req(c.default.OFFER_REDEEM_STATUS_UPDATE.METHOD)(f.default.setParameterId(c.default.OFFER_REDEEM_STATUS_UPDATE.PATH,e,"offerId"),c.default.OFFER_REDEEM_STATUS_UPDATE.DATA_KEY,{status:t}).then(e=>e.status),this.offerRedeemStatus=async e=>this.xhr.req(c.default.OFFER_REDEEM_STATUS.METHOD)(f.default.setParameterId(c.default.OFFER_REDEEM_STATUS.PATH,e,"offerId"),c.default.OFFER_REDEEM_STATUS.DATA_KEY).then(e=>e.status),this.businessSearch=async(e,t,r)=>this.xhr.req(c.default.BUSINESS_SEARCH.METHOD)(c.default.BUSINESS_SEARCH.PATH,c.default.BUSINESS_SEARCH.DATA_KEY,{q:e,cityId:t,bounds:r}),this.businessAssign=async e=>this.xhr.req(c.default.BUSINESS_USER_ASSIGN.METHOD)(c.default.BUSINESS_USER_ASSIGN.PATH,c.default.BUSINESS_USER_ASSIGN.DATA_KEY,{tripianPoiId:e}),this.startVerify=async(e,t)=>this.xhr.req(c.default.BUSINESS_VERIFY_START.METHOD)(c.default.BUSINESS_VERIFY_START.PATH,c.default.BUSINESS_VERIFY_START.DATA_KEY,{to_:e,channel:t}),this.checkVerify=async(e,t,r)=>this.xhr.req(c.default.BUSINESS_VERIFY_CHECK.METHOD)(c.default.BUSINESS_VERIFY_CHECK.PATH,c.default.BUSINESS_VERIFY_CHECK.DATA_KEY,{to_:e,channel:t,code:r}),this.business=async()=>this.xhr.req(c.default.BUSINESS.METHOD)(c.default.BUSINESS.PATH,c.default.BUSINESS.DATA_KEY),this.businessOffers=async(e,t=1,r)=>this.xhr.reqWithPage(c.default.BUSINESS_OFFERS.METHOD)(c.default.BUSINESS_OFFERS.PATH,c.default.BUSINESS_OFFERS.DATA_KEY,{status:""+e.join(","),page:t,limit:r}),this.businessOfferAdd=async e=>this.xhr.req(c.default.BUSINESS_OFFER_ADD.METHOD)(c.default.BUSINESS_OFFER_ADD.PATH,c.default.BUSINESS_OFFER_ADD.DATA_KEY,{...e}),this.businessVoucherOfferAdd=async e=>this.xhr.req(c.default.BUSINESS_OFFER_ADD.METHOD)(c.default.BUSINESS_OFFER_ADD.PATH,c.default.BUSINESS_OFFER_ADD.DATA_KEY,{...e}),this.businessOffer=async e=>this.xhr.req(c.default.BUSINESS_OFFER.METHOD)(f.default.setParameterId(c.default.BUSINESS_OFFER.PATH,e,"offerId"),c.default.BUSINESS_OFFER.DATA_KEY),this.businessOfferStatusUpdate=async(e,t)=>this.xhr.req(c.default.BUSINESS_OFFER_UPDATE.METHOD)(f.default.setParameterId(c.default.BUSINESS_OFFER_UPDATE.PATH,e,"offerId"),c.default.BUSINESS_OFFER_UPDATE.DATA_KEY,{offerId:e,status:t}),this.businessOfferImageUpdate=async(e,t)=>this.xhr.req(c.default.BUSINESS_OFFER_UPDATE.METHOD)(f.default.setParameterId(c.default.BUSINESS_OFFER_UPDATE.PATH,e,"offerId"),c.default.BUSINESS_OFFER_UPDATE.DATA_KEY,{offerId:e,imageUrl:t}),this.businessOfferDelete=async e=>this.xhr.req(c.default.BUSINESS_OFFER_DELETE.METHOD)(f.default.setParameterId(c.default.BUSINESS_OFFER_DELETE.PATH,e,"offerId"),c.default.BUSINESS_OFFER_DELETE.DATA_KEY).then(e=>e.recordId),this.businessOfferCustomers=async e=>this.xhr.req(c.default.BUSINESS_OFFER_CUSTOMERS.METHOD)(f.default.setParameterId(c.default.BUSINESS_OFFER_CUSTOMERS.PATH,e,"offerId"),c.default.BUSINESS_OFFER_CUSTOMERS.DATA_KEY),this.businessOfferFileUpload=async e=>this.xhr.req(c.default.BUSINESS_OFFER_FILE_UPLOAD.METHOD)(c.default.BUSINESS_OFFER_FILE_UPLOAD.PATH,c.default.BUSINESS_OFFER_FILE_UPLOAD.DATA_KEY,{file:e},{"Content-Type":"multipart/form-data"}),this.businessOfferRedeemStatusUpdate=async(e,t,r)=>this.xhr.req(c.default.BUSINESS_OFFER_REDEEM_STATUS_UPDATE.METHOD)(f.default.setParameters(c.default.BUSINESS_OFFER_REDEEM_STATUS_UPDATE.PATH,[{key:"offerId",value:e.toString()},{key:"userId",value:t.toString()}]),c.default.BUSINESS_OFFER_REDEEM_STATUS_UPDATE.DATA_KEY,{status:r}).then(e=>e.status),this.businessOfferRedeemStatus=async(e,t)=>this.xhr.req(c.default.BUSINESS_OFFER_REDEEM_STATUS.METHOD)(f.default.setParameters(c.default.BUSINESS_OFFER_REDEEM_STATUS.PATH,[{key:"offerId",value:e.toString()},{key:"userId",value:t.toString()}]),c.default.BUSINESS_OFFER_REDEEM_STATUS.DATA_KEY).then(e=>e.status),this.businessPreRegister=async e=>this.xhr.req(c.default.BUSINESS_PRE_REGISTER.METHOD)(c.default.BUSINESS_PRE_REGISTER.PATH,c.default.BUSINESS_PRE_REGISTER.DATA_KEY,e),this.businessCampaigns=async(e,t=1e3)=>this.xhr.reqWithPage(c.default.BUSINESS_CAMPAIGNS.METHOD)(c.default.BUSINESS_CAMPAIGNS.PATH,c.default.BUSINESS_CAMPAIGNS.DATA_KEY,{limit:t,page:e}),this.businessCampaign=async e=>this.xhr.req(c.default.BUSINESS_CAMPAIGN.METHOD)(f.default.setParameterId(c.default.BUSINESS_CAMPAIGN.PATH,e,"campaignId"),c.default.BUSINESS_CAMPAIGN.DATA_KEY),this.businessCampaignUpdate=async(e,t)=>this.xhr.req(c.default.BUSINESS_CAMPAIGN_UPDATE.METHOD)(f.default.setParameterId(c.default.BUSINESS_CAMPAIGN_UPDATE.PATH,e,"campaignId"),c.default.BUSINESS_CAMPAIGN_UPDATE.DATA_KEY,t).then(e=>e.updated),this.businessCampaignAdd=async e=>this.xhr.req(c.default.BUSINESS_CAMPAIGN_ADD.METHOD)(c.default.BUSINESS_CAMPAIGN_ADD.PATH,c.default.BUSINESS_CAMPAIGN_ADD.DATA_KEY,e).then(e=>e.campaignId),this.businessCouponApplications=async(e,t,r=150)=>this.xhr.reqWithPage(c.default.BUSINESS_COUPON_APPLICATIONS.METHOD)(c.default.BUSINESS_COUPON_APPLICATIONS.PATH,c.default.BUSINESS_COUPON_APPLICATIONS.DATA_KEY,{page:e,status:t,limit:r}),this.businessCouponApplication=async e=>this.xhr.req(c.default.BUSINESS_COUPON_APPLICATION.METHOD)(f.default.setParameterId(c.default.BUSINESS_COUPON_APPLICATION.PATH,e,"applicationId"),c.default.BUSINESS_COUPON_APPLICATION.DATA_KEY),this.businessCouponApplicationAdd=async e=>this.xhr.req(c.default.BUSINESS_COUPON_APPLICATION_ADD.METHOD)(c.default.BUSINESS_COUPON_APPLICATION_ADD.PATH,c.default.BUSINESS_COUPON_APPLICATION_ADD.DATA_KEY,{formDatas:e}).then(e=>e.applicationId),this.businessCouponApplicationUserUpdate=async(e,t,r,n=0,i,a,s)=>this.xhr.req(c.default.BUSINESS_COUPON_APPLICATION_USER_UPDATE.METHOD)(f.default.setParameters(c.default.BUSINESS_COUPON_APPLICATION_USER_UPDATE.PATH,[{key:"applicationId",value:e.toString()},{key:"travelerId",value:t.toString()}]),c.default.BUSINESS_COUPON_APPLICATION_USER_UPDATE.DATA_KEY,{campaignId:n,status:r?1:-1,bookingDate:i,notes:a,amount:s}).then(e=>e.updated),this.businessCouponApplicationUserApprove=async(e,t,r,n,i)=>this.businessCouponApplicationUserUpdate(e,t,!0,r,n,void 0,i).then(t=>{if(t)return this.businessCouponApplication(e)}),this.businessCouponApplicationUserReject=async(e,t,r,n,i)=>this.businessCouponApplicationUserUpdate(e,t,!1,r,n,i).then(t=>{if(t)return this.businessCouponApplication(e)}),this.businessCouponApplicationFileUpload=async e=>this.xhr.req(c.default.BUSINESS_COUPON_FILE_UPLOAD.METHOD)(c.default.BUSINESS_COUPON_FILE_UPLOAD.PATH,c.default.BUSINESS_COUPON_FILE_UPLOAD.DATA_KEY,{file:e},{"Content-Type":"multipart/form-data"}),this.coupons=async(e,t=1e3)=>this.xhr.reqWithPage(c.default.COUPONS.METHOD)(c.default.COUPONS.PATH,c.default.COUPONS.DATA_KEY,{limit:t,page:e}),this.payment=async e=>this.xhr.req(c.default.PAYMENT.METHOD)(f.default.setParameters(c.default.PAYMENT.PATH,[{key:"offerId",value:e.toString()}]),c.default.PAYMENT.DATA_KEY),this.campaignReport=async(e,t)=>this.xhr.reqWithPage(c.default.CAMPAIGN_REPORT.METHOD)(f.default.setParameters(c.default.CAMPAIGN_REPORT.PATH,[{key:"campaignId",value:e.toString()}]),c.default.CAMPAIGN_REPORT.DATA_KEY,{...t}),this.campaignReportPay=async(e,t)=>this.xhr.req(c.default.CAMPAIGN_REPORT_PAY.METHOD)(f.default.setParameters(c.default.CAMPAIGN_REPORT_PAY.PATH,[{key:"campaignId",value:e.toString()},{key:"id",value:t.toString()}]),c.default.CAMPAIGN_REPORT.DATA_KEY).then(e=>e.updated),this.campaignCustomerReport=async(e,t)=>this.xhr.reqWithPage(c.default.CAMPAIGN_CUSTOMER_REPORT.METHOD)(f.default.setParameters(c.default.CAMPAIGN_CUSTOMER_REPORT.PATH,[{key:"campaignId",value:e.toString()}]),c.default.CAMPAIGN_CUSTOMER_REPORT.DATA_KEY,{...t}).then(e=>(e.data.forEach(e=>{e.lengthOfStay=(0,u.default)(e.customerDepartureDate).diff((0,u.default)(e.customerArrivalDate),"days",!1)}),e)),this.businessReport=async e=>this.xhr.reqWithPage(c.default.BUSINESS_REPORT.METHOD)(c.default.BUSINESS_REPORT.PATH,c.default.BUSINESS_REPORT.DATA_KEY,{...e}),this.businessPreRegisterReport=async e=>this.xhr.reqWithPage(c.default.BUSINESS_PRE_REGISTER_REPORT.METHOD)(c.default.BUSINESS_PRE_REGISTER_REPORT.PATH,c.default.BUSINESS_PRE_REGISTER_REPORT.DATA_KEY,{...e}),this.businessOfferReport=async(e=1,t=1e3)=>this.xhr.reqWithPage(c.default.BUSINESS_OFFER_REPORT.METHOD)(c.default.BUSINESS_OFFER_REPORT.PATH,c.default.BUSINESS_OFFER_REPORT.DATA_KEY,{page:e,limit:t}),this.businessExport=async(e,t)=>this.xhr.req(c.default.BUSINESS_EXPORT.METHOD)(c.default.BUSINESS_EXPORT.PATH,c.default.BUSINESS_EXPORT.DATA_KEY,{reportType:e,campaignId:t}),this.translationList=async()=>this.xhr.req(c.default.TRANSLATIONS.METHOD)(c.default.TRANSLATIONS.PATH,c.default.TRANSLATIONS.DATA_KEY),this.log=async(e,t={},r="ERROR")=>{var n;const{baseURL:i,xApiKey:a,email:s}=this.xhr.info();return this.xhr.req(c.default.LOGS.METHOD)(c.default.LOGS.PATH,c.default.LOGS.DATA_KEY,{message:{platform:"web",type:r,g_api_customer_id:0,user_id:0,uri_params:{},query_params:{apibaseURL:i},api_key:a,endpoint:null!==(n=null===window||void 0===window?void 0:window.location.href)&&void 0!==n?n:"",response_msg:e,request_params:{email:s,...t}}})},this.visaIframeToken=async()=>this.xhr.req(c.default.VISA_IFRAME_TOKEN.METHOD)(c.default.VISA_IFRAME_TOKEN.PATH,c.default.OFFER.DATA_KEY).then(e=>e),this.visaValidatorCheck=async e=>this.xhr.req(c.default.VISA_VALIDATOR_CHECK.METHOD)(c.default.VISA_VALIDATOR_CHECK.PATH,c.default.VISA_VALIDATOR_CHECK.DATA_KEY,{context:e}),this.combo={businessPayloadData:async()=>this.user().then(e=>e.businessId&&e.businessId>0?this.business().then(t=>({user:e,business:t})):{user:e}),campaignReportPayCombo:async(e,t,r)=>this.campaignReportPay(e,t).then(t=>this.campaignReport(e,r)),payloadDataEx:async()=>this.user().then(e=>this.business().then(t=>({user:e,business:t}))),tripDelete:async(e,t)=>this.tripDelete(e).then(()=>this.tripRefs(t)),stepAdd:async(e,t,r,n,i)=>this.stepAdd(e,t,n,i).then(()=>this.trip(r,void 0)),customStepAdd:async(e,t,r,n,i,a)=>this.customStepAdd(e,t,n,i,a).then(()=>this.trip(r,void 0,!0)),stepUpdateTimes:async(e,t,r,n)=>this.stepUpdateTimes(e,t,r).then(e=>this.trip(n,void 0)),stepReplace:async(e,t,r)=>this.stepReplace(e,t).then(e=>this.trip(r,void 0)),stepDelete:async(e,t)=>this.stepDelete(e).then(()=>this.trip(t,void 0,!0)),planUpdateOrders:async(e,t,r)=>this.planUpdateOrders(e,t).then(e=>this.trip(r,void 0,!0)),planUpdateTime:async(e,t,r,n,i)=>this.planUpdateTime(e,r,n).then(e=>this.trip(i,t,!0)),favoriteAdd:async(e,t,r)=>this.favoriteAdd(t,e).then(e=>this.favorites(r)),favoriteDelete:async(e,t)=>this.favoriteDelete(e).then(()=>this.favorites(t)),companionAdd:async(e,t)=>this.companionAdd(e).then(()=>this.companions(t)),companionUpdate:async(e,t)=>this.companionUpdate(e).then(()=>this.companions(t)),companionDelete:async(e,t)=>this.companionDelete(e).then(()=>this.companions(t)),reservationAdd:async(e,t)=>this.reservationAdd(e).then(()=>this.reservations(t)),reservationUpdate:async(e,t)=>this.reservationUpdate(e).then(()=>this.reservations(t)),reservationDelete:async(e,t)=>this.reservationDelete(e).then(()=>this.reservations(t)),reactionAdd:async(e,t)=>this.reactionAdd(e).then(()=>this.reactions(t))},this.xhr=new d.default(e,t),this.forceRequest=!r,this.lang=t}}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),r(277);const i=n(r(43)),a=r(201),s=e=>{if(void 0===e)return"";const t=Object.entries(e).filter(e=>void 0!==e[1]),r=Object.fromEntries(t);return"?"+new URLSearchParams(r)};t.default=class{constructor(e,t){this.timeout=3e4,this.getToken=()=>this.token,this.setToken=e=>{this.token=e,this.authorization=`${e.tokenType} ${e.idToken}`,this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=void 0);const t=1e3*(e.expiresIn-60);t>0&&t<36e5?this.refreshTimeoutId=setTimeout(()=>{this.refreshXhrToken().catch(e=>{console.error("Token refresh failed:",e),this.removeToken()})},t):console.warn("Token expiry time is invalid or too long. Refresh timer not set.")},this.removeToken=()=>{this.token=void 0,this.authorization=void 0,this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=void 0)},this.setLang=e=>{this.lang=e},this.refreshXhrToken=()=>{var e;const t=null===(e=this.token)||void 0===e?void 0:e.refreshToken;return t?this.req("POST")("/auth/refresh-token","token",{refreshToken:t}).then(e=>{const r={...e,refreshToken:t};return this.setToken(r),r}).catch(e=>(console.error("Refresh token failed:",e),this.removeToken(),Promise.reject(e))):(console.warn("No refresh token available."),Promise.reject(new Error("No refresh token available")))},this.get=async(e,t,r,n)=>{var i;return fetch(this.baseURL+e+s({...r,lang:this.lang}),{method:"GET",headers:{"Content-Type":"application/json",authorization:null!==(i=this.authorization)&&void 0!==i?i:"","x-api-key":this.xApiKey,...n}}).then(e=>e.json()).then(n=>(0,a.handleHttpResponseSuccess)(n,t,this.lang,r,e).data).catch(e=>(0,a.handleHttpResponseError)(e,t,r))},this.getWithPage=async(e,t,r)=>{var n;return fetch(this.baseURL+e+s({...r,lang:this.lang}),{method:"GET",headers:{"Content-Type":"application/json",authorization:null!==(n=this.authorization)&&void 0!==n?n:"","x-api-key":this.xApiKey}}).then(e=>e.json()).then(e=>(0,a.handleHttpResponseSuccess)(e,t,this.lang,r)).catch(e=>(0,a.handleHttpResponseError)(e,t,r))},this.appendLangToUrl=e=>`${this.baseURL+e}${s({lang:this.lang})}`,this.post=async(e,t,r,n)=>{var i;const s=this.appendLangToUrl(e);return fetch(s,{method:"POST",headers:{"Content-Type":"application/json",authorization:null!==(i=this.authorization)&&void 0!==i?i:"","x-api-key":this.xApiKey,...n},body:JSON.stringify({...r,lang:this.lang})}).then(e=>e.json()).then(e=>(0,a.handleHttpResponseSuccess)(e,t,this.lang,r).data).then(e=>("token"===t&&this.setToken(e),e)).catch(e=>(0,a.handleHttpResponseError)(e,t,r))},this.put=async(e,t,r,n)=>{var i;const s=this.appendLangToUrl(e);return fetch(s,{method:"PUT",headers:{"Content-Type":"application/json",authorization:null!==(i=this.authorization)&&void 0!==i?i:"","x-api-key":this.xApiKey,...n},body:JSON.stringify({...r,lang:this.lang})}).then(e=>e.json()).then(e=>(0,a.handleHttpResponseSuccess)(e,t,this.lang,r).data).catch(e=>(0,a.handleHttpResponseError)(e,t,r))},this.delete=async(e,t,r)=>{var n;return fetch(this.baseURL+e+s({lang:this.lang}),{method:"DELETE",headers:{"Content-Type":"application/json",authorization:null!==(n=this.authorization)&&void 0!==n?n:"","x-api-key":this.xApiKey,...r}}).then(e=>e.json()).then(e=>(0,a.handleHttpResponseSuccess)(e,t,this.lang).data).catch(e=>(0,a.handleHttpResponseError)(e,t))},this.postWithPage=async(e,t,r,n)=>{var i;const s=this.appendLangToUrl(e);return fetch(s,{method:"POST",headers:{"Content-Type":"application/json",authorization:null!==(i=this.authorization)&&void 0!==i?i:"","x-api-key":this.xApiKey,...n},body:JSON.stringify(r)}).then(e=>e.json()).then(e=>(0,a.handleHttpResponseSuccess)(e,t,this.lang,r)).catch(e=>(0,a.handleHttpResponseError)(e,t,r))},this.req=e=>"GET"===e?this.get:"POST"===e?this.post:"PUT"===e?this.put:"DELETE"===e?this.delete:this.get,this.reqWithPage=e=>"GET"===e?this.getWithPage:"POST"===e?this.postWithPage:this.getWithPage,this.info=()=>{var e,t;const r=this.token&&null!==(t=null===(e=i.default.parseToken(this.token))||void 0===e?void 0:e.email)&&void 0!==t?t:"";return{baseURL:this.baseURL,xApiKey:this.xApiKey,email:r}},this.baseURL=e.url,this.xApiKey=e.xApiKey,this.timeout=3e4,e.token&&this.setToken(e.token),t&&this.setLang(t)}}},function(e,t,r){(function(e){!function(t){!function(r){var n="undefined"!=typeof globalThis&&globalThis||void 0!==t&&t||void 0!==e&&e||{},i="URLSearchParams"in n,a="Symbol"in n&&"iterator"in Symbol,s="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in n,u="ArrayBuffer"in n;if(u)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&d.indexOf(Object.prototype.toString.call(e))>-1};function f(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function h(e){return"string"!=typeof e&&(e=String(e)),e}function l(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return a&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function _(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function m(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function y(e){var t=new FileReader,r=m(t);return t.readAsArrayBuffer(e),r}function b(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:s&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:i&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u&&s&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=b(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=b(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var e=_(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=_(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(s)return this.blob().then(y);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,r,n,i,a=_(this);if(a)return a;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=m(t),n=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=n?n[1]:"utf-8",t.readAsText(e,i),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(T)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(e,t){e=f(e),t=h(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},p.prototype.delete=function(e){delete this.map[f(e)]},p.prototype.get=function(e){return e=f(e),this.has(e)?this.map[e]:null},p.prototype.has=function(e){return this.map.hasOwnProperty(f(e))},p.prototype.set=function(e,t){this.map[f(e)]=h(t)},p.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},p.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),l(e)},p.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),l(e)},p.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),l(e)},a&&(p.prototype[Symbol.iterator]=p.prototype.entries);var M=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function v(e,t){if(!(this instanceof v))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,i,a=(t=t||{}).body;if(e instanceof v){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new p(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new p(t.headers)),this.method=(r=t.method||this.method||"GET",i=r.toUpperCase(),M.indexOf(i)>-1?i:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in n)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(a),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var s=/([?&])_=[^&]*/;if(s.test(this.url))this.url=this.url.replace(s,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function T(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function w(e,t){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},g.call(v.prototype),g.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var S=[301,302,303,307,308];w.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},r.DOMException=n.DOMException;try{new r.DOMException}catch(e){r.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function L(e,t){return new Promise((function(i,a){var o=new v(e,t);if(o.signal&&o.signal.aborted)return a(new r.DOMException("Aborted","AbortError"));var d=new XMLHttpRequest;function c(){d.abort()}if(d.onload=function(){var e,t,r={statusText:d.statusText,headers:(e=d.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();try{t.append(n,i)}catch(e){console.warn("Response "+e.message)}}})),t)};0===o.url.indexOf("file://")&&(d.status<200||d.status>599)?r.status=200:r.status=d.status,r.url="responseURL"in d?d.responseURL:r.headers.get("X-Request-URL");var n="response"in d?d.response:d.responseText;setTimeout((function(){i(new w(n,r))}),0)},d.onerror=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},d.ontimeout=function(){setTimeout((function(){a(new TypeError("Network request timed out"))}),0)},d.onabort=function(){setTimeout((function(){a(new r.DOMException("Aborted","AbortError"))}),0)},d.open(o.method,function(e){try{return""===e&&n.location.href?n.location.href:e}catch(t){return e}}(o.url),!0),"include"===o.credentials?d.withCredentials=!0:"omit"===o.credentials&&(d.withCredentials=!1),"responseType"in d&&(s?d.responseType="blob":u&&(d.responseType="arraybuffer")),t&&"object"==typeof t.headers&&!(t.headers instanceof p||n.Headers&&t.headers instanceof n.Headers)){var l=[];Object.getOwnPropertyNames(t.headers).forEach((function(e){l.push(f(e)),d.setRequestHeader(e,h(t.headers[e]))})),o.headers.forEach((function(e,t){-1===l.indexOf(t)&&d.setRequestHeader(t,e)}))}else o.headers.forEach((function(e,t){d.setRequestHeader(t,e)}));o.signal&&(o.signal.addEventListener("abort",c),d.onreadystatechange=function(){4===d.readyState&&o.signal.removeEventListener("abort",c)}),d.send(void 0===o._bodyInit?null:o._bodyInit)}))}L.polyfill=!0,n.fetch||(n.fetch=L,n.Headers=p,n.Request=v,n.Response=w),r.Headers=p,r.Request=v,r.Response=w,r.fetch=L,Object.defineProperty(r,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:this)}).call(this,r(5))},function(e,t,r){"use strict";t.byteLength=function(e){var t=d(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=d(e),s=n[0],o=n[1],u=new a(function(e,t,r){return 3*(t+r)/4-r}(0,s,o)),c=0,f=o>0?s-4:s;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;2===o&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[c++]=255&t);1===o&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],s=0,o=r-i;s<o;s+=16383)a.push(c(e,s,s+16383>o?o:s+16383));1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,u=s.length;o<u;++o)n[o]=s[o],i[s.charCodeAt(o)]=o;function d(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,a,s=[],o=t;o<r;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
|
|
286
|
+
e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,r){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(r(0))},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.handleHttpResponseError=t.handleHttpResponseSuccess=void 0;const i=n(r(16)),a=n(r(282));t.handleHttpResponseSuccess=(e,t,r,n,i)=>{if(!e.success)throw e.message;return(0,a.default)(e.data,t,r,n,i,e.pagination),{data:e.data,pagination:e.pagination}};t.handleHttpResponseError=(e,t,r)=>{if(i.default.hasError=!0,i.default.errors.push({dataKey:t,errorResponse:e,params:r}),t&&"trip"!==t&&(i.default[t]=null),e.response){if(e.response.data){if(e.response.data.message)throw e.response.data.message;throw e.response.data}throw e.response}if(e.message)throw e.message;throw e}},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},function(e,t,r){"use strict";var n=r(6);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var a;if(r)a=r(t);else if(n.isURLSearchParams(t))a=t.toString();else{var s=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(i(t)+"="+i(e))})))})),a=s.join("&")}if(a){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},function(e,t,r){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},function(e,t,r){"use strict";(function(t){var n=r(6);e.exports=function(e,r){r=r||new FormData;var i=[];function a(e){return null===e?"":n.isDate(e)?e.toISOString():n.isArrayBuffer(e)||n.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):t.from(e):e}return function e(t,s){if(n.isPlainObject(t)||n.isArray(t)){if(-1!==i.indexOf(t))throw Error("Circular reference detected in "+s);i.push(t),n.forEach(t,(function(t,i){if(!n.isUndefined(t)){var o,u=s?s+"."+i:i;if(t&&!s&&"object"==typeof t)if(n.endsWith(i,"{}"))t=JSON.stringify(t);else if(n.endsWith(i,"[]")&&(o=n.toArray(t)))return void o.forEach((function(e){!n.isUndefined(e)&&r.append(u,a(e))}));e(t,u)}})),i.pop()}else r.append(s,a(t))}(e),r}}).call(this,r(3).Buffer)},function(e,t,r){"use strict";var n=r(6),i=r(294),a=r(295),s=r(203),o=r(207),u=r(298),d=r(299),c=r(204),f=r(17),h=r(35),l=r(300);e.exports=function(e){return new Promise((function(t,r){var p,_=e.data,m=e.headers,y=e.responseType;function b(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}n.isFormData(_)&&n.isStandardBrowserEnv()&&delete m["Content-Type"];var g=new XMLHttpRequest;if(e.auth){var M=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(M+":"+v)}var T=o(e.baseURL,e.url);function w(){if(g){var n="getAllResponseHeaders"in g?u(g.getAllResponseHeaders()):null,a={data:y&&"text"!==y&&"json"!==y?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g};i((function(e){t(e),b()}),(function(e){r(e),b()}),a),g=null}}if(g.open(e.method.toUpperCase(),s(T,e.params,e.paramsSerializer),!0),g.timeout=e.timeout,"onloadend"in g?g.onloadend=w:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(w)},g.onabort=function(){g&&(r(new f("Request aborted",f.ECONNABORTED,e,g)),g=null)},g.onerror=function(){r(new f("Network Error",f.ERR_NETWORK,e,g,g)),g=null},g.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||c;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new f(t,n.clarifyTimeoutError?f.ETIMEDOUT:f.ECONNABORTED,e,g)),g=null},n.isStandardBrowserEnv()){var S=(e.withCredentials||d(T))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;S&&(m[e.xsrfHeaderName]=S)}"setRequestHeader"in g&&n.forEach(m,(function(e,t){void 0===_&&"content-type"===t.toLowerCase()?delete m[t]:g.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(g.withCredentials=!!e.withCredentials),y&&"json"!==y&&(g.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&g.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&g.upload&&g.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){g&&(r(!e||e&&e.type?new h:e),g.abort(),g=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),_||(_=null);var L=l(T);L&&-1===["http","https","file"].indexOf(L)?r(new f("Unsupported protocol "+L+":",f.ERR_BAD_REQUEST,e)):g.send(_)}))}},function(e,t,r){"use strict";var n=r(296),i=r(297);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";var n=r(6);e.exports=function(e,t){t=t||{};var r={};function i(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function a(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(e[r],t[r])}function s(e){if(!n.isUndefined(t[e]))return i(void 0,t[e])}function o(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(void 0,t[r])}function u(r){return r in t?i(e[r],t[r]):r in e?i(void 0,e[r]):void 0}var d={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=d[e]||a,i=t(e);n.isUndefined(i)&&t!==u||(r[e]=i)})),r}},function(e,t){e.exports={version:"0.27.2"}},function(e,t,r){"use strict";(function(t,n){var i;e.exports=L,L.ReadableState=S;r(13).EventEmitter;var a=function(e,t){return e.listeners(t).length},s=r(212),o=r(3).Buffer,u=(void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var d,c=r(320);d=c&&c.debuglog?c.debuglog("stream"):function(){};var f,h,l,p=r(321),_=r(213),m=r(214).getHighWaterMark,y=r(19).codes,b=y.ERR_INVALID_ARG_TYPE,g=y.ERR_STREAM_PUSH_AFTER_EOF,M=y.ERR_METHOD_NOT_IMPLEMENTED,v=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(1)(L,s);var T=_.errorOrDestroy,w=["error","close","destroy","pause","resume"];function S(e,t,n){i=i||r(20),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(14).StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function L(e){if(i=i||r(20),!(this instanceof L))return new L(e);var t=this instanceof i;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function A(e,t,r,n,i){d("readableAddChunk",t);var a,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(d("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?k(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,Y(e)))}(e,s);else if(i||(a=function(e,t){var r;n=t,o.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(s,t)),a)T(e,a);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),n)s.endEmitted?T(e,new v):E(e,s,t,!0);else if(s.ended)T(e,new g);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?E(e,s,t,!1):O(e,s)):E(e,s,t,!1)}else n||(s.reading=!1,O(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function E(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),O(e,t)}Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),L.prototype.destroy=_.destroy,L.prototype._undestroy=_.undestroy,L.prototype._destroy=function(e,t){t(e)},L.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=o.from(e,t),t=""),r=!0),A(this,e,t,!1,r)},L.prototype.unshift=function(e){return A(this,e,null,!0,!1)},L.prototype.isPaused=function(){return!1===this._readableState.flowing},L.prototype.setEncoding=function(e){f||(f=r(14).StringDecoder);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function D(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;d("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(Y,e))}function Y(e){var t=e._readableState;d("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,x(e)}function O(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(F,e,t))}function F(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(d("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function P(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function I(e){d("readable nexttick read 0"),e.read(0)}function R(e,t){d("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),x(e),t.flowing&&!t.reading&&e.read(0)}function x(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function j(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function K(e){var t=e._readableState;d("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(H,t,e))}function H(e,t){if(d("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function N(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}L.prototype.read=function(e){d("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?K(this):k(this),null;if(0===(e=D(e,t))&&t.ended)return 0===t.length&&K(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),t.ended||t.reading?d("reading or ended",i=!1):i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=D(r,t))),null===(n=e>0?j(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&K(this)),null!==n&&this.emit("data",n),n},L.prototype._read=function(e){T(this,new M("_read()"))},L.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,d("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?u:m;function o(t,n){d("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),e.removeListener("close",p),e.removeListener("finish",_),e.removeListener("drain",c),e.removeListener("error",l),e.removeListener("unpipe",o),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",h),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function u(){d("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",o);var c=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,x(e))}}(r);e.on("drain",c);var f=!1;function h(t){d("ondata");var n=e.write(t);d("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==N(i.pipes,e))&&!f&&(d("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function l(t){d("onerror",t),m(),e.removeListener("error",l),0===a(e,"error")&&T(e,t)}function p(){e.removeListener("finish",_),m()}function _(){d("onfinish"),e.removeListener("close",p),m()}function m(){d("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",l),e.once("close",p),e.once("finish",_),e.emit("pipe",r),i.flowing||(d("pipe resume"),r.resume()),e},L.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var s=N(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},L.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,d("on readable",i.length,i.reading),i.length?k(this):i.reading||n.nextTick(I,this))),r},L.prototype.addListener=L.prototype.on,L.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(P,this),r},L.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(P,this),t},L.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(R,e,t))}(this,e)),e.paused=!1,this},L.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},L.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<w.length;a++)e.on(w[a],this.emit.bind(this,w[a]));return this._read=function(t){d("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(L.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=r(323)),h(this)}),Object.defineProperty(L.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(L.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(L.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),L._fromList=j,Object.defineProperty(L.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(L.from=function(e,t){return void 0===l&&(l=r(324)),l(L,e,t)})}).call(this,r(5),r(4))},function(e,t,r){e.exports=r(13).EventEmitter},function(e,t,r){"use strict";(function(t){function r(e,t){i(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,a){var s=this,o=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return o||u?(a?a(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(i,this,e)):t.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!a&&e?s._writableState?s._writableState.errorEmitted?t.nextTick(n,s):(s._writableState.errorEmitted=!0,t.nextTick(r,s,e)):t.nextTick(r,s,e):a?(t.nextTick(n,s),a(e)):t.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this,r(4))},function(e,t,r){"use strict";var n=r(19).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},function(e,t,r){"use strict";(function(t,n){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var a;e.exports=L,L.WritableState=S;var s={deprecate:r(47)},o=r(212),u=r(3).Buffer,d=(void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,f=r(213),h=r(214).getHighWaterMark,l=r(19).codes,p=l.ERR_INVALID_ARG_TYPE,_=l.ERR_METHOD_NOT_IMPLEMENTED,m=l.ERR_MULTIPLE_CALLBACK,y=l.ERR_STREAM_CANNOT_PIPE,b=l.ERR_STREAM_DESTROYED,g=l.ERR_STREAM_NULL_VALUES,M=l.ERR_STREAM_WRITE_AFTER_END,v=l.ERR_UNKNOWN_ENCODING,T=f.errorOrDestroy;function w(){}function S(e,t,s){a=a||r(20),e=e||{},"boolean"!=typeof s&&(s=t instanceof a),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,a=r.writecb;if("function"!=typeof a)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,a){--t.pendingcb,r?(n.nextTick(a,i),n.nextTick(O,e,t),e._writableState.errorEmitted=!0,T(e,i)):(a(i),e._writableState.errorEmitted=!0,T(e,i),O(e,t))}(e,r,i,t,a);else{var s=k(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||D(e,r),i?n.nextTick(E,e,r,s,a):E(e,r,s,a)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function L(e){var t=this instanceof(a=a||r(20));if(!t&&!c.call(L,this))return new L(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function A(e,t,r,n,i,a,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function E(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),O(e,t)}function D(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,a=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var o=0,u=!0;r;)a[o]=r,r.isBuf||(u=!1),r=r.next,o+=1;a.allBuffers=u,A(e,t,!0,t.length,a,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var d=r.chunk,c=r.encoding,f=r.callback;if(A(e,t,!1,t.objectMode?1:d.length,d,c,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function Y(e,t){e._final((function(r){t.pendingcb--,r&&T(e,r),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var r=k(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,n.nextTick(Y,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}r(1)(L,o),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(L,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===L&&(e&&e._writableState instanceof S)}})):c=function(e){return e instanceof this},L.prototype.pipe=function(){T(this,new y)},L.prototype.write=function(e,t,r){var i,a=this._writableState,s=!1,o=!a.objectMode&&(i=e,u.isBuffer(i)||i instanceof d);return o&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=a.defaultEncoding),"function"!=typeof r&&(r=w),a.ending?function(e,t){var r=new M;T(e,r),n.nextTick(t,r)}(this,r):(o||function(e,t,r,i){var a;return null===r?a=new g:"string"==typeof r||t.objectMode||(a=new p("chunk",["string","Buffer"],r)),!a||(T(e,a),n.nextTick(i,a),!1)}(this,a,e,r))&&(a.pendingcb++,s=function(e,t,r,n,i,a){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var o=t.objectMode?1:n.length;t.length+=o;var d=t.length<t.highWaterMark;d||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else A(e,t,!1,o,n,i,a);return d}(this,a,o,e,t,r)),s},L.prototype.cork=function(){this._writableState.corked++},L.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||D(this,e))},L.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(L.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),L.prototype._write=function(e,t,r){r(new _("_write()"))},L.prototype._writev=null,L.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(L.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),L.prototype.destroy=f.destroy,L.prototype._undestroy=f.undestroy,L.prototype._destroy=function(e,t){t(e)}}).call(this,r(5),r(4))},function(e,t,r){"use strict";e.exports=c;var n=r(19).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,a=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(20);function d(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new a);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);u.call(this,e),this._transformState={afterTransform:d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,r){h(e,t,r)}))}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new o;if(e._transformState.transforming)throw new s;return e.push(null)}r(1)(c,u),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,r){r(new i("_transform()"))},c.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},function(e,t,r){"use strict";var n=r(3).Buffer,i=r(1),a=r(327),s=new Array(16),o=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],c=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],f=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function l(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function _(e,t,r,n,i,a,s,o){return p(e+(t^r^n)+a+s|0,o)+i|0}function m(e,t,r,n,i,a,s,o){return p(e+(t&r|~t&n)+a+s|0,o)+i|0}function y(e,t,r,n,i,a,s,o){return p(e+((t|~r)^n)+a+s|0,o)+i|0}function b(e,t,r,n,i,a,s,o){return p(e+(t&n|r&~n)+a+s|0,o)+i|0}function g(e,t,r,n,i,a,s,o){return p(e+(t^(r|~n))+a+s|0,o)+i|0}i(l,a),l.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,l=0|this._e,M=0|this._a,v=0|this._b,T=0|this._c,w=0|this._d,S=0|this._e,L=0;L<80;L+=1){var A,E;L<16?(A=_(r,n,i,a,l,e[o[L]],f[0],d[L]),E=g(M,v,T,w,S,e[u[L]],h[0],c[L])):L<32?(A=m(r,n,i,a,l,e[o[L]],f[1],d[L]),E=b(M,v,T,w,S,e[u[L]],h[1],c[L])):L<48?(A=y(r,n,i,a,l,e[o[L]],f[2],d[L]),E=y(M,v,T,w,S,e[u[L]],h[2],c[L])):L<64?(A=b(r,n,i,a,l,e[o[L]],f[3],d[L]),E=m(M,v,T,w,S,e[u[L]],h[3],c[L])):(A=g(r,n,i,a,l,e[o[L]],f[4],d[L]),E=_(M,v,T,w,S,e[u[L]],h[4],c[L])),r=l,l=a,a=p(i,10),i=n,n=A,M=S,S=w,w=p(T,10),T=v,v=E}var D=this._b+i+w|0;this._b=this._c+a+S|0,this._c=this._d+l+M|0,this._d=this._e+r+v|0,this._e=this._a+n+T|0,this._a=D},l.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=l},function(e,t,r){"use strict";(function(t,n){var i;e.exports=L,L.ReadableState=S;r(13).EventEmitter;var a=function(e,t){return e.listeners(t).length},s=r(219),o=r(3).Buffer,u=(void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var d,c=r(329);d=c&&c.debuglog?c.debuglog("stream"):function(){};var f,h,l,p=r(330),_=r(220),m=r(221).getHighWaterMark,y=r(21).codes,b=y.ERR_INVALID_ARG_TYPE,g=y.ERR_STREAM_PUSH_AFTER_EOF,M=y.ERR_METHOD_NOT_IMPLEMENTED,v=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(1)(L,s);var T=_.errorOrDestroy,w=["error","close","destroy","pause","resume"];function S(e,t,n){i=i||r(22),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(14).StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function L(e){if(i=i||r(22),!(this instanceof L))return new L(e);var t=this instanceof i;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function A(e,t,r,n,i){d("readableAddChunk",t);var a,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(d("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?k(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,Y(e)))}(e,s);else if(i||(a=function(e,t){var r;n=t,o.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(s,t)),a)T(e,a);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),n)s.endEmitted?T(e,new v):E(e,s,t,!0);else if(s.ended)T(e,new g);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?E(e,s,t,!1):O(e,s)):E(e,s,t,!1)}else n||(s.reading=!1,O(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function E(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),O(e,t)}Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),L.prototype.destroy=_.destroy,L.prototype._undestroy=_.undestroy,L.prototype._destroy=function(e,t){t(e)},L.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=o.from(e,t),t=""),r=!0),A(this,e,t,!1,r)},L.prototype.unshift=function(e){return A(this,e,null,!0,!1)},L.prototype.isPaused=function(){return!1===this._readableState.flowing},L.prototype.setEncoding=function(e){f||(f=r(14).StringDecoder);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function D(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;d("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(Y,e))}function Y(e){var t=e._readableState;d("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,x(e)}function O(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(F,e,t))}function F(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(d("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function P(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function I(e){d("readable nexttick read 0"),e.read(0)}function R(e,t){d("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),x(e),t.flowing&&!t.reading&&e.read(0)}function x(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function j(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function K(e){var t=e._readableState;d("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(H,t,e))}function H(e,t){if(d("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function N(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}L.prototype.read=function(e){d("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?K(this):k(this),null;if(0===(e=D(e,t))&&t.ended)return 0===t.length&&K(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),t.ended||t.reading?d("reading or ended",i=!1):i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=D(r,t))),null===(n=e>0?j(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&K(this)),null!==n&&this.emit("data",n),n},L.prototype._read=function(e){T(this,new M("_read()"))},L.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,d("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?u:m;function o(t,n){d("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),e.removeListener("close",p),e.removeListener("finish",_),e.removeListener("drain",c),e.removeListener("error",l),e.removeListener("unpipe",o),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",h),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function u(){d("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",o);var c=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,x(e))}}(r);e.on("drain",c);var f=!1;function h(t){d("ondata");var n=e.write(t);d("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==N(i.pipes,e))&&!f&&(d("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function l(t){d("onerror",t),m(),e.removeListener("error",l),0===a(e,"error")&&T(e,t)}function p(){e.removeListener("finish",_),m()}function _(){d("onfinish"),e.removeListener("close",p),m()}function m(){d("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",l),e.once("close",p),e.once("finish",_),e.emit("pipe",r),i.flowing||(d("pipe resume"),r.resume()),e},L.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var s=N(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},L.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,d("on readable",i.length,i.reading),i.length?k(this):i.reading||n.nextTick(I,this))),r},L.prototype.addListener=L.prototype.on,L.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(P,this),r},L.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(P,this),t},L.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(R,e,t))}(this,e)),e.paused=!1,this},L.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},L.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<w.length;a++)e.on(w[a],this.emit.bind(this,w[a]));return this._read=function(t){d("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(L.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=r(332)),h(this)}),Object.defineProperty(L.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(L.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(L.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),L._fromList=j,Object.defineProperty(L.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(L.from=function(e,t){return void 0===l&&(l=r(333)),l(L,e,t)})}).call(this,r(5),r(4))},function(e,t,r){e.exports=r(13).EventEmitter},function(e,t,r){"use strict";(function(t){function r(e,t){i(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,a){var s=this,o=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return o||u?(a?a(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(i,this,e)):t.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!a&&e?s._writableState?s._writableState.errorEmitted?t.nextTick(n,s):(s._writableState.errorEmitted=!0,t.nextTick(r,s,e)):t.nextTick(r,s,e):a?(t.nextTick(n,s),a(e)):t.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this,r(4))},function(e,t,r){"use strict";var n=r(21).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},function(e,t,r){"use strict";(function(t,n){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var a;e.exports=L,L.WritableState=S;var s={deprecate:r(47)},o=r(219),u=r(3).Buffer,d=(void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,f=r(220),h=r(221).getHighWaterMark,l=r(21).codes,p=l.ERR_INVALID_ARG_TYPE,_=l.ERR_METHOD_NOT_IMPLEMENTED,m=l.ERR_MULTIPLE_CALLBACK,y=l.ERR_STREAM_CANNOT_PIPE,b=l.ERR_STREAM_DESTROYED,g=l.ERR_STREAM_NULL_VALUES,M=l.ERR_STREAM_WRITE_AFTER_END,v=l.ERR_UNKNOWN_ENCODING,T=f.errorOrDestroy;function w(){}function S(e,t,s){a=a||r(22),e=e||{},"boolean"!=typeof s&&(s=t instanceof a),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,a=r.writecb;if("function"!=typeof a)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,a){--t.pendingcb,r?(n.nextTick(a,i),n.nextTick(O,e,t),e._writableState.errorEmitted=!0,T(e,i)):(a(i),e._writableState.errorEmitted=!0,T(e,i),O(e,t))}(e,r,i,t,a);else{var s=k(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||D(e,r),i?n.nextTick(E,e,r,s,a):E(e,r,s,a)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function L(e){var t=this instanceof(a=a||r(22));if(!t&&!c.call(L,this))return new L(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function A(e,t,r,n,i,a,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function E(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),O(e,t)}function D(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,a=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var o=0,u=!0;r;)a[o]=r,r.isBuf||(u=!1),r=r.next,o+=1;a.allBuffers=u,A(e,t,!0,t.length,a,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var d=r.chunk,c=r.encoding,f=r.callback;if(A(e,t,!1,t.objectMode?1:d.length,d,c,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function Y(e,t){e._final((function(r){t.pendingcb--,r&&T(e,r),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var r=k(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,n.nextTick(Y,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}r(1)(L,o),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(L,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===L&&(e&&e._writableState instanceof S)}})):c=function(e){return e instanceof this},L.prototype.pipe=function(){T(this,new y)},L.prototype.write=function(e,t,r){var i,a=this._writableState,s=!1,o=!a.objectMode&&(i=e,u.isBuffer(i)||i instanceof d);return o&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=a.defaultEncoding),"function"!=typeof r&&(r=w),a.ending?function(e,t){var r=new M;T(e,r),n.nextTick(t,r)}(this,r):(o||function(e,t,r,i){var a;return null===r?a=new g:"string"==typeof r||t.objectMode||(a=new p("chunk",["string","Buffer"],r)),!a||(T(e,a),n.nextTick(i,a),!1)}(this,a,e,r))&&(a.pendingcb++,s=function(e,t,r,n,i,a){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var o=t.objectMode?1:n.length;t.length+=o;var d=t.length<t.highWaterMark;d||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else A(e,t,!1,o,n,i,a);return d}(this,a,o,e,t,r)),s},L.prototype.cork=function(){this._writableState.corked++},L.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||D(this,e))},L.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(L.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),L.prototype._write=function(e,t,r){r(new _("_write()"))},L.prototype._writev=null,L.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(L.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),L.prototype.destroy=f.destroy,L.prototype._undestroy=f.undestroy,L.prototype._destroy=function(e,t){t(e)}}).call(this,r(5),r(4))},function(e,t,r){"use strict";e.exports=c;var n=r(21).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,a=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(22);function d(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new a);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);u.call(this,e),this._transformState={afterTransform:d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,r){h(e,t,r)}))}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new o;if(e._transformState.transforming)throw new s;return e.push(null)}r(1)(c,u),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,r){r(new i("_transform()"))},c.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},function(e,t,r){"use strict";var n=r(2).Buffer,i=r(337),a=r(338),s=ArrayBuffer.isView||function(e){try{return a(e),!0}catch(e){return!1}},o="undefined"!=typeof Uint8Array,u="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,d=u&&(n.prototype instanceof Uint8Array||n.TYPED_ARRAY_SUPPORT);e.exports=function(e,t){if(e instanceof n)return e;if("string"==typeof e)return n.from(e,t);if(u&&s(e)){if(0===e.byteLength)return n.alloc(0);if(d){var r=n.from(e.buffer,e.byteOffset,e.byteLength);if(r.byteLength===e.byteLength)return r}var a=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),c=n.from(a);if(c.length===e.byteLength)return c}if(o&&e instanceof Uint8Array)return n.from(e);var f=i(e);if(f)for(var h=0;h<e.length;h+=1){var l=e[h];if("number"!=typeof l||l<0||l>255||~~l!==l)throw new RangeError("Array items must be numbers in the range 0-255.")}if(f||n.isBuffer(e)&&e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e))return n.from(e);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}},function(e,t,r){"use strict";var n=r(226),i=r(51),a=i([n("%String.prototype.indexOf%")]);e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&a(e,".prototype.")>-1?i([r]):r}},function(e,t,r){"use strict";var n=r(227),i=r(339),a=r(340),s=r(341),o=r(342),u=r(228),d=r(26),c=r(343),f=r(344),h=r(345),l=r(346),p=r(347),_=r(348),m=r(349),y=r(350),b=Function,g=function(e){try{return b('"use strict"; return ('+e+").constructor;")()}catch(e){}},M=r(27),v=r(36),T=function(){throw new d},w=M?function(){try{return T}catch(e){try{return M(arguments,"callee").get}catch(e){return T}}}():T,S=r(353)(),L=r(230),A=r(232),E=r(231),D=r(53),k=r(52),Y={},O="undefined"!=typeof Uint8Array&&L?L(Uint8Array):void 0,F={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":S&&L?L([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":Y,"%AsyncGenerator%":Y,"%AsyncGeneratorFunction%":Y,"%AsyncIteratorPrototype%":Y,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?void 0:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?void 0:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"undefined"==typeof Float16Array?void 0:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":Y,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&L?L(L([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&S&&L?L((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":n,"%Object.getOwnPropertyDescriptor%":M,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":s,"%ReferenceError%":o,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&S&&L?L((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&L?L(""[Symbol.iterator]()):void 0,"%Symbol%":S?Symbol:void 0,"%SyntaxError%":u,"%ThrowTypeError%":w,"%TypedArray%":O,"%TypeError%":d,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":D,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":A,"%Math.abs%":f,"%Math.floor%":h,"%Math.max%":l,"%Math.min%":p,"%Math.pow%":_,"%Math.round%":m,"%Math.sign%":y,"%Reflect.getPrototypeOf%":E};if(L)try{null.error}catch(e){var P=L(L(e));F["%Error.prototype%"]=P}var I={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},R=r(28),x=r(357),j=R.call(k,Array.prototype.concat),K=R.call(D,Array.prototype.splice),H=R.call(k,String.prototype.replace),N=R.call(k,String.prototype.slice),C=R.call(k,RegExp.prototype.exec),U=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,B=/\\(\\)?/g,W=function(e){var t=N(e,0,1),r=N(e,-1);if("%"===t&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var n=[];return H(e,U,(function(e,t,r,i){n[n.length]=r?H(i,B,"$1"):t||e})),n},z=function(e,t){var r,n=e;if(x(I,n)&&(n="%"+(r=I[n])[0]+"%"),x(F,n)){var i=F[n];if(i===Y&&(i=function e(t){var r;if("%AsyncFunction%"===t)r=g("async function () {}");else if("%GeneratorFunction%"===t)r=g("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=g("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&L&&(r=L(i.prototype))}return F[t]=r,r}(n)),void 0===i&&!t)throw new d("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new d("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new d('"allowMissing" argument must be a boolean');if(null===C(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=W(e),n=r.length>0?r[0]:"",i=z("%"+n+"%",t),a=i.name,s=i.value,o=!1,c=i.alias;c&&(n=c[0],K(r,j([0,1],c)));for(var f=1,h=!0;f<r.length;f+=1){var l=r[f],p=N(l,0,1),_=N(l,-1);if(('"'===p||"'"===p||"`"===p||'"'===_||"'"===_||"`"===_)&&p!==_)throw new u("property names with quotes must have matching quotes");if("constructor"!==l&&h||(o=!0),x(F,a="%"+(n+="."+l)+"%"))s=F[a];else if(null!=s){if(!(l in s)){if(!t)throw new d("base intrinsic for "+e+" exists, but the property is not available.");return}if(M&&f+1>=r.length){var m=M(s,l);s=(h=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:s[l]}else h=x(s,l),s=s[l];h&&!o&&(F[a]=s)}}return s}},function(e,t,r){"use strict";e.exports=Object},function(e,t,r){"use strict";e.exports=SyntaxError},function(e,t,r){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}},function(e,t,r){"use strict";var n=r(231),i=r(232),a=r(354);e.exports=n?function(e){return n(e)}:i?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return i(e)}:a?function(e){return a(e)}:null},function(e,t,r){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},function(e,t,r){"use strict";var n=r(227);e.exports=n.getPrototypeOf||null},function(e,t,r){"use strict";var n=r(28),i=r(53),a=r(52),s=r(356);e.exports=s||n.call(a,i)},function(e,t,r){"use strict";var n=r(1),i=r(23),a=r(2).Buffer,s=[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(64);function u(){this.init(),this._w=o,i.call(this,64,56)}function d(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function l(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,o=0|this._d,u=0|this._e,p=0|this._f,_=0|this._g,m=0|this._h,y=0;y<16;++y)r[y]=e.readInt32BE(4*y);for(;y<64;++y)r[y]=0|(((t=r[y-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[y-7]+l(r[y-15])+r[y-16];for(var b=0;b<64;++b){var g=m+h(u)+d(u,p,_)+s[b]+r[b]|0,M=f(n)+c(n,i,a)|0;m=_,_=p,p=u,u=o+g|0,o=a,a=i,i=n,n=g+M|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=_+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var e=a.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},function(e,t,r){"use strict";var n=r(1),i=r(23),a=r(2).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],o=new Array(160);function u(){this.init(),this._w=o,i.call(this,128,112)}function d(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function l(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function _(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function y(e,t){return e>>>0<t>>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,a=0|this._dh,o=0|this._eh,u=0|this._fh,b=0|this._gh,g=0|this._hh,M=0|this._al,v=0|this._bl,T=0|this._cl,w=0|this._dl,S=0|this._el,L=0|this._fl,A=0|this._gl,E=0|this._hl,D=0;D<32;D+=2)t[D]=e.readInt32BE(4*D),t[D+1]=e.readInt32BE(4*D+4);for(;D<160;D+=2){var k=t[D-30],Y=t[D-30+1],O=l(k,Y),F=p(Y,k),P=_(k=t[D-4],Y=t[D-4+1]),I=m(Y,k),R=t[D-14],x=t[D-14+1],j=t[D-32],K=t[D-32+1],H=F+x|0,N=O+R+y(H,F)|0;N=(N=N+P+y(H=H+I|0,I)|0)+j+y(H=H+K|0,K)|0,t[D]=N,t[D+1]=H}for(var C=0;C<160;C+=2){N=t[C],H=t[C+1];var U=c(r,n,i),B=c(M,v,T),W=f(r,M),z=f(M,r),q=h(o,S),G=h(S,o),J=s[C],V=s[C+1],Z=d(o,u,b),Q=d(S,L,A),X=E+G|0,$=g+q+y(X,E)|0;$=($=($=$+Z+y(X=X+Q|0,Q)|0)+J+y(X=X+V|0,V)|0)+N+y(X=X+H|0,H)|0;var ee=z+B|0,te=W+U+y(ee,z)|0;g=b,E=A,b=u,A=L,u=o,L=S,o=a+$+y(S=w+X|0,w)|0,a=i,w=T,i=n,T=v,n=r,v=M,r=$+te+y(M=X+ee|0,X)|0}this._al=this._al+M|0,this._bl=this._bl+v|0,this._cl=this._cl+T|0,this._dl=this._dl+w|0,this._el=this._el+S|0,this._fl=this._fl+L|0,this._gl=this._gl+A|0,this._hl=this._hl+E|0,this._ah=this._ah+r+y(this._al,M)|0,this._bh=this._bh+n+y(this._bl,v)|0,this._ch=this._ch+i+y(this._cl,T)|0,this._dh=this._dh+a+y(this._dl,w)|0,this._eh=this._eh+o+y(this._el,S)|0,this._fh=this._fh+u+y(this._fl,L)|0,this._gh=this._gh+b+y(this._gl,A)|0,this._hh=this._hh+g+y(this._hl,E)|0},u.prototype._hash=function(){var e=a.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},function(e,t,r){e.exports=i;var n=r(13).EventEmitter;function i(){n.call(this)}r(1)(i,n),i.Readable=r(37),i.Writable=r(380),i.Duplex=r(381),i.Transform=r(382),i.PassThrough=r(383),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function a(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",a),e._isStdio||t&&!1===t.end||(r.on("end",o),r.on("close",u));var s=!1;function o(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function d(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",i),e.removeListener("drain",a),r.removeListener("end",o),r.removeListener("close",u),r.removeListener("error",d),e.removeListener("error",d),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",d),e.on("error",d),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},function(e,t,r){"use strict";(function(t,n){var i=r(38);e.exports=g;var a,s=r(373);g.ReadableState=b;r(13).EventEmitter;var o=function(e,t){return e.listeners(t).length},u=r(238),d=r(54).Buffer,c=(void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var f=Object.create(r(29));f.inherits=r(1);var h=r(374),l=void 0;l=h&&h.debuglog?h.debuglog("stream"):function(){};var p,_=r(375),m=r(239);f.inherits(g,u);var y=["error","close","destroy","pause","resume"];function b(e,t){e=e||{};var n=t instanceof(a=a||r(15));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new _,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=r(14).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function g(e){if(a=a||r(15),!(this instanceof g))return new g(e);this._readableState=new b(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function M(e,t,r,n,i){var a,s=e._readableState;null===t?(s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,w(e)}(e,s)):(i||(a=function(e,t){var r;n=t,d.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(s,t)),a?e.emit("error",a):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===d.prototype||(t=function(e){return d.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):v(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?v(e,s,t,!1):L(e,s)):v(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(s)}function v(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&w(e)),L(e,t)}Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),g.prototype.destroy=m.destroy,g.prototype._undestroy=m.undestroy,g.prototype._destroy=function(e,t){this.push(null),t(e)},g.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=d.from(e,t),t=""),r=!0),M(this,e,t,!1,r)},g.prototype.unshift=function(e){return M(this,e,null,!0,!1)},g.prototype.isPaused=function(){return!1===this._readableState.flowing},g.prototype.setEncoding=function(e){return p||(p=r(14).StringDecoder),this._readableState.decoder=new p(e),this._readableState.encoding=e,this};function T(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function w(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(l("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(S,e):S(e))}function S(e){l("emit readable"),e.emit("readable"),k(e)}function L(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(A,e,t))}function A(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(l("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function E(e){l("readable nexttick read 0"),e.read(0)}function D(e,t){t.reading||(l("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),k(e),t.flowing&&!t.reading&&e.read(0)}function k(e){var t=e._readableState;for(l("flow",t.flowing);t.flowing&&null!==e.read(););}function Y(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var a=r.data,s=e>a.length?a.length:e;if(s===a.length?i+=a:i+=a.slice(0,e),0===(e-=s)){s===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=d.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var a=n.data,s=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,s),0===(e-=s)){s===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(s));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function O(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(F,t,e))}function F(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}g.prototype.read=function(e){l("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return l("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?O(this):w(this),null;if(0===(e=T(e,t))&&t.ended)return 0===t.length&&O(this),null;var n,i=t.needReadable;return l("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&l("length less than watermark",i=!0),t.ended||t.reading?l("reading or ended",i=!1):i&&(l("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=T(r,t))),null===(n=e>0?Y(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&O(this)),null!==n&&this.emit("data",n),n},g.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(e,t){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,l("pipe count=%d opts=%j",a.pipesCount,t);var u=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:g;function d(t,n){l("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,l("cleanup"),e.removeListener("close",y),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",m),e.removeListener("unpipe",d),r.removeListener("end",c),r.removeListener("end",g),r.removeListener("data",_),h=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function c(){l("onend"),e.end()}a.endEmitted?i.nextTick(u):r.once("end",u),e.on("unpipe",d);var f=function(e){return function(){var t=e._readableState;l("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,k(e))}}(r);e.on("drain",f);var h=!1;var p=!1;function _(t){l("ondata"),p=!1,!1!==e.write(t)||p||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==P(a.pipes,e))&&!h&&(l("false write response, pause",a.awaitDrain),a.awaitDrain++,p=!0),r.pause())}function m(t){l("onerror",t),g(),e.removeListener("error",m),0===o(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",b),g()}function b(){l("onfinish"),e.removeListener("close",y),g()}function g(){l("unpipe"),r.unpipe(e)}return r.on("data",_),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",y),e.once("finish",b),e.emit("pipe",r),a.flowing||(l("pipe resume"),r.resume()),e},g.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var s=P(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},g.prototype.on=function(e,t){var r=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&w(this):i.nextTick(E,this))}return r},g.prototype.addListener=g.prototype.on,g.prototype.resume=function(){var e=this._readableState;return e.flowing||(l("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}(this,e)),this},g.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this},g.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(l("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(l("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<y.length;a++)e.on(y[a],this.emit.bind(this,y[a]));return this._read=function(t){l("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(g.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),g._fromList=Y}).call(this,r(5),r(4))},function(e,t,r){e.exports=r(13).EventEmitter},function(e,t,r){"use strict";var n=r(38);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,e)):n.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,r){"use strict";e.exports=s;var n=r(15),i=Object.create(r(29));function a(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);n.call(this,e),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",o)}function o(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=r(1),i.inherits(s,n),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},function(e,t,r){"use strict";var n=r(1),i=r(384),a=r(12),s=r(2).Buffer,o=r(385),u=r(217),d=r(50),c=s.alloc(128);function f(e,t){a.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var r="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>r)?t=("rmd160"===e?new u:d(e)).update(t).digest():t.length<r&&(t=s.concat([t,c],r));for(var n=this._ipad=s.allocUnsafe(r),i=this._opad=s.allocUnsafe(r),o=0;o<r;o++)n[o]=54^t[o],i[o]=92^t[o];this._hash="rmd160"===e?new u:d(e),this._hash.update(n)}n(f,a),f.prototype._update=function(e){this._hash.update(e)},f.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new u:d(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new f("rmd160",t):"md5"===e?new i(o,t):new f(e,t)}},function(e){e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},function(e,t,r){"use strict";t.pbkdf2=r(387),t.pbkdf2Sync=r(246)},function(e,t,r){"use strict";var n=Math.pow(2,30)-1;e.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>n||t!=t)throw new TypeError("Bad key length")}},function(e,t,r){"use strict";(function(t,r){var n;if(t.process&&t.process.browser)n="utf-8";else if(t.process&&t.process.version){n=parseInt(r.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else n="utf-8";e.exports=n}).call(this,r(5),r(4))},function(e,t,r){"use strict";var n=r(388),i=r(390),a=r(50),s=r(2).Buffer,o=r(244),u=r(245),d=r(247),c=s.alloc(128),f={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},h={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function l(e){return(new i).update(e).digest()}function p(e,t,r){var i=function(e){return"rmd160"===e||"ripemd160"===e?l:"md5"===e?n:function(t){return a(e).update(t).digest()}}(e),o="sha512"===e||"sha384"===e?128:64;t.length>o?t=i(t):t.length<o&&(t=s.concat([t,c],o));for(var u=s.allocUnsafe(o+f[e]),d=s.allocUnsafe(o+f[e]),h=0;h<o;h++)u[h]=54^t[h],d[h]=92^t[h];var p=s.allocUnsafe(o+r+4);u.copy(p,0,0,o),this.ipad1=p,this.ipad2=u,this.opad=d,this.alg=e,this.blocksize=o,this.hash=i,this.size=f[e]}p.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(e,t,r,n,i){o(r,n),e=d(e,u,"Password"),t=d(t,u,"Salt");var a=(i||"sha1").toLowerCase(),c=h[a]||a,l=f[c];if("number"!=typeof l||!l)throw new TypeError("Digest algorithm not supported: "+i);var _=new p(c,e,t.length),m=s.allocUnsafe(n),y=s.allocUnsafe(t.length+4);t.copy(y,0,0,t.length);for(var b=0,g=l,M=Math.ceil(n/g),v=1;v<=M;v++){y.writeUInt32BE(v,t.length);for(var T=_.run(y,_.ipad1),w=T,S=1;S<r;S++){w=_.run(w,_.ipad2);for(var L=0;L<g;L++)T[L]^=w[L]}T.copy(m,b),b+=g}return m}},function(e,t,r){"use strict";var n=r(2).Buffer,i=r(224),a="undefined"!=typeof Uint8Array,s=a&&"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView;e.exports=function(e,t,r){if("string"==typeof e||n.isBuffer(e)||a&&e instanceof Uint8Array||s&&s(e))return i(e,t);throw new TypeError(r+" must be a string, a Buffer, a Uint8Array, or a DataView")}},function(e,t,r){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,a=0,s=6;s>=0;s-=2){for(var o=0;o<=24;o+=8)i<<=1,i|=t>>>o+s&1;for(o=0;o<=24;o+=8)i<<=1,i|=e>>>o+s&1}for(s=6;s>=0;s-=2){for(o=1;o<=25;o+=8)a<<=1,a|=t>>>o+s&1;for(o=1;o<=25;o+=8)a<<=1,a|=e>>>o+s&1}r[n+0]=i>>>0,r[n+1]=a>>>0},t.rip=function(e,t,r,n){for(var i=0,a=0,s=0;s<4;s++)for(var o=24;o>=0;o-=8)i<<=1,i|=t>>>o+s&1,i<<=1,i|=e>>>o+s&1;for(s=4;s<8;s++)for(o=24;o>=0;o-=8)a<<=1,a|=t>>>o+s&1,a<<=1,a|=e>>>o+s&1;r[n+0]=i>>>0,r[n+1]=a>>>0},t.pc1=function(e,t,r,n){for(var i=0,a=0,s=7;s>=5;s--){for(var o=0;o<=24;o+=8)i<<=1,i|=t>>o+s&1;for(o=0;o<=24;o+=8)i<<=1,i|=e>>o+s&1}for(o=0;o<=24;o+=8)i<<=1,i|=t>>o+s&1;for(s=1;s<=3;s++){for(o=0;o<=24;o+=8)a<<=1,a|=t>>o+s&1;for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+s&1}for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+s&1;r[n+0]=i>>>0,r[n+1]=a>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,r,i){for(var a=0,s=0,o=n.length>>>1,u=0;u<o;u++)a<<=1,a|=e>>>n[u]&1;for(u=o;u<n.length;u++)s<<=1,s|=t>>>n[u]&1;r[i+0]=a>>>0,r[i+1]=s>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var a=23;a>=15;a-=4)n<<=6,n|=e>>>a&63;for(a=11;a>=3;a-=4)i|=e>>>a&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(e>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(t>>>18-6*n&63)]}return r>>>0};var a=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r<a.length;r++)t<<=1,t|=e>>>a[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length<t;)n="0"+n;for(var i=[],a=0;a<t;a+=r)i.push(n.slice(a,a+r));return i.join(" ")}},function(e,t,r){"use strict";var n=r(8),i=r(1),a=r(248),s=r(56);function o(){this.tmp=new Array(2),this.keys=null}function u(e){s.call(this,e);var t=new o;this._desState=t,this.deriveKeys(t,e.key)}i(u,s),e.exports=u,u.create=function(e){return new u(e)};var d=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var r=a.readUInt32BE(t,0),i=a.readUInt32BE(t,4);a.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var s=0;s<e.keys.length;s+=2){var o=d[s>>>1];r=a.r28shl(r,o),i=a.r28shl(i,o),a.pc2(r,i,e.keys,s)}},u.prototype._update=function(e,t,r,n){var i=this._desState,s=a.readUInt32BE(e,t),o=a.readUInt32BE(e,t+4);a.ip(s,o,i.tmp,0),s=i.tmp[0],o=i.tmp[1],"encrypt"===this.type?this._encrypt(i,s,o,i.tmp,0):this._decrypt(i,s,o,i.tmp,0),s=i.tmp[0],o=i.tmp[1],a.writeUInt32BE(r,s,n),a.writeUInt32BE(r,o,n+4)},u.prototype._pad=function(e,t){if(!1===this.padding)return!1;for(var r=e.length-t,n=t;n<e.length;n++)e[n]=r;return!0},u.prototype._unpad=function(e){if(!1===this.padding)return e;for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)n.equal(e[r],t);return e.slice(0,e.length-t)},u.prototype._encrypt=function(e,t,r,n,i){for(var s=t,o=r,u=0;u<e.keys.length;u+=2){var d=e.keys[u],c=e.keys[u+1];a.expand(o,e.tmp,0),d^=e.tmp[0],c^=e.tmp[1];var f=a.substitute(d,c),h=o;o=(s^a.permute(f))>>>0,s=h}a.rip(o,s,n,i)},u.prototype._decrypt=function(e,t,r,n,i){for(var s=r,o=t,u=e.keys.length-2;u>=0;u-=2){var d=e.keys[u],c=e.keys[u+1];a.expand(s,e.tmp,0),d^=e.tmp[0],c^=e.tmp[1];var f=a.substitute(d,c),h=s;s=(o^a.permute(f))>>>0,o=h}a.rip(s,o,n,i)}},function(e,t,r){var n=r(30),i=r(2).Buffer,a=r(251);function s(e){var t=e._cipher.encryptBlockRaw(e._prev);return a(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),a=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var o=0;o<r;o++){var u=s(e),d=a+16*o;e._cache.writeUInt32BE(u[0],d+0),e._cache.writeUInt32BE(u[1],d+4),e._cache.writeUInt32BE(u[2],d+8),e._cache.writeUInt32BE(u[3],d+12)}var c=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,c)}},function(e,t){e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},function(e){e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},function(e,t,r){var n=r(39),i=r(2).Buffer,a=r(12),s=r(1),o=r(404),u=r(30),d=r(251);function c(e,t,r,s){a.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(t);var c=this._cipher.encryptBlock(u);this._ghash=new o(c),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new o(r),a=t.length,s=a%16;n.update(t),s&&(s=16-s,n.update(i.alloc(s,0))),n.update(i.alloc(8,0));var u=8*a,c=i.alloc(8);c.writeUIntBE(u,0,8),n.update(c),e._finID=n.state;var f=i.from(e._finID);return d(f),f}(this,r,c),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}s(c,a),c.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},c.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i<n;++i)r+=e[i]^t[i];return r}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},c.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},c.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},c.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=c},function(e,t,r){var n=r(39),i=r(2).Buffer,a=r(12);function s(e,t,r,s){a.call(this),this._cipher=new n.AES(t),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=e}r(1)(s,a),s.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},e.exports=s},function(e,t,r){var n=r(18);e.exports=b,b.simpleSieve=m,b.fermatTest=y;var i=r(7),a=new i(24),s=new(r(256)),o=new i(1),u=new i(2),d=new i(5),c=(new i(16),new i(8),new i(10)),f=new i(3),h=(new i(7),new i(11)),l=new i(4),p=(new i(12),null);function _(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<t&&e[i]<=n&&r%e[i]!=0;i++);t!==i&&e[i]<=n||(e[t++]=r)}return p=e,e}function m(e){for(var t=_(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function y(e){var t=i.mont(e);return 0===u.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function b(e,t){if(e<16)return new i(2===t||5===t?[140,123]:[140,39]);var r,p;for(t=new i(t);;){for(r=new i(n(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(o),r.testn(1)||r.iadd(u),t.cmp(u)){if(!t.cmp(d))for(;r.mod(c).cmp(f);)r.iadd(l)}else for(;r.mod(a).cmp(h);)r.iadd(l);if(m(p=r.shrn(1))&&m(r)&&y(p)&&y(r)&&s.test(p)&&s.test(r))return r}}},function(e,t,r){var n=r(7),i=r(59);function a(e){this.rand=e||new i.Rand}e.exports=a,a.create=function(e){return new a(e)},a.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},a.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},a.prototype.test=function(e,t,r){var i=e.bitLength(),a=n.mont(e),s=new n(1).toRed(a);t||(t=Math.max(1,i/48|0));for(var o=e.subn(1),u=0;!o.testn(u);u++);for(var d=e.shrn(u),c=o.toRed(a);t>0;t--){var f=this._randrange(new n(2),o);r&&r(f);var h=f.toRed(a).redPow(d);if(0!==h.cmp(s)&&0!==h.cmp(c)){for(var l=1;l<u;l++){if(0===(h=h.redSqr()).cmp(s))return!1;if(0===h.cmp(c))break}if(l===u)return!1}}return!0},a.prototype.getDivisor=function(e,t){var r=e.bitLength(),i=n.mont(e),a=new n(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var s=e.subn(1),o=0;!s.testn(o);o++);for(var u=e.shrn(o),d=s.toRed(i);t>0;t--){var c=this._randrange(new n(2),s),f=e.gcd(c);if(0!==f.cmpn(1))return f;var h=c.toRed(i).redPow(u);if(0!==h.cmp(a)&&0!==h.cmp(d)){for(var l=1;l<o;l++){if(0===(h=h.redSqr()).cmp(a))return h.fromRed().subn(1).gcd(e);if(0===h.cmp(d))break}if(l===o)return(h=h.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},function(e,t,r){"use strict";var n=t;function i(e){return 1===e.length?"0"+e:e}function a(e){for(var t="",r=0;r<e.length;r++)t+=i(e[r].toString(16));return t}n.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),a=i>>8,s=255&i;a?r.push(a,s):r.push(s)}return r},n.zero2=i,n.toHex=a,n.encode=function(e,t){return"hex"===t?a(e):e}},function(e,t,r){"use strict";var n=t;n.base=r(41),n.short=r(417),n.mont=r(418),n.edwards=r(419)},function(e,t,r){"use strict";var n=r(11).rotr32;function i(e,t,r){return e&t^~e&r}function a(e,t,r){return e&t^e&r^t&r}function s(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?s(t,r,n):2===e?a(t,r,n):void 0},t.ch32=i,t.maj32=a,t.p32=s,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=r(11),i=r(31),a=r(259),s=r(8),o=n.sum32,u=n.sum32_4,d=n.sum32_5,c=a.ch32,f=a.maj32,h=a.s0_256,l=a.s1_256,p=a.g0_256,_=a.g1_256,m=i.BlockHash,y=[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];function b(){if(!(this instanceof b))return new b;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(b,m),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=u(_(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],a=this.h[1],m=this.h[2],y=this.h[3],b=this.h[4],g=this.h[5],M=this.h[6],v=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var T=d(v,l(b),c(b,g,M),this.k[n],r[n]),w=o(h(i),f(i,a,m));v=M,M=g,g=b,b=o(y,T),y=m,m=a,a=i,i=o(T,w)}this.h[0]=o(this.h[0],i),this.h[1]=o(this.h[1],a),this.h[2]=o(this.h[2],m),this.h[3]=o(this.h[3],y),this.h[4]=o(this.h[4],b),this.h[5]=o(this.h[5],g),this.h[6]=o(this.h[6],M),this.h[7]=o(this.h[7],v)},b.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(e,t,r){"use strict";var n=r(11),i=r(31),a=r(8),s=n.rotr64_hi,o=n.rotr64_lo,u=n.shr64_hi,d=n.shr64_lo,c=n.sum64,f=n.sum64_hi,h=n.sum64_lo,l=n.sum64_4_hi,p=n.sum64_4_lo,_=n.sum64_5_hi,m=n.sum64_5_lo,y=i.BlockHash,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function g(){if(!(this instanceof g))return new g;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function M(e,t,r,n,i){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function v(e,t,r,n,i,a){var s=t&n^~t&a;return s<0&&(s+=4294967296),s}function T(e,t,r,n,i){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function w(e,t,r,n,i,a){var s=t&n^t&a^n&a;return s<0&&(s+=4294967296),s}function S(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function L(e,t){var r=o(e,t,28)^o(t,e,2)^o(t,e,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function E(e,t){var r=o(e,t,14)^o(e,t,18)^o(t,e,9);return r<0&&(r+=4294967296),r}function D(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function k(e,t){var r=o(e,t,1)^o(e,t,8)^d(e,t,7);return r<0&&(r+=4294967296),r}function Y(e,t){var r=s(e,t,19)^s(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}function O(e,t){var r=o(e,t,19)^o(t,e,29)^d(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(g,y),e.exports=g,g.blockSize=1024,g.outSize=512,g.hmacStrength=192,g.padLength=128,g.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=Y(r[n-4],r[n-3]),a=O(r[n-4],r[n-3]),s=r[n-14],o=r[n-13],u=D(r[n-30],r[n-29]),d=k(r[n-30],r[n-29]),c=r[n-32],f=r[n-31];r[n]=l(i,a,s,o,u,d,c,f),r[n+1]=p(i,a,s,o,u,d,c,f)}},g.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],s=this.h[2],o=this.h[3],u=this.h[4],d=this.h[5],l=this.h[6],p=this.h[7],y=this.h[8],b=this.h[9],g=this.h[10],D=this.h[11],k=this.h[12],Y=this.h[13],O=this.h[14],F=this.h[15];a(this.k.length===r.length);for(var P=0;P<r.length;P+=2){var I=O,R=F,x=A(y,b),j=E(y,b),K=M(y,b,g,D,k),H=v(y,b,g,D,k,Y),N=this.k[P],C=this.k[P+1],U=r[P],B=r[P+1],W=_(I,R,x,j,K,H,N,C,U,B),z=m(I,R,x,j,K,H,N,C,U,B);I=S(n,i),R=L(n,i),x=T(n,i,s,o,u),j=w(n,i,s,o,u,d);var q=f(I,R,x,j),G=h(I,R,x,j);O=k,F=Y,k=g,Y=D,g=y,D=b,y=f(l,p,W,z),b=h(p,p,W,z),l=u,p=d,u=s,d=o,s=n,o=i,n=f(W,z,q,G),i=h(W,z,q,G)}c(this.h,0,n,i),c(this.h,2,s,o),c(this.h,4,u,d),c(this.h,6,l,p),c(this.h,8,y,b),c(this.h,10,g,D),c(this.h,12,k,Y),c(this.h,14,O,F)},g.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(434).Buffer}catch(e){}function o(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function u(e,t,r){var n=o(e,r);return r-1>=t&&(n|=o(e,r-1)<<4),n}function d(e,t,r,i){for(var a=0,s=0,o=Math.min(e.length,r),u=t;u<o;u++){var d=e.charCodeAt(u)-48;a*=i,s=d>=49?d-49+10:d>=17?d-17+10:d,n(d>=0&&s<i,"Invalid character"),a+=s}return a}function c(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,s,o=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this._strip()},a.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,a=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=u(e,t,n)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;this._strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,s=a%n,o=Math.min(a,a-s)+r,u=0,c=r;c<o;c+=n)u=d(e,c,c+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=d(e,c,e.length,t),c=0;c<s;c++)f*=t;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype._move=function(e){c(e,this)},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(e){a.prototype.inspect=f}else a.prototype.inspect=f;function f(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,a=0,s=0;s<this.length;s++){var o=this.words[s],u=(16777215&(o<<i|a)).toString(16);a=o>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==a||s!==this.length-1?h[6-u.length]+u+r:u+r}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=l[e],c=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var _=f.modrn(c).toString(e);r=(f=f.idivn(c)).isZero()?_+r:h[d-_.length]+_+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16,2)},s&&(a.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function _(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],s=i*a,o=67108863&s,u=s/67108864|0;r.words[0]=o;for(var d=1;d<n;d++){for(var c=u>>>26,f=67108863&u,h=Math.min(d,t.length-1),l=Math.max(0,d-e.length+1);l<=h;l++){var p=d-l|0;c+=(s=(i=0|e.words[p])*(a=0|t.words[l])+f)/67108864|0,f=67108863&s}r.words[d]=0|f,u=0|c}return 0!==u?r.words[d]=0|u:r.length--,r._strip()}a.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,a);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},a.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,a=0;i<this.length;i++){var s=this.words[i]<<a|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===a?(r<e.length&&(e[r++]=s>>24&255),n=0,a=0):(n=s>>>24,a+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},a.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,a=0;i<this.length;i++){var s=this.words[i]<<a|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===a?(r>=0&&(e[r--]=s>>24&255),n=0,a=0):(n=s>>>24,a+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},a.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},a.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},a.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},a.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a<n.length;a++)t=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<r.length;a++)t=(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,s=0;s<n.length;s++)a=(t=(0|r.words[s])-(0|n.words[s])+a)>>26,this.words[s]=67108863&t;for(;0!==a&&s<r.length;s++)a=(t=(0|r.words[s])+a)>>26,this.words[s]=67108863&t;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,r){var n,i,a,s=e.words,o=t.words,u=r.words,d=0,c=0|s[0],f=8191&c,h=c>>>13,l=0|s[1],p=8191&l,_=l>>>13,m=0|s[2],y=8191&m,b=m>>>13,g=0|s[3],M=8191&g,v=g>>>13,T=0|s[4],w=8191&T,S=T>>>13,L=0|s[5],A=8191&L,E=L>>>13,D=0|s[6],k=8191&D,Y=D>>>13,O=0|s[7],F=8191&O,P=O>>>13,I=0|s[8],R=8191&I,x=I>>>13,j=0|s[9],K=8191&j,H=j>>>13,N=0|o[0],C=8191&N,U=N>>>13,B=0|o[1],W=8191&B,z=B>>>13,q=0|o[2],G=8191&q,J=q>>>13,V=0|o[3],Z=8191&V,Q=V>>>13,X=0|o[4],$=8191&X,ee=X>>>13,te=0|o[5],re=8191&te,ne=te>>>13,ie=0|o[6],ae=8191&ie,se=ie>>>13,oe=0|o[7],ue=8191&oe,de=oe>>>13,ce=0|o[8],fe=8191&ce,he=ce>>>13,le=0|o[9],pe=8191&le,_e=le>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(d+(n=Math.imul(f,C))|0)+((8191&(i=(i=Math.imul(f,U))+Math.imul(h,C)|0))<<13)|0;d=((a=Math.imul(h,U))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,C),i=(i=Math.imul(p,U))+Math.imul(_,C)|0,a=Math.imul(_,U);var ye=(d+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,z)|0)+Math.imul(h,W)|0))<<13)|0;d=((a=a+Math.imul(h,z)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,C),i=(i=Math.imul(y,U))+Math.imul(b,C)|0,a=Math.imul(b,U),n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,z)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,z)|0;var be=(d+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(h,G)|0))<<13)|0;d=((a=a+Math.imul(h,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(M,C),i=(i=Math.imul(M,U))+Math.imul(v,C)|0,a=Math.imul(v,U),n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,z)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,z)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(_,G)|0,a=a+Math.imul(_,J)|0;var ge=(d+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,Q)|0)+Math.imul(h,Z)|0))<<13)|0;d=((a=a+Math.imul(h,Q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(w,C),i=(i=Math.imul(w,U))+Math.imul(S,C)|0,a=Math.imul(S,U),n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,z)|0)+Math.imul(v,W)|0,a=a+Math.imul(v,z)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,G)|0,a=a+Math.imul(b,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(_,Z)|0,a=a+Math.imul(_,Q)|0;var Me=(d+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(h,$)|0))<<13)|0;d=((a=a+Math.imul(h,ee)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(A,C),i=(i=Math.imul(A,U))+Math.imul(E,C)|0,a=Math.imul(E,U),n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,z)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,z)|0,n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(v,G)|0,a=a+Math.imul(v,J)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(b,Z)|0,a=a+Math.imul(b,Q)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,ee)|0;var ve=(d+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(h,re)|0))<<13)|0;d=((a=a+Math.imul(h,ne)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(k,C),i=(i=Math.imul(k,U))+Math.imul(Y,C)|0,a=Math.imul(Y,U),n=n+Math.imul(A,W)|0,i=(i=i+Math.imul(A,z)|0)+Math.imul(E,W)|0,a=a+Math.imul(E,z)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(S,G)|0,a=a+Math.imul(S,J)|0,n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,Q)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,$)|0,a=a+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(_,re)|0,a=a+Math.imul(_,ne)|0;var Te=(d+(n=n+Math.imul(f,ae)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(h,ae)|0))<<13)|0;d=((a=a+Math.imul(h,se)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(F,C),i=(i=Math.imul(F,U))+Math.imul(P,C)|0,a=Math.imul(P,U),n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,z)|0)+Math.imul(Y,W)|0,a=a+Math.imul(Y,z)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(E,G)|0,a=a+Math.imul(E,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(S,Z)|0,a=a+Math.imul(S,Q)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(b,re)|0,a=a+Math.imul(b,ne)|0,n=n+Math.imul(p,ae)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(_,ae)|0,a=a+Math.imul(_,se)|0;var we=(d+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(h,ue)|0))<<13)|0;d=((a=a+Math.imul(h,de)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(R,C),i=(i=Math.imul(R,U))+Math.imul(x,C)|0,a=Math.imul(x,U),n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,z)|0)+Math.imul(P,W)|0,a=a+Math.imul(P,z)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(Y,G)|0,a=a+Math.imul(Y,J)|0,n=n+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,Q)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(v,re)|0,a=a+Math.imul(v,ne)|0,n=n+Math.imul(y,ae)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,se)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(_,ue)|0,a=a+Math.imul(_,de)|0;var Se=(d+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,he)|0)+Math.imul(h,fe)|0))<<13)|0;d=((a=a+Math.imul(h,he)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(K,C),i=(i=Math.imul(K,U))+Math.imul(H,C)|0,a=Math.imul(H,U),n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,z)|0)+Math.imul(x,W)|0,a=a+Math.imul(x,z)|0,n=n+Math.imul(F,G)|0,i=(i=i+Math.imul(F,J)|0)+Math.imul(P,G)|0,a=a+Math.imul(P,J)|0,n=n+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(Y,Z)|0,a=a+Math.imul(Y,Q)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(M,ae)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,se)|0,n=n+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,de)|0)+Math.imul(b,ue)|0,a=a+Math.imul(b,de)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(_,fe)|0,a=a+Math.imul(_,he)|0;var Le=(d+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,_e)|0)+Math.imul(h,pe)|0))<<13)|0;d=((a=a+Math.imul(h,_e)|0)+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,n=Math.imul(K,W),i=(i=Math.imul(K,z))+Math.imul(H,W)|0,a=Math.imul(H,z),n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,J)|0)+Math.imul(x,G)|0,a=a+Math.imul(x,J)|0,n=n+Math.imul(F,Z)|0,i=(i=i+Math.imul(F,Q)|0)+Math.imul(P,Z)|0,a=a+Math.imul(P,Q)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(Y,$)|0,a=a+Math.imul(Y,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,n=n+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(v,ue)|0,a=a+Math.imul(v,de)|0,n=n+Math.imul(y,fe)|0,i=(i=i+Math.imul(y,he)|0)+Math.imul(b,fe)|0,a=a+Math.imul(b,he)|0;var Ae=(d+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,_e)|0)+Math.imul(_,pe)|0))<<13)|0;d=((a=a+Math.imul(_,_e)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(K,G),i=(i=Math.imul(K,J))+Math.imul(H,G)|0,a=Math.imul(H,J),n=n+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(x,Z)|0,a=a+Math.imul(x,Q)|0,n=n+Math.imul(F,$)|0,i=(i=i+Math.imul(F,ee)|0)+Math.imul(P,$)|0,a=a+Math.imul(P,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(Y,re)|0,a=a+Math.imul(Y,ne)|0,n=n+Math.imul(A,ae)|0,i=(i=i+Math.imul(A,se)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,se)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(S,ue)|0,a=a+Math.imul(S,de)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,he)|0)+Math.imul(v,fe)|0,a=a+Math.imul(v,he)|0;var Ee=(d+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,_e)|0)+Math.imul(b,pe)|0))<<13)|0;d=((a=a+Math.imul(b,_e)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(K,Z),i=(i=Math.imul(K,Q))+Math.imul(H,Z)|0,a=Math.imul(H,Q),n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(x,$)|0,a=a+Math.imul(x,ee)|0,n=n+Math.imul(F,re)|0,i=(i=i+Math.imul(F,ne)|0)+Math.imul(P,re)|0,a=a+Math.imul(P,ne)|0,n=n+Math.imul(k,ae)|0,i=(i=i+Math.imul(k,se)|0)+Math.imul(Y,ae)|0,a=a+Math.imul(Y,se)|0,n=n+Math.imul(A,ue)|0,i=(i=i+Math.imul(A,de)|0)+Math.imul(E,ue)|0,a=a+Math.imul(E,de)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(S,fe)|0,a=a+Math.imul(S,he)|0;var De=(d+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,_e)|0)+Math.imul(v,pe)|0))<<13)|0;d=((a=a+Math.imul(v,_e)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(K,$),i=(i=Math.imul(K,ee))+Math.imul(H,$)|0,a=Math.imul(H,ee),n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(x,re)|0,a=a+Math.imul(x,ne)|0,n=n+Math.imul(F,ae)|0,i=(i=i+Math.imul(F,se)|0)+Math.imul(P,ae)|0,a=a+Math.imul(P,se)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(Y,ue)|0,a=a+Math.imul(Y,de)|0,n=n+Math.imul(A,fe)|0,i=(i=i+Math.imul(A,he)|0)+Math.imul(E,fe)|0,a=a+Math.imul(E,he)|0;var ke=(d+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,_e)|0)+Math.imul(S,pe)|0))<<13)|0;d=((a=a+Math.imul(S,_e)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(K,re),i=(i=Math.imul(K,ne))+Math.imul(H,re)|0,a=Math.imul(H,ne),n=n+Math.imul(R,ae)|0,i=(i=i+Math.imul(R,se)|0)+Math.imul(x,ae)|0,a=a+Math.imul(x,se)|0,n=n+Math.imul(F,ue)|0,i=(i=i+Math.imul(F,de)|0)+Math.imul(P,ue)|0,a=a+Math.imul(P,de)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,he)|0)+Math.imul(Y,fe)|0,a=a+Math.imul(Y,he)|0;var Ye=(d+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,_e)|0)+Math.imul(E,pe)|0))<<13)|0;d=((a=a+Math.imul(E,_e)|0)+(i>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,n=Math.imul(K,ae),i=(i=Math.imul(K,se))+Math.imul(H,ae)|0,a=Math.imul(H,se),n=n+Math.imul(R,ue)|0,i=(i=i+Math.imul(R,de)|0)+Math.imul(x,ue)|0,a=a+Math.imul(x,de)|0,n=n+Math.imul(F,fe)|0,i=(i=i+Math.imul(F,he)|0)+Math.imul(P,fe)|0,a=a+Math.imul(P,he)|0;var Oe=(d+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,_e)|0)+Math.imul(Y,pe)|0))<<13)|0;d=((a=a+Math.imul(Y,_e)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(K,ue),i=(i=Math.imul(K,de))+Math.imul(H,ue)|0,a=Math.imul(H,de),n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,he)|0)+Math.imul(x,fe)|0,a=a+Math.imul(x,he)|0;var Fe=(d+(n=n+Math.imul(F,pe)|0)|0)+((8191&(i=(i=i+Math.imul(F,_e)|0)+Math.imul(P,pe)|0))<<13)|0;d=((a=a+Math.imul(P,_e)|0)+(i>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(K,fe),i=(i=Math.imul(K,he))+Math.imul(H,fe)|0,a=Math.imul(H,he);var Pe=(d+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,_e)|0)+Math.imul(x,pe)|0))<<13)|0;d=((a=a+Math.imul(x,_e)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ie=(d+(n=Math.imul(K,pe))|0)+((8191&(i=(i=Math.imul(K,_e))+Math.imul(H,pe)|0))<<13)|0;return d=((a=Math.imul(H,_e))+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,u[0]=me,u[1]=ye,u[2]=be,u[3]=ge,u[4]=Me,u[5]=ve,u[6]=Te,u[7]=we,u[8]=Se,u[9]=Le,u[10]=Ae,u[11]=Ee,u[12]=De,u[13]=ke,u[14]=Ye,u[15]=Oe,u[16]=Fe,u[17]=Pe,u[18]=Ie,0!==d&&(u[19]=d,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var s=i;i=0;for(var o=67108863&n,u=Math.min(a,t.length-1),d=Math.max(0,a-e.length+1);d<=u;d++){var c=a-d,f=(0|e.words[c])*(0|t.words[d]),h=67108863&f;o=67108863&(h=h+o|0),i+=(s=(s=s+(f/67108864|0)|0)+(h>>>26)|0)>>>26,s&=67108863}r.words[a]=o,n=s,s=i}return 0!==n?r.words[a]=n:r.length--,r._strip()}function b(e,t,r){return y(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(m=_),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?_(this,e,t):r<1024?y(this,e,t):b(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},g.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},g.prototype.permute=function(e,t,r,n,i,a){for(var s=0;s<a;s++)n[s]=t[e[s]],i[s]=r[e[s]]},g.prototype.transform=function(e,t,r,n,i,a){this.permute(a,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var o=s<<1,u=Math.cos(2*Math.PI/o),d=Math.sin(2*Math.PI/o),c=0;c<i;c+=o)for(var f=u,h=d,l=0;l<s;l++){var p=r[c+l],_=n[c+l],m=r[c+l+s],y=n[c+l+s],b=f*m-h*y;y=f*y+h*m,m=b,r[c+l]=p+m,n[c+l]=_+y,r[c+l+s]=p-m,n[c+l+s]=_-y,l!==o&&(b=u*f-d*h,h=u*h+d*f,f=b)}},g.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},g.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},g.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},g.prototype.convert13b=function(e,t,r,i){for(var a=0,s=0;s<t;s++)a+=0|e[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===a),n(0==(-8192&a))},g.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},g.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),a=this.stub(n),s=new Array(n),o=new Array(n),u=new Array(n),d=new Array(n),c=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,d,n),this.transform(s,a,o,u,n,i),this.transform(d,a,c,f,n,i);for(var l=0;l<n;l++){var p=o[l]*c[l]-u[l]*f[l];u[l]=o[l]*f[l]+u[l]*c[l],o[l]=p}return this.conjugate(o,u,n),this.transform(o,u,h,a,n,i),this.conjugate(h,a,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),b(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var a=(0|this.words[i])*e,s=(67108863&a)+(67108863&r);r>>=26,r+=a/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),this.length=0===e?1:this.length,t?this.ineg():this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var o=this.words[t]&a,u=(0|this.words[t])-o<<r;this.words[t]=u|s,s=o>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},a.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<<a,u=r;if(i-=s,i=Math.max(0,i),u){for(var d=0;d<s;d++)u.words[d]=this.words[d];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,d=0;d<this.length;d++)this.words[d]=this.words[d+s];else this.words[0]=0,this.length=1;var c=0;for(d=this.length-1;d>=0&&(0!==c||d>=i);d--){var f=0|this.words[d];this.words[d]=c<<26-a|f>>>a,c=f&o}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r)&&!!(this.words[r]&i)},a.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var i,a,s=e.length+r;this._expand(s);var o=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+o;var u=(0|e.words[i])*t;o=((a-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)o=(a=(0|this.words[i+r])+o)>>26,this.words[i+r]=67108863&a;if(0===o)return this._strip();for(n(-1===o),o=0,i=0;i<this.length;i++)o=(a=-(0|this.words[i])+o)>>26,this.words[i]=67108863&a;return this.negative=1,this._strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var o,u=n.length-i.length;if("mod"!==t){(o=new a(null)).length=u+1,o.words=new Array(o.length);for(var d=0;d<o.length;d++)o.words[d]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,o&&(o.words[u]=1));for(var f=u-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/s|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);o&&(o.words[f]=h)}return o&&o._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:o||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(i=o.div.neg()),{div:i,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,o},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,a=this.length-1;a>=0;a--)i=(r*i+(0|this.words[a]))%e;return t?-i:i},a.prototype.modn=function(e){return this.modrn(e)},a.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var a=(0|this.words[i])+67108864*r;this.words[i]=a/e|0,r=a%e}return this._strip(),t?this.ineg():this},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),s=new a(0),o=new a(0),u=new a(1),d=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++d;for(var c=r.clone(),f=t.clone();!t.isZero();){for(var h=0,l=1;0==(t.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,_=1;0==(r.words[0]&_)&&p<26;++p,_<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(c),u.isub(f)),o.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(o),s.isub(u)):(r.isub(t),o.isub(i),u.isub(s))}return{a:o,b:u,gcd:r.iushln(d)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new a(1),o=new a(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var d=0,c=1;0==(t.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(t.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(o)):(r.isub(t),o.isub(s))}return(i=0===t.cmpn(1)?s:o).cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new A(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var M={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function T(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function L(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},i(T,v),T.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,n=10;n<e.length;n++){var a=0|e.words[n];e.words[n-10]=(4194303&a)<<4|i>>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},T.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(w,v),i(S,v),i(L,v),L.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(M[e])return M[e];var t;if("k256"===e)t=new T;else if("p224"===e)t=new w;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new L}return M[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var o=new a(1).toRed(this),u=o.redNeg(),d=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,d).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),h=this.pow(e,i.addn(1).iushrn(1)),l=this.pow(e,i),p=s;0!==l.cmp(o);){for(var _=l,m=0;0!==_.cmp(o);m++)_=_.redSqr();n(m<p);var y=this.pow(f,new a(1).iushln(p-m-1));h=h.redMul(y),f=y.redSqr(),l=l.redMul(f),p=m}return h},A.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},A.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,o=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var d=t.words[n],c=u-1;c>=0;c--){var f=d>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4===++o||0===n&&0===c)&&(i=this.mul(i,r[s]),o=0,s=0)):o=0}u=26}return i},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new E(e)},i(E,A),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(34)(e))},function(e,t,r){var n=r(1),i=r(33).Reporter,a=r(3).Buffer;function s(e,t){i.call(this,t),a.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function o(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof o||(e=new o(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=a.byteLength(e);else{if(!a.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(s,i),t.DecoderBuffer=s,s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(e){var t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=o,o.prototype.join=function(e,t){return e||(e=new a(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):a.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},function(e,t,r){var n=t;n._reverse=function(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t},n.der=r(440)},function(e,t,r){var n=r(1),i=r(32),a=i.base,s=i.bignum,o=i.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new d,this.tree._init(e.body)}function d(e){a.Node.call(this,"der",e)}function c(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=o.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){var a=r;for(r=0;128==(128&a);){if(a=e.readUInt8(t),e.isError(a))return a;r<<=7,r|=127&a}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:o.tag[r]}}function f(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var a=0;a<i;a++){n<<=8;var s=e.readUInt8(r);if(e.isError(s))return s;n|=s}return n}e.exports=u,u.prototype.decode=function(e,t){return e instanceof a.DecoderBuffer||(e=new a.DecoderBuffer(e,t)),this.tree._decode(e,t)},n(d,a.Node),d.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;var n=e.save(),i=c(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(n),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||r)},d.prototype._decodeTag=function(e,t,r){var n=c(e,'Failed to decode tag of "'+t+'"');if(e.isError(n))return n;var i=f(e,n.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!r&&n.tag!==t&&n.tagStr!==t&&n.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(n.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');var a=e.save(),s=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(s)?s:(i=e.offset-a.offset,e.restore(a),e.skip(i,'Failed to match body of: "'+t+'"'))},d.prototype._skipUntilEnd=function(e,t){for(;;){var r=c(e,t);if(e.isError(r))return r;var n,i=f(e,r.primitive,t);if(e.isError(i))return i;if(n=r.primitive||null!==i?e.skip(i):this._skipUntilEnd(e,t),e.isError(n))return n;if("end"===r.tagStr)break}},d.prototype._decodeList=function(e,t,r,n){for(var i=[];!e.isEmpty();){var a=this._peekTag(e,"end");if(e.isError(a))return a;var s=r.decode(e,"der",n);if(e.isError(s)&&a)break;i.push(s)}return i},d.prototype._decodeStr=function(e,t){if("bitstr"===t){var r=e.readUInt8();return e.isError(r)?r:{unused:r,data:e.raw()}}if("bmpstr"===t){var n=e.raw();if(n.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var i="",a=0;a<n.length/2;a++)i+=String.fromCharCode(n.readUInt16BE(2*a));return i}if("numstr"===t){var s=e.raw().toString("ascii");return this._isNumstr(s)?s:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var o=e.raw().toString("ascii");return this._isPrintstr(o)?o:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},d.prototype._decodeObjid=function(e,t,r){for(var n,i=[],a=0;!e.isEmpty();){var s=e.readUInt8();a<<=7,a|=127&s,0==(128&s)&&(i.push(a),a=0)}128&s&&i.push(a);var o=i[0]/40|0,u=i[0]%40;if(n=r?i:[o,u].concat(i.slice(1)),t){var d=t[n.join(" ")];void 0===d&&(d=t[n.join(".")]),void 0!==d&&(n=d)}return n},d.prototype._decodeTime=function(e,t){var r=e.raw().toString();if("gentime"===t)var n=0|r.slice(0,4),i=0|r.slice(4,6),a=0|r.slice(6,8),s=0|r.slice(8,10),o=0|r.slice(10,12),u=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),a=0|r.slice(4,6),s=0|r.slice(6,8),o=0|r.slice(8,10),u=0|r.slice(10,12);n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,a,s,o,u,0)},d.prototype._decodeNull=function(e){return null},d.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},d.prototype._decodeInt=function(e,t){var r=e.raw(),n=new s(r);return t&&(n=t[n.toString(10)]||n),n},d.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},function(e,t,r){var n=r(1),i=r(3).Buffer,a=r(32),s=a.base,o=a.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new d,this.tree._init(e.body)}function d(e){s.Node.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=u,u.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(d,s.Node),d.prototype._encodeComposite=function(e,t,r,n){var a,s=function(e,t,r,n){var i;"seqof"===e?e="seq":"setof"===e&&(e="set");if(o.tagByName.hasOwnProperty(e))i=o.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}if(i>=31)return n.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=o.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(n.length<128)return(a=new i(2))[0]=s,a[1]=n.length,this._createEncoderBuffer([a,n]);for(var u=1,d=n.length;d>=256;d>>=8)u++;(a=new i(2+u))[0]=s,a[1]=128|u;d=1+u;for(var c=n.length;c>0;d--,c>>=8)a[d]=255&c;return this._createEncoderBuffer([a,n])},d.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new i(2*e.length),n=0;n<e.length;n++)r.writeUInt16BE(e.charCodeAt(n),2*n);return this._createEncoderBuffer(r)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},d.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var n=0;n<e.length;n++)e[n]|=0}else if(Array.isArray(e)){e=e.slice();for(n=0;n<e.length;n++)e[n]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var a=0;for(n=0;n<e.length;n++){var s=e[n];for(a++;s>=128;s>>=7)a++}var o=new i(a),u=o.length-1;for(n=e.length-1;n>=0;n--){s=e[n];for(o[u--]=127&s;(s>>=7)>0;)o[u--]=128|127&s}return this._createEncoderBuffer(o)},d.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[c(n.getFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[c(n.getFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},d.prototype._encodeNull=function(){return this._createEncoderBuffer("")},d.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new i(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var a=new i(n);return e.copy(a),0===e.length&&(a[0]=0),this._createEncoderBuffer(a)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var s=e;s>=256;s>>=8)n++;for(s=(a=new Array(n)).length-1;s>=0;s--)a[s]=255&e,e>>=8;return 128&a[0]&&a.unshift(0),this._createEncoderBuffer(new i(a))},d.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},d.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},d.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var a=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),a.length!==i.defaultBuffer.length)return!1;for(n=0;n<a.length;n++)if(a[n]!==i.defaultBuffer[n])return!1;return!0}},function(e){e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},function(e,t,r){var n=r(25),i=r(2).Buffer;function a(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var r,s=i.alloc(0),o=0;s.length<t;)r=a(o++),s=i.concat([s,n("sha1").update(e).update(r).digest()]);return s.slice(0,t)}},function(e,t){e.exports=function(e,t){for(var r=e.length,n=-1;++n<r;)e[n]^=t[n];return e}},function(e,t,r){var n=r(7),i=r(2).Buffer;e.exports=function(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.providers=t.easy=t.init=t.api=t.API=t.data=t.random=t.ver=void 0;const i=r(272),a=n(r(273));t.random=a.default;const s=n(r(16));t.data=s.default;const o=n(r(275));t.API=o.default;const u=n(r(43));t.easy=u.default;const d=n(r(287)),c=n(r(306)),f=n(r(309)),h=n(r(310)),l=n(r(311)),p=n(r(313)),_=n(r(314)),m=n(r(315)),y=n(r(316)),b=n(r(454));let g;t.api=g;t.init=(e,r,n,i=!0,a="en")=>{s.default.initialised||(t.api=g=new o.default({url:e,xApiKey:r,token:n},a,i)),s.default.initialised=!0};const M={yelp:void 0,gyg:void 0,bb:void 0,travelify:void 0,viator:void 0,rezdy:void 0,videreo:void 0,toristy:void 0,victory:void 0,radialStorage:void 0,yelpInit:(e,t,r,n,i="en")=>{M.yelp=new d.default(e,t,r,n,i)},gygInit:(e,t,r,n,i="en",a="USD")=>{M.gyg=new c.default(e,t,r,n,i,a)},bbInit:(e,t,r,n)=>(M.bb=new f.default(e,r,n),M.bb.login(t)),travelifyInit:(e,t,r,n,i="en",a)=>{M.travelify=new h.default(e,t,r,n,i,a)},viatorInit:(e,t,r,n,i="en")=>{M.viator=new l.default(e,t,r,n,i)},rezdyInit:(e,t,r)=>{M.rezdy=new p.default(e,t,r)},videreoInit:(e,t)=>{M.videreo=new _.default(e,t)},toristyInit:(e,t,r)=>{M.toristy=new m.default(e,t,r)},victoryInit:(e,t,r,n)=>{M.victory=new y.default(e,t,r,n)},radialStorageInit:()=>{M.radialStorage=new b.default}};t.providers=M;const v=i.version;t.ver=v},function(e){e.exports=JSON.parse('{"name":"@tripian/core","version":"9.1.90","description":"Tripian Inc Web SDK","main":"index.js","types":"index.d.ts","scripts":{"webp":"npx webpack --mode production","webpdev":"npx webpack --mode development","webpumd":"npx webpack --mode production --config webpack.config.umd.js --env.mode=production","webpumddev":"npx webpack --mode development --config webpack.config.umd.js --env.mode=development","wp16":"yarn webp && yarn webpumd","wp":"export NODE_OPTIONS=--openssl-legacy-provider && yarn webp && yarn webpumd","wpdev":"yarn webpdev && yarn webpumddev","test":"yarn jest","test-prod":"yarn jestprodddd TODO","doc":"yarn typedoc","npm":"cd dist && npm publish --access public && cd .."},"dependencies":{"adyen-encryption":"^0.1.1","axios":"^0.27.2","cross-fetch":"^3.1.6","moment":"^2.29.0"},"devDependencies":{"@babel/cli":"^7.7.7","@babel/core":"^7.7.7","@babel/preset-env":"^7.7.7","@babel/preset-typescript":"^7.10.4","@tripian/eslint-config-tripian":"^1.1.0","@types/jest":"^26.0.24","@types/node":"^13.13.52","@types/npm":"^2.0.32","@typescript-eslint/eslint-plugin":"^2.34.0","babel-jest":"^24.9.0","babel-loader":"^8.3.0","eslint":"^6.8.0","eslint-config-airbnb":"^18.2.1","eslint-config-airbnb-typescript":"^6.3.2","eslint-config-prettier":"^6.15.0","eslint-plugin-import":"^2.20.0","eslint-plugin-jest":"^23.20.0","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-prettier":"^3.4.1","eslint-plugin-react":"^7.17.0","eslint-plugin-react-hooks":"^2.5.1","jest":"^24.9.0","prettier":"^1.19.1","ts-loader":"8.4.0","typedoc":"^0.19.2","typedoc-plugin-external-module-name":"^4.0.3","typescript":"^4.9.5","webpack":"^4.47.0","webpack-cli":"^3.3.12"},"keywords":["tripian","core","web sdk"],"repository":{"type":"git","url":"git+https://github.com/Tripian-inc/ui-tripian-core.git"},"author":"Penguen Umut","license":"MIT","bugs":{"url":"https://github.com/Tripian-inc/ui-tripian-core/issues"},"homepage":"https://tripian-inc.github.io/ui-tripian-core/globals.html","eslintConfig":{"extends":"@tripian/eslint-config-tripian"},"prettier":"@tripian/eslint-config-tripian/prettier.js"}')},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(24)),a=n(r(0));class s{constructor(){}}s.random=e=>e[Math.floor(e.length*Math.random())],s.randomCoordinate=()=>({lat:Math.floor(9e7*Math.random())/1e6*(Math.random()<.5?1:-1),lng:Math.floor(18e7*Math.random())/1e6*(Math.random()<.5?1:-1)}),s.randomAdultCount=()=>1+Math.floor(12*Math.random()),s.randomChildrenCount=()=>Math.floor(12*Math.random()),s.randomAdultAge=()=>18+Math.floor(97*Math.random()),s.randomChildAge=()=>Math.floor(17*Math.random()),s.randomAnswers=()=>{const e=[5,6,16,18,27,35,12,13,25,32,33,34,9,10,22,40,1,2,41,46,47,49,43,44,45],t=Math.floor(e.length-1*Math.random())+1,r=[];for(let n=0;n<t;n+=1){const t=e[Math.floor(e.length*Math.random())];r.includes(t)||r.push(t)}return r},s.randomUsername=()=>"Uu"+Math.random().toString(36).substring(7),s.addDays=(e,t)=>new Date(e.valueOf()+864e5*t),s.extend2Chars=e=>2===e.toString().length?e.toString():"0"+e.toString(),s.randomDateRange=()=>{const e=1+Math.floor(30*Math.random());let t=new Date;t=s.addDays(t,e);let r=new Date;return r=s.addDays(r,e+1+Math.floor(13*Math.random())),{arrivalDate:`${t.getFullYear()}-${s.extend2Chars((t.getMonth()+1).toString())}-${s.extend2Chars(t.getDate().toString())}`,departureDate:`${r.getFullYear()}-${s.extend2Chars((r.getMonth()+1).toString())}-${s.extend2Chars(r.getDate().toString())}`}},s.randomTime=()=>s.extend2Chars(Math.floor(24*Math.random()).toString())+":00",s.randomTimeRange=()=>{const e=Math.floor(12*Math.random()),t=12+Math.floor(12*Math.random());return{startTime:s.extend2Chars(e.toString())+":00",endTime:s.extend2Chars(t.toString())+":00"}},s.randomOrder=e=>{const t=[...e],r=[];for(;0!==t.length;){const e=Math.floor(Math.random()*t.length);r.push(t[e]),t.splice(e,1)}return r},s.randomNewCompanion=(e=[43,44,45])=>({title:"Family member",name:Math.random().toString(36).substring(7),answers:e,age:1+Math.floor(114*Math.random())}),s.randomTripProfile=(e=109)=>({cityId:e,arrivalDatetime:(0,a.default)(new Date).add(1,"days").set({hour:9,minute:0}).format("YYYY-MM-DDTHH:mm:ss[Z]"),departureDatetime:(0,a.default)(new Date).add(4,"days").set({hour:18,minute:0}).format("YYYY-MM-DDTHH:mm:ss[Z]"),numberOfAdults:1+Math.floor(19*Math.random()),numberOfChildren:Math.floor(20*Math.random()),answers:[],companionIds:[],excludeHash:[],doNotGenerate:0}),s.randomNewUserReservation=(e,t)=>({key:"Reservation1",value:{},provider:"Provider"+Math.random().toString(36).substring(7),tripHash:t,poiId:e}),s.randomPassword=()=>"pass"+Math.random().toString(36).substring(4),s.randomUser=(e=[1,2,41])=>({firstName:"FirstName"+Math.random().toString(36).substring(7),lastName:"LastName"+Math.random().toString(36).substring(7),answers:e}),s.randomUserPassword=()=>({password:"pass"+Math.random().toString(36).substring(4)}),s.randomNewUser=()=>({firstName:"FirstName"+Math.random().toString(36).substring(7),lastName:"LastName"+Math.random().toString(36).substring(7),password:"pass"+Math.random().toString(36).substring(4),email:s.randomUsername()+"@gmail.com"}),s.randomOffer=e=>{const t=(0,a.default)(new Date).add(1,"days").set({hour:9,minute:0}).format("YYYY-MM-DD HH:mm"),r=(0,a.default)(new Date).add(2,"days").set({hour:18,minute:0}).format("YYYY-MM-DD HH:mm");return{cityId:e,title:"string",description:"string",currency:i.default.OFFER_CURRENCY.CAD,status:i.default.OFFER_STATUS.ACTIVE,threshold:1,discount:10,discountedProductCount:0,quantity:55,productName:"lahmacun",timeframe:{start:t,end:r,blackouts:[],recurrent:[]},imageUrl:"https://poi-pics.s3-eu-west-1.amazonaws.com/Place/108/556400/8dd63d2cb1568dd3c93864b08fdb0aa7.jpg",productTypeId:1,offerType:i.default.OFFER_TYPE.PERCENTAGE}},t.default=s},function(e,t,r){var n={"./af":64,"./af.js":64,"./ar":65,"./ar-dz":66,"./ar-dz.js":66,"./ar-kw":67,"./ar-kw.js":67,"./ar-ly":68,"./ar-ly.js":68,"./ar-ma":69,"./ar-ma.js":69,"./ar-ps":70,"./ar-ps.js":70,"./ar-sa":71,"./ar-sa.js":71,"./ar-tn":72,"./ar-tn.js":72,"./ar.js":65,"./az":73,"./az.js":73,"./be":74,"./be.js":74,"./bg":75,"./bg.js":75,"./bm":76,"./bm.js":76,"./bn":77,"./bn-bd":78,"./bn-bd.js":78,"./bn.js":77,"./bo":79,"./bo.js":79,"./br":80,"./br.js":80,"./bs":81,"./bs.js":81,"./ca":82,"./ca.js":82,"./cs":83,"./cs.js":83,"./cv":84,"./cv.js":84,"./cy":85,"./cy.js":85,"./da":86,"./da.js":86,"./de":87,"./de-at":88,"./de-at.js":88,"./de-ch":89,"./de-ch.js":89,"./de.js":87,"./dv":90,"./dv.js":90,"./el":91,"./el.js":91,"./en-au":92,"./en-au.js":92,"./en-ca":93,"./en-ca.js":93,"./en-gb":94,"./en-gb.js":94,"./en-ie":95,"./en-ie.js":95,"./en-il":96,"./en-il.js":96,"./en-in":97,"./en-in.js":97,"./en-nz":98,"./en-nz.js":98,"./en-sg":99,"./en-sg.js":99,"./eo":100,"./eo.js":100,"./es":101,"./es-do":102,"./es-do.js":102,"./es-mx":103,"./es-mx.js":103,"./es-us":104,"./es-us.js":104,"./es.js":101,"./et":105,"./et.js":105,"./eu":106,"./eu.js":106,"./fa":107,"./fa.js":107,"./fi":108,"./fi.js":108,"./fil":109,"./fil.js":109,"./fo":110,"./fo.js":110,"./fr":111,"./fr-ca":112,"./fr-ca.js":112,"./fr-ch":113,"./fr-ch.js":113,"./fr.js":111,"./fy":114,"./fy.js":114,"./ga":115,"./ga.js":115,"./gd":116,"./gd.js":116,"./gl":117,"./gl.js":117,"./gom-deva":118,"./gom-deva.js":118,"./gom-latn":119,"./gom-latn.js":119,"./gu":120,"./gu.js":120,"./he":121,"./he.js":121,"./hi":122,"./hi.js":122,"./hr":123,"./hr.js":123,"./hu":124,"./hu.js":124,"./hy-am":125,"./hy-am.js":125,"./id":126,"./id.js":126,"./is":127,"./is.js":127,"./it":128,"./it-ch":129,"./it-ch.js":129,"./it.js":128,"./ja":130,"./ja.js":130,"./jv":131,"./jv.js":131,"./ka":132,"./ka.js":132,"./kk":133,"./kk.js":133,"./km":134,"./km.js":134,"./kn":135,"./kn.js":135,"./ko":136,"./ko.js":136,"./ku":137,"./ku-kmr":138,"./ku-kmr.js":138,"./ku.js":137,"./ky":139,"./ky.js":139,"./lb":140,"./lb.js":140,"./lo":141,"./lo.js":141,"./lt":142,"./lt.js":142,"./lv":143,"./lv.js":143,"./me":144,"./me.js":144,"./mi":145,"./mi.js":145,"./mk":146,"./mk.js":146,"./ml":147,"./ml.js":147,"./mn":148,"./mn.js":148,"./mr":149,"./mr.js":149,"./ms":150,"./ms-my":151,"./ms-my.js":151,"./ms.js":150,"./mt":152,"./mt.js":152,"./my":153,"./my.js":153,"./nb":154,"./nb.js":154,"./ne":155,"./ne.js":155,"./nl":156,"./nl-be":157,"./nl-be.js":157,"./nl.js":156,"./nn":158,"./nn.js":158,"./oc-lnc":159,"./oc-lnc.js":159,"./pa-in":160,"./pa-in.js":160,"./pl":161,"./pl.js":161,"./pt":162,"./pt-br":163,"./pt-br.js":163,"./pt.js":162,"./ro":164,"./ro.js":164,"./ru":165,"./ru.js":165,"./sd":166,"./sd.js":166,"./se":167,"./se.js":167,"./si":168,"./si.js":168,"./sk":169,"./sk.js":169,"./sl":170,"./sl.js":170,"./sq":171,"./sq.js":171,"./sr":172,"./sr-cyrl":173,"./sr-cyrl.js":173,"./sr.js":172,"./ss":174,"./ss.js":174,"./sv":175,"./sv.js":175,"./sw":176,"./sw.js":176,"./ta":177,"./ta.js":177,"./te":178,"./te.js":178,"./tet":179,"./tet.js":179,"./tg":180,"./tg.js":180,"./th":181,"./th.js":181,"./tk":182,"./tk.js":182,"./tl-ph":183,"./tl-ph.js":183,"./tlh":184,"./tlh.js":184,"./tr":185,"./tr.js":185,"./tzl":186,"./tzl.js":186,"./tzm":187,"./tzm-latn":188,"./tzm-latn.js":188,"./tzm.js":187,"./ug-cn":189,"./ug-cn.js":189,"./uk":190,"./uk.js":190,"./ur":191,"./ur.js":191,"./uz":192,"./uz-latn":193,"./uz-latn.js":193,"./uz.js":192,"./vi":194,"./vi.js":194,"./x-pseudo":195,"./x-pseudo.js":195,"./yo":196,"./yo.js":196,"./zh-cn":197,"./zh-cn.js":197,"./zh-hk":198,"./zh-hk.js":198,"./zh-mo":199,"./zh-mo.js":199,"./zh-tw":200,"./zh-tw.js":200};function i(e){var t=a(e);return r(t)}function a(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=a,e.exports=i,i.id=274},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=a(r(24)),u=s(r(0)),d=s(r(276)),c=s(r(44)),f=s(r(43)),h=s(r(284)),l=r(285),p=s(r(286)),_=async(e=750)=>new Promise(t=>setTimeout(()=>t(!0),e));t.default=class{constructor(e,t,r){this.getToken=()=>this.xhr.getToken(),this.setToken=e=>this.xhr.setToken(e),this.removeToken=()=>this.xhr.removeToken(),this.setLang=e=>{this.lang=e,this.xhr.setLang(e)},this.configList=()=>this.xhr.req(c.default.CONFIG.METHOD)(c.default.CONFIG.PATH,c.default.CONFIG.DATA_KEY),this.citiesPage=async(e,t=1e3)=>this.xhr.reqWithPage(c.default.CITIES.METHOD)(c.default.CITIES.PATH,c.default.CITIES.DATA_KEY,{limit:t,page:e}),this.citiesAll=async()=>{var e,t;if(!this.forceRequest){const e=h.default.cities(this.lang);if(e)return Promise.resolve(e)}let r=[],n=0,i=!1;for(;!i;){n+=1;const a=await this.citiesPage(n);r=r.concat(a.data),a.pagination&&(null===(e=a.pagination)||void 0===e?void 0:e.currentPage)===(null===(t=a.pagination)||void 0===t?void 0:t.totalPages)&&(i=!0)}return Promise.resolve(r)},this.city=async e=>{if(!this.forceRequest){const t=h.default.city(this.lang,e);if(t)return Promise.resolve(t)}return this.xhr.req(c.default.CITY.METHOD)(f.default.setParameterId(c.default.CITY.PATH,e,"cityId"),c.default.CITY.DATA_KEY)},this.cityInfo=async e=>{if(!this.forceRequest){const t=h.default.cityInfo(this.lang,e);if(t)return Promise.resolve(t)}return this.xhr.req(c.default.CITY_INFO.METHOD)(f.default.setParameterId(c.default.CITY_INFO.PATH,e,"cityId"),c.default.CITY_INFO.DATA_KEY)},this.cityEvents=async e=>{if(!this.forceRequest){const t=h.default.citiesEvents(this.lang,e);if(t)return Promise.resolve(t)}return this.xhr.req(c.default.CITY_EVENTS.METHOD)(f.default.setParameterId(c.default.CITY_EVENTS.PATH,e,"cityId"),c.default.CITY_EVENTS.DATA_KEY)},this.citiesSearch=async e=>this.xhr.req(c.default.CITIES.METHOD)(c.default.CITIES.PATH,c.default.CITIES.DATA_KEY,{search:e}),this.suggestCity=async e=>this.xhr.req(c.default.SUGGEST_CITY.METHOD)(c.default.SUGGEST_CITY.PATH,c.default.SUGGEST_CITY.DATA_KEY,{text:e}),this.poiCategories=async(e=100,t=2)=>{if(!this.forceRequest){const e=h.default.poiCategories(this.lang);if(e)return e}return this.xhr.req(c.default.POI_CATEGORIES.METHOD)(c.default.POI_CATEGORIES.PATH,c.default.POI_CATEGORIES.DATA_KEY,{version:t,limit:e})},this.poisSearch=async e=>this.xhr.reqWithPage(c.default.POIS.METHOD)(c.default.POIS.PATH,c.default.POIS.DATA_KEY,{...e,withOffers:e.withOffers}),this.poisNameSearch=async({cityId:e,search:t,poiCategories:r,showOffersOnly:n=!0,showBookingsOnly:i=!1,limit:a=100,page:s=1})=>{if(!this.forceRequest&&""===t&&r&&r.length>0&&1===s){const t=h.default.poisAll(this.lang,e||0,r,Number(n),Number(i));if(t)return Promise.resolve(t)}return this.poisSearch({cityId:e,search:t,poiCategories:r,withOffers:Number(n),limit:a,page:s}).then(e=>({...e,data:e.data.filter(e=>e.status)}))},this.poisOpenSearch=async({cityId:e,search:t,poiCategories:r,showOffersOnly:n,showBookingsOnly:i,limit:a=100,page:s=1})=>{if(!this.forceRequest&&""===t&&r&&r.length>0&&1===s){const t=h.default.poisAll(this.lang,e||0,r,Number(n),Number(i));if(t)return Promise.resolve(t)}return this.xhr.reqWithPage(c.default.POIS.METHOD)(c.default.POIS_OPEN_SEARCH.PATH,c.default.POIS_OPEN_SEARCH.DATA_KEY,{cityId:e,search:t,poiCategories:r,showOffersOnly:Number(n),withBookings:Number(i),limit:a,page:s})},this.poisSearchAutoComplete=async()=>this.xhr.req(c.default.POIS_SEARCH_AUTO_COMPLETE.METHOD)(c.default.POIS_SEARCH_AUTO_COMPLETE.PATH,c.default.POIS_SEARCH_AUTO_COMPLETE.DATA_KEY).then(e=>e),this.poisSearchAutoCompleteTags=async(e,t)=>{if(!this.forceRequest&&t&&t.length>0){const r=h.default.autoCompleteTagsAll(this.lang,e||0,t);if(r)return Promise.resolve(r)}return this.xhr.req(c.default.POIS_SEARCH_AUTO_COMPLETE_TAGS.METHOD)(c.default.POIS_SEARCH_AUTO_COMPLETE_TAGS.PATH,c.default.POIS_SEARCH_AUTO_COMPLETE_TAGS.DATA_KEY,{cityId:e,poiCategories:t||void 0}).then(e=>e)},this.poisCoordinateSearch=async({poiCategories:e,coordinate:t,distance:r,bounds:n,showOffersOnly:i,limit:a})=>this.poisSearch({poiCategories:e,coordinate:t,distance:r,bounds:n,withOffers:Number(i),limit:a}).then(e=>e.data),this.poisMustTrySearch=async({cityId:e,mustTryIds:t,limit:r=100})=>this.poisSearch({cityId:e,mustTryIds:t,limit:r}).then(e=>e.data.filter(e=>e.status)),this.pois=async(e,t,r,n=!1)=>{const i=o.helper.removeDuplicateValues(e,(e,t)=>e===t);if(!this.forceRequest&&!n){const e=h.default.pois(this.lang,t,i);if(e)return Promise.resolve(e)}return this.poisSearch({poiIds:i.join(","),withOffers:t,cityId:r}).then(e=>e.data)},this.poi=async(e,t=1)=>{if(!this.forceRequest){const t=h.default.poi(this.lang,e);if(t)return Promise.resolve(t)}return this.xhr.req(c.default.POI.METHOD)(f.default.setParameterId(c.default.POI.PATH,e,"poiId"),c.default.POI.DATA_KEY,{withOffers:t})},this.customPois=async e=>this.xhr.req(c.default.CUSTOM_POIS.METHOD)(c.default.CUSTOM_POIS.PATH,c.default.CUSTOM_POIS.DATA_KEY,{search:e}),this.topTen=(e,t)=>{if(!this.forceRequest){const t=h.default.topTen(this.lang,e);if(t)return Promise.resolve(t)}return this.xhr.req(c.default.TOP_TEN.METHOD)(c.default.TOP_TEN.PATH,c.default.TOP_TEN.DATA_KEY,{cityId:e,poiCategories:t})},this.register=async e=>this.xhr.req(c.default.REGISTER.METHOD)(c.default.REGISTER.PATH,c.default.REGISTER.DATA_KEY,e),this.loginGuest=async e=>this.xhr.req(c.default.LOGIN_GUEST.METHOD)(c.default.LOGIN_GUEST.PATH,c.default.LOGIN_GUEST.DATA_KEY,{email:e+"@tripianguest.com",password:"tripian123."}),this.login=async e=>this.xhr.req(c.default.LOGIN.METHOD)(c.default.LOGIN.PATH,c.default.LOGIN.DATA_KEY,e),this.loginEmail=async(e,t,r)=>this.login({email:e,password:t,business:r}),this.loginCognito=async(e,t,r)=>this.xhr.req(c.default.LOGIN_COGNITO.METHOD)(c.default.LOGIN_COGNITO.PATH,c.default.LOGIN_COGNITO.DATA_KEY,{code:e,redirectUrl:t,device:r}),this.logout=()=>{this.removeToken(),(0,p.default)()},this.lightRegisterLogin=async e=>this.xhr.req(c.default.LIGHT_REGISTER_LOGIN.METHOD)(c.default.LIGHT_REGISTER_LOGIN.PATH,c.default.LIGHT_REGISTER_LOGIN.DATA_KEY,{uniqueId:e}),this.lightLoginHash=async e=>this.xhr.req(c.default.LIGHT_HASH_LOGIN.METHOD)(c.default.LIGHT_HASH_LOGIN.PATH,c.default.LIGHT_HASH_LOGIN.DATA_KEY,{tripHash:e}),this.refreshToken=async(e=!1)=>{const t=this.xhr.getToken();if(t){const r=f.default.parseToken(t);if(r){if(e)return this.xhr.req(c.default.REFRESH_TOKEN.METHOD)(c.default.REFRESH_TOKEN.PATH,c.default.REFRESH_TOKEN.DATA_KEY,{refreshToken:t.refreshToken}).then(e=>{const r={...e,refreshToken:t.refreshToken};return this.setToken(r),setTimeout(()=>{this.refreshToken(!0)},354e4),r});const n=f.default.accessTokenExpSecond(r);if(n>360)return setTimeout(()=>{this.refreshToken(!0)},1e3*(n-60)),new Promise(e=>e(t));const{refreshToken:i}=t;if(f.default.refreshTokenExpSecond(r)>86400)return this.xhr.req(c.default.REFRESH_TOKEN.METHOD)(c.default.REFRESH_TOKEN.PATH,c.default.REFRESH_TOKEN.DATA_KEY,{refreshToken:i}).then(e=>{const t={...e,refreshToken:i};return this.setToken(t),setTimeout(()=>{this.refreshToken(!0)},354e4),t});throw new Error("Tcore refresh token expired")}throw new Error("Tcore doesn't have a valid token object")}throw new Error("Tcore doesn't have a token object")},this.user=async(e=this.forceRequest)=>{if(!e){const e=h.default.user();if(e)return Promise.resolve(e)}return this.xhr.req(c.default.USER.METHOD)(c.default.USER.PATH,c.default.USER.DATA_KEY)},this.userUpdate=async e=>this.xhr.req(c.default.USER_UPDATE.METHOD)(c.default.USER_UPDATE.PATH,c.default.USER_UPDATE.DATA_KEY,{...e}),this.userDelete=async()=>this.xhr.req(c.default.USER_DELETE.METHOD)(c.default.USER_DELETE.PATH,c.default.USER_DELETE.DATA_KEY).then(e=>(this.removeToken(),(0,p.default)(),e)),this.userResetPassword=async(e,t)=>this.xhr.req(c.default.USER_RESET_PASSWORD.METHOD)(c.default.USER_RESET_PASSWORD.PATH,c.default.USER_UPDATE.DATA_KEY,{email:e,resetPasswordUrl:t}),this.userUpdatePassword=async(e,t)=>this.xhr.req(c.default.USER_UPDATE_PASSWORD.METHOD)(c.default.USER_UPDATE_PASSWORD.PATH,c.default.USER_UPDATE_PASSWORD.DATA_KEY,{password:e,hash:t}),this.notifications=async()=>this.xhr.req(c.default.NOTIFICATIONS.METHOD)(c.default.NOTIFICATIONS.PATH,c.default.NOTIFICATIONS.DATA_KEY).then(e=>e),this.notificationsUnseen=async()=>this.xhr.req(c.default.NOTIFICATIONS_UNSEEN.METHOD)(c.default.NOTIFICATIONS_UNSEEN.PATH,c.default.NOTIFICATIONS_UNSEEN.DATA_KEY).then(e=>e),this.notificationsUpdateUnseen=async()=>this.xhr.req(c.default.NOTIFICATIONS_UPDATE_UNSEEN.METHOD)(c.default.NOTIFICATIONS_UPDATE_UNSEEN.PATH,c.default.NOTIFICATIONS_UPDATE_UNSEEN.DATA_KEY),this.notificationsSettings=async()=>this.xhr.req(c.default.NOTIFICATIONS_SETTINGS.METHOD)(c.default.NOTIFICATIONS_SETTINGS.PATH,c.default.NOTIFICATIONS_SETTINGS.DATA_KEY).then(e=>e),this.notificationsUpdateSettings=async(e,t)=>this.xhr.req(c.default.NOTIFICATIONS_UPDATE_SETTINGS.METHOD)(c.default.NOTIFICATIONS_UPDATE_SETTINGS.PATH,c.default.NOTIFICATIONS_UPDATE_SETTINGS.DATA_KEY,{settingId:e,checked:t}).then(e=>e),this.companions=async(e=this.forceRequest)=>{if(!e){const e=h.default.companions(this.lang);if(e)return Promise.resolve(e)}return this.xhr.reqWithPage(c.default.COMPANIONS.METHOD)(c.default.COMPANIONS.PATH,c.default.COMPANIONS.DATA_KEY,{limit:100}).then(e=>e.data)},this.companionAdd=async e=>this.xhr.req(c.default.COMPANION_ADD.METHOD)(c.default.COMPANION_ADD.PATH,c.default.COMPANION_ADD.DATA_KEY,{...e}),this.companionUpdate=async e=>this.xhr.req(c.default.COMPANION_UPDATE.METHOD)(f.default.setParameterId(c.default.COMPANION_UPDATE.PATH,e.id,"companionId"),c.default.COMPANION_UPDATE.DATA_KEY,{title:e.title,name:e.name,answers:e.answers,age:e.age}),this.companionDelete=async e=>this.xhr.req(c.default.COMPANION_DELETE.METHOD)(f.default.setParameterId(c.default.COMPANION_DELETE.PATH,e,"companionId"),c.default.COMPANION_DELETE.DATA_KEY).then(e=>e.recordId),this.favorites=async e=>{if(!this.forceRequest&&e){const t=h.default.favorites(this.lang,e);if(t)return Promise.resolve(t)}return this.xhr.reqWithPage(c.default.FAVORITES.METHOD)(c.default.FAVORITES.PATH,c.default.FAVORITES.DATA_KEY,{cityId:e}).then(e=>e.data)},this.favoriteAdd=async(e,t)=>this.xhr.req(c.default.FAVORITE_ADD.METHOD)(c.default.FAVORITE_ADD.PATH,c.default.FAVORITE_ADD.DATA_KEY,{poiId:e,tripHash:t}),this.favoriteDelete=async e=>this.xhr.req(c.default.FAVORITE_DELETE.METHOD)(f.default.setParameterId(c.default.FAVORITE_DELETE.PATH,e,"favoriteId"),c.default.FAVORITE_DELETE.DATA_KEY).then(e=>e.recordId),this.reactions=async(e,t,r=1)=>{if(!this.forceRequest){const t=h.default.userReactions(this.lang,e);if(t)return Promise.resolve(t)}return this.xhr.reqWithPage(c.default.REACTIONS.METHOD)(c.default.REACTIONS.PATH,c.default.REACTIONS.DATA_KEY,{reaction:t,tripHash:e,page:r,limit:100}).then(e=>e.data)},this.reactionAdd=async e=>this.xhr.req(c.default.REACTION_ADD.METHOD)(c.default.REACTION_ADD.PATH,c.default.REACTION_ADD.DATA_KEY,e),this.reactionUpdate=async(e,t)=>this.xhr.req(c.default.REACTION_UPDATE.METHOD)(f.default.setParameterId(c.default.REACTION_UPDATE.PATH,e,"reactionId"),c.default.REACTION_UPDATE.DATA_KEY,{comment:t}),this.reactionDelete=async e=>this.xhr.req(c.default.REACTION_DELETE.METHOD)(f.default.setParameterId(c.default.REACTION_DELETE.PATH,e,"reactionId"),c.default.REACTION_DELETE.DATA_KEY).then(e=>e.recordId),this.plan=async(e,t=!0,r=2e3,n=30)=>this.xhr.req(c.default.PLAN.METHOD)(f.default.setParameterId(c.default.PLAN.PATH,e,"planId"),c.default.PLAN.DATA_KEY,{}).then(async i=>{if(t&&0===i.generatedStatus&&n>0){if(await _(r))return this.plan(e,t,r,n-1)}return i}),this.planRouteUrl=async(e,t)=>this.xhr.req(c.default.PLAN_ROUTE_URL.METHOD)(c.default.PLAN_ROUTE_URL.PATH,c.default.PLAN_ROUTE_URL.DATA_KEY,{planId:e,tripHash:t}),this.planUpdate=async(e,t)=>this.xhr.req(c.default.PLAN_UPDATE.METHOD)(f.default.setParameterId(c.default.PLAN_UPDATE.PATH,e,"planId"),c.default.PLAN_UPDATE.DATA_KEY,{...t}),this.planUpdateOrders=async(e,t)=>this.planUpdate(e,{stepOrders:t}),this.planUpdateTime=async(e,t,r)=>this.planUpdate(e,{startTime:t,endTime:r}),this.stepAdd=async(e,t,r,n)=>this.xhr.req(c.default.STEP_ADD.METHOD)(c.default.STEP_ADD.PATH,c.default.STEP_ADD.DATA_KEY,{planId:e,poiId:t,startTime:r,endTime:n}),this.customStepAdd=async(e,t,r,n,i)=>this.xhr.req(c.default.STEP_ADD.METHOD)(c.default.STEP_ADD.PATH,c.default.STEP_ADD.DATA_KEY,{planId:e,customPoi:t,stepType:r,startTime:n,endTime:i}),this.stepUpdateTimes=async(e,t,r)=>this.xhr.req(c.default.STEP_UPDATE.METHOD)(f.default.setParameterId(c.default.STEP_UPDATE.PATH,e,"stepId"),c.default.STEP_UPDATE.DATA_KEY,{startTime:t,endTime:r}),this.stepReplace=async(e,t)=>this.xhr.req(c.default.STEP_UPDATE.METHOD)(f.default.setParameterId(c.default.STEP_UPDATE.PATH,e,"stepId"),c.default.STEP_UPDATE.DATA_KEY,{poiId:t}),this.stepDelete=async e=>this.xhr.req(c.default.STEP_DELETE.METHOD)(f.default.setParameterId(c.default.STEP_DELETE.PATH,e,"stepId"),c.default.STEP_DELETE.DATA_KEY).then(e=>e.recordId),this.questions=async(e,t=o.default.QUESTIONS_CATEGORY.TRIP)=>{const r=`${c.default.QUESTIONS.DATA_KEY}-${t}`;if(!this.forceRequest){const e=h.default.questions(this.lang,r);if(e)return Promise.resolve(e)}return this.xhr.reqWithPage(c.default.QUESTIONS.METHOD)(c.default.QUESTIONS.PATH,r,{cityId:e,category:t,version:2}).then(e=>e.data.filter(e=>e.answers.length>0)).then(e=>((0,l.allQuestionsData)(this.lang),e))},this.questionsTrip=async e=>this.questions(e,o.default.QUESTIONS_CATEGORY.TRIP),this.questionsProfile=async e=>this.questions(e,o.default.QUESTIONS_CATEGORY.PROFILE),this.questionsCompanion=async e=>this.questions(e,o.default.QUESTIONS_CATEGORY.COMPANION),this.questionsAll=async e=>{const t=this.questionsTrip(e),r=this.questionsProfile(e),n=this.questionsCompanion(e);return Promise.all([t,r,n]).then(e=>[].concat(...e))},this.tripRefs=async(e=40)=>{if(!this.forceRequest){const e=h.default.tripRefs();if(e)return Promise.resolve(e)}return this.xhr.reqWithPage(c.default.TRIPS.METHOD)(c.default.TRIPS.PATH,c.default.TRIPS.DATA_KEY,{limit:e}).then(e=>e.data)},this.tripRef=async e=>this.xhr.req(c.default.TRIP_WITH_HASH.METHOD)(f.default.setParameter(c.default.TRIP_WITH_HASH.PATH,{key:"hash",value:e}),c.default.TRIP_WITH_HASH.DATA_KEY).then(e=>e),this.trip=async(e,t=0,r=this.forceRequest,n=2e3,i=30)=>{if(!r){const r=h.default.trip(this.lang,e,t);if(r)return Promise.resolve(r)}return this.xhr.req(c.default.TRIP.METHOD)(f.default.setParameter(c.default.TRIP.PATH,{key:"tripHash",value:e}),c.default.TRIP.DATA_KEY).then(async e=>{const a=e.plans.length-1<t?e.plans.length-1:t;if((0===e.plans[a].generatedStatus||-2===e.plans[a].generatedStatus)&&i>0){if(await _(n))return this.trip(e.tripHash,a,r,void 0,i-1)}return e})},this.tripAdd=async(e,t)=>this.xhr.req(c.default.TRIP_ADD.METHOD)(c.default.TRIP_ADD.PATH,c.default.TRIP_ADD.DATA_KEY,{...e}).then(e=>void 0===t?e:this.trip(e.tripHash,t)),this.tripClone=async e=>this.xhr.req(c.default.TRIP_CLONE.METHOD)(f.default.setParameter(c.default.TRIP_CLONE.PATH,{key:"tripHash",value:e}),c.default.TRIP_CLONE.DATA_KEY).then(e=>e),this.tripCloneCombo=async e=>this.tripClone(e).then(async e=>({trip:e,tripReferences:await this.tripRefs()})),this.tripUpdate=async(e,t,r=0)=>this.xhr.req(c.default.TRIP_UPDATE.METHOD)(f.default.setParameter(c.default.TRIP_UPDATE.PATH,{key:"tripHash",value:e}),c.default.TRIP_UPDATE.DATA_KEY,{...t}).then(e=>this.trip(e.tripHash,r)),this.tripNameUpdate=async(e,t)=>this.xhr.req(c.default.TRIP_UPDATE.METHOD)(f.default.setParameter(c.default.TRIP_UPDATE.PATH,{key:"tripHash",value:e}),c.default.TRIP_UPDATE.DATA_KEY,{...t}).then(e=>e),this.tripDelete=async e=>this.xhr.req(c.default.TRIP_DELETE.METHOD)(f.default.setParameter(c.default.TRIP_DELETE.PATH,{key:"tripHash",value:e}),c.default.TRIP_DELETE.DATA_KEY).then(e=>e.recordId),this.tripDownloadIcs=async e=>this.xhr.req(c.default.TRIP_DOWNLOAD_ICS.METHOD)(f.default.setParameter(c.default.TRIP_DOWNLOAD_ICS.PATH,{key:"tripHash",value:e}),c.default.TRIP_DOWNLOAD_ICS.DATA_KEY,void 0,{headers:{"Content-Type":"text/calendar"},responseType:"blob"}).then(e=>{const t=URL.createObjectURL(e.data),r=document.createElement("a");r.href=t;const n=e.headers["content-disposition"].split(";")[1].split("=")[1].replace(/"/g,"");r.setAttribute("download",n),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(t)}),this.tripGetShared=async(e,t=!0)=>this.xhr.req(c.default.TRIP_GET_SHARED.METHOD)(f.default.setParameter(c.default.TRIP_GET_SHARED.PATH,{key:"tripHash",value:e}),c.default.TRIP_GET_SHARED.DATA_KEY).then(async e=>{const r=(0,u.default)(e.tripProfile.arrivalDatetime).diff((0,u.default)(),"weeks",!1);if(r<4&&t){const t=o.helper.deepCopy(e),n=4-r,i=(0,u.default)(t.tripProfile.arrivalDatetime).add(n,"weeks"),a=(0,u.default)(t.tripProfile.departureDatetime).add(n,"weeks");return t.tripProfile.arrivalDatetime=i.format("YYYY-MM-DDTHH:mm:ss[Z]"),t.tripProfile.departureDatetime=a.format("YYYY-MM-DDTHH:mm:ss[Z]"),t.plans.forEach((e,t)=>{e.date=i.clone().add(t,"days").format("YYYY-MM-DD")}),t}return e}),this.tripShare=async(e,t)=>this.xhr.req(c.default.TRIP_SHARE.METHOD)(f.default.setParameter(c.default.TRIP_SHARE.PATH,{key:"tripHash",value:e}),c.default.TRIP_SHARE.DATA_KEY,{share:t}).then(async e=>e.share),this.reservations=async(e,t,r,n,i,a,s=100)=>{if(!this.forceRequest){const e=h.default.reservations(this.lang);if(e)return Promise.resolve(e)}return this.xhr.reqWithPage(c.default.RESERVATIONS.METHOD)(c.default.RESERVATIONS.PATH,c.default.RESERVATIONS.DATA_KEY,{cityId:e,tripHash:t,poiId:r,provider:n,dateFrom:i,dateTo:a,limit:s}).then(e=>e.data)},this.reservationAdd=async e=>this.xhr.req(c.default.RESERVATION_ADD.METHOD)(c.default.RESERVATION_ADD.PATH,c.default.RESERVATION_ADD.DATA_KEY,{...e}),this.reservationUpdate=async e=>this.xhr.req(c.default.RESERVATION_UPDATE.METHOD)(f.default.setParameterId(c.default.RESERVATION_UPDATE.PATH,e.id,"reservationId"),c.default.RESERVATION_UPDATE.DATA_KEY,{key:e.key,value:e.value,provider:e.provider,tripHash:e.tripHash,poiId:e.poiId}),this.reservationDelete=async e=>this.xhr.req(c.default.RESERVATION_DELETE.METHOD)(f.default.setParameterId(c.default.RESERVATION_DELETE.PATH,e,"reservationId"),c.default.RESERVATION_DELETE.DATA_KEY).then(e=>e.recordId),this.feedbacks=async()=>this.xhr.req(c.default.FEEDBACKS.METHOD)(c.default.FEEDBACKS.PATH,c.default.FEEDBACKS.DATA_KEY),this.userFeedbacks=async(e=!1)=>{if(!this.forceRequest&&!e){const e=h.default.userFeedbacks(this.lang);if(e)return e}return this.xhr.req(c.default.USER_FEEDBACKS.METHOD)(c.default.USER_FEEDBACKS.PATH,c.default.USER_FEEDBACKS.DATA_KEY)},this.feedbackSend=async e=>this.xhr.req(c.default.SEND_FEEDBACK.METHOD)(c.default.SEND_FEEDBACK.PATH,c.default.SEND_FEEDBACK.DATA_KEY,{...e}).then(()=>this.userFeedbacks(!0)),this.feedbackReply=async e=>this.xhr.req(c.default.SEND_FEEDBACK.METHOD)(c.default.REPLY_FEEDBACK.PATH,c.default.SEND_FEEDBACK.DATA_KEY,{...e}).then(()=>this.userFeedbacks(!0)),this.feedbackUpdate=async(e,t)=>this.xhr.req(c.default.UPDATE_FEEDBACK.METHOD)(f.default.setParameterId(c.default.UPDATE_FEEDBACK.PATH,e,"feedbackId"),c.default.UPDATE_FEEDBACK.DATA_KEY,{isRead:t}).then(()=>this.userFeedbacks(!0)),this.productTypes=async()=>this.xhr.req(c.default.OFFER_PRODUCT_TYPES.METHOD)(c.default.OFFER_PRODUCT_TYPES.PATH,c.default.OFFER_PRODUCT_TYPES.DATA_KEY).then(e=>e),this.offerSearch=async(e,t,r,n)=>this.xhr.reqWithPage(c.default.OFFERS.METHOD)(c.default.OFFERS.PATH,c.default.OFFERS.DATA_KEY,{dateFrom:e,dateTo:t,boundary:r,page:1,limit:50}).then(e=>{if(0===e.data.length)return[];const t=e.data.map(e=>e.tripianPoiId);return this.pois(t,Number(n),void 0,!0)}),this.offersOptIn=async(e,t)=>this.xhr.req(c.default.OFFERS_OPT_IN.METHOD)(c.default.OFFERS_OPT_IN.PATH,c.default.OFFERS_OPT_IN.DATA_KEY,{dateFrom:e,dateTo:t}),this.myCampaignOffers=async e=>this.xhr.req(c.default.OFFERS_OPT_IN.METHOD)(c.default.OFFERS_OPT_IN.PATH,c.default.OFFERS_OPT_IN.DATA_KEY,{campaignId:e}),this.offerSearchCampaign=async(e,t)=>this.xhr.reqWithPage(c.default.OFFERS.METHOD)(c.default.OFFERS.PATH,c.default.OFFERS.DATA_KEY,{campaignId:e}).then(e=>{if(0===e.data.length)return[];const r=e.data.map(e=>e.tripianPoiId);return this.pois(r,Number(t),void 0,!0)}),this.offerSearchNew=async(e,t,r)=>this.xhr.reqWithPage(c.default.OFFERS.METHOD)(c.default.OFFERS.PATH,c.default.OFFERS.DATA_KEY,{dateFrom:e,dateTo:t,boundary:r,page:1,limit:50}),this.offer=async e=>this.xhr.req(c.default.OFFER.METHOD)(f.default.setParameterId(c.default.OFFER.PATH,e,"offerId"),c.default.OFFER.DATA_KEY,{}).then(e=>e),this.offerUpdateOptIn=async(e,t)=>this.xhr.req(c.default.OFFER_UPDATE.METHOD)(f.default.setParameterId(c.default.OFFER_UPDATE.PATH,e,"offerId"),c.default.OFFER_UPDATE.DATA_KEY,{optInDate:t}).then(e=>e),this.offerDelete=async e=>this.xhr.req(c.default.OFFER_DELETE.METHOD)(f.default.setParameterId(c.default.OFFER_DELETE.PATH,e,"offerId"),c.default.OFFER_DELETE.DATA_KEY).then(e=>e),this.offerRedeemStatusUpdate=async(e,t)=>this.xhr.req(c.default.OFFER_REDEEM_STATUS_UPDATE.METHOD)(f.default.setParameterId(c.default.OFFER_REDEEM_STATUS_UPDATE.PATH,e,"offerId"),c.default.OFFER_REDEEM_STATUS_UPDATE.DATA_KEY,{status:t}).then(e=>e.status),this.offerRedeemStatus=async e=>this.xhr.req(c.default.OFFER_REDEEM_STATUS.METHOD)(f.default.setParameterId(c.default.OFFER_REDEEM_STATUS.PATH,e,"offerId"),c.default.OFFER_REDEEM_STATUS.DATA_KEY).then(e=>e.status),this.businessSearch=async(e,t,r)=>this.xhr.req(c.default.BUSINESS_SEARCH.METHOD)(c.default.BUSINESS_SEARCH.PATH,c.default.BUSINESS_SEARCH.DATA_KEY,{q:e,cityId:t,bounds:r}),this.businessAssign=async e=>this.xhr.req(c.default.BUSINESS_USER_ASSIGN.METHOD)(c.default.BUSINESS_USER_ASSIGN.PATH,c.default.BUSINESS_USER_ASSIGN.DATA_KEY,{tripianPoiId:e}),this.startVerify=async(e,t)=>this.xhr.req(c.default.BUSINESS_VERIFY_START.METHOD)(c.default.BUSINESS_VERIFY_START.PATH,c.default.BUSINESS_VERIFY_START.DATA_KEY,{to_:e,channel:t}),this.checkVerify=async(e,t,r)=>this.xhr.req(c.default.BUSINESS_VERIFY_CHECK.METHOD)(c.default.BUSINESS_VERIFY_CHECK.PATH,c.default.BUSINESS_VERIFY_CHECK.DATA_KEY,{to_:e,channel:t,code:r}),this.business=async()=>this.xhr.req(c.default.BUSINESS.METHOD)(c.default.BUSINESS.PATH,c.default.BUSINESS.DATA_KEY),this.businessOffers=async(e,t=1,r)=>this.xhr.reqWithPage(c.default.BUSINESS_OFFERS.METHOD)(c.default.BUSINESS_OFFERS.PATH,c.default.BUSINESS_OFFERS.DATA_KEY,{status:""+e.join(","),page:t,limit:r}),this.businessOfferAdd=async e=>this.xhr.req(c.default.BUSINESS_OFFER_ADD.METHOD)(c.default.BUSINESS_OFFER_ADD.PATH,c.default.BUSINESS_OFFER_ADD.DATA_KEY,{...e}),this.businessVoucherOfferAdd=async e=>this.xhr.req(c.default.BUSINESS_OFFER_ADD.METHOD)(c.default.BUSINESS_OFFER_ADD.PATH,c.default.BUSINESS_OFFER_ADD.DATA_KEY,{...e}),this.businessOffer=async e=>this.xhr.req(c.default.BUSINESS_OFFER.METHOD)(f.default.setParameterId(c.default.BUSINESS_OFFER.PATH,e,"offerId"),c.default.BUSINESS_OFFER.DATA_KEY),this.businessOfferStatusUpdate=async(e,t)=>this.xhr.req(c.default.BUSINESS_OFFER_UPDATE.METHOD)(f.default.setParameterId(c.default.BUSINESS_OFFER_UPDATE.PATH,e,"offerId"),c.default.BUSINESS_OFFER_UPDATE.DATA_KEY,{offerId:e,status:t}),this.businessOfferImageUpdate=async(e,t)=>this.xhr.req(c.default.BUSINESS_OFFER_UPDATE.METHOD)(f.default.setParameterId(c.default.BUSINESS_OFFER_UPDATE.PATH,e,"offerId"),c.default.BUSINESS_OFFER_UPDATE.DATA_KEY,{offerId:e,imageUrl:t}),this.businessOfferDelete=async e=>this.xhr.req(c.default.BUSINESS_OFFER_DELETE.METHOD)(f.default.setParameterId(c.default.BUSINESS_OFFER_DELETE.PATH,e,"offerId"),c.default.BUSINESS_OFFER_DELETE.DATA_KEY).then(e=>e.recordId),this.businessOfferCustomers=async e=>this.xhr.req(c.default.BUSINESS_OFFER_CUSTOMERS.METHOD)(f.default.setParameterId(c.default.BUSINESS_OFFER_CUSTOMERS.PATH,e,"offerId"),c.default.BUSINESS_OFFER_CUSTOMERS.DATA_KEY),this.businessOfferFileUpload=async e=>this.xhr.req(c.default.BUSINESS_OFFER_FILE_UPLOAD.METHOD)(c.default.BUSINESS_OFFER_FILE_UPLOAD.PATH,c.default.BUSINESS_OFFER_FILE_UPLOAD.DATA_KEY,{file:e},{"Content-Type":"multipart/form-data"}),this.businessOfferRedeemStatusUpdate=async(e,t,r)=>this.xhr.req(c.default.BUSINESS_OFFER_REDEEM_STATUS_UPDATE.METHOD)(f.default.setParameters(c.default.BUSINESS_OFFER_REDEEM_STATUS_UPDATE.PATH,[{key:"offerId",value:e.toString()},{key:"userId",value:t.toString()}]),c.default.BUSINESS_OFFER_REDEEM_STATUS_UPDATE.DATA_KEY,{status:r}).then(e=>e.status),this.businessOfferRedeemStatus=async(e,t)=>this.xhr.req(c.default.BUSINESS_OFFER_REDEEM_STATUS.METHOD)(f.default.setParameters(c.default.BUSINESS_OFFER_REDEEM_STATUS.PATH,[{key:"offerId",value:e.toString()},{key:"userId",value:t.toString()}]),c.default.BUSINESS_OFFER_REDEEM_STATUS.DATA_KEY).then(e=>e.status),this.businessPreRegister=async e=>this.xhr.req(c.default.BUSINESS_PRE_REGISTER.METHOD)(c.default.BUSINESS_PRE_REGISTER.PATH,c.default.BUSINESS_PRE_REGISTER.DATA_KEY,e),this.businessCampaigns=async(e,t=1e3)=>this.xhr.reqWithPage(c.default.BUSINESS_CAMPAIGNS.METHOD)(c.default.BUSINESS_CAMPAIGNS.PATH,c.default.BUSINESS_CAMPAIGNS.DATA_KEY,{limit:t,page:e}),this.businessCampaign=async e=>this.xhr.req(c.default.BUSINESS_CAMPAIGN.METHOD)(f.default.setParameterId(c.default.BUSINESS_CAMPAIGN.PATH,e,"campaignId"),c.default.BUSINESS_CAMPAIGN.DATA_KEY),this.businessCampaignUpdate=async(e,t)=>this.xhr.req(c.default.BUSINESS_CAMPAIGN_UPDATE.METHOD)(f.default.setParameterId(c.default.BUSINESS_CAMPAIGN_UPDATE.PATH,e,"campaignId"),c.default.BUSINESS_CAMPAIGN_UPDATE.DATA_KEY,t).then(e=>e.updated),this.businessCampaignAdd=async e=>this.xhr.req(c.default.BUSINESS_CAMPAIGN_ADD.METHOD)(c.default.BUSINESS_CAMPAIGN_ADD.PATH,c.default.BUSINESS_CAMPAIGN_ADD.DATA_KEY,e).then(e=>e.campaignId),this.businessCouponApplications=async(e,t,r=150)=>this.xhr.reqWithPage(c.default.BUSINESS_COUPON_APPLICATIONS.METHOD)(c.default.BUSINESS_COUPON_APPLICATIONS.PATH,c.default.BUSINESS_COUPON_APPLICATIONS.DATA_KEY,{page:e,status:t,limit:r}),this.businessCouponApplication=async e=>this.xhr.req(c.default.BUSINESS_COUPON_APPLICATION.METHOD)(f.default.setParameterId(c.default.BUSINESS_COUPON_APPLICATION.PATH,e,"applicationId"),c.default.BUSINESS_COUPON_APPLICATION.DATA_KEY),this.businessCouponApplicationAdd=async e=>this.xhr.req(c.default.BUSINESS_COUPON_APPLICATION_ADD.METHOD)(c.default.BUSINESS_COUPON_APPLICATION_ADD.PATH,c.default.BUSINESS_COUPON_APPLICATION_ADD.DATA_KEY,{formDatas:e}).then(e=>e.applicationId),this.businessCouponApplicationUserUpdate=async(e,t,r,n=0,i,a,s)=>this.xhr.req(c.default.BUSINESS_COUPON_APPLICATION_USER_UPDATE.METHOD)(f.default.setParameters(c.default.BUSINESS_COUPON_APPLICATION_USER_UPDATE.PATH,[{key:"applicationId",value:e.toString()},{key:"travelerId",value:t.toString()}]),c.default.BUSINESS_COUPON_APPLICATION_USER_UPDATE.DATA_KEY,{campaignId:n,status:r?1:-1,bookingDate:i,notes:a,amount:s}).then(e=>e.updated),this.businessCouponApplicationUserApprove=async(e,t,r,n,i)=>this.businessCouponApplicationUserUpdate(e,t,!0,r,n,void 0,i).then(t=>{if(t)return this.businessCouponApplication(e)}),this.businessCouponApplicationUserReject=async(e,t,r,n,i)=>this.businessCouponApplicationUserUpdate(e,t,!1,r,n,i).then(t=>{if(t)return this.businessCouponApplication(e)}),this.businessCouponApplicationFileUpload=async e=>this.xhr.req(c.default.BUSINESS_COUPON_FILE_UPLOAD.METHOD)(c.default.BUSINESS_COUPON_FILE_UPLOAD.PATH,c.default.BUSINESS_COUPON_FILE_UPLOAD.DATA_KEY,{file:e},{"Content-Type":"multipart/form-data"}),this.coupons=async(e,t=1e3)=>this.xhr.reqWithPage(c.default.COUPONS.METHOD)(c.default.COUPONS.PATH,c.default.COUPONS.DATA_KEY,{limit:t,page:e}),this.payment=async e=>this.xhr.req(c.default.PAYMENT.METHOD)(f.default.setParameters(c.default.PAYMENT.PATH,[{key:"offerId",value:e.toString()}]),c.default.PAYMENT.DATA_KEY),this.campaignReport=async(e,t)=>this.xhr.reqWithPage(c.default.CAMPAIGN_REPORT.METHOD)(f.default.setParameters(c.default.CAMPAIGN_REPORT.PATH,[{key:"campaignId",value:e.toString()}]),c.default.CAMPAIGN_REPORT.DATA_KEY,{...t}),this.campaignReportPay=async(e,t)=>this.xhr.req(c.default.CAMPAIGN_REPORT_PAY.METHOD)(f.default.setParameters(c.default.CAMPAIGN_REPORT_PAY.PATH,[{key:"campaignId",value:e.toString()},{key:"id",value:t.toString()}]),c.default.CAMPAIGN_REPORT.DATA_KEY).then(e=>e.updated),this.campaignCustomerReport=async(e,t)=>this.xhr.reqWithPage(c.default.CAMPAIGN_CUSTOMER_REPORT.METHOD)(f.default.setParameters(c.default.CAMPAIGN_CUSTOMER_REPORT.PATH,[{key:"campaignId",value:e.toString()}]),c.default.CAMPAIGN_CUSTOMER_REPORT.DATA_KEY,{...t}).then(e=>(e.data.forEach(e=>{e.lengthOfStay=(0,u.default)(e.customerDepartureDate).diff((0,u.default)(e.customerArrivalDate),"days",!1)}),e)),this.businessReport=async e=>this.xhr.reqWithPage(c.default.BUSINESS_REPORT.METHOD)(c.default.BUSINESS_REPORT.PATH,c.default.BUSINESS_REPORT.DATA_KEY,{...e}),this.businessPreRegisterReport=async e=>this.xhr.reqWithPage(c.default.BUSINESS_PRE_REGISTER_REPORT.METHOD)(c.default.BUSINESS_PRE_REGISTER_REPORT.PATH,c.default.BUSINESS_PRE_REGISTER_REPORT.DATA_KEY,{...e}),this.businessOfferReport=async(e=1,t=1e3)=>this.xhr.reqWithPage(c.default.BUSINESS_OFFER_REPORT.METHOD)(c.default.BUSINESS_OFFER_REPORT.PATH,c.default.BUSINESS_OFFER_REPORT.DATA_KEY,{page:e,limit:t}),this.businessExport=async(e,t)=>this.xhr.req(c.default.BUSINESS_EXPORT.METHOD)(c.default.BUSINESS_EXPORT.PATH,c.default.BUSINESS_EXPORT.DATA_KEY,{reportType:e,campaignId:t}),this.translationList=async()=>this.xhr.req(c.default.TRANSLATIONS.METHOD)(c.default.TRANSLATIONS.PATH,c.default.TRANSLATIONS.DATA_KEY),this.log=async(e,t={},r="ERROR")=>{var n;const{baseURL:i,xApiKey:a,email:s}=this.xhr.info();return this.xhr.req(c.default.LOGS.METHOD)(c.default.LOGS.PATH,c.default.LOGS.DATA_KEY,{message:{platform:"web",type:r,g_api_customer_id:0,user_id:0,uri_params:{},query_params:{apibaseURL:i},api_key:a,endpoint:null!==(n=null===window||void 0===window?void 0:window.location.href)&&void 0!==n?n:"",response_msg:e,request_params:{email:s,...t}}})},this.visaIframeToken=async()=>this.xhr.req(c.default.VISA_IFRAME_TOKEN.METHOD)(c.default.VISA_IFRAME_TOKEN.PATH,c.default.OFFER.DATA_KEY).then(e=>e),this.visaValidatorCheck=async e=>this.xhr.req(c.default.VISA_VALIDATOR_CHECK.METHOD)(c.default.VISA_VALIDATOR_CHECK.PATH,c.default.VISA_VALIDATOR_CHECK.DATA_KEY,{context:e}),this.combo={businessPayloadData:async()=>this.user().then(e=>e.businessId&&e.businessId>0?this.business().then(t=>({user:e,business:t})):{user:e}),campaignReportPayCombo:async(e,t,r)=>this.campaignReportPay(e,t).then(t=>this.campaignReport(e,r)),payloadDataEx:async()=>this.user().then(e=>this.business().then(t=>({user:e,business:t}))),tripDelete:async(e,t)=>this.tripDelete(e).then(()=>this.tripRefs(t)),stepAdd:async(e,t,r,n,i)=>this.stepAdd(e,t,n,i).then(()=>this.trip(r,void 0)),customStepAdd:async(e,t,r,n,i,a)=>this.customStepAdd(e,t,n,i,a).then(()=>this.trip(r,void 0,!0)),stepUpdateTimes:async(e,t,r,n)=>this.stepUpdateTimes(e,t,r).then(e=>this.trip(n,void 0)),stepReplace:async(e,t,r)=>this.stepReplace(e,t).then(e=>this.trip(r,void 0)),stepDelete:async(e,t)=>this.stepDelete(e).then(()=>this.trip(t,void 0,!0)),planUpdateOrders:async(e,t,r)=>this.planUpdateOrders(e,t).then(e=>this.trip(r,void 0,!0)),planUpdateTime:async(e,t,r,n,i)=>this.planUpdateTime(e,r,n).then(e=>this.trip(i,t,!0)),favoriteAdd:async(e,t,r)=>this.favoriteAdd(t,e).then(e=>this.favorites(r)),favoriteDelete:async(e,t)=>this.favoriteDelete(e).then(()=>this.favorites(t)),companionAdd:async(e,t)=>this.companionAdd(e).then(()=>this.companions(t)),companionUpdate:async(e,t)=>this.companionUpdate(e).then(()=>this.companions(t)),companionDelete:async(e,t)=>this.companionDelete(e).then(()=>this.companions(t)),reservationAdd:async(e,t)=>this.reservationAdd(e).then(()=>this.reservations(t)),reservationUpdate:async(e,t)=>this.reservationUpdate(e).then(()=>this.reservations(t)),reservationDelete:async(e,t)=>this.reservationDelete(e).then(()=>this.reservations(t)),reactionAdd:async(e,t)=>this.reactionAdd(e).then(()=>this.reactions(t))},this.xhr=new d.default(e,t),this.forceRequest=!r,this.lang=t}}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),r(277);const i=n(r(43)),a=r(201),s=e=>{if(void 0===e)return"";const t=Object.entries(e).filter(e=>void 0!==e[1]),r=Object.fromEntries(t);return"?"+new URLSearchParams(r)};t.default=class{constructor(e,t){this.timeout=3e4,this.getToken=()=>this.token,this.setToken=e=>{this.token=e,this.authorization=`${e.tokenType} ${e.idToken}`,this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=void 0);const t=1e3*(e.expiresIn-60);t>0&&t<36e5?this.refreshTimeoutId=setTimeout(()=>{this.refreshXhrToken().catch(e=>{console.error("Token refresh failed:",e),this.removeToken()})},t):console.warn("Token expiry time is invalid or too long. Refresh timer not set.")},this.removeToken=()=>{this.token=void 0,this.authorization=void 0,this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=void 0)},this.setLang=e=>{this.lang=e},this.refreshXhrToken=()=>{var e;const t=null===(e=this.token)||void 0===e?void 0:e.refreshToken;return t?this.req("POST")("/auth/refresh-token","token",{refreshToken:t}).then(e=>{const r={...e,refreshToken:t};return this.setToken(r),r}).catch(e=>(console.error("Refresh token failed:",e),this.removeToken(),Promise.reject(e))):(console.warn("No refresh token available."),Promise.reject(new Error("No refresh token available")))},this.get=async(e,t,r,n)=>{var i;return fetch(this.baseURL+e+s({...r,lang:this.lang}),{method:"GET",headers:{"Content-Type":"application/json",authorization:null!==(i=this.authorization)&&void 0!==i?i:"","x-api-key":this.xApiKey,...n}}).then(e=>e.json()).then(n=>(0,a.handleHttpResponseSuccess)(n,t,this.lang,r,e).data).catch(e=>(0,a.handleHttpResponseError)(e,t,r))},this.getWithPage=async(e,t,r)=>{var n;return fetch(this.baseURL+e+s({...r,lang:this.lang}),{method:"GET",headers:{"Content-Type":"application/json",authorization:null!==(n=this.authorization)&&void 0!==n?n:"","x-api-key":this.xApiKey}}).then(e=>e.json()).then(e=>(0,a.handleHttpResponseSuccess)(e,t,this.lang,r)).catch(e=>(0,a.handleHttpResponseError)(e,t,r))},this.appendLangToUrl=e=>`${this.baseURL+e}${s({lang:this.lang})}`,this.post=async(e,t,r,n)=>{var i;const s=this.appendLangToUrl(e);return fetch(s,{method:"POST",headers:{"Content-Type":"application/json",authorization:null!==(i=this.authorization)&&void 0!==i?i:"","x-api-key":this.xApiKey,...n},body:JSON.stringify({...r,lang:this.lang})}).then(e=>e.json()).then(e=>(0,a.handleHttpResponseSuccess)(e,t,this.lang,r).data).then(e=>("token"===t&&this.setToken(e),e)).catch(e=>(0,a.handleHttpResponseError)(e,t,r))},this.put=async(e,t,r,n)=>{var i;const s=this.appendLangToUrl(e);return fetch(s,{method:"PUT",headers:{"Content-Type":"application/json",authorization:null!==(i=this.authorization)&&void 0!==i?i:"","x-api-key":this.xApiKey,...n},body:JSON.stringify({...r,lang:this.lang})}).then(e=>e.json()).then(e=>(0,a.handleHttpResponseSuccess)(e,t,this.lang,r).data).catch(e=>(0,a.handleHttpResponseError)(e,t,r))},this.delete=async(e,t,r)=>{var n;return fetch(this.baseURL+e+s({lang:this.lang}),{method:"DELETE",headers:{"Content-Type":"application/json",authorization:null!==(n=this.authorization)&&void 0!==n?n:"","x-api-key":this.xApiKey,...r}}).then(e=>e.json()).then(e=>(0,a.handleHttpResponseSuccess)(e,t,this.lang).data).catch(e=>(0,a.handleHttpResponseError)(e,t))},this.postWithPage=async(e,t,r,n)=>{var i;const s=this.appendLangToUrl(e);return fetch(s,{method:"POST",headers:{"Content-Type":"application/json",authorization:null!==(i=this.authorization)&&void 0!==i?i:"","x-api-key":this.xApiKey,...n},body:JSON.stringify(r)}).then(e=>e.json()).then(e=>(0,a.handleHttpResponseSuccess)(e,t,this.lang,r)).catch(e=>(0,a.handleHttpResponseError)(e,t,r))},this.req=e=>"GET"===e?this.get:"POST"===e?this.post:"PUT"===e?this.put:"DELETE"===e?this.delete:this.get,this.reqWithPage=e=>"GET"===e?this.getWithPage:"POST"===e?this.postWithPage:this.getWithPage,this.info=()=>{var e,t;const r=this.token&&null!==(t=null===(e=i.default.parseToken(this.token))||void 0===e?void 0:e.email)&&void 0!==t?t:"";return{baseURL:this.baseURL,xApiKey:this.xApiKey,email:r}},this.baseURL=e.url,this.xApiKey=e.xApiKey,this.timeout=3e4,e.token&&this.setToken(e.token),t&&this.setLang(t)}}},function(e,t,r){(function(e){!function(t){!function(r){var n="undefined"!=typeof globalThis&&globalThis||void 0!==t&&t||void 0!==e&&e||{},i="URLSearchParams"in n,a="Symbol"in n&&"iterator"in Symbol,s="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in n,u="ArrayBuffer"in n;if(u)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&d.indexOf(Object.prototype.toString.call(e))>-1};function f(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function h(e){return"string"!=typeof e&&(e=String(e)),e}function l(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return a&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function _(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function m(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function y(e){var t=new FileReader,r=m(t);return t.readAsArrayBuffer(e),r}function b(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:s&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:i&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u&&s&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=b(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=b(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var e=_(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=_(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(s)return this.blob().then(y);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,r,n,i,a=_(this);if(a)return a;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=m(t),n=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=n?n[1]:"utf-8",t.readAsText(e,i),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(T)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(e,t){e=f(e),t=h(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},p.prototype.delete=function(e){delete this.map[f(e)]},p.prototype.get=function(e){return e=f(e),this.has(e)?this.map[e]:null},p.prototype.has=function(e){return this.map.hasOwnProperty(f(e))},p.prototype.set=function(e,t){this.map[f(e)]=h(t)},p.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},p.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),l(e)},p.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),l(e)},p.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),l(e)},a&&(p.prototype[Symbol.iterator]=p.prototype.entries);var M=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function v(e,t){if(!(this instanceof v))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,i,a=(t=t||{}).body;if(e instanceof v){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new p(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new p(t.headers)),this.method=(r=t.method||this.method||"GET",i=r.toUpperCase(),M.indexOf(i)>-1?i:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in n)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(a),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var s=/([?&])_=[^&]*/;if(s.test(this.url))this.url=this.url.replace(s,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function T(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function w(e,t){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},g.call(v.prototype),g.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var S=[301,302,303,307,308];w.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},r.DOMException=n.DOMException;try{new r.DOMException}catch(e){r.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function L(e,t){return new Promise((function(i,a){var o=new v(e,t);if(o.signal&&o.signal.aborted)return a(new r.DOMException("Aborted","AbortError"));var d=new XMLHttpRequest;function c(){d.abort()}if(d.onload=function(){var e,t,r={statusText:d.statusText,headers:(e=d.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();try{t.append(n,i)}catch(e){console.warn("Response "+e.message)}}})),t)};0===o.url.indexOf("file://")&&(d.status<200||d.status>599)?r.status=200:r.status=d.status,r.url="responseURL"in d?d.responseURL:r.headers.get("X-Request-URL");var n="response"in d?d.response:d.responseText;setTimeout((function(){i(new w(n,r))}),0)},d.onerror=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},d.ontimeout=function(){setTimeout((function(){a(new TypeError("Network request timed out"))}),0)},d.onabort=function(){setTimeout((function(){a(new r.DOMException("Aborted","AbortError"))}),0)},d.open(o.method,function(e){try{return""===e&&n.location.href?n.location.href:e}catch(t){return e}}(o.url),!0),"include"===o.credentials?d.withCredentials=!0:"omit"===o.credentials&&(d.withCredentials=!1),"responseType"in d&&(s?d.responseType="blob":u&&(d.responseType="arraybuffer")),t&&"object"==typeof t.headers&&!(t.headers instanceof p||n.Headers&&t.headers instanceof n.Headers)){var l=[];Object.getOwnPropertyNames(t.headers).forEach((function(e){l.push(f(e)),d.setRequestHeader(e,h(t.headers[e]))})),o.headers.forEach((function(e,t){-1===l.indexOf(t)&&d.setRequestHeader(t,e)}))}else o.headers.forEach((function(e,t){d.setRequestHeader(t,e)}));o.signal&&(o.signal.addEventListener("abort",c),d.onreadystatechange=function(){4===d.readyState&&o.signal.removeEventListener("abort",c)}),d.send(void 0===o._bodyInit?null:o._bodyInit)}))}L.polyfill=!0,n.fetch||(n.fetch=L,n.Headers=p,n.Request=v,n.Response=w),r.Headers=p,r.Request=v,r.Response=w,r.fetch=L,Object.defineProperty(r,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:this)}).call(this,r(5))},function(e,t,r){"use strict";t.byteLength=function(e){var t=d(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=d(e),s=n[0],o=n[1],u=new a(function(e,t,r){return 3*(t+r)/4-r}(0,s,o)),c=0,f=o>0?s-4:s;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;2===o&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[c++]=255&t);1===o&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],s=0,o=r-i;s<o;s+=16383)a.push(c(e,s,s+16383>o?o:s+16383));1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,u=s.length;o<u;++o)n[o]=s[o],i[s.charCodeAt(o)]=o;function d(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,a,s=[],o=t;o<r;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
|
|
287
287
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
288
288
|
t.read=function(e,t,r,n,i){var a,s,o=8*i-n-1,u=(1<<o)-1,d=u>>1,c=-7,f=r?i-1:0,h=r?-1:1,l=e[t+f];for(f+=h,a=l&(1<<-c)-1,l>>=-c,c+=o;c>0;a=256*a+e[t+f],f+=h,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=n;c>0;s=256*s+e[t+f],f+=h,c-=8);if(0===a)a=1-d;else{if(a===u)return s?NaN:1/0*(l?-1:1);s+=Math.pow(2,n),a-=d}return(l?-1:1)*s*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var s,o,u,d=8*a-i-1,c=(1<<d)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:a-1,p=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=c?(o=0,s=c):s+f>=1?(o=(t*u-1)*Math.pow(2,i),s+=f):(o=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+l]=255&o,l+=p,o/=256,i-=8);for(s=s<<i|o,d+=i;d>0;e[r+l]=255&s,l+=p,s/=256,d-=8);e[r+l-p]|=128*_}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(0));t.default=class{constructor(e){this.startDate=(0,i.default)(),this.endDate=(0,i.default)(),this.recurrent=[],this.blackouts=[],this.availableDays=[],this.calc=()=>{if(this.endDate.isBefore(this.startDate))return;const e=[],t=this.startDate.clone();for(;t.isSameOrBefore(this.endDate);){if(this.recurrent.includes(t.day())){const r=t.format("YYYY-MM-DD");this.blackouts.includes(r)||e.push(r)}t.add(1,"days")}this.availableDays=e},this.include=e=>this.availableDays.includes(e),this.toList=()=>this.availableDays,this.get=()=>this.tripianDates,this.set=e=>{this.tripianDates=e,this.startDate=(0,i.default)(e.startDate),this.endDate=(0,i.default)(e.endDate),this.recurrent=e.recurrent,this.blackouts=e.blackouts,this.calc()},this.tripianDates=e,this.set(e)}}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(24),a=n(r(44)),s=n(r(16)),o=r(283);t.default=(e,t,r,n,u,d)=>{var c,f,h,l,p,_,m,y,b,g,M,v,T,w,S;try{const L=(null==n?void 0:n.cityId)||(null===(h=null===(f=null===(c=s.default.trip)||void 0===c?void 0:c[r])||void 0===f?void 0:f.city)||void 0===h?void 0:h.id)||0,A=(null==n?void 0:n.tripHash)||(null===(p=null===(l=s.default.trip)||void 0===l?void 0:l[r])||void 0===p?void 0:p.tripHash)||"";if(t===a.default.CONFIG.DATA_KEY){const t=e;s.default.configList=t}else if(t===a.default.CITIES.DATA_KEY){const t=e,n=(0,o.citiesConcat)(s.default.cities,r,t);s.default.cities=n}else if(t===a.default.CITY_INFO.DATA_KEY){const t=e;s.default.citiesInfo=(0,o.citiesInfoConcat)(s.default.citiesInfo,r,t)}else if(t===a.default.CITY_EVENTS.DATA_KEY){const t=e,n=null==u?void 0:u.match(/\/cities\/(\d+)/),i=n?parseInt(n[1],10):void 0;i?s.default.citiesEvents=(0,o.citiesEventsConcat)(s.default.citiesEvents,r,i,t):console.warn("City ID is required to cache CITY_EVENTS")}else if(t===a.default.FEEDBACKS.DATA_KEY){const t=e;s.default.feedbacks||(s.default.feedbacks={}),s.default.feedbacks[r]=t}else if(t===a.default.USER_FEEDBACKS.DATA_KEY){const t=e;s.default.userFeedbacks||(s.default.userFeedbacks={}),s.default.userFeedbacks[r]=t}else if(t===a.default.POI_CATEGORIES.DATA_KEY){const t=e;s.default.poiCategoryResponse||(s.default.poiCategoryResponse={}),s.default.poiCategoryResponse[r]=t}else if(t===a.default.POIS_SEARCH_AUTO_COMPLETE_TAGS.DATA_KEY){const t=e;s.default.autoCompleteTags=(0,o.autoCompleteTagsConcat)(s.default.autoCompleteTags,r,t);const a=n||void 0,u=((null==a?void 0:a.poiCategories)||"").split(",").map(Number);void 0===(null===(_=s.default.autoCompleteTagsAll[r])||void 0===_?void 0:_.find(e=>e.cityId===L&&i.helper.arraysEqual(e.poiCategories,u)))?s.default.autoCompleteTagsAll[r]=[...s.default.autoCompleteTagsAll[r]||[],{cityId:L,poiCategories:u,tags:[...t]}]:console.warn("core.cache: This cityId-categoryGroup cached before. if forceRequest = true you can call this request repeatedly, else it is a cache logic problem!",L,u)}else if(t===a.default.POIS.DATA_KEY){const t=e,a=n||void 0,u=void 0!==(null==a?void 0:a.withOffers)?a.withOffers:0,c=void 0!==(null==a?void 0:a.withBookings)?a.withBookings:0;if(s.default.pois=(0,o.poisConcat)(s.default.pois,r,t,u,c),void 0===(null==a?void 0:a.poiIds)&&void 0===(null==a?void 0:a.bounds)&&void 0===(null==a?void 0:a.mustTryIds)&&void 0===(null==a?void 0:a.coordinate)&&void 0===(null==a?void 0:a.distance)&&""===(null==a?void 0:a.search)&&1===(null==a?void 0:a.page)){const e=((null==a?void 0:a.poiCategories)||"").split(",").map(Number);void 0===(null===(m=s.default.poisAll[r])||void 0===m?void 0:m.find(t=>t.cityId===L&&i.helper.arraysEqual(t.poiCategories,e)))?s.default.poisAll[r]=[...s.default.poisAll[r]||[],{cityId:L,poiCategories:e,showOffersOnly:u,showBookingsOnly:c,pois:{data:t,pagination:d}}]:console.warn("core.cache: This cityId-categoryGroup page 1 cached before. if forceRequest = true you can call this request repeatedly, else it is a cache logic problem!",L,e)}}else if(t===a.default.POIS_OPEN_SEARCH.DATA_KEY){const t=e,a=void 0!==(null==n?void 0:n.showOffersOnly)?n.showOffersOnly:0,u=void 0!==(null==n?void 0:n.showBookingsOnly)?n.showBookingsOnly:0;if(s.default.pois=(0,o.poisConcat)(s.default.pois,r,t,a,u),void 0===(null==n?void 0:n.poiIds)&&void 0===(null==n?void 0:n.bounds)&&void 0===(null==n?void 0:n.mustTryIds)&&void 0===(null==n?void 0:n.coordinate)&&void 0===(null==n?void 0:n.distance)&&""===(null==n?void 0:n.search)&&1===(null==n?void 0:n.page)){const e=((null==n?void 0:n.poiCategories)||"").split(",").map(Number);void 0===(null===(y=s.default.poisAll[r])||void 0===y?void 0:y.find(t=>t.cityId===L&&i.helper.arraysEqual(t.poiCategories,e)&&t.showOffersOnly===a))?s.default.poisAll[r]=[...s.default.poisAll[r]||[],{cityId:L,poiCategories:e,showOffersOnly:a,showBookingsOnly:u,pois:{data:t,pagination:d}}]:console.warn("core.cache: This cityId-categoryGroup page 1 cached before. if forceRequest = true you can call this request repeatedly, else it is a cache logic problem!",L,e)}}else if(t===a.default.POI.DATA_KEY){const t=e,i=void 0!==(null==n?void 0:n.withOffers)?n.withOffers:0,a=void 0!==(null==n?void 0:n.withBookings)?n.withBookings:0;s.default.pois=(0,o.poisConcat)(s.default.pois,r,[t],i,a)}else if(t===a.default.USER.DATA_KEY){const t=e;s.default.user=t}else if(t===a.default.QUESTIONS.DATA_KEY+"-trip"||t===a.default.QUESTIONS.DATA_KEY+"-profile"||t===a.default.QUESTIONS.DATA_KEY+"-companion"){const n=e;switch((0,o.questionsConcat)(s.default.questions,r,n),t){case a.default.QUESTIONS.DATA_KEY+"-trip":s.default.questionsTrip||(s.default.questionsTrip={}),s.default.questionsTrip[r]=n;break;case a.default.QUESTIONS.DATA_KEY+"-profile":s.default.questionsProfile||(s.default.questionsProfile={}),s.default.questionsProfile[r]=n;break;case a.default.QUESTIONS.DATA_KEY+"-companion":s.default.questionsCompanion||(s.default.questionsCompanion={}),s.default.questionsCompanion[r]=n;break;default:console.error("core.cache: Error. dataKey could not find in "+a.default.QUESTIONS.DATA_KEY,t)}}else if(t===a.default.FAVORITES.DATA_KEY){const t=e;s.default.favorites[r]=[...s.default.favorites[r]||[],{cityId:L,favoritePois:t}]}else if(t===a.default.FAVORITE_ADD.DATA_KEY){const t=e;s.default.favorites=(0,o.favoriteConcatOne)(s.default.favorites,r,L,t)}else if(t===a.default.FAVORITE_DELETE.DATA_KEY){const t=e.recordId,n=null===(b=s.default.favorites[r])||void 0===b?void 0:b.findIndex(e=>e.cityId===L);n>-1&&(s.default.favorites[r][n].favoritePois=s.default.favorites[r][n].favoritePois.filter(e=>e.id!==t))}else if(t===a.default.TRIPS.DATA_KEY){const t=e;s.default.tripRefs=t}else if(t===a.default.TRIP.DATA_KEY||t===a.default.TRIP_ADD.DATA_KEY||t===a.default.TRIP_UPDATE.DATA_KEY){const t=e,n={id:t.id,shared:t.shared,tripHash:t.tripHash,city:t.city,tripProfile:t.tripProfile};s.default.tripRefs&&(s.default.tripRefs=(0,o.tripRefsConcatOne)(s.default.tripRefs,n)),s.default.trips=(0,o.tripsConcatOne)(s.default.trips,r,t),s.default.trip[r]=t}else if(t===a.default.TRIP_DELETE.DATA_KEY){const t=e.recordId;s.default.tripRefs=null===(g=s.default.tripRefs)||void 0===g?void 0:g.filter(e=>e.id!==t)}else if(t===a.default.PLAN_UPDATE.DATA_KEY||t===a.default.PLAN.DATA_KEY){const t=e,n=(0,o.planUpdated)(t,s.default.trip[r]);n&&((0,o.tripsConcatOne)(s.default.trips,r,n),s.default.trip[r]=i.helper.deepCopy(n))}else if(t===a.default.STEP_ADD.DATA_KEY){const t=e,i=null==n?void 0:n.planId;if(i){const e=(0,o.stepAdded)(i,t,s.default.trip[r]);e&&(s.default.trips=(0,o.tripsConcatOne)(s.default.trips,r,e))}else console.error("core.cache: Error. When step added cache, plan id params could not find in trip plans. Params - added step:",n,t)}else if(t===a.default.STEP_UPDATE.DATA_KEY){const t=e,n=(0,o.stepUpdated)(t,s.default.trip[r]);n&&(s.default.trips=(0,o.tripsConcatOne)(s.default.trips,r,n))}else if(t===a.default.STEP_DELETE.DATA_KEY){const{recordId:t}=e,n=(0,o.stepDeleted)(t,s.default.trip[r]);n&&(s.default.trips=(0,o.tripsConcatOne)(s.default.trips,r,n))}else if(t===a.default.COMPANIONS.DATA_KEY){const t=e;s.default.companions[r]=t}else if(t===a.default.COMPANION_ADD.DATA_KEY||t===a.default.COMPANION_UPDATE.DATA_KEY){const t=e;s.default.companions=(0,o.companionConcatOne)(s.default.companions,r,t)}else if(t===a.default.COMPANION_DELETE.DATA_KEY){const t=e.recordId;s.default.companions[r]=null===(M=s.default.companions[r])||void 0===M?void 0:M.filter(e=>e.id!==t)}else if(t===a.default.RESERVATIONS.DATA_KEY){const t=e;s.default.reservations[r]=t}else if(t===a.default.RESERVATION_ADD.DATA_KEY||t===a.default.RESERVATION_UPDATE.DATA_KEY){const t=e;s.default.reservations=(0,o.reservationConcatOne)(s.default.reservations,r,t)}else if(t===a.default.RESERVATION_DELETE.DATA_KEY){const t=e.recordId;s.default.reservations[r]=null===(v=s.default.reservations[r])||void 0===v?void 0:v.filter(e=>e.id!==t)}else if(t===a.default.REACTIONS.DATA_KEY){if(""!==A){const t=e;(null===(T=s.default.userReactions[r])||void 0===T?void 0:T.find(e=>e.tripHash===A))||(s.default.userReactions[r]=[...s.default.userReactions[r]||[],{tripHash:A,userReactions:t}])}}else if(t===a.default.REACTION_ADD.DATA_KEY||t===a.default.REACTION_UPDATE.DATA_KEY){if(""!==A){const t=e;(null===(w=s.default.userReactions[r])||void 0===w?void 0:w.findIndex(e=>e.tripHash===A))>-1&&(s.default.userReactions=(0,o.reactionConcatOne)(s.default.userReactions,r,A,t))}}else if(t===a.default.REACTION_DELETE.DATA_KEY){if(""!==A){const t=e.recordId,n=null===(S=s.default.userReactions[r])||void 0===S?void 0:S.findIndex(e=>e.tripHash===A);n>-1&&(s.default.userReactions[r][n].userReactions=s.default.userReactions[r][n].userReactions.filter(e=>e.id!==t))}}else if(t===a.default.TOP_TEN.DATA_KEY){const t=e;s.default.topTens=(0,o.topTensConcatOne)(s.default.topTens,r,L,t)}else s.default[t]||(s.default[t]={}),s.default[t][r]=e,["token","register","city","trip-with-hash"].includes(t)||console.warn("core.cache: This dataKey did not cache.",t)}catch(e){console.error("core.cache: Error",e)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.topTensConcatOne=t.reactionConcatOne=t.reactionCached=t.reservationConcatOne=t.reservationCached=t.companionConcatOne=t.companionCached=t.favoriteConcatOne=t.favoriteCached=t.stepDeleted=t.stepUpdated=t.stepAdded=t.planUpdated=t.tripsConcatOne=t.tripCached=t.tripRefsConcatOne=t.tripRefCached=t.questionsConcat=t.questionCached=t.autoCompleteTagsConcat=t.poisConcat=t.poiCached=t.citiesEventsConcat=t.citiesInfoConcat=t.cityInfoCached=t.citiesConcat=t.cityCached=void 0;const n=r(24),i=(e,t)=>e.find(e=>e.id===t),a=(e,t,r=!0)=>{const i=n.helper.deepCopy(e),a=i.findIndex(e=>e.id===t.id);return-1===a?r?i.push(t):i.splice(0,0,t):i[a]=t,i};t.cityCached=(e,t)=>i(e,t);t.citiesConcat=(e,t,r)=>{const n={...e};let i=[...n[t]||[]];return r.forEach(e=>{i=a(i,e)}),n[t]=i,n};t.cityInfoCached=(e,t)=>i(e,t);t.citiesInfoConcat=(e,t,r)=>{const n={...e};let i=[...n[t]||[]];return i=a(i,r),n[t]=i,n};t.citiesEventsConcat=(e,t,r,i)=>{const a=n.helper.deepCopy(e),s=a[t]||[],o=s.find(e=>e.cityId===r);return o?o.events=[...o.events,...i]:s.push({cityId:r,events:i}),a[t]=s,a};t.poiCached=(e,t)=>i(e,t);t.poisConcat=(e,t,r,n,i)=>{const a={...e},s=[...a[t]||[]];let o=s.find(e=>e.showOffersOnly===n&&e.showBookingsOnly===i);return o||(o={showOffersOnly:n,showBookingsOnly:i,pois:[]},s.push(o)),o.pois=r.reduce((e,t)=>{const r=e.findIndex(e=>e.id===t.id);return-1!==r?e[r]=t:e.push(t),e},o.pois),a[t]=s,a};t.autoCompleteTagsConcat=(e,t,r)=>{const n={...e};let i=[...n[t]||[]];return r.forEach(e=>{i=a(i,e)}),n[t]=i,n};t.questionCached=(e,t)=>i(e,t);t.questionsConcat=(e,t,r)=>{const n={...e};let i=[...n[t]||[]];return r.forEach(e=>{i=a(i,e)}),n[t]=i,n};t.tripRefCached=(e,t)=>i(e,t);t.tripRefsConcatOne=(e,t)=>a(e,t,!1);t.tripCached=(e,t)=>i(e,t);t.tripsConcatOne=(e,t,r)=>{const i=n.helper.deepCopy(e);let s=[...i[t]||[]];return s=a(s,r),i[t]=s,i};t.planUpdated=(e,t)=>{if(!t)return;const r=n.helper.deepCopy(t),i=r.plans.findIndex(t=>t.id===e.id);return i>-1?(r.plans[i]={...e},r):void 0};t.stepAdded=(e,t,r)=>{if(!r)return;const i=n.helper.deepCopy(r),a=i.plans.findIndex(t=>t.id===e);if(-1===a)return;const s=n.helper.deepCopy(i.plans[a].steps);s.splice(t.order,0,t);for(let e=0;e<s.length;e+=1)s[e].order=e;return i.plans[a].steps=s,i};t.stepUpdated=(e,t)=>{if(!t)return;const r=n.helper.deepCopy(t);let i=!1;for(let a=0;a<t.plans.length;a+=1){const s=t.plans[a].steps.findIndex(t=>t.id===e.id);if(s>-1){i=!0;const o=n.helper.deepCopy(t.plans[a].steps);o.splice(s,1),o.splice(e.order,0,e);for(let e=0;e<o.length;e+=1)o[e].order=e;r.plans[a].steps=o;break}}return i||console.error("cacheHelper.stepUpdated error. stepId could not find in trip plans",r,e),r};t.stepDeleted=(e,t)=>{if(!t)return;const r=n.helper.deepCopy(t);let i=!1;for(let a=0;a<t.plans.length;a+=1){if(t.plans[a].steps.findIndex(t=>t.id===e)>-1){i=!0;const s=[],o=n.helper.deepCopy(t.plans[a].steps.filter(t=>t.id!==e));for(let e=0;e<o.length;e+=1)s.push(o[e]),s[e].order=e;r.plans[a].steps=s;break}}return!1===i&&console.error("cacheHelper.stepDeleted error. Deleted step id could not find in trip plans",r,e),r};t.favoriteCached=(e,t)=>i(e,t);t.favoriteConcatOne=(e,t,r,n)=>{var i;const s={...e},o=null===(i=s[t])||void 0===i?void 0:i.find(e=>e.cityId===r);return o?o.favoritePois=a(o.favoritePois,n):(s[t]||(s[t]=[]),s[t].push({cityId:r,favoritePois:[n]})),s};t.companionCached=(e,t)=>i(e,t);t.companionConcatOne=(e,t,r)=>{const n={...e};let i=[...n[t]||[]];return i=a(i,r,!1),n[t]=i,n};t.reservationCached=(e,t)=>i(e,t);t.reservationConcatOne=(e,t,r)=>{const n={...e};let i=[...n[t]||[]];return i=a(i,r,!0),n[t]=i,n};t.reactionCached=(e,t)=>i(e,t);t.reactionConcatOne=(e,t,r,n)=>{var i;const s={...e},o=null===(i=s[t])||void 0===i?void 0:i.find(e=>e.tripHash===r);return o?o.userReactions=a(o.userReactions,n):(s[t]||(s[t]=[]),s[t].push({tripHash:r,userReactions:[n]})),s};t.topTensConcatOne=(e,t,r,n)=>{var i;const a={...e},s=null===(i=a[t])||void 0===i?void 0:i.find(e=>e.cityId===r);return s?s.topTen=n:(a[t]||(a[t]=[]),a[t].push({cityId:r,topTen:n})),a},t.default={citiesConcat:t.citiesConcat,poisConcat:t.poisConcat,questionsConcat:t.questionsConcat,tripRefsConcatOne:t.tripRefsConcatOne,tripsConcatOne:t.tripsConcatOne,companionConcatOne:t.companionConcatOne,stepDeleted:t.stepDeleted,planUpdated:t.planUpdated,reservationConcatOne:t.reservationConcatOne,reactionConcatOne:t.reactionConcatOne,favoriteConcatOne:t.favoriteConcatOne,stepUpdated:t.stepUpdated,stepAdded:t.stepAdded,autoCompleteTagsConcat:t.autoCompleteTagsConcat,topTensConcatOne:t.topTensConcatOne}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=a(r(24)),u=s(r(44)),d=s(r(16));class c{}c.cities=e=>{var t;return null===(t=d.default.cities)||void 0===t?void 0:t[e]},c.city=(e,t)=>{var r,n;return null===(n=null===(r=d.default.cities)||void 0===r?void 0:r[e])||void 0===n?void 0:n.find(e=>e.id===t)},c.cityInfo=(e,t)=>{var r,n;return null===(n=null===(r=d.default.citiesInfo)||void 0===r?void 0:r[e])||void 0===n?void 0:n.find(e=>e.id===t.toString())},c.citiesEvents=(e,t)=>{var r,n;const i=null===(n=null===(r=d.default.citiesEvents)||void 0===r?void 0:r[e])||void 0===n?void 0:n.find(e=>e.cityId===t);return null==i?void 0:i.events},c.feedbacks=e=>{var t;return null===(t=d.default.feedbacks)||void 0===t?void 0:t[e]},c.userFeedbacks=e=>{var t;return null===(t=d.default.userFeedbacks)||void 0===t?void 0:t[e]},c.poiCategories=e=>{var t;return null===(t=d.default.poiCategoryResponse)||void 0===t?void 0:t[e]},c.autoCompleteTagsAll=(e,t,r)=>{var n,i;const a=r.split(",").map(Number),s=null===(i=null===(n=d.default.autoCompleteTagsAll)||void 0===n?void 0:n[e])||void 0===i?void 0:i.find(e=>e.cityId===t&&o.helper.arraysEqual(e.poiCategories,a));if(s)return s.tags},c.poi=(e,t)=>{var r;const n=null===(r=d.default.pois)||void 0===r?void 0:r[e];if(n)for(const e of n){const r=e.pois.find(e=>e.id===t);if(r)return r}},c.pois=(e,t,r)=>{var n,i,a;if(0===r.length)return;const s=null===(a=null===(i=null===(n=d.default.pois)||void 0===n?void 0:n[e])||void 0===i?void 0:i.find(e=>e.showOffersOnly===t))||void 0===a?void 0:a.pois.filter(e=>r.includes(e.id));return(null==s?void 0:s.length)===r.length?s:void 0},c.poisAll=(e,t,r,n,i)=>{var a,s;const u=r.split(",").map(Number),c=null===(s=null===(a=d.default.poisAll)||void 0===a?void 0:a[e])||void 0===s?void 0:s.find(e=>e.cityId===t&&o.helper.arraysEqual(e.poiCategories,u)&&e.showOffersOnly===n&&e.showBookingsOnly===i);if(c)return c.pois},c.user=()=>d.default.user,c.favorites=(e,t)=>{var r,n,i,a,s,o;return void 0===t&&(t=null===(i=null===(n=null===(r=d.default.trip)||void 0===r?void 0:r[e])||void 0===n?void 0:n.city)||void 0===i?void 0:i.id),null===(o=null===(s=null===(a=d.default.favorites)||void 0===a?void 0:a[e])||void 0===s?void 0:s.find(e=>e.cityId===t))||void 0===o?void 0:o.favoritePois},c.companions=e=>{var t;return null===(t=d.default.companions)||void 0===t?void 0:t[e]},c.reservations=e=>{var t;return null===(t=d.default.reservations)||void 0===t?void 0:t[e]},c.userReactions=(e,t)=>{var r,n,i,a,s;const o=t||(null===(n=null===(r=d.default.trip)||void 0===r?void 0:r[e])||void 0===n?void 0:n.tripHash);if(o)return null===(s=null===(a=null===(i=d.default.userReactions)||void 0===i?void 0:i[e])||void 0===a?void 0:a.find(e=>e.tripHash===o))||void 0===s?void 0:s.userReactions},c.questions=(e,t)=>{var r,n,i;let a=[];switch(t){case`${u.default.QUESTIONS.DATA_KEY}-${o.default.QUESTIONS_CATEGORY.TRIP}`:a=(null===(r=d.default.questionsTrip)||void 0===r?void 0:r[e])||[];break;case`${u.default.QUESTIONS.DATA_KEY}-${o.default.QUESTIONS_CATEGORY.PROFILE}`:a=(null===(n=d.default.questionsProfile)||void 0===n?void 0:n[e])||[];break;case`${u.default.QUESTIONS.DATA_KEY}-${o.default.QUESTIONS_CATEGORY.COMPANION}`:a=(null===(i=d.default.questionsCompanion)||void 0===i?void 0:i[e])||[]}if(0!==a.length)return a},c.tripRefs=()=>d.default.tripRefs,c.tripSavedRefs=()=>d.default.tripSavedRefs,c.tripRef=e=>{var t;return null===(t=d.default.tripRefs)||void 0===t?void 0:t.find(t=>t.tripHash===e)},c.trip=(e,t,r)=>{var n,i;const a=null===(i=null===(n=d.default.trips)||void 0===n?void 0:n[e])||void 0===i?void 0:i.find(e=>e.tripHash===t);if(a){const t=a.plans.length-1<r?a.plans.length-1:r;if(0!==a.plans[t].generatedStatus){const t=o.helper.deepCopy(a);return d.default.trip={...d.default.trip,[e]:t},a}}},c.plan=(e,t)=>{var r,n;return null===(n=null===(r=d.default.trip)||void 0===r?void 0:r[e])||void 0===n?void 0:n.plans.find(e=>e.id===t)},c.topTen=(e,t)=>{var r,n,i;return null===(i=null===(n=null===(r=d.default.topTens)||void 0===r?void 0:r[e])||void 0===n?void 0:n.find(e=>e.cityId===t))||void 0===i?void 0:i.topTen},t.default=c},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.allQuestionsData=void 0;const i=n(r(16));t.allQuestionsData=e=>{i.default.questions||(i.default.questions={}),i.default.questionsTrip||(i.default.questionsTrip={}),i.default.questionsProfile||(i.default.questionsProfile={}),i.default.questionsCompanion||(i.default.questionsCompanion={}),i.default.questions[e]=(i.default.questionsTrip[e]||[]).concat(i.default.questionsProfile[e]||[]).concat(i.default.questionsCompanion[e]||[])}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(16));t.default=()=>{i.default.initialised=!1,i.default.hasError=!1,i.default.errors=[],i.default.logs=[],i.default.configList=void 0,i.default.cities={},i.default.citiesInfo={},i.default.citiesEvents={},i.default.feedbacks={},i.default.userFeedbacks={},i.default.poiCategoryResponse={},i.default.pois={},i.default.questions={},i.default.questionsTrip={},i.default.questionsProfile={},i.default.questionsCompanion={},i.default.topTens={},i.default.user=void 0,i.default.favorites={},i.default.companions={},i.default.reservations={},i.default.userReactions={},i.default.tripRefs=void 0,i.default.tripSavedRefs=void 0,i.default.trips={},i.default.trip={},i.default.poisAll={},i.default.autoCompleteTags={},i.default.autoCompleteTagsAll={}}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(10)),a=r(201),s={en:"en_US",fr:"fr_FR",es:"es_ES",pt:"pt_PT",de:"de_DE",nl:"nl_NL"};function o(e){return s[e]||"en_US"}t.default=class{constructor(e,t,r,n,s){this.urlBuilder=(e,t)=>{const r=this.proxyURL+"?url=";let n=`${this.apiUrl}${e}`;Object.entries(t).forEach(([e,t],r)=>{n+=0===r?"?":"&",n+=`${e}=${t}`});return r+btoa(n)},this.business=async e=>{const t=this.sandbox?"rC5mIHMNF5C1Jtpb2obSkA":e,r=this.urlBuilder("/businesses/"+t,{});return this.axios.get(r,{headers:{"Accept-Language":o(this.lang)}}).then(e=>e.data).catch(t=>(0,a.handleHttpResponseError)(t,"yelp-business",e))},this.openings=async e=>{const t=this.sandbox?"rC5mIHMNF5C1Jtpb2obSkA":e.businessId,r=this.urlBuilder(`/bookings/${t}/openings`,{date:e.date,time:e.time,covers:e.covers});return this.axios.get(r,{headers:{"Accept-Language":o(this.lang)}}).then(e=>e.data).catch(t=>(0,a.handleHttpResponseError)(t,"yelp-opening",e))},this.hold=async e=>{const t=this.sandbox?"rC5mIHMNF5C1Jtpb2obSkA":e.businessId,r=`${this.proxyURL}?url=${btoa(`${this.apiUrl}/bookings/${t}/holds`)}`,n=new URLSearchParams({covers:e.covers.toString(),date:e.date,time:e.time,unique_id:e.uniqueId});return this.axios.post(r,n,{headers:{"Content-Type":"application/x-www-form-urlencoded","Accept-Language":o(this.lang)}}).then(e=>e.data).catch(t=>(0,a.handleHttpResponseError)(t,"yelp-hold",e))},this.reservationStatus=async e=>this.axios.get(`/bookings/reservation/${e}/status`,{headers:{"Content-Type":"application/x-www-form-urlencoded","Accept-Language":o(this.lang)}}).then(e=>e.data).catch(t=>{var r,n,i,s,o,u;return t.response&&(null===(r=t.response)||void 0===r?void 0:r.data)&&(null===(i=null===(n=t.response)||void 0===n?void 0:n.data)||void 0===i?void 0:i.error)&&"RESERVATION_CANCELED"===(null===(u=null===(o=null===(s=t.response)||void 0===s?void 0:s.data)||void 0===o?void 0:o.error)||void 0===u?void 0:u.code)?{active:!1,covers:0,date:"",time:""}:(0,a.handleHttpResponseError)(t,"yelp-reservationStatus",e)}),this.reservationCancel=async e=>this.axios.post(`/bookings/reservation/${e}/cancel`,{headers:{"Content-Type":"application/x-www-form-urlencoded","Accept-Language":o(this.lang)}}).then(e=>e.data).catch(t=>(0,a.handleHttpResponseError)(t,"yelp-reservationCancel",e)),this.reservation=async e=>{const t=this.sandbox?"rC5mIHMNF5C1Jtpb2obSkA":e.businessId,r=`${this.proxyURL}?url=${btoa(`${this.apiUrl}/bookings/${t}/reservations`)}`,n=new URLSearchParams({time:e.time,date:e.date,covers:e.covers.toString(),first_name:e.firstName,last_name:e.lastName,phone:e.phone,email:e.email,unique_id:e.uniqueId,hold_id:e.holdId});return this.axios.post(r,n,{headers:{"Content-Type":"application/x-www-form-urlencoded","Accept-Language":o(this.lang)}}).then(e=>e.data).catch(t=>(0,a.handleHttpResponseError)(t,"yelp-reservation",e))},this.proxyURL=n,this.apiUrl=e,this.sandbox=r,this.axios=i.default.create(),this.axios.defaults.baseURL=`${this.proxyURL}?url=${e}`,this.axios.defaults.headers.common.authorization="Bearer "+t,this.axios.defaults.timeout=3e4,this.lang=s}}},function(e,t,r){"use strict";var n=r(6),i=r(202),a=r(289),s=r(209);var o=function e(t){var r=new a(t),o=i(a.prototype.request,r);return n.extend(o,a.prototype,r),n.extend(o,r),o.create=function(r){return e(s(t,r))},o}(r(45));o.Axios=a,o.CanceledError=r(35),o.CancelToken=r(303),o.isCancel=r(208),o.VERSION=r(210).version,o.toFormData=r(205),o.AxiosError=r(17),o.Cancel=o.CanceledError,o.all=function(e){return Promise.all(e)},o.spread=r(304),o.isAxiosError=r(305),e.exports=o,e.exports.default=o},function(e,t,r){"use strict";var n=r(6),i=r(203),a=r(290),s=r(291),o=r(209),u=r(207),d=r(302),c=d.validators;function f(e){this.defaults=e,this.interceptors={request:new a,response:new a}}f.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=o(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&d.assertOptions(r,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var a,u=[];if(this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)})),!i){var f=[s,void 0];for(Array.prototype.unshift.apply(f,n),f=f.concat(u),a=Promise.resolve(t);f.length;)a=a.then(f.shift(),f.shift());return a}for(var h=t;n.length;){var l=n.shift(),p=n.shift();try{h=l(h)}catch(e){p(e);break}}try{a=s(h)}catch(e){return Promise.reject(e)}for(;u.length;)a=a.then(u.shift(),u.shift());return a},f.prototype.getUri=function(e){e=o(this.defaults,e);var t=u(e.baseURL,e.url);return i(t,e.params,e.paramsSerializer)},n.forEach(["delete","get","head","options"],(function(e){f.prototype[e]=function(t,r){return this.request(o(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(o(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}f.prototype[e]=t(),f.prototype[e+"Form"]=t(!0)})),e.exports=f},function(e,t,r){"use strict";var n=r(6);function i(){this.handlers=[]}i.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},function(e,t,r){"use strict";var n=r(6),i=r(292),a=r(208),s=r(45),o=r(35);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new o}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return u(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(u(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,r){"use strict";var n=r(6),i=r(45);e.exports=function(e,t,r){var a=this||i;return n.forEach(r,(function(r){e=r.call(a,e,t)})),e}},function(e,t,r){"use strict";var n=r(6);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},function(e,t,r){"use strict";var n=r(17);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(new n("Request failed with status code "+r.status,[n.ERR_BAD_REQUEST,n.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}},function(e,t,r){"use strict";var n=r(6);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,a,s){var o=[];o.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),n.isString(i)&&o.push("path="+i),n.isString(a)&&o.push("domain="+a),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var n=r(6),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,a,s={};return e?(n.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=n.trim(e.substr(0,a)).toLowerCase(),r=n.trim(e.substr(a+1)),t){if(s[t]&&i.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},function(e,t,r){"use strict";var n=r(6);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},function(e,t){e.exports=null},function(e,t,r){"use strict";var n=r(210).version,i=r(17),a={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){a[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var s={};a.transitional=function(e,t,r){function a(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,o){if(!1===e)throw new i(a(n," has been removed"+(t?" in "+t:"")),i.ERR_DEPRECATED);return t&&!s[n]&&(s[n]=!0,console.warn(a(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,o)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new i("options must be an object",i.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),a=n.length;a-- >0;){var s=n[a],o=t[s];if(o){var u=e[s],d=void 0===u||o(u,s,e);if(!0!==d)throw new i("option "+s+" must be "+d,i.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new i("Unknown option "+s,i.ERR_BAD_OPTION)}},validators:a}},function(e,t,r){"use strict";var n=r(35);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";var n=r(6);e.exports=function(e){return n.isObject(e)&&!0===e.isAxiosError}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(10)),a=r(307),s=r(308);t.default=class{constructor(e,t,r,n,o,u="USD"){this.categories=async(e=10)=>{const t=btoa(`${this.apiUrl}/categories?cnt_language=${this.lang}¤cy=${this.currency}&limit=${e}`);return this.axios.get(`${this.proxyURL}?url=${t}`).then(e=>e.data.data.categories).catch(e=>(0,s.handleHttpResponseErrorForGyg)(e,"gyg-categories"))},this.category=async e=>{const t=btoa(`${this.apiUrl}/categories/${e}?cnt_language=${this.lang}¤cy=${this.currency}`);return this.axios.get(`${this.proxyURL}?url=${t}`).then(e=>e.data.data.categories[0]).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-category",e))},this.defaultTours=async(e,t,r=20,n,i,a=50,s="full")=>{const o=btoa(`${this.apiUrl}/tours?preformatted=${s}&limit=${a}&cnt_language=${this.lang}¤cy=${this.currency}&q=${encodeURIComponent(e)}${t?`&coordinates[]=${t.lat}&coordinates[]=${t.lng}&coordinates[]=${r}`:""}${i?"&categories[]="+i.join(","):""}${n?`&date[]=${n.start}&date[]=${n.end}&duration[]=1440`:""}`);return this.axios.get(`${this.proxyURL}?url=${o}`)},this.ticketTours=async(e,t,r=20,n,i=[123],a=50,s="full")=>{const o=btoa(`${this.apiUrl}/tours?preformatted=${s}&limit=${a}&cnt_language=${this.lang}¤cy=${this.currency}&q=${e}${t?`&coordinates[]=${t.lat}&coordinates[]=${t.lng}&coordinates[]=${r}`:""}${i?"&categories[]="+i.join(","):""}${n?`&date[]=${n.start}&date[]=${n.end}`:""}`);return this.axios.get(`${this.proxyURL}?url=${o}`)},this.toursAll=async(e,t,r=20,n,i=50,o,u=a.uniqueTour,d="full")=>Promise.all([this.defaultTours(e,t,r,n,o,i,d),this.ticketTours(e,t,r,n,void 0,i,d)]).then(e=>{const t=e[0].data.data.tours,r=e[1].data.data.tours,n=t.map(e=>e.tour_id),i=[...t,...r.filter(e=>!n.includes(e.tour_id))],s=[];a.titleCategoryIds.forEach(e=>{s.push({title:e.title,items:[]})}),i.forEach(e=>{let t=!1;a.titleCategoryIds.forEach((r,n)=>{t&&u||e.categories.findIndex(e=>r.categoryIds.includes(e.category_id))>-1&&(s[n].items.push(e),t=!0)})});return s.filter(e=>0!==e.items.length).map(e=>({title:e.title,items:e.items.sort((e,t)=>t.number_of_ratings-e.number_of_ratings)}))}).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-tours",e)),this.tours=async(e,t,r=20,n,i,o=a.uniqueTour,u=50,d="full")=>{const c=btoa(`${this.apiUrl}/tours?preformatted=${d}&limit=${u}&cnt_language=${this.lang}¤cy=${this.currency}&q=${e}\n ${t?`&coordinates[]=${t.lat}&coordinates[]=${t.lng}&coordinates[]=${r}`:""}${i?"&categories[]="+(null==i?void 0:i.join(",")):""} ${n?`&date[]=${n.start}&date[]=${n.end}&duration[]=1440`:""}`);return this.axios.get(`${this.proxyURL}?url=${c}`).then(e=>{const t=[],r=e.data.data.tours;a.titleCategoryIds.forEach(e=>{t.push({title:e.title,items:[]})}),r.forEach(e=>{let r=!1;a.titleCategoryIds.forEach((n,i)=>{r&&o||e.categories.findIndex(e=>n.categoryIds.includes(e.category_id))>-1&&(t[i].items.push(e),r=!0)})});return t.filter(e=>0!==e.items.length).map(e=>({title:e.title,items:e.items.sort((e,t)=>t.number_of_ratings-e.number_of_ratings)}))}).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-tours",e))},this.tour=async(e,t="full")=>{const r=btoa(`${this.apiUrl}/tours/${e}?cnt_language=${this.lang}¤cy=${this.currency}&preformatted=${t}`);return this.axios.get(`${this.proxyURL}?url=${r}`).then(e=>e.data.data.tours[0]).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-tour",e))},this.tourOptions_1=async e=>{const t=btoa(`${this.apiUrl}/tours/${e}/options?cnt_language=${this.lang}¤cy=${this.currency}`);return this.axios.get(`${this.proxyURL}?url=${t}`).then(e=>{if(e.data.data&&e.data.data.tour_options)return e.data.data.tour_options;throw"Tour is not available for now"}).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-tour-options",e))},this.optionAvailabilities_2=async(e,t,r)=>{const n=btoa(`${this.apiUrl}/options/${e}/availabilities?cnt_language=${this.lang}¤cy=${this.currency}&date[]=${t}${r?"&date[]="+r:""}`);return this.axios.get(`${this.proxyURL}?url=${n}`).then(e=>e.data.data.availabilities).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-tour-option-availabilities",e))},this.optionPricings_3=async e=>{const t=btoa(`${this.apiUrl}/options/${e}/pricings?cnt_language=${this.lang}¤cy=${this.currency}`);return this.axios.get(`${this.proxyURL}?url=${t}`).then(e=>e.data.data.pricing).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-tour-option-pricings",e))},this.tourDataEx=async(e,t,r)=>{const n={tour:await this.tour(e),availableDates:[],formPersonsCategories:[],options:[]},i=await this.tourOptions_1(e);if(0===i.length)return n;for(let e=0;e<i.length;e++){const a=i[e],s=await this.optionAvailabilities_2(a.option_id,t,r);if(0===s.length)continue;const o=await this.optionPricings_3(a.option_id),u=[];s.forEach((e,t)=>{const r=o.find(t=>t.pricing_id===e.pricing_id);if(r){const i={availability_id:10*a.option_id+t,...e,...r};u.push(i);const s=i.start_time.split("T")[0];n.availableDates.includes(s)||n.availableDates.push(s)}});const d={...a,availabilities:u};n.options.push(d)}return n.options.length>0&&n.options[0].availabilities.length>0&&(n.formPersonsCategories=n.options[0].availabilities[0].categories.map(e=>{const t={id:e.id,name:e.name,min_age:e.min_age,max_age:e.max_age,addon:e.addon,stand_alone:e.stand_alone};return"Group"===t.name&&(t.name="Participants"),void 0===t.min_age&&(t.min_age=0),void 0===t.max_age&&(t.max_age=99),t})),n},this.tourAvailabilities=async(e,t,r)=>{const n=btoa(`${this.apiUrl}/tours/${e}/availabilities?cnt_language=${this.lang}¤cy=${this.currency}&date[]=${t}&date[]=${r}`);return this.axios.get(`${this.proxyURL}?url=${n}`).then(e=>e.data.data.availabilities).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-tour-availabilities",e))},this.options=async e=>{const t=btoa(`${this.apiUrl}/tours/${e}/options?cnt_language=${this.lang}¤cy=${this.currency}`);return this.axios.get(`${this.proxyURL}?url=${t}`).then(e=>e.data.data.tour_options).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-tour-options",e))},this.optionAvailabilities=async(e,t,r)=>{const n=btoa(`${this.apiUrl}/options/${e}/availabilities?cnt_language=${this.lang}¤cy=${this.currency}&date[]=${t}${r?"&date[]="+r:""}`);return this.axios.get(`${this.proxyURL}?url=${n}`).then(e=>e.data.data.availabilities).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-tour-option-availabilities",e))},this.optionPricings=async e=>{const t=btoa(`${this.apiUrl}/options/${e}/pricings?cnt_language=${this.lang}¤cy=${this.currency}`);return this.axios.get(`${this.proxyURL}?url=${t}`).then(e=>e.data.data.pricing[0]).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-tour-option-pricings",e))},this.tourAvailabilitiy=async e=>{const t=btoa(`${this.apiUrl}/tours/${e}/availability?cnt-language=${this.lang}`);return this.axios.get(`${this.proxyURL}?url=${t}`).then(e=>e.data).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-tour-availabilities",e))},this.tourOptions=async(e,t,r,n=10)=>{const i=btoa(`${this.apiUrl}/tours/${e}/options?cnt_language=${this.lang}¤cy=${this.currency}&date[]=${t}${r?"&date[]="+r:""}&limit=${n}`);return this.axios.get(`${this.proxyURL}?url=${i}`).then(e=>e.data).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-tour-availabilities",e))},this.tourPriceBreakdown=async(e,t)=>{const r=btoa(`${this.apiUrl}/tours/${e}/price-breakdown`);return this.axios.post(`${this.proxyURL}?url=${r}`,t).then(e=>e.data).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-tour-options",e))},this.tourData=async e=>({tour:await this.tour(e),availability:await this.tourAvailabilitiy(e)}),this.bookingAdd=async e=>{const t=btoa(this.apiUrl+"/bookings");return this.axios.post(`${this.proxyURL}?url=${t}`,e).then(e=>e.data).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-tour-booking-add",e.data.booking.bookable.option_id))},this.booking=async e=>{const t=btoa(`${this.apiUrl}/bookings/${e}?cnt_language=${this.lang}¤cy=${this.currency}`);return this.axios.get(`${this.proxyURL}?url=${t}`).then(e=>e.data.data.booking).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-tour-bookings",e))},this.bookingDelete=async e=>{const t=btoa(`${this.apiUrl}/bookings/${e}?cnt_language=${this.lang}¤cy=${this.currency}`);return this.axios.delete(`${this.proxyURL}?url=${t}`).then(e=>e.data.data.bookings).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-tour-booking-delete",e))},this.cartAdd=async e=>{const t=btoa(this.apiUrl+"/carts");return this.axios.post(`${this.proxyURL}?url=${t}`,e,{headers:{Accept:"application/json","Content-Type":"application/json"}}).then(e=>e.data.data).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-tour-booking-cart",e.data.shopping_cart.shopping_cart_id))},this.cart=async e=>{const t=btoa(`${this.apiUrl}/carts/${e}?cnt_language=${this.lang}¤cy=${this.currency}`);return this.axios.get(`${this.proxyURL}?url=${t}`).then(e=>e.data.data).catch(t=>(0,s.handleHttpResponseErrorForGyg)(t,"gyg-cart",e))},this.paymentConfiguration=async(e="US")=>{const t=btoa(`${this.apiUrl}/configuration/payment?cnt_language=${this.lang}¤cy=${this.currency}&country=${e}`);return this.axios.get(`${this.proxyURL}?url=${t}`).then(e=>e.data.data.payment_methods).catch(e=>(0,s.handleHttpResponseErrorForGyg)(e,"gyg-tour-payment-configuration"))},this.proxyURL=n,this.sandbox=r,this.apiUrl=e,this.axios=i.default.create(),this.axios.defaults.baseURL=`${this.proxyURL}?url=${e}`,this.axios.defaults.headers.common["X-ACCESS-TOKEN"]=t,this.axios.defaults.timeout=6e4,this.lang=o,this.currency=u}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.titleCategoryIds=t.uniqueTour=void 0;t.uniqueTour=!1;t.titleCategoryIds=[{title:"Adventure",categoryIds:[35]},{title:"Food",categoryIds:[103]},{title:"Culture and History",categoryIds:[27]},{title:"Sightseeing",categoryIds:[2]},{title:"Art and Museums",categoryIds:[28]},{title:"Local and Neighborhood",categoryIds:[21]}]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleHttpResponseErrorForGyg=void 0;t.handleHttpResponseErrorForGyg=(e,t,r)=>{let n="";if(e.response)if(e.response.data)if(e.response.data.originalResponse.errors.length>0){const t=e.response.data.originalResponse.errors[0];console.log("errorGyg",t),n=t.errorMessage}else n=e.response.data.error;else n=e.response;else e.message?(console.log("Has Not Response. Has HTTP error message"),n=e.message):(console.log("Has Not Response. Has not HTTP error message"),n=e);return n}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(10));t.default=class{constructor(e,t,r){this.getImgUrl=e=>e&&e.startsWith("http")?e:this.sandbox?"https://testadmin.bookbarbados.com/gptour/thumbnails/999/"+e:"https://admin.bookbarbados.com/gptour/thumbnails/999/"+e,this.login=async e=>{var t;const r=btoa(`${this.apiUrl}/authorization?apiKey=${e}`);try{const e=await this.axios.get(`${this.proxyURL}?url=${r}`).then(e=>e.data);this.axios.defaults.headers.common.token=e.token}catch(e){throw console.error("booke-barbados-authorization",e),null!==(t=e.message)&&void 0!==t?t:""}},this.searchActivities=async(e,t)=>{const r=btoa(`${this.apiUrl}/searchActivities?countryId=3114&startDate=${e}&endDate=${t}&adults=2&privateActivity=true&sharedActivity=true&hikingActivity=true&fieldTripActivity=true&offerLimit=0&sortBy=PRICE_LOW_TO_HIGH`);return this.axios.get(`${this.proxyURL}?url=${r}`).then(e=>{const{data:t}=e;return t.products.forEach(e=>{e.mainImage=this.getImgUrl(e.mainImage)}),t}).catch(e=>{throw console.error("booke-barbados-searchActivitiesResponse",e),e.message})},this.searchActivity=async(e,t,r)=>{const n=btoa(`${this.apiUrl}/searchActivities?countryId=3114&startDate=${e}&endDate=${t}&adults=2&activityId=${r}`);return this.axios.get(`${this.proxyURL}?url=${n}`).then(e=>{const{data:t}=e;return t.products.forEach(e=>{e.mainImage=this.getImgUrl(e.mainImage)}),t}).catch(e=>{throw console.error("book-barbados-searchActivityResponse",e),e})},this.activityInfo=async e=>{const t=btoa(`${this.apiUrl}/activityInfo?offerKey=${e}`);return this.axios.get(`${this.proxyURL}?url=${t}`).then(e=>{const{data:t}=e;return t.images.forEach(e=>{e.url=this.getImgUrl(e.url)}),t}).catch(e=>{throw console.error("booke-barbados-activityInfoResponse",e),e.message})},this.searchAccommodation=async(e,t,r,n)=>{const i=btoa(`${this.apiUrl}/searchAccommodation?countryId=3114&startDate=${e}&endDate=${t}&rooms=adults:${r}&northEastLatitude=${n[0]}&northEastLongitude=${n[1]}&southWestLatitude=${n[2]}&southWestLongitude=${n[3]}`);return this.axios.get(`${this.proxyURL}?url=${i}`).then(e=>{const{data:t}=e;return t.hotelOffers.forEach(e=>{e.info.mainImageUrl=this.getImgUrl(e.info.mainImageUrl)}),t}).catch(e=>{throw console.error("booke-barbados-searchAccommodationResponse",e),e.message})},this.searchCarRent=async(e,t,r,n,i)=>{const a=btoa(`${this.apiUrl}/searchCarRent?driverCitizenshipId=3114&pickUpDateTime=${e}&dropOffDateTime=${t}&driverAge=${r||24}&pickUpCityId=${n||166987}&dropOffCityId=${i||166987}`);return this.axios.get(`${this.proxyURL}?url=${a}`).then(e=>{const{data:t}=e,r=[];for(let e=0;e<t.products.length;e+=1)for(let n=0;n<t.products[e].offers.length;n+=1)for(let i=0;i<t.products[e].offers[n].pickUpPoints.length;i+=1)if(t.products[e].offers[n].pickUpPoints[i].latitude){const a=r.find(r=>r.locationCode===t.products[e].offers[n].pickUpPoints[i].locationCode);if(a)a.images.push(...t.products[e].info.images.map(e=>(e.url=this.getImgUrl(e.url),e.url)));else{const a={supplierCode:t.products[e].info.supplierCode,carRentCompanyName:t.products[e].info.carRentCompanyName,images:[...t.products[e].info.images.map(e=>(e.url=this.getImgUrl(e.url),e.url))],features:t.products[e].info.features,shortDescription:t.products[e].info.shortDescription,description:t.products[e].info.description,locationCode:t.products[e].offers[n].pickUpPoints[i].locationCode,type:t.products[e].offers[n].pickUpPoints[i].type,name:t.products[e].offers[n].pickUpPoints[i].name,address:t.products[e].offers[n].pickUpPoints[i].address,longitude:t.products[e].offers[n].pickUpPoints[i].longitude,latitude:t.products[e].offers[n].pickUpPoints[i].latitude};r.push(a)}}return r}).catch(e=>{throw console.error("booke-barbados-searchCarRentResponse",e),e.message})},this.proxyURL=r,this.sandbox=t,this.apiUrl=e,this.axios=i.default.create(),this.axios.defaults.timeout=3e4,this.axios.defaults.headers.common["Accept-Language"]="en-US"}}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(10)),a=n(r(0));t.default=class{constructor(e,t,r,n,s,o){this.redirectUrlSandbox="https://traveldemo.agendas.group/results#/ticketAndAttraction/searchSession=",this.redirectUrlProd="https://www.vacavia.co.uk/results#/ticketAndAttraction/searchSession=",this.getTourTicketUrl=async(e,t,r,n,i=1)=>{const s=btoa(this.apiUrl+"/search"),o={environment:0,searchType:4,language:"en",locale:null,currency:"USD",distanceUnit:1,nationality:"US",customerIP:"31.223.103.8",customerUserAgent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",source:{app:"tripian"},ticketSearchCriteria:{ticketType:"Any",latitude:r,longitude:n,radius:i,startDate:(0,a.default)(e).isBefore((0,a.default)())?(0,a.default)().format("YYYY-MM-DDTHH:mm:ss[Z]"):e,endDate:t,participants:[{type:"Adult"}]}},u=`${this.proxyURL}?url=${s}`;return this.axios.post(u,o,{headers:{"Accept-Language":this.lang}}).then(e=>e.data.searchSession).then(e=>`${this.redirectUrl}${e}`).catch(e=>{throw e})},this.proxyURL=n,this.apiUrl=e,this.sandbox=r,this.redirectUrl=this.sandbox?this.redirectUrlSandbox:o||this.redirectUrlProd,this.lang=s,this.axios=i.default.create(),this.axios.defaults.timeout=3e4;const u=t.split(":");this.applicationId=u[0],this.privateKey=u[1],this.axios.defaults.auth={username:this.applicationId,password:this.privateKey}}}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(10)),a=r(312);t.default=class{constructor(e,t,r,n,s){this.getDestinationId=async e=>{const t=btoa(this.apiUrl+"/search/freetext");return this.axios.post(`${this.proxyURL}?url=${t}`,{searchTerm:e,searchTypes:[{searchType:"DESTINATIONS",pagination:{start:1,count:10}}],currency:"USD"},{headers:{accept:"application/json;version=2.0","Accept-Language":this.lang}}).then(e=>{let t="";return e.data.destinations.totalCount>0&&(t=e.data.destinations.results[0].id),t}).catch(e=>(0,a.handleHttpResponseErrorForViator)(e))},this.products=async(e,t,r,n=50)=>{const i=btoa(this.apiUrl+"/products/search"),s=await this.getDestinationId(e);return""===s?[]:this.axios.post(`${this.proxyURL}?url=${i}`,{filtering:{destination:s,lowestPrice:5,highestPrice:500,startDate:t,endDate:r,includeAutomaticTranslations:!0,confirmationType:"INSTANT",durationInMinutes:{from:0,to:360},rating:{from:3,to:5}},sorting:{sort:"TRAVELER_RATING",order:"DESCENDING"},pagination:{start:1,count:n},currency:"USD"},{headers:{accept:"application/json;version=2.0","Accept-Language":this.lang}}).then(e=>{var t;return null!==(t=e.data.products)&&void 0!==t?t:[]}).catch(e=>(0,a.handleHttpResponseErrorForViator)(e))},this.productInfo=async e=>{const t=btoa(`${this.apiUrl}/products/${e}`);return this.axios.get(`${this.proxyURL}?url=${t}`,{headers:{accept:"application/json;version=2.0","Accept-Language":this.lang}}).then(e=>e.data).catch(e=>(0,a.handleHttpResponseErrorForViator)(e))},this.productBookingQuestions=async()=>{const e=btoa(this.apiUrl+"/products/booking-questions");return this.axios.get(`${this.proxyURL}?url=${e}`,{headers:{accept:"application/json;version=2.0","Accept-Language":this.lang}}).then(e=>e.data).catch(e=>(console.log("errorResponse",e),{bookingQuestions:[]}))},this.availabilitySchedule=async e=>{const t=btoa(`${this.apiUrl}/availability/schedules/${e}`);return this.axios.get(`${this.proxyURL}?url=${t}`,{headers:{accept:"application/json;version=2.0","Accept-Language":this.lang}}).then(e=>e.data).catch(e=>(0,a.handleHttpResponseErrorForViator)(e))},this.tourData=async e=>{const t=await this.productInfo(e),r=await this.availabilitySchedule(e),n=await this.productBookingQuestions(),i=t.bookingQuestions.map(e=>n.bookingQuestions.find(t=>t.id===e)).filter(e=>void 0!==e);return{info:t,availability:r,bookingQuestions:i.length>0?i:[]}},this.locations=async e=>{const t=btoa(this.apiUrl+"/locations/bulk");return this.axios.post(`${this.proxyURL}?url=${t}`,{locations:e},{headers:{accept:"application/json;version=2.0","Accept-Language":this.lang}}).then(e=>e.data).catch(e=>(0,a.handleHttpResponseErrorForViator)(e))},this.availabilityPriceCheck=async e=>{const t=btoa(this.apiUrl+"/availability/check");return this.axios.post(`${this.proxyURL}?url=${t}`,e,{headers:{accept:"application/json;version=2.0","Accept-Language":this.lang}}).then(e=>e.data).catch(e=>(0,a.handleHttpResponseErrorForViator)(e))},this.bookingCardHold=async e=>{const t=btoa(this.apiUrl+"/bookings/cart/hold");return this.axios.post(`${this.proxyURL}?url=${t}`,e,{headers:{accept:"application/json;version=2.0","Accept-Language":this.lang}}).then(e=>e.data).catch(e=>(0,a.handleHttpResponseErrorForViator)(e))},this.payment=async(e,t)=>{const r=btoa(`${this.apiUrl}/v1/checkoutsessions/${e}/paymentaccounts`),n=`${Date.now()}-${Math.random().toString(36).slice(2,11)}`;return this.axios.post(`${this.proxyURL}?url=${r}`,t,{headers:{accept:"application/json;version=2.0","Accept-Language":this.lang,"Content-Type":"application/json","x-trip-clientid":"P00058532","x-trip-requestid":n}}).then(e=>e.data).catch(e=>(0,a.handleHttpResponseErrorForViator)(e))},this.bookingConfirm=async e=>{const t=btoa(this.apiUrl+"/bookings/cart/book");return this.axios.post(`${this.proxyURL}?url=${t}`,e,{headers:{accept:"application/json;version=2.0","Accept-Language":this.lang}}).then(e=>e.data).catch(e=>(0,a.handleHttpResponseErrorForViator)(e))},this.bookingStatus=async({bookingRef:e})=>{const t=btoa(this.apiUrl+"/bookings/status");return this.axios.post(`${this.proxyURL}?url=${t}`,{bookingRef:e},{headers:{accept:"application/json;version=2.0","Accept-Language":this.lang}}).then(e=>e.data).catch(e=>(0,a.handleHttpResponseErrorForViator)(e))},this.bookingRefundDetails=async e=>{const t=btoa(`${this.apiUrl}/bookings/${e}/cancel-quote`);return this.axios.get(`${this.proxyURL}?url=${t}`,{headers:{accept:"application/json;version=2.0","Accept-Language":this.lang}}).then(e=>e.data).catch(e=>(0,a.handleHttpResponseErrorForViator)(e))},this.bookingCancel=async e=>{const t=btoa(`${this.apiUrl}/bookings/${e}/cancel`);return this.axios.post(`${this.proxyURL}?url=${t}`,{reasonCode:"Customer_Service.Supplier_no_show"},{headers:{accept:"application/json;version=2.0","Accept-Language":this.lang}}).then(e=>e.data).catch(e=>(0,a.handleHttpResponseErrorForViator)(e))},this.exchangeRates=async(e,t)=>{const r=btoa(this.apiUrl+"/exchange-rates");return this.axios.post(`${this.proxyURL}?url=${r}`,{sourceCurrencies:e,targetCurrencies:t},{headers:{accept:"application/json;version=2.0"}}).then(e=>e.data).catch(e=>(0,a.handleHttpResponseErrorForViator)(e))},this.proxyURL=n,this.sandbox=r,this.apiUrl=e,this.lang=s,this.axios=i.default.create(),this.axios.defaults.baseURL=`${this.proxyURL}?url=${e}`,this.axios.defaults.headers.common["exp-api-key"]=t,this.axios.defaults.timeout=12e4}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleHttpResponseErrorForViator=void 0;t.handleHttpResponseErrorForViator=e=>{var t;let r="";if(e.response)if(e.response.data){const{data:n}=e.response;r=(null===(t=n.originalResponse)||void 0===t?void 0:t.message)?n.originalResponse.message:n.code&&n.message?n.message:n.error?n.error:"Unknown error occurred in response data."}else r="Unknown error occurred. No response data.";else e.message?(console.log("Has Not Response. Has HTTP error message"),r=e.message):(console.log("Has Not Response. Has not HTTP error message"),r="An unknown error occurred.");return console.error("Processed error response:",r),r}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(10));t.default=class{constructor(e,t,r){this.searchProducts=async(e=50,t=0)=>{const r=btoa(`${this.apiUrl}/products?apiKey=${this.apiKey}&offset=${t}&limit=${e}`);return this.axios.get(`${this.proxyURL}?url=${r}`).then(e=>{const{data:t}=e;return t.products}).catch(e=>{throw console.error("rezdy-searchProducts",e),e.message})},this.productInfo=async e=>{const t=btoa(`${this.apiUrl}/products/${e}?apiKey=${this.apiKey}`);return this.axios.get(`${this.proxyURL}?url=${t}`).then(e=>e.data.product)},this.proxyURL=r,this.apiUrl=e,this.apiKey=t,this.axios=i.default.create(),this.axios.defaults.baseURL=`${this.proxyURL}?url=${e}`,this.axios.defaults.headers.common.apiKey=t,this.axios.defaults.timeout=3e4}}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(10));t.default=class{constructor(e,t){this.searchVideos=async()=>{const e=btoa(this.apiUrl+"/api/1.1/obj/videos");return this.axios.get(`${this.proxyURL}?url=${e}`).then(e=>e.data.response.results).catch(e=>{throw console.error("videreo-searchVideosResponse",e),e.message})},this.proxyURL=t,this.apiUrl=e,this.axios=i.default.create(),this.axios.defaults.timeout=3e4}}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(10));t.default=class{constructor(e,t,r){this.getCityId=async e=>{const t="https://commonapi.tripian.com/toristy-destination/"+e;return this.axios.get(t).then(e=>{var t,r;return null===(r=null===(t=e.data)||void 0===t?void 0:t.data)||void 0===r?void 0:r.cityId}).catch(e=>{throw e.response.data.originalResponse.data.message||e.response.data.error})},this.serviceList=async(e,t=1,r=50)=>{try{const n=await this.getCityId(e);if(!n)return Promise.reject(new Error("Invalid city ID or city not found."));const i=btoa(`${this.apiUrl}/services?pagenum=${t}&maxperpage=${r}&cityid=${n}&apikey=${this.apiKey}`);return await this.axios.get(`${this.proxyURL}?url=${i}`).then(e=>e.data.services).catch(e=>Promise.reject(new Error("Service fetch error: "+((null==e?void 0:e.message)||"Unknown error"))))}catch(e){return Promise.reject(e)}},this.serviceDetails=async e=>{const t=btoa(`${this.apiUrl}/service/${e}?apikey=${this.apiKey}`);return this.axios.get(`${this.proxyURL}?url=${t}`).then(e=>e.data)},this.proxyURL=r,this.apiUrl=e,this.apiKey=t,this.axios=i.default.create(),this.axios.defaults.baseURL=`${this.proxyURL}?url=${e}`,this.axios.defaults.timeout=6e4}}},function(e,t,r){"use strict";(function(e){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(10)),a=n(r(317));class s{constructor(t,r,n,a){this.CACHE_DURATION=3e5,this.events=async(t,r,n,i)=>{const a=new URLSearchParams;a.append("lat",t.toString()),a.append("lon",r.toString()),n&&a.append("occurs_at.gte",n+"T00:00:00Z"),i&&a.append("occurs_at.lt",i+"T23:59:59Z");const o=a.toString(),u=s.getCacheKey("/v9/events",o),d=this.getFromCache(u);if(d)return d;const c=await this.axios.get(`${this.proxyURL}?url=${e.from(`${this.apiUrl}/v9/events?${o}`).toString("base64")}`,{headers:this.getHeaders("GET","/v9/events",o)});return s.setCache(u,c.data.events),c.data.events},this.eventDetails=async t=>{const r="/v9/events/"+t;return(await this.axios.get(`${this.proxyURL}?url=${e.from(`${this.apiUrl}${r}`).toString("base64")}`,{headers:this.getHeaders("GET",r)})).data},this.venue=async t=>{const r="/v9/venues/"+t;return(await this.axios.get(`${this.proxyURL}?url=${e.from(`${this.apiUrl}${r}`).toString("base64")}`,{headers:this.getHeaders("GET",r)})).data},this.listTicketGroups=async t=>{const r="event_id="+t;return(await this.axios.get(`${this.proxyURL}?url=${e.from(`${this.apiUrl}/v9/listings?${r}`).toString("base64")}`,{headers:this.getHeaders("GET","/v9/listings",r)})).data},this.ticketInfo=async t=>{const r="/v9/listings/"+t;return(await this.axios.get(`${this.proxyURL}?url=${e.from(`${this.apiUrl}${r}?`).toString("base64")}`,{headers:this.getHeaders("GET",r)})).data},this.clientsCreate=async t=>{const r=JSON.stringify(t);return this.axios.post(`${this.proxyURL}?url=${e.from(this.apiUrl+"/v9/clients").toString("base64")}`,t,{headers:this.getHeaders("POST","/v9/clients",void 0,r)}).then(e=>e.data).catch(e=>{var t;throw console.error("clientsCreate Error:",(null===(t=e.response)||void 0===t?void 0:t.data)||e.message),e})},this.createClientAddress=async(t,r)=>{const n=`/v9/clients/${t}/addresses`,i=JSON.stringify({address:r});return this.axios.post(`${this.proxyURL}?url=${e.from(`${this.apiUrl}${n}`).toString("base64")}`,{address:r},{headers:this.getHeaders("POST",n,void 0,i)}).then(e=>e.data).catch(e=>{var t;throw console.error("createClientAddress Error:",(null===(t=e.response)||void 0===t?void 0:t.data)||e.message),e})},this.createClientEmail=async(t,r)=>{const n=`/v9/clients/${t}/email_addresses`,i=JSON.stringify({email_address:r});return this.axios.post(`${this.proxyURL}?url=${e.from(`${this.apiUrl}${n}`).toString("base64")}`,{email_address:r},{headers:this.getHeaders("POST",n,void 0,i)}).then(e=>e.data).catch(e=>{var t;throw console.error("createClientEmail Error:",(null===(t=e.response)||void 0===t?void 0:t.data)||e.message),e})},this.createClientPhone=async(t,r)=>{const n=`/v9/clients/${t}/phone_numbers`,i=JSON.stringify({phone_number:r});return this.axios.post(`${this.proxyURL}?url=${e.from(`${this.apiUrl}${n}`).toString("base64")}`,{phone_number:r},{headers:this.getHeaders("POST",n,void 0,i)}).then(e=>e.data).catch(e=>{var t;throw console.error("createClientPhone Error:",(null===(t=e.response)||void 0===t?void 0:t.data)||e.message),e})},this.createTaxQuote=async t=>{const r=JSON.stringify({tax_quote:t});return this.axios.post(`${this.proxyURL}?url=${e.from(this.apiUrl+"/v9/tax_quotes").toString("base64")}`,{tax_quote:t},{headers:this.getHeaders("POST","/v9/tax_quotes",void 0,r)}).then(e=>e.data).catch(e=>{var t;throw console.error("createTaxQuote Error:",(null===(t=e.response)||void 0===t?void 0:t.data)||e.message),e})},this.createOrder=async t=>{const r=JSON.stringify({order:t});return this.axios.post(`${this.proxyURL}?url=${e.from(this.apiUrl+"/v10/orders").toString("base64")}`,{order:t},{headers:this.getHeaders("POST","/v10/orders",void 0,r)}).then(e=>e.data).catch(e=>{var t;throw console.error("createOrder Error:",(null===(t=e.response)||void 0===t?void 0:t.data)||e.message),e})},this.proxyURL=a,this.apiToken=r,this.apiUrl=t,this.apiSecret=n,this.axios=i.default.create(),this.axios.defaults.timeout=6e4}static getInstance(e,t,r,n){return s.instance||(s.instance=new s(e,t,r,n)),s.instance}generateSignature(e,t,r,n){let i=t;if("GET"===e){if(i+="?",r){i+=r.split("&").sort().join("&")}}else["POST","PUT","DELETE"].includes(e)&&(i+="?");const s=n?JSON.stringify(JSON.parse(n)):"",o=`${e} ${new URL(this.apiUrl).host}${i}${s}`;return a.default.createHmac("sha256",this.apiSecret).update(o).digest("base64")}getHeaders(e,t,r,n){return{"X-Signature":this.generateSignature(e,t,r,n),"X-Token":this.apiToken,Accept:"application/json"}}static getCacheKey(e,t){return`${e}${t?"?"+t:""}`}getFromCache(e){const t=s.cache.get(e);if(!t)return null;return Date.now()-t.timestamp>this.CACHE_DURATION?(s.cache.delete(e),null):t.data}static setCache(e,t){s.cache.set(e,{data:t,timestamp:Date.now()})}}s.cache=new Map,t.default=s}).call(this,r(3).Buffer)},function(e,t,r){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(18),t.createHash=t.Hash=r(25),t.createHmac=t.Hmac=r(241);var n=r(386),i=Object.keys(n),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return a};var s=r(243);t.pbkdf2=s.pbkdf2,t.pbkdf2Sync=s.pbkdf2Sync;var o=r(392);t.Cipher=o.Cipher,t.createCipher=o.createCipher,t.Cipheriv=o.Cipheriv,t.createCipheriv=o.createCipheriv,t.Decipher=o.Decipher,t.createDecipher=o.createDecipher,t.Decipheriv=o.Decipheriv,t.createDecipheriv=o.createDecipheriv,t.getCiphers=o.getCiphers,t.listCiphers=o.listCiphers;var u=r(407);t.DiffieHellmanGroup=u.DiffieHellmanGroup,t.createDiffieHellmanGroup=u.createDiffieHellmanGroup,t.getDiffieHellman=u.getDiffieHellman,t.createDiffieHellman=u.createDiffieHellman,t.DiffieHellman=u.DiffieHellman;var d=r(412);t.createSign=d.createSign,t.Sign=d.Sign,t.createVerify=d.createVerify,t.Verify=d.Verify,t.createECDH=r(449);var c=r(450);t.publicEncrypt=c.publicEncrypt,t.privateEncrypt=c.privateEncrypt,t.publicDecrypt=c.publicDecrypt,t.privateDecrypt=c.privateDecrypt;var f=r(453);t.randomFill=f.randomFill,t.randomFillSync=f.randomFillSync,t.createCredentials=function(){throw new Error("sorry, createCredentials is not implemented yet\nwe accept pull requests\nhttps://github.com/browserify/crypto-browserify")},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t,r){"use strict";var n=r(2).Buffer,i=r(319).Transform;function a(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(1)(a,i),a.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},a.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},a.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)r[a++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var s=0,o=8*e.length;o>0;++s)this._length[s]+=o,(o=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*o);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},a.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=a},function(e,t,r){(t=e.exports=r(211)).Stream=t,t.Readable=t,t.Writable=r(215),t.Duplex=r(20),t.Transform=r(216),t.PassThrough=r(325),t.finished=r(48),t.pipeline=r(326)},function(e,t){},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function o(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var u=r(3).Buffer,d=r(322).inspect,c=d&&d.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,n;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t,r,n,i=u.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=i,n=s,u.prototype.copy.call(t,r,n),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,a=e>i.length?i.length:e;if(a===i.length?n+=i:n+=i.slice(0,e),0==(e-=a)){a===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,t}},{key:c,value:function(e,t){return d(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&s(t.prototype,r),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},function(e,t){},function(e,t,r){"use strict";(function(t){var n;function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=r(48),s=Symbol("lastResolve"),o=Symbol("lastReject"),u=Symbol("error"),d=Symbol("ended"),c=Symbol("lastPromise"),f=Symbol("handlePromise"),h=Symbol("stream");function l(e,t){return{value:e,done:t}}function p(e){var t=e[s];if(null!==t){var r=e[h].read();null!==r&&(e[c]=null,e[s]=null,e[o]=null,t(l(r,!1)))}}function _(e){t.nextTick(p,e)}var m=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var e=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[d])return Promise.resolve(l(void 0,!0));if(this[h].destroyed)return new Promise((function(r,n){t.nextTick((function(){e[u]?n(e[u]):r(l(void 0,!0))}))}));var n,i=this[c];if(i)n=new Promise(function(e,t){return function(r,n){e.then((function(){t[d]?r(l(void 0,!0)):t[f](r,n)}),n)}}(i,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(l(a,!1));n=new Promise(this[f])}return this[c]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(l(void 0,!0))}))}))})),n),m);e.exports=function(e){var t,r=Object.create(y,(i(t={},h,{value:e,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,d,{value:e._readableState.endEmitted,writable:!0}),i(t,f,{value:function(e,t){var n=r[h].read();n?(r[c]=null,r[s]=null,r[o]=null,e(l(n,!1))):(r[s]=e,r[o]=t)},writable:!0}),t));return r[c]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[o];return null!==t&&(r[c]=null,r[s]=null,r[o]=null,t(e)),void(r[u]=e)}var n=r[s];null!==n&&(r[c]=null,r[s]=null,r[o]=null,n(l(void 0,!0))),r[d]=!0})),e.on("readable",_.bind(null,r)),r}}).call(this,r(4))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,r){"use strict";e.exports=i;var n=r(216);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(1)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){"use strict";var n;var i=r(19).codes,a=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function o(e){if(e)throw e}function u(e,t,i,a){a=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(a);var o=!1;e.on("close",(function(){o=!0})),void 0===n&&(n=r(48)),n(e,{readable:t,writable:i},(function(e){if(e)return a(e);o=!0,a()}));var u=!1;return function(t){if(!o&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void a(t||new s("pipe"))}}function d(e){e()}function c(e,t){return e.pipe(t)}function f(e){return e.length?"function"!=typeof e[e.length-1]?o:e.pop():o}e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=f(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new a("streams");var s=t.map((function(e,r){var a=r<t.length-1;return u(e,a,r>0,(function(e){n||(n=e),e&&s.forEach(d),a||(s.forEach(d),i(n))}))}));return t.reduce(c)}},function(e,t,r){"use strict";var n=r(2).Buffer,i=r(328).Transform;function a(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(1)(a,i),a.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},a.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},a.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)r[a++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var s=0,o=8*e.length;o>0;++s)this._length[s]+=o,(o=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*o);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},a.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=a},function(e,t,r){(t=e.exports=r(218)).Stream=t,t.Readable=t,t.Writable=r(222),t.Duplex=r(22),t.Transform=r(223),t.PassThrough=r(334),t.finished=r(49),t.pipeline=r(335)},function(e,t){},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function o(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var u=r(3).Buffer,d=r(331).inspect,c=d&&d.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,n;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t,r,n,i=u.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=i,n=s,u.prototype.copy.call(t,r,n),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,a=e>i.length?i.length:e;if(a===i.length?n+=i:n+=i.slice(0,e),0==(e-=a)){a===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,t}},{key:c,value:function(e,t){return d(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&s(t.prototype,r),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},function(e,t){},function(e,t,r){"use strict";(function(t){var n;function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=r(49),s=Symbol("lastResolve"),o=Symbol("lastReject"),u=Symbol("error"),d=Symbol("ended"),c=Symbol("lastPromise"),f=Symbol("handlePromise"),h=Symbol("stream");function l(e,t){return{value:e,done:t}}function p(e){var t=e[s];if(null!==t){var r=e[h].read();null!==r&&(e[c]=null,e[s]=null,e[o]=null,t(l(r,!1)))}}function _(e){t.nextTick(p,e)}var m=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var e=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[d])return Promise.resolve(l(void 0,!0));if(this[h].destroyed)return new Promise((function(r,n){t.nextTick((function(){e[u]?n(e[u]):r(l(void 0,!0))}))}));var n,i=this[c];if(i)n=new Promise(function(e,t){return function(r,n){e.then((function(){t[d]?r(l(void 0,!0)):t[f](r,n)}),n)}}(i,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(l(a,!1));n=new Promise(this[f])}return this[c]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(l(void 0,!0))}))}))})),n),m);e.exports=function(e){var t,r=Object.create(y,(i(t={},h,{value:e,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,d,{value:e._readableState.endEmitted,writable:!0}),i(t,f,{value:function(e,t){var n=r[h].read();n?(r[c]=null,r[s]=null,r[o]=null,e(l(n,!1))):(r[s]=e,r[o]=t)},writable:!0}),t));return r[c]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[o];return null!==t&&(r[c]=null,r[s]=null,r[o]=null,t(e)),void(r[u]=e)}var n=r[s];null!==n&&(r[c]=null,r[s]=null,r[o]=null,n(l(void 0,!0))),r[d]=!0})),e.on("readable",_.bind(null,r)),r}}).call(this,r(4))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,r){"use strict";e.exports=i;var n=r(223);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(1)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){"use strict";var n;var i=r(21).codes,a=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function o(e){if(e)throw e}function u(e,t,i,a){a=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(a);var o=!1;e.on("close",(function(){o=!0})),void 0===n&&(n=r(49)),n(e,{readable:t,writable:i},(function(e){if(e)return a(e);o=!0,a()}));var u=!1;return function(t){if(!o&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void a(t||new s("pipe"))}}function d(e){e()}function c(e,t){return e.pipe(t)}function f(e){return e.length?"function"!=typeof e[e.length-1]?o:e.pop():o}e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=f(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new a("streams");var s=t.map((function(e,r){var a=r<t.length-1;return u(e,a,r>0,(function(e){n||(n=e),e&&s.forEach(d),a||(s.forEach(d),i(n))}))}));return t.reduce(c)}},function(e,t,r){"use strict";var n=r(1),i=r(23),a=r(2).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function u(){this.init(),this._w=o,i.call(this,64,56)}function d(e){return e<<30|e>>>2}function c(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,o=0|this._d,u=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var h=0;h<80;++h){var l=~~(h/20),p=0|((t=n)<<5|t>>>27)+c(l,i,a,o)+u+r[h]+s[l];u=o,o=a,a=d(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=a.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";var n=r(26),i=r(225)("TypedArray.prototype.buffer",!0),a=r(358);e.exports=i||function(e){if(!a(e))throw new n("Not a Typed Array");return e.buffer}},function(e,t,r){"use strict";e.exports=Error},function(e,t,r){"use strict";e.exports=EvalError},function(e,t,r){"use strict";e.exports=RangeError},function(e,t,r){"use strict";e.exports=ReferenceError},function(e,t,r){"use strict";e.exports=URIError},function(e,t,r){"use strict";e.exports=Math.abs},function(e,t,r){"use strict";e.exports=Math.floor},function(e,t,r){"use strict";e.exports=Math.max},function(e,t,r){"use strict";e.exports=Math.min},function(e,t,r){"use strict";e.exports=Math.pow},function(e,t,r){"use strict";e.exports=Math.round},function(e,t,r){"use strict";var n=r(351);e.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},function(e,t,r){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},function(e,t,r){"use strict";e.exports=Object.getOwnPropertyDescriptor},function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(229);e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},function(e,t,r){"use strict";var n,i=r(51),a=r(27);try{n=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var s=!!n&&a&&a(Object.prototype,"__proto__"),o=Object,u=o.getPrototypeOf;e.exports=s&&"function"==typeof s.get?i([s.get]):"function"==typeof u&&function(e){return u(null==e?e:o(e))}},function(e,t,r){"use strict";var n="Function.prototype.bind called on incompatible ",i=Object.prototype.toString,a=Math.max,s=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r},o=function(e,t){for(var r=[],n=t||0,i=0;n<e.length;n+=1,i+=1)r[i]=e[n];return r},u=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};e.exports=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==i.apply(t))throw new TypeError(n+t);for(var r,d=o(arguments,1),c=function(){if(this instanceof r){var n=t.apply(this,s(d,arguments));return Object(n)===n?n:this}return t.apply(e,s(d,arguments))},f=a(0,t.length-d.length),h=[],l=0;l<f;l++)h[l]="$"+l;if(r=Function("binder","return function ("+u(h,",")+"){ return binder.apply(this,arguments); }")(c),t.prototype){var p=function(){};p.prototype=t.prototype,r.prototype=new p,p.prototype=null}return r}},function(e,t,r){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},function(e,t,r){"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,a=r(28);e.exports=a.call(n,i)},function(e,t,r){"use strict";var n=r(359);e.exports=function(e){return!!n(e)}},function(e,t,r){"use strict";(function(t){var n=r(360),i=r(362),a=r(364),s=r(225),o=r(27),u=r(230),d=s("Object.prototype.toString"),c=r(369)(),f="undefined"==typeof globalThis?t:globalThis,h=i(),l=s("String.prototype.slice"),p=s("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},_={__proto__:null};n(h,c&&o&&u?function(e){var t=new f[e];if(Symbol.toStringTag in t&&u){var r=u(t),n=o(r,Symbol.toStringTag);if(!n&&r){var i=u(r);n=o(i,Symbol.toStringTag)}_["$"+e]=a(n.get)}}:function(e){var t=new f[e],r=t.slice||t.set;r&&(_["$"+e]=a(r))});e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!c){var t=l(d(e),8,-1);return p(h,t)>-1?t:"Object"===t&&function(e){var t=!1;return n(_,(function(r,n){if(!t)try{r(e),t=l(n,1)}catch(e){}})),t}(e)}return o?function(e){var t=!1;return n(_,(function(r,n){if(!t)try{"$"+r(e)===n&&(t=l(n,1))}catch(e){}})),t}(e):null}}).call(this,r(5))},function(e,t,r){"use strict";var n=r(361),i=Object.prototype.toString,a=Object.prototype.hasOwnProperty,s=function(e,t,r){for(var n=0,i=e.length;n<i;n++)a.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))},o=function(e,t,r){for(var n=0,i=e.length;n<i;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)},u=function(e,t,r){for(var n in e)a.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))};function d(e){return"[object Array]"===i.call(e)}e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=r),d(e)?s(e,t,i):"string"==typeof e?o(e,t,i):u(e,t,i)}},function(e,t,r){"use strict";var n,i,a=Function.prototype.toString,s="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof s&&"function"==typeof Object.defineProperty)try{n=Object.defineProperty({},"length",{get:function(){throw i}}),i={},s((function(){throw 42}),null,n)}catch(e){e!==i&&(s=null)}else s=null;var o=/^\s*class\b/,u=function(e){try{var t=a.call(e);return o.test(t)}catch(e){return!1}},d=function(e){try{return!u(e)&&(a.call(e),!0)}catch(e){return!1}},c=Object.prototype.toString,f="function"==typeof Symbol&&!!Symbol.toStringTag,h=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(l=function(e){if((h||!e)&&(void 0===e||"object"==typeof e))try{var t=c.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=s?function(e){if(l(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{s(e,null,n)}catch(e){if(e!==i)return!1}return!u(e)&&d(e)}:function(e){if(l(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(f)return d(e);if(u(e))return!1;var t=c.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&d(e)}},function(e,t,r){"use strict";(function(t){var n=r(363),i="undefined"==typeof globalThis?t:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof i[n[t]]&&(e[e.length]=n[t]);return e}}).call(this,r(5))},function(e,t,r){"use strict";e.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},function(e,t,r){"use strict";var n=r(365),i=r(36),a=r(51),s=r(368);e.exports=function(e){var t=a(arguments),r=e.length-(arguments.length-1);return n(t,1+(r>0?r:0),!0)},i?i(e.exports,"apply",{value:s}):e.exports.apply=s},function(e,t,r){"use strict";var n=r(226),i=r(366),a=r(367)(),s=r(27),o=r(26),u=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new o("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new o("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,d=!0;if("length"in e&&s){var c=s(e,"length");c&&!c.configurable&&(n=!1),c&&!c.writable&&(d=!1)}return(n||d||!r)&&(a?i(e,"length",t,!0,!0):i(e,"length",t)),e}},function(e,t,r){"use strict";var n=r(36),i=r(228),a=r(26),s=r(27);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new a("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,d=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],f=!!s&&s(e,t);if(n)n(e,t,{configurable:null===d&&f?f.configurable:!d,enumerable:null===o&&f?f.enumerable:!o,value:r,writable:null===u&&f?f.writable:!u});else{if(!c&&(o||u||d))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},function(e,t,r){"use strict";var n=r(36),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},function(e,t,r){"use strict";var n=r(28),i=r(53),a=r(233);e.exports=function(){return a(n,i,arguments)}},function(e,t,r){"use strict";var n=r(229);e.exports=function(){return n()&&!!Symbol.toStringTag}},function(e,t,r){"use strict";var n=r(1),i=r(23),a=r(2).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function u(){this.init(),this._w=o,i.call(this,64,56)}function d(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,o=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=(t=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|t>>>31;for(var l=0;l<80;++l){var p=~~(l/20),_=d(n)+f(p,i,a,o)+u+r[l]+s[p]|0;u=o,o=a,a=c(i),i=n,n=_}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=a.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},function(e,t,r){"use strict";var n=r(1),i=r(234),a=r(23),s=r(2).Buffer,o=new Array(64);function u(){this.init(),this._w=o,a.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},function(e,t,r){"use strict";var n=r(1),i=r(235),a=r(23),s=r(2).Buffer,o=new Array(160);function u(){this.init(),this._w=o,a.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t){},function(e,t,r){"use strict";var n=r(54).Buffer,i=r(376);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);for(var t,r,i,a=n.allocUnsafe(e>>>0),s=this.head,o=0;s;)t=s.data,r=a,i=o,t.copy(r,i),o+=s.data.length,s=s.next;return a},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(378),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(5))},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,i,a,s,o,u=1,d={},c=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){p(e.data)},n=function(e){a.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,n=function(e){var t=f.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(p,0,e)}:(s="setImmediate$"+Math.random()+"$",o=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&p(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",o,!1):e.attachEvent("onmessage",o),n=function(t){e.postMessage(s+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var i={callback:e,args:t};return d[u]=i,n(u),u++},h.clearImmediate=l}function l(e){delete d[e]}function p(e){if(c)setTimeout(p,0,e);else{var t=d[e];if(t){c=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{l(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r(5),r(4))},function(e,t,r){"use strict";e.exports=a;var n=r(240),i=Object.create(r(29));function a(e){if(!(this instanceof a))return new a(e);n.call(this,e)}i.inherits=r(1),i.inherits(a,n),a.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){e.exports=r(55)},function(e,t,r){e.exports=r(15)},function(e,t,r){e.exports=r(37).Transform},function(e,t,r){e.exports=r(37).PassThrough},function(e,t,r){"use strict";var n=r(1),i=r(2).Buffer,a=r(12),s=i.alloc(128);function o(e,t){a.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>64?t=e(t):t.length<64&&(t=i.concat([t,s],64));for(var r=this._ipad=i.allocUnsafe(64),n=this._opad=i.allocUnsafe(64),o=0;o<64;o++)r[o]=54^t[o],n[o]=92^t[o];this._hash=[r]}n(o,a),o.prototype._update=function(e){this._hash.push(e)},o.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=o},function(e,t,r){var n=r(46);e.exports=function(e){return(new n).update(e).digest()}},function(e,t,r){"use strict";e.exports=r(242)},function(e,t,r){"use strict";(function(t){var n,i,a=r(2).Buffer,s=r(244),o=r(245),u=r(246),d=r(247),c=t.crypto&&t.crypto.subtle,f={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];function l(){return i||(i=t.process&&t.process.nextTick?t.process.nextTick:t.queueMicrotask?t.queueMicrotask:t.setImmediate?t.setImmediate:t.setTimeout)}function p(e,t,r,n,i){return c.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return c.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return a.from(e)}))}e.exports=function(e,r,i,_,m,y){"function"==typeof m&&(y=m,m=void 0);var b=f[(m=m||"sha1").toLowerCase()];if(b&&"function"==typeof t.Promise){if(s(i,_),e=d(e,o,"Password"),r=d(r,o,"Salt"),"function"!=typeof y)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){l()((function(){t(null,e)}))}),(function(e){l()((function(){t(e)}))}))}(function(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==h[e])return h[e];var r=p(n=n||a.alloc(8),n,10,128,e).then((function(){return!0}),(function(){return!1}));return h[e]=r,r}(b).then((function(t){return t?p(e,r,i,_,b):u(e,r,i,_,m)})),y)}else l()((function(){var t;try{t=u(e,r,i,_,m)}catch(e){return void y(e)}y(null,t)}))}}).call(this,r(5))},function(e,t,r){"use strict";var n=r(389);function i(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var r=1732584193,n=-271733879,i=-1732584194,a=271733878,f=0;f<e.length;f+=16){var h=r,l=n,p=i,_=a;r=s(r,n,i,a,e[f+0],7,-680876936),a=s(a,r,n,i,e[f+1],12,-389564586),i=s(i,a,r,n,e[f+2],17,606105819),n=s(n,i,a,r,e[f+3],22,-1044525330),r=s(r,n,i,a,e[f+4],7,-176418897),a=s(a,r,n,i,e[f+5],12,1200080426),i=s(i,a,r,n,e[f+6],17,-1473231341),n=s(n,i,a,r,e[f+7],22,-45705983),r=s(r,n,i,a,e[f+8],7,1770035416),a=s(a,r,n,i,e[f+9],12,-1958414417),i=s(i,a,r,n,e[f+10],17,-42063),n=s(n,i,a,r,e[f+11],22,-1990404162),r=s(r,n,i,a,e[f+12],7,1804603682),a=s(a,r,n,i,e[f+13],12,-40341101),i=s(i,a,r,n,e[f+14],17,-1502002290),r=o(r,n=s(n,i,a,r,e[f+15],22,1236535329),i,a,e[f+1],5,-165796510),a=o(a,r,n,i,e[f+6],9,-1069501632),i=o(i,a,r,n,e[f+11],14,643717713),n=o(n,i,a,r,e[f+0],20,-373897302),r=o(r,n,i,a,e[f+5],5,-701558691),a=o(a,r,n,i,e[f+10],9,38016083),i=o(i,a,r,n,e[f+15],14,-660478335),n=o(n,i,a,r,e[f+4],20,-405537848),r=o(r,n,i,a,e[f+9],5,568446438),a=o(a,r,n,i,e[f+14],9,-1019803690),i=o(i,a,r,n,e[f+3],14,-187363961),n=o(n,i,a,r,e[f+8],20,1163531501),r=o(r,n,i,a,e[f+13],5,-1444681467),a=o(a,r,n,i,e[f+2],9,-51403784),i=o(i,a,r,n,e[f+7],14,1735328473),r=u(r,n=o(n,i,a,r,e[f+12],20,-1926607734),i,a,e[f+5],4,-378558),a=u(a,r,n,i,e[f+8],11,-2022574463),i=u(i,a,r,n,e[f+11],16,1839030562),n=u(n,i,a,r,e[f+14],23,-35309556),r=u(r,n,i,a,e[f+1],4,-1530992060),a=u(a,r,n,i,e[f+4],11,1272893353),i=u(i,a,r,n,e[f+7],16,-155497632),n=u(n,i,a,r,e[f+10],23,-1094730640),r=u(r,n,i,a,e[f+13],4,681279174),a=u(a,r,n,i,e[f+0],11,-358537222),i=u(i,a,r,n,e[f+3],16,-722521979),n=u(n,i,a,r,e[f+6],23,76029189),r=u(r,n,i,a,e[f+9],4,-640364487),a=u(a,r,n,i,e[f+12],11,-421815835),i=u(i,a,r,n,e[f+15],16,530742520),r=d(r,n=u(n,i,a,r,e[f+2],23,-995338651),i,a,e[f+0],6,-198630844),a=d(a,r,n,i,e[f+7],10,1126891415),i=d(i,a,r,n,e[f+14],15,-1416354905),n=d(n,i,a,r,e[f+5],21,-57434055),r=d(r,n,i,a,e[f+12],6,1700485571),a=d(a,r,n,i,e[f+3],10,-1894986606),i=d(i,a,r,n,e[f+10],15,-1051523),n=d(n,i,a,r,e[f+1],21,-2054922799),r=d(r,n,i,a,e[f+8],6,1873313359),a=d(a,r,n,i,e[f+15],10,-30611744),i=d(i,a,r,n,e[f+6],15,-1560198380),n=d(n,i,a,r,e[f+13],21,1309151649),r=d(r,n,i,a,e[f+4],6,-145523070),a=d(a,r,n,i,e[f+11],10,-1120210379),i=d(i,a,r,n,e[f+2],15,718787259),n=d(n,i,a,r,e[f+9],21,-343485551),r=c(r,h),n=c(n,l),i=c(i,p),a=c(a,_)}return[r,n,i,a]}function a(e,t,r,n,i,a){return c((s=c(c(t,e),c(n,a)))<<(o=i)|s>>>32-o,r);var s,o}function s(e,t,r,n,i,s,o){return a(t&r|~t&n,e,t,i,s,o)}function o(e,t,r,n,i,s,o){return a(t&n|r&~n,e,t,i,s,o)}function u(e,t,r,n,i,s,o){return a(t^r^n,e,t,i,s,o)}function d(e,t,r,n,i,s,o){return a(r^(t|~n),e,t,i,s,o)}function c(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}e.exports=function(e){return n(e,i)}},function(e,t,r){"use strict";(function(t){var r=new t(4);r.fill(0);e.exports=function(e,n){var i=n(function(e){if(e.length%4!=0){var n=e.length+(4-e.length%4);e=t.concat([e,r],n)}for(var i=new Array(e.length>>>2),a=0,s=0;a<e.length;a+=4,s++)i[s]=e.readInt32LE(a);return i}(e),8*e.length);e=new t(16);for(var a=0;a<i.length;a++)e.writeInt32LE(i[a],a<<2,!0);return e}}).call(this,r(3).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(1),i=r(391);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function s(e,t){return e<<t|e>>>32-t}function o(e,t,r,n,i,a,o,u){return s(e+(t^r^n)+a+o|0,u)+i|0}function u(e,t,r,n,i,a,o,u){return s(e+(t&r|~t&n)+a+o|0,u)+i|0}function d(e,t,r,n,i,a,o,u){return s(e+((t|~r)^n)+a+o|0,u)+i|0}function c(e,t,r,n,i,a,o,u){return s(e+(t&n|r&~n)+a+o|0,u)+i|0}function f(e,t,r,n,i,a,o,u){return s(e+(t^(r|~n))+a+o|0,u)+i|0}n(a,i),a.prototype._update=function(){for(var e=new Array(16),t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,a=this._d,h=this._e;r=o(r,n,i,a,h,e[0],0,11),h=o(h,r,n,i=s(i,10),a,e[1],0,14),a=o(a,h,r,n=s(n,10),i,e[2],0,15),i=o(i,a,h,r=s(r,10),n,e[3],0,12),n=o(n,i,a,h=s(h,10),r,e[4],0,5),r=o(r,n,i,a=s(a,10),h,e[5],0,8),h=o(h,r,n,i=s(i,10),a,e[6],0,7),a=o(a,h,r,n=s(n,10),i,e[7],0,9),i=o(i,a,h,r=s(r,10),n,e[8],0,11),n=o(n,i,a,h=s(h,10),r,e[9],0,13),r=o(r,n,i,a=s(a,10),h,e[10],0,14),h=o(h,r,n,i=s(i,10),a,e[11],0,15),a=o(a,h,r,n=s(n,10),i,e[12],0,6),i=o(i,a,h,r=s(r,10),n,e[13],0,7),n=o(n,i,a,h=s(h,10),r,e[14],0,9),h=u(h,r=o(r,n,i,a=s(a,10),h,e[15],0,8),n,i=s(i,10),a,e[7],1518500249,7),a=u(a,h,r,n=s(n,10),i,e[4],1518500249,6),i=u(i,a,h,r=s(r,10),n,e[13],1518500249,8),n=u(n,i,a,h=s(h,10),r,e[1],1518500249,13),r=u(r,n,i,a=s(a,10),h,e[10],1518500249,11),h=u(h,r,n,i=s(i,10),a,e[6],1518500249,9),a=u(a,h,r,n=s(n,10),i,e[15],1518500249,7),i=u(i,a,h,r=s(r,10),n,e[3],1518500249,15),n=u(n,i,a,h=s(h,10),r,e[12],1518500249,7),r=u(r,n,i,a=s(a,10),h,e[0],1518500249,12),h=u(h,r,n,i=s(i,10),a,e[9],1518500249,15),a=u(a,h,r,n=s(n,10),i,e[5],1518500249,9),i=u(i,a,h,r=s(r,10),n,e[2],1518500249,11),n=u(n,i,a,h=s(h,10),r,e[14],1518500249,7),r=u(r,n,i,a=s(a,10),h,e[11],1518500249,13),a=d(a,h=u(h,r,n,i=s(i,10),a,e[8],1518500249,12),r,n=s(n,10),i,e[3],1859775393,11),i=d(i,a,h,r=s(r,10),n,e[10],1859775393,13),n=d(n,i,a,h=s(h,10),r,e[14],1859775393,6),r=d(r,n,i,a=s(a,10),h,e[4],1859775393,7),h=d(h,r,n,i=s(i,10),a,e[9],1859775393,14),a=d(a,h,r,n=s(n,10),i,e[15],1859775393,9),i=d(i,a,h,r=s(r,10),n,e[8],1859775393,13),n=d(n,i,a,h=s(h,10),r,e[1],1859775393,15),r=d(r,n,i,a=s(a,10),h,e[2],1859775393,14),h=d(h,r,n,i=s(i,10),a,e[7],1859775393,8),a=d(a,h,r,n=s(n,10),i,e[0],1859775393,13),i=d(i,a,h,r=s(r,10),n,e[6],1859775393,6),n=d(n,i,a,h=s(h,10),r,e[13],1859775393,5),r=d(r,n,i,a=s(a,10),h,e[11],1859775393,12),h=d(h,r,n,i=s(i,10),a,e[5],1859775393,7),i=c(i,a=d(a,h,r,n=s(n,10),i,e[12],1859775393,5),h,r=s(r,10),n,e[1],2400959708,11),n=c(n,i,a,h=s(h,10),r,e[9],2400959708,12),r=c(r,n,i,a=s(a,10),h,e[11],2400959708,14),h=c(h,r,n,i=s(i,10),a,e[10],2400959708,15),a=c(a,h,r,n=s(n,10),i,e[0],2400959708,14),i=c(i,a,h,r=s(r,10),n,e[8],2400959708,15),n=c(n,i,a,h=s(h,10),r,e[12],2400959708,9),r=c(r,n,i,a=s(a,10),h,e[4],2400959708,8),h=c(h,r,n,i=s(i,10),a,e[13],2400959708,9),a=c(a,h,r,n=s(n,10),i,e[3],2400959708,14),i=c(i,a,h,r=s(r,10),n,e[7],2400959708,5),n=c(n,i,a,h=s(h,10),r,e[15],2400959708,6),r=c(r,n,i,a=s(a,10),h,e[14],2400959708,8),h=c(h,r,n,i=s(i,10),a,e[5],2400959708,6),a=c(a,h,r,n=s(n,10),i,e[6],2400959708,5),n=f(n,i=c(i,a,h,r=s(r,10),n,e[2],2400959708,12),a,h=s(h,10),r,e[4],2840853838,9),r=f(r,n,i,a=s(a,10),h,e[0],2840853838,15),h=f(h,r,n,i=s(i,10),a,e[5],2840853838,5),a=f(a,h,r,n=s(n,10),i,e[9],2840853838,11),i=f(i,a,h,r=s(r,10),n,e[7],2840853838,6),n=f(n,i,a,h=s(h,10),r,e[12],2840853838,8),r=f(r,n,i,a=s(a,10),h,e[2],2840853838,13),h=f(h,r,n,i=s(i,10),a,e[10],2840853838,12),a=f(a,h,r,n=s(n,10),i,e[14],2840853838,5),i=f(i,a,h,r=s(r,10),n,e[1],2840853838,12),n=f(n,i,a,h=s(h,10),r,e[3],2840853838,13),r=f(r,n,i,a=s(a,10),h,e[8],2840853838,14),h=f(h,r,n,i=s(i,10),a,e[11],2840853838,11),a=f(a,h,r,n=s(n,10),i,e[6],2840853838,8),i=f(i,a,h,r=s(r,10),n,e[15],2840853838,5),n=f(n,i,a,h=s(h,10),r,e[13],2840853838,6),a=s(a,10);var l=this._a,p=this._b,_=this._c,m=this._d,y=this._e;l=f(l,p,_,m,y,e[5],1352829926,8),y=f(y,l,p,_=s(_,10),m,e[14],1352829926,9),m=f(m,y,l,p=s(p,10),_,e[7],1352829926,9),_=f(_,m,y,l=s(l,10),p,e[0],1352829926,11),p=f(p,_,m,y=s(y,10),l,e[9],1352829926,13),l=f(l,p,_,m=s(m,10),y,e[2],1352829926,15),y=f(y,l,p,_=s(_,10),m,e[11],1352829926,15),m=f(m,y,l,p=s(p,10),_,e[4],1352829926,5),_=f(_,m,y,l=s(l,10),p,e[13],1352829926,7),p=f(p,_,m,y=s(y,10),l,e[6],1352829926,7),l=f(l,p,_,m=s(m,10),y,e[15],1352829926,8),y=f(y,l,p,_=s(_,10),m,e[8],1352829926,11),m=f(m,y,l,p=s(p,10),_,e[1],1352829926,14),_=f(_,m,y,l=s(l,10),p,e[10],1352829926,14),p=f(p,_,m,y=s(y,10),l,e[3],1352829926,12),y=c(y,l=f(l,p,_,m=s(m,10),y,e[12],1352829926,6),p,_=s(_,10),m,e[6],1548603684,9),m=c(m,y,l,p=s(p,10),_,e[11],1548603684,13),_=c(_,m,y,l=s(l,10),p,e[3],1548603684,15),p=c(p,_,m,y=s(y,10),l,e[7],1548603684,7),l=c(l,p,_,m=s(m,10),y,e[0],1548603684,12),y=c(y,l,p,_=s(_,10),m,e[13],1548603684,8),m=c(m,y,l,p=s(p,10),_,e[5],1548603684,9),_=c(_,m,y,l=s(l,10),p,e[10],1548603684,11),p=c(p,_,m,y=s(y,10),l,e[14],1548603684,7),l=c(l,p,_,m=s(m,10),y,e[15],1548603684,7),y=c(y,l,p,_=s(_,10),m,e[8],1548603684,12),m=c(m,y,l,p=s(p,10),_,e[12],1548603684,7),_=c(_,m,y,l=s(l,10),p,e[4],1548603684,6),p=c(p,_,m,y=s(y,10),l,e[9],1548603684,15),l=c(l,p,_,m=s(m,10),y,e[1],1548603684,13),m=d(m,y=c(y,l,p,_=s(_,10),m,e[2],1548603684,11),l,p=s(p,10),_,e[15],1836072691,9),_=d(_,m,y,l=s(l,10),p,e[5],1836072691,7),p=d(p,_,m,y=s(y,10),l,e[1],1836072691,15),l=d(l,p,_,m=s(m,10),y,e[3],1836072691,11),y=d(y,l,p,_=s(_,10),m,e[7],1836072691,8),m=d(m,y,l,p=s(p,10),_,e[14],1836072691,6),_=d(_,m,y,l=s(l,10),p,e[6],1836072691,6),p=d(p,_,m,y=s(y,10),l,e[9],1836072691,14),l=d(l,p,_,m=s(m,10),y,e[11],1836072691,12),y=d(y,l,p,_=s(_,10),m,e[8],1836072691,13),m=d(m,y,l,p=s(p,10),_,e[12],1836072691,5),_=d(_,m,y,l=s(l,10),p,e[2],1836072691,14),p=d(p,_,m,y=s(y,10),l,e[10],1836072691,13),l=d(l,p,_,m=s(m,10),y,e[0],1836072691,13),y=d(y,l,p,_=s(_,10),m,e[4],1836072691,7),_=u(_,m=d(m,y,l,p=s(p,10),_,e[13],1836072691,5),y,l=s(l,10),p,e[8],2053994217,15),p=u(p,_,m,y=s(y,10),l,e[6],2053994217,5),l=u(l,p,_,m=s(m,10),y,e[4],2053994217,8),y=u(y,l,p,_=s(_,10),m,e[1],2053994217,11),m=u(m,y,l,p=s(p,10),_,e[3],2053994217,14),_=u(_,m,y,l=s(l,10),p,e[11],2053994217,14),p=u(p,_,m,y=s(y,10),l,e[15],2053994217,6),l=u(l,p,_,m=s(m,10),y,e[0],2053994217,14),y=u(y,l,p,_=s(_,10),m,e[5],2053994217,6),m=u(m,y,l,p=s(p,10),_,e[12],2053994217,9),_=u(_,m,y,l=s(l,10),p,e[2],2053994217,12),p=u(p,_,m,y=s(y,10),l,e[13],2053994217,9),l=u(l,p,_,m=s(m,10),y,e[9],2053994217,12),y=u(y,l,p,_=s(_,10),m,e[7],2053994217,5),m=u(m,y,l,p=s(p,10),_,e[10],2053994217,15),p=o(p,_=u(_,m,y,l=s(l,10),p,e[14],2053994217,8),m,y=s(y,10),l,e[12],0,8),l=o(l,p,_,m=s(m,10),y,e[15],0,5),y=o(y,l,p,_=s(_,10),m,e[10],0,12),m=o(m,y,l,p=s(p,10),_,e[4],0,9),_=o(_,m,y,l=s(l,10),p,e[1],0,12),p=o(p,_,m,y=s(y,10),l,e[5],0,5),l=o(l,p,_,m=s(m,10),y,e[8],0,14),y=o(y,l,p,_=s(_,10),m,e[7],0,6),m=o(m,y,l,p=s(p,10),_,e[6],0,8),_=o(_,m,y,l=s(l,10),p,e[2],0,13),p=o(p,_,m,y=s(y,10),l,e[13],0,6),l=o(l,p,_,m=s(m,10),y,e[14],0,5),y=o(y,l,p,_=s(_,10),m,e[0],0,15),m=o(m,y,l,p=s(p,10),_,e[3],0,13),_=o(_,m,y,l=s(l,10),p,e[9],0,11),p=o(p,_,m,y=s(y,10),l,e[11],0,11),m=s(m,10);var b=this._b+i+m|0;this._b=this._c+a+y|0,this._c=this._d+h+l|0,this._d=this._e+r+p|0,this._e=this._a+n+_|0,this._a=b},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new t(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=a}).call(this,r(3).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(236).Transform;function i(e){n.call(this),this._block=new t(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(1)(i,n),i.prototype._transform=function(e,r,n){var i=null;try{"buffer"!==r&&(e=new t(e,r)),this.update(e)}catch(e){i=e}n(i)},i.prototype._flush=function(e){var t=null;try{this.push(this._digest())}catch(e){t=e}e(t)},i.prototype.update=function(e,r){if(!t.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");t.isBuffer(e)||(e=new t(e,r||"binary"));for(var n=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)n[a++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)n[this._blockOffset++]=e[i++];for(var s=0,o=8*e.length;o>0;++s)this._length[s]+=o,(o=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*o);return this},i.prototype._update=function(e){throw new Error("_update is not implemented")},i.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();return void 0!==e&&(t=t.toString(e)),t},i.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=i}).call(this,r(3).Buffer)},function(e,t,r){var n=r(393),i=r(57),a=r(58),s=r(406),o=r(40);function u(e,t,r){if(e=e.toLowerCase(),a[e])return i.createCipheriv(e,t,r);if(s[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function d(e,t,r){if(e=e.toLowerCase(),a[e])return i.createDecipheriv(e,t,r);if(s[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),a[e])r=a[e].key,n=a[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");r=8*s[e].key,n=s[e].iv}var i=o(t,!1,r,n);return u(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=u,t.createDecipher=t.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),a[e])r=a[e].key,n=a[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");r=8*s[e].key,n=s[e].iv}var i=o(t,!1,r,n);return d(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=d,t.listCiphers=t.getCiphers=function(){return Object.keys(s).concat(i.getCiphers())}},function(e,t,r){var n=r(12),i=r(394),a=r(1),s=r(2).Buffer,o={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function u(e){n.call(this);var t,r=e.mode.toLowerCase(),i=o[r];t=e.decrypt?"decrypt":"encrypt";var a=e.key;s.isBuffer(a)||(a=s.from(a)),"des-ede"!==r&&"des-ede-cbc"!==r||(a=s.concat([a,a.slice(0,8)]));var u=e.iv;s.isBuffer(u)||(u=s.from(u)),this._des=i.create({key:a,iv:u,type:t})}o.des=o["des-cbc"],o.des3=o["des-ede3-cbc"],e.exports=u,a(u,n),u.prototype._update=function(e){return s.from(this._des.update(e))},u.prototype._final=function(){return s.from(this._des.final())}},function(e,t,r){"use strict";t.utils=r(248),t.Cipher=r(56),t.DES=r(249),t.CBC=r(395),t.EDE=r(396)},function(e,t,r){"use strict";var n=r(8),i=r(1),a={};function s(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var r=Object.keys(a),n=0;n<r.length;n++){var s=r[n];t.prototype[s]=a[s]}return t.create=function(e){return new t(e)},t},a._cbcInit=function(){var e=new s(this.options.iv);this._cbcState=e},a._update=function(e,t,r,n){var i=this._cbcState,a=this.constructor.super_.prototype,s=i.iv;if("encrypt"===this.type){for(var o=0;o<this.blockSize;o++)s[o]^=e[t+o];a._update.call(this,s,0,r,n);for(o=0;o<this.blockSize;o++)s[o]=r[n+o]}else{a._update.call(this,e,t,r,n);for(o=0;o<this.blockSize;o++)r[n+o]^=s[o];for(o=0;o<this.blockSize;o++)s[o]=e[t+o]}}},function(e,t,r){"use strict";var n=r(8),i=r(1),a=r(56),s=r(249);function o(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),a=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:a})]:[s.create({type:"decrypt",key:a}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:r})]}function u(e){a.call(this,e);var t=new o(this.type,this.options.key);this._edeState=t}i(u,a),e.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},function(e,t,r){var n=r(58),i=r(253),a=r(2).Buffer,s=r(254),o=r(12),u=r(39),d=r(40);function c(e,t,r){o.call(this),this._cache=new h,this._cipher=new u.AES(t),this._prev=a.from(r),this._mode=e,this._autopadding=!0}r(1)(c,o),c.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return a.concat(n)};var f=a.alloc(16,16);function h(){this.cache=a.allocUnsafe(0)}function l(e,t,r){var o=n[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=a.from(t)),t.length!==o.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=a.from(r)),"GCM"!==o.mode&&r.length!==o.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===o.type?new s(o.module,t,r):"auth"===o.type?new i(o.module,t,r):new c(o.module,t,r)}c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(f))throw this._cipher.scrub(),new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=a.concat([this.cache,e])},h.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},h.prototype.flush=function(){for(var e=16-this.cache.length,t=a.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return a.concat([this.cache,t])},t.createCipheriv=l,t.createCipher=function(e,t){var r=n[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=d(t,!1,r.key,r.iv);return l(e,i.key,i.iv)}},function(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},function(e,t,r){var n=r(30);t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},function(e,t,r){var n=r(2).Buffer,i=r(30);function a(e,t,r){var a=t.length,s=i(t,e._cache);return e._cache=e._cache.slice(a),e._prev=n.concat([e._prev,r?t:s]),s}t.encrypt=function(e,t,r){for(var i,s=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){s=n.concat([s,a(e,t,r)]);break}i=e._cache.length,s=n.concat([s,a(e,t.slice(0,i),r)]),t=t.slice(i)}return s}},function(e,t,r){var n=r(2).Buffer;function i(e,t,r){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([r?t:i])]),i}t.encrypt=function(e,t,r){for(var a=t.length,s=n.allocUnsafe(a),o=-1;++o<a;)s[o]=i(e,t[o],r);return s}},function(e,t,r){var n=r(2).Buffer;function i(e,t,r){for(var n,i,s=-1,o=0;++s<8;)n=t&1<<7-s?128:0,o+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>s%8,e._prev=a(e._prev,r?n:i);return o}function a(e,t){var r=e.length,i=-1,a=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i<r;)a[i]=e[i]<<1|e[i+1]>>7;return a}t.encrypt=function(e,t,r){for(var a=t.length,s=n.allocUnsafe(a),o=-1;++o<a;)s[o]=i(e,t[o],r);return s}},function(e,t,r){(function(e){var n=r(30);function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(t,r){for(;t._cache.length<r.length;)t._cache=e.concat([t._cache,i(t)]);var a=t._cache.slice(0,r.length);return t._cache=t._cache.slice(r.length),n(r,a)}}).call(this,r(3).Buffer)},function(e,t,r){var n=r(2).Buffer,i=n.alloc(16,0);function a(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},s.prototype._multiply=function(){for(var e,t,r,n=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],s=-1;++s<128;){for(0!=(this.state[~~(s/8)]&1<<7-s%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=0!=(1&n[3]),t=3;t>0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=a(i)},s.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(a([0,e,0,t])),this.state},e.exports=s},function(e,t,r){var n=r(253),i=r(2).Buffer,a=r(58),s=r(254),o=r(12),u=r(39),d=r(40);function c(e,t,r){o.call(this),this._cache=new f,this._last=void 0,this._cipher=new u.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function f(){this.cache=i.allocUnsafe(0)}function h(e,t,r){var o=a[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==o.mode&&r.length!==o.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==o.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===o.type?new s(o.module,t,r,!0):"auth"===o.type?new n(o.module,t,r,!0):new c(o.module,t,r)}r(1)(c,o),c.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var r=-1;for(;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16===t)return;return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},f.prototype.add=function(e){this.cache=i.concat([this.cache,e])},f.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},f.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=a[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=d(t,!1,r.key,r.iv);return h(e,n.key,n.iv)},t.createDecipheriv=h},function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},function(e,t,r){(function(e){var n=r(255),i=r(410),a=r(411);var s={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(t){var r=new e(i[t].prime,"hex"),n=new e(i[t].gen,"hex");return new a(r,n)},t.createDiffieHellman=t.DiffieHellman=function t(r,i,o,u){return e.isBuffer(i)||void 0===s[i]?t(r,"binary",i,o):(i=i||"binary",u=u||"binary",o=o||new e([2]),e.isBuffer(o)||(o=new e(o,u)),"number"==typeof r?new a(n(r,o),o,!0):(e.isBuffer(r)||(r=new e(r,i)),new a(r,o,!0)))}}).call(this,r(3).Buffer)},function(e,t){},function(e,t){},function(e){e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(e,t,r){(function(t){var n=r(7),i=new(r(256)),a=new n(24),s=new n(11),o=new n(10),u=new n(3),d=new n(7),c=r(255),f=r(18);function h(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._pub=new n(e),this}function l(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._priv=new n(e),this}e.exports=_;var p={};function _(e,t,r){this.setGenerator(t),this.__prime=new n(e),this._prime=n.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=h,this.setPrivateKey=l):this._primeCode=8}function m(e,r){var n=new t(e.toArray());return r?n.toString(r):n}Object.defineProperty(_.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in p)return p[n];var f,h=0;if(e.isEven()||!c.simpleSieve||!c.fermatTest(e)||!i.test(e))return h+=1,h+="02"===r||"05"===r?8:4,p[n]=h,h;switch(i.test(e.shrn(1))||(h+=2),r){case"02":e.mod(a).cmp(s)&&(h+=8);break;case"05":(f=e.mod(o)).cmp(u)&&f.cmp(d)&&(h+=8);break;default:h+=4}return p[n]=h,h}(this.__prime,this.__gen)),this._primeCode}}),_.prototype.generateKeys=function(){return this._priv||(this._priv=new n(f(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},_.prototype.computeSecret=function(e){var r=(e=(e=new n(e)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new t(r.toArray()),a=this.getPrime();if(i.length<a.length){var s=new t(a.length-i.length);s.fill(0),i=t.concat([s,i])}return i},_.prototype.getPublicKey=function(e){return m(this._pub,e)},_.prototype.getPrivateKey=function(e){return m(this._priv,e)},_.prototype.getPrime=function(e){return m(this.__prime,e)},_.prototype.getGenerator=function(e){return m(this._gen,e)},_.prototype.setGenerator=function(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this.__gen=e,this._gen=new n(e),this}}).call(this,r(3).Buffer)},function(e,t,r){"use strict";var n=r(2).Buffer,i=r(25),a=r(37),s=r(1),o=r(413),u=r(448),d=r(242);function c(e){a.Writable.call(this);var t=d[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){a.Writable.call(this);var t=d[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){return new c(e)}function l(e){return new f(e)}Object.keys(d).forEach((function(e){d[e].id=n.from(d[e].id,"hex"),d[e.toLowerCase()]=d[e]})),s(c,a.Writable),c.prototype._write=function(e,t,r){this._hash.update(e),r()},c.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},c.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=o(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},s(f,a.Writable),f.prototype._write=function(e,t,r){this._hash.update(e),r()},f.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},f.prototype.verify=function(e,t,r){var i="string"==typeof t?n.from(t,r):t;this.end();var a=this._hash.digest();return u(i,a,e,this._signType,this._tag)},e.exports={Sign:h,Verify:l,createSign:h,createVerify:l}},function(e,t,r){"use strict";var n=r(2).Buffer,i=r(241),a=r(60),s=r(61).ec,o=r(262),u=r(42),d=r(267);function c(e,t,r,a){if((e=n.from(e.toArray())).length<t.byteLength()){var s=n.alloc(t.byteLength()-e.length);e=n.concat([s,e])}var o=r.length,u=function(e,t){e=(e=f(e,t)).mod(t);var r=n.from(e.toArray());if(r.length<t.byteLength()){var i=n.alloc(t.byteLength()-r.length);r=n.concat([i,r])}return r}(r,t),d=n.alloc(o);d.fill(1);var c=n.alloc(o);return c=i(a,c).update(d).update(n.from([0])).update(e).update(u).digest(),d=i(a,c).update(d).digest(),{k:c=i(a,c).update(d).update(n.from([1])).update(e).update(u).digest(),v:d=i(a,c).update(d).digest()}}function f(e,t){var r=new o(e),n=(e.length<<3)-t.bitLength();return n>0&&r.ishrn(n),r}function h(e,t,r){var a,s;do{for(a=n.alloc(0);8*a.length<e.bitLength();)t.v=i(r,t.k).update(t.v).digest(),a=n.concat([a,t.v]);s=f(a,e),t.k=i(r,t.k).update(t.v).update(n.from([0])).digest(),t.v=i(r,t.k).update(t.v).digest()}while(-1!==s.cmp(e));return s}function l(e,t,r,n){return e.toRed(o.mont(r)).redPow(t).fromRed().mod(n)}e.exports=function(e,t,r,i,p){var _=u(t);if(_.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(e,t){var r=d[t.curve.join(".")];if(!r)throw new Error("unknown curve "+t.curve.join("."));var i=new s(r).keyFromPrivate(t.privateKey).sign(e);return n.from(i.toDER())}(e,_)}if("dsa"===_.type){if("dsa"!==i)throw new Error("wrong private key type");return function(e,t,r){var i,a=t.params.priv_key,s=t.params.p,u=t.params.q,d=t.params.g,p=new o(0),_=f(e,u).mod(u),m=!1,y=c(a,u,e,r);for(;!1===m;)i=h(u,y,r),p=l(d,i,s,u),0===(m=i.invm(u).imul(_.add(a.mul(p))).mod(u)).cmpn(0)&&(m=!1,p=new o(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e));128&t[0]&&(t=[0].concat(t));var r=[48,e.length+t.length+4,2,e.length];return r=r.concat(e,[2,t.length],t),n.from(r)}(p,m)}(e,_,r)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");if(void 0!==t.padding&&1!==t.padding)throw new Error("illegal or unsupported padding mode");e=n.concat([p,e]);for(var m=_.modulus.byteLength(),y=[0,1];e.length+y.length+1<m;)y.push(255);y.push(0);for(var b=-1;++b<e.length;)y.push(e[b]);return a(y,_)},e.exports.getKey=c,e.exports.makeKey=h},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(415).Buffer}catch(e){}function o(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function u(e,t,r){var n=o(e,r);return r-1>=t&&(n|=o(e,r-1)<<4),n}function d(e,t,r,i){for(var a=0,s=0,o=Math.min(e.length,r),u=t;u<o;u++){var d=e.charCodeAt(u)-48;a*=i,s=d>=49?d-49+10:d>=17?d-17+10:d,n(d>=0&&s<i,"Invalid character"),a+=s}return a}function c(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,s,o=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this._strip()},a.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,a=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=u(e,t,n)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;this._strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,s=a%n,o=Math.min(a,a-s)+r,u=0,c=r;c<o;c+=n)u=d(e,c,c+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=d(e,c,e.length,t),c=0;c<s;c++)f*=t;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype._move=function(e){c(e,this)},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(e){a.prototype.inspect=f}else a.prototype.inspect=f;function f(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,a=0,s=0;s<this.length;s++){var o=this.words[s],u=(16777215&(o<<i|a)).toString(16);a=o>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==a||s!==this.length-1?h[6-u.length]+u+r:u+r}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=l[e],c=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var _=f.modrn(c).toString(e);r=(f=f.idivn(c)).isZero()?_+r:h[d-_.length]+_+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16,2)},s&&(a.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function _(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],s=i*a,o=67108863&s,u=s/67108864|0;r.words[0]=o;for(var d=1;d<n;d++){for(var c=u>>>26,f=67108863&u,h=Math.min(d,t.length-1),l=Math.max(0,d-e.length+1);l<=h;l++){var p=d-l|0;c+=(s=(i=0|e.words[p])*(a=0|t.words[l])+f)/67108864|0,f=67108863&s}r.words[d]=0|f,u=0|c}return 0!==u?r.words[d]=0|u:r.length--,r._strip()}a.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,a);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},a.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,a=0;i<this.length;i++){var s=this.words[i]<<a|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===a?(r<e.length&&(e[r++]=s>>24&255),n=0,a=0):(n=s>>>24,a+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},a.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,a=0;i<this.length;i++){var s=this.words[i]<<a|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===a?(r>=0&&(e[r--]=s>>24&255),n=0,a=0):(n=s>>>24,a+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},a.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},a.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},a.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},a.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a<n.length;a++)t=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<r.length;a++)t=(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,s=0;s<n.length;s++)a=(t=(0|r.words[s])-(0|n.words[s])+a)>>26,this.words[s]=67108863&t;for(;0!==a&&s<r.length;s++)a=(t=(0|r.words[s])+a)>>26,this.words[s]=67108863&t;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,r){var n,i,a,s=e.words,o=t.words,u=r.words,d=0,c=0|s[0],f=8191&c,h=c>>>13,l=0|s[1],p=8191&l,_=l>>>13,m=0|s[2],y=8191&m,b=m>>>13,g=0|s[3],M=8191&g,v=g>>>13,T=0|s[4],w=8191&T,S=T>>>13,L=0|s[5],A=8191&L,E=L>>>13,D=0|s[6],k=8191&D,Y=D>>>13,O=0|s[7],F=8191&O,P=O>>>13,I=0|s[8],R=8191&I,x=I>>>13,j=0|s[9],K=8191&j,H=j>>>13,N=0|o[0],C=8191&N,U=N>>>13,B=0|o[1],W=8191&B,z=B>>>13,q=0|o[2],G=8191&q,J=q>>>13,V=0|o[3],Z=8191&V,Q=V>>>13,X=0|o[4],$=8191&X,ee=X>>>13,te=0|o[5],re=8191&te,ne=te>>>13,ie=0|o[6],ae=8191&ie,se=ie>>>13,oe=0|o[7],ue=8191&oe,de=oe>>>13,ce=0|o[8],fe=8191&ce,he=ce>>>13,le=0|o[9],pe=8191&le,_e=le>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(d+(n=Math.imul(f,C))|0)+((8191&(i=(i=Math.imul(f,U))+Math.imul(h,C)|0))<<13)|0;d=((a=Math.imul(h,U))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,C),i=(i=Math.imul(p,U))+Math.imul(_,C)|0,a=Math.imul(_,U);var ye=(d+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,z)|0)+Math.imul(h,W)|0))<<13)|0;d=((a=a+Math.imul(h,z)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,C),i=(i=Math.imul(y,U))+Math.imul(b,C)|0,a=Math.imul(b,U),n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,z)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,z)|0;var be=(d+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(h,G)|0))<<13)|0;d=((a=a+Math.imul(h,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(M,C),i=(i=Math.imul(M,U))+Math.imul(v,C)|0,a=Math.imul(v,U),n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,z)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,z)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(_,G)|0,a=a+Math.imul(_,J)|0;var ge=(d+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,Q)|0)+Math.imul(h,Z)|0))<<13)|0;d=((a=a+Math.imul(h,Q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(w,C),i=(i=Math.imul(w,U))+Math.imul(S,C)|0,a=Math.imul(S,U),n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,z)|0)+Math.imul(v,W)|0,a=a+Math.imul(v,z)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,G)|0,a=a+Math.imul(b,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(_,Z)|0,a=a+Math.imul(_,Q)|0;var Me=(d+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(h,$)|0))<<13)|0;d=((a=a+Math.imul(h,ee)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(A,C),i=(i=Math.imul(A,U))+Math.imul(E,C)|0,a=Math.imul(E,U),n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,z)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,z)|0,n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(v,G)|0,a=a+Math.imul(v,J)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(b,Z)|0,a=a+Math.imul(b,Q)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,ee)|0;var ve=(d+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(h,re)|0))<<13)|0;d=((a=a+Math.imul(h,ne)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(k,C),i=(i=Math.imul(k,U))+Math.imul(Y,C)|0,a=Math.imul(Y,U),n=n+Math.imul(A,W)|0,i=(i=i+Math.imul(A,z)|0)+Math.imul(E,W)|0,a=a+Math.imul(E,z)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(S,G)|0,a=a+Math.imul(S,J)|0,n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,Q)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,$)|0,a=a+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(_,re)|0,a=a+Math.imul(_,ne)|0;var Te=(d+(n=n+Math.imul(f,ae)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(h,ae)|0))<<13)|0;d=((a=a+Math.imul(h,se)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(F,C),i=(i=Math.imul(F,U))+Math.imul(P,C)|0,a=Math.imul(P,U),n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,z)|0)+Math.imul(Y,W)|0,a=a+Math.imul(Y,z)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(E,G)|0,a=a+Math.imul(E,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(S,Z)|0,a=a+Math.imul(S,Q)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(b,re)|0,a=a+Math.imul(b,ne)|0,n=n+Math.imul(p,ae)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(_,ae)|0,a=a+Math.imul(_,se)|0;var we=(d+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(h,ue)|0))<<13)|0;d=((a=a+Math.imul(h,de)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(R,C),i=(i=Math.imul(R,U))+Math.imul(x,C)|0,a=Math.imul(x,U),n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,z)|0)+Math.imul(P,W)|0,a=a+Math.imul(P,z)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(Y,G)|0,a=a+Math.imul(Y,J)|0,n=n+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,Q)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(v,re)|0,a=a+Math.imul(v,ne)|0,n=n+Math.imul(y,ae)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,se)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(_,ue)|0,a=a+Math.imul(_,de)|0;var Se=(d+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,he)|0)+Math.imul(h,fe)|0))<<13)|0;d=((a=a+Math.imul(h,he)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(K,C),i=(i=Math.imul(K,U))+Math.imul(H,C)|0,a=Math.imul(H,U),n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,z)|0)+Math.imul(x,W)|0,a=a+Math.imul(x,z)|0,n=n+Math.imul(F,G)|0,i=(i=i+Math.imul(F,J)|0)+Math.imul(P,G)|0,a=a+Math.imul(P,J)|0,n=n+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(Y,Z)|0,a=a+Math.imul(Y,Q)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(M,ae)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,se)|0,n=n+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,de)|0)+Math.imul(b,ue)|0,a=a+Math.imul(b,de)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(_,fe)|0,a=a+Math.imul(_,he)|0;var Le=(d+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,_e)|0)+Math.imul(h,pe)|0))<<13)|0;d=((a=a+Math.imul(h,_e)|0)+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,n=Math.imul(K,W),i=(i=Math.imul(K,z))+Math.imul(H,W)|0,a=Math.imul(H,z),n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,J)|0)+Math.imul(x,G)|0,a=a+Math.imul(x,J)|0,n=n+Math.imul(F,Z)|0,i=(i=i+Math.imul(F,Q)|0)+Math.imul(P,Z)|0,a=a+Math.imul(P,Q)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(Y,$)|0,a=a+Math.imul(Y,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,n=n+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(v,ue)|0,a=a+Math.imul(v,de)|0,n=n+Math.imul(y,fe)|0,i=(i=i+Math.imul(y,he)|0)+Math.imul(b,fe)|0,a=a+Math.imul(b,he)|0;var Ae=(d+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,_e)|0)+Math.imul(_,pe)|0))<<13)|0;d=((a=a+Math.imul(_,_e)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(K,G),i=(i=Math.imul(K,J))+Math.imul(H,G)|0,a=Math.imul(H,J),n=n+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(x,Z)|0,a=a+Math.imul(x,Q)|0,n=n+Math.imul(F,$)|0,i=(i=i+Math.imul(F,ee)|0)+Math.imul(P,$)|0,a=a+Math.imul(P,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(Y,re)|0,a=a+Math.imul(Y,ne)|0,n=n+Math.imul(A,ae)|0,i=(i=i+Math.imul(A,se)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,se)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(S,ue)|0,a=a+Math.imul(S,de)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,he)|0)+Math.imul(v,fe)|0,a=a+Math.imul(v,he)|0;var Ee=(d+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,_e)|0)+Math.imul(b,pe)|0))<<13)|0;d=((a=a+Math.imul(b,_e)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(K,Z),i=(i=Math.imul(K,Q))+Math.imul(H,Z)|0,a=Math.imul(H,Q),n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(x,$)|0,a=a+Math.imul(x,ee)|0,n=n+Math.imul(F,re)|0,i=(i=i+Math.imul(F,ne)|0)+Math.imul(P,re)|0,a=a+Math.imul(P,ne)|0,n=n+Math.imul(k,ae)|0,i=(i=i+Math.imul(k,se)|0)+Math.imul(Y,ae)|0,a=a+Math.imul(Y,se)|0,n=n+Math.imul(A,ue)|0,i=(i=i+Math.imul(A,de)|0)+Math.imul(E,ue)|0,a=a+Math.imul(E,de)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(S,fe)|0,a=a+Math.imul(S,he)|0;var De=(d+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,_e)|0)+Math.imul(v,pe)|0))<<13)|0;d=((a=a+Math.imul(v,_e)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(K,$),i=(i=Math.imul(K,ee))+Math.imul(H,$)|0,a=Math.imul(H,ee),n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(x,re)|0,a=a+Math.imul(x,ne)|0,n=n+Math.imul(F,ae)|0,i=(i=i+Math.imul(F,se)|0)+Math.imul(P,ae)|0,a=a+Math.imul(P,se)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(Y,ue)|0,a=a+Math.imul(Y,de)|0,n=n+Math.imul(A,fe)|0,i=(i=i+Math.imul(A,he)|0)+Math.imul(E,fe)|0,a=a+Math.imul(E,he)|0;var ke=(d+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,_e)|0)+Math.imul(S,pe)|0))<<13)|0;d=((a=a+Math.imul(S,_e)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(K,re),i=(i=Math.imul(K,ne))+Math.imul(H,re)|0,a=Math.imul(H,ne),n=n+Math.imul(R,ae)|0,i=(i=i+Math.imul(R,se)|0)+Math.imul(x,ae)|0,a=a+Math.imul(x,se)|0,n=n+Math.imul(F,ue)|0,i=(i=i+Math.imul(F,de)|0)+Math.imul(P,ue)|0,a=a+Math.imul(P,de)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,he)|0)+Math.imul(Y,fe)|0,a=a+Math.imul(Y,he)|0;var Ye=(d+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,_e)|0)+Math.imul(E,pe)|0))<<13)|0;d=((a=a+Math.imul(E,_e)|0)+(i>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,n=Math.imul(K,ae),i=(i=Math.imul(K,se))+Math.imul(H,ae)|0,a=Math.imul(H,se),n=n+Math.imul(R,ue)|0,i=(i=i+Math.imul(R,de)|0)+Math.imul(x,ue)|0,a=a+Math.imul(x,de)|0,n=n+Math.imul(F,fe)|0,i=(i=i+Math.imul(F,he)|0)+Math.imul(P,fe)|0,a=a+Math.imul(P,he)|0;var Oe=(d+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,_e)|0)+Math.imul(Y,pe)|0))<<13)|0;d=((a=a+Math.imul(Y,_e)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(K,ue),i=(i=Math.imul(K,de))+Math.imul(H,ue)|0,a=Math.imul(H,de),n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,he)|0)+Math.imul(x,fe)|0,a=a+Math.imul(x,he)|0;var Fe=(d+(n=n+Math.imul(F,pe)|0)|0)+((8191&(i=(i=i+Math.imul(F,_e)|0)+Math.imul(P,pe)|0))<<13)|0;d=((a=a+Math.imul(P,_e)|0)+(i>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(K,fe),i=(i=Math.imul(K,he))+Math.imul(H,fe)|0,a=Math.imul(H,he);var Pe=(d+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,_e)|0)+Math.imul(x,pe)|0))<<13)|0;d=((a=a+Math.imul(x,_e)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ie=(d+(n=Math.imul(K,pe))|0)+((8191&(i=(i=Math.imul(K,_e))+Math.imul(H,pe)|0))<<13)|0;return d=((a=Math.imul(H,_e))+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,u[0]=me,u[1]=ye,u[2]=be,u[3]=ge,u[4]=Me,u[5]=ve,u[6]=Te,u[7]=we,u[8]=Se,u[9]=Le,u[10]=Ae,u[11]=Ee,u[12]=De,u[13]=ke,u[14]=Ye,u[15]=Oe,u[16]=Fe,u[17]=Pe,u[18]=Ie,0!==d&&(u[19]=d,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var s=i;i=0;for(var o=67108863&n,u=Math.min(a,t.length-1),d=Math.max(0,a-e.length+1);d<=u;d++){var c=a-d,f=(0|e.words[c])*(0|t.words[d]),h=67108863&f;o=67108863&(h=h+o|0),i+=(s=(s=s+(f/67108864|0)|0)+(h>>>26)|0)>>>26,s&=67108863}r.words[a]=o,n=s,s=i}return 0!==n?r.words[a]=n:r.length--,r._strip()}function b(e,t,r){return y(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(m=_),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?_(this,e,t):r<1024?y(this,e,t):b(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},g.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},g.prototype.permute=function(e,t,r,n,i,a){for(var s=0;s<a;s++)n[s]=t[e[s]],i[s]=r[e[s]]},g.prototype.transform=function(e,t,r,n,i,a){this.permute(a,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var o=s<<1,u=Math.cos(2*Math.PI/o),d=Math.sin(2*Math.PI/o),c=0;c<i;c+=o)for(var f=u,h=d,l=0;l<s;l++){var p=r[c+l],_=n[c+l],m=r[c+l+s],y=n[c+l+s],b=f*m-h*y;y=f*y+h*m,m=b,r[c+l]=p+m,n[c+l]=_+y,r[c+l+s]=p-m,n[c+l+s]=_-y,l!==o&&(b=u*f-d*h,h=u*h+d*f,f=b)}},g.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},g.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},g.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},g.prototype.convert13b=function(e,t,r,i){for(var a=0,s=0;s<t;s++)a+=0|e[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===a),n(0==(-8192&a))},g.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},g.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),a=this.stub(n),s=new Array(n),o=new Array(n),u=new Array(n),d=new Array(n),c=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,d,n),this.transform(s,a,o,u,n,i),this.transform(d,a,c,f,n,i);for(var l=0;l<n;l++){var p=o[l]*c[l]-u[l]*f[l];u[l]=o[l]*f[l]+u[l]*c[l],o[l]=p}return this.conjugate(o,u,n),this.transform(o,u,h,a,n,i),this.conjugate(h,a,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),b(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var a=(0|this.words[i])*e,s=(67108863&a)+(67108863&r);r>>=26,r+=a/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),this.length=0===e?1:this.length,t?this.ineg():this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var o=this.words[t]&a,u=(0|this.words[t])-o<<r;this.words[t]=u|s,s=o>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},a.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<<a,u=r;if(i-=s,i=Math.max(0,i),u){for(var d=0;d<s;d++)u.words[d]=this.words[d];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,d=0;d<this.length;d++)this.words[d]=this.words[d+s];else this.words[0]=0,this.length=1;var c=0;for(d=this.length-1;d>=0&&(0!==c||d>=i);d--){var f=0|this.words[d];this.words[d]=c<<26-a|f>>>a,c=f&o}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r)&&!!(this.words[r]&i)},a.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var i,a,s=e.length+r;this._expand(s);var o=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+o;var u=(0|e.words[i])*t;o=((a-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)o=(a=(0|this.words[i+r])+o)>>26,this.words[i+r]=67108863&a;if(0===o)return this._strip();for(n(-1===o),o=0,i=0;i<this.length;i++)o=(a=-(0|this.words[i])+o)>>26,this.words[i]=67108863&a;return this.negative=1,this._strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var o,u=n.length-i.length;if("mod"!==t){(o=new a(null)).length=u+1,o.words=new Array(o.length);for(var d=0;d<o.length;d++)o.words[d]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,o&&(o.words[u]=1));for(var f=u-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/s|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);o&&(o.words[f]=h)}return o&&o._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:o||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(i=o.div.neg()),{div:i,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,o},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,a=this.length-1;a>=0;a--)i=(r*i+(0|this.words[a]))%e;return t?-i:i},a.prototype.modn=function(e){return this.modrn(e)},a.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var a=(0|this.words[i])+67108864*r;this.words[i]=a/e|0,r=a%e}return this._strip(),t?this.ineg():this},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),s=new a(0),o=new a(0),u=new a(1),d=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++d;for(var c=r.clone(),f=t.clone();!t.isZero();){for(var h=0,l=1;0==(t.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,_=1;0==(r.words[0]&_)&&p<26;++p,_<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(c),u.isub(f)),o.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(o),s.isub(u)):(r.isub(t),o.isub(i),u.isub(s))}return{a:o,b:u,gcd:r.iushln(d)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new a(1),o=new a(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var d=0,c=1;0==(t.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(t.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(o)):(r.isub(t),o.isub(s))}return(i=0===t.cmpn(1)?s:o).cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new A(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var M={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function T(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function L(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},i(T,v),T.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,n=10;n<e.length;n++){var a=0|e.words[n];e.words[n-10]=(4194303&a)<<4|i>>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},T.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(w,v),i(S,v),i(L,v),L.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(M[e])return M[e];var t;if("k256"===e)t=new T;else if("p224"===e)t=new w;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new L}return M[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var o=new a(1).toRed(this),u=o.redNeg(),d=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,d).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),h=this.pow(e,i.addn(1).iushrn(1)),l=this.pow(e,i),p=s;0!==l.cmp(o);){for(var _=l,m=0;0!==_.cmp(o);m++)_=_.redSqr();n(m<p);var y=this.pow(f,new a(1).iushln(p-m-1));h=h.redMul(y),f=y.redSqr(),l=l.redMul(f),p=m}return h},A.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},A.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,o=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var d=t.words[n],c=u-1;c>=0;c--){var f=d>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4===++o||0===n&&0===c)&&(i=this.mul(i,r[s]),o=0,s=0)):o=0}u=26}return i},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new E(e)},i(E,A),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(34)(e))},function(e,t){},function(e){e.exports=JSON.parse('{"name":"elliptic","version":"6.6.1","description":"EC cryptography","main":"lib/elliptic.js","files":["lib"],"scripts":{"lint":"eslint lib test","lint:fix":"npm run lint -- --fix","unit":"istanbul test _mocha --reporter=spec test/index.js","test":"npm run lint && npm run unit","version":"grunt dist && git add dist/"},"repository":{"type":"git","url":"git@github.com:indutny/elliptic"},"keywords":["EC","Elliptic","curve","Cryptography"],"author":"Fedor Indutny <fedor@indutny.com>","license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/indutny/elliptic","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}')},function(e,t,r){"use strict";var n=r(9),i=r(7),a=r(1),s=r(41),o=n.assert;function u(e){s.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function d(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function c(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}a(u,s),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(t))?r=a[0]:(r=a[1],o(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),a=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(a).fromRed(),n.redSub(a).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,a,s,o,u,d,c,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,l=this.n.clone(),p=new i(1),_=new i(0),m=new i(0),y=new i(1),b=0;0!==h.cmpn(0);){var g=l.div(h);d=l.sub(g.mul(h)),c=m.sub(g.mul(p));var M=y.sub(g.mul(_));if(!n&&d.cmp(f)<0)t=u.neg(),r=p,n=d.neg(),a=c;else if(n&&2==++b)break;u=d,l=h,h=d,m=p,p=c,y=_,_=M}s=d.neg(),o=c;var v=n.sqr().add(a.sqr());return s.sqr().add(o.sqr()).cmp(v)>=0&&(s=t,o=r),n.negative&&(n=n.neg(),a=a.neg()),s.negative&&(s=s.neg(),o=o.neg()),[{a:n,b:a},{a:s,b:o}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),s=i.mul(r.a),o=a.mul(n.a),u=i.mul(r.b),d=a.mul(n.b);return{k1:e.sub(s).sub(o),k2:u.add(d).neg()}},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var a=n.fromRed().isOdd();return(t&&!a||!t&&a)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,a=0;a<e.length;a++){var s=this._endoSplit(t[a]),o=e[a],u=o._getBeta();s.k1.negative&&(s.k1.ineg(),o=o.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),n[2*a]=o,n[2*a+1]=u,i[2*a]=s.k1,i[2*a+1]=s.k2}for(var d=this._wnafMulAdd(1,n,i,2*a,r),c=0;c<2*a;c++)n[c]=null,i[c]=null;return d},a(d,s.BasePoint),u.prototype.point=function(e,t,r){return new d(this,e,t,r)},u.prototype.pointFromJSON=function(e,t){return d.fromJSON(this,e,t)},d.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},d.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},d.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var a=t[2];return n.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[n].concat(a.doubles.points.map(i))},naf:a.naf&&{wnd:a.naf.wnd,points:[n].concat(a.naf.points.map(i))}},n},d.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},d.prototype.isInfinity=function(){return this.inf},d.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},d.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),a=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)},d.prototype.getX=function(){return this.x.fromRed()},d.prototype.getY=function(){return this.y.fromRed()},d.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},d.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},d.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},d.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},d.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},d.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(c,s.BasePoint),u.prototype.jpoint=function(e,t,r){return new c(this,e,t,r)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),o=n.redSub(i),u=a.redSub(s);if(0===o.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var d=o.redSqr(),c=d.redMul(o),f=n.redMul(d),h=u.redSqr().redIAdd(c).redISub(f).redISub(f),l=u.redMul(f.redISub(h)).redISub(a.redMul(c)),p=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(h,l,p)},c.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,a=e.y.redMul(t).redMul(this.z),s=r.redSub(n),o=i.redSub(a);if(0===s.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),d=u.redMul(s),c=r.redMul(u),f=o.redSqr().redIAdd(d).redISub(c).redISub(c),h=o.redMul(c.redISub(f)).redISub(i.redMul(d)),l=this.z.redMul(s);return this.curve.jpoint(f,h,l)},c.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,a=this.x,s=this.y,o=this.z,u=o.redSqr().redSqr(),d=s.redAdd(s);for(t=0;t<e;t++){var c=a.redSqr(),f=d.redSqr(),h=f.redSqr(),l=c.redAdd(c).redIAdd(c).redIAdd(n.redMul(u)),p=a.redMul(f),_=l.redSqr().redISub(p.redAdd(p)),m=p.redISub(_),y=l.redMul(m);y=y.redIAdd(y).redISub(h);var b=d.redMul(o);t+1<e&&(u=u.redMul(h)),a=_,o=b,d=y}return this.curve.jpoint(a,d.redMul(i),o)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},c.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(a);s=s.redIAdd(s);var o=n.redAdd(n).redIAdd(n),u=o.redSqr().redISub(s).redISub(s),d=a.redIAdd(a);d=(d=d.redIAdd(d)).redIAdd(d),e=u,t=o.redMul(s.redISub(u)).redISub(d),r=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),f=this.y.redSqr(),h=f.redSqr(),l=this.x.redAdd(f).redSqr().redISub(c).redISub(h);l=l.redIAdd(l);var p=c.redAdd(c).redIAdd(c),_=p.redSqr(),m=h.redIAdd(h);m=(m=m.redIAdd(m)).redIAdd(m),e=_.redISub(l).redISub(l),t=p.redMul(l.redISub(e)).redISub(m),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},c.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(a);s=s.redIAdd(s);var o=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=o.redSqr().redISub(s).redISub(s);e=u;var d=a.redIAdd(a);d=(d=d.redIAdd(d)).redIAdd(d),t=o.redMul(s.redISub(u)).redISub(d),r=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),f=this.y.redSqr(),h=this.x.redMul(f),l=this.x.redSub(c).redMul(this.x.redAdd(c));l=l.redAdd(l).redIAdd(l);var p=h.redIAdd(h),_=(p=p.redIAdd(p)).redAdd(p);e=l.redSqr().redISub(_),r=this.y.redAdd(this.z).redSqr().redISub(f).redISub(c);var m=f.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),t=l.redMul(p.redISub(e)).redISub(m)}return this.curve.jpoint(e,t,r)},c.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),a=t.redSqr(),s=r.redSqr(),o=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(i)),u=t.redAdd(t),d=(u=u.redIAdd(u)).redMul(s),c=o.redSqr().redISub(d.redAdd(d)),f=d.redISub(c),h=s.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var l=o.redMul(f).redISub(h),p=r.redAdd(r).redMul(n);return this.curve.jpoint(c,l,p)},c.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),a=i.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(n),o=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(a)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var d=i.redIAdd(s).redSqr().redISub(a).redISub(o).redISub(u),c=t.redMul(d);c=(c=c.redIAdd(c)).redIAdd(c);var f=this.x.redMul(o).redISub(c);f=(f=f.redIAdd(f)).redIAdd(f);var h=this.y.redMul(d.redMul(u.redISub(d)).redISub(s.redMul(o)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var l=this.z.redAdd(s).redSqr().redISub(r).redISub(o);return this.curve.jpoint(f,h,l)},c.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},c.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},c.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},c.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var n=r(7),i=r(1),a=r(41),s=r(9);function o(e){a.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){a.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(o,a),e.exports=o,o.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(u,a.BasePoint),o.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},o.prototype.point=function(e,t){return new u(this,e,t)},o.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(r),s=i.redMul(n),o=t.z.redMul(a.redAdd(s).redSqr()),u=t.x.redMul(a.redISub(s).redSqr());return this.curve.point(o,u)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var a=i.length-1;a>=0;a--)0===i[a]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var n=r(9),i=r(7),a=r(1),s=r(41),o=n.assert;function u(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,s.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),o(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function d(e,t,r,n,a){s.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=a&&new i(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}a(u,s),e.exports=u,u.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},u.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},u.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),a=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(a.redInvm()),o=s.redSqrt();if(0!==o.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var u=o.fromRed().isOdd();return(t&&!u||!t&&u)&&(o=o.redNeg()),this.point(e,o)},u.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),a=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(a.redInvm());if(0===s.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var o=s.redSqrt();if(0!==o.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==t&&(o=o.redNeg()),this.point(o,e)},u.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},a(d,s.BasePoint),u.prototype.pointFromJSON=function(e){return d.fromJSON(this,e)},u.prototype.point=function(e,t,r,n){return new d(this,e,t,r,n)},d.fromJSON=function(e,t){return new d(e,t[0],t[1],t[2])},d.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},d.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},d.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=n.redAdd(t),s=a.redSub(r),o=n.redSub(t),u=i.redMul(s),d=a.redMul(o),c=i.redMul(o),f=s.redMul(a);return this.curve.point(u,d,f,c)},d.prototype._projDbl=function(){var e,t,r,n,i,a,s=this.x.redAdd(this.y).redSqr(),o=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var d=(n=this.curve._mulA(o)).redAdd(u);this.zOne?(e=s.redSub(o).redSub(u).redMul(d.redSub(this.curve.two)),t=d.redMul(n.redSub(u)),r=d.redSqr().redSub(d).redSub(d)):(i=this.z.redSqr(),a=d.redSub(i).redISub(i),e=s.redSub(o).redISub(u).redMul(a),t=d.redMul(n.redSub(u)),r=d.redMul(a))}else n=o.redAdd(u),i=this.curve._mulC(this.z).redSqr(),a=n.redSub(i).redSub(i),e=this.curve._mulC(s.redISub(n)).redMul(a),t=this.curve._mulC(n).redMul(o.redISub(u)),r=n.redMul(a);return this.curve.point(e,t,r)},d.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},d.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),s=i.redSub(n),o=i.redAdd(n),u=r.redAdd(t),d=a.redMul(s),c=o.redMul(u),f=a.redMul(u),h=s.redMul(o);return this.curve.point(d,c,h,f)},d.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),a=this.x.redMul(e.x),s=this.y.redMul(e.y),o=this.curve.d.redMul(a).redMul(s),u=i.redSub(o),d=i.redAdd(o),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(s),f=n.redMul(u).redMul(c);return this.curve.twisted?(t=n.redMul(d).redMul(s.redSub(this.curve._mulA(a))),r=u.redMul(d)):(t=n.redMul(d).redMul(s.redSub(a)),r=this.curve._mulC(u).redMul(d)),this.curve.point(f,t,r)},d.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},d.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},d.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},d.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},d.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},d.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},d.prototype.getX=function(){return this.normalize(),this.x.fromRed()},d.prototype.getY=function(){return this.normalize(),this.y.fromRed()},d.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},d.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},d.prototype.toP=d.prototype.normalize,d.prototype.mixedAdd=d.prototype.add},function(e,t,r){"use strict";t.sha1=r(421),t.sha224=r(422),t.sha256=r(260),t.sha384=r(423),t.sha512=r(261)},function(e,t,r){"use strict";var n=r(11),i=r(31),a=r(259),s=n.rotl32,o=n.sum32,u=n.sum32_5,d=a.ft_1,c=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(h,c),e.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],a=this.h[1],c=this.h[2],h=this.h[3],l=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),_=u(s(i,5),d(p,a,c,h),l,r[n],f[p]);l=h,h=c,c=s(a,30),a=i,i=_}this.h[0]=o(this.h[0],i),this.h[1]=o(this.h[1],a),this.h[2]=o(this.h[2],c),this.h[3]=o(this.h[3],h),this.h[4]=o(this.h[4],l)},h.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(e,t,r){"use strict";var n=r(11),i=r(260);function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(a,i),e.exports=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},function(e,t,r){"use strict";var n=r(11),i=r(261);function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(a,i),e.exports=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},function(e,t,r){"use strict";var n=r(11),i=r(31),a=n.rotl32,s=n.sum32,o=n.sum32_3,u=n.sum32_4,d=i.BlockHash;function c(){if(!(this instanceof c))return new c;d.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function h(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function l(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(c,d),t.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],d=this.h[3],c=this.h[4],b=r,g=n,M=i,v=d,T=c,w=0;w<80;w++){var S=s(a(u(r,f(w,n,i,d),e[p[w]+t],h(w)),m[w]),c);r=c,c=d,d=a(i,10),i=n,n=S,S=s(a(u(b,f(79-w,g,M,v),e[_[w]+t],l(w)),y[w]),T),b=T,T=v,v=a(M,10),M=g,g=S}S=o(this.h[1],i,v),this.h[1]=o(this.h[2],d,T),this.h[2]=o(this.h[3],c,b),this.h[3]=o(this.h[4],r,g),this.h[4]=o(this.h[0],n,M),this.h[0]=S},c.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],_=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],m=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(e,t,r){"use strict";var n=r(11),i=r(8);function a(e,t,r){if(!(this instanceof a))return new a(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=a,a.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},a.prototype.update=function(e,t){return this.inner.update(e,t),this},a.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,r){"use strict";var n=r(7),i=r(428),a=r(9),s=r(62),o=r(59),u=a.assert,d=r(429),c=r(430);function f(e){if(!(this instanceof f))return new f(e);"string"==typeof e&&(u(Object.prototype.hasOwnProperty.call(s,e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=f,f.prototype.keyPair=function(e){return new d(this,e)},f.prototype.keyFromPrivate=function(e,t){return d.fromPrivate(this,e,t)},f.prototype.keyFromPublic=function(e,t){return d.fromPublic(this,e,t)},f.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),a=this.n.sub(new n(2));;){var s=new n(t.generate(r));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}},f.prototype._truncateToN=function(e,t,r){var i;if(n.isBN(e)||"number"==typeof e)i=(e=new n(e,16)).byteLength();else if("object"==typeof e)i=e.length,e=new n(e,16);else{var a=e.toString();i=a.length+1>>>1,e=new n(a,16)}"number"!=typeof r&&(r=8*i);var s=r-this.n.bitLength();return s>0&&(e=e.ushrn(s)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},f.prototype.sign=function(e,t,r,a){if("object"==typeof r&&(a=r,r=null),a||(a={}),"string"!=typeof e&&"number"!=typeof e&&!n.isBN(e)){u("object"==typeof e&&e&&"number"==typeof e.length,"Expected message to be an array-like, a hex string, or a BN instance"),u(e.length>>>0===e.length);for(var s=0;s<e.length;s++)u((255&e[s])===e[s])}t=this.keyFromPrivate(t,r),e=this._truncateToN(e,!1,a.msgBitLength),u(!e.isNeg(),"Can not sign a negative message");var o=this.n.byteLength(),d=t.getPrivate().toArray("be",o),f=e.toArray("be",o);u(new n(f).eq(e),"Can not sign message");for(var h=new i({hash:this.hash,entropy:d,nonce:f,pers:a.pers,persEnc:a.persEnc||"utf8"}),l=this.n.sub(new n(1)),p=0;;p++){var _=a.k?a.k(p):new n(h.generate(this.n.byteLength()));if(!((_=this._truncateToN(_,!0)).cmpn(1)<=0||_.cmp(l)>=0)){var m=this.g.mul(_);if(!m.isInfinity()){var y=m.getX(),b=y.umod(this.n);if(0!==b.cmpn(0)){var g=_.invm(this.n).mul(b.mul(t.getPrivate()).iadd(e));if(0!==(g=g.umod(this.n)).cmpn(0)){var M=(m.getY().isOdd()?1:0)|(0!==y.cmp(b)?2:0);return a.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),M^=1),new c({r:b,s:g,recoveryParam:M})}}}}}},f.prototype.verify=function(e,t,r,n,i){i||(i={}),e=this._truncateToN(e,!1,i.msgBitLength),r=this.keyFromPublic(r,n);var a=(t=new c(t,"hex")).r,s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o,u=s.invm(this.n),d=u.mul(e).umod(this.n),f=u.mul(a).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(d,r.getPublic(),f)).isInfinity()&&o.eqXToP(a):!(o=this.g.mulAdd(d,r.getPublic(),f)).isInfinity()&&0===o.getX().umod(this.n).cmp(a)},f.prototype.recoverPubKey=function(e,t,r,i){u((3&r)===r,"The recovery param is more than two bits"),t=new c(t,i);var a=this.n,s=new n(e),o=t.r,d=t.s,f=1&r,h=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");o=h?this.curve.pointFromX(o.add(this.curve.n),f):this.curve.pointFromX(o,f);var l=t.r.invm(a),p=a.sub(s).mul(l).umod(a),_=d.mul(l).umod(a);return this.g.mulAdd(p,o,_)},f.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new c(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(e,t,i)}catch(e){continue}if(a.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,r){"use strict";var n=r(63),i=r(257),a=r(8);function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=s,s.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},s.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),a(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},s.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var a=[];a.length<e;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var s=a.slice(0,e);return this._update(r),this._reseed++,i.encode(s,t)}},function(e,t,r){"use strict";var n=r(7),i=r(9).assert;function a(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=a,a.fromPublic=function(e,t,r){return t instanceof a?t:new a(e,{pub:t,pubEnc:r})},a.fromPrivate=function(e,t,r){return t instanceof a?t:new a(e,{priv:t,privEnc:r})},a.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},a.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},a.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},a.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},a.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},a.prototype.verify=function(e,t,r){return this.ec.verify(e,t,this,void 0,r)},a.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(e,t,r){"use strict";var n=r(7),i=r(9),a=i.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(a(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function o(){this.place=0}function u(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;if(0===e[t.place])return!1;for(var i=0,a=0,s=t.place;a<n;a++,s++)i<<=8,i|=e[s],i>>>=0;return!(i<=127)&&(t.place=s,i)}function d(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function c(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=s,s.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new o;if(48!==e[r.place++])return!1;var a=u(e,r);if(!1===a)return!1;if(a+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var s=u(e,r);if(!1===s)return!1;if(0!=(128&e[r.place]))return!1;var d=e.slice(r.place,s+r.place);if(r.place+=s,2!==e[r.place++])return!1;var c=u(e,r);if(!1===c)return!1;if(e.length!==c+r.place)return!1;if(0!=(128&e[r.place]))return!1;var f=e.slice(r.place,c+r.place);if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new n(d),this.s=new n(f),this.recoveryParam=null,!0},s.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=d(t),r=d(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length);var a=n.concat(r),s=[48];return c(s,a.length),s=s.concat(a),i.encode(s,e)}},function(e,t,r){"use strict";var n=r(63),i=r(62),a=r(9),s=a.assert,o=a.parseBytes,u=r(432),d=r(433);function c(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=c,c.prototype.sign=function(e,t){e=o(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),a=this.encodePoint(i),s=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),u=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:a})},c.prototype.verify=function(e,t,r){if(e=o(e),(t=this.makeSignature(t)).S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(a)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return a.intFromLE(e.digest()).umod(this.curve.n)},c.prototype.keyFromPublic=function(e){return u.fromPublic(this,e)},c.prototype.keyFromSecret=function(e){return u.fromSecret(this,e)},c.prototype.makeSignature=function(e){return e instanceof d?e:new d(this,e)},c.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},c.prototype.decodePoint=function(e){var t=(e=a.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!=(128&e[t]),i=a.intFromLE(r);return this.curve.pointFromY(i,n)},c.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},c.prototype.decodeInt=function(e){return a.intFromLE(e)},c.prototype.isPoint=function(e){return e instanceof this.pointClass}},function(e,t,r){"use strict";var n=r(9),i=n.assert,a=n.parseBytes,s=n.cachedProperty;function o(e,t){this.eddsa=e,this._secret=a(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=a(t.pub)}o.fromPublic=function(e,t){return t instanceof o?t:new o(e,{pub:t})},o.fromSecret=function(e,t){return t instanceof o?t:new o(e,{secret:t})},o.prototype.secret=function(){return this._secret},s(o,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(o,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(o,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),s(o,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(o,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(o,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),o.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},o.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},o.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},o.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=o},function(e,t,r){"use strict";var n=r(7),i=r(9),a=i.assert,s=i.cachedProperty,o=i.parseBytes;function u(e,t){this.eddsa=e,"object"!=typeof t&&(t=o(t)),Array.isArray(t)&&(a(t.length===2*e.encodingLength,"Signature has invalid size"),t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),a(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}s(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=u},function(e,t){},function(e,t,r){"use strict";var n=r(32);t.certificate=r(445);var i=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=i;var a=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=a;var s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),o=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=o;var u=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=u;var d=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=d;var c=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=c,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var f=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})})),h=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(f),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=h,t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},function(e,t,r){var n=r(32),i=r(1);function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new a(e,t)},a.prototype._createNamed=function(e){var t;try{t=r(437).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return i(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},a.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},a.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},a.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},a.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},function(module,exports){var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;r<e.length;r++)if(e[r]===t)return r;return-1},Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,r){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(e){return function(e,t,r){e[t]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var r=t.contentWindow,n=r.eval,i=r.execScript;!n&&i&&(i.call(r,"null"),n=r.eval),forEach(Object_keys(e),(function(t){r[t]=e[t]})),forEach(globals,(function(t){e[t]&&(r[t]=e[t])}));var a=Object_keys(r),s=n.call(r,this.code);return forEach(Object_keys(r),(function(t){(t in e||-1===indexOf(a,t))&&(e[t]=r[t])})),forEach(globals,(function(t){t in e||defineProp(e,t,r[t])})),document.body.removeChild(t),s},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),r=this.runInContext(t);return e&&forEach(Object_keys(t),(function(r){e[r]=t[r]})),r},forEach(Object_keys(Script.prototype),(function(e){exports[e]=Script[e]=function(t){var r=Script(t);return r[e].apply(r,[].slice.call(arguments,1))}})),exports.isContext=function(e){return e instanceof Context},exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return"object"==typeof e&&forEach(Object_keys(e),(function(r){t[r]=e[r]})),t}},function(e,t,r){var n=r(1);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function a(e,t){this.path=e,this.rethrow(t)}t.Reporter=i,i.prototype.isError=function(e){return e instanceof a},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof a;if(t=n?e:new a(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(a,Error),a.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(e,t,r){var n=r(33).Reporter,i=r(33).EncoderBuffer,a=r(33).DecoderBuffer,s=r(8),o=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);function d(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=d;var c=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];d.prototype.clone=function(){var e=this._baseState,t={};c.forEach((function(r){t[r]=e[r]}));var r=new this.constructor(t.parent);return r._baseState=t,r},d.prototype._wrap=function(){var e=this._baseState;u.forEach((function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},d.prototype._init=function(e){var t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),s.equal(t.children.length,1,"Root node can have only one child")},d.prototype._useArgs=function(e){var t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(s(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);var n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){d.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),o.forEach((function(e){d.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(r),this}})),d.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this},d.prototype.optional=function(){return this._baseState.optional=!0,this},d.prototype.def=function(e){var t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},d.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},d.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},d.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},d.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this},d.prototype.any=function(){return this._baseState.any=!0,this},d.prototype.choice=function(e){var t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},d.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this},d.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n,i=r.default,s=!0,o=null;if(null!==r.key&&(o=e.enterKey(r.key)),r.optional){var u=null;if(null!==r.explicit?u=r.explicit:null!==r.implicit?u=r.implicit:null!==r.tag&&(u=r.tag),null!==u||r.any){if(s=this._peekTag(e,u,r.any),e.isError(s))return s}else{var d=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),s=!0}catch(e){s=!1}e.restore(d)}}if(r.obj&&s&&(n=e.enterObject()),s){if(null!==r.explicit){var c=this._decodeTag(e,r.explicit);if(e.isError(c))return c;e=c}var f=e.offset;if(null===r.use&&null===r.choice){if(r.any)d=e.save();var h=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(h))return h;r.any?i=e.raw(d):e=h}if(t&&t.track&&null!==r.tag&&t.track(e.path(),f,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),i=r.any?i:null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var l=new a(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(l,t)}}return r.obj&&s&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==s?null!==o&&e.exitKey(o):e.leaveKey(o,r.key,i),i},d.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},d.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},d.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(a){var s=e.save(),o=r.choice[a];try{var u=o._decode(e,t);if(e.isError(u))return!1;n={type:a,value:u},i=!0}catch(t){return e.restore(s),!1}return!0}),this),i?n:e.error("Choice not matched")},d.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},d.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},d.prototype._encodeValue=function(e,t,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);var a=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}var s=null,o=!1;if(i.any)a=this._createEncoderBuffer(e);else if(i.choice)a=this._encodeChoice(e,t);else if(i.contains)s=this._getUse(i.contains,r)._encode(e,t),o=!0;else if(i.children)s=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),u))}else null!==i.use?a=this._getUse(i.use,r)._encode(e,t):(s=this._encodePrimitive(i.tag,e),o=!0);if(!i.any&&null===i.choice){var d=null!==i.implicit?i.implicit:i.tag,c=null===i.implicit?"universal":"context";null===d?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(a=this._encodeComposite(d,o,c,s))}return null!==i.explicit&&(a=this._encodeComposite(i.explicit,!1,"context",a)),a},d.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},d.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},d.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},d.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},function(e,t,r){var n=r(264);t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=n._reverse(t.tag)},function(e,t,r){var n=t;n.der=r(265),n.pem=r(442)},function(e,t,r){var n=r(1),i=r(3).Buffer,a=r(265);function s(e){a.call(this,e),this.enc="pem"}n(s,a),e.exports=s,s.prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/,o=-1,u=-1,d=0;d<r.length;d++){var c=r[d].match(s);if(null!==c&&c[2]===n){if(-1!==o){if("END"!==c[1])break;u=d;break}if("BEGIN"!==c[1])break;o=d}}if(-1===o||-1===u)throw new Error("PEM section not found for: "+n);var f=r.slice(o+1,u).join("");f.replace(/[^a-z0-9\+\/=]+/gi,"");var h=new i(f,"base64");return a.prototype.decode.call(this,h,t)}},function(e,t,r){var n=t;n.der=r(266),n.pem=r(444)},function(e,t,r){var n=r(1),i=r(266);function a(e){i.call(this,e),this.enc="pem"}n(a,i),e.exports=a,a.prototype.encode=function(e,t){for(var r=i.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"],a=0;a<r.length;a+=64)n.push(r.slice(a,a+64));return n.push("-----END "+t.label+"-----"),n.join("\n")}},function(e,t,r){"use strict";var n=r(32),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),a=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),o=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),u=n.define("RelativeDistinguishedName",(function(){this.setof(a)})),d=n.define("RDNSequence",(function(){this.seqof(u)})),c=n.define("Name",(function(){this.choice({rdnSequence:this.use(d)})})),f=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),h=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),l=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(c),this.key("validity").use(f),this.key("subject").use(c),this.key("subjectPublicKeyInfo").use(o),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(l),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));e.exports=p},function(e){e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},function(e,t,r){"use strict";var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,a=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=r(40),o=r(57),u=r(2).Buffer;e.exports=function(e,t){var r,d=e.toString(),c=d.match(n);if(c){var f="aes"+c[1],h=u.from(c[2],"hex"),l=u.from(c[3].replace(/[\r\n]/g,""),"base64"),p=s(t,h.slice(0,8),parseInt(c[1],10)).key,_=[],m=o.createDecipheriv(f,p,h);_.push(m.update(l)),_.push(m.final()),r=u.concat(_)}else{var y=d.match(a);r=u.from(y[2].replace(/[\r\n]/g,""),"base64")}return{tag:d.match(i)[1],data:r}}},function(e,t,r){"use strict";var n=r(2).Buffer,i=r(262),a=r(61).ec,s=r(42),o=r(267);function u(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=0)throw new Error("invalid sig")}e.exports=function(e,t,r,d,c){var f=s(r);if("ec"===f.type){if("ecdsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong public key type");return function(e,t,r){var n=o[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new a(n),s=r.data.subjectPrivateKey.data;return i.verify(t,e,s)}(e,t,f)}if("dsa"===f.type){if("dsa"!==d)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,a=r.data.q,o=r.data.g,d=r.data.pub_key,c=s.signature.decode(e,"der"),f=c.s,h=c.r;u(f,a),u(h,a);var l=i.mont(n),p=f.invm(a);return 0===o.toRed(l).redPow(new i(t).mul(p).mod(a)).fromRed().mul(d.toRed(l).redPow(h.mul(p).mod(a)).fromRed()).mod(n).mod(a).cmp(h)}(e,t,f)}if("rsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong public key type");t=n.concat([c,t]);for(var h=f.modulus.byteLength(),l=[1],p=0;t.length+l.length+2<h;)l.push(255),p+=1;l.push(0);for(var _=-1;++_<t.length;)l.push(t[_]);l=n.from(l);var m=i.mont(f.modulus);e=(e=new i(e).toRed(m)).redPow(new i(f.publicExponent)),e=n.from(e.fromRed().toArray());var y=p<8?1:0;for(h=Math.min(e.length,l.length),e.length!==l.length&&(y=1),_=-1;++_<h;)y|=e[_]^l[_];return 0===y}},function(e,t,r){(function(t){var n=r(61),i=r(7);e.exports=function(e){return new s(e)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(e){this.curveType=a[e],this.curveType||(this.curveType={name:e}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function o(e,r,n){Array.isArray(e)||(e=e.toArray());var i=new t(e);if(n&&i.length<n){var a=new t(n-i.length);a.fill(0),i=t.concat([a,i])}return r?i.toString(r):i}a.p224=a.secp224r1,a.p256=a.secp256r1=a.prime256v1,a.p192=a.secp192r1=a.prime192v1,a.p384=a.secp384r1,a.p521=a.secp521r1,s.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},s.prototype.computeSecret=function(e,r,n){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),o(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),n,this.curveType.byteLength)},s.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),o(r,e)},s.prototype.getPrivateKey=function(e){return o(this.keys.getPrivate(),e)},s.prototype.setPublicKey=function(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this.keys._importPublic(e),this},s.prototype.setPrivateKey=function(e,r){r=r||"utf8",t.isBuffer(e)||(e=new t(e,r));var n=new i(e);return n=n.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(n),this}}).call(this,r(3).Buffer)},function(e,t,r){t.publicEncrypt=r(451),t.privateDecrypt=r(452),t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}},function(e,t,r){var n=r(42),i=r(18),a=r(25),s=r(268),o=r(269),u=r(7),d=r(270),c=r(60),f=r(2).Buffer;e.exports=function(e,t,r){var h;h=e.padding?e.padding:r?1:4;var l,p=n(e);if(4===h)l=function(e,t){var r=e.modulus.byteLength(),n=t.length,d=a("sha1").update(f.alloc(0)).digest(),c=d.length,h=2*c;if(n>r-h-2)throw new Error("message too long");var l=f.alloc(r-n-h-2),p=r-c-1,_=i(c),m=o(f.concat([d,l,f.alloc(1,1),t],p),s(_,p)),y=o(_,s(m,c));return new u(f.concat([f.alloc(1),y,m],r))}(p,t);else if(1===h)l=function(e,t,r){var n,a=t.length,s=e.modulus.byteLength();if(a>s-11)throw new Error("message too long");n=r?f.alloc(s-a-3,255):function(e){var t,r=f.allocUnsafe(e),n=0,a=i(2*e),s=0;for(;n<e;)s===a.length&&(a=i(2*e),s=0),(t=a[s++])&&(r[n++]=t);return r}(s-a-3);return new u(f.concat([f.from([0,r?1:2]),n,f.alloc(1),t],s))}(p,t,r);else{if(3!==h)throw new Error("unknown padding");if((l=new u(t)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return r?c(l,p):d(l,p)}},function(e,t,r){var n=r(42),i=r(268),a=r(269),s=r(7),o=r(60),u=r(25),d=r(270),c=r(2).Buffer;e.exports=function(e,t,r){var f;f=e.padding?e.padding:r?1:4;var h,l=n(e),p=l.modulus.byteLength();if(t.length>p||new s(t).cmp(l.modulus)>=0)throw new Error("decryption error");h=r?d(new s(t),l):o(t,l);var _=c.alloc(p-h.length);if(h=c.concat([_,h],p),4===f)return function(e,t){var r=e.modulus.byteLength(),n=u("sha1").update(c.alloc(0)).digest(),s=n.length;if(0!==t[0])throw new Error("decryption error");var o=t.slice(1,s+1),d=t.slice(s+1),f=a(o,i(d,s)),h=a(d,i(f,r-s-1));if(function(e,t){e=c.from(e),t=c.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));var i=-1;for(;++i<n;)r+=e[i]^t[i];return r}(n,h.slice(0,s)))throw new Error("decryption error");var l=s;for(;0===h[l];)l++;if(1!==h[l++])throw new Error("decryption error");return h.slice(l)}(l,h);if(1===f)return function(e,t,r){var n=t.slice(0,2),i=2,a=0;for(;0!==t[i++];)if(i>=t.length){a++;break}var s=t.slice(2,i-1);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&a++;s.length<8&&a++;if(a)throw new Error("decryption error");return t.slice(i)}(0,h,r);if(3===f)return h;throw new Error("unknown padding")}},function(e,t,r){"use strict";(function(e,n){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var a=r(2),s=r(18),o=a.Buffer,u=a.kMaxLength,d=e.crypto||e.msCrypto,c=Math.pow(2,32)-1;function f(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>c||e<0)throw new TypeError("offset must be a uint32");if(e>u||e>t)throw new RangeError("offset out of range")}function h(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>c||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>u)throw new RangeError("buffer too small")}function l(e,t,r,i){if(n.browser){var a=e.buffer,o=new Uint8Array(a,t,r);return d.getRandomValues(o),i?void n.nextTick((function(){i(null,e)})):e}if(!i)return s(r).copy(e,t),e;s(r,(function(r,n){if(r)return i(r);n.copy(e,t),i(null,e)}))}d&&d.getRandomValues||!n.browser?(t.randomFill=function(t,r,n,i){if(!(o.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof r)i=r,r=0,n=t.length;else if("function"==typeof n)i=n,n=t.length-r;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return f(r,t.length),h(n,r,t.length),l(t,r,n,i)},t.randomFillSync=function(t,r,n){void 0===r&&(r=0);if(!(o.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');f(r,t.length),void 0===n&&(n=t.length-r);return h(n,r,t.length),l(t,r,n)}):(t.randomFill=i,t.randomFillSync=i)}).call(this,r(5),r(4))},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(10));t.default=class{constructor(){this.getStorageList=async(e,t=1,r=100)=>{const n=`https://commonapi.tripian.com/radical-storage?cityId=${e}&page=${t}&limit=${r}`;return this.axios.get(n).then(e=>e.data).catch(e=>{throw e.response.data.originalResponse.data.message||e.response.data.error})},this.axios=i.default.create(),this.axios.defaults.timeout=6e4}}}]);
|
|
289
289
|
//# sourceMappingURL=tcore.umd.js.map
|